0002-microblaze-wire-up-sigaltstack.patch 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. From 600d06cb443526020efa411053b83fc1697f27dc Mon Sep 17 00:00:00 2001
  2. From: Ramin Moussavi <ramin.moussavi@yacoub.de>
  3. Date: Fri, 21 Aug 2026 17:18:05 +0200
  4. Subject: [PATCH 2/6] microblaze: wire up sigaltstack
  5. sigaltstack is wired to sys_ni_syscall - microblaze is the only
  6. architecture without it - although the microblaze signal delivery code
  7. fully supports the alternate signal stack: get_sigframe() picks the
  8. stack via sigsp(), setup_rt_frame() saves it with __save_altstack() and
  9. sys_rt_sigreturn() calls restore_altstack().
  10. Wire it up to sys_sigaltstack.
  11. Tested on qemu petalogix-s3adsp1800 (microblazeel) with the uClibc-ng
  12. test suite: the five sigaltstack-dependent NPTL tests (tst-cancel20/21,
  13. tst-cancelx20/21, tst-signal6) pass; before this change sigaltstack()
  14. returned ENOSYS.
  15. Assisted-by: Claude:claude-opus-5
  16. Signed-off-by: Ramin Moussavi <ramin.moussavi@yacoub.de>
  17. ---
  18. arch/microblaze/kernel/syscalls/syscall.tbl | 2 +-
  19. 1 file changed, 1 insertion(+), 1 deletion(-)
  20. diff --git a/arch/microblaze/kernel/syscalls/syscall.tbl b/arch/microblaze/kernel/syscalls/syscall.tbl
  21. index c55a5c96f49b..76d7cbe2a133 100644
  22. --- a/arch/microblaze/kernel/syscalls/syscall.tbl
  23. +++ b/arch/microblaze/kernel/syscalls/syscall.tbl
  24. @@ -193,7 +193,7 @@
  25. 183 common getcwd sys_getcwd
  26. 184 common capget sys_capget
  27. 185 common capset sys_capset
  28. -186 common sigaltstack sys_ni_syscall
  29. +186 common sigaltstack sys_sigaltstack
  30. 187 common sendfile sys_sendfile
  31. 188 common getpmsg sys_ni_syscall
  32. 189 common putpmsg sys_ni_syscall
  33. --
  34. 2.47.3