diff options
author | Beau Belgrave | 2023-04-25 15:51:07 -0700 |
---|---|---|
committer | Steven Rostedt (Google) | 2023-04-25 21:04:45 -0400 |
commit | 41d8fba193b36ac1208d8f8489390b93675fab7b (patch) | |
tree | 9ccc495aa71ee5ccf650ab62275e777b6843029e /scripts | |
parent | 97bbce89bfdec9219dfcb60cd62b815a97cb29cb (diff) |
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/20230425225107.8525-5-beaub@linux.microsoft.com
Suggested-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Beau Belgrave <beaub@linux.microsoft.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions