[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <febe1a8a-a68b-1af8-a9d5-1b5f510ecab3@kernel.org>
Date: Tue, 4 Nov 2025 00:52:53 -0700 (MST)
From: Paul Walmsley <pjw@...nel.org>
To: Randy Dunlap <rdunlap@...radead.org>
cc: Paul Walmsley <pjw@...nel.org>, Deepak Gupta <debug@...osinc.com>,
Andy Chiu <andybnac@...il.com>, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"Liam R. Howlett" <Liam.Howlett@...cle.com>,
Vlastimil Babka <vbabka@...e.cz>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>, Albert Ou <aou@...s.berkeley.edu>,
Conor Dooley <conor@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Arnd Bergmann <arnd@...db.de>,
Christian Brauner <brauner@...nel.org>,
Peter Zijlstra <peterz@...radead.org>, Oleg Nesterov <oleg@...hat.com>,
Eric Biederman <ebiederm@...ssion.com>, Kees Cook <kees@...nel.org>,
Jonathan Corbet <corbet@....net>, Shuah Khan <shuah@...nel.org>,
Jann Horn <jannh@...gle.com>, Conor Dooley <conor+dt@...nel.org>,
Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
Benno Lossin <lossin@...nel.org>, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
linux-riscv@...ts.infradead.org, devicetree@...r.kernel.org,
linux-arch@...r.kernel.org, linux-doc@...r.kernel.org,
linux-kselftest@...r.kernel.org, alistair.francis@....com,
richard.henderson@...aro.org, jim.shu@...ive.com, kito.cheng@...ive.com,
charlie@...osinc.com, atishp@...osinc.com, evan@...osinc.com,
cleger@...osinc.com, alexghiti@...osinc.com, samitolvanen@...gle.com,
broonie@...nel.org, rick.p.edgecombe@...el.com,
rust-for-linux@...r.kernel.org
Subject: Re: [PATCH v22 17/28] riscv/signal: save and restore of shadow stack
for signal
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
Powered by blists - more mailing lists