lkml.org 
[lkml]   [2021]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH mm v4 29/39] kasan, page_alloc: allow skipping memory init for HW_TAGS
On Mon, Dec 20, 2021 at 11:02PM +0100, andrey.konovalov@linux.dev wrote:
> From: Andrey Konovalov <andreyknvl@google.com>
[...]
> +static inline bool should_skip_init(gfp_t flags)
> +{
> + /* Don't skip if a software KASAN mode is enabled. */
> + if (IS_ENABLED(CONFIG_KASAN_GENERIC) ||
> + IS_ENABLED(CONFIG_KASAN_SW_TAGS))
> + return false;
> +
> + /* Don't skip, if hardware tag-based KASAN is not enabled. */
> + if (!kasan_hw_tags_enabled())
> + return false;

Why is the IS_ENABLED(CONFIG_KASAN_{GENERIC,SW_TAGS}) check above
required? Isn't kasan_hw_tags_enabled() always false if one of those is
configured?

\
 
 \ /
  Last update: 2021-12-21 13:12    [W:0.242 / U:0.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site