Accessing process stack pointer from kernel space
Clash Royale CLAN TAG #URR8PPP Accessing process stack pointer from kernel space I was able to get task_struct from current macro and am wondering if there is a way to get the process stack pointer from my custom sys_call to return to userspace(as readonly value)?? You have to tell what your custom sys_call does? – LethalProgrammer 6 hours ago 1 Answer 1 It's easy to get it's value in assembly, so try using this: #include <stdint.h> uint64_t getsp(void) { uint64_t sp; asm("mov %%rsp, %0" : "=rm" (sp)); return sp; } By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that you...