aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2006-05-16 09:25:55 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-06-18 11:16:57 -0400
commit5247593c9634309d1b9f7b549495b8e5ad521688 (patch)
treeb9744271e43b76b22a43fd70d09c4b2aa81aa95f /arch/arm/kernel
parent254a1564fb6f9242782f9a8e5d59a212424686e8 (diff)
[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>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r--arch/arm/kernel/entry-common.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index dbcb11a31f78..b5bcebca1cd6 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -271,7 +271,7 @@ ENTRY(sys_call_table)
271@ r8 = syscall table 271@ r8 = syscall table
272 .type sys_syscall, #function 272 .type sys_syscall, #function
273sys_syscall: 273sys_syscall:
274 eor scno, r0, #__NR_OABI_SYSCALL_BASE 274 bic scno, r0, #__NR_OABI_SYSCALL_BASE
275 cmp scno, #__NR_syscall - __NR_SYSCALL_BASE 275 cmp scno, #__NR_syscall - __NR_SYSCALL_BASE
276 cmpne scno, #NR_syscalls @ check range 276 cmpne scno, #NR_syscalls @ check range
277 stmloia sp, {r5, r6} @ shuffle args 277 stmloia sp, {r5, r6} @ shuffle args