Skip to content

Commit c1804a2

Browse files
mhiramatKAGA-KOKO
authored andcommitted
kprobes/x86: Blacklist indirect thunk functions for kprobes
Mark __x86_indirect_thunk_* functions as blacklist for kprobes because those functions can be called from anywhere in the kernel including blacklist functions of kprobes. Signed-off-by: Masami Hiramatsu <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: David Woodhouse <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Ananth N Mavinakayanahalli <[email protected]> Cc: Arjan van de Ven <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/151629209111.10241.5444852823378068683.stgit@devbox
1 parent 736e80a commit c1804a2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/x86/lib/retpoline.S

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ ENDPROC(__x86_indirect_thunk_\reg)
2525
* than one per register with the correct names. So we do it
2626
* the simple and nasty way...
2727
*/
28-
#define EXPORT_THUNK(reg) EXPORT_SYMBOL(__x86_indirect_thunk_ ## reg)
28+
#define __EXPORT_THUNK(sym) _ASM_NOKPROBE(sym); EXPORT_SYMBOL(sym)
29+
#define EXPORT_THUNK(reg) __EXPORT_THUNK(__x86_indirect_thunk_ ## reg)
2930
#define GENERATE_THUNK(reg) THUNK reg ; EXPORT_THUNK(reg)
3031

3132
GENERATE_THUNK(_ASM_AX)

0 commit comments

Comments
 (0)