]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
tracing: probeevent: Fix to support minus offset from symbol
authorMasami Hiramatsu <mhiramat@kernel.org>
Sat, 17 Mar 2018 12:38:10 +0000 (21:38 +0900)
committerSeth Forshee <seth.forshee@canonical.com>
Wed, 28 Mar 2018 19:06:00 +0000 (14:06 -0500)
commita35ee0b093d8ce925d9bf5f73ad137326bb4fecb
treed96fc6eccd590d24b28e169c7102932fbb134e17
parent70a4f12574253569a246f009598be435166825c4
tracing: probeevent: Fix to support minus offset from symbol

BugLink: http://bugs.launchpad.net/bugs/1759655
commit c5d343b6b7badd1f5fe0873eff2e8d63a193e732 upstream.

In Documentation/trace/kprobetrace.txt, it says

 @SYM[+|-offs] : Fetch memory at SYM +|- offs (SYM should be a data symbol)

However, the parser doesn't parse minus offset correctly, since
commit 2fba0c8867af ("tracing/kprobes: Fix probe offset to be
unsigned") drops minus ("-") offset support for kprobe probe
address usage.

This fixes the traceprobe_split_symbol_offset() to parse minus
offset again with checking the offset range, and add a minus
offset check in kprobe probe address usage.

Link: http://lkml.kernel.org/r/152129028983.31874.13419301530285775521.stgit@devbox
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Tom Zanussi <tom.zanussi@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Cc: stable@vger.kernel.org
Fixes: 2fba0c8867af ("tracing/kprobes: Fix probe offset to be unsigned")
Acked-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
kernel/trace/trace_kprobe.c
kernel/trace/trace_probe.c
kernel/trace/trace_probe.h