From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1kaHwe-0004V1-OT for mharc-grub-devel@gnu.org; Wed, 04 Nov 2020 07:31:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38954) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kaHwa-0004U7-Pw for grub-devel@gnu.org; Wed, 04 Nov 2020 07:31:17 -0500 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:39582) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kaHwT-0001X4-Qf for grub-devel@gnu.org; Wed, 04 Nov 2020 07:31:16 -0500 Received: by mail-wr1-x443.google.com with SMTP id y12so21848216wrp.6 for ; Wed, 04 Nov 2020 04:31:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=CYMhdSYvqgb4/Tz4vfZIEw4zBJsmg4GIh5qwA7QnBAI=; b=DohQrVqieMXXX/3BeuGTHSEgSk8qJde0fn/LHffpFeOId3d66K/Mm1VKZcBKjnC80q yNQGgvmjL+1f7btxAPGVzwcfh00GLWTkGqsGzki/bpFsM6GWmS/KP4DH+UVayuI3/GRx qrrxft4d91xmXs1BlzJi5uRXw22+mpLu6W45/MPCxNCp5N/yQe9Y2jgLp/5R+Mn9Nnbj ZU/Q2XhxtsdJZeXyhZHmyhdjlXdDEZD1imY14xm2d5U9WbPTt3Urg8H6MjQpGNvF1J71 c/B8VLOis4qLW5LqxYgVVbWOL1iabNPA3+uEmQMa4qcLkNvnGFL1VoR1soU4oXCem04C H6tQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=CYMhdSYvqgb4/Tz4vfZIEw4zBJsmg4GIh5qwA7QnBAI=; b=a2Yb1CtpObM8uRJldz8BahpwP4Y2SUUKrrR55dssyDUtCxbtkQ5M3rRYOa+VlY8BaO VDXH06K78XahDAOQvtaXwX8xEkBSSoixiCR0//ESKUPPui4URWpJMcoA4wUVuQA00tkv EP11CAWKYON5mpZZc8JEPwbTZ5UsifBQ3kt+RfdcA46tiS6O3YXE5nz1CHscUmxsvBhD 74Y/oNgR9Wb5bDTdt8pQw85rR7Q+oPTktNmw3Nbv4xos/qjgbqJbE2idbWof1ZaQSD2e 3JzbqQCv/kgvQcJTInARvZctFrGFUJWUfHljSqgf/qgprEyDbXHGbK/tPVdYhDmRoSeO 1GZg== X-Gm-Message-State: AOAM531h/2hqU6R0UpLY7MftXypX9lc2FzyPwpLi4NxU5hUp9VPmHK2a EFkfMjxI0oQIc55dIzwFLVVlOA== X-Google-Smtp-Source: ABdhPJzoYvOvAcikkwClBWltryq6XICymRXfnLQwW8jF7VOc+OZUbDa4EZ0sHBEwmwGJG3qn+wlyiw== X-Received: by 2002:adf:e40e:: with SMTP id g14mr29707631wrm.285.1604493068199; Wed, 04 Nov 2020 04:31:08 -0800 (PST) Received: from vanye (cpc92880-cmbg19-2-0-cust79.5-4.cable.virginm.net. [82.27.104.80]) by smtp.gmail.com with ESMTPSA id t7sm2158264wrx.42.2020.11.04.04.31.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Nov 2020 04:31:07 -0800 (PST) Date: Wed, 4 Nov 2020 12:31:05 +0000 From: Leif Lindholm To: Ard Biesheuvel Cc: Ard Biesheuvel , linux-efi , The development of GNU GRUB , Daniel Kiper Subject: Re: [PATCH v2 1/8] linux/arm: fix ARM Linux header layout Message-ID: <20201104123105.GU1664@vanye> References: <20201025134941.4805-1-ard.biesheuvel@arm.com> <20201025134941.4805-2-ard.biesheuvel@arm.com> <20201104121146.GT1664@vanye> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Received-SPF: pass client-ip=2a00:1450:4864:20::443; envelope-from=leif@nuviainc.com; helo=mail-wr1-x443.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2020 12:31:18 -0000 On Wed, Nov 04, 2020 at 13:19:47 +0100, Ard Biesheuvel wrote: > On Wed, 4 Nov 2020 at 13:11, Leif Lindholm wrote: > > > > On Sun, Oct 25, 2020 at 14:49:34 +0100, Ard Biesheuvel wrote: > > > The hdr_offset member of the ARM Linux image header appears at > > > offset 0x3c, matching the PE/COFF spec's placement of the COFF > > > header offset in the MS-DOS header. We're currently off by four, > > > so fix that. > > > > > > Signed-off-by: Ard Biesheuvel > > > --- > > > include/grub/arm/linux.h | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/include/grub/arm/linux.h b/include/grub/arm/linux.h > > > index 2e98a6689696..bcd5a7eb186e 100644 > > > --- a/include/grub/arm/linux.h > > > +++ b/include/grub/arm/linux.h > > > @@ -30,7 +30,7 @@ struct linux_arm_kernel_header { > > > grub_uint32_t magic; > > > grub_uint32_t start; /* _start */ > > > grub_uint32_t end; /* _edata */ > > > - grub_uint32_t reserved2[4]; > > > + grub_uint32_t reserved2[3]; > > > grub_uint32_t hdr_offset; > > > > How did this ever work? > > > > By ignoring the value of hdr_offset entirely everywhere else Oh, right - we only bother checking magic, doh! / Leif