aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/trace-event-scripting.c
diff options
context:
space:
mode:
authorBeau Belgrave <[email protected]>2023-04-25 22:51:07 +0000
committerSteven Rostedt (Google) <[email protected]>2023-04-26 01:04:45 +0000
commit41d8fba193b36ac1208d8f8489390b93675fab7b (patch)
tree9ccc495aa71ee5ccf650ab62275e777b6843029e /tools/perf/util/trace-event-scripting.c
parenttracing/user_events: Prevent same address and bit per process (diff)
downloadkernel-41d8fba193b36ac1208d8f8489390b93675fab7b.tar.gz
kernel-41d8fba193b36ac1208d8f8489390b93675fab7b.zip
tracing/user_events: Limit max fault-in attempts
When event enablement changes, user_events attempts to update a bit in the user process. If a fault is hit, an attempt to fault-in the page and the write is retried if the page made it in. While this normally requires a couple attempts, it is possible a bad user process could attempt to cause infinite loops. Ensure fault-in attempts either sync or async are limited to a max of 10 attempts for each update. When the max is hit, return -EFAULT so another attempt is not made in all cases. Link: https://lkml.kernel.org/r/[email protected] Suggested-by: Steven Rostedt (Google) <[email protected]> Signed-off-by: Beau Belgrave <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions