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-next>] [day] [month] [year] [list]
Message-Id: <1453486392-10289-1-git-send-email-kuleshovmail@gmail.com>
Date:	Sat, 23 Jan 2016 00:13:12 +0600
From:	Alexander Kuleshov <kuleshovmail@...il.com>
To:	Thomas Gleixner <tglx@...utronix.de>
Cc:	Ingo Molnar <mingo@...hat.com>, "H . Peter Anvin" <hpa@...or.com>,
	Andy Lutomirski <luto@...nel.org>,
	Borislav Petkov <bp@...e.de>,
	Denys Vlasenko <dvlasenk@...hat.com>,
	Andrey Ryabinin <ryabinin.a.a@...il.com>, x86@...nel.org,
	linux-kernel@...r.kernel.org,
	Alexander Kuleshov <kuleshovmail@...il.com>
Subject: [RFC PATCH] x86/head_64.S: remove redundant check that kernel address is 2M aligned

We check that the base address of the kernel is 2M aligned in
the arch/x86/kernel/head_65.S right after jump to the decompressed
kernel. But we already have a check in the decompress_kernel()
which validates that kernel location is MIN_KERNEL_ALIGN aligned
which is 2M too for x86_64.

Signed-off-by: Alexander Kuleshov <kuleshovmail@...il.com>
---
 arch/x86/kernel/head_64.S | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
index ffdc0e8..4967cba 100644
--- a/arch/x86/kernel/head_64.S
+++ b/arch/x86/kernel/head_64.S
@@ -75,12 +75,6 @@ startup_64:
 	leaq	_text(%rip), %rbp
 	subq	$_text - __START_KERNEL_map, %rbp
 
-	/* Is the address not 2M aligned? */
-	movq	%rbp, %rax
-	andl	$~PMD_PAGE_MASK, %eax
-	testl	%eax, %eax
-	jnz	bad_address
-
 	/*
 	 * Is the address too large?
 	 */
-- 
2.7.0.25.gfc10eb5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