Make exec_user_param() safe with SMEP and SMAP active
To make this safe, the iret must move straight from supervisor code/stack to
user code/stack. Therefore, the stack cannot be shared any more.
The existing user_stack[] can be used as the separate stack. This make the
exec_user_param() infrastructure no longer reentrant, but this isn't expected
to be a problem for tests.
A new .text.user section is introduced, which is automatically mapped as user
during setup.
The behaviour of exec_user_param() and X86_VEC_RET2KERN are altered to match.
exec_user_param() stores the supervisor stack in %rbp across the user
execution, and fakes up a return address as if it had simply called the user
code. X86_VEC_RET2KERN restores the stack from %rbp and follows the fake
return address to reenter exec_user_param()'s context.
Invocation of the user function call moves into exec_user_stub() which is
located inside .text.user. The 32bit version must pass all parameters in
registers, rather than on the stack.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>