From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796424617; b=Gtce0LBr/LbtdKsy5z/ugO3eiJ6b3PDtIDrSGfFnivOPviQAjz1KwQPvc8QhTtrGQEOl yk2HA9X8tvmIh9V3Kp+1IR5QZVPw4nf7ZhJ/zM7GuAwEZRH876E7bazzx5TWHHktn0Qin W37ydWSl6XH6YqDEAn47ip68zM1mQsO96OgcI4KfUvem0DkPrmN7d3wk0qVE+x/PzLBP+ RUKxBSiLjioOp/nTUOqn/bABn13oduwWRgI7arJ4pMAJX9a2hKvzLIkHIxcCOowSu5rST sMrryvSkJ2nZWWeSKmfjkAPD5wo7W5/Gwi1nk1VJ/BFTVPORz2JoDcWgUwvfga+h6fQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796424617; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=MknidoK1wTVUtwRATOmxh1CkIEq2ulqhlNmX2Fg6nSc=; b=g/aDQYLvMrclvUMwMfYinlw+RwtyHrIKTmYR8owFiaJQN22xn0tEhSVxQ37vCI/TwU3k 6G7yNIwB3J4iCg24RLgyT3znb158wu79eJjycd8d00ZDz6OudAI6nmUTZF9+dbjAokwQK pfK0BNzuMH1FNeYcgaPd4YBD+Nb/mG1hbU6jyNrQ9k5EBdLeM2rEhU5nZnOBy2Ehc/uf5 dkQfsobKWboH2IPlZdNXw6Wq/zry3f6G4S/AmTiUlQQlEKvzVqkmg4Tzwm6EUf1L/WIJq PfQSQ+IyepgExufHMB24WwUmJaV+6q4i+pa37uTRuDwC+fw7zNIBaKzhb2U1gAjPUxA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=d7MU61OU; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 33860606A33C; Fri, 4 Dec 2026 22:50:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=d7MU61OU Received: by smtp.kernel.org (Postfix) with ESMTPSA id 174C81F00A14; Fri, 4 Dec 2026 22:50:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796424616; bh=MknidoK1wTVUtwRATOmxh1CkIEq2ulqhlNmX2Fg6nSc=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=d7MU61OUZrgvCV0d/K6tSgHhr5e7ees72yD0/sQ0WHWfjRjrfqEoW2qwiI7yNWC2b uTUwIDW/f0FwyOvuHiT5dlqy91yt2BMebSKXfNRjQt9rZI6Z3oOyKfw7ozHlHVj15l 5PYCk1AdCJhpmheryd5pvCEg4kcTSLcMQkmIwnKZyJfw2YPnVIdISa89bY2CsI9ueG w7HPpC7yuF2TQEpJu4eh0YaIHvwxp4L2J/PBTDNYk3ogOIUJhQ4PDjuc6jjt9RT2db Nf18D77XKZ/NHd5JMuY9zTzTk6V/pAj40XH89l/MI00JNpUNVc92Om4QYLwe7jPDY9 YMYu4VPIo1Aug== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v2 07/11] kconfig-audit: Add support for policy overlays Reply-To: sashiko-reviews@lists.linux.dev To: "Ahmed S. Darwish" , "Nathan Chancellor" , "Nicolas Schier" , "Julian Braha" , "Emanuele Rocca" , "Clark Williams" , "Steven Rostedt" , "Ingo Molnar" Cc: "Sebastian Andrzej Siewior" , "Frederic Weisbecker" , "John Ogness" , "Derek Barbosa" , =?utf-8?b?WmJpZ25pZXcgSsSZZHJ6ZWpld3Nr?= =?utf-8?b?aS1Tem1law==?= , "Daan De Meyer" , "Luca Boccassi" , linux-rt-devel@lists.linux.dev, debian-kernel@lists.debian.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20261203224916.118064-8-darwi@linutronix.de> References: <20261203224916.118064-1-darwi@linutronix.de> <20261203224916.118064-8-darwi@linutronix.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 22:50:15 +0000 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 2 potential issues to consider: - [Medium] kconfig-audit: PolicyOverlayFile and Overlayer silently drop pattern_prio - [Low] kconfig-audit: Overlayer._update_rule() ignores empty rationale overrides -- commit 77e7af9fe203f534d6486ee41fb9f2863605bc4c Author: Ahmed S. Darwish kconfig-audit: Add support for policy overlays This commit adds policy overlay support to tools/kconfig-audit/audit.py, allowing a YAML overlay file to override fields on existing rules, update docs_url, or add new rules via the -o/--overlay option. > diff --git a/tools/kconfig-audit/audit.py b/tools/kconfig-audit/audit.py > index 94ff427715d11..ba6ba86f2791f 100755 > --- a/tools/kconfig-audit/audit.py > +++ b/tools/kconfig-audit/audit.py [ ... ] > @@ -546,6 +551,195 @@ class PolicyFile(VersionedYamlFile): [ ... ] > +@dataclass > +class RuleOverlay: > + """Typed overlay for a (symbol or regex) .config rule""" > + > + target: OverlayTarget > + expected: Optional[ExpectedValue] > + severity: Optional[Severity] > + rationale: Optional[str] > + docs_hint: Optional[str] [ ... ] > + return RuleOverlay( > + target, > + expected, > + severity, > + rule.get('rationale'), > + rule.get('docs_hint'), > + ) [Severity: Medium] Does this silently drop pattern_prio from overlay rules? policy-overlay-v1.yml allows pattern_prio on name_pattern rules via rule.ym= l, but RuleOverlay has no pattern_prio field, PolicyOverlayFile._parse_rule() ignores it, and Overlayer._update_rule() and Overlayer._new_rule() never propagate it to PatternRule (leaving new rules at priority 0). A new overlay pattern rule with a higher pattern_prio is downgraded to 0 and can lose to a higher-priority base pattern rule, letting non-compliant conf= igs pass, or collide with a priority-0 base rule in Checker._map_pattern_rules() and abort with os.EX_DATAERR. Overrides on existing rules are also ignored. [ ... ] > + @staticmethod > + def _update_rule(overlay: RuleOverlay, rule: Rule) -> None: > + """Apply an overlay's specified fields to an existing rule""" > + if overlay.expected: > + rule.expected =3D overlay.expected > + > + if overlay.severity: > + rule.severity =3D overlay.severity > + > + if overlay.rationale: > + rule.rationale =3D overlay.rationale > + > + if overlay.docs_hint: > + rule.docs_hint =3D overlay.docs_hint > + rule._normalize_docs_hint() [Severity: Low] Should this check overlay.rationale is not None instead of testing truthine= ss? rule.yml defines rationale as a string with no minimum length and rejects null, so an empty string is the only schema-valid way to clear an inherited rationale. Because an empty string is falsy, the assignment is skipped and the base rule's stale rationale remains in the audit report. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203224916.1180= 64-1-darwi@linutronix.de?part=3D7