summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorBeau Belgrave <beaub@linux.microsoft.com>2023-04-26 01:51:06 +0300
committerSteven Rostedt (Google) <rostedt@goodmis.org>2023-04-26 04:04:32 +0300
commit97bbce89bfdec9219dfcb60cd62b815a97cb29cb (patch)
tree9357a328f42b9c1c085e1afd8ec631fda88c276d /tools/perf/scripts/python/export-to-sqlite.py
parent17b439db21d5dbe70c419e982262621e5e6aba7f (diff)
downloadlinux-97bbce89bfdec9219dfcb60cd62b815a97cb29cb.tar.xz
tracing/user_events: Prevent same address and bit per process
User processes register an address and bit pair for events. If the same address and bit pair are registered multiple times in the same process, it can cause undefined behavior when events are enabled/disabled. When more than one are used, the bit could be turned off by another event being disabled, while the original event is still enabled. Prevent undefined behavior by checking the current mm to see if any event has already been registered for the address and bit pair. Return EADDRINUSE back to the user process if it's already being used. Update ftrace self-test to ensure this occurs properly. Link: https://lkml.kernel.org/r/20230425225107.8525-4-beaub@linux.microsoft.com Suggested-by: Doug Cook <dcook@linux.microsoft.com> Signed-off-by: Beau Belgrave <beaub@linux.microsoft.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions