]> git.baikalelectronics.ru Git - uboot.git/commitdiff
tpm2: ftpm: open session with privileged ree login
authorEtienne Carriere <etienne.carriere@linaro.org>
Wed, 7 Dec 2022 15:25:33 +0000 (16:25 +0100)
committerIlias Apalodimas <ilias.apalodimas@linaro.org>
Tue, 20 Dec 2022 07:37:36 +0000 (09:37 +0200)
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>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
drivers/tpm/tpm2_ftpm_tee.c

index 53e59f42b4fd0609f550171ca13ac55a71737c53..3c4c12983daad65ac0c4e4b74315818286ffe2c3 100644 (file)
@@ -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);