mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-14 17:53:39 +00:00
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>
This commit is contained in:
parent
e3f6a42272
commit
62e9c1e8ec
@ -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[] = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user