[PATCH v22 17/28] riscv/signal: save and restore of shadow stack for signal

Randy Dunlap rdunlap at infradead.org
Fri Oct 31 15:10:01 PDT 2025



On 10/31/25 1:07 PM, Paul Walmsley wrote:
> On Thu, 23 Oct 2025, Deepak Gupta via B4 Relay wrote:
> 
>> From: Deepak Gupta <debug at rivosinc.com>
>>
>> Save shadow stack pointer in sigcontext structure while delivering signal.
>> Restore shadow stack pointer from sigcontext on sigreturn.
>>

> 
> This patch causes some 'checkpatch.pl --strict' messages:
> 
> CHECK: Comparison to NULL could be written "!saved_shstk_ptr"
> #271: FILE: arch/riscv/kernel/usercfi.c:186:
> +	if (saved_shstk_ptr == NULL)
> 
> CHECK: Lines should not end with a '('
> #300: FILE: arch/riscv/kernel/usercfi.c:215:
> +		pr_info_ratelimited(
> 
> I've fixed them up here in the event that v22 goes in, but please do the 
> same on your side in case a new version is needed.

Hi Paul,

Is checkpatch.pl --strict the norm for arch/riscv/ ?

If there are enough arch/riscv/-specific patch expectations,
maybe they could be documented in Documentation/process/maintainer-riscv.rst
(a new file).

Thanks.
-- 
~Randy




More information about the linux-riscv mailing list