Do kernel and kernel modules have their own task_struct?
I know that in user space, both processes and threads have corresponding task_structs.
I've also found information that kthreads have their own task_structs, with mm_struct=NULL. But what I'm curious about is, do kernel and modules loaded via insmod/modprobe into the kernel also have their own task_structs? I'm asking this because I've been using Code:
current->nsproxy->mnt_ns I do that since I want to iterate all current mountpoints through access mnt_list in mount_namespace in my own kernel module And I found the implement like the function is_local_mountpoint in fs/namespace.c https://elixir.bootlin.com/linux/lat...mespace.c#L763 This has left me quite puzzled, so I'd like to ask for everyone's input. |
This question is way beyond me, but a web search turned up a number of articles that might be germane.
This one looks like a good starting point. |
All times are GMT -5. The time now is 04:59 AM. |