mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 06:32:08 +00:00
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>
This commit is contained in:
parent
d2d2728d16
commit
39f16c1c0f
3 changed files with 49 additions and 43 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue