linux-stable/kernel/trace
Beau Belgrave d401b72458 tracing/user_events: Use refcount instead of atomic for ref tracking
User processes could open up enough event references to cause rollovers.
These could cause use after free scenarios, which we do not want.
Switching to refcount APIs prevent this, but will leak memory once
saturated.

Once saturated, user processes can still use the events. This prevents
a bad user process from stopping existing telemetry from being emitted.

Link: https://lkml.kernel.org/r/20220728233309.1896-5-beaub@linux.microsoft.com
Link: https://lore.kernel.org/all/2059213643.196683.1648499088753.JavaMail.zimbra@efficios.com/

Reported-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Beau Belgrave <beaub@linux.microsoft.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2022-09-29 10:17:36 -04:00
..
rv rv/monitor: Add __init/__exit annotations to module init/exit funcs 2022-09-26 18:10:51 -04:00
blktrace.c blktrace: Fix the blk_fill_rwbs() kernel-doc header 2022-07-15 13:10:04 -06:00
bpf_trace.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-06-23 12:33:24 -07:00
bpf_trace.h
error_report-traces.c
fgraph.c arm64 fixes for 5.19-rc1: 2022-06-03 14:05:34 -07:00
fprobe.c fprobe: Resolve symbols with ftrace_lookup_symbols 2022-05-10 14:42:06 -07:00
ftrace.c ftrace: Fix recursive locking direct_mutex in ftrace_modify_direct_caller 2022-09-27 14:48:27 -04:00
ftrace_internal.h
Kconfig rv: Add Runtime Verification (RV) interface 2022-07-30 14:01:28 -04:00
kprobe_event_gen_test.c tracing: kprobe: Make gen test module work in arm and riscv 2022-09-26 16:04:47 -04:00
Makefile rv: Add Runtime Verification (RV) interface 2022-07-30 14:01:28 -04:00
pid_list.c tracing: Cleanup double word in comment 2022-04-26 17:58:50 -04:00
pid_list.h
power-traces.c
preemptirq_delay_test.c
rethook.c rethook: Reject getting a rethook if RCU is not watching 2022-06-17 21:53:35 +02:00
ring_buffer.c ring-buffer: Add ring_buffer_wake_waiters() 2022-09-28 20:27:43 -04:00
ring_buffer_benchmark.c
rpm-traces.c
synth_event_gen_test.c
trace.c tracing: Fix spelling mistake "preapre" -> "prepare" 2022-09-29 10:17:35 -04:00
trace.h tracing: Move struct filter_pred into trace_events_filter.c 2022-09-26 13:01:10 -04:00
trace_benchmark.c tracing: Add numeric delta time to the trace event benchmark 2022-09-26 13:01:09 -04:00
trace_benchmark.h tracing: Add numeric delta time to the trace event benchmark 2022-09-26 13:01:09 -04:00
trace_boot.c tracing: Initialize integer variable to prevent garbage return value 2022-05-26 21:13:00 -04:00
trace_branch.c
trace_clock.c
trace_dynevent.c tracing: Auto generate event name when creating a group of events 2022-07-24 19:11:17 -04:00
trace_dynevent.h
trace_entries.h
trace_eprobe.c tracing/eprobe: Fix alloc event dir failed when event name no set 2022-09-27 14:48:26 -04:00
trace_event_perf.c tracing/perf: Fix double put of trace event when init fails 2022-08-21 15:56:07 -04:00
trace_events.c tracing: Have filter accept "common_cpu" to be consistent 2022-08-21 15:56:08 -04:00
trace_events_filter.c tracing/filter: Call filter predicate functions directly via a switch statement 2022-09-26 13:01:10 -04:00
trace_events_filter_test.h
trace_events_hist.c tracing/hist: Call hist functions directly via a switch statement 2022-09-26 13:01:10 -04:00
trace_events_inject.c tracing: Support __rel_loc relative dynamic data location attribute 2021-12-06 15:37:21 -05:00
trace_events_synth.c tracing: Fix strncpy warning in trace_events_synth.c 2022-03-11 11:49:24 -05:00
trace_events_trigger.c tracing: Fix to check event_mutex is held while accessing trigger list 2022-09-06 22:26:00 -04:00
trace_events_user.c tracing/user_events: Use refcount instead of atomic for ref tracking 2022-09-29 10:17:36 -04:00
trace_export.c
trace_functions.c ftrace: disable preemption when recursion locked 2021-10-27 11:21:49 -04:00
trace_functions_graph.c
trace_hwlat.c trace/hwlat: make use of the helper function kthread_run_on_cpu() 2022-01-15 16:30:24 +02:00
trace_irqsoff.c
trace_kdb.c
trace_kprobe.c tracing: Auto generate event name when creating a group of events 2022-07-24 19:11:17 -04:00
trace_kprobe_selftest.c
trace_kprobe_selftest.h
trace_mmiotrace.c
trace_nop.c
trace_osnoise.c tracing/osnoise: Fix possible recursive locking in stop_per_cpu_kthreads 2022-09-26 16:05:18 -04:00
trace_output.c tracing: Remove usage of list iterator after the loop body 2022-04-27 17:19:30 -04:00
trace_output.h
trace_preemptirq.c tracing: hold caller_addr to hardirq_{enable,disable}_ip 2022-09-06 22:26:00 -04:00
trace_printk.c
trace_probe.c tracing/probes: Have kprobes and uprobes use $COMM too 2022-08-21 15:56:08 -04:00
trace_probe.h tracing/eprobe: Add eprobe filter support 2022-09-26 13:01:08 -04:00
trace_probe_tmpl.h
trace_recursion_record.c tracing: Use trace_create_file() to simplify creation of tracefs entries 2022-05-26 21:12:52 -04:00
trace_sched_switch.c sched/tracing: Append prev_state to tp args instead 2022-05-12 00:37:11 +02:00
trace_sched_wakeup.c sched/tracing: Append prev_state to tp args instead 2022-05-12 00:37:11 +02:00
trace_selftest.c tracing: Reset the function filter after completing trampoline/graph selftest 2022-05-25 16:57:37 -04:00
trace_selftest_dynamic.c
trace_seq.c
trace_stack.c
trace_stat.c
trace_stat.h
trace_synth.h
trace_syscalls.c tracing: Make tp_printk work on syscall tracepoints 2022-04-26 17:58:52 -04:00
trace_uprobe.c Tracing updates for 5.20 / 6.0 2022-08-05 09:41:12 -07:00
tracing_map.c tracing: Fix tracing_map_sort_entries() kernel-doc comment 2022-04-26 17:58:51 -04:00
tracing_map.h