🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel
Article #17

Re: [PATCH v1 01/10] kconfig-checker: Add schema for rule files

#17
From: Julian Braha
Date: Sun, 08 Nov 2026 19:00
149 lines
8593 bytes
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--------------n0jyBVewKwmhUucz3R1v1dT0
Content-Type: multipart/mixed; boundary="------------DIHfuWC5H49s70Tk4afQiYfK";
 protected-headers="v1"; hp="clear"
Message-ID: <e0ffecfe-8c4f-457e-ae8d-32a9601e69e5@gmail.com>
Date: Sun, 8 Nov 2026 18:59:37 +0000
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v1 01/10] kconfig-checker: Add schema for rule files
To: "Ahmed S. Darwish" <darwi@linutronix.de>,
 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>
Cc: 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>,
 =?UTF-8?Q?Zbigniew_J=C4=99drzejewski-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
References: <20261106091922.7560-1-darwi@linutronix.de>
 <20261106091922.7560-2-darwi@linutronix.de>
Content-Language: en-US
From: Julian Braha <julianbraha@gmail.com>
In-Reply-To: <20261106091922.7560-2-darwi@linutronix.de>

--------------DIHfuWC5H49s70Tk4afQiYfK
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On 11/6/26 09:19, Ahmed S. Darwish wrote:
> The kconfig-checker YAML rule files describes which kernel .config symb=
ols
> are expected to be enabled or disabled. Introduce a schema for such fil=
es.
>=20
> Describe and add rational for each element in the schema as well.
>=20
> Signed-off-by: Ahmed S. Darwish <darwi@linutronix.de>
> ---
>  tools/kconfig-checker/schema.yml | 115 +++++++++++++++++++++++++++++++=

>  1 file changed, 115 insertions(+)
>  create mode 100644 tools/kconfig-checker/schema.yml
>=20
> diff --git a/tools/kconfig-checker/schema.yml b/tools/kconfig-checker/s=
chema.yml
> new file mode 100644
> index 000000000000..a7f1b0a78cc7
> --- /dev/null
> +++ b/tools/kconfig-checker/schema.yml
> @@ -0,0 +1,115 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +
> +"$schema": "https://json-schema.org/draft-07/schema"
> +
> +title: Schema for kconfig-checker rule files
> +type: object
> +required: [rules]
> +additionalProperties: false
> +
> +properties:
> +  #
> +  # Optional base URL for the documentation page used by rationale
> +  # links.  See `docs_hint`.
> +  #
> +  docs_url:
> +    type: string
> +    format: uri
> +
> +  rules:
> +    type: array
> +    minItems: 1
> +    items:
> +      type: object
> +      oneOf:
> +        - required: [name]
> +        - required: [name_pattern]
> +      required: [expected, severity]
> +      additionalProperties: false
> +
> +      properties:
> +        #
> +        # Exact kernel configuration symbol to check.
> +        #
> +        # Example: CONFIG_PREEMPT_RT
> +        #
> +        name:
> +          type: string
> +          pattern: '^CONFIG_[A-Z0-9_]+$'
> +
> +        #
> +        # Regex matching one or more kernel configuration symbols.
> +        #
> +        # Example: CONFIG_DEBUG_.*
> +        #
> +        name_pattern:
> +          type: string
> +          format: regex
> +
> +        #
> +        # Expected value for the matching kernel configuration option.=

> +        #
> +        # Values:
> +        #
> +        #   y        option is expected to be enabled (built-in or mod=
ule).

Kconfig's tristates use 3-state logic. It seems like you're
approximating 'm' as 'y'?

These are meaningfully different values :/

> +        #   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 b=
roader
> +        #            `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'?

- Julian Braha

--------------DIHfuWC5H49s70Tk4afQiYfK--

--------------n0jyBVewKwmhUucz3R1v1dT0
Content-Type: application/pgp-signature; name="OpenPGP_signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="OpenPGP_signature.asc"

-----BEGIN PGP SIGNATURE-----

wnsEABYIACMWIQT6qjll++tIFxF8TUPElYPCBXNxIAUCavDGmQUDAAAAAAAKCRDElYPCBXNxIBhZ
AP0St5Gm6t5qmVeEmHVFmeBETjuK3DVAGHB6hDtQY4jQcQD/ZxYo1ObM3GAgg5kaUzxTu4/2XW7B
bUrRbAjtbCe3pQs=
=jHVw
-----END PGP SIGNATURE-----

