Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8513c42e authored by Bernd Schmidt's avatar Bernd Schmidt Committed by Bryan Wu
Browse files

[Blackfin] arch: disable single stepping when delivering a signal



When delivering a signal, disable single stepping but call
ptrace_notify if it was enabled before. The idea was taken
from the x86 port.

Signed-off-by: default avatarBernd Schmidt <bernds_cb1@t-online.de>
Signed-off-by: default avatarBryan Wu <cooloney@kernel.org>
parent 7d39270d
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -42,6 +42,9 @@

#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))

/* Location of the trace bit in SYSCFG. */
#define TRACE_BITS 0x0001

struct fdpic_func_descriptor {
	unsigned long	text;
	unsigned long	GOT;
@@ -225,6 +228,16 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t * info,
	regs->r1 = (unsigned long)(&frame->info);
	regs->r2 = (unsigned long)(&frame->uc);

	/*
	 * Clear the trace flag when entering the signal handler, but
	 * notify any tracer that was single-stepping it. The tracer
	 * may want to single-step inside the handler too.
	 */
	if (regs->syscfg & TRACE_BITS) {
		regs->syscfg &= ~TRACE_BITS;
		ptrace_notify(SIGTRAP);
	}

	return 0;

 give_sigsegv: