Please sign in to comment.
kprobes: return proper error code from register_kprobe()
register_kprobe() aborts if the address of the new request falls in a prohibited area (such as ftrace pouch, __kprobes annotated functions, non-kernel text addresses, jump label text). We however don't return the right error on this abort, resulting in a silent failure - incorrect adding/reporting of kprobes ('perf probe do_fork+18' or 'perf probe mcount' for instance). In V2 we are incorporating Masami Hiramatsu's feedback. This patch fixes it by returning -EINVAL upon failure. While we are here, rename the label used for exit to be more appropriate. Signed-off-by: Ananth N Mavinakayanahalli <firstname.lastname@example.org> Signed-off-by: Prashanth K Nageshappa <email@example.com> Acked-by: Masami Hiramatsu <firstname.lastname@example.org> Cc: Jason Baron <email@example.com> Cc: <firstname.lastname@example.org> Signed-off-by: Andrew Morton <email@example.com> Signed-off-by: Linus Torvalds <firstname.lastname@example.org>
- Loading branch information...