Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp3768681rdb; Wed, 27 Dec 2023 21:52:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IEeQtFRAqHPQXiUsPalttH5bAaeOIqpQF+E127QBS3BvvVPEjuNlfsgxy1m+N4oKFiQJMrs X-Received: by 2002:a05:6402:35c4:b0:554:89f6:3626 with SMTP id z4-20020a05640235c400b0055489f63626mr9841475edc.18.1703742747267; Wed, 27 Dec 2023 21:52:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703742747; cv=none; d=google.com; s=arc-20160816; b=ygTz6DvzOz45aaEfk3xd5ZFn9AkUjAWpFlRHlNMvN+DRiDNNyZwV/XP2Ozf3/rza/W /2sX++0hvVTAMDKpZ4ZXJj72BJzZ5E9JgIX5dMY0cNaSumExVvRlN0QonkxvRfdn4I1h dZaNru91WUgZRouW89hs38/S/WUo5+1VnoSsiAn4090EauvaHZLKglqZX+hJyVvEYVK4 bAwzt+Hhqpun5d7Z1VlwBNgqytY1z/XBi7CSfQIt5keQlM3ZTKkGhiD0mjHDcjZyYCsJ Pcuj7Qn4pBBLI3hjwxSjQjqf8TK/ODiLpmgPUKY3BGOT8VeE6eajrOPJDgM/2wsR6EOG tNCQ== ARC-Message-Signature: i=1; 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=f7MLraVP9QwLg0rDVio+i50pdPqXCBSQ9O3dkydmdrY=; fh=A2iV2WzePl4U3bLpo2qnuqO2IN2ZnfBtCUd1sH3oY9g=; b=du5e8K8Q6E2cdXKh6p6XvK5Q7KyJ9YZNX5hNhzgf1nIuyJqVRZ6d9bQXpjy1755BXY BYPF2b047R9I+2htsFYPio7EsrJiLLPkUyHZJbFlt6TnYlZxk8TCQ8CovmRtJD72x0Tm F7PSGQLDh0qa05hLPNB8a0yntZuZEpKD9w+0PHNkreZy/iLOVnaH7DF2f5f5XsiMOrFp eN7aABiIQMavGfRHXZT5m+EKKhPtpUydlKTrbqfPFbh/0KitBh19AeyL5q9wYnbaEIv1 7H7gf+PEzZFLIBKU+YI9En6NAa9AZ+DRBQDGydJQ/xJ0PaaMUkBYgCPEnH9k8ixFyAM8 uhmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=TWH9mAiX; spf=pass (google.com: domain of linux-kernel+bounces-12434-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12434-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id c20-20020a50d654000000b00554a0bc30e7si4247404edj.532.2023.12.27.21.52.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 21:52:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-12434-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=TWH9mAiX; spf=pass (google.com: domain of linux-kernel+bounces-12434-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12434-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.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 am.mirrors.kernel.org (Postfix) with ESMTPS id D45001F221C9 for ; Thu, 28 Dec 2023 05:52:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 90A442568; Thu, 28 Dec 2023 05:52:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="TWH9mAiX" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 220141FDE for ; Thu, 28 Dec 2023 05:52:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-5534dcfdd61so9925380a12.0 for ; Wed, 27 Dec 2023 21:52:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1703742733; x=1704347533; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=f7MLraVP9QwLg0rDVio+i50pdPqXCBSQ9O3dkydmdrY=; b=TWH9mAiX1EgehSnUxHsJvj+FSXKwY6TsfW/B3HCDDKW3GXZeG0ofS8OvYAeF+O/JIO tIaUUymyCZEIM1E6TpmDPCVaN313xnAqDoPoHP86YTYgsI8SZuDmH920urZhjp1kCfPQ YiSUocanBUX9gS0vqyH7z/sLxPeo3TXtxkymU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703742733; x=1704347533; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=f7MLraVP9QwLg0rDVio+i50pdPqXCBSQ9O3dkydmdrY=; b=vC7ytUJWMa80oXbiIEYlHiCEyDoVx9STK7CiT8hCMGa8hzabpyD8PdfXZtARxLsDji kj/e9s1ZQeDP5OfE8GpxAfjO6g76ljcUjsoQa2RTclDcE1gmPXVO2xfX93WxQautDYXa 6+9bCeWL2jnJ09EDuXv+e3sAxr0PNEzCPi9J6jFcwmJzlWltbtIEiBrq+FxX2aPLimSM orvbEL2vgm9SgemKninZy3ehUXeJKOk3NOsJ9TaNIDXyt2lviViq6AxM9i/aWLxiUIkQ DAUWXk/tUCdl893WK6NshaDPsAcmbzaC2vUIcUtEX6p4uevgCheHinFGeG/OkNq/izFT 0aMQ== X-Gm-Message-State: AOJu0YxVLIlQhHJGzrd19qwnAUXZtRGFcGFEw7vmfxhnrPpL+JsGVzAi fHz4smMM1FIMkajKCcWkJAJZEw7DSS/i3uxW27ICtvRnkQnrqUs= X-Received: by 2002:a50:8e0e:0:b0:553:826b:b2b with SMTP id 14-20020a508e0e000000b00553826b0b2bmr9245349edw.13.1703742733554; Wed, 27 Dec 2023 21:52:13 -0800 (PST) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com. [209.85.128.54]) by smtp.gmail.com with ESMTPSA id b4-20020aa7dc04000000b0055282cb1033sm9389323edu.3.2023.12.27.21.52.12 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 27 Dec 2023 21:52:13 -0800 (PST) Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-40d2e56f3a6so32301375e9.1 for ; Wed, 27 Dec 2023 21:52:12 -0800 (PST) X-Received: by 2002:a05:600c:a46:b0:40d:604b:4a24 with SMTP id c6-20020a05600c0a4600b0040d604b4a24mr685133wmq.143.1703742732404; Wed, 27 Dec 2023 21:52:12 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20230817012007.131868-1-senozhatsky@chromium.org> <20230820024519.GK907732@google.com> <20230820072119.GM907732@google.com> <20230820073332.GN907732@google.com> <20230822061203.GA610023@google.com> In-Reply-To: From: Tomasz Figa Date: Thu, 28 Dec 2023 14:51:55 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC][PATCH] kconfig: introduce listunknownconfig To: Masahiro Yamada Cc: Sergey Senozhatsky , Ying Sun , Jesse T , Nathan Chancellor , Nick Desaulniers , Nicolas Schier , Jonathan Corbet , linux-kbuild@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Sep 4, 2023 at 2:10=E2=80=AFPM Tomasz Figa wro= te: > > On Fri, Sep 1, 2023 at 12:28=E2=80=AFAM Masahiro Yamada wrote: > > > > On Thu, Aug 31, 2023 at 11:30=E2=80=AFAM Tomasz Figa wrote: > > > > > > On Sat, Aug 26, 2023 at 10:11=E2=80=AFAM Masahiro Yamada wrote: > > > > > > > > On Thu, Aug 24, 2023 at 2:30=E2=80=AFPM Tomasz Figa wrote: > > > > > > > > > > Hi Masahiro, > > > > > > > > > > On Thu, Aug 24, 2023 at 10:00=E2=80=AFAM Masahiro Yamada wrote: > > > > > > > > > > > > On Tue, Aug 22, 2023 at 4:30=E2=80=AFPM Sergey Senozhatsky > > > > > > wrote: > > > > > > > > > > > > > > On (23/08/21 21:27), Masahiro Yamada wrote: > > > > > > > > > > > > > > > > My (original) hope was to add a single switch, KCONFIG_VERB= OSE, to address both: > > > > > > > > > > > > > > > > - A CONFIG option is hidden by unmet dependency (Ying Sun= 's case) > > > > > > > > - A CONFIG option no longer exists (your case) > > > > > > > > - Anything else we need to be careful > > > > > > > > > > > > > > A quick question: is it too late to suggest an alternative na= me? > > > > > > > Could KCONFIG_SANITY_CHECKS be a little cleaner? Because we b= asically > > > > > > > run sanity checks on the config. > > > > > > > > > > > > > > > > > > Ying's is not applied yet. So, it is not too late. > > > > > > > > > > > > But, I started to be a little worried > > > > > > because it is unpredictable how many KCONFIG_* env > > > > > > variables will increase until people are satisfied. > > > > > > > > > > > > > > > > Is there really a problem with having those? There are a lot of > > > > > different env variables affecting different parts of the kernel b= uild. > > > > > If they are useful, and even better, allow catching issues quickl= y, > > > > > should we favor less options or usefulness for users? > > > > > > > > > > > > > > > > I am considering how to implement it. > > > > > > > > > > > > > > > > One way is to add env variables as a new request arises. > > > > > > > > Sergey is doing two things by one option. > > > > > > > > > > > > KCONFIG_WARN_UNKNWON_SYMBOL : warn unknown symbol in input .conf= ig > > > > or defconfig > > > > KCONFIG_WARN_TO_ERROR : turn warnings into errors > > > > > > > > > > > > > > > > Another way is to handle those as command line options. > > > > > > > > -Wunknown-symbol > > > > -Werror (associated with W=3De) > > > > -Wall (associated with W=3D1) > > > > > > > > > > > > > > > > $ make W=3D1e olddefconfig > > > > > > > > > > > > will work to sanity check. > > > > > > > > > > > > > > I see, I think I misunderstood your previous message, sorry. Agreed > > > that there could be other approaches than an environment variable and > > > a command line option could definitely work as well. I'll leave the > > > details to you and Sergey, but ideally we would have something that i= s > > > simple to use both in scripts (e.g. distro build systems) and in > > > manual build for end users > > > > > > > > > > > > > > > > > > > > > > > > > > > > > And one more question: those sanity checks seem very reasonab= le. > > > > > > > Is there any reason we would not want to keep them ON by defa= ult? > > > > > > > And those brave souls, that do not wish for the tool to very = that > > > > > > > the .config is sane and nothing will get downgraded/disabled,= can > > > > > > > always set KCONFIG_SANITY_CHECKS to 0. > > > > > > > > > > > > > > > > > > Kconfig is meant to resolve the dependency without causing an e= rror. > > > > > > If a feature is not available, it is automatically, silently hi= dden, > > > > > > and that works well. > > > > > > > > > > How do you come to the conclusion that it works well? I've heard = many > > > > > people unhappy about the way Kconfig works. How does one know tha= t > > > > > something is missing (and should maybe be fixed?) if Kconfig sile= ntly > > > > > hides it? > > > > > > > > > > > > Kconfig has worked like that for a long time, but I do not know > > > > how to detect non-existing symbols. > > > > > > > > > > > > > > I think a tool to detect symbols present in old config, but missing i= n > > > new kernel solves the "upgraded config" part of the problem. > > > > > > The other part ("new config") would probably be solved by some kind o= f > > > a tool that looks at the currently present hardware and spews a list > > > of Kconfig options together with their dependencies, but arguably > > > that's not something that would be a part of Kconfig itself. > > > > > > For the graphical configuration tools like menuconfig I could imagine > > > that the options with unmet dependencies could be still displayed but > > > greyed out, so at least one can open the help for the item and check > > > which dependencies are missing. > > > > > > Yes. That idea exists, and at least for xconfig, > > I got a patch to grey out hidden options. > > > > https://lore.kernel.org/linux-kbuild/20200708133015.12286-1-maxime.chre= tien@bootlin.com/ > > > > > > I liked the idea, and suggested improvements, but did not receive v2. > > > > Maybe I could revisit it when I have some time, > > but I always have TODOs more than my capacity. > > > > Let me see if I can do something about it. It sounds like a very > convenient thing, although I'd definitely prefer menuconfig over > xconfig. To close the loop, it took me a while to find some time to give it a stab, but here is a patch: https://lore.kernel.org/linux-kbuild/20231228054630.3595093-1-tfiga@chromiu= m.org/T/#u One thing that may need to be added is a toggle for the new behavior if there are people who prefer all the options to look the same (or just the dim text is problematic for some reason). Best, Tomasz