m68k: remove ptrace_signal_deliver
Subsystems (2)
PATCH 1/1 m68k: remove ptrace_signal_deliver
This fixes debugger syscall restart interactions. A debugger that modifies the tracee's program counter is expected to set the orig_d0 pseudo register to -1, to disable a possible syscall restart.
This removes the last user of the ptrace_signal_deliver hook in the ptrace signal handling, so remove that as well.
--- arch/m68k/include/asm/signal.h | 5 ----- arch/m68k/kernel/signal.c | 16 ---------------- include/linux/ptrace.h | 4 ---- kernel/signal.c | 1 - 4 files changed, 26 deletions(-)
arch/m68k/include/asm/signal.h +0 -5
@@ -62,9 +62,4 @@ static inline int __gen_sigismember(sigset_t *set, int _sig)#endif /* !CONFIG_CPU_HAS_NO_BITFIELDS */ -#ifndef __uClinux__ -extern void ptrace_signal_deliver (void ); -#define ptrace_signal_deliver ptrace_signal_deliver -#endif /* __uClinux__ */ -#endif /* _M68K_SIGNAL_H */
arch/m68k/kernel/signal.c +0 -16
@@ -109,22 +109,6 @@ int handle_kernel_fault(struct pt_regs *regs)return 1 ; } -void ptrace_signal_deliver (void ) -{ -struct pt_regs *regs =signal_pt_regs (); -if (regs->orig_d0 <0 ) -return ; -switch (regs->d0) { -case -ERESTARTNOHAND : -case -ERESTARTSYS : -case -ERESTARTNOINTR : - regs->d0 = regs->orig_d0; - regs->orig_d0 =-1 ; - regs->pc -=2 ; -break ; - } -} -static inline void push_cache (unsigned long vaddr) {/*
include/linux/ptrace.h +0 -4
@@ -388,10 +388,6 @@ static inline void user_single_step_siginfo(struct task_struct *tsk,#define current_pt_regs () task_pt_regs(current)#endif -#ifndef ptrace_signal_deliver -#define ptrace_signal_deliver () ((void)0) -#endif -/* * unlike current_pt_regs(), this one is equal to task_pt_regs(current) * on *all* architectures; the only reason to have a per-arch definition
kernel/signal.c +0 -1
@@ -2092,7 +2092,6 @@ static void do_jobctl_trap(void)static int ptrace_signal (int signr,siginfo_t *info) { -ptrace_signal_deliver ();/* * We do not check sig_kernel_stop(signr) but set this marker * unconditionally because we do not know whether debugger will
Signature · 7 lines
2.13.1 -- Andreas Schwab, [email protected] GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."
Hi Roland, Oleg, Al,
If you don't mind, I plan to queue this up in the m68k tree for v4.13. There are no conflicts with current linux-next.
If you prefer to take this through a signal tree with my
please let me know.
Thanks!
Quoted 84 lines · Andreas Schwab
This fixes debugger syscall restart interactions. A debugger that modifies the tracee's program counter is expected to set the
orig_d0pseudo register to -1, to disable a possible syscall restart.This removes the last user of the
ptrace_signal_deliverhook in the ptrace signal handling, so remove that as well.Signed-off-by Andreas Schwab <[email protected]>--- arch/m68k/include/asm/signal.h | 5 ----- arch/m68k/kernel/signal.c | 16 ---------------- include/linux/ptrace.h | 4 ---- kernel/signal.c | 1 - 4 files changed, 26 deletions(-)arch/m68k/include/asm/signal.h +0
-5@@ -62,9 +62,4 @@ static inline int __gen_sigismember(sigset_t *set, int _sig)#endif /* !CONFIG_CPU_HAS_NO_BITFIELDS */ -#ifndef __uClinux__ -extern void ptrace_signal_deliver (void ); -#define ptrace_signal_deliver ptrace_signal_deliver -#endif /* __uClinux__ */ -#endif /* _M68K_SIGNAL_H */ arch/m68k/kernel/signal.c +0
-16@@ -109,22 +109,6 @@ int handle_kernel_fault(struct pt_regs *regs)return 1 ; } -void ptrace_signal_deliver (void ) -{ -struct pt_regs *regs =signal_pt_regs (); -if (regs->orig_d0 <0 ) -return ; -switch (regs->d0) { -case -ERESTARTNOHAND : -case -ERESTARTSYS : -case -ERESTARTNOINTR : - regs->d0 = regs->orig_d0; - regs->orig_d0 =-1 ; - regs->pc -=2 ; -break ; - } -} -static inline void push_cache (unsigned long vaddr) {/* include/linux/ptrace.h +0
-4@@ -388,10 +388,6 @@ static inline void user_single_step_siginfo(struct task_struct *tsk,#define current_pt_regs () task_pt_regs(current)#endif -#ifndef ptrace_signal_deliver -#define ptrace_signal_deliver () ((void)0) -#endif -/* * unlike current_pt_regs(), this one is equal to task_pt_regs(current) * on *all* architectures; the only reason to have a per-arch definition kernel/signal.c +0
-2@@ -2092,7 +2092,6 @@ static void do_jobctl_trap(void)static int ptrace_signal (int signr,siginfo_t *info) { -ptrace_signal_deliver ();/* * We do not check sig_kernel_stop(signr) but set this marker * unconditionally because we do not know whether debugger will --
Quoted 1 line
2.13.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Geert Uytterhoeven
maintainerQuoted 18 lines · Geert Uytterhoeven
If you don't mind, I plan to queue this up in the m68k tree for v4.13. There are no conflicts with current linux-next.
If you prefer to take this through a signal tree with my
please let me know.
Thanks!
Quoted 8 lines · Andreas Schwab
This fixes debugger syscall restart interactions. A debugger that modifies the tracee's program counter is expected to set the
orig_d0pseudo register to -1, to disable a possible syscall restart.This removes the last user of the
ptrace_signal_deliverhook in the ptrace signal handling, so remove that as well.Signed-off-by Andreas Schwab <[email protected]>
Applied and queued for v4.13.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds