The branch main has been updated by khng:

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

commit d5ec97156d3314f979629968f76151c2d35a1e62
Author:     Ka Ho Ng <k...@freebsd.org>
AuthorDate: 2025-08-01 16:29:58 +0000
Commit:     Ka Ho Ng <k...@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"
 

Reply via email to