android_kernel_motorola_sm6375/kernel/trace
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nikolay Kuratov 5b3d32f607 ftrace: Avoid potential division by zero in function_stat_show()
commit a1a7eb89ca0b89dc1c326eeee2596f263291aca3 upstream.

Check whether denominator expression x * (x - 1) * 1000 mod {2^32, 2^64}
produce zero and skip stddev computation in that case.

For now don't care about rec->counter * rec->counter overflow because
rec->time * rec->time overflow will likely happen earlier.

Cc: stable@vger.kernel.org
Cc: Wen Yang <wenyang@linux.alibaba.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://lore.kernel.org/20250206090156.1561783-1-kniv@yandex-team.ru
Fixes: e31f7939c1c27 ("ftrace: Avoid potential division by zero in function profiler")
Signed-off-by: Nikolay Kuratov <kniv@yandex-team.ru>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-03-13 12:43:25 +01:00
..
blktrace.c
bpf_trace.c bpf: Send signals asynchronously if !preemptible 2025-03-13 12:42:56 +01:00
fgraph.c
ftrace.c ftrace: Avoid potential division by zero in function_stat_show() 2025-03-13 12:43:25 +01:00
ftrace_internal.h
Kconfig
Makefile
power-traces.c
preemptirq_delay_test.c tracing: Add MODULE_DESCRIPTION() to preemptirq_delay_test 2024-07-05 09:08:25 +02:00
ring_buffer.c ring-buffer: Rename ring_buffer_read() to read_buffer_iter_advance() 2024-09-12 11:03:56 +02:00
ring_buffer_benchmark.c
rpm-traces.c
trace.c tracing: Have saved_cmdlines arrays all in one allocation 2024-11-08 16:20:43 +01:00
trace.h tracing: Have trace_event_file have ref counters 2023-11-28 16:50:22 +00:00
trace_benchmark.c
trace_benchmark.h
trace_branch.c
trace_clock.c tracing: Use atomic64_inc_return() in trace_clock_counter() 2024-12-14 19:44:53 +01:00
trace_dynevent.c
trace_dynevent.h
trace_entries.h
trace_event_perf.c trace/trace_event_perf: remove duplicate samples on the first tracepoint event 2024-12-14 19:44:28 +01:00
trace_events.c tracing: Have trace_event_file have ref counters 2023-11-28 16:50:22 +00:00
trace_events_filter.c tracing: Have trace_event_file have ref counters 2023-11-28 16:50:22 +00:00
trace_events_filter_test.h
trace_events_hist.c
trace_events_trigger.c Revert "tracing/trigger: Fix to return error if failed to alloc snapshot" 2024-05-02 16:18:30 +02:00
trace_export.c
trace_functions.c
trace_functions_graph.c ring-buffer: Rename ring_buffer_read() to read_buffer_iter_advance() 2024-09-12 11:03:56 +02:00
trace_hwlat.c
trace_irqsoff.c tracing: Fix memleak due to race between current_tracer and trace 2023-08-30 16:27:23 +02:00
trace_kdb.c
trace_kprobe.c tracing/kprobe: Make trace_kprobe's module callback called after jump_label update 2025-01-09 13:23:31 +01:00
trace_kprobe_selftest.c
trace_kprobe_selftest.h
trace_mmiotrace.c
trace_nop.c
trace_output.c tracing: Remove precision vsnprintf() check from print event 2024-11-08 16:20:43 +01:00
trace_output.h
trace_preemptirq.c
trace_printk.c
trace_probe.c tracing: Consider the NULL character when validating the event length 2024-11-08 16:20:51 +01:00
trace_probe.h tracing/kprobes: Return EADDRNOTAVAIL when func matches several symbols 2024-11-08 16:20:47 +01:00
trace_probe_tmpl.h
trace_sched_switch.c
trace_sched_wakeup.c tracing: Fix memleak due to race between current_tracer and trace 2023-08-30 16:27:23 +02:00
trace_selftest.c
trace_selftest_dynamic.c
trace_seq.c
trace_stack.c
trace_stat.c
trace_stat.h
trace_syscalls.c
trace_uprobe.c bpf: Clear the probe_addr for uprobe 2023-09-23 10:59:41 +02:00
tracing_map.c tracing: Fix cmp_entries_dup() to respect sort() comparison rules 2024-12-14 19:44:48 +01:00
tracing_map.h