diff options
author | Andreas Schwab <schwab@linux-m68k.org> | 2017-06-06 18:11:44 -0400 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2017-06-19 13:41:48 -0400 |
commit | 204a2be30a7a8a8d12642f23f3fbdc8b9923b500 (patch) | |
tree | 7c79d881f83dc301fa9aa3d51e5a573e1a292a30 | |
parent | 1072734a2c63490cdcc8f6b33bdf8d3310ea6192 (diff) |
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.
Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
-rw-r--r-- | arch/m68k/include/asm/signal.h | 5 | ||||
-rw-r--r-- | arch/m68k/kernel/signal.c | 16 | ||||
-rw-r--r-- | include/linux/ptrace.h | 4 | ||||
-rw-r--r-- | kernel/signal.c | 1 |
4 files changed, 0 insertions, 26 deletions
diff --git a/arch/m68k/include/asm/signal.h b/arch/m68k/include/asm/signal.h index 8c8ce5e1ee0e..3bc64d02ba5f 100644 --- a/arch/m68k/include/asm/signal.h +++ b/arch/m68k/include/asm/signal.h | |||
@@ -62,9 +62,4 @@ static inline int __gen_sigismember(sigset_t *set, int _sig) | |||
62 | 62 | ||
63 | #endif /* !CONFIG_CPU_HAS_NO_BITFIELDS */ | 63 | #endif /* !CONFIG_CPU_HAS_NO_BITFIELDS */ |
64 | 64 | ||
65 | #ifndef __uClinux__ | ||
66 | extern void ptrace_signal_deliver(void); | ||
67 | #define ptrace_signal_deliver ptrace_signal_deliver | ||
68 | #endif /* __uClinux__ */ | ||
69 | |||
70 | #endif /* _M68K_SIGNAL_H */ | 65 | #endif /* _M68K_SIGNAL_H */ |
diff --git a/arch/m68k/kernel/signal.c b/arch/m68k/kernel/signal.c index 6f945bb5ffbd..e79421f5b9cd 100644 --- a/arch/m68k/kernel/signal.c +++ b/arch/m68k/kernel/signal.c | |||
@@ -109,22 +109,6 @@ int fixup_exception(struct pt_regs *regs) | |||
109 | return 1; | 109 | return 1; |
110 | } | 110 | } |
111 | 111 | ||
112 | void ptrace_signal_deliver(void) | ||
113 | { | ||
114 | struct pt_regs *regs = signal_pt_regs(); | ||
115 | if (regs->orig_d0 < 0) | ||
116 | return; | ||
117 | switch (regs->d0) { | ||
118 | case -ERESTARTNOHAND: | ||
119 | case -ERESTARTSYS: | ||
120 | case -ERESTARTNOINTR: | ||
121 | regs->d0 = regs->orig_d0; | ||
122 | regs->orig_d0 = -1; | ||
123 | regs->pc -= 2; | ||
124 | break; | ||
125 | } | ||
126 | } | ||
127 | |||
128 | static inline void push_cache (unsigned long vaddr) | 112 | static inline void push_cache (unsigned long vaddr) |
129 | { | 113 | { |
130 | /* | 114 | /* |
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index 422bc2e4cb6a..9a2e04be0657 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
@@ -388,10 +388,6 @@ static inline void user_single_step_siginfo(struct task_struct *tsk, | |||
388 | #define current_pt_regs() task_pt_regs(current) | 388 | #define current_pt_regs() task_pt_regs(current) |
389 | #endif | 389 | #endif |
390 | 390 | ||
391 | #ifndef ptrace_signal_deliver | ||
392 | #define ptrace_signal_deliver() ((void)0) | ||
393 | #endif | ||
394 | |||
395 | /* | 391 | /* |
396 | * unlike current_pt_regs(), this one is equal to task_pt_regs(current) | 392 | * unlike current_pt_regs(), this one is equal to task_pt_regs(current) |
397 | * on *all* architectures; the only reason to have a per-arch definition | 393 | * on *all* architectures; the only reason to have a per-arch definition |
diff --git a/kernel/signal.c b/kernel/signal.c index ca92bcfeb322..f0a48e5b1f0b 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -2092,7 +2092,6 @@ static void do_jobctl_trap(void) | |||
2092 | 2092 | ||
2093 | static int ptrace_signal(int signr, siginfo_t *info) | 2093 | static int ptrace_signal(int signr, siginfo_t *info) |
2094 | { | 2094 | { |
2095 | ptrace_signal_deliver(); | ||
2096 | /* | 2095 | /* |
2097 | * We do not check sig_kernel_stop(signr) but set this marker | 2096 | * We do not check sig_kernel_stop(signr) but set this marker |
2098 | * unconditionally because we do not know whether debugger will | 2097 | * unconditionally because we do not know whether debugger will |