WSL2-Linux-Kernel/tools/perf/util
Elena Reshetova e34f5b11cd perf thread: convert thread.refcnt from atomic_t to refcount_t
The refcount_t type and corresponding API should be used instead of atomic_t
when the variable is used as a reference counter.

This allows to avoid accidental refcounter overflows that might lead to
use-after-free situations.

Signed-off-by: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: David Windsor <dwindsor@gmail.com>
Signed-off-by: Hans Liljestrand <ishkamiel@gmail.com>
Signed-off-by: Kees Kook <keescook@chromium.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: David Windsor <dwindsor@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Hans Liljestrand <ishkamiel@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kees Kook <keescook@chromium.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Matija Glavinic Pecotic <matija.glavinic-pecotic.ext@nokia.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: alsa-devel@alsa-project.org
Link: http://lkml.kernel.org/r/1487691303-31858-9-git-send-email-elena.reshetova@intel.com
[ Did missing conversion in __machine__remove_thread() ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-03-03 19:07:16 -03:00
..
c++ perf clang: Compile BPF script using builtin clang support 2016-12-05 15:51:45 -03:00
include
intel-pt-decoder perf intel pt decoder: clang has no -Wno-override-init 2017-02-14 16:18:02 -03:00
libunwind
scripting-engines Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-02-28 11:38:18 -08:00
Build perf tools: Move two variables usied in libperf from perf.c 2017-01-17 11:36:45 -03:00
PERF-VERSION-GEN
alias.c
annotate.c perf utils: Check verbose flag properly 2017-02-20 11:35:54 -03:00
annotate.h perf annotate: Fix jump target outside of function address range 2016-12-15 16:25:46 -03:00
auxtrace.c
auxtrace.h
block-range.c
block-range.h
bpf-loader.c perf bpf: Add missing newline in debug messages 2017-02-08 08:55:02 -03:00
bpf-loader.h
bpf-prologue.c
bpf-prologue.h
build-id.c
build-id.h
cache.h
call-path.c
call-path.h
callchain.c perf callchain: Reference count maps 2017-02-02 11:39:09 -03:00
callchain.h perf callchain: Reference count maps 2017-02-02 11:39:09 -03:00
cgroup.c perf cgroup: Convert cgroup_sel.refcnt from atomic_t to refcount_t 2017-03-03 19:07:14 -03:00
cgroup.h perf cgroup: Convert cgroup_sel.refcnt from atomic_t to refcount_t 2017-03-03 19:07:14 -03:00
cloexec.c
cloexec.h
color.c
color.h
comm.c perf comm: Convert comm_str.refcnt from atomic_t to refcount_t 2017-03-03 19:07:15 -03:00
comm.h
config.c perf tools: Propagate perf_config() errors 2017-01-27 12:23:33 -03:00
config.h perf config: Mark where are config items from (user or system) 2016-11-14 13:10:37 -03:00
counts.c
counts.h
cpumap.c perf cpumap: Convert cpu_map.refcnt from atomic_t to refcount_t 2017-03-03 19:07:14 -03:00
cpumap.h perf cpumap: Convert cpu_map.refcnt from atomic_t to refcount_t 2017-03-03 19:07:14 -03:00
cs-etm.h
ctype.c
data-convert-bt.c perf tools: Propagate perf_config() errors 2017-01-27 12:23:33 -03:00
data-convert-bt.h
data-convert.h
data.c
data.h
db-export.c
db-export.h
debug.c perf utils: Add perf_quiet_option() 2017-02-20 11:16:32 -03:00
debug.h perf utils: Add perf_quiet_option() 2017-02-20 11:16:32 -03:00
demangle-java.c
demangle-java.h
demangle-rust.c
demangle-rust.h
drv_configs.c
drv_configs.h
dso.c perf dso: Convert dso.refcnt from atomic_t to refcount_t 2017-03-03 19:07:15 -03:00
dso.h perf dso: Convert dso.refcnt from atomic_t to refcount_t 2017-03-03 19:07:15 -03:00
dwarf-aux.c
dwarf-aux.h
dwarf-regs.c
env.c perf tools: Replace _SC_NPROCESSORS_CONF with max_present_cpu in cpu_topology_map 2017-02-17 12:56:35 -03:00
env.h
event.c perf tools: Fix include of linux/mman.h 2017-02-08 16:06:21 -03:00
event.h
evlist.c perf evlist: Convert perf_map.refcnt from atomic_t to refcount_t 2017-03-03 19:07:15 -03:00
evlist.h perf evlist: Convert perf_map.refcnt from atomic_t to refcount_t 2017-03-03 19:07:15 -03:00
evsel.c perf evsel: Do not put a variable sized type not at the end of a struct 2017-02-14 15:56:54 -03:00
evsel.h perf evsel: Allow to ignore missing pid 2016-12-15 16:25:46 -03:00
evsel_fprintf.c perf symbols: No need to check if sym->name is NULL 2017-02-13 17:22:34 -03:00
find-vdso-map.c
genelf.c
genelf.h
genelf_debug.c
generate-cmdlist.sh
group.h
header.c perf tools: Replace _SC_NPROCESSORS_CONF with max_present_cpu in cpu_topology_map 2017-02-17 12:56:35 -03:00
header.h
help-unknown-cmd.c
help-unknown-cmd.h
hist.c perf utils: Check verbose flag properly 2017-02-20 11:35:54 -03:00
hist.h perf diff: Fix -o/--order option behavior (again) 2017-02-02 11:39:09 -03:00
intel-bts.c
intel-bts.h
intel-pt.c perf tools: Propagate perf_config() errors 2017-01-27 12:23:33 -03:00
intel-pt.h
intlist.c
intlist.h
jit.h
jitdump.c
jitdump.h
kvm-stat.h
levenshtein.c
levenshtein.h
llvm-utils.c perf tools: Propagate perf_config() errors 2017-01-27 12:23:33 -03:00
llvm-utils.h perf llvm: Extract helpers in llvm-utils.c 2016-12-05 15:51:42 -03:00
lzma.c
machine.c perf thread: convert thread.refcnt from atomic_t to refcount_t 2017-03-03 19:07:16 -03:00
machine.h perf machine: Add a kallsyms loading constructor 2017-01-11 16:48:00 -03:00
map.c perf map: Convert map_groups.refcnt from atomic_t to refcount_t 2017-03-03 19:07:15 -03:00
map.h perf map: Convert map_groups.refcnt from atomic_t to refcount_t 2017-03-03 19:07:15 -03:00
mem-events.c perf c2c report: Add struct c2c_stats::tot_hitm field 2016-11-23 10:44:05 -03:00
mem-events.h perf c2c report: Add struct c2c_stats::tot_hitm field 2016-11-23 10:44:05 -03:00
ordered-events.c
ordered-events.h
parse-branch-options.c
parse-branch-options.h
parse-events.c perf tools: Fail on using multiple bits long terms without value 2017-02-17 17:28:22 -03:00
parse-events.h perf tools: Fail on using multiple bits long terms without value 2017-02-17 17:28:22 -03:00
parse-events.l
parse-events.y perf tools: Fail on using multiple bits long terms without value 2017-02-17 17:28:22 -03:00
parse-regs-options.c
parse-regs-options.h
path.c
perf-hooks-list.h perf tools: Introduce perf hooks 2016-11-29 12:13:27 -03:00
perf-hooks.c perf tools: Pass context to perf hook functions 2016-12-05 15:51:42 -03:00
perf-hooks.h perf tools: Pass context to perf hook functions 2016-12-05 15:51:42 -03:00
perf_regs.c
perf_regs.h
pmu.c perf utils: Check verbose flag properly 2017-02-20 11:35:54 -03:00
pmu.h perf list: Add debug support for outputing alias string 2017-02-08 08:55:04 -03:00
pmu.l
pmu.y
probe-event.c perf utils: Check verbose flag properly 2017-02-20 11:35:54 -03:00
probe-event.h perf tools: Add missing struct definition in probe_event.h 2016-11-25 11:25:46 -03:00
probe-file.c
probe-file.h
probe-finder.c scripts/spelling.txt: add "an union" pattern and fix typo instances 2017-02-27 18:43:46 -08:00
probe-finder.h perf probe: Fix to probe on gcc generated functions in modules 2017-01-16 15:43:04 -03:00
pstack.c
pstack.h
python-ext-sources
python.c
quote.c
quote.h
rb_resort.h
rblist.c
rblist.h
record.c
session.c perf session: Fix DEBUG=1 build with clang 2017-02-17 12:27:26 -03:00
session.h
setup.py perf python: Filter out -specs=/a/b/c from the python binding cc options 2017-02-17 10:31:13 -03:00
sort.c perf utils: Check verbose flag properly 2017-02-20 11:35:54 -03:00
sort.h scripts/spelling.txt: add "an union" pattern and fix typo instances 2017-02-27 18:43:46 -08:00
srcline.c
stat-shadow.c
stat.c perf utils: Check verbose flag properly 2017-02-20 11:35:54 -03:00
stat.h
strbuf.c
strbuf.h
strfilter.c tools strfilter: Use __fallthrough 2017-02-08 17:31:10 -03:00
strfilter.h
string.c tools string: Use __fallthrough in perf_atoll() 2017-02-08 17:31:01 -03:00
strlist.c
strlist.h
svghelper.c
svghelper.h
symbol-elf.c perf utils: Check verbose flag properly 2017-02-20 11:35:54 -03:00
symbol-minimal.c
symbol.c perf symbols: Take into account symfs setting when reading file build ID 2017-02-08 09:28:55 -03:00
symbol.h perf script: Add option to stop printing callchain 2016-11-29 13:06:19 -03:00
symbol_fprintf.c perf symbols: No need to check if sym->name is NULL 2017-02-13 17:22:34 -03:00
syscalltbl.c
syscalltbl.h
target.c
target.h
term.c
term.h
thread-stack.c
thread-stack.h
thread.c perf thread: convert thread.refcnt from atomic_t to refcount_t 2017-03-03 19:07:16 -03:00
thread.h perf thread: convert thread.refcnt from atomic_t to refcount_t 2017-03-03 19:07:16 -03:00
thread_map.c perf thread_map: Correctly size buffer used with dirent->dt_name 2017-02-08 17:31:28 -03:00
thread_map.h perf thread_map: Add thread_map__remove function 2016-12-15 16:25:45 -03:00
time-utils.c perf tools: Move parse_nsec_time to time-utils.c 2016-12-01 13:02:39 -03:00
time-utils.h perf tools: Move parse_nsec_time to time-utils.c 2016-12-01 13:02:39 -03:00
tool.h
top.c
top.h
trace-event-info.c perf tools: Create for_each_event macro for tracepoints iteration 2017-01-31 16:20:08 -03:00
trace-event-parse.c perf util: Save pid-cmdline mapping into tracing header 2017-01-26 11:42:59 -03:00
trace-event-read.c perf util: Add more debug message on failure path 2017-01-26 11:43:00 -03:00
trace-event-scripting.c
trace-event.c
trace-event.h perf util: Save pid-cmdline mapping into tracing header 2017-01-26 11:42:59 -03:00
trigger.h
tsc.c
tsc.h
unwind-libdw.c
unwind-libdw.h
unwind-libunwind-local.c perf unwind: Fix looking up dwarf unwind stack info 2017-01-18 12:29:52 -03:00
unwind-libunwind.c
unwind.h
usage.c
util-cxx.h perf clang: Update test case to use real BPF script 2016-12-05 15:51:44 -03:00
util.c tools perf util: Make rm_rf(path) argument const 2017-01-31 16:20:07 -03:00
util.h tools perf util: Make rm_rf(path) argument const 2017-01-31 16:20:07 -03:00
values.c
values.h
vdso.c
vdso.h
xyarray.c
xyarray.h
zlib.c