new helper: compat_user_stack_pointer()

Compat counterpart of current_user_stack_pointer(); for most of the biarch
architectures those two are identical, but e.g. arm64 and arm use different
registers for stack pointer...

Note that amd64 variants of current_user_stack_pointer/compat_user_stack_pointer
do *not* rely on pt_regs having been through FIXUP_TOP_OF_STACK.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro
2012-12-14 13:49:35 -05:00
parent 5c49574ffd
commit 9b064fc3f9
3 changed files with 13 additions and 2 deletions

View File

@@ -65,6 +65,9 @@
#endif /* CONFIG_HAVE_SYSCALL_WRAPPERS */
#ifndef compat_user_stack_pointer
#define compat_user_stack_pointer() current_user_stack_pointer()
#endif
#define compat_jiffies_to_clock_t(x) \
(((unsigned long)(x) * COMPAT_USER_HZ) / HZ)