s390, s390x: fix printing of syscalls unknown to the kernel
On s390/s390x, syscalls with NR up to 255 can be implemented
directly using "svc NR", for NR >= 256 "svc 0" with %r1=NR is used.
The latter method is allowed for NR < 256, too.
When the syscall number specified directly or indirectly is recognized
by the kernel, i.e. it is less than its NR_syscalls value, it is stored
in %r2 and is available to arch_get_scno via s390_regset.gprs.
For syscall numbers >= NR_syscalls this register is set to 0,
but %r1 remains unchanged and could be used by arch_get_scno
via s390_regset.gprs to decide what the syscall number is.
* linux/s390/get_scno.c (arch_get_scno): If s390_regset.gprs is zero,
take syscall number from s390_regset.gprs.
* NEWS: Mention this fix.
This fixes Debian bug #485979 and Fedora bug #1298294.
2 files changed