[PATCH] arch: ensure we don't "munge" pseudo syscall numbers
authorPaul Moore <paul@paul-moore.com>
Sun, 16 Aug 2020 13:56:36 +0000 (09:56 -0400)
committerFelix Geyer <fgeyer@debian.org>
Sun, 8 Nov 2020 18:59:21 +0000 (18:59 +0000)
commit61ba6b9c2a9844155032091f46cd40021f7b3e15
tree41c56db4decc8ece75af423a0e2eef40f110a310
parentd8fdbc843a8f8538b457221ee5bb6d42cc9cc6c6
[PATCH] arch: ensure we don't "munge" pseudo syscall numbers

A number of arches/ABIs have either syscall offsets (the MIPS
family) or specific bits (x32) which are applied to their normal
syscall numbers.  We generally handle that via "munging" in
libseccomp, and it works reasonably well.  Unfortunately we were
applying this munging process to the negative pseudo syscall
numbers as well and this was causing problems.

This patch fixes the various offset/bit arches/ABIs by not applying
the munging to the negative pseudo syscall numbers.

This resolves GH issue #284:
* https://github.com/seccomp/libseccomp/issues/284

Reported-by: Harald van Dijk <harald@gigawatt.nl>
Acked-by: Tom Hromatka <tom.hromatka@oracle.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
(imported from commit 34cde704979defcbddb8eea64295acf0e477c250)

Gbp-Pq: Name arch_ensure_we_dont_munge_pseudo_syscall_numbers.patch
src/arch-arm.c
src/arch-mips.c
src/arch-mips64.c
src/arch-mips64n32.c
src/arch-x32.c