Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp877987pxf; Wed, 7 Apr 2021 13:58:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxiI6aLBlciyyed5JgWRFxev6o5aRdY97QSxe8Ylp0VPrI93fj8yWVH6tHlbHZ0Qb5wx4lV X-Received: by 2002:a17:906:a40b:: with SMTP id l11mr1131325ejz.473.1617829106551; Wed, 07 Apr 2021 13:58:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617829106; cv=none; d=google.com; s=arc-20160816; b=u03qE57XyOh5GsCdxxiZ1ivkijKHR1CToLMvLfiIyW9pFQH8dGZohR79SKizbXvdnZ gDjzaBEZ6UCtal1ZaxOiC7dKpMvOHx8651XO10746b/CPVwkoRQavPV4mFHiN6RoW0JQ UabbaMhWEhJPhy0k2TtWAcR6ga+pKxF7tYEs+qRPCu/gIuLsHfQeP9uyy21zj7xYag6W RspjGxED2xkbyLJleAth9fGvNWCjLfxbdRihnlnooNy+NHvDXKCEVbLOkyFQo463dhfo mqeEgWmUTNd8C6M12mE2Awda21RaovaEH9gxuhlXPrzHcz9BbVGcH90Pm1HjJ2vJIWP6 F8wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature:dkim-filter; bh=OjNI0DZH9/urCXQpfEs6TSNCboxu+3bxvdFvcM1Qw4Q=; b=izuBxTNtEKAw6oym0QevCNm2dWVGduWuA2h0bO3VLsAcSkwI5y5kQSE2kFr1KRNQJq t8YcZMmQzUMvlTDspgMbDv3iKkM+v2UvXdAZxsx7Q3EMnPKH212QPYnp7CPnaEk2F86D FNCzkli6jeqbnaZrWEbvE04NDKK0x2lVAZ/XbIFEvpu86+Qd4lYB6qTyt4S1XbJ8ZaPu YtI3IOK+4IJzamTN+0KnBTo4QZrAmwc+EaQnlCO5KIWnLBCP6t2fWwhIFxPph/iPPtfB JBxuSK3AP4toKszgpS2EDRcfZqE6TwlMHZw0pPg341NviN70PWtR2wFbPpySfqYWw9gz VSVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=XM1KIBS7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e24si6260266ejr.411.2021.04.07.13.58.03; Wed, 07 Apr 2021 13:58:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=XM1KIBS7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240668AbhDGMDJ (ORCPT + 99 others); Wed, 7 Apr 2021 08:03:09 -0400 Received: from conssluserg-03.nifty.com ([210.131.2.82]:22355 "EHLO conssluserg-03.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234967AbhDGMDI (ORCPT ); Wed, 7 Apr 2021 08:03:08 -0400 Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (authenticated) by conssluserg-03.nifty.com with ESMTP id 137C2id5015311; Wed, 7 Apr 2021 21:02:45 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-03.nifty.com 137C2id5015311 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1617796965; bh=OjNI0DZH9/urCXQpfEs6TSNCboxu+3bxvdFvcM1Qw4Q=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=XM1KIBS7XaynQPE//VYVuS5fbdljnPZ5rLD2RuUdS53DAHVkq17Izn+qR7y4roc9F 7h+nkzSllGw/y3E2FHOtI602T+yxJ8PHIf1+0nVzip59KMKHcYWzvMkgS6bdG1Iekm wa03FEcm5E6FtMEgz0+CmWAfaltGkAiRtvPhCmkhYs/fLYLCkMQcgvEV9afLkxdbkZ NR/mHnv0AdNdzn+x5eYbguJujHTYupPSE/5HSziCyq8/zC0YoIg2speRpclDwS256S 6RpNmGvjSAgdVosHsHI7RrKQ69LRPWo/3JVgtfQUbB1KZk9GjSI/aXp9eMc09QXdgu FZOwUkA9CbzqQ== X-Nifty-SrcIP: [209.85.214.178] Received: by mail-pl1-f178.google.com with SMTP id ay2so9223585plb.3; Wed, 07 Apr 2021 05:02:45 -0700 (PDT) X-Gm-Message-State: AOAM53217KgjQB4ov2lnV12pHSvWvX3MWLTpDGMGxu0qoZZ+aADJ/e7E V7mTLvmbbd5gQwKmeqJEY4hTTY9XnSbUPXxgsoQ= X-Received: by 2002:a17:902:d645:b029:e8:ec90:d097 with SMTP id y5-20020a170902d645b02900e8ec90d097mr2679684plh.47.1617796964118; Wed, 07 Apr 2021 05:02:44 -0700 (PDT) MIME-Version: 1.0 References: <20210313194836.372585-1-masahiroy@kernel.org> <20210313194836.372585-11-masahiroy@kernel.org> <20210331171238.GA141362@roeck-us.net> In-Reply-To: From: Masahiro Yamada Date: Wed, 7 Apr 2021 21:02:06 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 11/13] kconfig: do not use allnoconfig_y option To: Nick Desaulniers Cc: Guenter Roeck , Tiezhu Yang , Linux Kbuild mailing list , Andrew Morton , David Howells , Johannes Weiner , KP Singh , Kees Cook , Nathan Chancellor , Nick Terrell , Valentin Schneider , Vlastimil Babka , LKML , linux-mips@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 1, 2021 at 3:25 AM Nick Desaulniers wrote: > > On Wed, Mar 31, 2021 at 10:12 AM Guenter Roeck wrote: > > > > On Sun, Mar 14, 2021 at 04:48:34AM +0900, Masahiro Yamada wrote: > > > allnoconfig_y is a bad hack that sets a symbol to 'y' by allnoconfig. > > > > > > allnoconfig does not mean a minimum set of CONFIG options because a > > > bunch of prompts are hidden by 'if EMBEDDED' or 'if EXPERT', but I do > > > not like to do a workaround this way. > > > > > > Use the pre-existing feature, KCONFIG_ALLCONFIG, to provide a one > > > liner config fragment. CONFIG_EMBEDDED=y is still forced under > > > allnoconfig. > > > > > > No change in the .config file produced by 'make tinyconfig'. > > > > > > The output of 'make allnoconfig' will be changed; we will get > > > CONFIG_EMBEDDED=n because allnoconfig literally sets all symbols to n. > > > > > > Signed-off-by: Masahiro Yamada > > > > With this patch in place, mips:allnoconfig fails to build with > > the following error. > > > > Error log: > > WARNING: modpost: vmlinux.o(.text+0x9c70): Section mismatch in reference from the function reserve_exception_space() to the function .meminit.text:memblock_reserve() > > The function reserve_exception_space() references > > the function __meminit memblock_reserve(). > > This is often because reserve_exception_space lacks a __meminit > > annotation or the annotation of memblock_reserve is wrong. > > ERROR: modpost: Section mismatches detected. > > Set CONFIG_SECTION_MISMATCH_WARN_ONLY=y to allow them. > > make[2]: *** [scripts/Makefile.modpost:62: vmlinux.symvers] Error 1 > > make[2]: *** Deleting file 'vmlinux.symvers' > > make[1]: *** [Makefile:1292: vmlinux] Error 2 > > make: *** [Makefile:222: __sub-make] Error 2 > > Thanks for the report. I suspect this is related to allnoconfig > disabling CONFIG_ARCH_KEEP_MEMBLOCK, which changes the definition of > __init_memblock in include/linux/memblock.h. > > So allnoconfig would unselect CONFIG_ARCH_KEEP_MEMBLOCK, making > __init_memblock equivalent to __meminit triggering the above warning. > > arch/mips/Kconfig > 14: select ARCH_KEEP_MEMBLOCK if DEBUG_KERNEL > > so DEBUG_KERNEL is probably also disabled by allnoconfig. > > commit a8c0f1c634507 ("MIPS: Select ARCH_KEEP_MEMBLOCK if DEBUG_KERNEL > to enable sysfs memblock debug") > > probably should drop the `if DEBUG_KERNEL` part. Thanks. Could you please send a patch to mips ML? > > > > Guenter > > > > > --- > > > > > > init/Kconfig | 1 - > > > kernel/configs/tiny-base.config | 1 + > > > scripts/kconfig/Makefile | 3 ++- > > > 3 files changed, 3 insertions(+), 2 deletions(-) > > > create mode 100644 kernel/configs/tiny-base.config > > > > > > diff --git a/init/Kconfig b/init/Kconfig > > > index 46b87ad73f6a..beb8314fdf96 100644 > > > --- a/init/Kconfig > > > +++ b/init/Kconfig > > > @@ -1769,7 +1769,6 @@ config DEBUG_RSEQ > > > > > > config EMBEDDED > > > bool "Embedded system" > > > - option allnoconfig_y > > > select EXPERT > > > help > > > This option should be enabled if compiling the kernel for > > > diff --git a/kernel/configs/tiny-base.config b/kernel/configs/tiny-base.config > > > new file mode 100644 > > > index 000000000000..2f0e6bf6db2c > > > --- /dev/null > > > +++ b/kernel/configs/tiny-base.config > > > @@ -0,0 +1 @@ > > > +CONFIG_EMBEDDED=y > > > diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile > > > index 7df3c0e4c52e..46f2465177f0 100644 > > > --- a/scripts/kconfig/Makefile > > > +++ b/scripts/kconfig/Makefile > > > @@ -102,7 +102,8 @@ configfiles=$(wildcard $(srctree)/kernel/configs/$@ $(srctree)/arch/$(SRCARCH)/c > > > > > > PHONY += tinyconfig > > > tinyconfig: > > > - $(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config > > > + $(Q)KCONFIG_ALLCONFIG=kernel/configs/tiny-base.config $(MAKE) -f $(srctree)/Makefile allnoconfig > > > + $(Q)$(MAKE) -f $(srctree)/Makefile tiny.config > > > > > > # CHECK: -o cache_dir= working? > > > PHONY += testconfig > > > -- > > > 2.27.0 > > > > > > > -- > Thanks, > ~Nick Desaulniers -- Best Regards Masahiro Yamada