]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dtrace: fix resolving addresses of relocation records for SDT probe points
authorKris Van Hees <kris.van.hees@oracle.com>
Fri, 11 Nov 2011 07:34:04 +0000 (02:34 -0500)
committerNick Alcock <nick.alcock@oracle.com>
Mon, 29 Jun 2015 21:39:57 +0000 (22:39 +0100)
commit764dfba3497ae7c449555bdd42e804121c0ca188
tree3d9e8faf6f9b19cb74cd3630dab411a6fef18caf
parent2303afc56c36874199fe50f7547f95f566e73ddd
dtrace: fix resolving addresses of relocation records for SDT probe points

The addresses were being calculated based on the wrong starting point (_stext
whereas it ought to be _text), and the base was not taken into account.
Fixed the writing of NOPs in the location of the probe point calls, since
the existing case was causing kernel paging faults.  Made the add_nops()
function in alternative.c non-static so it can be used in sdt_register.
Use add_nops() to select the most appropriate NOP sequence for replacing the
probe point call, and write the NOPs using text_poke().

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
arch/x86/include/asm/alternative.h
arch/x86/kernel/alternative.c
include/linux/sdt.h
kernel/dtrace/sdt_register.c
scripts/dtrace_relocs.c