[PATCH mm 1/2] kasan: don't use read-only static keys

Andrey Konovalov andreyknvl at google.com
Wed Dec 9 13:24:15 EST 2020

__ro_after_init static keys are incompatible with usage in loadable kernel
modules and cause crashes. Don't use those, use normal static keys.

Signed-off-by: Andrey Konovalov <andreyknvl at google.com>


This fix can be squashed into
"kasan: add and integrate kasan boot parameters".

 mm/kasan/hw_tags.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/kasan/hw_tags.c b/mm/kasan/hw_tags.c
index c91f2c06ecb5..55bd6f09c70f 100644
--- a/mm/kasan/hw_tags.c
+++ b/mm/kasan/hw_tags.c
@@ -43,11 +43,11 @@ static enum kasan_arg_stacktrace kasan_arg_stacktrace __ro_after_init;
 static enum kasan_arg_fault kasan_arg_fault __ro_after_init;
 /* Whether KASAN is enabled at all. */
 /* Whether to collect alloc/free stack traces. */
 /* Whether panic or disable tag checking on fault. */
 bool kasan_flag_panic __ro_after_init;

More information about the linux-arm-kernel mailing list