Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Aug 2025 16:41:01 GMT
From:      Ka Ho Ng <khng@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: d5ec97156d33 - main - amd64: include opt_kstack_pages.h
Message-ID:  <202508011641.571Gf1wS014099@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by khng:

URL: https://cgit.FreeBSD.org/src/commit/?id=d5ec97156d3314f979629968f76151c2d35a1e62

commit d5ec97156d3314f979629968f76151c2d35a1e62
Author:     Ka Ho Ng <khng@FreeBSD.org>
AuthorDate: 2025-08-01 16:29:58 +0000
Commit:     Ka Ho Ng <khng@FreeBSD.org>
CommitDate: 2025-08-01 16:40:54 +0000

    amd64: include opt_kstack_pages.h
    
    This fixes an early KASAN initialization panic in
    pmap_san_enter_early_alloc_4k, when a non-default value is specified for
    KSTACK_PAGES in the build config file.
    
    Also, rearrange amd64/locore.S's #include order to match the
    counterparts of other architectures. And amd64/locore.S now also
    explicitly include opt_kstack_pages.h as well.
    
    Sponsored by:   Juniper Networks, Inc.
    MFC after:      7 days
    Reviewed by:    markj
    Differential Revision:  https://reviews.freebsd.org/D51676
---
 sys/amd64/amd64/locore.S | 5 +++--
 sys/amd64/amd64/pmap.c   | 1 +
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/sys/amd64/amd64/locore.S b/sys/amd64/amd64/locore.S
index 2be555b25160..62f5ee2a6998 100644
--- a/sys/amd64/amd64/locore.S
+++ b/sys/amd64/amd64/locore.S
@@ -30,13 +30,14 @@
  * SUCH DAMAGE.
  */
 
+#include "assym.inc"
+#include "opt_kstack_pages.h"
+
 #include <machine/asmacros.h>
 #include <machine/psl.h>
 #include <machine/pmap.h>
 #include <machine/specialreg.h>
 
-#include "assym.inc"
-
 /*
  * Compiled KERNBASE location
  */
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index 8df082f6c5dc..6369498210d9 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -104,6 +104,7 @@
  */
 
 #include "opt_ddb.h"
+#include "opt_kstack_pages.h"
 #include "opt_pmap.h"
 #include "opt_vm.h"
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202508011641.571Gf1wS014099>