powerpc/kprobes: Replace ppc_optinsn by common optinsn
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Thu, 13 May 2021 09:07:53 +0000 (09:07 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 23 May 2021 10:51:35 +0000 (20:51 +1000)
commitb73c8cccd72ac28beaf262fd6ef4b91411fc8335
tree4f695af1eade6a14ff2903f0427660ccef905bfb
parent7ee3e97e00a3893e354c3993c3f7d9dc127e9c5e
powerpc/kprobes: Replace ppc_optinsn by common optinsn

Commit 51c9c0843993 ("powerpc/kprobes: Implement Optprobes")
implemented a powerpc specific version of optinsn in order
to workaround the 32Mb limitation for direct branches.

Instead of implementing a dedicated powerpc version, use the
common optinsn and override the allocation and freeing functions.

This also indirectly remove the CLANG warning about
is_kprobe_ppc_optinsn_slot() not being use, and the powerpc will
now benefit from commit 5b485629ba0d ("kprobes, extable: Identify
kprobes trampolines as kernel text area")

Suggested-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/ec5e85f9f9abcfecc959a03495f4a7858eb4d203.1620896780.git.christophe.leroy@csgroup.eu
arch/powerpc/kernel/optprobes.c