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

From: Vincenzo Frascino
Date: Wed Oct 06 2021 - 10:24:57 EST


On 10/6/21 2:19 PM, Andrey Konovalov wrote:
>> +static inline bool kasan_sync_fault_possible(void)
>> +{
>> + return !kasan_flag_async | kasan_flag_asymm;
> This should be just !kasan_flag_async.
>
> It seems that choosing one exclusive option out of 3 via two bools is
> confusing. How about an enum?
>
> enum kasan_mode {
> KASAN_MODE_SYNC,
> KASAN_MODE_ASYNC,
> KASAN_MODE_ASYMM,
> };
>
> enum kasan_mode kasan_mode __ro_after_init;
> EXPORT_SYMBOL_GPL(kasan_mode);

Fine by me. I will change the code in v3.

Thanks!

--
Regards,
Vincenzo