Bug 16327

Summary: Handle new openat2 flags in pseudo
Product: [Yocto Project Subprojects] Pseudo Reporter: Paul Barker <paul>
Component: pseudoAssignee: Mark Hatle <mark.hatle>
Status: NEW --- QA Contact:
Severity: normal    
Priority: Medium CC: tim.orling, yp.pseudo.watcher, yp.watcher
Version: unspecified   
Target Milestone: 6.1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Paul Barker 2026-06-19 09:17:12 UTC
This is very much **not urgent**, but capturing it now that I've seen it.

According to LWN (https://lwn.net/Articles/1078068/), Linux 7.2 will include:

- The openat2() system call supports a new flag called O_EMPTYPATH. It exists for a specific purpose: to allow a process to reopen an O_PATH file descriptor to gain access to the file behind it. With O_EMPTYPATH, an empty path name can be given to openat2(), and the given file descriptor will be used to find the file to (re)open.

- Also new to openat2() is the OPENAT2_REGULAR flag, which will cause an open to fail if the target is not a regular file. The return code in the failure case is a new (to Linux) one: EFTYPE. This flag is meant to be a hardening feature to prevent programs from being manipulated into opening special files.