]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit9001da65689a4c331d63f9bf839615e3f47c34b6
tree4f695af1eade6a14ff2903f0427660ccef905bfb
parentd452260200f348290419b617f11edf98152e99a2
powerpc/kprobes: Replace ppc_optinsn by common optinsn

Commit 0f8524be3cef ("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 bf6a01b7b2ab ("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