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-devel

Re: [Xen-devel] [PATCH]: Fix syscall return code when ptrace or audit is

To: Chris Lalancette <clalance@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH]: Fix syscall return code when ptrace or audit is active
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Mon, 30 Jun 2008 16:12:33 +0100
Cc:
Delivery-date: Mon, 30 Jun 2008 08:12:56 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4868E8FA.4040701@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acjaw7iQ92VzJka2Ed2odQAX8io7RQ==
Thread-topic: [Xen-devel] [PATCH]: Fix syscall return code when ptrace or audit is active
User-agent: Microsoft-Entourage/11.4.0.080122
On 30/6/08 15:08, "Chris Lalancette" <clalance@xxxxxxxxxx> wrote:

> Attached is a simple patch to 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, and the pv-ops implementation in the upstream Linux kernel also does
> not have this bug.  The attached patch makes the tracesys path look the same
> as
> it does in upstream Linux, and ensures that we return -ENOSYS on this path.

Thanks. The removal of 'jmp int_ret_from_sys_call' is not part of the
bugfix, and also I think the code is clearer if we keep it. So I've applied
all of this patch except the removal of that jmp.

 -- Keir



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

<Prev in Thread] Current Thread [Next in Thread>