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.
如何process_name -> process_pid从内核模块获取所有对(用户空间和内核空间)的列表?
process_name -> process_pid
在您的内核模块中,您可以执行以下操作:
rcu_read_lock(); for_each_process(g) { printk("%s --> %d\n", g->comm, task_tgid_vnr(g)); } rcu_read_unlock();