[PATCH] arm64/fpsimd: signal: Forbid non-streaming SVE payload on SME-only systems
Mark Rutland
mark.rutland at arm.com
Thu Oct 1 07:42:24 PDT 2026
On Thu, Oct 01, 2026 at 03:25:03PM +0100, Mark Brown wrote:
> On Thu, Oct 01, 2026 at 02:08:36PM +0100, Mark Rutland wrote:
> > @@ -443,19 +444,33 @@ static int restore_sve_fpsimd_context(struct user_ctxs *user)
>
> > } else {
> > /*
> > - * A SME only system use SVE for streaming mode so can
> > - * have a SVE formatted context with a zero VL and no
> > - * payload data.
> > + * Non-streaming SVE state may be preserved without an SVE
> > + * payload, in which case all state is saved in the FPSIMD
> > + * context.
> > + *
> > + * On SME-only systems, non-streaming (FPSIMD-only) state is
> > + * always preserved without an SVE payload, and with VL==0. On
> > + * such systems, only accept non-streaming state without an SVE
> > + * payload.
> > */
> > - if (!system_supports_sve() && !system_supports_sme())
> > + if (!system_supports_sve() && !fpsimd_only)
> > return -EINVAL;
>
> This means that this function will now accept a FPSIMD only SVE context
> on systems with neither SVE nor SME, but that check was redundant since
> we already reject anything with SVE magic in parse_user_sigframe() on
> such systems and should never get here anyway.
Yes. The commit message explained that:
As parse_user_sigframe() rejects SVE signal frames when neither SVE
nor SME are supported, it isn't necessary for
restore_sve_fpsimd_context() to handle the case where neither are
supported.
> Reviewed-by: Mark Brown <broonie at kernel.org>
Thanks.
Mark.
More information about the linux-arm-kernel
mailing list