]> granicus.if.org Git - strace/commit
alpha, cris, mips, ppc, sh, sparc: fix decoding of sigsuspend syscall
authorDmitry V. Levin <ldv@altlinux.org>
Sun, 30 Apr 2017 20:33:04 +0000 (20:33 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 1 May 2017 14:49:26 +0000 (14:49 +0000)
commitd852b31a8bb6bddce0694da9cd326ee50b873ce5
tree634d4af44175993803b4d1ed4368504f6f256c87
parentd5959c52abde49d21ec016a0517b28f176e78592
alpha, cris, mips, ppc, sh, sparc: fix decoding of sigsuspend syscall

On some architectures old sigsuspend syscall takes the signal mask from
the 3rd argument, on some from the 1st.  And, if it wasn't peculiar
enough, the signal mask is passed by value on all architectures except
mips where it's passed by reference.

* signal.c (SYS_FUNC(sigsuspend)): Take the signal mask from the last
argument.
* linux/alpha/syscallent.h (sigsuspend): Set nargs to 1.
* linux/crisv10/syscallent.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* tests/sigsuspend.c: New file.
* tests/gen_tests.in (sigsuspend): New entry.
* tests/pure_executables.list: Add sigsuspend.
* tests/.gitignore: Likewise.
* NEWS: Mention this fix.
15 files changed:
NEWS
linux/alpha/syscallent.h
linux/crisv10/syscallent.h
linux/mips/syscallent-o32.h
linux/powerpc/syscallent.h
linux/powerpc64/syscallent.h
linux/sh/syscallent.h
linux/sh64/syscallent.h
linux/sparc/syscallent.h
linux/sparc64/syscallent.h
signal.c
tests/.gitignore
tests/gen_tests.in
tests/pure_executables.list
tests/sigsuspend.c [new file with mode: 0644]