RFC vfs: mkdirat_fd() syscall
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest2 patches 15 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | vfs: syscalls: add mkdirat_fd()arch/ fs/ fs/ +5 more | +38 | 15 replies | |
| 2/2 | selftest: add tests for mkdirat_fd()tools/ tools/ tools/ | +145 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/2] vfs: mkdirat_fd() syscall
This series implements the mkdirat_fd() syscall that was suggested over at the UAPI group kernel feature page [1] with some tests.
Obviously, if we want this we should also implement mknodeat_fd() and symlinkat_fd(), but their implementation can be done quite similar I believe.
I have added an unigned int flags like [2] suggests and an example flag that we may want to remove (it right now mainly serves an internal purpose). But it marks where I would want to place the definitions.
This has been compiled and tested on x86 only. [2] is a bit confusing here and there, so I hope I have added the proper syscall definitions everywhere where they needs to be added.
[1]: https://github.com/uapi-group/kernel-features?tab=readme-ov-file#race-free-creation-and-opening-of-non-file-inodes
[2]: https://www.kernel.org/doc/html/latest/process/adding-syscalls.html
Jori Koolstra (2):
vfs: syscalls: add mkdirat_fd()
selftest: add tests for mkdirat_fd()
arch/x86/entry/syscalls/syscall_64.tbl | 1 + fs/internal.h | 1 + fs/namei.c | 26 +++- include/linux/fcntl.h | 2 + include/linux/syscalls.h | 2 + include/uapi/asm-generic/fcntl.h | 3 + include/uapi/asm-generic/unistd.h | 5 +- scripts/syscall.tbl | 1 + tools/include/uapi/asm-generic/unistd.h | 5 +- tools/testing/selftests/filesystems/Makefile | 4 +- .../selftests/filesystems/mkdirat_fd_test.c | 139 ++++++++++++++++++ 11 files changed, 183 insertions(+), 6 deletions(-) create mode 100644 tools/testing/selftests/filesystems/mkdirat_fd_test.c
Signature · 1 line
2.53.0