Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932634AbWHALPg (ORCPT ); Tue, 1 Aug 2006 07:15:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932635AbWHALFw (ORCPT ); Tue, 1 Aug 2006 07:05:52 -0400 Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:61148 "EHLO ebiederm.dsl.xmission.com") by vger.kernel.org with ESMTP id S932638AbWHALFd (ORCPT ); Tue, 1 Aug 2006 07:05:33 -0400 From: "Eric W. Biederman" To: Cc: , Horms , Jan Kratochvil , "H. Peter Anvin" , Magnus Damm , Vivek Goyal , Linda Wang , "Eric W. Biederman" Subject: [PATCH 15/33] x86_64: Fix kernel direct mapping size check Date: Tue, 1 Aug 2006 05:03:30 -0600 Message-Id: <11544302382314-git-send-email-ebiederm@xmission.com> X-Mailer: git-send-email 1.4.2.rc2.g5209e In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1125 Lines: 31 Instead of using physical addresse of _end which has nothing to do with knowing if the kernel fits within it's reserved virtual addresses, verify the virtual address of _end fits within in the kernel virtual address mapping. Signed-off-by: Eric W. Biederman --- arch/x86_64/kernel/head64.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86_64/kernel/head64.c b/arch/x86_64/kernel/head64.c index 36647ce..454498c 100644 --- a/arch/x86_64/kernel/head64.c +++ b/arch/x86_64/kernel/head64.c @@ -116,7 +116,7 @@ #ifdef CONFIG_X86_IO_APIC disable_apic = 1; #endif /* You need early console to see that */ - if (__pa_symbol(&_end) >= KERNEL_TEXT_SIZE) + if (((unsigned long)&_end) >= (__START_KERNEL_map + KERNEL_TEXT_SIZE)) panic("Kernel too big for kernel mapping\n"); setup_boot_cpu_data(); -- 1.4.2.rc2.g5209e - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/