Hi Randy,
On Fri, 31 Oct 2025, Randy Dunlap wrote:
On 10/31/25 1:07 PM, Paul Walmsley wrote:
On Thu, 23 Oct 2025, Deepak Gupta via B4 Relay wrote:
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.
Is checkpatch.pl --strict the norm for arch/riscv/ ?
I run it on every patch I review. I usually implement the formatting recommendations, in the interest of keeping the codebase formatted in a standard way across submitters.
If there are enough arch/riscv/-specific patch expectations, maybe they could be documented in Documentation/process/maintainer-riscv.rst (a new file).
It never occurred to me as being arch/riscv specific, in the sense that, if --strict wasn't more broadly useful across the entire kernel tree, then we should just remove it from checkpatch.pl entirely. In other words, probably everyone should use it. There are false positive warnings, of course, including at least one with this patch set; but then again, there are regular false positive warnings with non-strict checkpatch (also with this patch set).
In any case, thanks for the suggestion, and will consider.
- Paul