]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ARM: stacktrace: include asm/sections.h in asm/stacktrace.h
authorArnd Bergmann <arnd@arndb.de>
Thu, 7 Aug 2025 07:18:58 +0000 (09:18 +0200)
committerKees Cook <kees@kernel.org>
Mon, 25 Aug 2025 13:12:06 +0000 (06:12 -0700)
The recent kstack erase changes appear to have uncovered an existing
issue with a missing header inclusion:

In file included from drivers/misc/lkdtm/kstack_erase.c:12:
In file included from include/linux/kstack_erase.h:16:
arch/arm/include/asm/stacktrace.h:48:21: error: call to undeclared function 'in_entry_text'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
   48 |                 frame->ex_frame = in_entry_text(frame->pc);
      |                                   ^

Include asm/sections.h here so the compiler can see the in_entry_text()
declaration.

Fixes: 752ec621ef5c ("ARM: 9234/1: stacktrace: Avoid duplicate saving of exception PC value")
Cc: Kees Cook <kees@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250807071902.4077714-1-arnd@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>
arch/arm/include/asm/stacktrace.h

index f80a85b091d6c4ff365e15ae7100af1c3aed597f..ba2f771cca23f389feda2f0e0aa66a8c4fe55f9f 100644 (file)
@@ -2,8 +2,9 @@
 #ifndef __ASM_STACKTRACE_H
 #define __ASM_STACKTRACE_H
 
-#include <asm/ptrace.h>
 #include <linux/llist.h>
+#include <asm/ptrace.h>
+#include <asm/sections.h>
 
 struct stackframe {
        /*