mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-18 15:09:53 +00:00
[ARM] 3335/1: Old-abi Thumb sys_syscall broken
Patch from Paul Brook The old-abi sys_syscall syscall is broken when called from Thumb mode. It assumes the syscall number is an Arm syscall number (ie. starts from __NR_OABI_SYSCALL_BASE). In thumb mode syscall numbers start from zero. The patch below fixes this by clearing the nigh bits of the syscall number instead of inverting them. Technically this means we accept some invalid syscall numbers, but I can't see how that could be a problem. The two sets of numbers far apart that unimplemented syscalls should still be rejected. Signed-off-by: Paul Brook <paul@codesourcery.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
254a1564fb
commit
5247593c96
@ -271,7 +271,7 @@ ENTRY(sys_call_table)
|
|||||||
@ r8 = syscall table
|
@ r8 = syscall table
|
||||||
.type sys_syscall, #function
|
.type sys_syscall, #function
|
||||||
sys_syscall:
|
sys_syscall:
|
||||||
eor scno, r0, #__NR_OABI_SYSCALL_BASE
|
bic scno, r0, #__NR_OABI_SYSCALL_BASE
|
||||||
cmp scno, #__NR_syscall - __NR_SYSCALL_BASE
|
cmp scno, #__NR_syscall - __NR_SYSCALL_BASE
|
||||||
cmpne scno, #NR_syscalls @ check range
|
cmpne scno, #NR_syscalls @ check range
|
||||||
stmloia sp, {r5, r6} @ shuffle args
|
stmloia sp, {r5, r6} @ shuffle args
|
||||||
|
Loading…
Reference in New Issue
Block a user