linux-user/arm: Handle invalid arm-specific syscalls correctly
commitab546bd23856866411ff1b2ffaedabdc360e69df
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 20 Apr 2020 21:22:05 +0000 (20 22:22 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 21 May 2020 19:00:18 +0000 (21 20:00 +0100)
tree33604947d5527660283edc2db10b817deacacb64
parent62f141a426d27c15555714a2c2967045b43d9a4a
linux-user/arm: Handle invalid arm-specific syscalls correctly

The kernel has different handling for syscalls with invalid
numbers that are in the "arm-specific" range 0x9f0000 and up:
 * 0x9f0000..0x9f07ff return -ENOSYS if not implemented
 * other out of range syscalls cause a SIGILL
(see the kernel's arch/arm/kernel/traps.c:arm_syscall())

Implement this distinction. (Note that our code doesn't look
quite like the kernel's, because we have removed the
0x900000 prefix by this point, whereas the kernel retains
it in arm_syscall().)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20200420212206.12776-4-peter.maydell@linaro.org
linux-user/arm/cpu_loop.c