Re: [PATCH 5/5] kasan: Extend KASAN mode kernel parameter

From: Vincenzo Frascino
Date: Mon Sep 20 2021 - 03:46:20 EST


Hi Marco,

On 9/16/21 12:43 PM, Marco Elver wrote:
>> + case KASAN_ARG_MODE_ASYMM:
>> + /* Asymm mode enabled. */
>> + kasan_flag_asymm = true;
>> + break;
>> }
>>
>> switch (kasan_arg_stacktrace) {
>> diff --git a/mm/kasan/kasan.h b/mm/kasan/kasan.h
>> index 3639e7c8bb98..a8be62058d32 100644
>> --- a/mm/kasan/kasan.h
>> +++ b/mm/kasan/kasan.h
> Shouldn't kasan.h also define kasan_asymm_mode_enabled() similar to
> kasan_async_mode_enabled()?
>
> And based on that, also use it where kasan_async_mode_enabled() is
> used in tests to ensure the tests do not fail. Otherwise, there is no
> purpose for kasan_flag_asymm.
>

I was not planning to have the tests shipped as part of this series, they will
come in a future one.

For what concerns kasan_flag_asymm, I agree with you it is meaningful only if
the tests are implemented hence I will remove it in v2.

Thanks for pointing this out.

> Thanks,
> -- Marco
>

--
Regards,
Vincenzo