Page MenuHomeFreeBSD

amd64/pmap: include opt_kstack_pages.h
ClosedPublic

Authored by khng on Aug 1 2025, 4:00 PM.
Tags
None
Referenced Files
F145821364: D51676.id.diff
Tue, Feb 24, 10:16 PM
Unknown Object (File)
Sat, Feb 21, 3:51 PM
Unknown Object (File)
Sun, Feb 8, 2:07 PM
Unknown Object (File)
Sat, Feb 7, 10:29 PM
Unknown Object (File)
Sat, Feb 7, 8:25 PM
Unknown Object (File)
Sat, Feb 7, 7:21 PM
Unknown Object (File)
Fri, Jan 30, 10:39 PM
Unknown Object (File)
Jan 22 2026, 11:28 PM
Subscribers

Details

Summary

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.

Sponsored by: Juniper Networks, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

khng requested review of this revision.Aug 1 2025, 4:00 PM

But that use of KSTACK_PAGES matches the definition of BOOTSTACK_SIZE in amd64/locore.S, which also doesn't include opt_kstack_pages.h. So both files should include it.

But that use of KSTACK_PAGES matches the definition of BOOTSTACK_SIZE in amd64/locore.S, which also doesn't include opt_kstack_pages.h. So both files should include it.

It should be fine. KSTACK_PAGES is defined in ${OBJTOP}/sys/GENERIC-KASAN/assym.inc rather.

But that use of KSTACK_PAGES matches the definition of BOOTSTACK_SIZE in amd64/locore.S, which also doesn't include opt_kstack_pages.h. So both files should include it.

It should be fine. KSTACK_PAGES is defined in ${OBJTOP}/sys/GENERIC-KASAN/assym.inc rather.

Ok. It still doesn't hurt to include it explicitly, like arm64/locore.S does.

This revision is now accepted and ready to land.Aug 1 2025, 4:24 PM
This revision now requires review to proceed.Aug 1 2025, 4:37 PM

Seems ok to me. The tag in the commit title should just be "amd64: ..." now.

This revision is now accepted and ready to land.Aug 1 2025, 4:38 PM
This revision was automatically updated to reflect the committed changes.

Ok. It still doesn't hurt to include it explicitly, like arm64/locore.S does.

It absolutely does hurt. Breaks the build, actually. Please revert.