Kernel can't execute code in userspace

Hi everyone

I write a driver program to get a function address from a application program ,and execute the function .In dmesg it says"inter error:execute userspace…".Is it beacuse of PAN which prevent kernel space to access address in user space?Is there any solution to get out of the restriction?

You need implement a kernel driver to access kernel space.

I want access user space in kernel space

You can reference to the devmem2 tools as reference.