[PATCH 2/3] arm64/fpsimd: signal: Allocate SSVE storage when restoring ZA

Mark Brown broonie at kernel.org
Tue Jan 20 07:20:20 PST 2026


On Tue, Jan 20, 2026 at 02:51:06PM +0000, Mark Rutland wrote:
> The code to restore a ZA context doesn't attempt to allocate the task's
> sve_state before setting TIF_SME. Consequently, restoring a ZA context
> can place a task into an invalid state where TIF_SME is set but the
> task's sve_state is NULL.

...

> Fix this by having restore_za_context() ensure that the task's sve_state
> is allocated, matching what we do when taking an SME trap. Any live
> SVE/SSVE state (which is restored earlier from a separate signal
> context) must be preserved, and hence this is not zeroed.

Reviewed-by: Mark Brown <broonie at kernel.org>
-------------- 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/20260120/b1d67f5e/attachment.sig>


More information about the linux-arm-kernel mailing list