mbox series

[pseudo,RFC,0/2] Implement new openat2 flags

Message ID 20261112184710.549482-1-mark.hatle@amd.com
Headers show
Series Implement new openat2 flags | expand

Message

Mark Hatle Nov. 12, 2026, 6:47 p.m. UTC
See [YOCTO #16327].  As reported the new Linux 7.2 includes both
O_EMPTYPATH and OPENAT2_REGULAR.

OPENAT2_REGULAR requires no changes, as the flag is passed to the
kernel and no local pseudo behavior changes are required.

O_EMPTYPATH requires minor changes, and also pointed out a behavior
inconsistency with the existing implementation where a blank dir
was expanded.

I do not have a Linux 7.2 or newer environment to test this on.  This
was implementated based on description, kernel source inspection and
man pages.

Sent as an RFC as I'm not able to directly run this on a newer kernel
and validate it is working.

Any review / test would be appreciated!

Mark Hatle (2):
  ports/linux: Pass an empty openat() path to the kernel
  openat2: Look at dirfd for an empty path

 makewrappers                       |  13 +++-
 ports/linux/guts/openat.c          |  21 ++++--
 ports/linux/openat2/guts/openat2.c |  24 +++++--
 ports/linux/wrapfuncs.in           |   8 +--
 test/test-openat-emptypath.c       | 105 +++++++++++++++++++++++++++++
 test/test-openat-emptypath.sh      |  12 ++++
 6 files changed, 166 insertions(+), 17 deletions(-)
 create mode 100644 test/test-openat-emptypath.c
 create mode 100755 test/test-openat-emptypath.sh