From: Tao Cui <cui.tao@linux.dev>
To: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Alexander Potapenko <glider@google.com>,
Andrey Konovalov <andreyknvl@gmail.com>,
Dmitry Vyukov <dvyukov@google.com>,
Vincenzo Frascino <vincenzo.frascino@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
mhiramat@kernel.org, kasan-dev@googlegroups.com,
linux-kernel@vger.kernel.org, cuitao@kylinos.cn,
cui.tao@linux.dev, kernel test robot <lkp@intel.com>
Subject: [PATCH] kasan: include <linux/instruction_pointer.h> for _RET_IP_
Date: Wed, 1 Jul 2026 15:04:55 +0800 [thread overview]
Message-ID: <20260701070455.88906-1-cui.tao@linux.dev> (raw)
From: Tao Cui <cuitao@kylinos.cn>
kasan.h uses _RET_IP_ but relied on <linux/trace_printk.h>, included via
<linux/kernel.h>, to provide it. Commit 9cbc3d9806d3 ("tracing: Remove
trace_printk.h from kernel.h") dropped that transitive include, so files
that don't otherwise get instruction_pointer.h no longer build, e.g.
kernel/scs.c on arm64 KASAN:
include/linux/kasan.h:199:43: error: use of undeclared identifier '_RET_IP_'
Include <linux/instruction_pointer.h> directly to make the dependency
explicit.
Fixes: 9cbc3d9806d3 ("tracing: Remove trace_printk.h from kernel.h")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202606301759.hTqHaPuI-lkp@intel.com/
Signed-off-by: Tao Cui <cuitao@kylinos.cn>
---
include/linux/kasan.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/kasan.h b/include/linux/kasan.h
index bf233bde68c7..d5159c8033e8 100644
--- a/include/linux/kasan.h
+++ b/include/linux/kasan.h
@@ -3,6 +3,7 @@
#define _LINUX_KASAN_H
#include <linux/bug.h>
+#include <linux/instruction_pointer.h>
#include <linux/kasan-enabled.h>
#include <linux/kasan-tags.h>
#include <linux/kernel.h>
--
2.43.0
next reply other threads:[~2026-07-01 7:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 7:04 Tao Cui [this message]
2026-07-01 7:59 ` [PATCH] kasan: include <linux/instruction_pointer.h> for _RET_IP_ Alexander Potapenko
2026-07-01 15:07 ` Vincenzo Frascino
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260701070455.88906-1-cui.tao@linux.dev \
--to=cui.tao@linux.dev \
--cc=andreyknvl@gmail.com \
--cc=cuitao@kylinos.cn \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.org \
--cc=ryabinin.a.a@gmail.com \
--cc=vincenzo.frascino@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox