kasan: Add abbreviation KASAN to init log
Subsystems (2)
PATCH 1/1 kasan: Add abbreviation KASAN to init log
sudo dmesg | grep -i kasan comes back empty, at least confusing me. So, include the abbreviation in the log line.
Before:
KernelAddressSanitizer initialized (generic)
After:
KernelAddressSanitizer (KASAN) initialized (generic)
--- mm/kasan/generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/kasan/generic.c +1 -1
@@ -44,7 +44,7 @@ void __init kasan_init_generic(void) {kasan_enable (); -pr_info ("KernelAddressSanitizer initialized (generic)\n" ); +pr_info ("KernelAddressSanitizer (KASAN) initialized (generic)\n" ); }/*
Signature · 1 line
2.53.0
Quoted 2 lines · Paul Menzel
sudo dmesg | grep -i kasancomes back empty, at least confusing me.
Yeah, I think this bit me once or twice as well.
Quoted 11 lines
So, include the abbreviation in the log line.
Before:
KernelAddressSanitizer initialized (generic)
After:
KernelAddressSanitizer (KASAN) initialized (generic)
Signed-off-by Paul Menzel <[email protected]>
Andrey Konovalov
reviewerQuoted 22 lines · Paul Menzel
sudo dmesg | grep -i kasancomes back empty, at least confusing me. So, include the abbreviation in the log line.Before:
KernelAddressSanitizer initialized (generic)
After:
KernelAddressSanitizer (KASAN) initialized (generic)
Signed-off-by Paul Menzel <[email protected]>--- mm/kasan/generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/kasan/generic.c +0
-0
mm/kasan/generic.c void __init kasan_init_generic(void) · line 47
Quoted 5 lines
mm/kasan/generic.c +1
-1@@ -44,7 +44,7 @@ void __init kasan_init_generic(void) {kasan_enable (); -pr_info ("KernelAddressSanitizer initialized (generic)\n" ); +pr_info ("KernelAddressSanitizer (KASAN) initialized (generic)\n" );
I think a better change would be to add:
#define pr_fmt(fmt) "kasan: " fmt
to generic.c.
Similar to how this is done in sw/hw_tags.c.
And arguably, we could also drop the "KernelAddressSanitizer" part from init messages, to make them look like:
kasan: initialized (generic)
Thank you!
Quoted 6 lines
mm/kasan/generic.c +0
-1}/* -- 2.53.0
Dear Andrey,
Am 13.04.26 um 14:37 schrieb Andrey Konovalov:
Quoted 31 lines · Paul Menzel
Quoted 22 lines
sudo dmesg | grep -i kasancomes back empty, at least confusing me. So, include the abbreviation in the log line.Before:
KernelAddressSanitizer initialized (generic)
After:
KernelAddressSanitizer (KASAN) initialized (generic)
Signed-off-by Paul Menzel <[email protected]>--- mm/kasan/generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/kasan/generic.c +0
-0mm/kasan/generic.c void __init kasan_init_generic(void) · line 47
Quoted 5 lines
mm/kasan/generic.c +1
-1@@ -44,7 +44,7 @@ void __init kasan_init_generic(void) {kasan_enable (); -pr_info ("KernelAddressSanitizer initialized (generic)\n" ); +pr_info ("KernelAddressSanitizer (KASAN) initialized (generic)\n" );I think a better change would be to add:
Quoted 5 lines
#define
pr_fmt(fmt)"kasan: " fmtto
generic.c.Similar to how this is done in
sw/hw_tags.c.
Isn’t there only this one log line in generic.c, so the generalization is not really needed?
Quoted 4 lines
And arguably, we could also drop the "KernelAddressSanitizer" part from init messages, to make them look like:
kasan: initialized (generic)
Some analysis scripts might already depend on KernelAddressSanitizer, so I’d keep it.
Kind regards,
Paul
Andrey Konovalov
reviewerQuoted 11 lines · Paul Menzel
Quoted 8 lines
I think a better change would be to add:
#define
pr_fmt(fmt)"kasan: " fmtto
generic.c.Similar to how this is done in
sw/hw_tags.c.Isn’t there only this one log line in
generic.c, so the generalization is not really needed?
I think we can add the generalization just in case more pr_info calls get added in the future. And also to keep the code similar to the other modes.
Quoted 7 lines
Quoted 5 lines
And arguably, we could also drop the "KernelAddressSanitizer" part from init messages, to make them look like:
kasan: initialized (generic)
Some analysis scripts might already depend on KernelAddressSanitizer, so I’d keep it.
Makes sense.
Thanks!