Re: [PATCH] x86_64,entry: Fix RCX for traced syscalls

2014-11-04 Thread Andy Lutomirski
On Thu, Jun 26, 2014 at 12:08 PM, Andy Lutomirski wrote: > The int_ret_from_sys_call and syscall tracing code disagrees with > the sysret path as to the value of RCX. > > The Intel SDM, the AMD APM, and my laptop all agree that sysret > returns with RCX == RIP. The syscall tracing code does not r

Re: [PATCH] x86_64,entry: Fix RCX for traced syscalls

2014-06-30 Thread Andy Lutomirski
On Sat, Jun 28, 2014 at 10:07 AM, Pavel Machek wrote: > On Thu 2014-06-26 13:47:32, Andy Lutomirski wrote: >> On Thu, Jun 26, 2014 at 1:12 PM, H. Peter Anvin wrote: >> > The real question is if we care that sysret and iter don't match. On 32 >> > bits the situation is even more complex. >> >> A

Re: [PATCH] x86_64,entry: Fix RCX for traced syscalls

2014-06-28 Thread Pavel Machek
On Thu 2014-06-26 13:47:32, Andy Lutomirski wrote: > On Thu, Jun 26, 2014 at 1:12 PM, H. Peter Anvin wrote: > > The real question is if we care that sysret and iter don't match. On 32 > > bits the situation is even more complex. > > At least for 64 bits, iret vs sysret is purely a kernel implem

Re: [PATCH] x86_64,entry: Fix RCX for traced syscalls

2014-06-26 Thread Andy Lutomirski
On Thu, Jun 26, 2014 at 1:12 PM, H. Peter Anvin wrote: > The real question is if we care that sysret and iter don't match. On 32 bits > the situation is even more complex. At least for 64 bits, iret vs sysret is purely a kernel implementation detail (except where a tracer modifies things that a

Re: [PATCH] x86_64,entry: Fix RCX for traced syscalls

2014-06-26 Thread H. Peter Anvin
The real question is if we care that sysret and iter don't match. On 32 bits the situation is even more complex. On June 26, 2014 1:00:22 PM PDT, Andy Lutomirski wrote: >On Thu, Jun 26, 2014 at 12:59 PM, Andy Lutomirski >wrote: >> On Thu, Jun 26, 2014 at 12:56 PM, Andi Kleen >wrote: show

Re: [PATCH] x86_64,entry: Fix RCX for traced syscalls

2014-06-26 Thread Andy Lutomirski
On Thu, Jun 26, 2014 at 12:59 PM, Andy Lutomirski wrote: > On Thu, Jun 26, 2014 at 12:56 PM, Andi Kleen wrote: >>> show RCX == RIP even under strace. >> >> If you think it's really worth the extra instruction? > > Hard to say. That extra instruction only happens on slow paths, so I > suspect the

Re: [PATCH] x86_64,entry: Fix RCX for traced syscalls

2014-06-26 Thread Andy Lutomirski
On Thu, Jun 26, 2014 at 12:56 PM, Andi Kleen wrote: >> show RCX == RIP even under strace. > > If you think it's really worth the extra instruction? Hard to say. That extra instruction only happens on slow paths, so I suspect the slowdown is negligible. On the other hand, having syscall show a b

Re: [PATCH] x86_64,entry: Fix RCX for traced syscalls

2014-06-26 Thread Andi Kleen
> show RCX == RIP even under strace. If you think it's really worth the extra instruction? It's not wrong, but it's not clear if it's useful. -Andi > > Signed-off-by: Andy Lutomirski > --- > arch/x86/kernel/entry_64.S | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git