Re: [PATCH] arm64/signal: Silence spurious sparse warning storing GCSPR_EL0
From: Mark Brown
Date: Tue Dec 10 2024 - 09:46:08 EST
On Tue, Dec 10, 2024 at 02:17:58PM +0000, Catalin Marinas wrote:
> On Tue, Dec 10, 2024 at 12:42:53AM +0000, Mark Brown wrote:
> > - write_sysreg_s(gcspr_el0 + 1, SYS_GCSPR_EL0);
> > + write_sysreg_s((unsigned long)(gcspr_el0 + 1), SYS_GCSPR_EL0);
> Would we now get a warning here?
No, like the changelog mentions converting to an unsigned long is
regarded by sparse as a (the AFAICT) valid way of discarding the
__userness of a pointer so it's that change that silences the warning.
It does the right thing with whatever sparse I have here.
Attachment:
signature.asc
Description: PGP signature