From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06245C4320E for ; Thu, 26 Aug 2021 02:25:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DC71D6103A for ; Thu, 26 Aug 2021 02:25:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237731AbhHZC0J (ORCPT ); Wed, 25 Aug 2021 22:26:09 -0400 Received: from conssluserg-05.nifty.com ([210.131.2.90]:27592 "EHLO conssluserg-05.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237584AbhHZC0I (ORCPT ); Wed, 25 Aug 2021 22:26:08 -0400 X-Greylist: delayed 79598 seconds by postgrey-1.27 at vger.kernel.org; Wed, 25 Aug 2021 22:26:07 EDT Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) (authenticated) by conssluserg-05.nifty.com with ESMTP id 17Q2OrdX005266; Thu, 26 Aug 2021 11:24:53 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-05.nifty.com 17Q2OrdX005266 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1629944693; bh=d+AhyAERcvxh7BiYq2ElJkN7iLAXCwUv6UgSMsPKu74=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=CNgzwNhGDlLum2EBrBPzXzIdyjpIas0Y+NGmekx/BDBP1E7B39hjx6NP8GxxzN8dc jxUGzqsab/nL5UXGq7eyHvnQLst1jqoH2G5HU2Z7uAqahoIiumWZL60vtzOA84ybQm Uh7MHhofTbhUAgfPNROwLJsKcUGdea4vVad0tZRjN1wBEMlJHjnF7WTcEiuktq5eyk ft80RzSYGRxTEeKtazr9OBbZ7buOkh/CMexm490CU+0JiQlxbZBTsQ1i5EUXbwZroa Q6NEhp6o1PtbnyOkcLONBqoQt2z6Lwr84DxJcnqTUiL2jjBcNXTLAyupBjah3P3tan Njey37RG80jsw== X-Nifty-SrcIP: [209.85.216.53] Received: by mail-pj1-f53.google.com with SMTP id j1so1137976pjv.3; Wed, 25 Aug 2021 19:24:53 -0700 (PDT) X-Gm-Message-State: AOAM532MFFhPHKVuJzSVjf2J14BZSXa/b725jm2lCSagUYgRP6ywpB1E jUjnsS8RlcWMZwzygyEsr4Gn3LjyIpfPLh7veQI= X-Google-Smtp-Source: ABdhPJw2EzwVb2S7fExRdpLksQsCs6YsBhQqntXqcomXVhX20PH/b2rdtnGXTKMbAl7GvXo5xuFBUf00afHREEkilBQ= X-Received: by 2002:a17:90a:a581:: with SMTP id b1mr1441813pjq.153.1629944692537; Wed, 25 Aug 2021 19:24:52 -0700 (PDT) MIME-Version: 1.0 References: <20210825041637.365171-1-masahiroy@kernel.org> In-Reply-To: From: Masahiro Yamada Date: Thu, 26 Aug 2021 11:24:15 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] kconfig: forbid symbols that end with '_MODULE' To: Boris Kolpackov Cc: Linux Kbuild mailing list , "David S. Miller" , Jakub Kicinski , Jaroslav Kysela , Kalle Valo , Liam Girdwood , Luca Coelho , Mark Brown , Peter Ujfalusi , Takashi Iwai , ALSA Development Mailing List , Linux Kernel Mailing List , linux-wireless@vger.kernel.org, Networking Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 26, 2021 at 12:42 AM Boris Kolpackov wrote: > > Masahiro Yamada 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. Partly a Kconfig problem since autoconf.h is generated by Kconfig. 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) > > > This commit makes Kconfig error out if it finds a symbol suffixed 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. -- Best Regards Masahiro Yamada