linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ulf Magnusson <ulfalizer@gmail.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Arnd Bergmann <arnd@arndb.de>, Kees Cook <keescook@chromium.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	Sam Ravnborg <sam@ravnborg.org>,
	Michal Marek <michal.lkml@markovi.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH 04/23] kconfig: set SYMBOL_AUTO to the symbol marked with defconfig_list
Date: Thu, 1 Mar 2018 18:11:47 +0100	[thread overview]
Message-ID: <CAFkk2KQaOF3UijN5164G9wyJnym6QHoGSPKMtB8jsS9FRtRdAQ@mail.gmail.com> (raw)
In-Reply-To: <CAK7LNARjgqCbTO7x_8kzzfCdU6HWNyFLNZzwfU2hYRZmWHT_kw@mail.gmail.com>

On Thu, Mar 1, 2018 at 4:05 PM, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> 2018-02-17 3:38 GMT+09:00 Masahiro Yamada <yamada.masahiro@socionext.com>:
>> The 'defconfig_list' is a weird attribute.  If the '.config' is
>> missing, conf_read_simple() iterates over all visible defaults,
>> then it uses the first one for which fopen() succeeds.
>>
>> config DEFCONFIG_LIST
>>         string
>>         depends on !UML
>>         option defconfig_list
>>         default "/lib/modules/$UNAME_RELEASE/.config"
>>         default "/etc/kernel-config"
>>         default "/boot/config-$UNAME_RELEASE"
>>         default "$ARCH_DEFCONFIG"
>>         default "arch/$ARCH/defconfig"
>>
>> However, like other symbols, the first visible default is always
>> written out to the .config file.  This might be different from what
>> has been actually used.
>>
>> For example, on my machine, the third one "/boot/config-$UNAME_RELEASE"
>> is opened, like follows:
>>
>>   $ rm .config
>>   $ make oldconfig 2>/dev/null
>>   scripts/kconfig/conf  --oldconfig Kconfig
>>   #
>>   # using defaults found in /boot/config-4.4.0-112-generic
>>   #
>>   *
>>   * Restart config...
>>   *
>>   *
>>   * IRQ subsystem
>>   *
>>   Expose irq internals in debugfs (GENERIC_IRQ_DEBUGFS) [N/y/?] (NEW)
>>
>> However, the resulted .config file contains the first one since it is
>> visible:
>>
>>   $ grep CONFIG_DEFCONFIG_LIST .config
>>   CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
>>
>> In order to stop confusing people, prevent this CONFIG option from
>> being written to the .config file.
>>
>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>> ---
>
>
> This one is almost trivial, so I will pick it up now.
>
> Ulf, do you have any comment about this one?
>
>
>
>
>> I'd like to fix the root case of this weirdness later.
>> (and other 'option' attributes as well)
>>
>> But, this series is focusing a more important work in a bigger picture.
>>
>> For now, I decided to just hide CONFIG_DEFCONFIG_LIST
>> from the .config file.
>>
>>
>>  scripts/kconfig/menu.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
>> index 9922285..36cd3e1 100644
>> --- a/scripts/kconfig/menu.c
>> +++ b/scripts/kconfig/menu.c
>> @@ -212,6 +212,7 @@ void menu_add_option(int token, char *arg)
>>                         sym_defconfig_list = current_entry->sym;
>>                 else if (sym_defconfig_list != current_entry->sym)
>>                         zconf_error("trying to redefine defconfig symbol");
>> +               sym_defconfig_list->flags |= SYMBOL_AUTO;
>>                 break;
>>         case T_OPT_ENV:
>>                 prop_add_env(arg);
>> --
>> 2.7.4
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>
>
> --
> Best Regards
> Masahiro Yamada

Seems reasonable to me.

Reviewed-by: Ulf Magnusson <ulfalizer@gmail.com>

