Skip to content

Commit 0e81f6e

Browse files
tobluxakpm00
authored andcommitted
kasan: sw_tags: use str_on_off() helper in kasan_init_sw_tags()
Remove hard-coded strings by using the str_on_off() helper function. Link: https://lkml.kernel.org/r/20250116062403.2496-2-thorsten.blum@linux.dev Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Suggested-by: Anshuman Khandual <anshuman.khandual@arm.com> Reviewed-by: Alexander Potapenko <glider@google.com> Cc: Andrey Konovalov <andreyknvl@gmail.com> Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com> Cc: Dmitriy Vyukov <dvyukov@google.com> Cc: Vincenzo Frascino <vincenzo.frascino@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent cf929a2 commit 0e81f6e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mm/kasan/sw_tags.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include <linux/slab.h>
2727
#include <linux/stacktrace.h>
2828
#include <linux/string.h>
29+
#include <linux/string_choices.h>
2930
#include <linux/types.h>
3031
#include <linux/vmalloc.h>
3132
#include <linux/bug.h>
@@ -45,7 +46,7 @@ void __init kasan_init_sw_tags(void)
4546
kasan_init_tags();
4647

4748
pr_info("KernelAddressSanitizer initialized (sw-tags, stacktrace=%s)\n",
48-
kasan_stack_collection_enabled() ? "on" : "off");
49+
str_on_off(kasan_stack_collection_enabled()));
4950
}
5051

5152
/*

0 commit comments

Comments
 (0)