stackleak: Use str_enabled_disabled() helper in stack_erasing_sysctl()
PATCH 1/1 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 <[email protected]>
--- kernel/stackleak.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/stackleak.c +2 -1
@@ -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[] = {
Signature · 1 line
2.47.1
Kees Cook
AppliedQuoted 4 lines · Thorsten Blum
Remove hard-coded strings by using the
str_enabled_disabled()helper function.
Applied to for-next/hardening, thanks!
[1/1] stackleak: Use str_enabled_disabled() helper in stack_erasing_sysctl()
https://git.kernel.org/kees/c/dc941cde33f9
Take care,
Signature · 1 line
Kees Cook