The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
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>
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
Subject: Re: [PATCH v2 08/11] Documentation: kconfig-audit: Describe policy overlays
Date: Fri, 04 Dec 2026 22:50:16 +0000	[thread overview]
Message-ID: <sashiko-outbox-250780@kernel.org> (raw)
In-Reply-To: <20261203224916.118064-9-darwi@linutronix.de>

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

  reply	other threads:[~2026-12-04 22:50 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03 22:49 [PATCH v2 00/11] tools: Introduce a kernel configuration checker Ahmed S. Darwish
2026-12-03 22:49 ` [PATCH v2 01/11] kconfig-audit: Add schema for policy files Ahmed S. Darwish
2026-12-04 22:50   ` sashiko-bot
2026-12-03 22:49 ` [PATCH v2 02/11] kconfig-audit: Introduce a PREEMPT_RT configuration policy Ahmed S. Darwish
2026-12-04 22:50   ` sashiko-bot
2026-12-03 22:49 ` [PATCH v2 03/11] kconfig-audit: Add the configuration checker code Ahmed S. Darwish
2026-12-04 22:50   ` sashiko-bot
2026-12-03 22:49 ` [PATCH v2 04/11] Documentation: Describe kconfig-audit usage and design Ahmed S. Darwish
2026-12-04 22:50   ` sashiko-bot
2026-12-03 22:49 ` [PATCH v2 05/11] kconfig-audit: Split policy schema for component reuse Ahmed S. Darwish
2026-12-04 22:50   ` sashiko-bot
2026-12-03 22:49 ` [PATCH v2 06/11] kconfig-audit: Introduce policy overlays schema Ahmed S. Darwish
2026-12-04 22:50   ` sashiko-bot
2026-12-03 22:49 ` [PATCH v2 07/11] kconfig-audit: Add support for policy overlays Ahmed S. Darwish
2026-12-04 22:50   ` sashiko-bot
2026-12-03 22:49 ` [PATCH v2 08/11] Documentation: kconfig-audit: Describe " Ahmed S. Darwish
2026-12-04 22:50   ` sashiko-bot [this message]
2026-12-03 22:49 ` [PATCH v2 09/11] MAINTAINERS: Add entry for kernel configuration audit Ahmed S. Darwish
2026-12-03 22:49 ` [PATCH v2 10/11] kconfig: Introduce auditconfig target Ahmed S. Darwish
2026-12-04 22:50   ` sashiko-bot
2026-12-03 22:49 ` [PATCH v2 11/11] Documentation: Describe auditconfig build target Ahmed S. Darwish
2026-12-04 22:50   ` sashiko-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-250780@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=bigeasy@linutronix.de \
    --cc=clrkwllms@kernel.org \
    --cc=daan.j.demeyer@gmail.com \
    --cc=darwi@linutronix.de \
    --cc=debarbos@redhat.com \
    --cc=debian-kernel@lists.debian.org \
    --cc=ema@debian.org \
    --cc=frederic@kernel.org \
    --cc=john.ogness@linutronix.de \
    --cc=julianbraha@gmail.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-devel@lists.linux.dev \
    --cc=luca.boccassi@gmail.com \
    --cc=mingo@redhat.com \
    --cc=nathan@kernel.org \
    --cc=nsc@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=zbyszek@amutable.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox