lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 26 Aug 2021 14:16:09 +0200
From:   Boris Kolpackov <boris@...esynthesis.com>
To:     Masahiro Yamada <masahiroy@...nel.org>
Cc:     Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Jaroslav Kysela <perex@...ex.cz>,
        Kalle Valo <kvalo@...eaurora.org>,
        Liam Girdwood <lgirdwood@...il.com>,
        Luca Coelho <luciano.coelho@...el.com>,
        Mark Brown <broonie@...nel.org>,
        Peter Ujfalusi <peter.ujfalusi@...il.com>,
        Takashi Iwai <tiwai@...e.com>,
        ALSA Development Mailing List <alsa-devel@...a-project.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-wireless@...r.kernel.org, Networking <netdev@...r.kernel.org>
Subject: Re: [PATCH] kconfig: forbid symbols that end with '_MODULE'

Masahiro Yamada <masahiroy@...nel.org> writes:

> On Thu, Aug 26, 2021 at 12:42 AM Boris Kolpackov
> <boris@...esynthesis.com> wrote:
> >
> > Masahiro Yamada <masahiroy@...nel.org> writes:
> >
> > > Kconfig (syncconfig) generates include/generated/autoconf.h to make
> > > CONFIG options available to the pre-processor.
> > >
> > > The macros are suffixed with '_MODULE' for symbols with the value 'm'.
> > >
> > > Here is a conflict; CONFIG_FOO=m results in '#define CONFIG_FOO_MODULE 1',
> > > but CONFIG_FOO_MODULE=y also results in the same define.
> > >
> > > fixdep always assumes CONFIG_FOO_MODULE comes from CONFIG_FOO=m, so the
> > > dependency is not properly tracked for symbols that end with '_MODULE'.
> >
> > It seem to me the problem is in autoconf.h/fixdep, not in the Kconfig
> > language.
> 
> So, what is your suggestion for doing this correctly?
> (of course without breaking the compatibility
> because this is how the kernel is configured/built
> for more than 20 years)

Yes, I appreciate that fixing this properly may not be an option
due to backwards-compatibility. How about then moving the check
from the language closer to the place where it will actually be
an issue. Specifically, can the error be triggered when we are
about to write #define to autoconf.h and see that the name ends
with _MODULE?


> > I know you don't care, but I will voice my objection, for the record:
> > Kconfig is used by projects other than the Linux kernel and some of
> > them do not use the autoconf.h functionality. For such projects this
> > restriction seems arbitrary and potentially backwards-incompatible.
> 
> I am not sure what your worry is, but this check resides in
> "if (modules_sym)" conditional, so projects using Kconfig but
> not module functionality (e.g. buildroot) will not be  affected.

The Kconfig module semantics is actually general enough that a
project other than the Linux kernel could reuse it. (I've written
more on this possibility here[1]).

[1] https://build2.org/libbuild2-kconfig/doc/build2-kconfig-manual.xhtml#lang-mod

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