aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/include/asm/ptrace.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2010-03-10 18:22:46 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-12 18:52:38 -0500
commitdacbe41f776db0a5a9aee1e41594f405c95778a5 (patch)
treef6cb1436bd50a2572b7c5b44d44044be0e8005bd /arch/m68k/include/asm/ptrace.h
parentb3c1e01a09d6af2dd7811a066ffcfc5171be2bed (diff)
ptrace: move user_enable_single_step & co prototypes to linux/ptrace.h
While in theory user_enable_single_step/user_disable_single_step/ user_enable_blockstep could also be provided as an inline or macro there's no good reason to do so, and having the prototype in one places keeps code size and confusion down. Roland said: The original thought there was that user_enable_single_step() et al might well be only an instruction or three on a sane machine (as if we have any of those!), and since there is only one call site inlining would be beneficial. But I agree that there is no strong reason to care about inlining it. As to the arch changes, there is only one thought I'd add to the record. It was always my thinking that for an arch where PTRACE_SINGLESTEP does text-modifying breakpoint insertion, user_enable_single_step() should not be provided. That is, arch_has_single_step()=>true means that there is an arch facility with "pure" semantics that does not have any unexpected side effects. Inserting a breakpoint might do very unexpected strange things in multi-threaded situations. Aside from that, it is a peculiar side effect that user_{enable,disable}_single_step() should cause COW de-sharing of text pages and so forth. For PTRACE_SINGLESTEP, all these peculiarities are the status quo ante for that arch, so having arch_ptrace() itself do those is one thing. But for building other things in the future, it is nicer to have a uniform "pure" semantics that arch-independent code can expect. OTOH, all such arch issues are really up to the arch maintainer. As of today, there is nothing but ptrace using user_enable_single_step() et al so it's a distinction without a practical difference. If/when there are other facilities that use user_enable_single_step() and might care, the affected arch's can revisit the question when someone cares about the quality of the arch support for said new facility. Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Roland McGrath <roland@redhat.com> Acked-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/m68k/include/asm/ptrace.h')
-rw-r--r--arch/m68k/include/asm/ptrace.h8
1 files changed, 0 insertions, 8 deletions
diff --git a/arch/m68k/include/asm/ptrace.h b/arch/m68k/include/asm/ptrace.h
index 21605c736f69..6e6e3ac1d913 100644
--- a/arch/m68k/include/asm/ptrace.h
+++ b/arch/m68k/include/asm/ptrace.h
@@ -87,18 +87,10 @@ struct switch_stack {
87#define profile_pc(regs) instruction_pointer(regs) 87#define profile_pc(regs) instruction_pointer(regs)
88extern void show_regs(struct pt_regs *); 88extern void show_regs(struct pt_regs *);
89 89
90/*
91 * These are defined as per linux/ptrace.h.
92 */
93struct task_struct;
94
95#define arch_has_single_step() (1) 90#define arch_has_single_step() (1)
96extern void user_enable_single_step(struct task_struct *);
97extern void user_disable_single_step(struct task_struct *);
98 91
99#ifdef CONFIG_MMU 92#ifdef CONFIG_MMU
100#define arch_has_block_step() (1) 93#define arch_has_block_step() (1)
101extern void user_enable_block_step(struct task_struct *);
102#endif 94#endif
103 95
104#endif /* __KERNEL__ */ 96#endif /* __KERNEL__ */