lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 04 Jul 2011 08:34:05 +0100
From:	"Jan Beulich" <JBeulich@...ell.com>
To:	"Frederic Weisbecker" <fweisbec@...il.com>
Cc:	"Peter Zijlstra" <a.p.zijlstra@...llo.nl>,
	"Ingo Molnar" <mingo@...e.hu>,
	"Thomas Gleixner" <tglx@...utronix.de>,
	"Arnaldo Carvalho de Melo" <acme@...hat.com>,
	"LKML" <linux-kernel@...r.kernel.org>,
	"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH 4/6] x86,64: Separate arg1 from rbp handling in
	 SAVE_REGS_IRQ

>>> On 02.07.11 at 18:29, Frederic Weisbecker <fweisbec@...il.com> wrote:
> Just for clarity in the code. Have a first block that handles
> the frame pointer and a separate one that handles pt_regs
> pointer and its use.

While possible indeed making the code easier to read, it increases the
chance of a latency related stall (due to the write to %rdi immediately
preceding its use as a memory operand's address).

Jan

> Signed-off-by: Frederic Weisbecker <fweisbec@...il.com>
> Cc: Ingo Molnar <mingo@...e.hu>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: H. Peter Anvin <hpa@...or.com>
> Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
> Cc: Jan Beulich <JBeulich@...ell.com>
> ---
>  arch/x86/kernel/entry_64.S |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
> index b6b2e85..20dc8e6 100644
> --- a/arch/x86/kernel/entry_64.S
> +++ b/arch/x86/kernel/entry_64.S
> @@ -310,9 +310,10 @@ ENDPROC(native_usergs_sysret64)
>  	movq_cfi r10, R10-RBP
>  	movq_cfi r11, R11-RBP
>  
> -	leaq -RBP(%rsp),%rdi	/* arg1 for handler */
>  	movq_cfi rbp, 0		/* push %rbp */
>  	movq %rsp, %rbp
> +
> +	leaq -RBP(%rsp),%rdi	/* arg1 for handler */
>  	testl $3, CS(%rdi)
>  	je 1f
>  	SWAPGS




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

Powered by Openwall GNU/*/Linux Powered by OpenVZ