From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B43AC2BA83 for ; Thu, 13 Feb 2020 18:47:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 53AB4217F4 for ; Thu, 13 Feb 2020 18:47:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="N4uAGNRQ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727722AbgBMSr4 (ORCPT ); Thu, 13 Feb 2020 13:47:56 -0500 Received: from mail-qk1-f194.google.com ([209.85.222.194]:33740 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725781AbgBMSrz (ORCPT ); Thu, 13 Feb 2020 13:47:55 -0500 Received: by mail-qk1-f194.google.com with SMTP id h4so6742482qkm.0 for ; Thu, 13 Feb 2020 10:47:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ItcHxmvwXWY22Frq93yy83FEgztrFUHu+KYy0gKPrtU=; b=N4uAGNRQul1USMZvgbzEha2JgQY4DeRIP4RNfbL9Ph/eCKQqlnGRBa5xV8YoKO1nVu jX1m1AeoVYk9R5ZhdTU1LXeqWRNVk7U0/4IsQHtLFZSqpdUonvqhvwYKZNOvDF3NMhiY 5LqS1M/8Q9AUaDBn6mCAPXYVa7BGaSXxp0w3kYBfikUYbFB3lPbKrp+/9MHbM6m9o9Cb CSssK5NTP27/0qRVWRfqpK2eVxW+JT0a7HoOiIx2+y7GazUmazw30C/ETo/dHkEfhFAB pvrKcGguYqZGJhb05V+GCF1GFhidyX2+AWjyhMUObq2pyLisLVXIo1Glui+5DjkxJCRl UVnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:date:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=ItcHxmvwXWY22Frq93yy83FEgztrFUHu+KYy0gKPrtU=; b=YN72BhL9UZhdSlsLrpSmt8+M652NRvkGSVnhgc/bLYn5Gy6sZciZpcNrkdV6+tVAU2 3VNtFsjhXwsdNmbGjcb/0q6+pYjw7trc7Sc7sIRweqNQUzSNnb30HyflrFz7oisFAmAR 20w1pDzCDaJ77oSug2FuaBvbWpy7eG8aCrfLpbDVLbK6WBls2OxCtXR2zG68aCNhauT2 t2cbGB1LLcJHcXSgUm/G0iXWo9gZiU1wkBa3GmjAU5wX8vUsNQL1AjweuSf0MYT1famB b2kpSqZrIDONWpcXAhLvPkgLiIDT4VoSNE71Mjy+vYEBbn5fvODerrEL+ZeLbPIKN3ue oabQ== X-Gm-Message-State: APjAAAXE3xOu1y/6LkPFCSPkSC5FSR4iF23rYMk7uGQkB8MKbVWwX/gN OUl0jfwbfMyEv1+uRZs4Ono= X-Google-Smtp-Source: APXvYqz3d1t4QHve0cTl9mgE5VkQtHXLK+r3RlU7AQCkpBiT3mb5Mbx8B0EKdCfdg719bNTZQK4w0w== X-Received: by 2002:a05:620a:1134:: with SMTP id p20mr17213053qkk.33.1581619674400; Thu, 13 Feb 2020 10:47:54 -0800 (PST) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id w134sm1740928qka.127.2020.02.13.10.47.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2020 10:47:54 -0800 (PST) From: Arvind Sankar X-Google-Original-From: Arvind Sankar Date: Thu, 13 Feb 2020 13:47:52 -0500 To: Ard Biesheuvel Cc: Arvind Sankar , linux-efi , linux-arm-kernel , Laszlo Ersek , Leif Lindholm , Peter Jones , Matthew Garrett , Alexander Graf , Daniel Kiper , Hans de Goede , Michael Brown , Ingo Molnar Subject: Re: [RFC PATCH 0/3] efi/x86: add support for generic EFI mixed mode boot Message-ID: <20200213184752.GA1424509@rani.riverdale.lan> References: <20200213145928.7047-1-ardb@kernel.org> <20200213175317.GC1400002@rani.riverdale.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org On Thu, Feb 13, 2020 at 05:55:44PM +0000, Ard Biesheuvel wrote: > On Thu, 13 Feb 2020 at 18:53, Arvind Sankar wrote: > > As an alternative to the new section, how about having a CONFIG option > > to emit the 64-bit kernel with a 32-bit PE header instead, which would > > point to efi32_pe_entry? In that case it could be directly loaded by > > existing firmware already. You could even have a tool that can mangle an > > existing bzImage's header from 64-bit to 32-bit, say using the newly > > added kernel_info structure to record the existence and location of > > efi32_pe_entry. > > > > That wouldn't work with, say, signed distro kernels. No, the idea would be that the distro would distribute two signed images, one 32-bit and one 64-bit, which are identical except for the header. At install time, the installer chooses based on the system's firmware bit-ness. > > > Also, the PE header can live anywhere inside the image, right? Is there > > any reason to struggle to shoehorn it into the "boot sector"? > > It cannot. It must live outside a region described by the section headers. It could still be inserted after .setup, or at the very end of the file, no?