From patchwork Thu Nov 28 07:11:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 845916 Delivered-To: patch@linaro.org Received: by 2002:adf:f2c4:0:b0:382:43a8:7b94 with SMTP id d4csp86676wrp; Wed, 27 Nov 2024 23:11:31 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXYvFMTqWGGURDaEMgAuGMMwIwHrzIKqw6AQl1HmuKGPLRnozYEN/9DyBARDxeBPZvHr+CGZQ==@linaro.org X-Google-Smtp-Source: AGHT+IET+58lAarRnK2gFlbpmauksf7ZTkjb60CEOhEDRHw0Ez07FMhXeDDK+sWnBwI+6kv5D/ib X-Received: by 2002:a17:907:7751:b0:a9a:6bc2:c0a3 with SMTP id a640c23a62f3a-aa580edf6demr416024566b.7.1732777891110; Wed, 27 Nov 2024 23:11:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732777891; cv=none; d=google.com; s=arc-20240605; b=ctYuYLmGwiGXOmdCYIzik50a9MJ322cSqaFQQKx/sZju9WLvz9xQlyiPRW8/H7LUd4 tPF5geHsYkGift+DEFF0bFeIUr74LCUhoVdUrPad0fHyI7CbQaEdkBfIWYlrkpmnhIWb NIgzBWxQD+8paQAw8P3KTzE1W7n0CRQ6oRMBgcLMAW2hAexguWuPXeDa7NA6Sarl17i+ 0mlh3vCd4SRlmEYj6YW5GDpaS5qpS86hgHp7MvxLDsN0g7OraRG7Ff9zA9G1PCZ8MJw4 giZqvvC44F2kE6PqClMlC51a2STt6FSPXGY4gRE0v7/raLtEZBOl2RYwEsb9pIq5MRXV TxyQ== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=TTNUsCRROLxZN/RF3nyODhqQB69D+GDX1WXoLBu24XM=; fh=OUlcoLn4nG6QGFemWuaPK5zXxSWm76P0v1pJC3I5ea4=; b=XzC5oJXS3u3ys2xok0GsmdT/HX8LGxB0C7FJ+kndq1CYDKS/hk0mkekm9lT4F6DsgN oAX8GVsha8jNLug5BHveVbm+dqwD/0ttbyWqDKD/6vtLaGBb69fyh0SPM4D9DQ3tIDxR IONQgjeIb8seEYcn/lh9Tn8YuAJpKEAoRx6Zn8Ng/SKxlntBqZ1MrJ/uEUBBEcKD9GFO yhhIu44Opgg6WVXnVLAn5sOTOfJ0E6O0w5qSAOAA/Us/WlppD/9ldIES0j8RndVvHR7s bW+xQ3/2xaUeFFmwQBg10Cx7h+9vNjUMRs2GIqhFsJhRW1dUePD54zFlAZPqRLmz6XKB lFQg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rY3KoTLI; 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-aa59990a74asi58763666b.632.2024.11.27.23.11.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Nov 2024 23:11:31 -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=rY3KoTLI; 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 0D7B489510; Thu, 28 Nov 2024 08:11:30 +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="rY3KoTLI"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7823C89608; Thu, 28 Nov 2024 08:11:28 +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-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) (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 573CB893D6 for ; Thu, 28 Nov 2024 08:11:26 +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=ilias.apalodimas@linaro.org Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-5cfe5da1251so593842a12.1 for ; Wed, 27 Nov 2024 23:11:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732777886; x=1733382686; darn=lists.denx.de; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=TTNUsCRROLxZN/RF3nyODhqQB69D+GDX1WXoLBu24XM=; b=rY3KoTLItTrvryQZ8UqCsRhj5dHKsN1xJdcCW/y1N4DXbRn4QC5+nLjL9GzFSPV2HP E8dkaXxEV2xU3F8o+NvFMECEHvgO9SGYJKhMba/2WTZ+mmwl0JlnraJPzYpl4kBqnaXo XzSyZcUQCJg5d2YxEwh0Tlu7KJOh0Hvyu/Oiv3O5O83XDEoBqYyhLrB+gTo/Ox5TafGj BHU554XfPvVZQEp8VF8y6ytpYyjXuz5xLGZ8CXxpRvs4EHAvn6vXMMculVwjCPupKJge QhFVXVMWIWT8IccECffHFRNibXbYJgswDQyqdjg4EkXD1VEEU5C86eras8i9WnrfcAlh S9yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732777886; x=1733382686; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=TTNUsCRROLxZN/RF3nyODhqQB69D+GDX1WXoLBu24XM=; b=cjM/UoqLSwVd49DTjXCd5MedkwGQuh7WAvn2IWONB80+U/6eN8quNru4r8htkM27rz yBeCjrOjtiPcPk6ctC2VVUIknE1scvQBQ1Eh9KgOdJLrvYWwHFXdWLLjDX/4bR62dpf/ n8UWd1xgcsCzrR+M1hcksJhCT0+v/xDpbkV0wGssW1WIHMhYyPV3oppza/nr3B0sqhq5 V+9doyJuSw1KfgE6YpMl7srlWQurFJ4ZmMFcKkETFR5dKJ4Q+Qy3SSXBodHfGi/fLTOy aye/8zsjoOkge5BkuaiygUp22XDmEAnW5INcDHSoyVcPsiwH4PwSzabkO3Ya2diFnpXg GKog== X-Forwarded-Encrypted: i=1; AJvYcCUQIhHZXot5mz7htEhyLVdx1ap7DZXub33xwpy+dH8Rob6OTZR2t4KdoTeEjGrdHqAV03Ktx/M=@lists.denx.de X-Gm-Message-State: AOJu0YzGtuoenPcMX2UYeV1chp7f8phLfCD6LYjiFffb1XMx05R4bH+k Qe0TBBSPK/y7PfGY+pquQZvf4ZvH03AN93AqS8xXA6yWoEw4AxhJsGt6je9hZns= X-Gm-Gg: ASbGnctio+pqGZZSOY+ecsncAYrDlSK/mD+ZCmULNtP1zOiOPagyUvn0cA4QYgQQ53p EkMeCJODGfYhnThPkvIQh4+/dcxIHi0DkqC3wsaode/3da6Dg1EKGhi6sIFoTy3LD9+GOIP5KEJ 5mMS2wNoxEF237q2nQfc8zh5fsm1a5kblNCoHQ9Mrn1pq+L3Cbr/lptf4fRxb/QAnqa4PUjGxPq d4wLmpjqecpi7pRrrizRv5Cc4lch7jefMmT+rYhSm/vysPPhGA7BFbQR0HMAwwM/i3rHrD6OB+p PmalJCA4nWV1+rdtSSvQx6Ao6A== X-Received: by 2002:a05:6402:4015:b0:5d0:9062:7dfe with SMTP id 4fb4d7f45d1cf-5d0906282a5mr3806548a12.15.1732777885734; Wed, 27 Nov 2024 23:11:25 -0800 (PST) Received: from localhost.localdomain (ppp089210064034.access.hol.gr. [89.210.64.34]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aa5999059b4sm32800866b.145.2024.11.27.23.11.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Nov 2024 23:11:25 -0800 (PST) From: Ilias Apalodimas To: xypron.glpk@gmx.de Cc: Ilias Apalodimas , Tom Rini , Masahisa Kojima , Simon Glass , Eddie James , Tim Harvey , Raymond Mao , u-boot@lists.denx.de Subject: [PATCH] efi_loader: Don't warn if the TCG2 FinalEvents table is not installed Date: Thu, 28 Nov 2024 09:11:20 +0200 Message-ID: <20241128071121.272072-1-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.45.2 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 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 --- 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 572c6b5bf630..a15c73162ee3 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);