diff mbox series

tpm2: ftpm: open session with privileged ree login

Message ID 20221207152533.532974-1-etienne.carriere@linaro.org
State Accepted
Commit 33ba80303e93869c439828dd289fb8ef64ed3bfc
Delegated to: Ilias Apalodimas
Headers show
Series tpm2: ftpm: open session with privileged ree login | expand

Commit Message

Etienne Carriere Dec. 7, 2022, 3:25 p.m. UTC
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 <etienne.carriere@linaro.org>
---
 drivers/tpm/tpm2_ftpm_tee.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Ilias Apalodimas Dec. 12, 2022, 10:26 p.m. UTC | #1
On Wed, Dec 07, 2022 at 04:25:33PM +0100, Etienne Carriere wrote:
> 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 <etienne.carriere@linaro.org>
> ---
>  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);
> --
> 2.25.1
>

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
diff mbox series

Patch

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);