linux/kernel/trace
Linus Torvalds 8f9736633f tracing fixes for v6.17
- Fix buffer overflow in osnoise_cpu_write()
 
   The allocated buffer to read user space did not add a nul terminating byte
   after copying from user the string. It then reads the string, and if user
   space did not add a nul byte, the read will continue beyond the string.
   Add a nul terminating byte after reading the string.
 
 - Fix missing check for lockdown on tracing
 
   There's a path from kprobe events or uprobe events that can update the
   tracing system even if lockdown on tracing is activate. Add a check in the
   dynamic event path.
 
 - Add a recursion check for the function graph return path
 
   Now that fprobes can hook to the function graph tracer and call different
   code between the entry and the exit, the exit code may now call functions
   that are not called in entry. This means that the exit handler can possibly
   trigger recursion that is not caught and cause the system to crash.
   Add the same recursion checks in the function exit handler as exists in the
   entry handler path.
 -----BEGIN PGP SIGNATURE-----
 
 iIoEABYKADIWIQRRSw7ePDh/lE+zeZMp5XQQmuv6qgUCaNkbyxQccm9zdGVkdEBn
 b29kbWlzLm9yZwAKCRAp5XQQmuv6qh6dAQDTFqLRb01RzaZuF/xG9A7UqNz9abq5
 fQVwu1RG9xXnnAD/X9PfKfnqLhK/M2EJZT17PJ+nUlFqFoVL6lLJyrDLSw4=
 =4j5J
 -----END PGP SIGNATURE-----

Merge tag 'trace-v6.17-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull tracing fixes from Steven Rostedt:

 - Fix buffer overflow in osnoise_cpu_write()

   The allocated buffer to read user space did not add a nul terminating
   byte after copying from user the string. It then reads the string,
   and if user space did not add a nul byte, the read will continue
   beyond the string.

   Add a nul terminating byte after reading the string.

 - Fix missing check for lockdown on tracing

   There's a path from kprobe events or uprobe events that can update
   the tracing system even if lockdown on tracing is activate. Add a
   check in the dynamic event path.

 - Add a recursion check for the function graph return path

   Now that fprobes can hook to the function graph tracer and call
   different code between the entry and the exit, the exit code may now
   call functions that are not called in entry. This means that the exit
   handler can possibly trigger recursion that is not caught and cause
   the system to crash.

   Add the same recursion checks in the function exit handler as exists
   in the entry handler path.

* tag 'trace-v6.17-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  tracing: fgraph: Protect return handler from recursion loop
  tracing: dynevent: Add a missing lockdown check on dynevent
  tracing/osnoise: Fix slab-out-of-bounds in _parse_integer_limit()
