Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 02 Aug 2025 18:36:25 +0200
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@FreeBSD.org>
To:        Ka Ho Ng <khng@FreeBSD.org>
Cc:        src-committers@FreeBSD.org,  dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   Re: git: d5ec97156d33 - main - amd64: include opt_kstack_pages.h
Message-ID:  <86ldo17kae.fsf@ltc.des.dev>
In-Reply-To: <202508011641.571Gf1wS014099@gitrepo.freebsd.org> (Ka Ho Ng's message of "Fri, 1 Aug 2025 16:41:01 GMT")
References:  <202508011641.571Gf1wS014099@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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
>=20=20=20=20=20
>     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.
>=20=20=20=20=20
>     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.
>=20=20=20=20=20
>     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 [-Werro=
r,-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
--=20
Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86ldo17kae.fsf>