Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
到目前为止,我看到的所有答案似乎都只是在用户空间内进行检查。我需要一种方法来检查内核空间,特别是在设备驱动程序中。我通过进程的 ioctl 调用获取与进程关联的 task_struct,因此我可以使用其中包含的所有信息。
注意:我正在寻找的进程正在用户空间中运行
这有帮助吗:
struct task_struct { volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ ... }