Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp970562rdb; Wed, 24 Jan 2024 00:10:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IGnobCv80BOO5ZFvYL1jbH7Xb70aAckgT5MZHtEAWhhaTZDkhMzTNpzLiLD8Nh5V2/wABgY X-Received: by 2002:a05:6358:d399:b0:176:9436:1f21 with SMTP id mp25-20020a056358d39900b0017694361f21mr232644rwb.26.1706083838374; Wed, 24 Jan 2024 00:10:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706083838; cv=pass; d=google.com; s=arc-20160816; b=v29I0ikjpUb8IhoXbEvb9YdTg2XUc5Tw0VOrhtgLloIvuSd9V9+Sj1d6/V+CBcBxjm fsKhhH6dmck95Jcv9FZ+/zy8i4wxhKD3qXo2XPxdoKSVX9wtB18oAaCsgulb3eDHKORm QI6AjYyv5ZY4SGx1p8h1oJwI/B7BKMZpJ5uzJzb98dv+mIebrfvUQlJcT2n27BZ2yPTm G8rwl/XDELgJCAPqdIXswrqcPXyJavzhSsusJLzX8ZEJ++sfSEg6v0dy60SkRsCz+VNl 9wQ4tvNm2aDZjy4PTOOWE5yZbvGryZkuIOPq6ARyDr9R3zw9B7PPFTwOUDlE3LDsvpXP VwKg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=UwuX82FnNazdDrHO5+m47nJxCl57ZzNbFO/1mLufups=; fh=H5U8SK+H924fwGVQPudyy+OYa47r+Io+cV71nSudrLY=; b=ucuGYsAUfr4VqY8fTiWPjaAYBzO/rfIRNSBq7QQsiRTf0Qj0n5eYMqA/Lt85qfKFc5 ySKYZ1Y1A7Ak7WIt6IS8XNxez7CmEpRlbuGNAJD9IXl/IE8OCIDhsQuOxl98fCViMmtC TX2yV3kZ0GNHOCFRwgFv3IlV7Ci6Z4GYW/zKOnXcJSxU4Hokn6xiyneNz+RXKDfPvw3L 3DPaMBuUC8HW81eZx1UGaZtExDtt94udMRYoRxz7GZa2AsH9HPfZ8ZumxGLnk9FGC6Xc U74xWkw4m3SagIWq1m5s0m+qbPcGL8HIFw2tBGjS8ToOXUc1wFNJFAWzbBdoWTwacfxa 7Zyw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Be/4faaP"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-36613-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36613-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id g38-20020a635226000000b005d553239b15si241857pgb.493.2024.01.24.00.10.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 00:10:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-36613-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Be/4faaP"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-36613-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36613-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id F1B1F2952C6 for ; Wed, 24 Jan 2024 08:10:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B959D1754E; Wed, 24 Jan 2024 08:10:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Be/4faaP" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CC04217543; Wed, 24 Jan 2024 08:10:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706083829; cv=none; b=RcNQHfVlTr2p93EpCf2NN69C9wVkt+pXEoHg/UWBYWEm3/cdvJZ8xOXuANJ26lkIqdBvMuIdORh4DG5AMw+El4kJL518nQQ/e2gz98u8GNEnF2or6Eg0to6RYY+ALTV6WN3PMA2TXGOXs2//I3USNFUJqv5rookPKBw72WwMgFA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706083829; c=relaxed/simple; bh=+8JZzEIgT7bpfHtk9GT4g0y3Rz9s9vRremrPl4vsyUw=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=RVl+kRgKTbjTqSCFVKl6EdM+sO3OlP9ry6zfIC9jedY/23FHwAtKNp8gZt5OwMiKH883fNeGtcDF18JeW4c6updLpgwVukGx8fNdYxzTuHfE6pR3y6/GK9rxAF90vRQIUwXG03U2O8eVYa/sN5G21Kc8a0M1EHWKSuI99pmgaNM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Be/4faaP; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 63E3CC433C7; Wed, 24 Jan 2024 08:10:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706083829; bh=+8JZzEIgT7bpfHtk9GT4g0y3Rz9s9vRremrPl4vsyUw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Be/4faaPcYI1OaNiCQxY+rhTxphHihPLon5EhImRKLMRXYiCgW+XdSuGI0MvFT9AJ W7REz22h2JHp3pT6szGgbTb4/E4hr7ptDhkDUwOpekGvOEofB0OkTrM3qxZmIlhypM g+5WtBofMns+EV6Xu7V7lXE7rqBhDlLZWSYrUsLV/Du4GbzSFl4c4q69uxapC0PP7V pvK7MgPLjP2RsHwM3mAL1DAtThQ3aJw5F1hSvoTSdlQ1H60kuCnlrCAZHmpDEJqKEk Z/3vo6fBr6Onbw5Bj3xssvDEYoRIXHZsDjkvdd2m+O/zcVSWFIe0v8OUHJ7ba9JCCp kW1hcsG67EXyw== Received: by mail-ot1-f46.google.com with SMTP id 46e09a7af769-6e0d86d4659so3653378a34.1; Wed, 24 Jan 2024 00:10:29 -0800 (PST) X-Gm-Message-State: AOJu0YydmYtS/ckvdyJNittW3ZMHYxly/lMYVly6+9IonZfpvpn2D7MF z1VYh0vTtHwvI+iLC+lOknbyRoIwD7zVPTB8/n0llFst8lX5spLpzCo9ukqd8O4P3j+BSVFZ67e CYKR2zTq0OR/Q0j/Z9t3d5+qCYQ0= X-Received: by 2002:a05:6870:2102:b0:210:b031:9b14 with SMTP id f2-20020a056870210200b00210b0319b14mr2971101oae.116.1706083828725; Wed, 24 Jan 2024 00:10:28 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231125163559.824210-1-masahiroy@kernel.org> In-Reply-To: From: Masahiro Yamada Date: Wed, 24 Jan 2024 17:09:52 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] kconfig: remove unneeded symbol_empty variable To: Yoann Congal Cc: Geert Uytterhoeven , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Linux-Renesas , Vegard Nossum Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jan 24, 2024 at 12:11=E2=80=AFAM Yoann Congal wrote: > > Le 23/01/2024 =C3=A0 13:54, Geert Uytterhoeven a =C3=A9crit : > > Hi Yamada-san, > > Hello, > > > On Sat, Nov 25, 2023 at 5:36=E2=80=AFPM Masahiro Yamada wrote: > >> This is used only for initializing other variables. > >> > >> Use the empty string "". > >> > >> Please note newval.tri is unused for S_INT/HEX/STRING. > >> > >> Signed-off-by: Masahiro Yamada > > > > Thanks for your patch, which is now commit 4e244c10eab345a7 > > ("kconfig: remove unneeded symbol_empty variable") in v6.8-rc1. > > > > When running "make _defconfig" with _defconfig an SMP > > defconfig without explicit configuration of CONFIG_LOG_CPU_MAX_BUF_SHIF= T, > > the aforementioned commit causes a change in the generated .config: > > > > -CONFIG_LOG_CPU_MAX_BUF_SHIFT=3D12 > > +CONFIG_LOG_CPU_MAX_BUF_SHIFT=3D0 > > > > It looks like CONFIG_BASE_SMALL=3D0 is treated as a string instead of > > the integer number zero? > > > > init/Kconfig=3Dconfig LOG_CPU_MAX_BUF_SHIFT > > init/Kconfig- int "CPU kernel log buffer size contribution (13 =3D> 8 > > KB, 17 =3D> 128KB)" > > init/Kconfig- depends on SMP > > init/Kconfig- range 0 21 > > init/Kconfig: default 12 if !BASE_SMALL > > init/Kconfig: default 0 if BASE_SMALL > > > > Note that reverting 4e244c10eab345a7 is not sufficient to fix the issue= . > > Also reverting commit 6262afa10ef7cc8f ("kconfig: default to zero if > > int/hex symbol lacks default property") does fix it. > > (Since I'd really like 6262afa10ef7cc8f ("kconfig: default to zero if int= /hex symbol lacks default property") to stay, allow me to try to help) > > The problem is quite easy to reproduce: > $ make x86_64_defconfig > $ grep 'LOG_CPU_MAX_BUF_SHIFT\|BASE_SMALL\|BASE_FULL' .config > CONFIG_LOG_CPU_MAX_BUF_SHIFT=3D0 > CONFIG_BASE_FULL=3Dy > CONFIG_BASE_SMALL=3D0 > Here, CONFIG_LOG_CPU_MAX_BUF_SHIFT should be 12 not 0. I could not produce it in this way. I ran the same commands as yours. CONFIG_LOG_CPU_MAX_BUF_SHIFT=3D12 for me. masahiro@zoe:~/ref/linux(master)$ git describe v6.8-rc1-29-g615d30064886 masahiro@zoe:~/ref/linux(master)$ git diff masahiro@zoe:~/ref/linux(master)$ make x86_64_defconfig # # No change to .config # masahiro@zoe:~/ref/linux(master)$ grep 'LOG_CPU_MAX_BUF_SHIFT\|BASE_SMALL\|BASE_FULL' .config CONFIG_LOG_CPU_MAX_BUF_SHIFT=3D12 CONFIG_BASE_FULL=3Dy CONFIG_BASE_SMALL=3D0 > > For what it is worth, CONFIG_BASE_SMALL is defined as an int but is only = used as a bool : > $ git grep BASE_SMALL > arch/x86/include/asm/mpspec.h:#if CONFIG_BASE_SMALL =3D=3D 0 > drivers/tty/vt/vc_screen.c:#define CON_BUF_SIZE (CONFIG_BASE_SMALL ? 25= 6 : PAGE_SIZE) > include/linux/threads.h:#define PID_MAX_DEFAULT (CONFIG_BASE_SMALL ? 0x= 1000 : 0x8000) > include/linux/threads.h:#define PID_MAX_LIMIT (CONFIG_BASE_SMALL ? PAGE= _SIZE * 8 : \ > include/linux/udp.h:#define UDP_HTABLE_SIZE_MIN (CONFIG_BASE_SM= ALL ? 128 : 256) > include/linux/xarray.h:#define XA_CHUNK_SHIFT (CONFIG_BASE_SM= ALL ? 4 : 6) > init/Kconfig: default 12 if !BASE_SMALL > init/Kconfig: default 0 if BASE_SMALL > init/Kconfig:config BASE_SMALL > kernel/futex/core.c:#if CONFIG_BASE_SMALL > kernel/user.c:#define UIDHASH_BITS (CONFIG_BASE_SMALL ? 3 : 7) > > Maybe we should change CONFIG_BASE_SMALL to the bool type? > > I'll poke around to see if I can understand why a int=3D"0" is true for k= config. > > Regards, > -- > Yoann Congal > Smile ECS - Tech Expert > --=20 Best Regards Masahiro Yamada