[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140626195629.GC5714@two.firstfloor.org>
Date: Thu, 26 Jun 2014 21:56:29 +0200
From: Andi Kleen <andi@...stfloor.org>
To: Andy Lutomirski <luto@...capital.net>
Cc: x86@...nel.org, "H. Peter Anvin" <hpa@...or.com>,
Linux Kernel <linux-kernel@...r.kernel.org>,
Borislav Petkov <bp@...en8.de>,
Andi Kleen <andi@...stfloor.org>
Subject: Re: [PATCH] x86_64,entry: Fix RCX for traced syscalls
> 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 <luto@...capital.net>
> ---
> arch/x86/kernel/entry_64.S | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
> index b25ca96..6624e18 100644
> --- a/arch/x86/kernel/entry_64.S
> +++ b/arch/x86/kernel/entry_64.S
> @@ -143,7 +143,8 @@ ENDPROC(native_usergs_sysret64)
> movq \tmp,RSP+\offset(%rsp)
> movq $__USER_DS,SS+\offset(%rsp)
> movq $__USER_CS,CS+\offset(%rsp)
> - movq $-1,RCX+\offset(%rsp)
> + movq RIP+\offset(%rsp),\tmp /* get rip */
> + movq \tmp,RCX+\offset(%rsp) /* copy it to rcx as sysret would do */
> movq R11+\offset(%rsp),\tmp /* get eflags */
> movq \tmp,EFLAGS+\offset(%rsp)
> .endm
> --
> 1.9.3
>
--
ak@...ux.intel.com -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists