Hi Kbuild/config people, Could you please take a look at this select problem. I attempted to solve this kconfig select logic problem a few years back but IIRC, my solution leaked memory or had some other problem I could not find solution to (and now the code has changed enough I couldn't even get my buggy solution easily forward-ported so I just dropped the solution and left just the test case into the patch). As the Kconfig problem back then got resolved through other means, I never mentioned this back then but seems the same problem likely happens here in some other form (bool selecting tristate that ends up getting only =m). On Mon, 10 Mar 2025, Kurt Borja wrote: > On Mon Mar 10, 2025 at 9:29 AM -05, Ilpo Järvinen wrote: > > On Sun, 9 Mar 2025, Kurt Borja wrote: > > > >> If ACPI_PLATFORM_PROFILE is selected by ALIENWARE_WMI_WMAX, the former > >> is forced to be at least =m, because the latter is a bool. > >> > >> This allows the following config: > >> > >> CONFIG_ALIENWARE_WMI=y > >> CONFIG_ACPI_PLATFORM_PROFILE=m > > > > Hi, > > > > selecting from =y should not result in =m for the other symbol. This is > > a bug in Kconfig infrastructure. > > > > I ran across this a few years back and even had a test case to prove the > > select bug but back then the original problem eventually was solved in a > > different way which no longer hit the problem. I never could figure out > > how to fix the kconfig logic though without breaking something and it > > ended up into low priority bin and never got solved. > > > > Sadly, it seems I've lost the test case patch that exhibits the bug > > somewhere... I'll try to look for it from my archived files. > > That's funny. > > I thought this was a Kconfig quirk, that resulted from the following > hierarchy: > > Type 0 1 2 > =============== ======= ======= ======= > Bool n y I think y should be 2 in both cases so select should cause the selected symbol to becomes =y but there's a logic problem deep in select logic in the kconfig code. I've attached the multi-select based reproducer test case. make testconfig runs kconfig selftests and results in CONFIG_A3=m despite CONFIG_C3=y selecting it. Please do not apply the test case before the problem is fixed. > Tristate n m y > > So a selecting the would force it to be at least =m. > > The same thing happens with depend, where a dependecy would be fulfilled > for a if a was at least =m. That's why in the kernel > robot report the linking error was also due to the HWMON dependency. > > Anyway, this patch could serve as a workaround if you feel it's > necessary. I'm going to put the HWMON dependecy in the ALIENWARE_WMI > symbol for my other series. > > -- i.