In order to get access to the RSP value during system call and trap processing,
code needs access to the old_rsp per-cpu variable. Since we use this from a
kernel module, it needs to be exported (it is only accessible through macros -
there isn't an accessor function exported anywhere for it).
Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
int pcstack_limit)
{
struct task_struct *p = current;
- unsigned long *sp = (unsigned long *)p->thread.usersp;
+ unsigned long *sp = (unsigned long *)this_cpu_read(old_rsp);
unsigned long *bos = (unsigned long *)p->mm->start_stack;
struct vm_area_struct *stack_vma = find_vma(p->mm, p->thread.usersp);