[PATCH 1/2] arm64/fpsimd: signal: Require ZA context when restoring ZT context

Mark Brown broonie at kernel.org
Wed Nov 25 08:29:17 PST 2026


On Mon, Nov 16, 2026 at 11:07:13PM +0000, Bradley Morgan wrote:
> On 11/16/26 10:48 PM, Mark Brown wrote:

> > though as the Sashiko report identifies we still leave ZA untouched if
> > both ZA and ZT are omitted from the signal frame.  I'm not sure if it's
> > safer to reject any attempt to return from a signal with PSTATE.ZA set
> > but no ZA signal frame or if we should restore PSTATE.ZA to 0, the
> > former is safer but the latter is more in line with the handling here.

> Thx, do you suggest any remedies, id say sashiko is correct, but id hate for
> code

Probably the safest thing is to add something that disables PSTATE.ZA
during signal return if we're missing a ZA record in the signal frame,
that's less likely to break a userspace that's doing something like
fully synthesizing a signal frame to return to.  We should be able to
implement that by just disabling PSTATE.ZA before restoring the state I
think, I'm struggling to see a use case for sigreturn with PSTATE.ZA set
anyway so in practical use it'd just be enforcing the already current
state.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20261125/817e82a7/attachment-0001.sig>


More information about the linux-arm-kernel mailing list