linux/arch
David S. Miller f088258966 [SPARC64]: Fix several kprobes bugs.
- relbranch_fixup(), for non-branches, would end up setting
  regs->tnpc incorrectly, in fact it would set it equal to
  regs->tpc which would cause that instruction to execute twice

  Also, if this is not a PC-relative branch, we should just
  leave regs->tnpc as-is.  This covers cases like 'jmpl' which
  branch to absolute values.

- To be absolutely %100 safe, we need to flush the instruction
  cache for all assignments to kprobe->ainsn.insn[], including
  cases like add_aggr_kprobe()

- prev_kprobe's status field needs to be 'unsigned long' to match
  the type of the value it is saving

- jprobes were totally broken:
  = jprobe_return() can run in the stack frame of the jprobe handler,
    or in an even deeper stack frame, thus we'll be in the wrong
    register window than the one from the original probe state.

    So unwind using 'restore' instructions, if necessary, right
    before we do the jprobe_return() breakpoint trap.

  = There is no reason to save/restore the register window saved
    at %sp at jprobe trigger time.  Those registers cannot be
    modified by the jprobe handler.  Also, this code was saving
    and restoring "sizeof (struct sparc_stackf)" bytes.  Depending
    upon the caller, this could clobber unrelated stack frame
    pieces if there is only a basic 128-byte register window
    stored on the stack, without the argument save area.

    So just saving and restoring struct pt_regs is sufficient.

  = Kill the "jprobe_saved_esp", totally unused.

    Also, delete "jprobe_saved_regs_location", with the stack frame
    unwind now done explicitly by jprobe_return(), this check is
    superfluous.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-12-10 02:42:03 -08:00
..
alpha [PATCH] LOG2: Implement a general integer log2 facility in the kernel 2006-12-08 08:28:51 -08:00
arm [PATCH] LOG2: Implement a general integer log2 facility in the kernel 2006-12-08 08:28:51 -08:00
arm26 [PATCH] LOG2: Implement a general integer log2 facility in the kernel 2006-12-08 08:28:51 -08:00
avr32 [PATCH] LOG2: Implement a general integer log2 facility in the kernel 2006-12-08 08:28:51 -08:00
cris [PATCH] LOG2: Implement a general integer log2 facility in the kernel 2006-12-08 08:28:51 -08:00
frv [PATCH] LOG2: Implement a general integer log2 facility in the kernel 2006-12-08 08:28:51 -08:00
h8300 [PATCH] LOG2: Implement a general integer log2 facility in the kernel 2006-12-08 08:28:51 -08:00
i386 [PATCH] x86-64: no paravirt for X86_VOYAGER or X86_VISWS 2006-12-09 21:33:36 +01:00
ia64 [PATCH] LOG2: Implement a general integer log2 facility in the kernel 2006-12-08 08:28:51 -08:00
m32r [PATCH] LOG2: Implement a general integer log2 facility in the kernel 2006-12-08 08:28:51 -08:00
m68k [PATCH] m68k: EXPORT_SYMBOL(cache_{clear,push}) bogus comment 2006-12-09 09:41:18 -08:00
m68knommu [PATCH] LOG2: Implement a general integer log2 facility in the kernel 2006-12-08 08:28:51 -08:00
mips [PATCH] add STB810 support (Philips PNX8550-based) 2006-12-09 01:04:00 +00:00
parisc [PATCH] Generic ioremap_page_range: parisc conversion 2006-12-08 08:28:52 -08:00
powerpc [PATCH] LOG2: Provide ilog2() fallbacks for powerpc 2006-12-08 08:28:51 -08:00
ppc [PATCH] LOG2: Implement a general integer log2 facility in the kernel 2006-12-08 08:28:51 -08:00
s390 Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6 2006-12-08 11:21:55 -08:00
sh [PATCH] Generic ioremap_page_range: sh conversion 2006-12-08 08:28:52 -08:00
sh64 [PATCH] Generic ioremap_page_range: sh64 conversion 2006-12-08 08:28:52 -08:00
sparc [SPARC{32,64}]: Propagate ptrace_traceme() return value. 2006-12-10 02:40:27 -08:00
sparc64 [SPARC64]: Fix several kprobes bugs. 2006-12-10 02:42:03 -08:00
um [PATCH] tty: switch to ktermios 2006-12-08 08:28:57 -08:00
v850 [PATCH] LOG2: Implement a general integer log2 facility in the kernel 2006-12-08 08:28:51 -08:00
x86_64 [PATCH] x86: Work around gcc 4.2 over aggressive optimizer 2006-12-09 21:33:36 +01:00
xtensa [PATCH] LOG2: Implement a general integer log2 facility in the kernel 2006-12-08 08:28:51 -08:00