lkml.org 
[lkml]   [2021]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v14 5/8] arm64: mte: Enable TCO in functions that can read beyond buffer limits
From
Date
On 3/8/21 6:09 PM, Mark Rutland wrote:
>> +DECLARE_STATIC_KEY_FALSE(mte_async_mode);
> Can we please hide this behind something like:
>
> static inline bool system_uses_mte_async_mode(void)
> {
> return IS_ENABLED(CONFIG_KASAN_HW_TAGS) &&
> static_branch_unlikely(&mte_async_mode);
> }
>
> ... like we do for system_uses_ttbr0_pan()?
>

I agree, it is a cleaner solution. I will add it to v15.

> That way the callers are easier to read, and kernels built without
> CONFIG_KASAN_HW_TAGS don't have the static branch at all. I reckon you
> can put that in one of hte mte headers and include it where needed.

--
Regards,
Vincenzo

\
 
 \ /
  Last update: 2021-03-09 11:23    [W:0.096 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site