WSL2-Linux-Kernel/arch
Andrey Konovalov d9b6f90794 arm64: kasan: allow to init memory when setting tags
Patch series "kasan: integrate with init_on_alloc/free", v3.

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.

This patch (of 5):

This change adds an argument to mte_set_mem_tag_range() that allows to
enable memory initialization when settinh the allocation tags.  The
implementation uses stzg instruction instead of stg when this argument
indicates to initialize memory.

Combining setting allocation tags with memory initialization will improve
HW_TAGS KASAN performance when init_on_alloc/free is enabled.

This change doesn't integrate memory initialization with KASAN, this is
done is subsequent patches in this series.

Link: https://lkml.kernel.org/r/cover.1615296150.git.andreyknvl@google.com
Link: https://lkml.kernel.org/r/d04ae90cc36be3fe246ea8025e5085495681c3d7.1615296150.git.andreyknvl@google.com
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Acked-by: Marco Elver <elver@google.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Peter Collingbourne <pcc@google.com>
Cc: Evgenii Stepanov <eugenis@google.com>
Cc: Branislav Rankov <Branislav.Rankov@arm.com>
Cc: Kevin Brodsky <kevin.brodsky@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-04-30 11:20:41 -07:00
..
alpha Kbuild updates for v5.13 2021-04-29 14:24:39 -07:00
arc
arm ARM: mm: add missing pud_page define to 2-level page tables 2021-04-30 11:20:39 -07:00
arm64 arm64: kasan: allow to init memory when setting tags 2021-04-30 11:20:41 -07:00
csky mm: move page_mapping_file to pagemap.h 2021-04-30 11:20:37 -07:00
h8300
hexagon
ia64 ia64: module: fix symbolizer crash on fdescr 2021-04-30 11:20:35 -07:00
m68k \n 2021-04-29 10:51:29 -07:00
microblaze Microblaze patches for 5.13-rc1 2021-04-29 11:36:47 -07:00
mips mm: move page_mapping_file to pagemap.h 2021-04-30 11:20:37 -07:00
nds32
nios2 mm: move page_mapping_file to pagemap.h 2021-04-30 11:20:37 -07:00
openrisc
parisc \n 2021-04-29 10:51:29 -07:00
powerpc mm/vmalloc: remove unmap_kernel_range 2021-04-30 11:20:40 -07:00
riscv
s390 Networking changes for 5.13. 2021-04-29 11:57:23 -07:00
sh mm: move page_mapping_file to pagemap.h 2021-04-30 11:20:37 -07:00
sparc mm/vmalloc: fix HUGE_VMAP regression by enabling huge pages in vmalloc_to_page 2021-04-30 11:20:39 -07:00
um
x86 mm/vmalloc: provide fallback arch huge vmap support functions 2021-04-30 11:20:40 -07:00
xtensa mm/memtest: add ARCH_USE_MEMTEST 2021-04-30 11:20:36 -07:00
.gitignore
Kconfig mm/vmalloc: hugepage vmalloc mappings 2021-04-30 11:20:40 -07:00