From 62e9c1e8ecee87a86052ffeeca382f1252f7aef6 Mon Sep 17 00:00:00 2001 From: Thorsten Blum Date: Sun, 22 Dec 2024 23:31:57 +0100 Subject: [PATCH] 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 Link: https://lore.kernel.org/r/20241222223157.135164-2-thorsten.blum@linux.dev Signed-off-by: Kees Cook --- kernel/stackleak.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 +#include #include #include @@ -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[] = {