linux/arch/powerpc
Naveen N. Rao bf794bf52a powerpc/kprobes: Fix kallsyms lookup across powerpc ABIv1 and ABIv2
Currently, all non-dot symbols are being treated as function descriptors
in ABIv1. This is incorrect and is resulting in perf probe not working:

  # perf probe do_fork
  Added new event:
  Failed to write event: Invalid argument
    Error: Failed to add events.
  # dmesg | tail -1
  [192268.073063] Could not insert probe at _text+768432: -22

perf probe bases all kernel probes on _text and writes,
for example, "p:probe/do_fork _text+768432" to
/sys/kernel/debug/tracing/kprobe_events. In-kernel, _text is being
considered to be a function descriptor and is resulting in the above
error.

Fix this by changing how we lookup symbol addresses on ppc64. We first
check for the dot variant of a symbol and look at the non-dot variant
only if that fails. In this manner, we avoid having to look at the
function descriptor.

While at it, also separate out how this works on ABIv2 where
we don't have dot symbols, but need to use the local entry point.

Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2015-01-23 14:02:51 +11:00
..
boot Merge remote-tracking branch 'scottwood/next' into next 2014-11-18 17:00:38 +11:00
configs powerpc/ps3: Enable CONFIG_PS3_REPOSITORY_WRITE in ps3_defconfig 2015-01-22 17:31:22 +11:00
crypto crypto: powerpc - replace memset by memzero_explicit 2014-12-02 22:55:50 +08:00
include powerpc/kprobes: Fix kallsyms lookup across powerpc ABIv1 and ABIv2 2015-01-23 14:02:51 +11:00
kernel powerpc: Rename _TIF_SYSCALL_T_OR_A to _TIF_SYSCALL_DOTRACE 2015-01-23 14:02:51 +11:00
kvm powerpc/kvm: Create proper names for the kvm_host_state PMU fields 2014-12-29 15:45:55 +11:00
lib powerpc/lib: Do not include string.o in obj-y twice 2014-12-29 15:45:55 +11:00
math-emu powerpc: Correct emulated mtfsf instruction 2014-04-07 10:33:11 +10:00
mm mm/debug-pagealloc: make debug-pagealloc boottime configurable 2014-12-13 12:42:48 -08:00
net PPC: bpf_jit_comp: Unify BPF_MOD | BPF_X and BPF_DIV | BPF_X 2014-11-18 13:20:09 -05:00
oprofile powerpc updates for 3.19 2014-12-11 17:48:14 -08:00
perf power/perf/hv-24x7: Use kmem_cache_free() instead of kfree 2014-12-12 16:06:13 +11:00
platforms powernv/iommu: disable IOMMU bypass with param iommu=nobypass 2015-01-23 14:02:46 +11:00
sysdev powerpc/4xx: Fix return value check in hsta_msi_probe() 2014-12-29 15:45:43 +11:00
xmon powerpc/xmon: use isspace/isxdigit/isalnum from linux/ctype.h 2014-12-29 15:45:43 +11:00
Kconfig gcov: enable GCOV_PROFILE_ALL from ARCH Kconfigs 2014-12-13 12:42:51 -08:00
Kconfig.debug Patch queue for ppc - 2014-08-01 2014-08-05 09:58:11 +02:00
Makefile powerpc: Add POWER8 CPU selection 2014-09-25 23:14:49 +10:00
relocs_check.pl