Since Linux 4.9 in X86, kernel changed the kernel stack by putting thread_info into task_struct and put current process into per_cpu section.
So it is NOT possible to get the current process in kernel through X86's SP register.
I am curious if there is still a way to get current process through CPU registers instead of using macro of get_current().
↧
How to get current process in Linux-4.9 (and above) through registers in X86_64?
↧