From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=193.142.43.55 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796338188; b=AOi+jnivpZFAfBjGqVySNDIsoDJbzc994mofMkUYt/OlSYI/aERM1Jq5zJEjL81AOT1J pLmTLlREVMaB8rSezfLN9eR3DZ4GlYfRwoWgyuEfkWJkKCKClpwRgn4IwZ4o3EJHkciU7 tnU2cQ8r8PzJrUx69DywBU2U6mXuSOZus0xXeh5HuoEsu8iRLxbwqCMYYUpCnlajGnomT IRahuDREfxCOlQx17t5Bo2RmsdugAbnBr3Pjlk+2HsQgOcgWFitCv+ESjy0mSLSBZMfNd LCX04+q4Ks1Thv1vaKfxsuKCCTasYoPhwG2cf2VXZlopNw/09kQ0GjFREtGOf43DxQQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796338188; h=DMARC-Filter:From:DKIM-Signature:DKIM-Signature:To:Cc:Subject:Date: Message-ID:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=p5PrFkBZe2kD+l+fsb/P5iJGic6qxtzPU4ifLHR+v6M=; b=XT8cafDS1pvxrcBLv9QYQQquxoZzxZTLXBIFH3HKbWZcTEcGPSkml2MhNbZOpvRRSaP4 u6sSkeUtE8PnVd3L7VYI/HYD6ftdLkONKTICciWDtibOwO7InJLul/5IEP0AFUtiqy4mt XO7l5Dzd6BnYt+SCSMnmt9HsFtI8IgSJmbU8wfxwnbeQgAykNKyEpvxWm113wfCWsVRn9 MGlEHCTWmBEKPLRY38FO4NvOIb1WTckGylY1dofHQ5BRXYdaVeelZrPteZp9W5w63lTbD MbAUtf2pWvhpGD12LAPdqRnMM6SoDDbqs+XPZ5XiaERBTWenDmvA0JYQhvcDs9Lmy3A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=knNuLABT; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=EKnQ0jnx; arc=none smtp.remote-ip=193.142.43.55 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E2411606A33A; Thu, 3 Dec 2026 22:49:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E2411606A33A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=knNuLABT; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=EKnQ0jnx From: "Ahmed S. Darwish" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1796338184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=p5PrFkBZe2kD+l+fsb/P5iJGic6qxtzPU4ifLHR+v6M=; b=knNuLABTzFWggCUD+Lcj9aEFJAT8heutxDvZgKaY9RPlfr1BZ7hjuiQMNNuDyXHXprXA/O ubiVz75QH2N7oajk0W/n4MbjLQzW3+yEjziOw0TMypnGswnC19LZURcTpsWQ0+HimjVPDf S0Yu4l3aoY5PywlzwKwjYAxSAT2cAoAvnHijH9wn2ONRXXbsTB/dZJMcOPJYM8/fE0lv1z YEmHsy8IguKWkqYyb/CYmd2YrGxCZNb0lVJiUN0QjJFdALghiPFbfKSaSp8S0D2/b+k+dt NM9fsXRoAVlxvUSHNkP+EZ9VkIMZ3ITb5RcObgzDZJs6VpV0WdTfRWc7OJJiAg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1796338184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=p5PrFkBZe2kD+l+fsb/P5iJGic6qxtzPU4ifLHR+v6M=; b=EKnQ0jnxYHCv60d2dUhkn7RQUueODp3Ewcv0BWYbY7o+JozEAcvAaMEfMHIl0AJaTpfrKr witE87VUdrQJzJCQ== To: 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?q?Zbigniew=20J=C4=99drzejewski-Szmek?= , Daan De Meyer , Luca Boccassi , linux-rt-devel@lists.linux.dev, debian-kernel@lists.debian.org, linux-kbuild@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, "Ahmed S. Darwish" Subject: [PATCH v2 06/11] kconfig-audit: Introduce policy overlays schema Date: Thu, 3 Dec 2026 23:49:07 +0100 Message-ID: <20261203224916.118064-7-darwi@linutronix.de> In-Reply-To: <20261203224916.118064-1-darwi@linutronix.de> References: <20261203224916.118064-1-darwi@linutronix.de> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add a schema for kconfig-audit policy overlay files. Reuse the previously refactored rule definitions at rule.yml. Signed-off-by: Ahmed S. Darwish --- .../schema/policy-overlay-v1.yml | 49 +++++++++++++++++++ tools/kconfig-audit/schema/rule.yml | 6 +-- 2 files changed, 52 insertions(+), 3 deletions(-) create mode 100644 tools/kconfig-audit/schema/policy-overlay-v1.yml diff --git a/tools/kconfig-audit/schema/policy-overlay-v1.yml b/tools/kconfig-audit/schema/policy-overlay-v1.yml new file mode 100644 index 000000000000..d95e9197a53c --- /dev/null +++ b/tools/kconfig-audit/schema/policy-overlay-v1.yml @@ -0,0 +1,49 @@ +# SPDX-License-Identifier: GPL-2.0-only + +"$schema": "https://json-schema.org/draft-07/schema#" + +title: kconfig-audit policy schema +type: object +required: [api_version, kind] +additionalProperties: false + +properties: + api_version: + type: string + const: kconfig-audit.kernel.org/v1 + + kind: + type: string + const: PolicyOverlay + + # Optional base policy `docs_url` override + docs_url: + type: string + format: uri + + # + # Full policy files require `expected` and `severity` for each rule. + # Meanwhile, policy overlay files can contain partial rule entries + # without restating fields they do not override. Thus, do not require + # such fields here. + # + # For example, a PREEMPT_RT policy can have: + # + # rules: + # - name: CONFIG_DRM + # expected: disabled + # severity: info + # docs_hint: config + # + # and its overlay can just be: + # + # rules: + # - name: CONFIG_DRM + # expected: neutral + # + rules: + type: array + minItems: 1 + items: + allOf: + - $ref: "rule.yml#/definitions/rule" diff --git a/tools/kconfig-audit/schema/rule.yml b/tools/kconfig-audit/schema/rule.yml index a6b1bfdb435b..db839d992d7b 100644 --- a/tools/kconfig-audit/schema/rule.yml +++ b/tools/kconfig-audit/schema/rule.yml @@ -56,9 +56,9 @@ definitions: # # enabled option is expected to be enabled (built-in or module). # disabled option is expected to be either absent or unset. - # neutral option can be enabled or disabled. This is used to exempt - # one or more symbols from a `name_pattern` rule. - # + # neutral option can be enabled or disabled. This is to be used + # by overlays, or to exempt one or more symbols from a + # `name_pattern` rule. expected: type: string enum: [enabled, disabled, neutral] -- 2.56.0