[PATCH v2 11/11] Documentation: Describe auditconfig build target

From: Ahmed S. Darwish

Date: Thu Dec 03 2026 - 17:50:32 EST


Document the auditconfig target, its POLICY and OVERLAY arguments, and the
diagnostics it reports.

Signed-off-by: Ahmed S. Darwish <darwi@xxxxxxxxxxxxx>
---
Documentation/admin-guide/README.rst | 29 +++++++++++++++++++++++++++
Documentation/tools/kconfig-audit.rst | 3 +++
2 files changed, 32 insertions(+)

diff --git a/Documentation/admin-guide/README.rst b/Documentation/admin-guide/README.rst
index 77fec1de6dc8..6f78988d4005 100644
--- a/Documentation/admin-guide/README.rst
+++ b/Documentation/admin-guide/README.rst
@@ -256,6 +256,35 @@ Configuring the kernel
should probably answer 'n' to the questions for "development",
"experimental", or "debugging" features.

+Checking the kernel configuration
+---------------------------------
+
+The kconfig build system can validate the generated kernel ``.config``
+against a selected rules profile. Running ``make auditconfig`` prints
+usage information and the available profiles::
+
+ Usage: make POLICY=<profile> [OVERLAY=<overlay>] auditconfig
+ Available POLICY: preempt_rt
+
+For example, to validate the current configuration against the PREEMPT_RT
+profile, run::
+
+ make POLICY=preempt_rt auditconfig
+
+``auditconfig`` reports kconfig options whose values do not match the
+selected rules profile. Each diagnostic includes a severity, such as
+``FATAL`` or ``INFO``, plus the suggested configuration change.
+
+Apply the reported changes as needed and run ``make auditconfig`` again,
+against the same rules, until no relevant diagnostics remain.
+
+The ``OVERLAY=`` parameter specifies an overlay file whose rules overrides
+the built-in mainline profile selected by ``POLICY=``. It is intended for
+distributions kernel packaging scripts, CI systems, and board support
+packages.
+
+For more information, see Documentation/tools/kconfig-audit.rst
+
Compiling the kernel
--------------------

diff --git a/Documentation/tools/kconfig-audit.rst b/Documentation/tools/kconfig-audit.rst
index e83eb56e43ed..7c1280e7e352 100644
--- a/Documentation/tools/kconfig-audit.rst
+++ b/Documentation/tools/kconfig-audit.rst
@@ -37,6 +37,9 @@ Example invocation from within the kernel tree:
~/linux$ make defconfig
~/linux$ tools/kconfig-audit/audit.py check -c .config -p preempt_rt

+As described in Documentation/admin-guide/README.rst, the checker is also
+used by ``make auditconfig``.
+
External dependencies
=====================

--
2.56.0