linux-uconsole/arch
Andrey Konovalov 0de58767b7 FROMGIT: 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: Stephen Rothwell <sfr@canb.auug.org.au>

(cherry picked from commit 75393a0acbc3c0fd2307622ef2b1d49e5f64916a
 https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git akpm)
Bug: 182930667
Signed-off-by: Alexander Potapenko <glider@google.com>
Change-Id: I986bcd4a94e6d75793dab04fcca2f2e9e3ebc4f9
2021-03-24 15:09:15 -07:00
..
alpha UPSTREAM: arch: move SA_* definitions to generic headers 2021-01-22 10:05:52 -08:00
arc arch/arc: add copy_user_page() to <asm/page.h> to fix build error on ARC 2021-01-19 18:27:26 +01:00
arm FROMLIST: ARM: kprobes: rewrite test-arm.c in UAL 2021-03-24 09:21:58 -07:00
arm64 FROMGIT: arm64: kasan: allow to init memory when setting tags 2021-03-24 15:09:15 -07:00
c6x Revert "Revert "uaccess: add infrastructure for kernel builds with set_fs()"" 2020-10-28 15:08:39 +01:00
csky Merge 5.10.20 into android12-5.10 2021-03-07 12:33:33 +01:00
h8300 Merge 5.10.17 into android12-5.10 2021-02-18 11:21:01 +01:00
hexagon local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
ia64 UPSTREAM: arch: move SA_* definitions to generic headers 2021-01-22 10:05:52 -08:00
m68k UPSTREAM: arch: move SA_* definitions to generic headers 2021-01-22 10:05:52 -08:00
microblaze local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
mips Merge 5.10.20 into android12-5.10 2021-03-07 12:33:33 +01:00
nds32 local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
nios2 nios2: fixed broken sys_clone syscall 2021-03-04 11:38:16 +01:00
openrisc sched/idle: Fix arch_cpu_idle() vs tracing 2020-11-24 16:47:35 +01:00
parisc This is the 5.10.21 stable release 2021-03-07 12:53:30 +01:00
powerpc This is the 5.10.21 stable release 2021-03-07 12:53:30 +01:00
riscv This is the 5.10.21 stable release 2021-03-07 12:53:30 +01:00
s390 Merge 5.10.20 into android12-5.10 2021-03-07 12:33:33 +01:00
sh This is the 5.10.11 stable release 2021-01-27 12:12:33 +01:00
sparc Merge 5.10.20 into android12-5.10 2021-03-07 12:33:33 +01:00
um Merge 5.10.20 into android12-5.10 2021-03-07 12:33:33 +01:00
x86 BACKPORT: kasan: remove redundant config option 2021-03-24 15:09:15 -07:00
xtensa UPSTREAM: arch: move SA_* definitions to generic headers 2021-01-22 10:05:52 -08:00
.gitignore
Kconfig ANDROID: Allow HAS_LTO_CLANG with KASAN_HW_TAGS 2021-03-06 01:39:52 +00:00