I am making a kernel extension for osx 10.11.x (El Capitan). Currently, I have got pid from proc_selfpid()
Then, I get process name from function proc_procname() Now, I need to get the path of process from pid but I cannot find any api in kernel space.