jjb: lava: kprobe-fuzzing: Don't fuzz ftrace functions
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Fri, 16 Mar 2018 16:19:49 +0000 (12:19 -0400)
committerFrancis Deslauriers <francis.deslauriers@efficios.com>
Mon, 19 Mar 2018 16:20:55 +0000 (12:20 -0400)
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 <francis.deslauriers@efficios.com>
scripts/system-tests/run-kprobe-generate-instr-points.py

index 072ff3dbde2c61ab0b14ab9b2cddbaf16393533d..4ee00bf187d66d8ba413476fa9d7b8bf0e85edb9 100644 (file)
@@ -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)))
This page took 0.04167 seconds and 4 git commands to generate.