diff options
author | Thorsten Blum <thorsten.blum@linux.dev> | 2024-12-22 23:31:57 +0100 |
---|---|---|
committer | Kees Cook <kees@kernel.org> | 2024-12-22 20:28:11 -0800 |
commit | 62e9c1e8ecee87a86052ffeeca382f1252f7aef6 (patch) | |
tree | 45d179b3869053674fb8a021549f82c036832b14 /kernel/stackleak.c | |
parent | e3f6a42272e028c46695acc83fc7d7c42f2750ad (diff) |
stackleak: Use str_enabled_disabled() helper in stack_erasing_sysctl()
Remove hard-coded strings by using the str_enabled_disabled() helper
function.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://lore.kernel.org/r/20241222223157.135164-2-thorsten.blum@linux.dev
Signed-off-by: Kees Cook <kees@kernel.org>
Diffstat (limited to 'kernel/stackleak.c')
-rw-r--r-- | kernel/stackleak.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/stackleak.c b/kernel/stackleak.c index 39fd620a7db6..0f4804f28c61 100644 --- a/kernel/stackleak.c +++ b/kernel/stackleak.c @@ -15,6 +15,7 @@ #ifdef CONFIG_STACKLEAK_RUNTIME_DISABLE #include <linux/jump_label.h> +#include <linux/string_choices.h> #include <linux/sysctl.h> #include <linux/init.h> @@ -41,7 +42,7 @@ static int stack_erasing_sysctl(const struct ctl_table *table, int write, static_branch_enable(&stack_erasing_bypass); pr_warn("stackleak: kernel stack erasing is %s\n", - state ? "enabled" : "disabled"); + str_enabled_disabled(state)); return ret; } static struct ctl_table stackleak_sysctls[] = { |