Restartable sequences: powerpc architecture support
authorBoqun Feng <boqun.feng@gmail.com>
Wed, 27 Jul 2016 15:05:15 +0000 (23:05 +0800)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 21 Oct 2016 22:28:15 +0000 (18:28 -0400)
Call the rseq_handle_notify_resume() function on return to userspace if
TIF_NOTIFY_RESUME thread flag is set.

Increment the event counter and perform fixup on the pre-signal when a
signal is delivered on top of a restartable sequence critical section.

Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
arch/powerpc/Kconfig
arch/powerpc/kernel/signal.c

index 927d2ab2ce08a68c2574c41e6d1b732ecf597d9b..4847a8a5447cfd295a140554f3c23b5351e9dd7a 100644 (file)
@@ -119,6 +119,7 @@ config PPC
        select HAVE_PERF_USER_STACK_DUMP
        select HAVE_REGS_AND_STACK_ACCESS_API
        select HAVE_HW_BREAKPOINT if PERF_EVENTS && PPC_BOOK3S_64
+       select HAVE_RSEQ
        select ARCH_WANT_IPC_PARSE_VERSION
        select SPARSE_IRQ
        select IRQ_DOMAIN
index cb64d6feb45ac188de852a26a877d9454ba178df..339d0ebe2906755283d47e9c7f7f9fce9c4ed601 100644 (file)
@@ -131,6 +131,8 @@ static void do_signal(struct pt_regs *regs)
        /* Re-enable the breakpoints for the signal stack */
        thread_change_pc(current, regs);
 
+       rseq_signal_deliver(regs);
+
        if (is32) {
                if (ksig.ka.sa.sa_flags & SA_SIGINFO)
                        ret = handle_rt_signal32(&ksig, oldset, regs);
@@ -157,6 +159,7 @@ void do_notify_resume(struct pt_regs *regs, unsigned long thread_info_flags)
        if (thread_info_flags & _TIF_NOTIFY_RESUME) {
                clear_thread_flag(TIF_NOTIFY_RESUME);
                tracehook_notify_resume(regs);
+               rseq_handle_notify_resume(regs);
        }
 
        user_enter();
This page took 0.043257 seconds and 5 git commands to generate.