diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 08:29:57 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 08:29:57 -0700 |
commit | 547ad5ac665234953e32678f6a32385b58edefc3 (patch) | |
tree | 4c7aa651224d2b106a2f9da6dfb8b4233173cec2 /arch/x86/include/asm | |
parent | 4fefce9abaeef0d6ec45e06a882db23a65135272 (diff) | |
parent | 8cb3ed13935b9b523c2de7afc8f68473fe1d4531 (diff) |
Merge branch 'x86/orig_ax' of git://git.kernel.org/pub/scm/linux/kernel/git/frob/linux-2.6-roland
* 'x86/orig_ax' of git://git.kernel.org/pub/scm/linux/kernel/git/frob/linux-2.6-roland:
x86: ptrace: set TS_COMPAT when 32-bit ptrace sets orig_eax>=0
x86: ptrace: do not sign-extend orig_ax on write
x86: syscall_get_nr returns int
asm-generic: syscall_get_nr returns int
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r-- | arch/x86/include/asm/syscall.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/x86/include/asm/syscall.h b/arch/x86/include/asm/syscall.h index d82f39bb790..8d33bc5462d 100644 --- a/arch/x86/include/asm/syscall.h +++ b/arch/x86/include/asm/syscall.h @@ -1,7 +1,7 @@ /* * Access to user system call parameters and results * - * Copyright (C) 2008 Red Hat, Inc. All rights reserved. + * Copyright (C) 2008-2009 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions @@ -16,13 +16,13 @@ #include <linux/sched.h> #include <linux/err.h> -static inline long syscall_get_nr(struct task_struct *task, - struct pt_regs *regs) +/* + * Only the low 32 bits of orig_ax are meaningful, so we return int. + * This importantly ignores the high bits on 64-bit, so comparisons + * sign-extend the low 32 bits. + */ +static inline int syscall_get_nr(struct task_struct *task, struct pt_regs *regs) { - /* - * We always sign-extend a -1 value being set here, - * so this is always either -1L or a syscall number. - */ return regs->orig_ax; } |