diff options
author | Punit Agrawal <punitagrawal@gmail.com> | 2021-09-14 23:38:46 +0900 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2021-09-30 21:24:04 -0400 |
commit | 5d6de7d7fb4b0f752adff80ca003b4fd4b467b64 (patch) | |
tree | 60d15a4284316f5e38b2bb2ed7caeecf9a1e857c /LICENSES | |
parent | 8f7262cd66699a4b02eb7549b35c81b2116aad95 (diff) | |
download | linux-5d6de7d7fb4b0f752adff80ca003b4fd4b467b64.tar.gz linux-5d6de7d7fb4b0f752adff80ca003b4fd4b467b64.tar.bz2 linux-5d6de7d7fb4b0f752adff80ca003b4fd4b467b64.zip |
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 <punitagrawal@gmail.com>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'LICENSES')
0 files changed, 0 insertions, 0 deletions