From ecf8c84447159cbf53cb212d392d8d3d11e6398e Mon Sep 17 00:00:00 2001 From: maxv Date: Fri, 1 Nov 2019 15:11:43 +0000 Subject: [PATCH] Fix KUBSAN: the kernel size now exceeds the mapping limit, so bump the limit. --- sys/arch/amd64/include/pmap.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/arch/amd64/include/pmap.h b/sys/arch/amd64/include/pmap.h index 51fd3f77473f..5eb8cf7a37c8 100644 --- a/sys/arch/amd64/include/pmap.h +++ b/sys/arch/amd64/include/pmap.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.62 2019/08/07 06:23:48 maxv Exp $ */ +/* $NetBSD: pmap.h,v 1.63 2019/11/01 15:11:43 maxv Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -68,6 +68,7 @@ #if defined(_KERNEL_OPT) #include "opt_xen.h" #include "opt_kasan.h" +#include "opt_kubsan.h" #endif #include @@ -139,7 +140,11 @@ extern pt_entry_t *pte_base; #define NKL4_KIMG_ENTRIES 1 #define NKL3_KIMG_ENTRIES 1 +#if defined(KUBSAN) +#define NKL2_KIMG_ENTRIES 64 /* really big kernel */ +#else #define NKL2_KIMG_ENTRIES 48 +#endif /* * Since kva space is below the kernel in its entirety, we start off