Quantcast
Channel: Active questions tagged linux-kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 12241

How to get current process in Linux-4.9 (and above) through registers in X86_64?

$
0
0

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().


Viewing all articles
Browse latest Browse all 12241

Trending Articles