Chris Lalancette
2008-Jun-30 14:08 UTC
[Xen-devel] [PATCH]: Fix syscall return code when ptrace or audit is active
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. Signed-off-by: Chris Lalancette <clalance@redhat.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2008-Jun-30 15:12 UTC
Re: [Xen-devel] [PATCH]: Fix syscall return code when ptrace or audit is active
On 30/6/08 15:08, "Chris Lalancette" <clalance@redhat.com> 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@lists.xensource.com http://lists.xensource.com/xen-devel
Chris Lalancette
2008-Jun-30 15:20 UTC
Re: [Xen-devel] [PATCH]: Fix syscall return code when ptrace or audit is active
Keir Fraser wrote:> > 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.Oh yes, of course. Upstream is just letting it fall through. That''s fine. Thanks! Chris Lalancette _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Seemingly Similar Threads
- [Fwd: [PATCH]: Fix silly output for virtio devices in /proc/interrupts]
- [Fwd: [PATCH]: Fix silly output for virtio devices in /proc/interrupts]
- [PATCH]: Make Xen 3.1 IDE flush on O_DIRECT with drive caching off
- [PATCH] limit ACPIID to APICID reset to AMD machines
- [patch 0/4] Revised softlockup watchdog improvement patches