dacbe41f77
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> |
||
---|---|---|
.. | ||
asm-offsets.h | ||
asmmacro.h | ||
atomic.h | ||
auxvec.h | ||
bitops.h | ||
bitsperlong.h | ||
bug.h | ||
bugs.h | ||
byteorder.h | ||
cache.h | ||
cacheflush.h | ||
checksum.h | ||
cputime.h | ||
current.h | ||
delay.h | ||
device.h | ||
div64.h | ||
dma-mapping.h | ||
dma.h | ||
elf.h | ||
emergency-restart.h | ||
errno.h | ||
fcntl.h | ||
fixmap.h | ||
ftrace.h | ||
futex.h | ||
hardirq.h | ||
hw_irq.h | ||
io.h | ||
ioctl.h | ||
ioctls.h | ||
ipcbuf.h | ||
irq_regs.h | ||
irq.h | ||
irqflags.h | ||
Kbuild | ||
kdebug.h | ||
kmap_types.h | ||
linkage.h | ||
local.h | ||
mman.h | ||
mmu_context.h | ||
mmu.h | ||
module.h | ||
msgbuf.h | ||
mutex.h | ||
page.h | ||
param.h | ||
pci.h | ||
percpu.h | ||
pgalloc.h | ||
pgtable-bits.h | ||
pgtable.h | ||
poll.h | ||
posix_types.h | ||
processor.h | ||
ptrace.h | ||
resource.h | ||
scatterlist.h | ||
scoreregs.h | ||
sections.h | ||
segment.h | ||
sembuf.h | ||
setup.h | ||
shmbuf.h | ||
shmparam.h | ||
sigcontext.h | ||
siginfo.h | ||
signal.h | ||
socket.h | ||
sockios.h | ||
stat.h | ||
statfs.h | ||
string.h | ||
swab.h | ||
syscalls.h | ||
system.h | ||
termbits.h | ||
termios.h | ||
thread_info.h | ||
timex.h | ||
tlb.h | ||
tlbflush.h | ||
topology.h | ||
types.h | ||
uaccess.h | ||
ucontext.h | ||
unaligned.h | ||
unistd.h | ||
user.h |