Bug 16379 - Wrapper for open_tree missing
Summary: Wrapper for open_tree missing
Status: RESOLVED FIXED
Alias: None
Product: Pseudo
Classification: Yocto Project Subprojects
Component: pseudo (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 6.1
Assignee: Dmitry Sakhonchik
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2026-07-29 14:38 UTC by Richard Purdie
Modified: 2026-10-22 15:22 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Purdie 2026-07-29 14:38:17 UTC
Pseudo has no wrapper for open_tree (https://man7.org/linux/man-pages/man2/open_tree.2.html) and should have since it opens an fd.
Comment 1 Richard Purdie 2026-07-29 14:49:23 UTC
There is also open_tree_attr we need to add too. For the version which doesn't behave like openat, you need CAP_SYS_ADMIN so in most of our use cases, it would never success so is less likely to get called in the first place.
Comment 2 Dmitry Sakhonchik 2026-09-04 07:57:49 UTC
Do we need syscall implementation for this as well? 

glibc's open_tree() appeared only in glibc 2.36, while kernel supports it from 5.2, so syscall(SYS_open_tree) may be common use case.
Comment 3 Richard Purdie 2026-09-04 16:42:14 UTC
I was just looking at your patches, thanks! I think unless we find such usage in the wild, we probably don't need to do that.

The key thing is to make sure at least glibc is wrapped as hopefully most users would use that first over direct syscalls.
Comment 4 Dmitry Sakhonchik 2026-09-04 16:53:32 UTC
I was investigating the open_tree_attr thing and found out that add syscall coverage is easier than I expected, so I did it too. It helped me to find some drawbacks in my first implementation, so I think it won’t hurt.
Comment 5 Richard Purdie 2026-10-22 15:22:49 UTC
Thanks, Dmitry, sorry about the delays but we got there!

https://git.yoctoproject.org/pseudo/commit/?id=609e59be33bcc1d614f1347514a9ea4042b56f20