Skip to content

arm64: signal: Fix ZT restore without ZA and clean up bounds check

Bradley Morgan linux-arm-kernel lkml stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2arm64/fpsimd: signal: Require ZA context when restoring ZT contextarch/arm64/kernel/signal.c+1 -12 replies
2/2arm64: signal: drop redundant bounds check in parse_user_sigframe()arch/arm64/kernel/signal.c+0 -30 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchMark Brown
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] arm64: signal: Fix ZT restore without ZA and clean up bounds check

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(-)
Signature · 1 line
2.53.0