* [PATCH] stackleak: Use str_enabled_disabled() helper in stack_erasing_sysctl()
@ 2024-12-22 22:31 Thorsten Blum
2024-12-23 4:24 ` Kees Cook
0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2024-12-22 22:31 UTC (permalink / raw)
To: Kees Cook; +Cc: Thorsten Blum, linux-hardening, linux-kernel
Remove hard-coded strings by using the str_enabled_disabled() helper
function.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
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 <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[] = {
--
2.47.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-12-23 4:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-22 22:31 [PATCH] stackleak: Use str_enabled_disabled() helper in stack_erasing_sysctl() Thorsten Blum
2024-12-23 4:24 ` Kees Cook
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.