From: Keir Fraser Subject: Re: [PATCH]: Fix syscall return code when ptrace or audit is active Date: Mon, 30 Jun 2008 16:12:33 +0100 Message-ID: References: <4868E8FA.4040701@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4868E8FA.4040701@redhat.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Chris Lalancette , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 30/6/08 15:08, "Chris Lalancette" 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