For what it's worth, Linux 5.6 introduced openat2 [1] which accepts some additional flags controlling path resolution.
For example, RESOLVE_IN_ROOT "is as though the calling process had used chroot(2) to (temporarily) modify its root directory (to the directory referred to by dirfd)".