Re: git: d5ec97156d33 - main - amd64: include opt_kstack_pages.h
- In reply to: Ka Ho Ng : "git: d5ec97156d33 - main - amd64: include opt_kstack_pages.h"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 02 Aug 2025 16:36:25 UTC
Ka Ho Ng <khng@FreeBSD.org> writes:
> 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
This breaks the build:
In file included from /workspace/src/sys/amd64/amd64/locore.S:34:
./opt_kstack_pages.h:1:9: error: 'KSTACK_PAGES' macro redefined [-Werror,-Wmacro-redefined]
1 | #define KSTACK_PAGES 5
| ^
./assym.inc:24:9: note: previous definition is here
24 | #define KSTACK_PAGES 0x5
| ^
1 error generated.
It also makes no sense as locore.S gets KSTACK_PAGES from assym.inc
which is generated at build time with the correct value (genassym.c
includes opt_kstack_pages.h). If you somehow managed to build a kernel
with inconsistent values of KSTACK_PAGES, it means something else you
did caused genassym not to get rebuilt and rerun.
DES
--
Dag-Erling Smørgrav - des@FreeBSD.org