--------------n0jyBVewKwmhUucz3R1v1dT0--
Technical Details
Message-ID: <NXghr-aFkD-1@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.corradoroberto.it!bofh.it!news.nic.it!robomod
References: <NWoK5-aaez-7@gated-at.bofh.it> <NWoK6-aaez-25@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.corradoroberto.it!bofh.it!news.nic.it!robomod
From: Julian Braha <julianbraha@gmail.com>
Newsgroups: linux.debian.kernel,linux.kernel
Subject: Re: [PATCH v1 01/10] kconfig-checker: Add schema for rule files
Date: Sun, 08 Nov 2026 20:00:01 +0100
Message-ID: <NXghr-aFkD-1@gated-at.bofh.it>
References: <NWoK5-aaez-7@gated-at.bofh.it> <NWoK6-aaez-25@gated-at.bofh.it>
X-Mailbox-Line: From debian-kernel-request@lists.debian.org  Sun Nov  8 18:59:53 2026
Old-Return-Path: <julianbraha@gmail.com>
X-Amavis-Spam-Status: No, score=-2.099 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001]
 autolearn=ham autolearn_force=no
X-Policyd-Weight: using cached result; rate: -5.5
X-Forwarded-Encrypted: i=1; AL+hErEjVWccvMx3XeuSA6O8tnXBWSZ3JP31LJQfpM8pADnYChhvOofEZ8LDocHGXIScRboiovs7izUkAHOcelk0@lists.debian.org
X-Gm-Message-State: APuU4Z+FfD/2TtmnJWvSx8cC/xDgORBUl6XorriSBRceMJqAtiFi17Sv
	q5NCNaReharWPhd9KawRw8lDTWXSmb3EREt9gy0Eu0otfDzt+wPp6+8+
X-Gm-Gg: AYBFou1NbkWEiRWcxu5rV+41e8ucx2PR2PIYKy9EDgbydAUO2rg7v+bi5YRtWNB6VMw
	2s23mIwQiTT9TQrk4ll7x0Az+fBElWwgn1FJCYLks5iNPc2bIczPMFAfyZ1BXfTTTx6JfAvTtQg
	b92nbJ4feSz57s31aB1Q4nFTslw0u5ze3tDtf5N0IDpdg5HBGLs+TVSCWXKbEZvDRqNyf356t1K
	QhPBrveq9pikPhE/ptYW70l28amGDsyhlMUbArWHggsYQHaUj5bnT1gT7n5FbeFdiGKYdvC/ScJ
	RvaFZndL8i4EAM7HG9R3IGaK4hQCKvGmk0IxqL/rG/a4KB59ywo8S9U83vQTO7sJyLVtRYf9DTN
	8c1E3c06zMNnBotkcYX/F/MVWsmk7B+6NYPJGSpXAn58rLcRH9mwzyx56CvrxQkZOZ+KQfwwzy1
	NESP8AKIn/Dd0q7J/8aGf3mOOPOfYIFsDIuYeXDqmAcrpr3C99UFarjUgsxX4uR9FFb39xj8rFa
	mnwxNg036pRkw0wn+cXPBcJm17hfaVCpP9D08UrdLfe6KICAni17Rpx5G8YPMZiyjTz9/iO0Ssd
	/CnQ/HjSveQGIS+BiYYJpx940Of2DluX0z2fIawTXsRk4djEeRikZc0IN7VbOyC4gCbqBcYLohS
	PpXiB5wZizcXXql2awT8H
X-Received: by 2002:a05:600c:4e50:b0:4a2:c9b:9b98 with SMTP id 5b1f17b1804b1-4b963c7d01fmr38198605e9.17.1794164379254;
        Sun, 08 Nov 2026 10:59:39 -0800 (PST)
Sender: robomod@news.nic.it
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature";
 boundary="------------n0jyBVewKwmhUucz3R1v1dT0"
X-Mailing-List: <debian-kernel@lists.debian.org> archive/latest/158140
List-ID: <debian-kernel.lists.debian.org>
List-URL: <https://lists.debian.org/debian-kernel/>
List-Archive: https://lists.debian.org/msgid-search/e0ffecfe-8c4f-457e-ae8d-32a9601e69e5@gmail.com
Approved: robomod@news.nic.it
Lines: 149
Organization: linux.* mail to news gateway
X-Original-Cc: 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: Sun, 8 Nov 2026 18:59:37 +0000
X-Original-Message-ID: <e0ffecfe-8c4f-457e-ae8d-32a9601e69e5@gmail.com>
X-Original-References: <20261106091922.7560-1-darwi@linutronix.de>
 <20261106091922.7560-2-darwi@linutronix.de>
X-Original-Sender: Julian Braha <julian.braha@gmail.com>