android_kernel_xiaomi_sm7250/arch/sparc64
Rusty Lynch 7e1048b11c [PATCH] Move kprobe [dis]arming into arch specific code
The architecture independent code of the current kprobes implementation is
arming and disarming kprobes at registration time.  The problem is that the
code is assuming that arming and disarming is a just done by a simple write
of some magic value to an address.  This is problematic for ia64 where our
instructions look more like structures, and we can not insert break points
by just doing something like:

*p->addr = BREAKPOINT_INSTRUCTION;

The following patch to 2.6.12-rc4-mm2 adds two new architecture dependent
functions:

     * void arch_arm_kprobe(struct kprobe *p)
     * void arch_disarm_kprobe(struct kprobe *p)

and then adds the new functions for each of the architectures that already
implement kprobes (spar64/ppc64/i386/x86_64).

I thought arch_[dis]arm_kprobe was the most descriptive of what was really
happening, but each of the architectures already had a disarm_kprobe()
function that was really a "disarm and do some other clean-up items as
needed when you stumble across a recursive kprobe." So...  I took the
liberty of changing the code that was calling disarm_kprobe() to call
arch_disarm_kprobe(), and then do the cleanup in the block of code dealing
with the recursive kprobe case.

So far this patch as been tested on i386, x86_64, and ppc64, but still
needs to be tested in sparc64.

Signed-off-by: Rusty Lynch <rusty.lynch@intel.com>
Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-23 09:45:21 -07:00
..
boot Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
kernel [PATCH] Move kprobe [dis]arming into arch specific code 2005-06-23 09:45:21 -07:00
lib [PATCH] smp_processor_id() cleanup 2005-06-21 18:46:13 -07:00
math-emu Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mm [PATCH] Hugepage consolidation 2005-06-21 18:46:15 -07:00
oprofile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
prom Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
solaris [SPARC64]: Fix cmsg length checks in Solaris emulation layer. 2005-06-21 15:39:22 -07:00
defconfig Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Kconfig [PATCH] make each arch use mm/Kconfig 2005-06-23 09:45:02 -07:00
Kconfig.debug Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00