diff options
| author | Hirokazu Honda <hiroh@chromium.org> | 2026-04-16 15:18:19 -0700 |
|---|---|---|
| committer | Jens Wiklander <jens.wiklander@linaro.org> | 2026-04-27 14:13:14 +0200 |
| commit | 1a6e94a8ff32e7879effd1e4a45bf112e506edc1 (patch) | |
| tree | 050aa4753c295875da851cff0125212439b92d73 /drivers/tee | |
| parent | 028ef9c96e96197026887c0f092424679298aae8 (diff) | |
| download | lwn-1a6e94a8ff32e7879effd1e4a45bf112e506edc1.tar.gz lwn-1a6e94a8ff32e7879effd1e4a45bf112e506edc1.zip | |
tee: optee: Allow MT_NORMAL_TAGGED shared memory
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>
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'drivers/tee')
| -rw-r--r-- | drivers/tee/optee/call.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 |
