summaryrefslogtreecommitdiff
path: root/include/linux/kprobes.h
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2021-05-13 12:07:51 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2021-05-23 13:51:35 +0300
commit7ee3e97e00a3893e354c3993c3f7d9dc127e9c5e (patch)
tree9cd913eb3e356b43d2a0839837b4fd0a6472917b /include/linux/kprobes.h
parent6fcb574125e673f33ff058caa54b4e65629f3a08 (diff)
downloadlinux-7ee3e97e00a3893e354c3993c3f7d9dc127e9c5e.tar.xz
kprobes: Allow architectures to override optinsn page allocation
Some architectures like powerpc require a non standard allocation of optinsn page, because module pages are too far from the kernel for direct branches. Define weak alloc_optinsn_page() and free_optinsn_page(), that fall back on alloc_insn_page() and free_insn_page() when not overridden by the architecture. Suggested-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Reviewed-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Acked-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/40a43d6df1fdf41ade36e9a46e60a4df774ca9f6.1620896780.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'include/linux/kprobes.h')
-rw-r--r--include/linux/kprobes.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
index 1883a4a9f16a..02d4020615a7 100644
--- a/include/linux/kprobes.h
+++ b/include/linux/kprobes.h
@@ -409,6 +409,9 @@ void dump_kprobe(struct kprobe *kp);
void *alloc_insn_page(void);
void free_insn_page(void *page);
+void *alloc_optinsn_page(void);
+void free_optinsn_page(void *page);
+
int kprobe_get_kallsym(unsigned int symnum, unsigned long *value, char *type,
char *sym);