From 4ce8167144d03cd4f0da6684f61d0fbc2f49b510 Mon Sep 17 00:00:00 2001 From: skrll Date: Fri, 13 Dec 2019 08:11:12 +0000 Subject: [PATCH] Fix KASAN support by calling kasan_shadow_map in pmap_growkernel --- sys/arch/aarch64/aarch64/pmap.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/arch/aarch64/aarch64/pmap.c b/sys/arch/aarch64/aarch64/pmap.c index fe4b2b76aca0..040ad8e574f1 100644 --- a/sys/arch/aarch64/aarch64/pmap.c +++ b/sys/arch/aarch64/aarch64/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.51 2019/12/10 18:08:32 ad Exp $ */ +/* $NetBSD: pmap.c,v 1.52 2019/12/13 08:11:12 skrll Exp $ */ /* * Copyright (c) 2017 Ryo Shimizu @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.51 2019/12/10 18:08:32 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.52 2019/12/13 08:11:12 skrll Exp $"); #include "opt_arm_debug.h" #include "opt_ddb.h" @@ -699,6 +699,9 @@ pmap_growkernel(vaddr_t maxkvaddr) UVMHIST_LOG(pmaphist, "maxkvaddr=%llx, pmap_maxkvaddr=%llx", maxkvaddr, pmap_maxkvaddr, 0, 0); + kasan_shadow_map((void *)pmap_maxkvaddr, + (size_t)(maxkvaddr - pmap_maxkvaddr)); + pmap_maxkvaddr = maxkvaddr; return maxkvaddr;