nuttx/fs
alexcekay 2688f948c7 fs/cromfs: Fix stale cache read in read() fast path.
cromfs_read()'s fast path decompresses a block directly into the
caller's buffer whenever a read reaches a block at its start and the
caller has room for the whole decompressed block, bypassing the
per-file decompression cache (ff_buffer). It nonetheless marked that
block as cached by setting ff_offset, without ever writing ff_buffer
itself.

A later read of the same block that fell onto the slow path trusted
that false cache tag, skipped decompression, and copied from
ff_buffer without it ever having been populated for that block. A
repeated identical fast-path read of the same block hit the same
false tag and skipped decompression entirely, leaving the caller's
buffer untouched and returning whatever was already there.

Fixed by having the fast path only read the cache, never populate it:
reuse ff_buffer when a prior slow-path read already cached the same
block, otherwise decompress straight into the caller's buffer without
touching ff_offset/ff_buffer.

Co-authored-by: Pavlo
Assisted-by: Claude Code:claude-sonnet-5
Signed-off-by: alexcekay <alexander@auterion.com>
2026-08-13 20:08:58 +08:00
..
aio !include/fcntl.h: align open flags with Linux values 2026-07-03 10:33:47 +08:00
binfs !include/fcntl.h: align open flags with Linux values 2026-07-03 10:33:47 +08:00
cromfs fs/cromfs: Fix stale cache read in read() fast path. 2026-08-13 20:08:58 +08:00
driver libs/libc: Fix divide-by-zero in stat() with large filesystem block sizes 2026-08-03 20:58:39 +08:00
event fs/event/open: fix the inode information update outside of lock 2026-01-28 10:03:06 +08:00
fat !include/fcntl.h: align open flags with Linux values 2026-07-03 10:33:47 +08:00
hostfs !include/fcntl.h: align open flags with Linux values 2026-07-03 10:33:47 +08:00
inode !include/fcntl.h: align open flags with Linux values 2026-07-03 10:33:47 +08:00
littlefs !include/fcntl.h: align open flags with Linux values 2026-07-03 10:33:47 +08:00
mmap !include/fcntl.h: align open flags with Linux values 2026-07-03 10:33:47 +08:00
mnemofs fs/mnemofs: Add mnemofs version 1 support. 2026-05-19 10:29:11 +08:00
mount drivers/: Multiple Drivers Are Registered With World Writable - Part 2 2026-08-03 17:23:22 +08:00
mqueue include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
nfs !include/fcntl.h: align open flags with Linux values 2026-07-03 10:33:47 +08:00
nxffs !include/fcntl.h: align open flags with Linux values 2026-07-03 10:33:47 +08:00
partition fs/partition: bound TXTABLE partition names 2026-07-06 19:57:26 +08:00
procfs fs/procfs: fix incorrect environ read for another task under CONFIG_ARCH_ADDRENV 2026-08-03 17:16:54 +08:00
romfs fs/romfs: fix node cache overflow in directories with >256 entries 2026-08-13 02:43:04 +08:00
rpmsgfs fs/dirent: add d_ino member to struct dirent 2026-08-03 20:58:39 +08:00
semaphore fs/semaphore/open: fix the inode information update outside of lock 2026-01-28 10:03:06 +08:00
shm !include/fcntl.h: align open flags with Linux values 2026-07-03 10:33:47 +08:00
smartfs !include/fcntl.h: align open flags with Linux values 2026-07-03 10:33:47 +08:00
socket include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
spiffs !include/fcntl.h: align open flags with Linux values 2026-07-03 10:33:47 +08:00
tmpfs !include/fcntl.h: align open flags with Linux values 2026-07-03 10:33:47 +08:00
unionfs include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
userfs include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
v9fs include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
vfs fs/vfs: provide link fallback without softlinks 2026-08-07 12:49:07 -03: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 mm/mm_heap: use struct mm_heap_config_s to init the memory heap 2026-01-19 14:18:27 +08:00
fs_heap.h fs_heap:add fs_heap_mallinfo_task 2025-01-15 17:12:50 +08:00
fs_initialize.c fs: Move inotify.c from fs/notify/ to fs/vfs/ 2025-06-23 18:17:10 -03:00
Kconfig fs/Kconfig: add CONFIG_FS_PERMISSION option 2026-05-14 09:35:36 -03:00
Makefile tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-08-04 00:36:32 +08:00