Skip to content

RFC Implement new openat2 flags

Mark Hatle yocto-patches 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2ports/linux: Pass an empty openat() path to the kernelmakewrappers ports/linux/guts/openat.c ports/linux/wrapfuncs.in +2 more+121 -120 replies
2/2openat2: Look at dirfd for an empty pathports/linux/openat2/guts/openat2.c test/test-openat-emptypath.c+47 -70 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [pseudo][PATCH RFC 0/2] Implement new openat2 flags

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
Signature · 1 line
2.34.1