diff options
| author | Punit Agrawal <[email protected]> | 2021-09-14 23:38:46 +0900 |
|---|---|---|
| committer | Steven Rostedt (VMware) <[email protected]> | 2021-09-30 21:24:04 -0400 |
| commit | 5d6de7d7fb4b0f752adff80ca003b4fd4b467b64 (patch) | |
| tree | 60d15a4284316f5e38b2bb2ed7caeecf9a1e857c /tools/perf/scripts/python/check-perf-trace.py | |
| parent | 8f7262cd66699a4b02eb7549b35c81b2116aad95 (diff) | |
kprobes: Use helper to parse boolean input from userspace
The "enabled" file provides a debugfs interface to arm / disarm
kprobes in the kernel. In order to parse the buffer containing the
values written from userspace, the callback manually parses the user
input to convert it to a boolean value.
As taking a string value from userspace and converting it to boolean
is a common operation, a helper kstrtobool_from_user() is already
available in the kernel. Update the callback to use the common helper
to parse the write buffer from userspace.
Link: https://lkml.kernel.org/r/163163032637.489837.10678039554832855327.stgit@devnote2
Signed-off-by: Punit Agrawal <[email protected]>
Acked-by: Masami Hiramatsu <[email protected]>
Signed-off-by: Masami Hiramatsu <[email protected]>
Signed-off-by: Steven Rostedt (VMware) <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/check-perf-trace.py')
0 files changed, 0 insertions, 0 deletions