diff options
| author | Ian Rogers <[email protected]> | 2023-04-17 21:51:57 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2023-04-17 21:51:57 +0000 |
| commit | c35ce1d918c12900375a60165c908de47856900d (patch) | |
| tree | e7038ce6e6efeaa5f7cfc5822f013cdb14780bb3 /tools/perf/scripts/python | |
| parent | perf dso: Add dso__filename_with_chroot() to reduce number of accesses to dso... (diff) | |
| download | kernel-c35ce1d918c12900375a60165c908de47856900d.tar.gz kernel-c35ce1d918c12900375a60165c908de47856900d.zip | |
perf namespaces: Add reference count checking
Add reference count checking controlled by REFCNT_CHECKING ifdef. The
reference count checking interposes an allocated pointer between the
reference counted struct on a get and frees the pointer on a put.
Accesses after a put cause faults and use after free, missed puts are
caughts as leaks and double puts are double frees.
This checking helped resolve a memory leak and use after free:
https://lore.kernel.org/linux-perf-users/CAP-5=fWZH20L4kv-BwVtGLwR=Em3AOOT+Q4QGivvQuYn5AsPRg@mail.gmail.com/
Signed-off-by: Ian Rogers <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Alexey Bayduraev <[email protected]>
Cc: Dmitriy Vyukov <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Riccardo Mancini <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: Stephen Brennan <[email protected]>
Link: https://lore.kernel.org/lkml/[email protected]
[ Extracted from a larger patch ]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
