mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
x86: get rid of put_user_try in __setup_rt_frame() (both 32bit and 64bit)
Straightforward, except for save_altstack_ex() stuck in those. Replace that thing with an analogue that would use unsafe_put_user() instead of put_user_ex() (called compat_save_altstack()) and be done with that. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
57d563c829
commit
119cd59fcf
2 changed files with 51 additions and 46 deletions
|
@ -444,12 +444,12 @@ void signals_init(void);
|
|||
int restore_altstack(const stack_t __user *);
|
||||
int __save_altstack(stack_t __user *, unsigned long);
|
||||
|
||||
#define save_altstack_ex(uss, sp) do { \
|
||||
#define unsafe_save_altstack(uss, sp, label) do { \
|
||||
stack_t __user *__uss = uss; \
|
||||
struct task_struct *t = current; \
|
||||
put_user_ex((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((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