diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2020-02-16 02:39:17 +0300 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2020-03-19 07:37:49 +0300 |
commit | 39f16c1c0f14e9794545dbf6a64c909d5e16a2ea (patch) | |
tree | 59de340e4d1d2f09135223fb00581dcde327e491 /include/linux/compat.h | |
parent | d2d2728d161cbc52739d823a7fb76f3ba2fb3519 (diff) | |
download | linux-39f16c1c0f14e9794545dbf6a64c909d5e16a2ea.tar.xz |
x86: get rid of put_user_try in {ia32,x32}_setup_rt_frame()
Straightforward, except for compat_save_altstack_ex() stuck in those.
Replace that thing with an analogue that would use unsafe_put_user()
instead of put_user_ex() (called unsafe_compat_save_altstack()) and
be done with that...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/compat.h')
-rw-r--r-- | include/linux/compat.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/linux/compat.h b/include/linux/compat.h index 11083d84eb23..224ecb4fffd4 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h @@ -483,12 +483,13 @@ extern void __user *compat_alloc_user_space(unsigned long len); int compat_restore_altstack(const compat_stack_t __user *uss); int __compat_save_altstack(compat_stack_t __user *, unsigned long); -#define compat_save_altstack_ex(uss, sp) do { \ +#define unsafe_compat_save_altstack(uss, sp, label) do { \ compat_stack_t __user *__uss = uss; \ struct task_struct *t = current; \ - put_user_ex(ptr_to_compat((void __user *)t->sas_ss_sp), &__uss->ss_sp); \ - put_user_ex(t->sas_ss_flags, &__uss->ss_flags); \ - put_user_ex(t->sas_ss_size, &__uss->ss_size); \ + unsafe_put_user(ptr_to_compat((void __user *)t->sas_ss_sp), \ + &__uss->ss_sp, label); \ + unsafe_put_user(t->sas_ss_flags, &__uss->ss_flags, label); \ + unsafe_put_user(t->sas_ss_size, &__uss->ss_size, label); \ if (t->sas_ss_flags & SS_AUTODISARM) \ sas_ss_reset(t); \ } while (0); |