WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [linux-2.6.18-xen] x86/64: Fix syscall return code when

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] x86/64: Fix syscall return code when ptrace or audit is active
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 30 Jun 2008 08:20:18 -0700
Delivery-date: Mon, 30 Jun 2008 08:20:32 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1214838844 -3600
# Node ID 3643a33de27793969bd701669ca35ea534712072
# Parent  b29a06ba7a5ff8c85054d56a4135ac38925422c0
x86/64: Fix syscall return code when ptrace or audit is active

Fix the return value from the 64-bit kernel when you call with a bad
system call number with tracing enabled (for either ptrace or audit).
What should happen is that the user process gets a -ENOSYS return
call from the syscall; what actually happens (only in the 64-bit
kernel) is that you get back the system call number. The 32-bit
kernel does not suffer from this bug.

Signed-off-by: Chris Lalancette <clalance@xxxxxxxxxx>
---
 arch/x86_64/kernel/entry-xen.S |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -r b29a06ba7a5f -r 3643a33de277 arch/x86_64/kernel/entry-xen.S
--- a/arch/x86_64/kernel/entry-xen.S    Fri Jun 27 16:07:56 2008 +0100
+++ b/arch/x86_64/kernel/entry-xen.S    Mon Jun 30 16:14:04 2008 +0100
@@ -334,10 +334,10 @@ tracesys:
        LOAD_ARGS ARGOFFSET  /* reload args from stack in case ptrace changed 
it */
        RESTORE_REST
        cmpq $__NR_syscall_max,%rax
-       ja  1f
+       ja  int_ret_from_sys_call
        movq %r10,%rcx  /* fixup for C */
        call *sys_call_table(,%rax,8)
-1:     movq %rax,RAX-ARGOFFSET(%rsp)
+       movq %rax,RAX-ARGOFFSET(%rsp)
        /* Use IRET because user could have changed frame */
        jmp int_ret_from_sys_call
        CFI_ENDPROC

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] x86/64: Fix syscall return code when ptrace or audit is active, Xen patchbot-linux-2.6.18-xen <=