From patchwork Tue Dec 7 05:15:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 521615 Delivered-To: patch@linaro.org Received: by 2002:a05:6e04:2287:0:0:0:0 with SMTP id bl7csp5711181imb; Mon, 6 Dec 2021 21:11:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJyIqUNczrNZjSJmTics7sen2SvGm8W5IPjTW6YYXgs5NvzeSh0OETge0fCz5HOvqvBZjJvr X-Received: by 2002:a50:d710:: with SMTP id t16mr5687100edi.50.1638853877115; Mon, 06 Dec 2021 21:11:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1638853877; cv=none; d=google.com; s=arc-20160816; b=AjcK+bdg5LGuQTpW7tm4tN3IaT4e+g5X0B3zgwfPJhyUvBkDtJwxMGniC4VeJ/DS5F WkjsKvDZ5xoLNSi6flqoulP7LNTbb3FfSADQUy93I7Zr95NidVhGj9+ib8w6c28VuSQo rweBN3jvFca8HpkZnq4DEkPAMt031SMrYsTR8AjpNQnYuL+cKtU3AZV3cv65AFeNKnxE KCXAMS2WAn18+rLehqz0T4YDdY/AzQrdEFwIeehZiJh9MhHFqpcQ7TItJV8srseSaGlY wOAHCLvm4304zrWuxvbF0hRA79fkLplp+uaZSliDQu+kh2U3krKBxPPHODwmk0tGozGF 4icQ== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=uFZtJeCv5OR1Y8DtaL2KX0LfYQ+HQ8s2WHB5mwo+EAU=; b=t2+PPrhuFHO4/trEucw37Sn2l6J+/gheTBfp8lGTxsW7yBKOu74deFbghP8HMqlfUp 1qYqRdkXglxgnDKaaiW4lnBm03eFDljg9t3yWbVML4SPpLklWK/Jn9FO+0nmuZNFfWPI GaeeR6hUJKGz4ayiSiZC20RFjvb0uGMwkYn9RGGNJ3qzl3zIoKUDhheC4aKLPENNSQuK UiMrFU0bcm3XGwSz7kWC6D9Q1GjBfdLewML57JFp7GdUKzdssgad+9+htpWkcAcEkGOa ju+10lQI8w7g/Lx147ogLQFix5tvAUD7Ed/9BL5lsJgfaa1uNh8Dn/YVKSR53RDnGWWb OAhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vmO4T6RO; 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 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 dt15si24604456ejc.726.2021.12.06.21.11.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Dec 2021 21:11:17 -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=vmO4T6RO; 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 Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EA5C2830BC; Tue, 7 Dec 2021 06:11:15 +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="vmO4T6RO"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6E9F9830F5; Tue, 7 Dec 2021 06:11:14 +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,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) (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 20EBE83084 for ; Tue, 7 Dec 2021 06:11:11 +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=masahisa.kojima@linaro.org Received: by mail-pf1-x42c.google.com with SMTP id r130so12346351pfc.1 for ; Mon, 06 Dec 2021 21:11:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=uFZtJeCv5OR1Y8DtaL2KX0LfYQ+HQ8s2WHB5mwo+EAU=; b=vmO4T6ROeMWROB0yDWLtSSymN58EMmaLmLigf0vk0Akl+lBieDtKJEaM3nYM1mtC6s Y2e5OLfSaP0JDu0hwM5Pay/FTnSl8h0xJ+AgDdL6luIshQp/n7071cYBcLhR59iCBUqu /myvVgX74wIUQCFE9TOdBHxGWIv8JcUXrWpQHS9bR3QecT+w1C0ayGfidYYk5ptHKzbw x9LcbrfR69h0TrJPBgTfPxZhFpcOrYhGeXtQRPfhWuz5Kw0Xg5+IeTAqu0aY+Qk4LnlZ uGtE7v1plgDMqxzlTZ9/fEsdZtIBf+mdy/yMCXCbx65xNR/jWH40K0ICqtOTB0Ucxl3q r7yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=uFZtJeCv5OR1Y8DtaL2KX0LfYQ+HQ8s2WHB5mwo+EAU=; b=590Vt/eYD80EBsr2qWTgBURIbumYeAyscQkuIEp+pRDmtVTbjAJ1lr+OVsJJSRZc9F FT4mIrdN2hAXVMHZ7pTX77HD9bwwlaU/GIQp1oaUfT0ss/I6Ml7aqzRe1pTc+RIdEc4E gWm+XYrIo/MpvrsxRg0OQZJxCG6DPynEzmz80mCiy9tqHu2vMptmI63ro49jARbXnr+6 YiAxPxp+vgjQ9l+fJ+zSWxsDuobidrzpoRf+OtNCfcUh2qt5KGAGzTwalwzi0Im0rSPx p5vxonZQpo3YJph6JY36GrzMf1zED1KfirN6jpVheTUcscjSv1Jb+5Di/iqk9c2ZouQJ xNbA== X-Gm-Message-State: AOAM5330SwH49EDhxivZS1Bm7KB+r82MC1R3Mnc2GTNc8Jxe3ZVhWYIH wffEmMc+5Lp8vflFcTTFL9CONhzBmbQ+Ww== X-Received: by 2002:a62:15d0:0:b0:4a0:2dd5:ee4e with SMTP id 199-20020a6215d0000000b004a02dd5ee4emr41111504pfv.14.1638853869448; Mon, 06 Dec 2021 21:11:09 -0800 (PST) Received: from localhost.localdomain ([2400:2411:502:a100:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id q10sm11975516pfk.180.2021.12.06.21.11.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Dec 2021 21:11:09 -0800 (PST) From: Masahisa Kojima To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Masahisa Kojima Subject: [PATCH v2 0/3] fix TCG2 error handling Date: Tue, 7 Dec 2021 14:15:30 +0900 Message-Id: <20211207051533.5597-1-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.17.1 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 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 This series fix the efi_tcg2.c error handling. Masahisa Kojima (3): efi_loader: efi_tcg2_register returns appropriate error efi_loader: check tcg2 protocol installation outside the TCG protocol efi_loader: correctly handle no tpm device error include/efi_loader.h | 2 + lib/efi_loader/Kconfig | 2 + lib/efi_loader/efi_boottime.c | 9 ++-- lib/efi_loader/efi_image_loader.c | 13 +++-- lib/efi_loader/efi_setup.c | 4 ++ lib/efi_loader/efi_tcg2.c | 87 ++++++++++++++++++++++++------- 6 files changed, 91 insertions(+), 26 deletions(-)