Skip to content

Ensure stack is aligned for kernel entries

Will Deacon kvmarm linux-arm-kernel 1 version New

Get series with b4
b4 am 20181107215854.GD12248@brain-police

Versions newest first

  1. v1 Latest5 of 7 patches 0 repliesNew

5 of 7 patches are in this archive. The cover letter announces 7.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7arm64: Add static check for pt_regs alignment+0 -02 replies
1/7arm64: Add static check for pt_regs alignment+0 -00 replies
2/7arm64: sdei: Always use sdei stack for sdei events+0 -01 reply
3/7arm64: Align stack when taking exception from EL1+0 -01 reply
4/7arm64: Add fast-path for stack alignment+0 -01 reply

Reviews trailers per patch

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

PatchWill Deacon
1/7
1/7
2/7
3/7
4/7A-b

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/7] Ensure stack is aligned for kernel entries

Hi Julien,

Quoted 5 lines · Julien Thierry

Having SCTLR_ELx.SA enabled requires the SP to be 16-bytes aligned before using it to access memory. When taking an exception, it is possible that the context during which the exception occured had SP mis-aligned. The entry code needs to make sure that the stack is aligned before using it to save the context.

Do you know what we haven't had reports of this crashing? Is it because GCC tends to keep the SP aligned anyway, so we're getting away with it for the moment? Trying to work out whether this is a candidate for -stable.

Cheers,

Will