diff options
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/signal.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c index 890ca0523570..0511e050d24a 100644 --- a/arch/x86/kernel/signal.c +++ b/arch/x86/kernel/signal.c @@ -336,8 +336,7 @@ static const struct { 0 }; -static int -__setup_frame(struct ksignal *ksig, struct pt_regs *regs) +int ia32_setup_frame(struct ksignal *ksig, struct pt_regs *regs) { sigset_t *set = sigmask_to_save(); struct sigframe __user *frame; @@ -392,7 +391,7 @@ Efault: return -EFAULT; } -static int __setup_rt_frame(struct ksignal *ksig, struct pt_regs *regs) +int ia32_setup_rt_frame(struct ksignal *ksig, struct pt_regs *regs) { sigset_t *set = sigmask_to_save(); struct rt_sigframe __user *frame; @@ -471,7 +470,7 @@ static unsigned long frame_uc_flags(struct pt_regs *regs) return flags; } -static int __setup_rt_frame(struct ksignal *ksig, struct pt_regs *regs) +int x64_setup_rt_frame(struct ksignal *ksig, struct pt_regs *regs) { sigset_t *set = sigmask_to_save(); struct rt_sigframe __user *frame; @@ -571,11 +570,9 @@ int copy_siginfo_to_user32(struct compat_siginfo __user *to, return x32_copy_siginfo_to_user(to, from); return __copy_siginfo_to_user32(to, from); } -#endif /* CONFIG_X86_X32_ABI */ -static int x32_setup_rt_frame(struct ksignal *ksig, struct pt_regs *regs) +int x32_setup_rt_frame(struct ksignal *ksig, struct pt_regs *regs) { -#ifdef CONFIG_X86_X32_ABI compat_sigset_t *set = (compat_sigset_t *) sigmask_to_save(); struct rt_sigframe_x32 __user *frame; unsigned long uc_flags; @@ -622,15 +619,14 @@ static int x32_setup_rt_frame(struct ksignal *ksig, struct pt_regs *regs) regs->cs = __USER_CS; regs->ss = __USER_DS; -#endif /* CONFIG_X86_X32_ABI */ return 0; -#ifdef CONFIG_X86_X32_ABI + Efault: user_access_end(); return -EFAULT; -#endif } +#endif /* CONFIG_X86_X32_ABI */ /* * Do a signal return; undo the signal stack. @@ -770,7 +766,7 @@ setup_rt_frame(struct ksignal *ksig, struct pt_regs *regs) } else if (is_x32_frame(ksig)) { return x32_setup_rt_frame(ksig, regs); } else { - return __setup_rt_frame(ksig, regs); + return x64_setup_rt_frame(ksig, regs); } } |