From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1fJdwe-000302-Mf for mharc-grub-devel@gnu.org; Fri, 18 May 2018 07:53:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40877) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fJdwa-0002yY-RJ for grub-devel@gnu.org; Fri, 18 May 2018 07:53:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fJdwX-0004n9-MR for grub-devel@gnu.org; Fri, 18 May 2018 07:53:08 -0400 Received: from boksu.net-space.pl ([185.15.1.105]:60245) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.71) (envelope-from ) id 1fJdwX-0004ki-Av for grub-devel@gnu.org; Fri, 18 May 2018 07:53:05 -0400 Received: (from localhost user: 'dkiper' uid#4000 fake: STDIN (dkiper@boksu.net-space.pl)) by router-fw-old.local.net-space.pl id S1840067AbeERLxB (ORCPT ); Fri, 18 May 2018 13:53:01 +0200 Date: Fri, 18 May 2018 13:53:01 +0200 From: Daniel Kiper To: Andrew Jeddeloh Cc: Daniel Kiper , grub-devel@gnu.org Subject: Re: [PATCH] loader/i386/linux: calculate the size of the setup header Message-ID: <20180518115301.GA13069@router-fw-old.local.net-space.pl> References: <20180510171133.GK25320@router-fw-old.local.net-space.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.28i X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 185.15.1.105 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2018 11:53:10 -0000 Re-added grub-devel. Next time please do not drop GRUB ML from the addresses. On Thu, May 17, 2018 at 03:40:32PM -0700, Andrew Jeddeloh wrote: > Sorry about the long delay, I agree with all the sugguestions, except shouldn't No problem. > if (len > &linux_params.e820_map - &linux_params) > > be > > if (len > sizeof(linux_params)) > > since at that point len is the total size of the header which > linux_params represents? Please take a look at arch/x86/include/uapi/asm/bootparam.h in latest Linux kernel source. My proposal is better but it seems to me right now that it is still too much. I have a feeling that we should not go beyond the end of boot_params._pad7. Am I right? Daniel