From patchwork Tue Dec 24 16:01:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raymond Mao X-Patchwork-Id: 853198 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp3982135wrq; Tue, 24 Dec 2024 08:01:45 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCX7GK19ofcKZWmeDek9DI0ibbOXNFccN3ry8XhMbiTQgGiOdKIGDgRRX+l1rz+RkGB7QbLS9g==@linaro.org X-Google-Smtp-Source: AGHT+IHjmSf3bis+1BRjZ5uHcj+AQTzQ95ZB+YMKQ+yN+ti/eQPwGQygsn0BWP/QqVAqFcQmswrh X-Received: by 2002:a17:907:da4:b0:aa6:8bb4:5030 with SMTP id a640c23a62f3a-aac269598damr1628137466b.0.1735056105405; Tue, 24 Dec 2024 08:01:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1735056105; cv=none; d=google.com; s=arc-20240605; b=ICEmWl5gV3qCINQcm1oaOoO3O8aqqq98hfBj6NeL9hTIjAPd/OrUyjVczIwe6o4Khj kaw+e0WHeN/T9BGwOIn7eY1SLgoRRXy/DwyK325ylZtBDSZi9oiRg6fF9Yoy0w/nYb97 E6A7RniFvAAfzt99Qys5WCqfqJVXTaIgXOEwxv9MywtlCNtwW0HIi/RJonkRJoNYHaV1 7QLhQSGvdgy0rOJtY2/iosS4awFsDlIoOnY2oAbOPt0sWcQrEkPWQlolhnI6nFBdgvrB EFkOOnpxvi5reEFJVqeI5Y9/nSVbX47oqxThO2R25eL9PH/fIuwXXbufZCqbHyv3fUEM ED7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=yBkE5FBBkp1ejnZqi2Ryy2HwJLGOAxz8NcBPmAsmVzs=; fh=aFRKT+FLsSpu5kjcugaqwnecmru2euGLzBWAk8anK2k=; b=CUtjlOe3LYsNftYc7ClJdZ5GMS9t7GeQFYcDybv5AipFIu5hLSXhKXUizFEPUAFXBi 3UZFSLTjfS5UZwxOsbrTxnA6uxOcwHMwG6PGo4dOMDBEde2JP0oh3k+ipV8wlqIzK7QD dLMsvS5UbCnDDGVMncX2gy/aP6p/YLDeJpOTXnlgVaviz6+gdrOrxcTr3/e2dda+BIyx ejmJr005/ah/dZ7DOZ3zfF3DHupAAbbxzYz0IqPbFCcgJorARtY7rOunuys5dkvOfchu eLamWqj6lUFeOKMgdaNEh7dABMksXF+0S1pY1XRlOualR8SVrkt09RXmKgyzZlHW4D+k Hkwg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CmJ292WD; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5d80703068csi7201694a12.539.2024.12.24.08.01.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Dec 2024 08:01:45 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CmJ292WD; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9AC2A807EA; Tue, 24 Dec 2024 17:01:41 +0100 (CET) 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="CmJ292WD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 630E9807E4; Tue, 24 Dec 2024 17:01:40 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qv1-xf2b.google.com (mail-qv1-xf2b.google.com [IPv6:2607:f8b0:4864:20::f2b]) (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 39708801F5 for ; Tue, 24 Dec 2024 17:01:38 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=raymond.mao@linaro.org Received: by mail-qv1-xf2b.google.com with SMTP id 6a1803df08f44-6d8edad9932so35055776d6.0 for ; Tue, 24 Dec 2024 08:01:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735056097; x=1735660897; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yBkE5FBBkp1ejnZqi2Ryy2HwJLGOAxz8NcBPmAsmVzs=; b=CmJ292WDOBTI1p7rcR1cXsdFHzNK3iGap4tgGH2VrSWbfXyMW4Gr9gaZkzgy9N1a3h F8vpuOldpyhsE1rQcUQw/2fSMtMua/MCKnF6kzdUYFPicYKdQiokluUu3HXj0riOVth8 yCXRrlwK3AoxiI+XNNzdNhs+I43c0c3ljKrn5DfrNvGrcZyXcxh3dx3YZfqmIKgXXuiU 9qem6EfXjQrmzLzj0tbJ0NZxqTx0n+l7+FJ5Efm29Korm7vuzFhdcmIYSvirzN27QpfB YcdAXo7rI14zNMS1+vYCU1mASv8GozTeCKRFYvZYf85+F67YTSQ/noOUW5GfsYcJ1w0I Gujw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735056097; x=1735660897; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yBkE5FBBkp1ejnZqi2Ryy2HwJLGOAxz8NcBPmAsmVzs=; b=ELabxTW/H3vDS0BhIloa3LJMGYpL10yx9ORL3xekMQsyDDXn35iug7ctovvK/7hy/K lWFJOt9GaQg8kiKBd9I1rfFBRcxxzVY26XxTWWV7a0WRe0nc+R6GRjyRY84qe61TiLxV uWNvHmUGX6lDVEl8nL0xmejyd2HNGCFQx7l8TU5KSVb6Je4Zvi1UYCTTCuAqfRYSNXJR U6zZt04JNM8z0++sWQNBhrsaJuB3n4NaTcmtUOm33uDUiwmnTqydpHPRrppZvQA9DTgf 7g2QEsSwSHjJJevq0joifQFcUBHSTRwQtONT9b7OYHHuTs+d3aAbKWKJpKASeCxjtZv5 0ppQ== X-Gm-Message-State: AOJu0YxmUfqvrDLOR4PMSi1q13t37cnROpU1TA94oWAXPLdKa6zKi/t3 s0F/WqZq0RXhL4g0wl54svlGSHpWDagzCas13mtvJxPl9H129mDMFHuXDo2oTnR336aVNXjK4OU J X-Gm-Gg: ASbGncuwMjJfOFmpJVVYRExo0xmmQapSexKZcdQtpcbuiZQWyEhJtUDbSNen8UjArnr Uqkrq/gHJniA27SmC2AMo+hRnWWW5BupMSxDatzA6wtJ4Rkr6zk/drDMMtR3Rj/6D86HGex9Rts nVpAmJm/7A2HvJEWRICjOFPorhPM3HTKyi3YDN4Bq/3p7ghF7QpHvxHhNVA9cqdkVCyzk4r7usw O24iNQsz5H60Cj8fcJiwiGq2LyoX931KL1tCwNIVOw7fS3Y+h7fl8H6+J2UYMoy29y/YGu5PkyP G6dkSsf6Th4fx8/eRjKheaM+45nXwa7veAHUSR8Mh36r8KEz3aBzUtY= X-Received: by 2002:ad4:5ce9:0:b0:6d8:9c92:654a with SMTP id 6a1803df08f44-6dd2331e946mr290512796d6.10.1735056095176; Tue, 24 Dec 2024 08:01:35 -0800 (PST) Received: from ubuntu.localdomain (pool-174-114-184-37.cpe.net.cable.rogers.com. [174.114.184.37]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6dd181d432asm53840816d6.110.2024.12.24.08.01.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Dec 2024 08:01:34 -0800 (PST) From: Raymond Mao To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Raymond Mao , Tom Rini , Heinrich Schuchardt , Tim Harvey , Simon Glass , Masahisa Kojima , Eddie James Subject: [PATCH v2 01/11] efi_loader: Don't warn if the TCG2 FinalEvents table is not installed Date: Tue, 24 Dec 2024 08:01:03 -0800 Message-Id: <20241224160118.675977-2-raymond.mao@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241224160118.675977-1-raymond.mao@linaro.org> References: <20241224160118.675977-1-raymond.mao@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean From: Ilias Apalodimas When the TCG2 protocol installation fails, we are trying to remove all the objects we created in tcg2_uninit(). However, there are cases when this function runs before the config table was installed. So instead of printing an error unconditionally check against EFI_NOT_FOUND and don't print anything if the table wasn't installed to begin with. Signed-off-by: Ilias Apalodimas Signed-off-by: Raymond Mao --- Changes in v2 - None. lib/efi_loader/efi_tcg2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/efi_loader/efi_tcg2.c b/lib/efi_loader/efi_tcg2.c index 572c6b5bf6..a15c73162e 100644 --- a/lib/efi_loader/efi_tcg2.c +++ b/lib/efi_loader/efi_tcg2.c @@ -791,7 +791,7 @@ static void tcg2_uninit(void) efi_status_t ret; ret = efi_install_configuration_table(&efi_guid_final_events, NULL); - if (ret != EFI_SUCCESS) + if (ret != EFI_SUCCESS && ret != EFI_NOT_FOUND) log_err("Failed to delete final events config table\n"); efi_free_pool(event_log.buffer);