🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.kernel
Article #969

Re: [PATCH v2 08/11] Documentation: kconfig-audit: Describe policy overlays

#969
From: sashiko-bot
Date: Fri, 04 Dec 2026 23:10
104 lines
6175 bytes
Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [Medium] kconfig-audit: pattern_prio documented for overlays but
  ignored in audit.py
- [Low] Documentation: kconfig-audit: Rule fields intro contradicts
  overlay rules
- [Low] Documentation: kconfig-audit: docs_url global overlay override
  undocumented
--

commit 181019824e3f6389f3fdc27e65e9f5241c313cc3
Author: Ahmed S. Darwish <darwi@linutronix.de>

Documentation: kconfig-audit: Describe policy overlays

This commit documents the format, usage, and field reference for
kconfig-audit policy overlay files in Documentation/tools/kconfig-audit.rst.

> diff --git a/Documentation/tools/kconfig-audit.rst b/Documentation/tools/kconfig-audit.rst
> index 5b8e2fa842b1e..e83eb56e43ede 100644
> --- a/Documentation/tools/kconfig-audit.rst
> +++ b/Documentation/tools/kconfig-audit.rst

[ ... ]

> +Overriding an existing rule
> +---------------------------
> +
> +An overlay identifies an existing rule by its exact ``name`` or exact
> +``name_pattern`` string.  It changes only the fields it supplies.  Omitted
> +fields keep their values from the base policy.

[Severity: Medium]
Does policy overlay support actually honor pattern_prio on name_pattern
rules?

This section and the Policy files reference describe pattern_prio as
supported, and schema/policy-overlay-v1.yml accepts it.  In audit.py,
however, PolicyOverlayFile._parse_rule() drops pattern_prio and
Overlayer._update_rule() / _new_rule() never propagate it.

An overlay that sets pattern_prio to adjust precedence or add a
higher-priority neutral exemption therefore silently gets priority 0,
causing wrong rule precedence or ambiguous-policy errors in
Checker._map_pattern_rules().

Either audit.py should propagate pattern_prio for overlays, or the overlay
schema and documentation should reject and note that it is unsupported.

[ ... ]

> @@ -304,11 +402,16 @@ tag is supported so far::
>  ``kind``
>  ++++++++
>  
> -*Required*.  Identifies the YAML document's type.  For a configuration
> -policy file, the value must be::
> +*Required*.  Identifies the YAML document's type.
> +
> +For a configuration policy file, the value must be::
>  
>     Policy
>  
> +For a policy overlay file, the value must be::
> +
> +   PolicyOverlay
> +
>  ``docs_url``
>  ++++++++++++

[Severity: Low]
Should this section document how docs_url behaves in a PolicyOverlay file?

schema/policy-overlay-v1.yml accepts top-level docs_url in overlays, and
Overlayer.apply() replaces policy.docs_url with it.  Since
Policy.get_docs_url_for() prepends that single base URL to every rule's
docs_hint, setting it in an overlay rewrites links for all inherited rules.

[ ... ]

> @@ -408,10 +511,12 @@ an exact ``name`` rule.
>  ``expected``
>  ++++++++++++
>  
> -*Required*.  Describes the expected state of the matching symbol or
> -symbols.
> +*Required for all rules in policy files*.
> +
> +*Required for newly-added rules in policy overlays*.

[Severity: Low]
Does the Rule fields introduction above this section contradict the new
overlay requirements for expected and severity?

Policy files reference now covers both policy and overlay files, but the
Rule fields intro still states unconditionally that each rule must contain
one expected value and one severity, even though overlay overrides may omit
both.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261203224916.118064-1-darwi@linutronix.de?part=8
Technical Details
Message-ID: <O6KzE-g1p2-45@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
References: <O6o65-fPfD-3@gated-at.bofh.it> <O6o65-fPfD-11@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
From: sashiko-bot@kernel.org
Newsgroups: linux.debian.kernel,linux.kernel
Subject: Re: [PATCH v2 08/11] Documentation: kconfig-audit: Describe policy  overlays
Date: Sat, 05 Dec 2026 00:10:02 +0100
Message-ID: <O6KzE-g1p2-45@gated-at.bofh.it>
References: <O6o65-fPfD-3@gated-at.bofh.it> <O6o65-fPfD-11@gated-at.bofh.it>
X-Original-To: "Ahmed S. Darwish" <darwi@linutronix.de>, "Nathan Chancellor" <nathan@kernel.org>, "Nicolas
 Schier" <nsc@kernel.org>, "Julian Braha" <julianbraha@gmail.com>, "Emanuele
 Rocca" <ema@debian.org>, "Clark Williams" <clrkwllms@kernel.org>, "Steven
 Rostedt" <rostedt@goodmis.org>, "Ingo Molnar" <mingo@redhat.com>
X-Mailbox-Line: From debian-kernel-request@lists.debian.org  Fri Dec  4 23:07:15 2026
Old-Return-Path: <sashiko-bot@kernel.org>
X-Amavis-Spam-Status: No, score=-4.401 tagged_above=-10000 required=5.3
 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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:hard: -5.5
Reply-To: sashiko-reviews@lists.linux.dev
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Mailing-List: <debian-kernel@lists.debian.org> archive/latest/158755
List-ID: <debian-kernel.lists.debian.org>
List-URL: <https://lists.debian.org/debian-kernel/>
List-Archive: https://lists.debian.org/msgid-search/sashiko-outbox-250780@kernel.org
Approved: robomod@news.nic.it
Lines: 104
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Cc: "Sebastian Andrzej Siewior" <bigeasy@linutronix.de>, "Frederic
 Weisbecker" <frederic@kernel.org>, "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-kernel@vger.kernel.org
X-Original-Date: Fri, 04 Dec 2026 22:50:16 +0000
X-Original-Message-ID: <sashiko-outbox-250780@kernel.org>
X-Original-References: <20261203224916.118064-1-darwi@linutronix.de>
 <20261203224916.118064-9-darwi@linutronix.de>