From patchwork Wed Dec 7 15:25:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Etienne Carriere X-Patchwork-Id: 631552 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp334243pvb; Wed, 7 Dec 2022 07:25:56 -0800 (PST) X-Google-Smtp-Source: AA0mqf58RSUIWZ2hWJ7LCXybQeTACWwpTs67rOtIEcU/JPjKQ+s/STr5B3g/iK7h9RSXYP8mf7pK X-Received: by 2002:a02:bb8f:0:b0:38a:760b:309c with SMTP id g15-20020a02bb8f000000b0038a760b309cmr77984jan.235.1670426755856; Wed, 07 Dec 2022 07:25:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670426755; cv=none; d=google.com; s=arc-20160816; b=bOw8MNC/Uovzxm0GNTtL39jIEw+Ed3qe74xYBELwj7e6oB3QtnYx81NdNYJRWQcySj Yh0aaX54ZYWB/hMRMphT2XHWeTJe0TqUyesPFnDgq+cq/kOWcc/x9otN3xrzN/HAR932 Sp4yZz5S8lBKBr84TDarfOZqtGJIYjwcSu/sC3d4Z5DYi5fL5+qhnfxYGECa9NIYvmTH 7HvC6/0QpdXaIg620IbAnzg37IBDyPC7cCtOIiWJY9i99REMi8kp4j++tZI0IOjkIRoI IZUePNIes/pIPIB/fEH7Pbwl+x/xkCBD1RZArbeDCvnL6tXFSb1OexojY7W0HNfmZ60S FMbg== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=UzNkHNbvcHCzhBJcgaqaimIsO34b+CK7jt/4ioacWTM=; b=Xdy1DY3KFS1KxBIA3faFQy8NO8zakaJHOdqfXZzirMIR8O2NZTu09ZiHx5zj2nNriM HumdIIci+lo5iPnTBjAH/XhR6KYuq0IyhqijVLHKg4qKO5kI4/y+3K6sis1ngPCO6NnD GNWMRxuCUaVkec+Lyr7Za3LyQc0nZUIjMf4FJGS7CI9wt6pIU1JDiHQciBcDlztJHgcZ 2cFw+5oDo6EA2sszGG0ldBieyPik4Dv859o1Zg1+q/k/q0ZhvsZ/uOQC7oB2hvNnOacu ELTEgGQpFaug6j6S8Mf7m/T2lmX0qSJ0hXM/81DbrtN+RzvrODuoZqPy4DTXXFeoxbWn jcjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qJGeMOkY; 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 b11-20020a5d894b000000b006dfba5714d9si9614744iot.63.2022.12.07.07.25.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Dec 2022 07:25:55 -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=qJGeMOkY; 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 13BA08517E; Wed, 7 Dec 2022 16:25:48 +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="qJGeMOkY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 332C48510E; Wed, 7 Dec 2022 16:25:47 +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,T_SPF_TEMPERROR autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) (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 DA3A485476 for ; Wed, 7 Dec 2022 16:25:41 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=etienne.carriere@linaro.org Received: by mail-wm1-x333.google.com with SMTP id l26so7662770wms.4 for ; Wed, 07 Dec 2022 07:25:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=UzNkHNbvcHCzhBJcgaqaimIsO34b+CK7jt/4ioacWTM=; b=qJGeMOkYqS/xWJU2zazo+N88QKcPZYDz1IcUmHHc88K/t7gLIyr4HF3n+hCjN0588v 4lmDcdR1WrvAOagRKRTlL4GAOiSOyHL1KKQW67t44CvOh7NlXL9ZXeAxa1H/x0J3XEX/ 54HpVa6e3R6ZiTddJ0ixtgU7GePp76Fw9mF8KC5AghJMFBAOqo8kgMOHyy7mdY/DOszk XZkWm47IafdEMQAeO2aOWDYifcUey6b4m1O6MW+rCJCN5T0wUUvKp0DibIDvdTtYGBZI 9tB12K1aKfBp6BEG4TnIqurgWpJMPuYJNXs4iIhz1WUmRyKdhy5l4k/Dk9cfigRy8VBJ TTbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=UzNkHNbvcHCzhBJcgaqaimIsO34b+CK7jt/4ioacWTM=; b=tQg7oh5yW1+hj1LTI3oLX8jNi8sPm0qAfkmzMTD8DYiulHHbHSKMJf4oMGPKzh5Qod U27f8aat4iilKeFdgDQUh/xU4ZR2B4B+YKolSlcQHI26r698jkehmA6cZHlHcstXGZ4C MrKgo4orZiPJa5/07gcwd+P0ZyGjZogOWLSXo0kbsSyiZnRUw6YbQVAqC7nw3ictuUit pk9LeSoyNyaKbNSy52iRtTnyDT6ouIr7Z0fMCo10VZ45taoyuZuqhtsUAzhCasDpV40u wGqVtpVnlHgolbyAfUIBu6qinhHQFU0Ft3rpxlxMbiCTZy8EbB3q+MgZcjykD7ILZnUR jASw== X-Gm-Message-State: ANoB5pmLV+7JUqUUsGU0VJqt40M+69iv9+16h67DktIBYpqnzjfweK/v XGNlHxhKKldoELi82Lc9eP+cRG1l15QpILc5 X-Received: by 2002:a05:600c:1e08:b0:3cf:8e62:f8fd with SMTP id ay8-20020a05600c1e0800b003cf8e62f8fdmr763662wmb.8.1670426741110; Wed, 07 Dec 2022 07:25:41 -0800 (PST) Received: from lmecxl1178.lme.st.com ([80.215.162.103]) by smtp.gmail.com with ESMTPSA id z13-20020a05600c220d00b003cf71b1f66csm2061673wml.0.2022.12.07.07.25.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Dec 2022 07:25:40 -0800 (PST) From: Etienne Carriere To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Etienne Carriere Subject: [PATCH] tpm2: ftpm: open session with privileged ree login Date: Wed, 7 Dec 2022 16:25:33 +0100 Message-Id: <20221207152533.532974-1-etienne.carriere@linaro.org> X-Mailer: git-send-email 2.25.1 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.6 at phobos.denx.de X-Virus-Status: Clean Opens the fTPM session with TEE_LOGIN_REE_KERNEL as fTPM may restrict access to that login when Linux based OS is running as applications are expected to got through the Linux TPMv2 driver. Signed-off-by: Etienne Carriere Reviewed-by: Ilias Apalodimas --- drivers/tpm/tpm2_ftpm_tee.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tpm/tpm2_ftpm_tee.c b/drivers/tpm/tpm2_ftpm_tee.c index 53e59f42b4..3c4c12983d 100644 --- a/drivers/tpm/tpm2_ftpm_tee.c +++ b/drivers/tpm/tpm2_ftpm_tee.c @@ -186,6 +186,7 @@ static int ftpm_tee_probe(struct udevice *dev) /* Open a session with the fTPM TA */ memset(&sess_arg, 0, sizeof(sess_arg)); + sess_arg.clnt_login = TEE_LOGIN_REE_KERNEL; tee_optee_ta_uuid_to_octets(sess_arg.uuid, &uuid); rc = tee_open_session(context->tee_dev, &sess_arg, 0, NULL);