Page MenuHomeFreeBSD

amd64/pmap: include opt_kstack_pages.h
ClosedPublic

Authored by khng on Aug 1 2025, 4:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 10, 4:56 AM
Unknown Object (File)
Fri, Oct 10, 4:56 AM
Unknown Object (File)
Fri, Oct 10, 4:56 AM
Unknown Object (File)
Fri, Oct 10, 4:56 AM
Unknown Object (File)
Thu, Oct 9, 11:32 PM
Unknown Object (File)
Fri, Oct 3, 2:15 AM
Unknown Object (File)
Sun, Sep 28, 1:13 PM
Unknown Object (File)
Sun, Sep 28, 4:15 AM
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.