RISC-V: add a spin_shadow_stack declaration
PATCH 1/1 RISC-V: add a spin_shadow_stack declaration
From: Conor Dooley <[email protected]>
The patchwork automation reported a sparse complaint thatspin_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
---
Applies on top of Guo Ren's generic entry series.
--- arch/riscv/include/asm/thread_info.h | 1 + 1 file changed, 1 insertion(+)
arch/riscv/include/asm/thread_info.h +1 -0
@@ -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>
Signature · 7 lines
2.39.1 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
Quoted 7 lines · Conor Dooley
From: Conor Dooley <[email protected]>
The patchwork automation reported a sparse complaint that
spin_shadow_stackwas 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?
Quoted 8 lines
However, this is used in
entry.Sand therefore shouldn't be static. The same applies to theshadow_stackthat this pseudo spinlock is trying to protect, so do like its charge and add a declaration tothread_info.hSigned-off-by Conor Dooley <[email protected]>---
Applies on top of Guo Ren's generic entry series.
It's needn't on top of my generic entry series. It's the separate patch for:
Quoted 19 lines
--- arch/riscv/include/asm/thread_info.h | 1 + 1 file changed, 1 insertion(+)arch/riscv/include/asm/thread_info.h +1
-1@@ -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> --2.39.1
Signature · 7 lines
Best Regards Guo Ren _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
Quoted 13 lines · Guo Ren
Quoted 12 lines · Conor Dooley
From: Conor Dooley <[email protected]>
The patchwork automation reported a sparse complaint that
spin_shadow_stackwas 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.Sand therefore shouldn't be static. The same applies to theshadow_stackthat this pseudo spinlock is trying to protect, so do like its charge and add a declaration tothread_info.h
Quoted 4 lines
Quoted 3 lines
Signed-off-by Conor Dooley <[email protected]>---
Applies on top of Guo Ren's generic entry series.It's needn't on top of my generic entry series. It's the separate patch for:
I didn't mean I was "blaming" your series for it's introduction, I meant that I created the patch using your series as a base to avoid any potential for conflicts.
Quoted 1 line
Fixes 7e1864332fbc ("riscv: fix race when vmap stack overflow")
Wasn't sure if this warranted one, but you're probably right to add it.
Quoted 1 line
Reviewed-by Guo Ren <[email protected]>
Thanks!
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
This patch was applied to riscv/linux.git (for-next) by Palmer Dabbelt <[email protected]>:
Hello:
This patch was applied to riscv/linux.git (for-next) by Palmer Dabbelt <[email protected]>:
Quoted 6 lines · On Fri, 10 Feb 2023 18:59:45 +0000 you wrote:
From: Conor Dooley <[email protected]>
The patchwork automation reported a sparse complaint that
spin_shadow_stackwas 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?
Quoted 6 lines
However, this is used in
entry.Sand therefore shouldn't be static. The same applies to theshadow_stackthat this pseudo spinlock is trying to protect, so do like its charge and add a declaration tothread_info.h[...]
Here is the summary with links:
- [v1] RISC-V: add a spin_shadow_stack declaration
https://git.kernel.org/riscv/c/eb9be8310c58
You are awesome, thank you!
Signature · 9 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv