* [PATCH] kasan: include <linux/instruction_pointer.h> for _RET_IP_
@ 2026-07-01 7:04 Tao Cui
2026-07-01 7:59 ` Alexander Potapenko
2026-07-01 15:07 ` Vincenzo Frascino
0 siblings, 2 replies; 3+ messages in thread
From: Tao Cui @ 2026-07-01 7:04 UTC (permalink / raw)
To: Andrey Ryabinin
Cc: Alexander Potapenko, Andrey Konovalov, Dmitry Vyukov,
Vincenzo Frascino, Steven Rostedt, mhiramat, kasan-dev,
linux-kernel, cuitao, cui.tao, kernel test robot
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] kasan: include <linux/instruction_pointer.h> for _RET_IP_
2026-07-01 7:04 [PATCH] kasan: include <linux/instruction_pointer.h> for _RET_IP_ Tao Cui
@ 2026-07-01 7:59 ` Alexander Potapenko
2026-07-01 15:07 ` Vincenzo Frascino
1 sibling, 0 replies; 3+ messages in thread
From: Alexander Potapenko @ 2026-07-01 7:59 UTC (permalink / raw)
To: Tao Cui
Cc: Andrey Ryabinin, Andrey Konovalov, Dmitry Vyukov,
Vincenzo Frascino, Steven Rostedt, mhiramat, kasan-dev,
linux-kernel, cuitao, kernel test robot
On Wed, Jul 1, 2026 at 9:06 AM Tao Cui <cui.tao@linux.dev> wrote:
>
> 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>
Reviewed-by: Alexander Potapenko <glider@google.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] kasan: include <linux/instruction_pointer.h> for _RET_IP_
2026-07-01 7:04 [PATCH] kasan: include <linux/instruction_pointer.h> for _RET_IP_ Tao Cui
2026-07-01 7:59 ` Alexander Potapenko
@ 2026-07-01 15:07 ` Vincenzo Frascino
1 sibling, 0 replies; 3+ messages in thread
From: Vincenzo Frascino @ 2026-07-01 15:07 UTC (permalink / raw)
To: Tao Cui, Andrey Ryabinin
Cc: Alexander Potapenko, Andrey Konovalov, Dmitry Vyukov,
Steven Rostedt, mhiramat, kasan-dev, linux-kernel, cuitao,
kernel test robot
On 01/07/2026 08:04, Tao Cui wrote:
> 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>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> ---
> 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>
--
Regards,
Vincenzo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-07-01 15:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-01 7:04 [PATCH] kasan: include <linux/instruction_pointer.h> for _RET_IP_ Tao Cui
2026-07-01 7:59 ` Alexander Potapenko
2026-07-01 15:07 ` Vincenzo Frascino
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox