* [PATCH] tee: optee: Allow MT_NORMAL_TAGGED shared memory
@ 2026-04-16 22:18 Hirokazu Honda
2026-04-20 12:29 ` Sumit Garg
0 siblings, 1 reply; 4+ messages in thread
From: Hirokazu Honda @ 2026-04-16 22:18 UTC (permalink / raw)
To: jens.wiklander; +Cc: sumit.garg, op-tee, linux-kernel, hiroh
From: Hirokazu Honda <hiroh@chromium.org>
On ARM64, shared memory can have MT_NORMAL_TAGGED attribute when using
the Memory Tagging Extension (MTE). The OP-TEE driver needs to
recognize this as normal memory to allow sharing such buffers with the
Secure World.
Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
---
drivers/tee/optee/call.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/tee/optee/call.c b/drivers/tee/optee/call.c
index 9effe88049e9..e046aff61828 100644
--- a/drivers/tee/optee/call.c
+++ b/drivers/tee/optee/call.c
@@ -602,7 +602,8 @@ static bool is_normal_memory(pgprot_t p)
return (((pgprot_val(p) & L_PTE_MT_MASK) == L_PTE_MT_WRITEALLOC) ||
((pgprot_val(p) & L_PTE_MT_MASK) == L_PTE_MT_WRITEBACK));
#elif defined(CONFIG_ARM64)
- return (pgprot_val(p) & PTE_ATTRINDX_MASK) == PTE_ATTRINDX(MT_NORMAL);
+ return ((pgprot_val(p) & PTE_ATTRINDX_MASK) == PTE_ATTRINDX(MT_NORMAL)) ||
+ ((pgprot_val(p) & PTE_ATTRINDX_MASK) == PTE_ATTRINDX(MT_NORMAL_TAGGED));
#else
#error "Unsupported architecture"
#endif
--
2.54.0.rc1.513.gad8abe7a5a-goog
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tee: optee: Allow MT_NORMAL_TAGGED shared memory
2026-04-16 22:18 [PATCH] tee: optee: Allow MT_NORMAL_TAGGED shared memory Hirokazu Honda
@ 2026-04-20 12:29 ` Sumit Garg
2026-04-27 13:42 ` Jens Wiklander
0 siblings, 1 reply; 4+ messages in thread
From: Sumit Garg @ 2026-04-20 12:29 UTC (permalink / raw)
To: Hirokazu Honda; +Cc: jens.wiklander, op-tee, linux-kernel
On Thu, Apr 16, 2026 at 03:18:19PM -0700, Hirokazu Honda wrote:
> From: Hirokazu Honda <hiroh@chromium.org>
>
> On ARM64, shared memory can have MT_NORMAL_TAGGED attribute when using
> the Memory Tagging Extension (MTE). The OP-TEE driver needs to
> recognize this as normal memory to allow sharing such buffers with the
> Secure World.
>
> Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
> ---
> drivers/tee/optee/call.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
-Sumit
>
> diff --git a/drivers/tee/optee/call.c b/drivers/tee/optee/call.c
> index 9effe88049e9..e046aff61828 100644
> --- a/drivers/tee/optee/call.c
> +++ b/drivers/tee/optee/call.c
> @@ -602,7 +602,8 @@ static bool is_normal_memory(pgprot_t p)
> return (((pgprot_val(p) & L_PTE_MT_MASK) == L_PTE_MT_WRITEALLOC) ||
> ((pgprot_val(p) & L_PTE_MT_MASK) == L_PTE_MT_WRITEBACK));
> #elif defined(CONFIG_ARM64)
> - return (pgprot_val(p) & PTE_ATTRINDX_MASK) == PTE_ATTRINDX(MT_NORMAL);
> + return ((pgprot_val(p) & PTE_ATTRINDX_MASK) == PTE_ATTRINDX(MT_NORMAL)) ||
> + ((pgprot_val(p) & PTE_ATTRINDX_MASK) == PTE_ATTRINDX(MT_NORMAL_TAGGED));
> #else
> #error "Unsupported architecture"
> #endif
> --
> 2.54.0.rc1.513.gad8abe7a5a-goog
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tee: optee: Allow MT_NORMAL_TAGGED shared memory
2026-04-20 12:29 ` Sumit Garg
@ 2026-04-27 13:42 ` Jens Wiklander
2026-04-28 1:02 ` Hirokazu Honda
0 siblings, 1 reply; 4+ messages in thread
From: Jens Wiklander @ 2026-04-27 13:42 UTC (permalink / raw)
To: Sumit Garg; +Cc: Hirokazu Honda, op-tee, linux-kernel
Hi,
On Mon, Apr 20, 2026 at 2:29 PM Sumit Garg <sumit.garg@kernel.org> wrote:
>
> On Thu, Apr 16, 2026 at 03:18:19PM -0700, Hirokazu Honda wrote:
> > From: Hirokazu Honda <hiroh@chromium.org>
> >
> > On ARM64, shared memory can have MT_NORMAL_TAGGED attribute when using
> > the Memory Tagging Extension (MTE). The OP-TEE driver needs to
> > recognize this as normal memory to allow sharing such buffers with the
> > Secure World.
> >
> > Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
> > ---
> > drivers/tee/optee/call.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
>
> Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Looks good. I'm picking up this.
Cheers,
Jens
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tee: optee: Allow MT_NORMAL_TAGGED shared memory
2026-04-27 13:42 ` Jens Wiklander
@ 2026-04-28 1:02 ` Hirokazu Honda
0 siblings, 0 replies; 4+ messages in thread
From: Hirokazu Honda @ 2026-04-28 1:02 UTC (permalink / raw)
To: Jens Wiklander; +Cc: Sumit Garg, op-tee, linux-kernel
Thanks Sumit and Jens for reviewing!
On Mon, Apr 27, 2026 at 6:42 AM Jens Wiklander
<jens.wiklander@linaro.org> wrote:
>
> Hi,
>
> On Mon, Apr 20, 2026 at 2:29 PM Sumit Garg <sumit.garg@kernel.org> wrote:
> >
> > On Thu, Apr 16, 2026 at 03:18:19PM -0700, Hirokazu Honda wrote:
> > > From: Hirokazu Honda <hiroh@chromium.org>
> > >
> > > On ARM64, shared memory can have MT_NORMAL_TAGGED attribute when using
> > > the Memory Tagging Extension (MTE). The OP-TEE driver needs to
> > > recognize this as normal memory to allow sharing such buffers with the
> > > Secure World.
> > >
> > > Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
> > > ---
> > > drivers/tee/optee/call.c | 3 ++-
> > > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
>
> Looks good. I'm picking up this.
>
> Cheers,
> Jens
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-04-28 1:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-16 22:18 [PATCH] tee: optee: Allow MT_NORMAL_TAGGED shared memory Hirokazu Honda
2026-04-20 12:29 ` Sumit Garg
2026-04-27 13:42 ` Jens Wiklander
2026-04-28 1:02 ` Hirokazu Honda
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome