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

From: Mark Brown

Date: Wed Nov 25 2026 - 11:30:15 EST


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.

Attachment: signature.asc
Description: PGP signature