From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758592Ab3ANUFJ (ORCPT ); Mon, 14 Jan 2013 15:05:09 -0500 Received: from mail.skyhub.de ([78.46.96.112]:48603 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756803Ab3ANUFI (ORCPT ); Mon, 14 Jan 2013 15:05:08 -0500 Date: Mon, 14 Jan 2013 21:05:05 +0100 From: Borislav Petkov To: Yinghai Lu Cc: "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , "Eric W. Biederman" , Andrew Morton , Jan Kiszka , Jason Wessel , linux-kernel@vger.kernel.org, Rob Landley , Matt Fleming , Gokul Caushik , Josh Triplett , Joe Millenbach Subject: Re: [PATCH v7u1 22/31] x86, boot: add fields to support load bzImage and ramdisk above 4G Message-ID: <20130114200505.GC2015@liondog.tnic> Mail-Followup-To: Borislav Petkov , Yinghai Lu , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , "Eric W. Biederman" , Andrew Morton , Jan Kiszka , Jason Wessel , linux-kernel@vger.kernel.org, Rob Landley , Matt Fleming , Gokul Caushik , Josh Triplett , Joe Millenbach References: <1357260531-11115-1-git-send-email-yinghai@kernel.org> <1357260531-11115-23-git-send-email-yinghai@kernel.org> <20130113214132.GB17200@liondog.tnic> <50F4452D.2060000@zytor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 14, 2013 at 10:57:08AM -0800, Yinghai Lu wrote: > please check if following is enough? > > + /* > + * kernel have sentinel to set as 0xff in setup link scripts, > + * so if bootloader just copy whole page from kernel image to > + * get setup_header instead of clearing boot_param buffer and > + * copying setup_header only, will leave sentinel as 0xff. > + * With that, we can tell some fields in boot_param have > + * invalid values, and we need to zero them in kernel. > + */ > + __u8 sentinel; /* 0x1ef */ "The sentinel variable is set by the linker script to 0xff. If a bootloader doesn't know about this variable and just copies the setup_header portion and doesn't clear the boot_params buffer as it is supposed to, it will leave the sentinel to its initial value of 0xff. This tells the kernel that some fields in boot_params have invalid values and we have to zero them out in the kernel." -- Regards/Gruss, Boris. Sent from a fat crate under my desk. Formatting is fine. --