]> git.baikalelectronics.ru Git - kernel.git/commit
kasan: use separate (un)poison implementation for integrated init
authorPeter Collingbourne <pcc@google.com>
Wed, 2 Jun 2021 23:52:28 +0000 (16:52 -0700)
committerWill Deacon <will@kernel.org>
Fri, 4 Jun 2021 18:32:21 +0000 (19:32 +0100)
commit801b88414044a09933acecc836b758855a63c3b1
treece4fb6dc7bc68fd8047f7d65b0b55caa310c1b68
parente40d7b07d013e441aeee6ca157666261bcc974e5
kasan: use separate (un)poison implementation for integrated init

Currently with integrated init page_alloc.c needs to know whether
kasan_alloc_pages() will zero initialize memory, but this will start
becoming more complicated once we start adding tag initialization
support for user pages. To avoid page_alloc.c needing to know more
details of what integrated init will do, move the unpoisoning logic
for integrated init into the HW tags implementation. Currently the
logic is identical but it will diverge in subsequent patches.

For symmetry do the same for poisoning although this logic will
be unaffected by subsequent patches.

Signed-off-by: Peter Collingbourne <pcc@google.com>
Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>
Link: https://linux-review.googlesource.com/id/I2c550234c6c4a893c48c18ff0c6ce658c7c67056
Link: https://lore.kernel.org/r/20210602235230.3928842-3-pcc@google.com
Signed-off-by: Will Deacon <will@kernel.org>
include/linux/kasan.h
mm/kasan/common.c
mm/kasan/hw_tags.c
mm/mempool.c
mm/page_alloc.c