Received: by 10.223.185.116 with SMTP id b49csp1046599wrg; Fri, 16 Feb 2018 11:25:33 -0800 (PST) X-Google-Smtp-Source: AH8x225YrFVNiJYCWxGTz3fTtQXHGCPTU6i3Q/wP4jFqoyE1/YRny2jA4KZq8AJqSCKzWMFIvchw X-Received: by 10.99.114.71 with SMTP id c7mr5817339pgn.283.1518809133852; Fri, 16 Feb 2018 11:25:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518809133; cv=none; d=google.com; s=arc-20160816; b=kj3QfEdzkVn91hy/WlmnhexUADpxQBnMF1GOUEq2He8kH/NvlagnqrnbPJUuT3wZj/ 85jJBVCQ+2da3xnGidorrC75nPJffWfmVsDRCedeKmXVUz7ExkzuKgQZ+m8f22g5DW1F Cv5CQABTmsWDlkS6fQlzFj98CY9Y7VtWPSccZHEDC6e0B2ku7bmAdwSe+fwtOkCtvoAl sRelNyQBnLV2S1H78e43IpM3BPniniO4erd9DQgUDuYwIxV4fPvAkFAo3RhrLkSEaDmM CDcLDibn1lgH37v3z5io01XLM4w63JHkNfJCr4Vf+eShRbhUslJkSa8OLycp6SiqyeXW WHgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=5v0/HrzAJlD9iSgCxrOCACm9vCZI9W7j1VzmKYbwL2Y=; b=qXgVWgX9TaZFyo+9V+oU8gAQed2kE/SzAhhqMVziHcn9/8gGaPsTqOmx5VfaMptTNB 7t9kKQ7LWeiccNSvpV5GbJdzGmHT9Ak6RX1X63on0MZBycrYmgNNYqxwfc0sAXZ+vhQp icgLcotiEaG3Mh79pqMnwrCRNAtyPKtms980CJ+m5/GEQgBcy0lFDBA1Y2Z6toIu5pO1 B4dRzhejxoLPCIk5j2rbO1+98oNrPXeXnQowWtiOVT4qAQH51wP8v6IzJLbRV4ms9Qpy xCYsrN+JVRZCZKyKw4x9OtsSTkrcQwaIzZMTNVKrmC4fHjsCZo3SfY3MAAcJ6tLHxbYD iNnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=jgNgpdo1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j6si347031pfg.9.2018.02.16.11.25.19; Fri, 16 Feb 2018 11:25:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=jgNgpdo1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751991AbeBPSsA (ORCPT + 99 others); Fri, 16 Feb 2018 13:48:00 -0500 Received: from conuserg-07.nifty.com ([210.131.2.74]:57766 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752657AbeBPSlS (ORCPT ); Fri, 16 Feb 2018 13:41:18 -0500 Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-07.nifty.com with ESMTP id w1GIdBT7013418; Sat, 17 Feb 2018 03:39:16 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com w1GIdBT7013418 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1518806356; bh=5v0/HrzAJlD9iSgCxrOCACm9vCZI9W7j1VzmKYbwL2Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jgNgpdo15pK7YCpwxKoWxUm00nyR5hItRvmC3oe9rT/yci83X39iW//SRa6VwbIuo kRFleu1DuHAilsgoIN4dX6uVdbw0aUWK6Lr23Augg7JKK8/XOTMeNbW+rSTtsyK8Od G7No9F/4cZzwxZOQGr9PCy4jLZ9yRsiD1iAh15eVu/meC1U/zoF2FmlhogGDq7LpBn 0ooIFAiHVEaHx5tIbbRhItynv+3CfmtXgkdI11+KO6plBVkc8ACkmF+BnF5aHCzhSz JLQsagApZQ0MoLO902pKr4nx5rwhIoyslaXSaeri7aKXnzq18c3qfGTWWbl8Oai2Bp FR1TdLg0qUJIA== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org, Linus Torvalds Cc: Greg Kroah-Hartman , Arnd Bergmann , Kees Cook , Randy Dunlap , Ulf Magnusson , Sam Ravnborg , Michal Marek , Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 04/23] kconfig: set SYMBOL_AUTO to the symbol marked with defconfig_list Date: Sat, 17 Feb 2018 03:38:32 +0900 Message-Id: <1518806331-7101-5-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518806331-7101-1-git-send-email-yamada.masahiro@socionext.com> References: <1518806331-7101-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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