How the FreeBSD kernel layer obtains the absolute path of the relative path submitted by the user layer when syscall occurs.

recently I was looking at the FreeBSD source code and found such a problem.
for example, this function:

int
kern_openat(struct thread *td, int fd, char *path, enum uio_seg pathseg,
    int flags, int mode)

char* path is the relative path when accepting user-level data.
it is not possible to manipulate a file object if it cannot be converted to an absolute path.
but I haven"t been able to find out where the FreeBSD kernel can convert relative paths to absolute paths, so ask for a big tip or two to be familiar with the kernel.

Mar.20,2021
Menu