Skip to content

Commit 571a2a5

Browse files
zegao96mhiramat
authored andcommitted
rethook, fprobe: do not trace rethook related functions
These functions are already marked as NOKPROBE to prevent recursion and we have the same reason to blacklist them if rethook is used with fprobe, since they are beyond the recursion-free region ftrace can guard. Link: https://lore.kernel.org/all/[email protected]/ Fixes: f3a112c ("x86,rethook,kprobes: Replace kretprobe with rethook on x86") Signed-off-by: Ze Gao <[email protected]> Reviewed-by: Steven Rostedt (Google) <[email protected]> Acked-by: Masami Hiramatsu (Google) <[email protected]> Cc: [email protected] Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
1 parent 2752741 commit 571a2a5

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

arch/riscv/kernel/probes/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ obj-$(CONFIG_RETHOOK) += rethook.o rethook_trampoline.o
44
obj-$(CONFIG_KPROBES_ON_FTRACE) += ftrace.o
55
obj-$(CONFIG_UPROBES) += uprobes.o decode-insn.o simulate-insn.o
66
CFLAGS_REMOVE_simulate-insn.o = $(CC_FLAGS_FTRACE)
7+
CFLAGS_REMOVE_rethook.o = $(CC_FLAGS_FTRACE)
8+
CFLAGS_REMOVE_rethook_trampoline.o = $(CC_FLAGS_FTRACE)

arch/s390/kernel/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ CFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE)
1010

1111
# Do not trace early setup code
1212
CFLAGS_REMOVE_early.o = $(CC_FLAGS_FTRACE)
13+
CFLAGS_REMOVE_rethook.o = $(CC_FLAGS_FTRACE)
1314

1415
endif
1516

arch/x86/kernel/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ CFLAGS_REMOVE_ftrace.o = -pg
1717
CFLAGS_REMOVE_early_printk.o = -pg
1818
CFLAGS_REMOVE_head64.o = -pg
1919
CFLAGS_REMOVE_sev.o = -pg
20+
CFLAGS_REMOVE_rethook.o = -pg
2021
endif
2122

2223
KASAN_SANITIZE_head$(BITS).o := n

0 commit comments

Comments
 (0)