mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-08 18:57:22 +00:00
The ftrace-ops sample exposes nr_function_calls as a module parameter and uses it as the divisor when printing the measured time per call. Loading the module with nr_function_calls=0 skips the benchmark loop and then divides the elapsed time by zero, crashing the kernel during sample module initialization. Keep accepting the parameter value, but report -1LL as the per-call duration when the call count is zero instead of dividing by it. Link: https://patch.msgid.link/20260629152616.107080.e19bfbed249c.ftrace-ops-zero-function-calls-div0@trailofbits.com Assisted-by: Codex:gpt-5.5-cyber-preview Signed-off-by: Samuel Moelius <sam.moelius@trailofbits.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> |
History
|
|
|---|---|---|
| .. | ||
| ftrace-direct-modify.c | ||
| ftrace-direct-multi-modify.c | ||
| ftrace-direct-multi.c | ||
| ftrace-direct-too.c | ||
| ftrace-direct.c | ||
| ftrace-ops.c | ||
| Makefile | ||
| sample-trace-array.c | ||
| sample-trace-array.h | ||