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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75990C433EF for ; Tue, 9 Nov 2021 11:00:22 +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 8071A61177 for ; Tue, 9 Nov 2021 11:00:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8071A61177 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=canonical.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 33CB58367D; Tue, 9 Nov 2021 12:00:19 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=canonical.com 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=canonical.com header.i=@canonical.com header.b="J4fkl8oX"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 698AC8367D; Tue, 9 Nov 2021 12:00:17 +0100 (CET) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id ED9E183681 for ; Tue, 9 Nov 2021 12:00:07 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=heinrich.schuchardt@canonical.com Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id D53293F1AE for ; Tue, 9 Nov 2021 11:00:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1636455605; bh=R4M18LLMfADFgE4iW1zwZ1IXrzdSzFm264HHUYLrIpI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=J4fkl8oXeL2ANHVygT+TOPVdmMr/1sKv+nVm8L3b+08jf2RPdYp8yQlSFSGfqequy K51i6Y6rgmKFkseR5zEs3Y0aTlh9lhSIpja5Nnrvyuuf/4NhzCix899AmTN4zl+B0R G+IREyUohNUStldbu84Pj63I+p0TM1UExUoHei1YdW5yrF535Cr8wrTS/4OlpURu2u bLO3kx8m8s8Mc8x5c1Z7QQyz2oBbdyUJEcQILRIpcgSicrpdl6OX/H/ly9pPZfx3R6 x0/zzFlgUYV4cgWMCPgTe9OOiywGFmfGV8/D5rpNjgtEOgM/QYrL6k5tfMIujFDJ+H /AOK0HMqB4NHA== Received: by mail-wm1-f71.google.com with SMTP id c185-20020a1c35c2000000b003331dc61c6cso1159218wma.6 for ; Tue, 09 Nov 2021 03:00:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=R4M18LLMfADFgE4iW1zwZ1IXrzdSzFm264HHUYLrIpI=; b=H9KN+1MUo4BadZbHqMAUC1VBmGZtvcVqzaSgHggRlIgpBJ0FiQLHX8geJK6G9fqu+p bSUdFamGJKHDFvGtf2QD/SNHawkguxQq/v8FCgeWiai1oCXpwXbStNfdd98lGG/HGmAn 4+/P0BQrnTLPmQLPlgsvEsHnl3QIi5LZCsnsVotUu3cE3SlW2YDMchNqTeKuy5MLoxk0 NxaoA7mX5gzgXzHGWWOZLuYZXiG67IAsWt14ZJ3rjEkxVH2q1aAlnWxxk6oXayTYqrRZ NUgsxEDa9rLWoGmKjUTwxR/2qNU1yuf9rDrdP5bnRcGqtUxcwJbwLVa6WQn5Z8M+CgXu WbeA== X-Gm-Message-State: AOAM532RoDlqDAC8oX02LMSK+BtjbunA4RsQ+10RyC5I1pG0Zq9giCAg ME8RQJ60rAwcxEmmuK7WvdAqrHNxcT2C+HleKkHBOjwz84X9Gh2tRHX147MZoMUf21Pt7uS/5FX SRlqmUAR5QRRlQbKGymxApspzhjyVLgY= X-Received: by 2002:a7b:c04b:: with SMTP id u11mr6023268wmc.127.1636455605462; Tue, 09 Nov 2021 03:00:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJzgy8fpSKrTto0tSGEal4NpeIbgaZCGQTzvOHf8uGOAYaWoHmqQVt0wyJ18hcDR7CTh0iBYlA== X-Received: by 2002:a7b:c04b:: with SMTP id u11mr6023245wmc.127.1636455605289; Tue, 09 Nov 2021 03:00:05 -0800 (PST) Received: from [192.168.123.55] (ip-88-152-144-157.hsi03.unitymediagroup.de. [88.152.144.157]) by smtp.gmail.com with ESMTPSA id t189sm2258167wma.8.2021.11.09.03.00.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 09 Nov 2021 03:00:05 -0800 (PST) Message-ID: Date: Tue, 9 Nov 2021 12:00:04 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.1 Subject: Re: [PATCH] efi_loader: fix BootOrder variable measurement handling Content-Language: en-US To: Masahisa Kojima Cc: Ilias Apalodimas , Simon Glass , Alexander Graf , u-boot@lists.denx.de References: <20211109094454.32570-1-masahisa.kojima@linaro.org> From: Heinrich Schuchardt In-Reply-To: <20211109094454.32570-1-masahisa.kojima@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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.103.2 at phobos.denx.de X-Virus-Status: Clean On 11/9/21 10:44, Masahisa Kojima wrote: > UEFI specification does not require that BootOrder is defined. > In current implementation, boot variable measurement fails and > returns EFI_NOT_FOUND if BootOrder is not defined. > > This commit correcly handles this case, skip the boot variable > measurement if BootOrder is not defined. > > Signed-off-by: Masahisa Kojima => tpm2 init && tpm2 startup TPM2_SU_CLEAR => efidebug boot order 1000 Found 0 disks Missing RNG device for EFI_RNG_PROTOCOL No EFI system partition No EFI system partition Failed to persist EFI variables => efidebug boot order 1: Boot1000: (not defined) => bootefi hello Booting /MemoryMapped(0x0,0x7ff9b1f0,0x11e0) Boot1000 not found Hello, world! Running on UEFI 2.8 Have SMBIOS table Have device tree Load options: Boot device: /MemoryMapped(0x0,0x7ff9b1f0,0x11e0) File path: => The message "Boot1000 not found" is created in lib/efi_loader/efi_tcg2.c(1475) tcg2_measure_boot_variable(). That message should be log_debug(). But that can be done in a separate patch. Reviewed-by: Heinrich Schuchardt