]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/kprobes: Dereference function pointers only if the address does not belong...
authorNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Mon, 30 Oct 2017 15:12:09 +0000 (20:42 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 1 Nov 2017 04:51:03 +0000 (15:51 +1100)
commit90deb7105a28ca0112a5f02ab21c352d2b91d503
tree39f5d7025289979f52bf1c787db5102f2889995d
parentb49a9994b342abc6becdc7dd4575362a69480bf1
powerpc/kprobes: Dereference function pointers only if the address does not belong to kernel text

This makes the changes introduced in commit 619d321c2ca433
("powerpc64/elfv1: Only dereference function descriptor for non-text
symbols") to be specific to the kprobe subsystem.

We previously changed ppc_function_entry() to always check the provided
address to confirm if it needed to be dereferenced. This is actually
only an issue for kprobe blacklisted asm labels (through use of
_ASM_NOKPROBE_SYMBOL) and can cause other issues with ftrace. Also, the
additional checks are not really necessary for our other uses.

As such, move this check to the kprobes subsystem.

Fixes: 619d321c2ca4 ("powerpc64/elfv1: Only dereference function descriptor for non-text symbols")
Cc: stable@vger.kernel.org # v4.13+
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/kprobes.c