2025-09-28 10:26:35 -07:00
..
rv rv: Fix missing mutex unlock in rv_register_monitor() 2025-09-15 08:36:35 +02:00
Kconfig tracing changes for 6.17 2025-08-01 10:29:36 -07:00
Makefile tracing: Have eprobes have their own config option 2025-07-30 10:38:43 -04:00
blktrace.c Significant patch series in this pull request: 2025-08-03 16:23:09 -07:00
bpf_trace.c bpf: Clean up individual BTF_ID code 2025-07-16 18:34:42 -07:00
bpf_trace.h
error_report-traces.c
fgraph.c tracing: fgraph: Protect return handler from recursion loop 2025-09-27 09:04:05 -04:00
fprobe.c tracing: fprobe: Fix to remove recorded module addresses from filter 2025-09-24 23:18:26 +09:00
ftrace.c ftrace: Also allocate and copy hash for reading of filter files 2025-08-22 19:58:35 -04:00
ftrace_internal.h
kprobe_event_gen_test.c
pid_list.c tracing: Cleanup upper_empty() in pid_list 2025-05-14 11:19:32 -04:00
pid_list.h
power-traces.c PM: cpufreq: powernv/tracing: Move powernv_throttle trace event 2025-07-21 16:40:56 -04:00
preemptirq_delay_test.c kernel: trace: preemptirq_delay_test: use offstack cpu mask 2025-07-08 18:17:38 -04:00
rethook.c
ring_buffer.c ring-buffer: Remove redundant semicolons 2025-08-20 09:20:30 -04:00
ring_buffer_benchmark.c
rpm-traces.c
synth_event_gen_test.c
trace.c tracing: Silence warning when chunk allocation fails in trace_pid_write 2025-09-08 14:56:43 -04:00
trace.h tracing fixes for v6.17-rc2: 2025-08-23 10:11:34 -04:00
trace_benchmark.c
trace_benchmark.h
trace_boot.c
trace_branch.c tracing: branch: Use trace_tracing_is_on_cpu() instead of "disabled" field 2025-05-09 15:19:10 -04:00
trace_btf.c
trace_btf.h
trace_clock.c
trace_dynevent.c tracing: dynevent: Add a missing lockdown check on dynevent 2025-09-25 00:22:46 +09:00
trace_dynevent.h tracing: probes: Fix a possible race in trace_probe_log APIs 2025-05-13 22:23:34 +09:00
trace_entries.h ftrace: Expose call graph depth as unsigned int 2025-05-08 09:36:08 -04:00
trace_eprobe.c tracing: Have eprobes handle arrays 2025-07-24 22:57:32 +09:00
trace_event_perf.c perf: Remove unnecessary parameter of security check 2025-02-26 14:13:58 -05:00
trace_events.c tracing changes for 6.17 2025-08-01 10:29:36 -07:00
trace_events_filter.c tracing changes for 6.17 2025-08-01 10:29:36 -07:00
trace_events_filter_test.h
trace_events_hist.c tracing: Rename event_trigger_alloc() to trigger_data_alloc() 2025-05-09 15:19:11 -04:00
trace_events_inject.c
trace_events_synth.c tracing: Add guard(ring_buffer_nest) 2025-08-01 16:49:15 -04:00
trace_events_trigger.c tracing updates for v6.16: 2025-05-29 21:04:36 -07:00
trace_events_user.c trace: Remove redundant __GFP_NOWARN 2025-09-02 11:48:16 -04:00
trace_export.c
trace_fprobe.c tracing: trace_fprobe: Fix typo of the semicolon 2025-07-29 08:37:52 +09:00
trace_functions.c tracing updates for v6.16: 2025-05-29 21:04:36 -07:00
trace_functions_graph.c fgraph: Copy args in intermediate storage with entry 2025-08-22 17:32:35 -04:00
trace_hwlat.c tracing: Replace opencoded cpumask_next_wrap() in move_to_next_cpu() 2025-07-08 18:17:29 -04:00
trace_irqsoff.c tracing: Use atomic_inc_return() for updating "disabled" counter in irqsoff tracer 2025-05-09 15:19:10 -04:00
trace_kdb.c ring-buffer: Remove ring_buffer_read_prepare_sync() 2025-07-22 20:01:41 -04:00
trace_kprobe.c tracing: kprobe-event: Fix null-ptr-deref in trace_kprobe_create_internal() 2025-09-18 07:36:41 +09:00
trace_kprobe_selftest.c
trace_kprobe_selftest.h
trace_mmiotrace.c tracing/mmiotrace: Remove reference to unused per CPU data pointer 2025-05-08 09:36:09 -04:00
trace_nop.c
trace_osnoise.c tracing/osnoise: Fix slab-out-of-bounds in _parse_integer_limit() 2025-09-23 10:59:52 -04:00
trace_output.c tracing: Have unsigned int function args displayed as hexadecimal 2025-08-01 19:14:51 -04:00
trace_output.h ftrace: Add print_function_args() 2025-03-04 11:27:23 -05:00
trace_preemptirq.c
trace_printk.c
trace_probe.c Probes updates for v6.17: 2025-07-30 15:38:01 -07:00
trace_probe.h tracing: probe: Allocate traceprobe_parse_context from heap 2025-07-24 00:21:30 +09:00
trace_probe_kernel.h
trace_probe_tmpl.h tracing/fprobe: Enable fprobe events with CONFIG_DYNAMIC_FTRACE_WITH_ARGS 2024-12-26 10:50:04 -05:00
trace_recursion_record.c
trace_sched_switch.c
trace_sched_wakeup.c tracing: Convert the per CPU "disabled" counter to local from atomic 2025-05-09 15:19:10 -04:00
trace_selftest.c fgraph: Pass ftrace_regs to retfunc 2024-12-26 10:50:03 -05:00
trace_selftest_dynamic.c
trace_seq.c
trace_stack.c tracing updates for v6.16: 2025-05-29 21:04:36 -07:00
trace_stat.c tracing: Switch trace_stat.c code over to use guard() 2024-12-26 10:38:37 -05:00
trace_stat.h
trace_synth.h
trace_syscalls.c
trace_uprobe.c tracing: uprobe-event: Allocate string buffers from heap 2025-07-24 00:21:58 +09:00
tracing_map.c
tracing_map.h