From patchwork Mon Dec 23 14:47:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raymond Mao X-Patchwork-Id: 853065 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp3432245wrq; Mon, 23 Dec 2024 06:48:02 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCX6/pe7oRt6gwSeLmOOG05KPUAnPpyF+NE52zo3hcwnTR8Xb4vHfB62QA4rUAA/FFWY88EFXQ==@linaro.org X-Google-Smtp-Source: AGHT+IG2DtTIg+XQZyY3ctawWkjZmyvfmu3hloh40XDSBblF9+O6P3Rt51lNqpZJ4wOPxHE5CerX X-Received: by 2002:a17:907:3d89:b0:aab:740f:e467 with SMTP id a640c23a62f3a-aac2713131amr1039560566b.8.1734965281798; Mon, 23 Dec 2024 06:48:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734965281; cv=none; d=google.com; s=arc-20240605; b=BfA6cmEEkPFly1e9oWdX+ObjhE2Lnox6ZO8VcKFxYnTdCzscw0I2BjOBGamhU9iPea NXXL3mmp2RRL4L1Y3BMpbxtPmQhvBrPGbYvPwl92Ea1UzC4A3gvgKQRbbp1yvctSKZo1 4GnC46a1C6G6bWjMzkAXodLL0u1thT9hRFKCNZJBQ+KHzjH8kLzLox5d+zT1UtUnjCdT tOxcUTygt29K0+AsY2dsL34vaaPtKixcjUHY6wjWgGhItbUJu81Tp5NWLDeA1qHFdtGH xq/OR4AOBEs06pfZarGc8zGbWPDaCmz2WLPTADZlhvWJoQ1WfmvBcHHQgcNQP/w5+NaE QxAg== 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=vHTdZDoQHi0DGV+vWci9khHooRAXICaEiFLFbPsBXW0=; fh=GxVV1jPPRLga+oPsj1uHhvLGyASOoboRHaEc9n8kBQg=; b=EqyrmE+AyFbx9I+893GTLeF04zYuyU/W4Izn29pwzh7G0Lc1a7z3yWGJrmPfzxnRiw Nn3SXUxAcodvk2ndDdJwsUQrhKvxWTiE9bPMCEOjPULWRd0/mF1Ah2cJiPrZ1S1WG8GQ 8VJhtJ3liVROLH2G1AjZ6Kd9GZCUhlYr3LnHyS3Yr4VBK+SkMUPjC2NVWLLgi8zohLz2 a2+/6kAqF7l1dVRxnPmO7gmmx8i/Q61P4a9aTz135MSpLZvSxGLH8m/aNEoK4kCioDVt nDs0EijQH0SDnoSG/bSUEB1hXGcfxU5yeDlm6XsmB5EYifZB0lmJOqOZzZ+L+oLoSZPT 0bFg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Zffxw8yv; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id a640c23a62f3a-aac0e7f1175si581972966b.144.2024.12.23.06.48.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Dec 2024 06:48:01 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Zffxw8yv; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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 33F8280704; Mon, 23 Dec 2024 15:48:00 +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="Zffxw8yv"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E8BAD80704; Mon, 23 Dec 2024 15:47:58 +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-xf33.google.com (mail-qv1-xf33.google.com [IPv6:2607:f8b0:4864:20::f33]) (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 029DD80740 for ; Mon, 23 Dec 2024 15:47:55 +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-xf33.google.com with SMTP id 6a1803df08f44-6d88cb85987so35367936d6.1 for ; Mon, 23 Dec 2024 06:47:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734965273; x=1735570073; 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=vHTdZDoQHi0DGV+vWci9khHooRAXICaEiFLFbPsBXW0=; b=Zffxw8yvojyN4pD211sFUmKkLk7uawq1WtJeHgzUIigE8gOTtr4KoqtPIWSHfvdBPU 7s/COeteWNyLvW3w+xoN5vj4AI1FEqrv07SSqDlVQyItkujz11jU7Bmz8wLF0P6cky/X tMJDg/oZUgTRfalcFz/owQ1A39b3rBndC07uH8S0mGbymbo8RHbOWWcWWhda2G0JCvYo qDHfjfFL2ED3tcM7npH6PMOmfhbn2UYaRr9Cug+h24j8NUnU2geZygnO/svxdnh3fT27 fUyhe/jkRe/1ETiXl8yPFkF1nhLXcAybU5os14YhmT+X8PdLboHFeM54QgBQtxyChDA9 TAug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734965273; x=1735570073; 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=vHTdZDoQHi0DGV+vWci9khHooRAXICaEiFLFbPsBXW0=; b=cPeLrRcfBH34CVoIOcCeg3Gc8I+i5mJEuV6GFnfH7mfLfszaorTADurUozxmNX8+J3 JVFARTT/WiG+6pI6eja+GSTy3W2EmQueNyk5bzlRN0q8G1xIx8LDIrI2830JYRx5Qrqo JFMRQTTLnm/bYrR6wk7jB6E7WIJRltCpJmw8jdkMBS/baKU85GVhEuMGZtR60fYDld55 a7VuVBcojHiVX7/HxIh4ERTATGjhdwQELjQoaYoGXQyCIMAtuGXtZhnQ1dsJn1HfUFCi EFEPTlNKnhPeDQvQ8hXmOc1Ss6g8q/pFBb2D3NxXCuiFNcKd8ZCwTC58k/R6nrndsH2E 2nsQ== X-Gm-Message-State: AOJu0YyEGK+NBlUxcasquw/EiuQhQdryWZ+57b2zGXwD4pXSn4OEFXdL yL7ZWlPPePvWsWTLPr4BTBXFMoBZV4zJYGDRZvCrSt6KQboHFtIM9QN7kv5xS5sSOMFiw9T5fzR 8 X-Gm-Gg: ASbGncsiOw/McP130YmVSY9cZxw15d+orF/x3DpVWQn242vTj5fy25ghqcUcAtwUKo7 TNZrvVZxoO77u9WVENPHOrBqRKsHZoSIZ0EEYbIMDkznr7JrAsNBi9Rej2wGkCwT9t2vbY2OM5P G3MlbCu0tsQFUlMzCRbW/kC8tTwdCXLTjk+EdfypiW367UDDk9muxdCu0uG8IUiv9ZnOLcbjU/c fmhzEkxkE8SHtPdE62VCp1fZImQoWBzzwix2dvLttbh35zWZodOXijBLRlu4ECwoR/+Fh7NRMuJ Pb7xwxdEKXG4+KPCPykcVTB2YZzCWwHrylxvTxjqndqWdfN/jVR/vEo= X-Received: by 2002:a05:6214:d6c:b0:6d9:429:ab4b with SMTP id 6a1803df08f44-6dd15499041mr246770786d6.0.1734965273517; Mon, 23 Dec 2024 06:47:53 -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-6dd181bb519sm44243246d6.83.2024.12.23.06.47.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Dec 2024 06:47:53 -0800 (PST) From: Raymond Mao To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Raymond Mao , Tom Rini , Heinrich Schuchardt , Simon Glass , Tim Harvey , Masahisa Kojima Subject: [PATCH 01/11] efi_loader: Don't warn if the TCG2 FinalEvents table is not installed Date: Mon, 23 Dec 2024 06:47:23 -0800 Message-Id: <20241223144737.554992-2-raymond.mao@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241223144737.554992-1-raymond.mao@linaro.org> References: <20241223144737.554992-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 --- 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);