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.
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.
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.
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.
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.
Thanks, Dmitry, sorry about the delays but we got there! https://git.yoctoproject.org/pseudo/commit/?id=609e59be33bcc1d614f1347514a9ea4042b56f20