From: Kris Van Hees Date: Fri, 11 Nov 2011 07:34:04 +0000 (-0500) Subject: Fix resolving addresses of relocation records for SDT probe points. The X-Git-Tag: v4.1.12-111.0.20170907_2225~3^2~3^2~207 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=9523c6714e1b45d6ddde96b79bc2a8d39cb3193c;p=users%2Fjedix%2Flinux-maple.git 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 --- diff --git a/dtrace/sdt_dev.c b/dtrace/sdt_dev.c index 3aaa11404f81..ad44e5c20aee 100644 --- a/dtrace/sdt_dev.c +++ b/dtrace/sdt_dev.c @@ -27,6 +27,7 @@ #include #include +#include #include "dtrace_dev.h" @@ -38,6 +39,8 @@ static long sdt_ioctl(struct file *file, static int sdt_open(struct inode *inode, struct file *file) { + /* Temporary call to assist testing SDT. */ + dtrace_register_builtins(); return -EAGAIN; }