From a46ade4fdaa66e84d97104b05c111a64355fa195 Mon Sep 17 00:00:00 2001 From: Francis Deslauriers Date: Fri, 16 Mar 2018 12:19:49 -0400 Subject: [PATCH] jjb: lava: kprobe-fuzzing: Don't fuzz ftrace functions Probing ftrace functions like ftrace_ops_assist_func and some other function can cause crashes and it won't be fixed by the kernel community in the foreseeable future. See discussion [1]. People seem to agree it's a bug but we don't have a timeline on the fix. For now, we ourselves manually blacklist the symbols from the fuzzed instrumentation points. [1] https://lkml.org/lkml/2018/3/16/560 Signed-off-by: Francis Deslauriers --- .../system-tests/run-kprobe-generate-instr-points.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/system-tests/run-kprobe-generate-instr-points.py b/scripts/system-tests/run-kprobe-generate-instr-points.py index 072ff3d..4ee00bf 100644 --- a/scripts/system-tests/run-kprobe-generate-instr-points.py +++ b/scripts/system-tests/run-kprobe-generate-instr-points.py @@ -58,15 +58,19 @@ def main(): raw_symbol_list = kallsyms_file.readlines() # Keep only the symbol name. - raw_symbol_list = [x.split()[2].strip() for x in raw_symbol_list] + symbol_list = [] + for symbol in raw_symbol_list: + symbol = symbol.split()[2].strip() + if 'ftrace' not in symbol: + symbol_list.append(symbol) instrumentation_points = [] # Add all symbols. - instrumentation_points.extend(raw_symbol_list) + instrumentation_points.extend(symbol_list) # For each symbol, create 2 new instrumentation points by random offsets. - for s in raw_symbol_list: + for s in symbol_list: offsets = rng.sample(range(1, 10), 2) for offset in offsets: instrumentation_points.append(s + "+" + str(hex(offset))) -- 2.34.1