From: Julian Braha <julianbraha@gmail.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: nathan@kernel.org, nsc@kernel.org, xiang@kernel.org,
chao@kernel.org, zbestahu@gmail.com, jefflexu@linux.alibaba.com,
dhavale@google.com, hongbohbli@tencent.com, guochunhai@vivo.com,
michael.bommarito@gmail.com, kees@kernel.org,
vegard.nossum@oracle.com, sam@ravnborg.org,
u.kleine-koenig@pengutronix.de, mmarek@suse.cz,
linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org,
"open list:SERIAL DRIVERS" <linux-serial@vger.kernel.org>,
Arnd Bergmann <arnd@arndb.de>,
"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
mpe@ellerman.id.au
Subject: Re: [PATCH] kconfig: fix extra output from savedefconfig on out-of-range defaults
Date: Tue, 1 Sep 2026 14:48:47 +0100 [thread overview]
Message-ID: <0c445767-a4fa-4c44-b81a-64863be3de2d@gmail.com> (raw)
In-Reply-To: <CAMuHMdUywobKkt5Zozh3GdOW57nF_XhydJh7PaqTBoGB-2XvTQ@mail.gmail.com>
CC: Arnd, Christophe
On 9/1/26 11:17, Geert Uytterhoeven wrote:
> FTR, this will impact all defconfigs that restrict SERIAL_8250_NR_UARTS
> to a value lower than 4:
>
> config SERIAL_8250_NR_UARTS
> int "Maximum number of 8250/16550 serial ports"
> depends on SERIAL_8250
> default "4"
>
> config SERIAL_8250_RUNTIME_UARTS
> int "Number of 8250/16550 serial ports to register at runtime"
> depends on SERIAL_8250
> range 0 SERIAL_8250_NR_UARTS
> default "4"
I suspected that there could be some cases where these out-of-range
defaults were actually accidents and causing bugs, so I added a check
with my SMT solver [1], which also detected these two (powerpc-only):
config DATA_SHIFT
int "Data shift" if DATA_SHIFT_BOOL
default 24 if STRICT_KERNEL_RWX && PPC64
range 17 28 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) &&
PPC_BOOK3S_32
range 14 23 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) &&
PPC_8xx
range 20 24 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) &&
PPC_85xx
default 22 if STRICT_KERNEL_RWX && PPC_BOOK3S_32
default 18 if (DEBUG_PAGEALLOC || KFENCE) && PPC_BOOK3S_32
default 23 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) &&
PPC_8xx && \
(PIN_TLB_DATA || PIN_TLB_TEXT)
default 19 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) &&
PPC_8xx
default 24 if STRICT_KERNEL_RWX && PPC_85xx
default PAGE_SHIFT
config MODULES_SIZE
int "Size of modules/execmem area (In Mbytes)" if MODULES_SIZE_BOOL
range 1 256 if EXECMEM
default 64 if EXECMEM && PPC_BOOK3S_32
default 32 if EXECMEM && PPC_8xx
default 0
The DATA_SHIFT case may be bug, where it should be 12, but incorrectly
adjusts to 20 when:
PPC_85xx=y
DEBUG_PAGEALLOC=y
STRICT_KERNEL_RWX=n
PAGE_SHIFT=12
The MODULES_SIZE case seems harmless since the only systems using that
option are PPC_BOOK3S_32 and PPC_8xx.
Anyway, this change to savedefconfig would also affect those 2.
[1] https://github.com/julianbraha/kconfirm/tree/smt
- Julian Braha
next prev parent reply other threads:[~2026-09-01 13:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-30 22:11 Julian Braha
2026-08-31 12:36 ` Geert Uytterhoeven
2026-09-01 10:17 ` Geert Uytterhoeven
2026-09-01 13:48 ` Julian Braha [this message]
2026-09-03 22:28 ` Nathan Chancellor
2026-09-03 23:19 ` Julian Braha
2026-09-04 3:06 ` Nathan Chancellor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0c445767-a4fa-4c44-b81a-64863be3de2d@gmail.com \
--to=julianbraha@gmail.com \
--cc=arnd@arndb.de \
--cc=chao@kernel.org \
--cc=chleroy@kernel.org \
--cc=dhavale@google.com \
--cc=geert@linux-m68k.org \
--cc=guochunhai@vivo.com \
--cc=hongbohbli@tencent.com \
--cc=jefflexu@linux.alibaba.com \
--cc=kees@kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=michael.bommarito@gmail.com \
--cc=mmarek@suse.cz \
--cc=mpe@ellerman.id.au \
--cc=nathan@kernel.org \
--cc=nsc@kernel.org \
--cc=sam@ravnborg.org \
--cc=u.kleine-koenig@pengutronix.de \
--cc=vegard.nossum@oracle.com \
--cc=xiang@kernel.org \
--cc=zbestahu@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®