linux_dsm_epyc7002/arch/microblaze
Jamie Garside c2219eda54 microblaze: Fix syscall error recovery for invalid syscall IDs
This patch fixes two bugs in the Microblaze syscall trap handler when an invalid
syscall ID is used.

First, the range check on line 351 only checks for syscall IDs greater than
__NR_syscalls. A negative syscall ID (either passed to `syscall()` or as returned
by `do_syscall_trace_enter()` on error) will still satisfy this test and cause
the Linux kernel to access an invalid memory location and cause a kernel oops.
This has been fixed by also checking for r12 < 0.

Secondly, the current error recovery at line 378 returns using the wrong register
(r15 instead of r14) and does not restore the previous stack state. This has been
fixed by invoking `ret_from_trap` on error, setting r3 to `-ENOSYS`, similar to
what would happen when calling a valid syscall.

Signed-off-by: Jamie Garside <jamie.garside@york.ac.uk>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-03-04 15:12:27 +01:00
..
boot microblaze: Remove *.dtb files in make clean 2015-02-10 16:24:39 +01:00
configs microblaze: Enable SERIAL_OF_PLATFORM 2014-06-04 06:59:46 +02:00
include all arches, signal: move restart_block to struct task_struct 2015-02-12 18:54:12 -08:00
kernel microblaze: Fix syscall error recovery for invalid syscall IDs 2015-03-04 15:12:27 +01:00
lib microblaze: Change libgcc-style functions from lib-y to obj-y 2014-07-18 14:26:09 +02:00
mm vm: add VM_FAULT_SIGSEGV handling support 2015-01-29 10:51:32 -08:00
oprofile
pci microblaze/PCI: Clip bridge windows to fit in upstream windows 2015-01-16 10:04:43 -06:00
Kconfig gcov: enable GCOV_PROFILE_ALL from ARCH Kconfigs 2014-12-13 12:42:51 -08:00
Kconfig.debug
Kconfig.platform microblaze: Remove platform folder 2014-04-07 13:45:21 +02:00
Makefile microblaze: Remove platform folder 2014-04-07 13:45:21 +02:00