nuttx/fs/inode
hujun5 90387a5b41 libc/misc: add fdsan module
FD (file descriptor) is widely used in system software development,
and almost all implementations of posix os (including nuttx) use FD as an index.
the value of fd needs to be allocated starting from the minimum available value of 3, and each process has a copy,
so the same fd value is very easy to reuse in the program.

In multi threaded or multi process environments without address isolation,
If the ownership, global variables, and competition relationships of fd are not properly handled,
there may be issues with fd duplication or accidental closure.
Further leading to the following issues, which are difficult to troubleshoot.

1. Security vulnerability: the fd we wrote is not the expected fd and will be accessed by hackers to obtain data
2. Program exceptions or crashes: write or read fd failures, and program logic errors
3. The structured file XML or database is damaged: the data format written to the database is not the expected format.

The implementation principle of fdsan is based on the implementation of Android
https://android.googlesource.com/platform/bionic/+/master/docs/fdsan.md

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-05-17 10:24:42 +08:00
..
fs_files.c libc/misc: add fdsan module 2023-05-17 10:24:42 +08:00
fs_foreachinode.c Replace all sprintf with snprintf 2023-05-08 09:57:01 +02:00
fs_inode.c Replace nxsem API when used as a lock with nxmutex API 2022-10-17 15:59:46 +09:00
fs_inodeaddref.c Replace nxsem API when used as a lock with nxmutex API 2022-10-17 15:59:46 +09:00
fs_inodebasename.c
fs_inodefind.c Replace nxsem API when used as a lock with nxmutex API 2022-10-17 15:59:46 +09:00
fs_inodefree.c
fs_inodegetpath.c fs/vfs: Add a new argument(size_t len) to inode_getpath 2023-05-08 09:57:01 +02:00
fs_inoderelease.c Replace nxsem API when used as a lock with nxmutex API 2022-10-17 15:59:46 +09:00
fs_inoderemove.c
fs_inodereserve.c fs: Allocate unique serial number for the root pseduo file system node 2022-09-20 16:21:06 +08:00
fs_inodesearch.c fs/inode: when searching for nextname skip "/" and "./" 2023-04-25 21:28:59 +08:00
inode.h fs/vfs: Add a new argument(size_t len) to inode_getpath 2023-05-08 09:57:01 +02:00
Make.defs