From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1kWgPI-0000Bb-9m for mharc-grub-devel@gnu.org; Sun, 25 Oct 2020 09:50:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45734) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kWgPG-0000Au-54 for grub-devel@gnu.org; Sun, 25 Oct 2020 09:49:58 -0400 Received: from foss.arm.com ([217.140.110.172]:38948) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kWgPE-0005wD-9C for grub-devel@gnu.org; Sun, 25 Oct 2020 09:49:57 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1BBB312FC; Sun, 25 Oct 2020 06:49:55 -0700 (PDT) Received: from e123331-lin.nice.arm.com (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5E9543F68F; Sun, 25 Oct 2020 06:49:53 -0700 (PDT) From: Ard Biesheuvel To: linux-efi@vger.kernel.org Cc: Ard Biesheuvel , grub-devel@gnu.org, daniel.kiper@oracle.com, leif@nuviainc.com Subject: [PATCH v2 1/8] linux/arm: fix ARM Linux header layout Date: Sun, 25 Oct 2020 14:49:34 +0100 Message-Id: <20201025134941.4805-2-ard.biesheuvel@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201025134941.4805-1-ard.biesheuvel@arm.com> References: <20201025134941.4805-1-ard.biesheuvel@arm.com> Received-SPF: pass client-ip=217.140.110.172; envelope-from=ard.biesheuvel@arm.com; helo=foss.arm.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/25 09:49:53 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, 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: Sun, 25 Oct 2020 13:49:58 -0000 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; }; -- 2.17.1