2 * Copyright (C) 1991, 1992 Linus Torvalds
3 * Copyright (C) 2000, 2001, 2002 Andi Kleen SuSE Labs
5 * 1997-11-28 Modified for POSIX.1b signals by Richard Henderson
6 * 2000-06-20 Pentium III FXSR, SSE support by Gareth Hughes
7 * 2000-2002 x86-64 support by Andi Kleen
10 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
12 #include <linux/sched.h>
14 #include <linux/smp.h>
15 #include <linux/kernel.h>
16 #include <linux/errno.h>
17 #include <linux/wait.h>
18 #include <linux/tracehook.h>
19 #include <linux/unistd.h>
20 #include <linux/stddef.h>
21 #include <linux/personality.h>
22 #include <linux/uaccess.h>
23 #include <linux/user-return-notifier.h>
24 #include <linux/uprobes.h>
25 #include <linux/context_tracking.h>
27 #include <asm/processor.h>
28 #include <asm/ucontext.h>
29 #include <asm/fpu/internal.h>
30 #include <asm/fpu/signal.h>
33 #include <asm/sighandling.h>
37 #include <asm/proto.h>
38 #include <asm/ia32_unistd.h>
39 #endif /* CONFIG_X86_64 */
41 #include <asm/syscall.h>
42 #include <asm/syscalls.h>
44 #include <asm/sigframe.h>
46 #define COPY(x) do { \
47 get_user_ex(regs->x, &sc->x); \
50 #define GET_SEG(seg) ({ \
52 get_user_ex(tmp, &sc->seg); \
56 #define COPY_SEG(seg) do { \
57 regs->seg = GET_SEG(seg); \
60 #define COPY_SEG_CPL3(seg) do { \
61 regs->seg = GET_SEG(seg) | 3; \
64 int restore_sigcontext(struct pt_regs
*regs
, struct sigcontext __user
*sc
)
66 unsigned long buf_val
;
68 unsigned int tmpflags
;
71 /* Always make any pending restarted system calls return -EINTR */
72 current
->restart_block
.fn
= do_no_restart_syscall
;
77 set_user_gs(regs
, GET_SEG(gs
));
81 #endif /* CONFIG_X86_32 */
83 COPY(di
); COPY(si
); COPY(bp
); COPY(sp
); COPY(bx
);
84 COPY(dx
); COPY(cx
); COPY(ip
); COPY(ax
);
95 #endif /* CONFIG_X86_64 */
100 #else /* !CONFIG_X86_32 */
101 /* Kernel saves and restores only the CS segment register on signals,
102 * which is the bare minimum needed to allow mixed 32/64-bit code.
103 * App's signal handler can save/restore other segments if needed. */
105 #endif /* CONFIG_X86_32 */
107 get_user_ex(tmpflags
, &sc
->flags
);
108 regs
->flags
= (regs
->flags
& ~FIX_EFLAGS
) | (tmpflags
& FIX_EFLAGS
);
109 regs
->orig_ax
= -1; /* disable syscall checks */
111 get_user_ex(buf_val
, &sc
->fpstate
);
112 buf
= (void __user
*)buf_val
;
113 } get_user_catch(err
);
115 err
|= fpu__restore_sig(buf
, config_enabled(CONFIG_X86_32
));
122 int setup_sigcontext(struct sigcontext __user
*sc
, void __user
*fpstate
,
123 struct pt_regs
*regs
, unsigned long mask
)
130 put_user_ex(get_user_gs(regs
), (unsigned int __user
*)&sc
->gs
);
131 put_user_ex(regs
->fs
, (unsigned int __user
*)&sc
->fs
);
132 put_user_ex(regs
->es
, (unsigned int __user
*)&sc
->es
);
133 put_user_ex(regs
->ds
, (unsigned int __user
*)&sc
->ds
);
134 #endif /* CONFIG_X86_32 */
136 put_user_ex(regs
->di
, &sc
->di
);
137 put_user_ex(regs
->si
, &sc
->si
);
138 put_user_ex(regs
->bp
, &sc
->bp
);
139 put_user_ex(regs
->sp
, &sc
->sp
);
140 put_user_ex(regs
->bx
, &sc
->bx
);
141 put_user_ex(regs
->dx
, &sc
->dx
);
142 put_user_ex(regs
->cx
, &sc
->cx
);
143 put_user_ex(regs
->ax
, &sc
->ax
);
145 put_user_ex(regs
->r8
, &sc
->r8
);
146 put_user_ex(regs
->r9
, &sc
->r9
);
147 put_user_ex(regs
->r10
, &sc
->r10
);
148 put_user_ex(regs
->r11
, &sc
->r11
);
149 put_user_ex(regs
->r12
, &sc
->r12
);
150 put_user_ex(regs
->r13
, &sc
->r13
);
151 put_user_ex(regs
->r14
, &sc
->r14
);
152 put_user_ex(regs
->r15
, &sc
->r15
);
153 #endif /* CONFIG_X86_64 */
155 put_user_ex(current
->thread
.trap_nr
, &sc
->trapno
);
156 put_user_ex(current
->thread
.error_code
, &sc
->err
);
157 put_user_ex(regs
->ip
, &sc
->ip
);
159 put_user_ex(regs
->cs
, (unsigned int __user
*)&sc
->cs
);
160 put_user_ex(regs
->flags
, &sc
->flags
);
161 put_user_ex(regs
->sp
, &sc
->sp_at_signal
);
162 put_user_ex(regs
->ss
, (unsigned int __user
*)&sc
->ss
);
163 #else /* !CONFIG_X86_32 */
164 put_user_ex(regs
->flags
, &sc
->flags
);
165 put_user_ex(regs
->cs
, &sc
->cs
);
166 put_user_ex(0, &sc
->gs
);
167 put_user_ex(0, &sc
->fs
);
168 #endif /* CONFIG_X86_32 */
170 put_user_ex(fpstate
, &sc
->fpstate
);
172 /* non-iBCS2 extensions.. */
173 put_user_ex(mask
, &sc
->oldmask
);
174 put_user_ex(current
->thread
.cr2
, &sc
->cr2
);
175 } put_user_catch(err
);
181 * Set up a signal frame.
185 * Determine which stack to use..
187 static unsigned long align_sigframe(unsigned long sp
)
191 * Align the stack pointer according to the i386 ABI,
192 * i.e. so that on function entry ((sp + 4) & 15) == 0.
194 sp
= ((sp
+ 4) & -16ul) - 4;
195 #else /* !CONFIG_X86_32 */
196 sp
= round_down(sp
, 16) - 8;
202 get_sigframe(struct k_sigaction
*ka
, struct pt_regs
*regs
, size_t frame_size
,
203 void __user
**fpstate
)
205 /* Default to using normal stack */
206 unsigned long math_size
= 0;
207 unsigned long sp
= regs
->sp
;
208 unsigned long buf_fx
= 0;
209 int onsigstack
= on_sig_stack(sp
);
210 struct fpu
*fpu
= ¤t
->thread
.fpu
;
213 if (config_enabled(CONFIG_X86_64
))
217 /* This is the X/Open sanctioned signal stack switching. */
218 if (ka
->sa
.sa_flags
& SA_ONSTACK
) {
219 if (current
->sas_ss_size
)
220 sp
= current
->sas_ss_sp
+ current
->sas_ss_size
;
221 } else if (config_enabled(CONFIG_X86_32
) &&
222 (regs
->ss
& 0xffff) != __USER_DS
&&
223 !(ka
->sa
.sa_flags
& SA_RESTORER
) &&
224 ka
->sa
.sa_restorer
) {
225 /* This is the legacy signal stack switching. */
226 sp
= (unsigned long) ka
->sa
.sa_restorer
;
230 if (fpu
->fpstate_active
) {
231 sp
= fpu__alloc_mathframe(sp
, config_enabled(CONFIG_X86_32
),
232 &buf_fx
, &math_size
);
233 *fpstate
= (void __user
*)sp
;
236 sp
= align_sigframe(sp
- frame_size
);
239 * If we are on the alternate signal stack and would overflow it, don't.
240 * Return an always-bogus address instead so we will die with SIGSEGV.
242 if (onsigstack
&& !likely(on_sig_stack(sp
)))
243 return (void __user
*)-1L;
245 /* save i387 and extended state */
246 if (fpu
->fpstate_active
&&
247 copy_fpstate_to_sigframe(*fpstate
, (void __user
*)buf_fx
, math_size
) < 0)
248 return (void __user
*)-1L;
250 return (void __user
*)sp
;
254 static const struct {
258 } __attribute__((packed
)) retcode
= {
259 0xb858, /* popl %eax; movl $..., %eax */
261 0x80cd, /* int $0x80 */
264 static const struct {
269 } __attribute__((packed
)) rt_retcode
= {
270 0xb8, /* movl $..., %eax */
272 0x80cd, /* int $0x80 */
277 __setup_frame(int sig
, struct ksignal
*ksig
, sigset_t
*set
,
278 struct pt_regs
*regs
)
280 struct sigframe __user
*frame
;
281 void __user
*restorer
;
283 void __user
*fpstate
= NULL
;
285 frame
= get_sigframe(&ksig
->ka
, regs
, sizeof(*frame
), &fpstate
);
287 if (!access_ok(VERIFY_WRITE
, frame
, sizeof(*frame
)))
290 if (__put_user(sig
, &frame
->sig
))
293 if (setup_sigcontext(&frame
->sc
, fpstate
, regs
, set
->sig
[0]))
296 if (_NSIG_WORDS
> 1) {
297 if (__copy_to_user(&frame
->extramask
, &set
->sig
[1],
298 sizeof(frame
->extramask
)))
302 if (current
->mm
->context
.vdso
)
303 restorer
= current
->mm
->context
.vdso
+
304 vdso_image_32
.sym___kernel_sigreturn
;
306 restorer
= &frame
->retcode
;
307 if (ksig
->ka
.sa
.sa_flags
& SA_RESTORER
)
308 restorer
= ksig
->ka
.sa
.sa_restorer
;
310 /* Set up to return from userspace. */
311 err
|= __put_user(restorer
, &frame
->pretcode
);
314 * This is popl %eax ; movl $__NR_sigreturn, %eax ; int $0x80
316 * WE DO NOT USE IT ANY MORE! It's only left here for historical
317 * reasons and because gdb uses it as a signature to notice
318 * signal handler stack frames.
320 err
|= __put_user(*((u64
*)&retcode
), (u64
*)frame
->retcode
);
325 /* Set up registers for signal handler */
326 regs
->sp
= (unsigned long)frame
;
327 regs
->ip
= (unsigned long)ksig
->ka
.sa
.sa_handler
;
328 regs
->ax
= (unsigned long)sig
;
332 regs
->ds
= __USER_DS
;
333 regs
->es
= __USER_DS
;
334 regs
->ss
= __USER_DS
;
335 regs
->cs
= __USER_CS
;
340 static int __setup_rt_frame(int sig
, struct ksignal
*ksig
,
341 sigset_t
*set
, struct pt_regs
*regs
)
343 struct rt_sigframe __user
*frame
;
344 void __user
*restorer
;
346 void __user
*fpstate
= NULL
;
348 frame
= get_sigframe(&ksig
->ka
, regs
, sizeof(*frame
), &fpstate
);
350 if (!access_ok(VERIFY_WRITE
, frame
, sizeof(*frame
)))
354 put_user_ex(sig
, &frame
->sig
);
355 put_user_ex(&frame
->info
, &frame
->pinfo
);
356 put_user_ex(&frame
->uc
, &frame
->puc
);
358 /* Create the ucontext. */
360 put_user_ex(UC_FP_XSTATE
, &frame
->uc
.uc_flags
);
362 put_user_ex(0, &frame
->uc
.uc_flags
);
363 put_user_ex(0, &frame
->uc
.uc_link
);
364 save_altstack_ex(&frame
->uc
.uc_stack
, regs
->sp
);
366 /* Set up to return from userspace. */
367 restorer
= current
->mm
->context
.vdso
+
368 vdso_image_32
.sym___kernel_rt_sigreturn
;
369 if (ksig
->ka
.sa
.sa_flags
& SA_RESTORER
)
370 restorer
= ksig
->ka
.sa
.sa_restorer
;
371 put_user_ex(restorer
, &frame
->pretcode
);
374 * This is movl $__NR_rt_sigreturn, %ax ; int $0x80
376 * WE DO NOT USE IT ANY MORE! It's only left here for historical
377 * reasons and because gdb uses it as a signature to notice
378 * signal handler stack frames.
380 put_user_ex(*((u64
*)&rt_retcode
), (u64
*)frame
->retcode
);
381 } put_user_catch(err
);
383 err
|= copy_siginfo_to_user(&frame
->info
, &ksig
->info
);
384 err
|= setup_sigcontext(&frame
->uc
.uc_mcontext
, fpstate
,
386 err
|= __copy_to_user(&frame
->uc
.uc_sigmask
, set
, sizeof(*set
));
391 /* Set up registers for signal handler */
392 regs
->sp
= (unsigned long)frame
;
393 regs
->ip
= (unsigned long)ksig
->ka
.sa
.sa_handler
;
394 regs
->ax
= (unsigned long)sig
;
395 regs
->dx
= (unsigned long)&frame
->info
;
396 regs
->cx
= (unsigned long)&frame
->uc
;
398 regs
->ds
= __USER_DS
;
399 regs
->es
= __USER_DS
;
400 regs
->ss
= __USER_DS
;
401 regs
->cs
= __USER_CS
;
405 #else /* !CONFIG_X86_32 */
406 static int __setup_rt_frame(int sig
, struct ksignal
*ksig
,
407 sigset_t
*set
, struct pt_regs
*regs
)
409 struct rt_sigframe __user
*frame
;
410 void __user
*fp
= NULL
;
413 frame
= get_sigframe(&ksig
->ka
, regs
, sizeof(struct rt_sigframe
), &fp
);
415 if (!access_ok(VERIFY_WRITE
, frame
, sizeof(*frame
)))
418 if (ksig
->ka
.sa
.sa_flags
& SA_SIGINFO
) {
419 if (copy_siginfo_to_user(&frame
->info
, &ksig
->info
))
424 /* Create the ucontext. */
426 put_user_ex(UC_FP_XSTATE
, &frame
->uc
.uc_flags
);
428 put_user_ex(0, &frame
->uc
.uc_flags
);
429 put_user_ex(0, &frame
->uc
.uc_link
);
430 save_altstack_ex(&frame
->uc
.uc_stack
, regs
->sp
);
432 /* Set up to return from userspace. If provided, use a stub
433 already in userspace. */
434 /* x86-64 should always use SA_RESTORER. */
435 if (ksig
->ka
.sa
.sa_flags
& SA_RESTORER
) {
436 put_user_ex(ksig
->ka
.sa
.sa_restorer
, &frame
->pretcode
);
438 /* could use a vstub here */
441 } put_user_catch(err
);
443 err
|= setup_sigcontext(&frame
->uc
.uc_mcontext
, fp
, regs
, set
->sig
[0]);
444 err
|= __copy_to_user(&frame
->uc
.uc_sigmask
, set
, sizeof(*set
));
449 /* Set up registers for signal handler */
451 /* In case the signal handler was declared without prototypes */
454 /* This also works for non SA_SIGINFO handlers because they expect the
455 next argument after the signal number on the stack. */
456 regs
->si
= (unsigned long)&frame
->info
;
457 regs
->dx
= (unsigned long)&frame
->uc
;
458 regs
->ip
= (unsigned long) ksig
->ka
.sa
.sa_handler
;
460 regs
->sp
= (unsigned long)frame
;
462 /* Set up the CS register to run signal handlers in 64-bit mode,
463 even if the handler happens to be interrupting 32-bit code. */
464 regs
->cs
= __USER_CS
;
468 #endif /* CONFIG_X86_32 */
470 static int x32_setup_rt_frame(struct ksignal
*ksig
,
471 compat_sigset_t
*set
,
472 struct pt_regs
*regs
)
474 #ifdef CONFIG_X86_X32_ABI
475 struct rt_sigframe_x32 __user
*frame
;
476 void __user
*restorer
;
478 void __user
*fpstate
= NULL
;
480 frame
= get_sigframe(&ksig
->ka
, regs
, sizeof(*frame
), &fpstate
);
482 if (!access_ok(VERIFY_WRITE
, frame
, sizeof(*frame
)))
485 if (ksig
->ka
.sa
.sa_flags
& SA_SIGINFO
) {
486 if (copy_siginfo_to_user32(&frame
->info
, &ksig
->info
))
491 /* Create the ucontext. */
493 put_user_ex(UC_FP_XSTATE
, &frame
->uc
.uc_flags
);
495 put_user_ex(0, &frame
->uc
.uc_flags
);
496 put_user_ex(0, &frame
->uc
.uc_link
);
497 compat_save_altstack_ex(&frame
->uc
.uc_stack
, regs
->sp
);
498 put_user_ex(0, &frame
->uc
.uc__pad0
);
500 if (ksig
->ka
.sa
.sa_flags
& SA_RESTORER
) {
501 restorer
= ksig
->ka
.sa
.sa_restorer
;
503 /* could use a vstub here */
507 put_user_ex(restorer
, &frame
->pretcode
);
508 } put_user_catch(err
);
510 err
|= setup_sigcontext(&frame
->uc
.uc_mcontext
, fpstate
,
512 err
|= __copy_to_user(&frame
->uc
.uc_sigmask
, set
, sizeof(*set
));
517 /* Set up registers for signal handler */
518 regs
->sp
= (unsigned long) frame
;
519 regs
->ip
= (unsigned long) ksig
->ka
.sa
.sa_handler
;
521 /* We use the x32 calling convention here... */
522 regs
->di
= ksig
->sig
;
523 regs
->si
= (unsigned long) &frame
->info
;
524 regs
->dx
= (unsigned long) &frame
->uc
;
526 loadsegment(ds
, __USER_DS
);
527 loadsegment(es
, __USER_DS
);
529 regs
->cs
= __USER_CS
;
530 regs
->ss
= __USER_DS
;
531 #endif /* CONFIG_X86_X32_ABI */
537 * Do a signal return; undo the signal stack.
540 asmlinkage
unsigned long sys_sigreturn(void)
542 struct pt_regs
*regs
= current_pt_regs();
543 struct sigframe __user
*frame
;
546 frame
= (struct sigframe __user
*)(regs
->sp
- 8);
548 if (!access_ok(VERIFY_READ
, frame
, sizeof(*frame
)))
550 if (__get_user(set
.sig
[0], &frame
->sc
.oldmask
) || (_NSIG_WORDS
> 1
551 && __copy_from_user(&set
.sig
[1], &frame
->extramask
,
552 sizeof(frame
->extramask
))))
555 set_current_blocked(&set
);
557 if (restore_sigcontext(regs
, &frame
->sc
))
562 signal_fault(regs
, frame
, "sigreturn");
566 #endif /* CONFIG_X86_32 */
568 asmlinkage
long sys_rt_sigreturn(void)
570 struct pt_regs
*regs
= current_pt_regs();
571 struct rt_sigframe __user
*frame
;
574 frame
= (struct rt_sigframe __user
*)(regs
->sp
- sizeof(long));
575 if (!access_ok(VERIFY_READ
, frame
, sizeof(*frame
)))
577 if (__copy_from_user(&set
, &frame
->uc
.uc_sigmask
, sizeof(set
)))
580 set_current_blocked(&set
);
582 if (restore_sigcontext(regs
, &frame
->uc
.uc_mcontext
))
585 if (restore_altstack(&frame
->uc
.uc_stack
))
591 signal_fault(regs
, frame
, "rt_sigreturn");
595 static inline int is_ia32_compat_frame(void)
597 return config_enabled(CONFIG_IA32_EMULATION
) &&
598 test_thread_flag(TIF_IA32
);
601 static inline int is_ia32_frame(void)
603 return config_enabled(CONFIG_X86_32
) || is_ia32_compat_frame();
606 static inline int is_x32_frame(void)
608 return config_enabled(CONFIG_X86_X32_ABI
) && test_thread_flag(TIF_X32
);
612 setup_rt_frame(struct ksignal
*ksig
, struct pt_regs
*regs
)
614 int usig
= ksig
->sig
;
615 sigset_t
*set
= sigmask_to_save();
616 compat_sigset_t
*cset
= (compat_sigset_t
*) set
;
618 /* Set up the stack frame */
619 if (is_ia32_frame()) {
620 if (ksig
->ka
.sa
.sa_flags
& SA_SIGINFO
)
621 return ia32_setup_rt_frame(usig
, ksig
, cset
, regs
);
623 return ia32_setup_frame(usig
, ksig
, cset
, regs
);
624 } else if (is_x32_frame()) {
625 return x32_setup_rt_frame(ksig
, cset
, regs
);
627 return __setup_rt_frame(ksig
->sig
, ksig
, set
, regs
);
632 handle_signal(struct ksignal
*ksig
, struct pt_regs
*regs
)
634 bool stepping
, failed
;
635 struct fpu
*fpu
= ¤t
->thread
.fpu
;
637 if (v8086_mode(regs
))
638 save_v86_state((struct kernel_vm86_regs
*) regs
, VM86_SIGNAL
);
640 /* Are we from a system call? */
641 if (syscall_get_nr(current
, regs
) >= 0) {
642 /* If so, check system call restarting.. */
643 switch (syscall_get_error(current
, regs
)) {
644 case -ERESTART_RESTARTBLOCK
:
645 case -ERESTARTNOHAND
:
650 if (!(ksig
->ka
.sa
.sa_flags
& SA_RESTART
)) {
655 case -ERESTARTNOINTR
:
656 regs
->ax
= regs
->orig_ax
;
663 * If TF is set due to a debugger (TIF_FORCED_TF), clear TF now
664 * so that register information in the sigcontext is correct and
665 * then notify the tracer before entering the signal handler.
667 stepping
= test_thread_flag(TIF_SINGLESTEP
);
669 user_disable_single_step(current
);
671 failed
= (setup_rt_frame(ksig
, regs
) < 0);
674 * Clear the direction flag as per the ABI for function entry.
676 * Clear RF when entering the signal handler, because
677 * it might disable possible debug exception from the
680 * Clear TF for the case when it wasn't set by debugger to
681 * avoid the recursive send_sigtrap() in SIGTRAP handler.
683 regs
->flags
&= ~(X86_EFLAGS_DF
|X86_EFLAGS_RF
|X86_EFLAGS_TF
);
685 * Ensure the signal handler starts with the new fpu state.
687 if (fpu
->fpstate_active
)
690 signal_setup_done(failed
, ksig
, stepping
);
694 #define NR_restart_syscall __NR_restart_syscall
695 #else /* !CONFIG_X86_32 */
696 #define NR_restart_syscall \
697 test_thread_flag(TIF_IA32) ? __NR_ia32_restart_syscall : __NR_restart_syscall
698 #endif /* CONFIG_X86_32 */
701 * Note that 'init' is a special process: it doesn't get signals it doesn't
702 * want to handle. Thus you cannot kill init even with a SIGKILL even by
705 void do_signal(struct pt_regs
*regs
)
709 if (get_signal(&ksig
)) {
710 /* Whee! Actually deliver the signal. */
711 handle_signal(&ksig
, regs
);
715 /* Did we come from a system call? */
716 if (syscall_get_nr(current
, regs
) >= 0) {
717 /* Restart the system call - no handlers present */
718 switch (syscall_get_error(current
, regs
)) {
719 case -ERESTARTNOHAND
:
721 case -ERESTARTNOINTR
:
722 regs
->ax
= regs
->orig_ax
;
726 case -ERESTART_RESTARTBLOCK
:
727 regs
->ax
= NR_restart_syscall
;
734 * If there's no signal to deliver, we just put the saved sigmask
737 restore_saved_sigmask();
740 void signal_fault(struct pt_regs
*regs
, void __user
*frame
, char *where
)
742 struct task_struct
*me
= current
;
744 if (show_unhandled_signals
&& printk_ratelimit()) {
746 "%s[%d] bad frame in %s frame:%p ip:%lx sp:%lx orax:%lx",
747 task_pid_nr(current
) > 1 ? KERN_INFO
: KERN_EMERG
,
748 me
->comm
, me
->pid
, where
, frame
,
749 regs
->ip
, regs
->sp
, regs
->orig_ax
);
750 print_vma_addr(" in ", regs
->ip
);
754 force_sig(SIGSEGV
, me
);
757 #ifdef CONFIG_X86_X32_ABI
758 asmlinkage
long sys32_x32_rt_sigreturn(void)
760 struct pt_regs
*regs
= current_pt_regs();
761 struct rt_sigframe_x32 __user
*frame
;
764 frame
= (struct rt_sigframe_x32 __user
*)(regs
->sp
- 8);
766 if (!access_ok(VERIFY_READ
, frame
, sizeof(*frame
)))
768 if (__copy_from_user(&set
, &frame
->uc
.uc_sigmask
, sizeof(set
)))
771 set_current_blocked(&set
);
773 if (restore_sigcontext(regs
, &frame
->uc
.uc_mcontext
))
776 if (compat_restore_altstack(&frame
->uc
.uc_stack
))
782 signal_fault(regs
, frame
, "x32 rt_sigreturn");