[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAeHK+y4cn5sZeoeL1SkwA70kFcgneZiFgs6EwVR=7SaHgi5LQ@mail.gmail.com>
Date: Thu, 1 Oct 2020 23:59:10 +0200
From: Andrey Konovalov <andreyknvl@...gle.com>
To: Marco Elver <elver@...gle.com>
Cc: Dmitry Vyukov <dvyukov@...gle.com>,
Vincenzo Frascino <vincenzo.frascino@....com>,
Catalin Marinas <catalin.marinas@....com>,
kasan-dev <kasan-dev@...glegroups.com>,
Andrey Ryabinin <aryabinin@...tuozzo.com>,
Alexander Potapenko <glider@...gle.com>,
Evgenii Stepanov <eugenis@...gle.com>,
Elena Petrova <lenaptr@...gle.com>,
Branislav Rankov <Branislav.Rankov@....com>,
Kevin Brodsky <kevin.brodsky@....com>,
Will Deacon <will.deacon@....com>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
Linux Memory Management List <linux-mm@...ck.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 32/39] kasan: define KASAN_GRANULE_SIZE for HW_TAGS
On Thu, Oct 1, 2020 at 7:58 PM <elver@...gle.com> wrote:
>
> On Fri, Sep 25, 2020 at 12:50AM +0200, Andrey Konovalov wrote:
> > Hardware tag-based KASAN has granules of MTE_GRANULE_SIZE. Define
> > KASAN_GRANULE_SIZE to MTE_GRANULE_SIZE for CONFIG_KASAN_HW_TAGS.
> >
> > Signed-off-by: Andrey Konovalov <andreyknvl@...gle.com>
> > Signed-off-by: Vincenzo Frascino <vincenzo.frascino@....com>
>
> Reviewed-by: Marco Elver <elver@...gle.com>
>
> > ---
> > Change-Id: I5d1117e6a991cbca00d2cfb4ba66e8ae2d8f513a
> > ---
> > mm/kasan/kasan.h | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/mm/kasan/kasan.h b/mm/kasan/kasan.h
> > index 9c73f324e3ce..bd51ab72c002 100644
> > --- a/mm/kasan/kasan.h
> > +++ b/mm/kasan/kasan.h
> > @@ -5,7 +5,13 @@
> > #include <linux/kasan.h>
> > #include <linux/stackdepot.h>
> >
> > +#if defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KASAN_SW_TAGS)
> > #define KASAN_GRANULE_SIZE (1UL << KASAN_SHADOW_SCALE_SHIFT)
> > +#else
> > +#include <asm/mte-kasan.h>
> > +#define KASAN_GRANULE_SIZE (MTE_GRANULE_SIZE)
>
> Why braces? Shouldn't MTE_GRANULE_SIZE already have braces?
Will fix in v4, thanks!
>
> > +#endif
> > +
> > #define KASAN_GRANULE_MASK (KASAN_GRANULE_SIZE - 1)
> > #define KASAN_GRANULE_PAGE (KASAN_GRANULE_SIZE << PAGE_SHIFT)
> >
> > --
> > 2.28.0.681.g6f77f65b4e-goog
> >
Powered by blists - more mailing lists