Cheers,
Ulf

  reply	other threads:[~2018-03-01 17:11 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-16 18:38 [PATCH 00/23] kconfig: move compiler capability tests to Kconfig Masahiro Yamada
2018-02-16 18:38 ` [PATCH 01/23] kbuild: remove kbuild cache Masahiro Yamada
2018-02-16 18:38 ` [PATCH 02/23] kbuild: remove CONFIG_CROSS_COMPILE support Masahiro Yamada
2018-02-16 18:38 ` [PATCH 03/23] kconfig: add xstrdup() helper Masahiro Yamada
2018-03-01 15:02   ` Masahiro Yamada
2018-02-16 18:38 ` [PATCH 04/23] kconfig: set SYMBOL_AUTO to the symbol marked with defconfig_list Masahiro Yamada
2018-03-01 15:05   ` Masahiro Yamada
2018-03-01 17:11     ` Ulf Magnusson [this message]
2018-02-16 18:38 ` [PATCH 05/23] kconfig: move and rename sym_expand_string_value() Masahiro Yamada
2018-02-16 18:38 ` [PATCH 06/23] kconfig: reference environments directly and remove 'option env=' syntax Masahiro Yamada
2018-02-18 11:15   ` Ulf Magnusson
2018-02-16 18:38 ` [PATCH 07/23] kconfig: add function support and implement 'shell' function Masahiro Yamada
2018-02-17 16:16   ` Ulf Magnusson
2018-02-19 15:57     ` Masahiro Yamada
2018-02-19 17:50       ` Ulf Magnusson
2018-02-19 20:06         ` Ulf Magnusson
2018-02-19 22:06           ` Ulf Magnusson
2018-02-16 18:38 ` [PATCH 08/23] kconfig: add 'macro' keyword to support user-defined function Masahiro Yamada
2018-02-16 19:49   ` Nicolas Pitre
2018-02-16 23:51     ` Ulf Magnusson
2018-02-17  2:30       ` Nicolas Pitre
2018-02-17  4:29         ` Ulf Magnusson
2018-02-17  4:44           ` Nicolas Pitre
2018-02-17  6:06             ` Ulf Magnusson
2018-02-16 18:38 ` [PATCH 09/23] kconfig: add 'cc-option' macro Masahiro Yamada
2018-02-16 18:38 ` [PATCH 10/23] stack-protector: test compiler capability in Kconfig and drop AUTO mode Masahiro Yamada
2018-02-21  4:39   ` Masahiro Yamada
2018-02-16 18:38 ` [PATCH 11/23] kconfig: add 'shell-stdout' function Masahiro Yamada
2018-02-16 19:17   ` Linus Torvalds
2018-02-19  4:48     ` Ulf Magnusson
2018-02-19 17:44       ` Linus Torvalds
2018-02-19 18:01         ` Linus Torvalds
2018-02-19 18:54           ` Ulf Magnusson
2018-02-21  4:59           ` Masahiro Yamada
2018-02-21 16:41             ` Ulf Magnusson
2018-02-21 17:01             ` Linus Torvalds
2018-02-16 18:38 ` [PATCH 12/23] kconfig: replace $UNAME_RELEASE with function call Masahiro Yamada
2018-02-16 18:38 ` [PATCH 13/23] kconfig: expand environments/functions in (main)menu, comment, prompt Masahiro Yamada
2018-02-16 18:38 ` [PATCH 14/23] kconfig: show compiler version text in the top comment Masahiro Yamada
2018-02-16 18:38 ` [PATCH 15/23] kconfig: add CC_IS_GCC and GCC_VERSION Masahiro Yamada
2018-02-16 18:38 ` [PATCH 16/23] kbuild: add clang-version.sh Masahiro Yamada
2018-02-16 18:38 ` [PATCH 17/23] kconfig: add CC_IS_CLANG and CLANG_VERSION Masahiro Yamada
2018-02-16 18:38 ` [PATCH 18/23] gcov: remove CONFIG_GCOV_FORMAT_AUTODETECT Masahiro Yamada
2018-02-16 18:38 ` [PATCH 19/23] kcov: imply GCC_PLUGINS and GCC_PLUGIN_SANCOV instead of select'ing them Masahiro Yamada
2018-02-16 18:38 ` [PATCH 20/23] gcc-plugins: always build plugins with C++ Masahiro Yamada
2018-02-22 18:45   ` Emese Revfy
2018-02-23 12:37     ` Masahiro Yamada
2018-02-16 18:38 ` [PATCH 21/23] gcc-plugins: move GCC version check for PowerPC to Kconfig Masahiro Yamada
2018-02-22  5:04   ` Andrew Donnellan
2018-02-16 18:38 ` [PATCH 22/23] gcc-plugins: test GCC plugin support in Kconfig Masahiro Yamada
2018-02-16 18:38 ` [PATCH 23/23] gcc-plugins: enable GCC_PLUGINS for COMPILE_TEST Masahiro Yamada
2018-02-18 22:13 ` [PATCH 00/23] kconfig: move compiler capability tests to Kconfig Sam Ravnborg
2018-02-19 15:18   ` Ulf Magnusson
2018-02-21  7:38     ` Masahiro Yamada
2018-02-21  9:56       ` Arnd Bergmann
2018-02-21 10:20         ` Masahiro Yamada
2018-02-21 10:52           ` Arnd Bergmann
2018-02-21 12:57             ` Masahiro Yamada
2018-02-21 16:03               ` Arnd Bergmann
2018-02-21 21:39               ` Ulf Magnusson
2018-03-02  5:50                 ` Masahiro Yamada
2018-03-02  9:03                   ` Ulf Magnusson
2018-03-02  9:12                     ` Ulf Magnusson
2018-02-22  3:22               ` Michael Ellerman

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=CAFkk2KQaOF3UijN5164G9wyJnym6QHoGSPKMtB8jsS9FRtRdAQ@mail.gmail.com \
    --to=ulfalizer@gmail.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=keescook@chromium.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=rdunlap@infradead.org \
    --cc=sam@ravnborg.org \
    --cc=torvalds@linux-foundation.org \
    --cc=yamada.masahiro@socionext.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;
as well as URLs for NNTP newsgroup(s).