Re: [PATCH v7 16/41] kasan: rename KASAN_SHADOW_* to KASAN_GRANULE_*
From: Andrey Konovalov
Date: Wed Nov 04 2020 - 14:22:22 EST
On Wed, Nov 4, 2020 at 8:11 PM Vasily Gorbik <gor@xxxxxxxxxxxxx> wrote:
>
> On Mon, Nov 02, 2020 at 05:03:56PM +0100, Andrey Konovalov wrote:
> > This is a preparatory commit for the upcoming addition of a new hardware
> > tag-based (MTE-based) KASAN mode.
> >
> > The new mode won't be using shadow memory, but will still use the concept
> > of memory granules. Each memory granule maps to a single metadata entry:
> > 8 bytes per one shadow byte for generic mode, 16 bytes per one shadow byte
> > for software tag-based mode, and 16 bytes per one allocation tag for
> > hardware tag-based mode.
> >
> > Rename KASAN_SHADOW_SCALE_SIZE to KASAN_GRANULE_SIZE, and KASAN_SHADOW_MASK
> > to KASAN_GRANULE_MASK.
> >
> > Also use MASK when used as a mask, otherwise use SIZE.
> >
> > No functional changes.
> >
> > Signed-off-by: Andrey Konovalov <andreyknvl@xxxxxxxxxx>
> > Signed-off-by: Vincenzo Frascino <vincenzo.frascino@xxxxxxx>
> > Reviewed-by: Marco Elver <elver@xxxxxxxxxx>
> > ---
> > Change-Id: Iac733e2248aa9d29f6fc425d8946ba07cca73ecf
> > ---
> > Documentation/dev-tools/kasan.rst | 2 +-
> > lib/test_kasan.c | 2 +-
> > mm/kasan/common.c | 39 ++++++++++++++++---------------
> > mm/kasan/generic.c | 14 +++++------
> > mm/kasan/generic_report.c | 8 +++----
> > mm/kasan/init.c | 8 +++----
> > mm/kasan/kasan.h | 4 ++--
> > mm/kasan/report.c | 10 ++++----
> > mm/kasan/tags_report.c | 2 +-
> > 9 files changed, 45 insertions(+), 44 deletions(-)
>
> hm, this one got escaped somehow
>
> lib/test_kasan_module.c:
> 18 #define OOB_TAG_OFF (IS_ENABLED(CONFIG_KASAN_GENERIC) ? 0 : KASAN_SHADOW_SCALE_SIZE)
You mean it's not on the patch? It is, almost at the very top.
Or do you mean something else?