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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 26 Jan 2016 10:31:13 +0100
From:	Borislav Petkov <bp@...e.de>
To:	Alexander Kuleshov <kuleshovmail@...il.com>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H . Peter Anvin" <hpa@...or.com>,
	Andy Lutomirski <luto@...nel.org>,
	Denys Vlasenko <dvlasenk@...hat.com>,
	Andrey Ryabinin <ryabinin.a.a@...il.com>, x86@...nel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86/head_64.S: do not use temporary register to check
 alignment

On Sat, Jan 23, 2016 at 12:50:28PM +0600, Alexander Kuleshov wrote:
> We are using temporary %rax register during checking of kernel address
> alignment. We can ged rid of it since testl instruction is safe and does
> not change value of the rbp register.
> 
> Signed-off-by: Alexander Kuleshov <kuleshovmail@...il.com>
> Suggested-by: Brian Gerst <brgerst@...il.com>
> ---
>  arch/x86/kernel/head_64.S | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
> index ffdc0e8..7c21029 100644
> --- a/arch/x86/kernel/head_64.S
> +++ b/arch/x86/kernel/head_64.S
> @@ -76,9 +76,7 @@ startup_64:
>  	subq	$_text - __START_KERNEL_map, %rbp
>  
>  	/* Is the address not 2M aligned? */
> -	movq	%rbp, %rax
> -	andl	$~PMD_PAGE_MASK, %eax
> -	testl	%eax, %eax
> +	testl	$~PMD_PAGE_MASK, %ebp
>  	jnz	bad_address
>  
>  	/*
> --

Applied, thanks.

-- 
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
-- 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