nuttx-mirror/fs
George Poulios 884b4604c2 Map user memory passed to accept() in kernel build
Fixes an issue in kernel build where the user addresses passed
to accept() would be accessed when the wrong MMU mappings were
active. A crash would manifest when attempting to accept() on a
TCP server socket for instance under significant load. The accept
event handler would be called by the HP worker upon client
connection. At this point, accept_tcpsender() would attempt to
write to `addr` resulting in a page fault. Reproducibility would
depend on the current system load (num tasks or CPU stress) but
in loaded environments, it would crash almost 100% of the times.

It should be noted that Linux does this the other way around: it
operates on kernel stack allocated data and once done, it copies
them to user. This can also be a viable alternative, albeit with
one extra copy and a little extra memory.

Signed-off-by: George Poulios <gpoulios@census-labs.com>
2024-12-20 00:57:40 +02:00
..
aio fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
binfs fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
cromfs fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
driver fs: add merge partitions support 2024-11-07 14:59:23 +08:00
event Fix path error 2024-11-28 15:04:59 +08:00
fat fs/fat/fs_fat32util.c: fix potential exception due to dividing zero during mounting when fat is corrupted 2024-12-13 11:22:54 +08:00
hostfs fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
inode fs: Move fl_lock to a more appropriate location. 2024-12-17 20:48:59 +08:00
littlefs fs/littlefs/Make.defs: fix a littlefs unpack regression 2024-12-16 17:09:16 +08:00
mmap fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
mnemofs fix nxstyle 2024-12-10 01:29:00 +08:00
mount fs_automount:fix ci break 2024-11-13 13:16:51 +08:00
mqueue arch_atomic: only support atomic_xx and atomic64_xx function 2024-12-04 14:03:14 +01:00
nfs fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
notify fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
nxffs fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
partition fs/partition/txtable: Fix panic when no txtable was found in last eraseblock 2024-11-26 18:23:06 +08:00
procfs procfs:add missing ',' to end of line 2024-12-19 14:47:32 +08:00
romfs fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
rpmsgfs Use lib_get_pathbuffer instead of stack variables 2024-11-12 17:21:42 +08:00
semaphore fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
shm fs/shm/shmfs_alloc.c: Allocate zero-initialized memory in flat build 2024-12-12 21:47:41 +08:00
smartfs fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
socket Map user memory passed to accept() in kernel build 2024-12-20 00:57:40 +02:00
spiffs fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
tmpfs fs/tmpfs: Skip any slash at the beginning of relpath 2024-12-07 11:40:00 +08:00
unionfs fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
userfs fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
v9fs Use lib_get_pathbuffer instead of stack variables 2024-11-12 17:21:42 +08:00
vfs arch_atomic: only support atomic_xx and atomic64_xx function 2024-12-04 14:03:14 +01:00
zipfs fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
CMakeLists.txt fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
fs_heap.c fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
fs_heap.h fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
fs_initialize.c fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
Kconfig fs/reference_count: set default reference count option depends on DISABLE_PTHREAD 2024-12-12 13:47:22 +08:00
Make.defs fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
Makefile fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00