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? 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.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,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 13098C2BA83 for ; Thu, 13 Feb 2020 18:48:08 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E6052217F4 for ; Thu, 13 Feb 2020 18:48:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YU108Jwd"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="N4uAGNRQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E6052217F4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=alum.mit.edu Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Y/WLXMDvWh10OEte0Dm5SiqS5+U6y+D/z9crkaMuf7o=; b=YU108Jwd58LmIO 4y7EID+/pNRx7az9IQZFd4MAF4ySNEAeBPFPgXyd1paRI72XHGD4sRXOd7qSBxDLdDqnhpEialjeO TIrO+vWkOP0n9nr8OqYk3164PhfpXGeVjVteydqVwut1JHJ1kwcBpJo87ONF75tDKwNu3RRDKhN3U zNvHPlwoXYiGowZfljQuvbj9o1uodvg7Z1mbkrfWxx1/pJZZxFJiIUzR4G6r8TGZejJo5Ww7qOsuP qZIgDMJkmk+fKKy1w4JVrzALu8z1me1lhrmgsBaG3CYK4iBQusSZomuVwhTeWxD/5TV2oHaxFtFHk B22UAm7K73qaThQDW56A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j2JWo-0000GR-FS; Thu, 13 Feb 2020 18:47:58 +0000 Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j2JWl-0000G8-RO for linux-arm-kernel@lists.infradead.org; Thu, 13 Feb 2020 18:47:57 +0000 Received: by mail-qk1-x741.google.com with SMTP id w25so6722984qki.3 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=c0W5tEkINDpuhuF/9cJOJZcw2Hv89DS+6K4UEdKOYBHpqQDQJV4SacyefaUNR0vC5h SrPblBJLLaNiFZwNwDX1h28MFv5LK1aRcM1g1U+PwlUY2qksRoQ9Ifvo7KVD19DSeP0w uWfwCeDvF0dggsexql7FYwuudpRF3xsHjW3KHDjRhAQtOk/Adgv3Pw85qX/F/yva6TQ+ kT2C3qNxK4A1RjU9HUX2bh+VTZmPjeLWQLDgPkst2ndETnAHcqWr7K/h5wtEC6R2+FoE HeSaWWOvJkaN+eJPzD1n3VbsisvVaWf5iY5QaW/YcGQfGyGxoEnusYdd7s36T2nrQhLL Ix9g== X-Gm-Message-State: APjAAAUuaDJ1SABxIiemdLakO9H5B6rQKHP38m9tKUVo8ytfqRnVUiZR 66DcJ9L+xzMQMBjo8aXVKrE= 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 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-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200213_104755_889126_76DCFF3B X-CRM114-Status: GOOD ( 13.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-efi , Alexander Graf , Daniel Kiper , Matthew Garrett , Michael Brown , Hans de Goede , Arvind Sankar , Peter Jones , Leif Lindholm , Laszlo Ersek , Ingo Molnar , linux-arm-kernel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.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? _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel