linux/arch/mips
Ed Swierk e967ef022e MIPS: Fix restart of indirect syscalls
When 32-bit MIPS userspace invokes a syscall indirectly via syscall(number,
arg1, ..., arg7), the kernel looks up the actual syscall based on the given
number, shifts the other arguments to the left, and jumps to the syscall.

If the syscall is interrupted by a signal and indicates it needs to be
restarted by the kernel (by returning ERESTARTNOINTR for example), the
syscall must be called directly, since the number is no longer the first
argument, and the other arguments are now staged for a direct call.

Before shifting the arguments, store the syscall number in pt_regs->regs[2].
This gets copied temporarily into pt_regs->regs[0] after the syscall returns.
If the syscall needs to be restarted, handle_signal()/do_signal() copies the
number back to pt_regs->reg[2], which ends up in $v0 once control returns to
userspace.

Signed-off-by: Ed Swierk <eswierk@skyportsystems.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/8929/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2015-01-16 00:35:45 +01:00
..
alchemy Please consider pulling the clk framework changes toward 3.19. It is 2014-12-20 16:42:36 -08:00
ar7 mips: Convert pr_warning to pr_warn 2014-11-24 07:44:51 +01:00
ath25 MIPS: ath25: add Wireless device support 2014-11-24 07:45:29 +01:00
ath79 MIPS: ath79: Read the initrd address from the firmware environment 2014-11-24 07:45:30 +01:00
bcm47xx MIPS: BCM47XX: Clean up nvram header 2014-11-24 07:45:08 +01:00
bcm63xx MIPS: Remove useless parentheses 2014-11-24 07:44:49 +01:00
bcm3384 MIPS: bcm3384: Initial commit of bcm3384 platform support 2014-11-24 07:45:13 +01:00
boot MIPS: bcm3384: Initial commit of bcm3384 platform support 2014-11-24 07:45:13 +01:00
cavium-octeon USB patches for 3.19-rc1 2014-12-14 14:57:16 -08:00
cobalt
configs MIPS: Update malta_defconfig to something that works out of the box. 2015-01-13 15:53:08 +01:00
dec
emma
fw MIPS: FW: Use kstrtoul() to parse unsigned long from the fw environment 2014-11-24 07:45:26 +01:00
include MIPS: mips-cm: Fix sparse warnings 2015-01-13 15:53:09 +01:00
jazz
jz4740 MIPS: JZ4740: Fixup #include's (sparse) 2015-01-13 15:53:09 +01:00
kernel MIPS: Fix restart of indirect syscalls 2015-01-16 00:35:45 +01:00
kvm
lantiq Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
lasat
lib MIPS: lib: memset: Clean up some MIPS{EL,EB} ifdefery 2014-11-24 07:45:42 +01:00
loongson Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-12-11 17:56:37 -08:00
loongson1 MIPS: Loongson1B: Add a clockevent/clocksource using PWM Timer 2014-11-24 07:45:09 +01:00
math-emu MIPS: Support for hybrid FPRs 2014-11-24 07:45:07 +01:00
mm kernel: Provide READ_ONCE and ASSIGN_ONCE 2014-12-20 16:48:59 -08:00
mti-malta MIPS: Replace use of phys_t with phys_addr_t. 2014-11-24 22:47:31 +01:00
mti-sead3 Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
net mips: bpf: Fix broken BPF_MOD 2014-12-08 20:22:30 -05:00
netlogic MIPS: Netlogic: handle modular AHCI builds 2014-11-24 07:44:06 +01:00
oprofile MIPS: oprofile: Backtrace: don't fail on leaf functions 2014-11-24 07:45:31 +01:00
paravirt
pci Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
pmcs-msp71xx MIPS: Remove useless parentheses 2014-11-24 07:44:49 +01:00
pnx833x
power
ralink Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
rb532 MIPS: Replace use of phys_t with phys_addr_t. 2014-11-24 22:47:31 +01:00
sgi-ip22 MIPS: Remove useless parentheses 2014-11-24 07:44:49 +01:00
sgi-ip27 MIPS: Remove useless parentheses 2014-11-24 07:44:49 +01:00
sgi-ip32
sibyte MIPS: Replace use of phys_t with phys_addr_t. 2014-11-24 22:47:31 +01:00
sni
txx9 Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
vr41xx
Kbuild
Kbuild.platforms MIPS: ath25: add common parts 2014-11-24 07:45:26 +01:00
Kconfig MIPS: Kconfig: Fix recursive dependency. 2015-01-13 15:53:09 +01:00
Kconfig.debug MIPS: Kconfig option to better exercise/debug hybrid FPRs 2014-11-24 07:45:08 +01:00
Makefile MIPS: IP22/IP32: Add line to arch/mips/Makefile archhelp about vmlinux.32 2014-11-24 07:45:33 +01:00