casaroli opened a new pull request, #20754: URL: https://github.com/apache/nuttx/pull/20754
## Summary FAT has no execute permission. `fat_stat()` and `fat_fstat()` reported `r--r--r--` or `rw-rw-rw-` for every file and directory, also for the root directory. So a program on a FAT volume had no execute bit, and no directory had the search bit. This PR reports the execute bit for all files and directories, in the same way as the read bit. Other systems mount FAT with these bits by default. ## Impact Only the mode that `stat()` reports changes. With `CONFIG_SCHED_USER_IDENTITY`, `exec()` checks the execute bit, so with this PR a program on a FAT volume can run instead of failing with `EACCES`. ## Testing A test on `qemu-armv8a:nsh` (QEMU 11 with HVF on an Apple M4) with FAT, `mkfatfs`, `mkrd` and `CONFIG_PSEUDOFS_FILE`: a FAT RAM disk with a file and a directory, a pseudo file, then `ls -l` of `/fat`, `/`, `/proc` and the pseudo file, on master and with this PR. | Path | master | this PR | |---|---|---| | file on FAT | `-rw-rw-rw-` | `-rwxrwxrwx` | | directory on FAT, FAT root | `drw-rw-rw-` | `drwxrwxrwx` | `tools/checkpatch.sh -c -u -m -g` passes. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
