From: Andrey Konovalov <andreyknvl@google.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Christoph Lameter <cl@linux.com>,
Pekka Enberg <penberg@kernel.org>,
David Rientjes <rientjes@google.com>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Vlastimil Babka <vbabka@suse.cz>,
Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>,
Vincenzo Frascino <vincenzo.frascino@arm.com>,
Dmitry Vyukov <dvyukov@google.com>,
Andrey Ryabinin <aryabinin@virtuozzo.com>,
Alexander Potapenko <glider@google.com>,
Marco Elver <elver@google.com>,
Peter Collingbourne <pcc@google.com>,
Evgenii Stepanov <eugenis@google.com>,
Branislav Rankov <Branislav.Rankov@arm.com>,
Kevin Brodsky <kevin.brodsky@arm.com>,
kasan-dev@googlegroups.com,
linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
Andrey Konovalov <andreyknvl@google.com>
Subject: [PATCH v3 0/5] kasan: integrate with init_on_alloc/free
Date: Tue, 9 Mar 2021 14:24:34 +0100 [thread overview]
Message-ID: <cover.1615296150.git.andreyknvl@google.com> (raw)
This patch series integrates HW_TAGS KASAN with init_on_alloc/free
by initializing memory via the same arm64 instruction that sets memory
tags.
This is expected to improve HW_TAGS KASAN performance when
init_on_alloc/free is enabled. The exact perfomance numbers are unknown
as MTE-enabled hardware doesn't exist yet.
Changes v2->v3:
- Move init variable check out of initialization loop in
mte_set_mem_tag_range().
Changes v1->v2:
- Add and use kasan_has_integrated_init() helper.
- Update comments to not explicitly mention relation between
HW_TAGS KASAN and memory init.
- Fix non initting memory with kasan=off by checking kasan_enabled()
instead of IS_ENABLED(CONFIG_KASAN_HW_TAGS).
Andrey Konovalov (5):
arm64: kasan: allow to init memory when setting tags
kasan: init memory in kasan_(un)poison for HW_TAGS
kasan, mm: integrate page_alloc init with HW_TAGS
kasan, mm: integrate slab init_on_alloc with HW_TAGS
kasan, mm: integrate slab init_on_free with HW_TAGS
arch/arm64/include/asm/memory.h | 4 +-
arch/arm64/include/asm/mte-kasan.h | 39 +++++++++++------
include/linux/kasan.h | 48 +++++++++++++-------
lib/test_kasan.c | 4 +-
mm/kasan/common.c | 45 +++++++++----------
mm/kasan/generic.c | 12 ++---
mm/kasan/kasan.h | 19 ++++----
mm/kasan/shadow.c | 10 ++---
mm/kasan/sw_tags.c | 2 +-
mm/mempool.c | 4 +-
mm/page_alloc.c | 37 +++++++++++-----
mm/slab.c | 43 ++++++++++--------
mm/slab.h | 17 ++++++--
mm/slub.c | 70 +++++++++++++++---------------
14 files changed, 207 insertions(+), 147 deletions(-)
--
2.30.1.766.gb4fecdf3b7-goog
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Andrey Konovalov <andreyknvl@google.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Christoph Lameter <cl@linux.com>,
Pekka Enberg <penberg@kernel.org>,
David Rientjes <rientjes@google.com>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Vlastimil Babka <vbabka@suse.cz>,
Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>,
Vincenzo Frascino <vincenzo.frascino@arm.com>,
Dmitry Vyukov <dvyukov@google.com>,
Andrey Ryabinin <aryabinin@virtuozzo.com>,
Alexander Potapenko <glider@google.com>,
Marco Elver <elver@google.com>,
Peter Collingbourne <pcc@google.com>,
Evgenii Stepanov <eugenis@google.com>,
Branislav Rankov <Branislav.Rankov@arm.com>,
Kevin Brodsky <kevin.brodsky@arm.com>,
kasan-dev@googlegroups.com,
linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
Andrey Konovalov <andreyknvl@google.com>
Subject: [PATCH v3 0/5] kasan: integrate with init_on_alloc/free
Date: Tue, 9 Mar 2021 14:24:34 +0100 [thread overview]
Message-ID: <cover.1615296150.git.andreyknvl@google.com> (raw)
This patch series integrates HW_TAGS KASAN with init_on_alloc/free
by initializing memory via the same arm64 instruction that sets memory
tags.
This is expected to improve HW_TAGS KASAN performance when
init_on_alloc/free is enabled. The exact perfomance numbers are unknown
as MTE-enabled hardware doesn't exist yet.
Changes v2->v3:
- Move init variable check out of initialization loop in
mte_set_mem_tag_range().
Changes v1->v2:
- Add and use kasan_has_integrated_init() helper.
- Update comments to not explicitly mention relation between
HW_TAGS KASAN and memory init.
- Fix non initting memory with kasan=off by checking kasan_enabled()
instead of IS_ENABLED(CONFIG_KASAN_HW_TAGS).
Andrey Konovalov (5):
arm64: kasan: allow to init memory when setting tags
kasan: init memory in kasan_(un)poison for HW_TAGS
kasan, mm: integrate page_alloc init with HW_TAGS
kasan, mm: integrate slab init_on_alloc with HW_TAGS
kasan, mm: integrate slab init_on_free with HW_TAGS
arch/arm64/include/asm/memory.h | 4 +-
arch/arm64/include/asm/mte-kasan.h | 39 +++++++++++------
include/linux/kasan.h | 48 +++++++++++++-------
lib/test_kasan.c | 4 +-
mm/kasan/common.c | 45 +++++++++----------
mm/kasan/generic.c | 12 ++---
mm/kasan/kasan.h | 19 ++++----
mm/kasan/shadow.c | 10 ++---
mm/kasan/sw_tags.c | 2 +-
mm/mempool.c | 4 +-
mm/page_alloc.c | 37 +++++++++++-----
mm/slab.c | 43 ++++++++++--------
mm/slab.h | 17 ++++++--
mm/slub.c | 70 +++++++++++++++---------------
14 files changed, 207 insertions(+), 147 deletions(-)
--
2.30.1.766.gb4fecdf3b7-goog
next reply other threads:[~2021-03-09 13:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-09 13:24 Andrey Konovalov [this message]
2021-03-09 13:24 ` [PATCH v3 0/5] kasan: integrate with init_on_alloc/free Andrey Konovalov
2021-03-09 13:24 ` [PATCH v3 1/5] arm64: kasan: allow to init memory when setting tags Andrey Konovalov
2021-03-09 13:24 ` Andrey Konovalov
2021-03-09 13:24 ` [PATCH v3 2/5] kasan: init memory in kasan_(un)poison for HW_TAGS Andrey Konovalov
2021-03-09 13:24 ` Andrey Konovalov
2021-03-09 13:24 ` [PATCH v3 3/5] kasan, mm: integrate page_alloc init with HW_TAGS Andrey Konovalov
2021-03-09 13:24 ` Andrey Konovalov
2021-03-09 13:24 ` [PATCH v3 4/5] kasan, mm: integrate slab init_on_alloc " Andrey Konovalov
2021-03-09 13:24 ` Andrey Konovalov
2021-03-09 13:24 ` [PATCH v3 5/5] kasan, mm: integrate slab init_on_free " Andrey Konovalov
2021-03-09 13:24 ` Andrey Konovalov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1615296150.git.andreyknvl@google.com \
--to=andreyknvl@google.com \
--cc=Branislav.Rankov@arm.com \
--cc=akpm@linux-foundation.org \
--cc=aryabinin@virtuozzo.com \
--cc=catalin.marinas@arm.com \
--cc=cl@linux.com \
--cc=dvyukov@google.com \
--cc=elver@google.com \
--cc=eugenis@google.com \
--cc=glider@google.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=kasan-dev@googlegroups.com \
--cc=kevin.brodsky@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pcc@google.com \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
--cc=vbabka@suse.cz \
--cc=vincenzo.frascino@arm.com \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.