aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/syscall-counts.py
diff options
context:
space:
mode:
authorJinghao Jia <jinghao7@illinois.edu>2024-03-07 00:26:01 +0900
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>2024-03-07 00:26:01 +0900
commite884edbb844fd6935e4368734edd9f3fa46ec5c2 (patch)
tree140ed6c57dc6c34b1f92f78a8dff5a50838d0f20 /tools/perf/scripts/python/syscall-counts.py
parente4778a0ef322834718f8e42da3901eb99fef1208 (diff)
x86/kprobes: Prohibit kprobing on INT and UD
Both INT (INT n, INT1, INT3, INTO) and UD (UD0, UD1, UD2) serve special purposes in the kernel, e.g., INT3 is used by KGDB and UD2 is involved in LLVM-KCFI instrumentation. At the same time, attaching kprobes on these instructions (particularly UD) will pollute the stack trace dumped in the kernel ring buffer, since the exception is triggered in the copy buffer rather than the original location. Check for INT and UD in can_probe and reject any kprobes trying to attach to these instructions. Link: https://lore.kernel.org/all/20240204031300.830475-3-jinghao7@illinois.edu/ Suggested-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Jinghao Jia <jinghao7@illinois.edu> Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions