linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH] x86/head_64.S: remove redundant check that kernel address is 2M aligned
@ 2016-01-22 18:13 Alexander Kuleshov
  2016-01-23  1:42 ` Brian Gerst
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Kuleshov @ 2016-01-22 18:13 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Ingo Molnar, H . Peter Anvin, Andy Lutomirski, Borislav Petkov,
	Denys Vlasenko, Andrey Ryabinin, x86, linux-kernel,
	Alexander Kuleshov

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@gmail.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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-01-23  6:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-22 18:13 [RFC PATCH] x86/head_64.S: remove redundant check that kernel address is 2M aligned Alexander Kuleshov
2016-01-23  1:42 ` Brian Gerst
2016-01-23  6:37   ` Alexander Kuleshov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).