]> Git Repo - linux.git/commitdiff
RISC-V: add a spin_shadow_stack declaration
authorConor Dooley <[email protected]>
Fri, 10 Feb 2023 18:59:45 +0000 (18:59 +0000)
committerPalmer Dabbelt <[email protected]>
Wed, 22 Feb 2023 14:48:30 +0000 (06:48 -0800)
The patchwork automation reported a sparse complaint that
spin_shadow_stack was not declared and should be static:
../arch/riscv/kernel/traps.c:335:15: warning: symbol 'spin_shadow_stack' was not declared. Should it be static?

However, this is used in entry.S and therefore shouldn't be static.
The same applies to the shadow_stack that this pseudo spinlock is
trying to protect, so do like its charge and add a declaration to
thread_info.h

Signed-off-by: Conor Dooley <[email protected]>
Fixes: 7e1864332fbc ("riscv: fix race when vmap stack overflow")
Reviewed-by: Guo Ren <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Cc: [email protected]
Signed-off-by: Palmer Dabbelt <[email protected]>
arch/riscv/include/asm/thread_info.h

index 67322f878e0d7828178a51fb0cff047270d59a2a..f704c8dd57e040be839751bb6ee84a1908199fa9 100644 (file)
@@ -43,6 +43,7 @@
 #ifndef __ASSEMBLY__
 
 extern long shadow_stack[SHADOW_OVERFLOW_STACK_SIZE / sizeof(long)];
+extern unsigned long spin_shadow_stack;
 
 #include <asm/processor.h>
 #include <asm/csr.h>
This page took 0.059197 seconds and 4 git commands to generate.