walnux/fs/mmap
Theodore Karatapanis 95ca3e7ca5 drivers/misc/optee: Add mmap shm op + remove memfd
The previous approach with memfd has 3 problems:
1) The close operation on the memfd isn't tied with optee_shm_close,
   therefore close(fd) doesn't free the optee_shm struct allocated
   by the kernel.

2) The kernel unnecessarily maps the file descriptor to its memory,
   however only userspace should need to do that.

3) Since the kernel doesn't need to map the file descriptor we
   don't need to unmap it.

To use anonymous mapping, the prototype of map_anonymous() was
moved from fs/mmap/fs_anonmap.h to include/nuttx/fs/fs.h. Since
fs_anonmap.h didn't contain any other information it is deleted.

A type from fs/mmap/fs_rammap.h was moved to the public :
include/nuttx/fs/fs.h as well.

Signed-off-by: Theodore Karatapanis <tkaratapanis@census-labs.com>
2025-08-06 02:29:33 +08:00
..
CMakeLists.txt fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
fs_anonmap.c drivers/misc/optee: Add mmap shm op + remove memfd 2025-08-06 02:29:33 +08:00
fs_mmap.c drivers/misc/optee: Add mmap shm op + remove memfd 2025-08-06 02:29:33 +08:00
fs_mmisc.c fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
fs_msync.c fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
fs_munmap.c fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
fs_rammap.c fs/file: unify prefix about file_xxx api, like file_open, file_ioctl 2025-06-12 18:12:42 +08:00
fs_rammap.h fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
Kconfig fs/fs: remove unnecessary FS_REFCOUNT config 2025-06-12 18:12:42 +08:00
Make.defs fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00