Page MenuHomeFreeBSD

amd64/pmap: include opt_kstack_pages.h
ClosedPublic

Authored by khng on Aug 1 2025, 4:00 PM.
Tags
None
Referenced Files
F172063855: D51676.id159587.diff
Tue, Sep 15, 8:54 PM
Unknown Object (File)
Sat, Sep 12, 11:40 PM
Unknown Object (File)
Sat, Sep 12, 11:36 PM
Unknown Object (File)
Sat, Sep 12, 11:36 PM
Unknown Object (File)
Sat, Sep 12, 11:33 PM
Unknown Object (File)
Fri, Sep 11, 2:23 PM
Unknown Object (File)
Wed, Sep 9, 6:17 AM
Unknown Object (File)
Sat, Sep 5, 1:36 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.