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 02/11] kconfig-audit: Introduce a PREEMPT_RT configuration policy
Date: Fri, 04 Dec 2026 22:50:09 +0000	[thread overview]
Message-ID: <sashiko-outbox-250774@kernel.org> (raw)
In-Reply-To: <20261203224916.118064-3-darwi@linutronix.de>

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

  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 [this message]
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
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-250774@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