diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2020-03-28 11:57:02 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2020-03-28 11:57:02 +0100 |
commit | a2150327250efa866c412caee84aaf05ebff9a8f (patch) | |
tree | 2eb16c56cb456104c0f14a4ed9118d52635358a8 /include/linux/compat.h | |
parent | 5bacdc0982f2b343afa5adbb80517d3392a7e357 (diff) | |
parent | cf122cfba5b1d9daf64009d143f51dfec4b1705a (diff) | |
download | linux-next-a2150327250efa866c412caee84aaf05ebff9a8f.tar.gz |
Merge branch 'next.uaccess-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs into x86/cleanups
Pull uaccess cleanups from Al Viro:
Consolidate the user access areas and get rid of uaccess_try(), user_ex()
and other warts.
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); |