lkml.org 
[lkml]   [2020]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v7 16/41] kasan: rename KASAN_SHADOW_* to KASAN_GRANULE_*
    On Wed, Nov 04, 2020 at 08:22:07PM +0100, Andrey Konovalov wrote:
    > On Wed, Nov 4, 2020 at 8:11 PM Vasily Gorbik <gor@linux.ibm.com> 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@google.com>
    > > > Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
    > > > Reviewed-by: Marco Elver <elver@google.com>
    > > > ---
    > > > 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.

    lib/test_kasan_module.c != lib/test_kasan.c

    I fetched your branch. And I had to fix it up to build old good kasan
    test module CONFIG_TEST_KASAN_MODULE=m

    \
     
     \ /
      Last update: 2020-11-04 20:31    [W:2.549 / U:0.088 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site