Hello arm-soc maintainers,
Please pull this small OP-TEE driver fix which uses export_uuid() to copy
the client UUID instead of making asumptions about the internal format of
uuid_t.
Thanks,
Jens
The following changes since commit 6efb943b8616ec53a5e444193dccf1af9ad627b5:
Linux 5.13-rc1 (2021-05-09 14:17:44 -0700)
are available in the Git repository at:
git://git.linaro.org/people/jens.wiklander/linux-tee.git tags/optee-fix-for-v5.13
for you to fetch changes up to 673c7aa2436bfc857b92417f3e590a297c586dde:
optee: use export_uuid() to copy client UUID (2021-05-18 07:59:27 +0200)
----------------------------------------------------------------
OP-TEE use export_uuid() to copy UUID
----------------------------------------------------------------
Jens Wiklander (1):
optee: use export_uuid() to copy client UUID
drivers/tee/optee/call.c | 6 ++++--
drivers/tee/optee/optee_msg.h | 6 ++++--
2 files changed, 8 insertions(+), 4 deletions(-)
From: Allen Pais <apais(a)linux.microsoft.com>
The following out of memory errors are seen on kexec reboot
from the optee core.
[ 0.368428] tee_bnxt_fw optee-clnt0: tee_shm_alloc failed
[ 0.368461] tee_bnxt_fw: probe of optee-clnt0 failed with error -22
tee_shm_release() is not invoked on dma shm buffer.
Implement .shutdown() in optee core as well as bnxt firmware driver
to handle the release of the buffers correctly.
More info:
https://github.com/OP-TEE/optee_os/issues/3637
v2:
keep the .shutdown() method simple. [Jens Wiklander]
Allen Pais (2):
optee: fix tee out of memory failure seen during kexec reboot
firmware: tee_bnxt: implement shutdown method to handle kexec reboots
drivers/firmware/broadcom/tee_bnxt_fw.c | 9 +++++++++
drivers/tee/optee/core.c | 20 ++++++++++++++++++++
2 files changed, 29 insertions(+)
--
2.25.1
Hello arm-soc maintainers,
Please pull this AMDTEE driver fix which adds reference counting to
loaded TAs which is needed for proper life cycle management of TAs.
Note that this isn't a usual Arm driver update. This targets AMD instead,
but is part of the TEE subsystem.
Thanks,
Jens
The following changes since commit 9f4ad9e425a1d3b6a34617b8ea226d56a119a717:
Linux 5.12 (2021-04-25 13:49:08 -0700)
are available in the Git repository at:
git://git.linaro.org/people/jens.wiklander/linux-tee.git tags/amdtee-fixes-for-v5.13
for you to fetch changes up to 9f015b3765bf593b3ed5d3b588e409dc0ffa9f85:
tee: amdtee: unload TA only when its refcount becomes 0 (2021-05-05 13:00:11 +0200)
----------------------------------------------------------------
AMD-TEE reference count loaded TAs
----------------------------------------------------------------
Rijo Thomas (1):
tee: amdtee: unload TA only when its refcount becomes 0
drivers/tee/amdtee/amdtee_private.h | 13 +++++
drivers/tee/amdtee/call.c | 94 +++++++++++++++++++++++++++++++++----
drivers/tee/amdtee/core.c | 15 +++---
3 files changed, 106 insertions(+), 16 deletions(-)
From: Jerome Forissier <jerome(a)forissier.org>
[ Upstream commit c650b8dc7a7910eb25af0aac1720f778b29e679d ]
When Secure World returns, it may have changed the size attribute of the
memory references passed as [in/out] parameters. The GlobalPlatform TEE
Internal Core API specification does not restrict the values that this
size can take. In particular, Secure World may increase the value to be
larger than the size of the input buffer to indicate that it needs more.
Therefore, the size check in optee_from_msg_param() is incorrect and
needs to be removed. This fixes a number of failed test cases in the
GlobalPlatform TEE Initial Configuratiom Test Suite v2_0_0_0-2017_06_09
when OP-TEE is compiled without dynamic shared memory support
(CFG_CORE_DYN_SHM=n).
Reviewed-by: Sumit Garg <sumit.garg(a)linaro.org>
Suggested-by: Jens Wiklander <jens.wiklander(a)linaro.org>
Signed-off-by: Jerome Forissier <jerome(a)forissier.org>
Signed-off-by: Jens Wiklander <jens.wiklander(a)linaro.org>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/tee/optee/core.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c
index 834884c370c5..63187b07dde0 100644
--- a/drivers/tee/optee/core.c
+++ b/drivers/tee/optee/core.c
@@ -86,16 +86,6 @@ int optee_from_msg_param(struct tee_param *params, size_t num_params,
return rc;
p->u.memref.shm_offs = mp->u.tmem.buf_ptr - pa;
p->u.memref.shm = shm;
-
- /* Check that the memref is covered by the shm object */
- if (p->u.memref.size) {
- size_t o = p->u.memref.shm_offs +
- p->u.memref.size - 1;
-
- rc = tee_shm_get_pa(shm, o, NULL);
- if (rc)
- return rc;
- }
break;
default:
return -EINVAL;
--
2.30.2
From: Jerome Forissier <jerome(a)forissier.org>
[ Upstream commit c650b8dc7a7910eb25af0aac1720f778b29e679d ]
When Secure World returns, it may have changed the size attribute of the
memory references passed as [in/out] parameters. The GlobalPlatform TEE
Internal Core API specification does not restrict the values that this
size can take. In particular, Secure World may increase the value to be
larger than the size of the input buffer to indicate that it needs more.
Therefore, the size check in optee_from_msg_param() is incorrect and
needs to be removed. This fixes a number of failed test cases in the
GlobalPlatform TEE Initial Configuratiom Test Suite v2_0_0_0-2017_06_09
when OP-TEE is compiled without dynamic shared memory support
(CFG_CORE_DYN_SHM=n).
Reviewed-by: Sumit Garg <sumit.garg(a)linaro.org>
Suggested-by: Jens Wiklander <jens.wiklander(a)linaro.org>
Signed-off-by: Jerome Forissier <jerome(a)forissier.org>
Signed-off-by: Jens Wiklander <jens.wiklander(a)linaro.org>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/tee/optee/core.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c
index 2f254f957b0a..1d71fcb13dba 100644
--- a/drivers/tee/optee/core.c
+++ b/drivers/tee/optee/core.c
@@ -87,16 +87,6 @@ int optee_from_msg_param(struct tee_param *params, size_t num_params,
return rc;
p->u.memref.shm_offs = mp->u.tmem.buf_ptr - pa;
p->u.memref.shm = shm;
-
- /* Check that the memref is covered by the shm object */
- if (p->u.memref.size) {
- size_t o = p->u.memref.shm_offs +
- p->u.memref.size - 1;
-
- rc = tee_shm_get_pa(shm, o, NULL);
- if (rc)
- return rc;
- }
break;
case OPTEE_MSG_ATTR_TYPE_RMEM_INPUT:
case OPTEE_MSG_ATTR_TYPE_RMEM_OUTPUT:
--
2.30.2
From: Jerome Forissier <jerome(a)forissier.org>
[ Upstream commit c650b8dc7a7910eb25af0aac1720f778b29e679d ]
When Secure World returns, it may have changed the size attribute of the
memory references passed as [in/out] parameters. The GlobalPlatform TEE
Internal Core API specification does not restrict the values that this
size can take. In particular, Secure World may increase the value to be
larger than the size of the input buffer to indicate that it needs more.
Therefore, the size check in optee_from_msg_param() is incorrect and
needs to be removed. This fixes a number of failed test cases in the
GlobalPlatform TEE Initial Configuratiom Test Suite v2_0_0_0-2017_06_09
when OP-TEE is compiled without dynamic shared memory support
(CFG_CORE_DYN_SHM=n).
Reviewed-by: Sumit Garg <sumit.garg(a)linaro.org>
Suggested-by: Jens Wiklander <jens.wiklander(a)linaro.org>
Signed-off-by: Jerome Forissier <jerome(a)forissier.org>
Signed-off-by: Jens Wiklander <jens.wiklander(a)linaro.org>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/tee/optee/core.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c
index b830e0a87fba..ba6cfba589a6 100644
--- a/drivers/tee/optee/core.c
+++ b/drivers/tee/optee/core.c
@@ -78,16 +78,6 @@ int optee_from_msg_param(struct tee_param *params, size_t num_params,
return rc;
p->u.memref.shm_offs = mp->u.tmem.buf_ptr - pa;
p->u.memref.shm = shm;
-
- /* Check that the memref is covered by the shm object */
- if (p->u.memref.size) {
- size_t o = p->u.memref.shm_offs +
- p->u.memref.size - 1;
-
- rc = tee_shm_get_pa(shm, o, NULL);
- if (rc)
- return rc;
- }
break;
case OPTEE_MSG_ATTR_TYPE_RMEM_INPUT:
case OPTEE_MSG_ATTR_TYPE_RMEM_OUTPUT:
--
2.30.2
On Mon, 19 Apr 2021 12:30:51 +0000
Joakim Bech via OP-TEE <op-tee(a)lists.trustedfirmware.org> wrote:
> Hi,
>
> LOC monthly meeting is planned to take place Thursday April 29th(a)17.00
> (UTC+2).
>
> First, note that we have pushed the meeting forward one hour. If you
> subscribe to the meeting via the TrustedFirmware calendar, then your invite
> hopefully should've been updated (it could be worth cross checking).
>
> This month we will have Achin Gupta from Arm giving us an update regarding
> the evolution of FF-A and how that could work together with virtualization.
>
> Usually there is some time left over for other discussions. So if you
> have anything you'd like to talk about, then please let me know by replying
> to this email thread.
We at OMP would like to discuss GLOBEX - the REE/TEE synchronization mechanism
that we've proposed at https://github.com/OP-TEE/optee_os/issues/4539 .
It allows for sharing access to HW resources - something that came up
on the last contributors meeting.
We would like to present the design and hear your thoughts about it.
> Related to that, Linaro arranged an "OP-TEE readiness
> for safety" workshop last week. We're looking at all kinds of things
> related to that right now. But this is also something that we could touch
> in the LOC meeting. How would that affect upstream work? What code changes
> could we expect etc? Any expertise out there who would be interested in
> collaborating?
>
> OP-TEE 3.13.0 is planned to be released 2012-04-30, so in case you have any
> questions related to that, then the LOC meeting would be a good opportunity
> to ask.
>
> Meeting details:
> ---------------
> Date/time: Thursday April 29th(a)17.00 (UTC+2)
> https://everytimezone.com/s/c32cdcc3
> Connection details: https://www.trustedfirmware.org/meetings/
> Meeting notes: http://bit.ly/loc-notes
> Project page: https://www.linaro.org/projects#trusted-substrate_TS
>
> Regards,
> Joakim on behalf of the Linaro OP-TEE team