lkml.org 
[lkml]   [2021]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH mm v4 28/39] kasan, page_alloc: allow skipping unpoisoning for HW_TAGS
    On Tue, 21 Dec 2021 at 13:14, Marco Elver <elver@google.com> wrote:
    >
    > On Mon, Dec 20, 2021 at 11:02PM +0100, andrey.konovalov@linux.dev wrote:
    > [...]
    > > +static inline bool should_skip_kasan_unpoison(gfp_t flags, bool init_tags)
    > > +{
    > > + /* Don't skip if a software KASAN mode is enabled. */
    > > + if (IS_ENABLED(CONFIG_KASAN_GENERIC) ||
    > > + IS_ENABLED(CONFIG_KASAN_SW_TAGS))
    > > + return false;
    > > +
    > > + /* Skip, if hardware tag-based KASAN is not enabled. */
    > > + if (!kasan_hw_tags_enabled())
    > > + return true;
    >
    > Same question here: why is IS_ENABLED(CONFIG_KASAN_{GENERIC,SW_TAGS})
    > check required if kasan_hw_tags_enabled() is always false if one of
    > those is configured?

    Hmm, I pattern-matched too quickly. In this case there's probably no
    way around it because the return value is different, so not exactly
    like the should_skip_init().

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