public inbox for linux-riscv@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v1] RISC-V: add a spin_shadow_stack declaration
@ 2023-02-10 18:59 Conor Dooley
  2023-02-11  5:04 ` Guo Ren
  2023-02-22 15:00 ` patchwork-bot+linux-riscv
  0 siblings, 2 replies; 4+ messages in thread
From: Conor Dooley @ 2023-02-10 18:59 UTC (permalink / raw)
  To: palmer; +Cc: conor, Conor Dooley, linux-riscv, guoren

From: Conor Dooley <conor.dooley@microchip.com>

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 <conor.dooley@microchip.com>
---
Applies on top of Guo Ren's generic entry series.
---
 arch/riscv/include/asm/thread_info.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/riscv/include/asm/thread_info.h b/arch/riscv/include/asm/thread_info.h
index 7de4fb96f0b5..e0d202134b44 100644
--- a/arch/riscv/include/asm/thread_info.h
+++ b/arch/riscv/include/asm/thread_info.h
@@ -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


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v1] RISC-V: add a spin_shadow_stack declaration
  2023-02-10 18:59 [PATCH v1] RISC-V: add a spin_shadow_stack declaration Conor Dooley
@ 2023-02-11  5:04 ` Guo Ren
  2023-02-11 10:16   ` Conor Dooley
  2023-02-22 15:00 ` patchwork-bot+linux-riscv
  1 sibling, 1 reply; 4+ messages in thread
From: Guo Ren @ 2023-02-11  5:04 UTC (permalink / raw)
  To: Conor Dooley; +Cc: palmer, Conor Dooley, linux-riscv

On Sat, Feb 11, 2023 at 2:59 AM Conor Dooley <conor@kernel.org> wrote:
>
> From: Conor Dooley <conor.dooley@microchip.com>
>
> 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 <conor.dooley@microchip.com>
> ---
> 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:
Fixes: 7e1864332fbc ("riscv: fix race when vmap stack overflow")

Reviewed-by: Guo Ren <guoren@kernel.org>

> ---
>  arch/riscv/include/asm/thread_info.h | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/riscv/include/asm/thread_info.h b/arch/riscv/include/asm/thread_info.h
> index 7de4fb96f0b5..e0d202134b44 100644
> --- a/arch/riscv/include/asm/thread_info.h
> +++ b/arch/riscv/include/asm/thread_info.h
> @@ -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
>


-- 
Best Regards
 Guo Ren

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1] RISC-V: add a spin_shadow_stack declaration
  2023-02-11  5:04 ` Guo Ren
@ 2023-02-11 10:16   ` Conor Dooley
  0 siblings, 0 replies; 4+ messages in thread
From: Conor Dooley @ 2023-02-11 10:16 UTC (permalink / raw)
  To: Guo Ren; +Cc: palmer, Conor Dooley, linux-riscv


[-- Attachment #1.1: Type: text/plain, Size: 1228 bytes --]

On Sat, Feb 11, 2023 at 01:04:43PM +0800, Guo Ren wrote:
> On Sat, Feb 11, 2023 at 2:59 AM Conor Dooley <conor@kernel.org> wrote:
> >
> > From: Conor Dooley <conor.dooley@microchip.com>
> >
> > 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 <conor.dooley@microchip.com>
> > ---
> > 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.

> Fixes: 7e1864332fbc ("riscv: fix race when vmap stack overflow")

Wasn't sure if this warranted one, but you're probably right to add it.

> Reviewed-by: Guo Ren <guoren@kernel.org>

Thanks!

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1] RISC-V: add a spin_shadow_stack declaration
  2023-02-10 18:59 [PATCH v1] RISC-V: add a spin_shadow_stack declaration Conor Dooley
  2023-02-11  5:04 ` Guo Ren
@ 2023-02-22 15:00 ` patchwork-bot+linux-riscv
  1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+linux-riscv @ 2023-02-22 15:00 UTC (permalink / raw)
  To: Conor Dooley; +Cc: linux-riscv, palmer, conor.dooley, guoren

Hello:

This patch was applied to riscv/linux.git (for-next)
by Palmer Dabbelt <palmer@rivosinc.com>:

On Fri, 10 Feb 2023 18:59:45 +0000 you wrote:
> From: Conor Dooley <conor.dooley@microchip.com>
> 
> 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
> 
> [...]

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-02-22 15:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-10 18:59 [PATCH v1] RISC-V: add a spin_shadow_stack declaration Conor Dooley
2023-02-11  5:04 ` Guo Ren
2023-02-11 10:16   ` Conor Dooley
2023-02-22 15:00 ` patchwork-bot+linux-riscv

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox