Article View: linux.debian.kernel
Article #505Re: [PATCH v1 01/10] kconfig-checker: Add schema for rule files
From: Ahmed S. Darwish
Date: Mon, 09 Nov 2026 13:00
Date: Mon, 09 Nov 2026 13:00
87 lines
4709 bytes
4709 bytes
Hi Julian,
Thanks for all the feedback!
On Sun, 08 Nov 2026, Julian Braha wrote:
>
> On 11/6/26 09:19, Ahmed S. Darwish wrote:
> >
> > --- /dev/null
> > +++ b/tools/kconfig-checker/schema.yml
...
> > +
> > + #
> > + # Expected value for the matching kernel configuration option.
> > + #
> > + # Values:
> > + #
> > + # y option is expected to be enabled (built-in or module).
>
> Kconfig's tristates use 3-state logic. It seems like you're
> approximating 'm' as 'y'?
>
You're correct.
'y' is deceiving, even with the comment beside it saying that it implies
either a built-in or a module.
I guess it would be better to have the expected values like:
expected:
type: string
enum: [enabled, disabled, allowed]
As a bonus, 'enabled' and 'disabled' rhymes well with 'allowed'.
So the policies can be:
- name: CONFIG_PREEMPT_RT
expected: enabled
...
- name: CONFIG_NO_HZ_FULL
expected: disabled
...
- name: CONFIG_DEBUG_FS
expected: allowed
...
I think that's much cleaner.
> These are meaningfully different values :/
I wrote some policies beside the PREEMPT_RT one, and the main requirement
was always that a certain kernel feature is either enabled or disabled.
In the future, I can add;
expected:
type: string
enum: [enabled, disabled, allowed, builtin-only, module]
But so far, there was no need for that.
> > + # n option is expected to be disabled or unset.
> > + # allowed option is permitted and must not be reported as a violation.
> > + # This is used to exempt a specific symbol from a broader
> > + # `name_pattern` rule with `expected: n`.
> > + #
> > + expected:
> > + type: string
> > + enum: [y, n, allowed]
>
> What if a user wants to specify that the value can be 'n' or 'y', but
> not 'm'?
Is this a real-world use case?
I did not encounter a need for making the expected values that complex
before.
Thanks!
--
Ahmed S. Darwish
Linutronix GmbH
Technical Details
Message-ID:
<NXx8B-aOCP-5@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomodReferences:
<NWoK5-aaez-7@gated-at.bofh.it> <NWoK6-aaez-25@gated-at.bofh.it> <NXghr-aFkD-1@gated-at.bofh.it>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod From: "Ahmed S. Darwish" <darwi@linutronix.de> Newsgroups: linux.debian.kernel,linux.kernel Subject: Re: [PATCH v1 01/10] kconfig-checker: Add schema for rule files Date: Mon, 09 Nov 2026 14:00:01 +0100 Message-ID: <NXx8B-aOCP-5@gated-at.bofh.it> References: <NWoK5-aaez-7@gated-at.bofh.it> <NWoK6-aaez-25@gated-at.bofh.it> <NXghr-aFkD-1@gated-at.bofh.it> X-Mailbox-Line: From debian-kernel-request@lists.debian.org Mon Nov 9 12:57:19 2026 Old-Return-Path: <darwi@linutronix.de> X-Amavis-Spam-Status: No, score=-4.4 tagged_above=-10000 required=5.3 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3] autolearn=ham autolearn_force=no X-Policyd-Weight: using cached result; rate: -4.6 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Mailing-List: <debian-kernel@lists.debian.org> archive/latest/158156 List-ID: <debian-kernel.lists.debian.org> List-URL: <https://lists.debian.org/debian-kernel/> List-Archive: https://lists.debian.org/msgid-search/avG_IXPcRY7njMgP@lx-t490 Approved: robomod@news.nic.it Lines: 87 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: Clark Williams <clrkwllms@kernel.org>, Steven Rostedt <rostedt@goodmis.org>, Ingo Molnar <mingo@redhat.com>, Nathan Chancellor <nathan@kernel.org>, Nicolas Schier <nsc@kernel.org>, Sebastian Andrzej Siewior <bigeasy@linutronix.de>, Frederic Weisbecker <frederic@kernel.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Jonathan Corbet <corbet@lwn.net>, John Ogness <john.ogness@linutronix.de>, Derek Barbosa <debarbos@redhat.com>, Zbigniew Jędrzejewski-Szmek <zbyszek@amutable.com>, Daan De Meyer <daan.j.demeyer@gmail.com>, Luca Boccassi <luca.boccassi@gmail.com>, linux-rt-devel@lists.linux.dev, debian-kernel@lists.debian.org, linux-kbuild@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org X-Original-Date: Mon, 9 Nov 2026 13:40:01 +0100 X-Original-Message-ID: <avG_IXPcRY7njMgP@lx-t490> X-Original-References: <20261106091922.7560-1-darwi@linutronix.de> <20261106091922.7560-2-darwi@linutronix.de> <e0ffecfe-8c4f-457e-ae8d-32a9601e69e5@gmail.com>