How can I get list of all pairs process_name -> process_pid (user space and kernel space) from kernel module?
In your kernel module, you can do something like this:
rcu_read_lock();
for_each_process(g) {
printk("%s --> %d\n", g->comm, task_tgid_vnr(g));
}
rcu_read_unlock();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With