microblaze: fix signal-frame handling for NPTL
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 1 replyIn review
- v12 patches 2 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | microblaze: wire up sigaltstackarch/ | +1 | 0 replies | |
| 2/2 | microblaze: reserve the ABI argument-home area in the signal framearch/ | +8 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/2] microblaze: fix signal-frame handling for NPTL
Two independent fixes to the microblaze signal-delivery path, both found while bringing the uClibc-ng NPTL test suite up on microblazeel under qemu-system (petalogix-s3adsp1800).
Patch 1 wires up sigaltstack(), which is currently routed to sys_ni_syscall even though the signal code fully supports an alternate stack - microblaze is the only architecture leaving it unimplemented.
Patch 2 reserves the ABI argument-home area at the top of the signal frame. The MicroBlaze calling convention reserves [r1+0] for the return address and lets a handler store its incoming register arguments r5..r10 into [r1+4]..[r1+24]; since r1 points at struct rt_sigframe on entry, those stores land in siginfo/ucontext and corrupt the signal state. A seven-word leading gap moves them into scratch space.
Both were tested with the uClibc-ng NPTL tests; the affected tests (tst-cancel20/21, tst-cancelx20/21, tst-signal6, tst-timer4/5, tst-mqueue5) pass. checkpatch --strict is clean and both apply to current linux-next.
Changes since v1 [1]:
- Patch 2: shrink the gap from eight to seven words. Michal pointed out that the home area is exactly seven words (r15 at r1+0, r5..r10 at r1+4..r1+24); the eighth word was never written by the ABI. Retested on qemu - tst-timer4/5, tst-mqueue5, tst-signal6 still pass.
- Patch 2: fix the offset range in the commit message and the in-code comment ([r1+4]..[r1+24], not [r1+28]).
- Patch 1: unchanged.
[1] https://lore.kernel.org/all/[email protected]/
Ramin Moussavi (2):
microblaze: wire up sigaltstack
microblaze: reserve the ABI argument-home area in the signal frame
arch/microblaze/kernel/signal.c | 8 ++++++++ arch/microblaze/kernel/syscalls/syscall.tbl | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-)
Signature · 1 line
2.53.0