xnu

Retrieve path of process from OSX 10.10/10.11 kernel

南楼画角 提交于 2019-11-29 15:32:27
I would like to retrieve the path of a process from a PID in a kext, like so: Get name from PID? However, sys/proc_info.h and libproc.h are not available anymore (afaik). Is there any other way to retrieve proc_info for a process struct proc *p from a kext? The function that is supposed to return a process's main executable's vnode , proc_getexecutablevnode() is in the private KPI, which is only available to kexts published by Apple. The information it relies on is supposedly stored in the p_textvp field of struct proc , which once again is not part of the public ABI - Apple can choose to

Retrieve path of process from OSX 10.10/10.11 kernel

北慕城南 提交于 2019-11-28 09:06:45
问题 I would like to retrieve the path of a process from a PID in a kext, like so: Get name from PID? However, sys/proc_info.h and libproc.h are not available anymore (afaik). Is there any other way to retrieve proc_info for a process struct proc *p from a kext? 回答1: The function that is supposed to return a process's main executable's vnode , proc_getexecutablevnode() is in the private KPI, which is only available to kexts published by Apple. The information it relies on is supposedly stored in