mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] arm64: signal: Fix ZT restore without ZA and clean up bounds check
@ 2026-11-10 22:18 Bradley Morgan
  2026-11-10 22:18 ` [PATCH 1/2] arm64/fpsimd: signal: Require ZA context when restoring ZT context Bradley Morgan
  2026-11-10 22:18 ` [PATCH 2/2] arm64: signal: drop redundant bounds check in parse_user_sigframe() Bradley Morgan
  0 siblings, 2 replies; 3+ messages in thread
From: Bradley Morgan @ 2026-11-10 22:18 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon
  Cc: Mark Rutland, Mark Brown, linux-arm-kernel, linux-kernel, bradley.morgan

This series addresses two separate issues in the arm64 signal frame
parsing and restoration code:

Patch 1 fixes a bug where ZT state could be restored without ZA state.
If user.za was omitted from the signal frame, restore_za_context() was
never invoked. When a signal handler touched SME before calling
rt_sigreturn(), thread_za_enabled(&current->thread) evaluated to true,
causing restore_zt_context() to overwrite ZT without restoring ZA.
We now mandate that user->za is present before restoring ZT context.

Patch 2 drops a duplicate limit - offset < size bounds check in
parse_user_sigframe() that was left over after the switch block from the
2017 frame layout rework.

Bradley Morgan (2):
  arm64/fpsimd: signal: Require ZA context when restoring ZT context
  arm64: signal: drop redundant bounds check in parse_user_sigframe()

 arch/arm64/kernel/signal.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

-- 
2.53.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-10 22:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-10 22:18 [PATCH 0/2] arm64: signal: Fix ZT restore without ZA and clean up bounds check Bradley Morgan
2026-11-10 22:18 ` [PATCH 1/2] arm64/fpsimd: signal: Require ZA context when restoring ZT context Bradley Morgan
2026-11-10 22:18 ` [PATCH 2/2] arm64: signal: drop redundant bounds check in parse_user_sigframe() Bradley Morgan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®