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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 48556C47082 for ; Thu, 3 Jun 2021 06:47:27 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4A7C261246 for ; Thu, 3 Jun 2021 06:47:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4A7C261246 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 590B982F3D; Thu, 3 Jun 2021 08:47:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="Lcd7zSMS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6D3B982F4D; Thu, 3 Jun 2021 08:47:22 +0200 (CEST) Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0532A82F3D for ; Thu, 3 Jun 2021 08:47:16 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-wr1-x430.google.com with SMTP id q5so4658876wrs.4 for ; Wed, 02 Jun 2021 23:47:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=/vQdW1s+dhWymJ1kcJPUJzzh+kJGQzUhSxqfExtdVmc=; b=Lcd7zSMSFittK+wBojCbSDkcBXbxPrTDEqqrr9Pd5FsR2qrxhqDixWt8uOQJBCu+Mb hlSa1JF+cdmuyuJaJDTek6yzCq6JjjirjrCG3XAI8SAHSC5XZ4ksB/tXqfjlRBrJWLyy 1PAjolj53qnuSf3WF3dpoYUXblxLbJE9WChlmqA6taxH0Xk5PbPa8Y1wS1NRhtR95WtA apHr2li3+hAqSDltkdisVy64SqXmkie18fN1+aypUbkQAZaw9hDqmk0a58RRZ8uIgNKm uBaUGiDdZ+zrPy1DOa6p9Pt9smhlzJ5T9A8pQ1YVsbnuSml8+rSwpfz3giXUvJKRuesD dofw== 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:content-transfer-encoding :in-reply-to; bh=/vQdW1s+dhWymJ1kcJPUJzzh+kJGQzUhSxqfExtdVmc=; b=MyD6fPn/L5i/pPIyAhVrPihtekuOtaMVe3KEpGBpeH4P4dorgkvBtbdHOCs+Ozt3ae sCJJ3Wv86l8yCXC7tLQ3diwZdmHQp7Dws9IP8QiZrBW5om/DPZt9TOEe135C5UhPEvNZ syH8us/B3JK/WE00CulMPPvKn7VBWdChAFmegb/hf268JmAzL2rO39yM9IhFI9vUwSZS 5FmQilgFoBtJt0z8eEk4pWuDythSUWnzl8axNgjUNA7dng5xazuE3Yj4bAhSkLmKkr1F anjj6UqEqym1G8GjO8akETtydH0M9Je7emfT4BydJBHji5roB6/QbWuAmhkbwdKo0gPp 5ehA== X-Gm-Message-State: AOAM532K2e1AIDQ+uVLtIDYGsk4KOn/JEMaMI2imRrAQvkYYPRPXvdXT CxKlAWbN3m82PGBxZJFpoDCiuA== X-Google-Smtp-Source: ABdhPJxKWz7yy2M4QPfmlzA+MevX7E3VMzsAeXxqz8iFR3lvaqO+OM30zHciSPOXGnPAp/tY0MSuuA== X-Received: by 2002:a5d:5104:: with SMTP id s4mr30658945wrt.306.1622702835585; Wed, 02 Jun 2021 23:47:15 -0700 (PDT) Received: from Iliass-MBP (ppp-94-66-250-101.home.otenet.gr. [94.66.250.101]) by smtp.gmail.com with ESMTPSA id s5sm1701867wmh.37.2021.06.02.23.47.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Jun 2021 23:47:15 -0700 (PDT) Date: Thu, 3 Jun 2021 09:47:11 +0300 From: Ilias Apalodimas To: Masami Hiramatsu Cc: Heinrich Schuchardt , Kazuhiko Sakamoto , Alexander Graf , Jesper Schmitz Mouridsen , Simon Glass , U-Boot Mailing List , Vincent =?iso-8859-1?Q?Stehl=E9?= , Grant Likely Subject: Re: [PATCH] efi: Restrict the simple file system protocol to support only FAT Message-ID: References: <162268667641.382839.15360535926598237804.stgit@localhost> <1CB0876C-6011-450D-8293-EC3B22FDB0FB@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean On Thu, Jun 03, 2021 at 03:36:38PM +0900, Masami Hiramatsu wrote: > Hi Ilias, > > 2021年6月3日(木) 15:25 Ilias Apalodimas : > > > > [...] > > > > > > > > At least Debian and Ubuntu do not allow /boot to be on a FAT file system. If we want to boot Linux via the EFI stub without GRUB, we need ext4 support exposed to the EFI sub-system. See Ilias' recent contributions for the EFI_LOAD_FILE2_PROTOCOL for initrd and efidebug. This came in handy for booting via EFI on RISC-V where the initrd= command line parameter is not supported by Linux. > > > > > > IMHO, such dependency is out of UEFI spec. That means Debian/Ubuntu > > > doesn't follow the UEFI spec. (but as far as I know, those install ESP > > > on the disk and install GRUB efi application for boot) > > > And yes, EFI_LOAD_FILE2_PROTOCOL needs to load initrd from somewhere > > > (I'm usually put it on the ESP). But, if the EFI_LOAD_FILE2_PROTOCOL > > > *requires* to access ext4 partition, I think that is not supported by > > > UEFI spec. > > > > One of the advantages in using EFI_LOAD_FILE2_PROTOCOL is that you can load > > it from *any* file system the firmware has access to. The only thing the > > kernel does is provide a buffer big enough to fit in the initrd. The > > firmware is free to locate the file and copy it in that memory however it > > sees fit. > > Ah, I got it. Yes, EFI_LOAD_FILE2_PROTOCOL doesn't depend on the > EFI_SIMPLE_FILE_SYSTEM_PROTOCOL. Thus it should be able to load > the file from where the U-Boot can access. However, since current implementation > depends on the EFI_SIMPLE_FILE_SYSTEM_PROTOCOL, my patch limits > the ability... > Yea that changed recently. On the first version, I was using u-boot internal functions to locate and load the file. When we decided to store a device path on Boot#### options, in order to locate the initrd, we started using the EFI APIs to load it. You can check commit 53f6a5aa8626 for more details. Cheers /Ilias > Thank you, > > > > > Cheers > > /Ilias > > > > > > Anyway, I agree that denying access to non-FAT partitions is too > > > restricted. What about my other ideas? If the volume is set to > > > ReadOnly, that is good for both of the SCT and the > > > EFI_LOAD_FILE2_PROTOCOL. > > > > > > > > > Thank you, > > > > > > > > > > > Best regards > > > > > > > > Heinrich > > > > > > > > > > > > -- > Masami Hiramatsu