walnux/drivers/misc
George Poulios 589c0e13b8 drivers/misc/optee: Cache coherency when MMU is disabled
When the MMU is disabled (CONFIG_ARCH_USE_MMU=n) the
data passed back and forth with the TEE needs to be
synced from/to the cache, otherwise we get random data
in either world.

Fix this by cleaning before a call and invalidating after.
This has to be done both on the optee msg arg, and the shm
buffers therein. Cleaning and invalidating the page list
used to describe non-contiguous shm buffers did not seem
mandatory in my tests, but common sense says that it should
be, so we do that too.

This fix does not apply to the optee msg arg of the socket
transport (optee_socket.c), as that one _should_ be handled
by the socket send/recv methods. It does apply to all shm
buffers though, regardless of transport.

Signed-off-by: George Poulios <gpoulios@census-labs.com>
2025-07-16 15:35:00 +08:00
..
addrenv.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
CMakeLists.txt drivers/misc/optee: Add SMC backend for arm archs 2025-05-09 10:29:26 +08:00
dev_ascii.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
dev_mem.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
dev_null.c drivers/iovec: revert vector io implement from loop/null/zero driver 2025-01-22 11:29:39 +08:00
dev_zero.c drivers/iovec: revert vector io implement from loop/null/zero driver 2025-01-22 11:29:39 +08:00
goldfish_pipe.c fs/drivers: Avoid causing a busy loop in the program due to context switching induced by sem_post. 2025-03-17 10:44:26 +01:00
Kconfig drivers/misc/optee: Add SMC backend for arm archs 2025-05-09 10:29:26 +08:00
lwl_console.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
Make.defs drivers/misc/optee: Add SMC backend for arm archs 2025-05-09 10:29:26 +08:00
mkrd.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
optee.c drivers/misc/optee: Cache coherency when MMU is disabled 2025-07-16 15:35:00 +08:00
optee.h drivers/misc/optee: Fix non-registered memory ref passing 2025-05-13 10:14:01 +08:00
optee_msg.h Remove @ and % tag from all comments 2023-12-11 17:00:10 -03:00
optee_smc.c drivers/misc/optee: Cache coherency when MMU is disabled 2025-07-16 15:35:00 +08:00
optee_smc.h drivers/misc/optee: Add SMC backend for arm archs 2025-05-09 10:29:26 +08:00
optee_socket.c drivers/misc/optee.c: Add shm registration support 2025-05-09 10:29:26 +08:00
ramdisk.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
rpmsgblk.c style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
rpmsgblk.h drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
rpmsgblk_server.c drivers/rpmsgblk_server: fix the syslog format warning 2025-03-03 07:37:13 +08:00
rpmsgdev.c style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
rpmsgdev.h drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
rpmsgdev_server.c drivers/misc: fix rpmsg dev poll assert crash 2024-11-12 14:58:53 +08:00
rwbuffer.c bch: add BIOC_DISCARD ioctl that discards cached sector 2025-01-23 02:35:46 +08:00