Article View: linux.debian.kernel
Article #965Re: [PATCH v2 02/11] kconfig-audit: Introduce a PREEMPT_RT configuration policy
From: sashiko-bot
Date: Fri, 04 Dec 2026 23:10
Date: Fri, 04 Dec 2026 23:10
133 lines
7420 bytes
7420 bytes
Thank you for your contribution! Sashiko AI review found 6 potential issues to consider: - [Low] kconfig-audit: dead docs_hint anchor for CONFIG_RCU_NOCB_CPU - [Low] kconfig-audit: SPDX-License-Identifier placed on line 3 instead of line 1 - [Low] kconfig-audit: unanchored CONFIG_NO_HZ regex in preempt_rt.yml over-matches - [Low] kconfig-audit: preempt_rt policy flags CONFIG_SLUB_DEBUG at high severity - [Low] kconfig-audit: preempt_rt requires CONFIG_EFI_DISABLE_RUNTIME without EFI - [Low] kconfig-audit: preempt_rt flags DEBUG_ALIGN_RODATA and DEBUG_MEMORY_INIT -- commit 7aa69801eececedf40a26be60e739042d6c45696 Author: Ahmed S. Darwish <darwi@linutronix.de> kconfig-audit: Introduce a PREEMPT_RT configuration policy This commit adds a kconfig-audit policy file defining expected kernel configuration options for PREEMPT_RT kernels, intended to stay aligned with Documentation/core-api/real-time/kernel-configuration.rst. > diff --git a/tools/kconfig-audit/policy/preempt_rt.yml b/tools/kconfig-audit/policy/preempt_rt.yml > new file mode 100644 > index 0000000000000..a9972e3c34534 > --- /dev/null > +++ b/tools/kconfig-audit/policy/preempt_rt.yml > @@ -0,0 +1,179 @@ > +# PREEMPT_RT .config sanitization > +# > +# SPDX-License-Identifier: GPL-2.0-only [Severity: Low] Should SPDX-License-Identifier be on the first line of the file? Documentation/process/license-rules.rst requires the SPDX tag on the first comment line for non-shebang files, which checkpatch.pl and license checks expect. [ ... ] > + - name: CONFIG_EFI_DISABLE_RUNTIME > + expected: enabled > + severity: medium > + docs_hint: config [Severity: Low] Will requiring CONFIG_EFI_DISABLE_RUNTIME to be enabled cause false positives on non-EFI builds? CONFIG_EFI_DISABLE_RUNTIME depends on CONFIG_EFI in drivers/firmware/efi/Kconfig, so it is absent from .config on non-EFI targets. Because audit.py flags missing symbols when expected is enabled, non-EFI builds fail the audit even though EFI runtime services are gone. > + > + - name_pattern: CONFIG_NO_HZ(_FULL|_IDLE)? > + expected: disabled > + severity: medium > + docs_hint: config-no-hz-config-no-hz-full [Severity: Low] Should this pattern be anchored as ^CONFIG_NO_HZ(_FULL|_IDLE)?$? KernelConfig.get_matching_symbols() uses unanchored re.search(), so the optional (_FULL|_IDLE)? suffix matches the empty string and the rule also matches the hidden CONFIG_NO_HZ_COMMON symbol. If a PolicyOverlay exempts CONFIG_NO_HZ_FULL, CONFIG_NO_HZ_COMMON=y still fails the audit. Similarly, the unanchored CONFIG_DEBUG pattern below has no trailing underscore and also matches the hidden PowerPC CONFIG_DEBUGGER symbol. [ ... ] > + - name: CONFIG_RCU_NOCB_CPU > + expected: enabled > + severity: low > + docs_hint: config [Severity: Low] Does docs_hint: config resolve to a dead link for CONFIG_RCU_NOCB_CPU? With docs_url pointing to kernel-configuration.html, this generates #config-rcu-nocb-cpu, but Documentation/core-api/real-time/kernel-configuration.rst has no section for CONFIG_RCU_NOCB_CPU. Because CONFIG_RCU_NOCB_CPU defaults to n and depends on CONFIG_RCU_EXPERT when CONFIG_NO_HZ_FULL is disabled, most configs will trigger this rule with no working documentation link or inline rationale. [ ... ] > + - name_pattern: CONFIG_DEBUG > + expected: disabled > + severity: medium > + docs_hint: kernel-debug-options [Severity: Low] Should CONFIG_DEBUG_ALIGN_RODATA and CONFIG_DEBUG_MEMORY_INIT have neutral exemptions under this catch-all rule? CONFIG_DEBUG_ALIGN_RODATA defaults to y on ARMv7 with STRICT_KERNEL_RWX and only aligns .rodata in arch/arm/kernel/vmlinux.lds.S for NX hardening, with zero runtime overhead. Flagging it advises disabling a link-time security feature on default ARMv7 PREEMPT_RT configs. CONFIG_DEBUG_MEMORY_INIT is also preserved when enabling EXPERT and PREEMPT_RT on top of standard defconfigs, and only compiles __init and __meminit checks with no normal runtime RT latency impact. [ ... ] > + - name_pattern: CONFIG_SLUB_DEBUG.* > + expected: disabled > + severity: high > + docs_hint: kernel-debug-options [Severity: Low] Should this high-severity rule target CONFIG_SLUB_DEBUG_ON rather than matching CONFIG_SLUB_DEBUG as well? CONFIG_SLUB_DEBUG defaults to y and is needed for /proc/slabinfo, while runtime SLUB debug checks remain patched out behind slub_debug_enabled unless CONFIG_SLUB_DEBUG_ON is set. Flagging CONFIG_SLUB_DEBUG.* at high severity fails standard PREEMPT_RT configs that keep SLUB debugging off. -- Sashiko AI review · https://sashiko.dev/#/patchset/20261203224916.118064-1-darwi@linutronix.de?part=2
Technical Details
Message-ID:
<O6KzE-g1p2-23@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!weretis.net!feeder8.news.weretis.net!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomodReferences:
<O6o65-fPfD-3@gated-at.bofh.it> <O6o66-fPfD-31@gated-at.bofh.it>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!weretis.net!feeder8.news.weretis.net!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 02/11] kconfig-audit: Introduce a PREEMPT_RT configuration policy Date: Sat, 05 Dec 2026 00:10:02 +0100 Message-ID: <O6KzE-g1p2-23@gated-at.bofh.it> References: <O6o65-fPfD-3@gated-at.bofh.it> <O6o66-fPfD-31@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:49 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/158758 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-250774@kernel.org Approved: robomod@news.nic.it Lines: 133 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:09 +0000 X-Original-Message-ID: <sashiko-outbox-250774@kernel.org> X-Original-References: <20261203224916.118064-1-darwi@linutronix.de> <20261203224916.118064-3-darwi@linutronix.de>