From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754941AbcAVSRA (ORCPT ); Fri, 22 Jan 2016 13:17:00 -0500 Received: from mail-lf0-f67.google.com ([209.85.215.67]:34591 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932085AbcAVSQy (ORCPT ); Fri, 22 Jan 2016 13:16:54 -0500 From: Alexander Kuleshov To: Thomas Gleixner Cc: Ingo Molnar , "H . Peter Anvin" , Andy Lutomirski , Borislav Petkov , Denys Vlasenko , Andrey Ryabinin , x86@kernel.org, linux-kernel@vger.kernel.org, Alexander Kuleshov Subject: [RFC PATCH] x86/head_64.S: remove redundant check that kernel address is 2M aligned Date: Sat, 23 Jan 2016 00:13:12 +0600 Message-Id: <1453486392-10289-1-git-send-email-kuleshovmail@gmail.com> X-Mailer: git-send-email 2.7.0.25.gfc10eb5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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