From patchwork Mon Aug 7 19:25:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eddie James X-Patchwork-Id: 711148 Delivered-To: patch@linaro.org Received: by 2002:a05:6359:d30:b0:129:c516:61db with SMTP id gp48csp1737061rwb; Mon, 7 Aug 2023 12:26:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEm5/yHNh69XxpuhLVb094t1SHPyfQ9rZy5bNObau8KWDMlj5VZeAH8MpPuSvauDfzCDyIR X-Received: by 2002:adf:f644:0:b0:317:f11e:82d9 with SMTP id x4-20020adff644000000b00317f11e82d9mr1580288wrp.3.1691436392162; Mon, 07 Aug 2023 12:26:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691436392; cv=none; d=google.com; s=arc-20160816; b=gb1dXmaHks+vVntzgyVc4QD13/AwspWNPuQlWlTmp053RVpkkkMC1QE1u7nDrN75s8 oHzqKbyF0M1cZ/HC3aOtHq72UxiXx0c2o0AVVJew0UroQ+poIqJqcawgOTJf4chzyWYh 5xdU6apyrXy9HtCt8r7GP04Cypwr0gxs5in0gHxiQTR4qoq2tTWRW6HoKgx5hXP1hICR r/S0stxwuxqo/fVmkTT0lVE+BygN7P50bQEJWrkn73+SKo3w1Xt1SyRl682ijlQYZ/Ya AjPYeB9hDDVAszjXXjS6j6gmn/R8VeBU5Ib+lkJhkDkNt61cZ+QFXXV9zxKfF9jGfJfn 4QjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=2PQle38MQviB/hclp2UI4YKllVhX2PhhDgVqXuBl8Bo=; fh=x3v0/GoXJuL1oFKziP5cRNs3+Fqz1zxSh3t+0A/5jr0=; b=yXDySXAHffkK99QvzcjgEx9Mhp3VhH02uIPDgha6haVKTLbqv9djzTwIpEs5ZLkqkw vh4+uIP7N8Y4wyLvnW8tgsjlM4hcQ727L72u4v33+7TZcQaQj6bUz06PrweTJoGzdr4O 5++acfRJA7bq1VfxRO4sm8J1+n7P1FreSjwwYe1ccAsdtTz3xrn0uooS1kTebcPqgGmj H372piZgX5CMnmjkWGFT8x+VezNwu+yRE2sT7TVuIgNdGa1Zm1vqEE3Xb7nwYiXs+8DC JRjfXlri1AqAc/+uIU8NRjzpaauy9e41BTgqG2g5MO7DHgRs1SaPfCtJI+PznzAFFnz+ 6nyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=VrQquEk2; 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=REJECT sp=NONE dis=NONE) header.from=ibm.com 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 t18-20020a5d5352000000b00317c63f35f3si3871499wrv.246.2023.08.07.12.26.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Aug 2023 12:26:32 -0700 (PDT) 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=@ibm.com header.s=pp1 header.b=VrQquEk2; 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=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 68F4D807C4; Mon, 7 Aug 2023 21:26:03 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=linux.ibm.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=ibm.com header.i=@ibm.com header.b="VrQquEk2"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BF80E807B6; Mon, 7 Aug 2023 21:26:00 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9BA7D807B6 for ; Mon, 7 Aug 2023 21:25:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=eajames@linux.ibm.com Received: from pps.filterd (m0353728.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 377JGXxt030587; Mon, 7 Aug 2023 19:25:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=2PQle38MQviB/hclp2UI4YKllVhX2PhhDgVqXuBl8Bo=; b=VrQquEk2gE2e17+8PywJ4JCI7Az3TDgUO5vfvisW62Isv8v8MWc9CBiOGEsxBarFYchd bp+h0EUUnJQHnEOANUCpYMCLbj4EUWLY94NrDw1rYuKQGURmZeYRs87xC+p5kxI3bFl3 1t39dACdQ18JSqwCVSvotFQ2prpsl8or8XlO43IOvocaHe7senGI4yi6NXC/T/7Al6FL ztOzGxvLXN/YsFn+GQLEVmuwPJ6/G1lU8H0GV7YBpKTNaObJh/U3iIjk63WPyQumhFdx utuGYai6mFoIyerMVUj1/D1u+0dECu1KHX1xyyvf0uKi7R2feGZPutiFayRBeFNmZj0x UA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3sb6mbg71u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Aug 2023 19:25:46 +0000 Received: from m0353728.ppops.net (m0353728.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 377JGpw3030934; Mon, 7 Aug 2023 19:25:46 GMT Received: from ppma13.dal12v.mail.ibm.com (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3sb6mbg71d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Aug 2023 19:25:46 +0000 Received: from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1]) by ppma13.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 377HmbRl015377; Mon, 7 Aug 2023 19:25:45 GMT Received: from smtprelay02.dal12v.mail.ibm.com ([172.16.1.4]) by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 3sb3f2hh83-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Aug 2023 19:25:45 +0000 Received: from smtpav03.dal12v.mail.ibm.com (smtpav03.dal12v.mail.ibm.com [10.241.53.102]) by smtprelay02.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 377JPiwK39322108 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 7 Aug 2023 19:25:44 GMT Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B4ED35803F; Mon, 7 Aug 2023 19:25:44 +0000 (GMT) Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 74D3E58061; Mon, 7 Aug 2023 19:25:44 +0000 (GMT) Received: from slate16.aus.stglabs.ibm.com (unknown [9.61.130.18]) by smtpav03.dal12v.mail.ibm.com (Postfix) with ESMTP; Mon, 7 Aug 2023 19:25:44 +0000 (GMT) From: Eddie James To: u-boot@lists.denx.de Cc: ilias.apalodimas@linaro.org, sjg@chromium.org, xypron.glpk@gmx.de, joel@jms.id.au, eajames@linux.ibm.com Subject: [PATCH v11 7/8] efi_loader: fix EFI_ENTRY point on get_active_pcr_banks Date: Mon, 7 Aug 2023 14:25:41 -0500 Message-Id: <20230807192542.90526-8-eajames@linux.ibm.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20230807192542.90526-1-eajames@linux.ibm.com> References: <20230807192542.90526-1-eajames@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 0U1y20ygtN5hu-yqor-zw6K0D3-G_1a1 X-Proofpoint-GUID: wB8cFkzU1ADDdtM3SKmQ-lxNj63nOAD2 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-08-07_21,2023-08-03_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 spamscore=0 priorityscore=1501 adultscore=0 clxscore=1015 mlxscore=0 bulkscore=0 phishscore=0 malwarescore=0 lowpriorityscore=0 impostorscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2308070174 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 efi_tcg2_get_active_pcr_banks doesn't immediately call the EFI_ENTRY() wrapper once it enters the function. Move the call a few lines above to cover the error cases properly as well. Signed-off-by: Ilias Apalodimas --- lib/efi_loader/efi_tcg2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/efi_loader/efi_tcg2.c b/lib/efi_loader/efi_tcg2.c index 5f0f4b5dd2..829bae7436 100644 --- a/lib/efi_loader/efi_tcg2.c +++ b/lib/efi_loader/efi_tcg2.c @@ -718,16 +718,16 @@ efi_tcg2_get_active_pcr_banks(struct efi_tcg2_protocol *this, struct udevice *dev; efi_status_t ret; + EFI_ENTRY("%p, %p", this, active_pcr_banks); + if (!this || !active_pcr_banks) { ret = EFI_INVALID_PARAMETER; goto out; } - ret = tcg2_platform_get_tpm2(&dev); if (ret != EFI_SUCCESS) goto out; - EFI_ENTRY("%p, %p", this, active_pcr_banks); ret = tcg2_get_active_pcr_banks(dev, active_pcr_banks); out: