Commit 764e8d12 authored by Hiroshi Shimamoto's avatar Hiroshi Shimamoto Committed by Ingo Molnar

x86: signal_64.c: make handle_signal() similar

Make handle_signal() same as 32bit.

No change in functionality intended.
Signed-off-by: default avatarHiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 0c40ed71
...@@ -338,39 +338,40 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, ...@@ -338,39 +338,40 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
ret = setup_rt_frame(sig, ka, info, oldset, regs); ret = setup_rt_frame(sig, ka, info, oldset, regs);
if (ret == 0) { if (ret)
/* return ret;
* This has nothing to do with segment registers,
* despite the name. This magic affects uaccess.h
* macros' behavior. Reset it to the normal setting.
*/
set_fs(USER_DS);
/* /*
* Clear the direction flag as per the ABI for function entry. * This has nothing to do with segment registers,
*/ * despite the name. This magic affects uaccess.h
regs->flags &= ~X86_EFLAGS_DF; * macros' behavior. Reset it to the normal setting.
*/
set_fs(USER_DS);
/* /*
* Clear TF when entering the signal handler, but * Clear the direction flag as per the ABI for function entry.
* notify any tracer that was single-stepping it. */
* The tracer may want to single-step inside the regs->flags &= ~X86_EFLAGS_DF;
* handler too.
*/
regs->flags &= ~X86_EFLAGS_TF;
spin_lock_irq(&current->sighand->siglock); /*
sigorsets(&current->blocked, &current->blocked, &ka->sa.sa_mask); * Clear TF when entering the signal handler, but
if (!(ka->sa.sa_flags & SA_NODEFER)) * notify any tracer that was single-stepping it.
sigaddset(&current->blocked, sig); * The tracer may want to single-step inside the
recalc_sigpending(); * handler too.
spin_unlock_irq(&current->sighand->siglock); */
regs->flags &= ~X86_EFLAGS_TF;
tracehook_signal_handler(sig, info, ka, regs, spin_lock_irq(&current->sighand->siglock);
test_thread_flag(TIF_SINGLESTEP)); sigorsets(&current->blocked, &current->blocked, &ka->sa.sa_mask);
} if (!(ka->sa.sa_flags & SA_NODEFER))
sigaddset(&current->blocked, sig);
recalc_sigpending();
spin_unlock_irq(&current->sighand->siglock);
return ret; tracehook_signal_handler(sig, info, ka, regs,
test_thread_flag(TIF_SINGLESTEP));
return 0;
} }
#define NR_restart_syscall \ #define NR_restart_syscall \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment