From nobody Mon Nov 23 04:18:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1793194636; cv=none; d=zohomail.com; s=zohoarc; b=M5n7vCc8R/Gs4eHsoLUvrRqlKGwjn4MB9nUdu0eZsCliokg5zbsT6nUgcU+vmo45JU3/Y+o0wgfMfFKYgbP2Nq8P0ubgZg+piH5UxhkJb+MeTQsAVeXE9VUvgqCS+SoHqTsaYAr5vSyt4Uyal48Ik+S6PJ1wMBCXutY7GM9x9s0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793194636; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=7mqwlJ2cpKXvG3aCVAUW6xKejx28WZYL1+my44fhoRE=; b=fthveU9KHsZSLFvLDyKrX+RfkfuaLQqC47ijdp+IpzQ6x5TcAo5xx6v+0qDLWP3BrBt7l6oFqYBY3W4hZdqFbGSf6Rd6Rh8wukpGpQu0kB/ue1nFQr66nlJ+WDNF1eRyf5oou30t/DYH+CT3pBFsYHk+RDGVcZcOM1o+zxBGuO8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793194636720488.6297080511114; Wed, 28 Oct 2026 06:37:16 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xM3pZ-00051w-0J; Wed, 28 Oct 2026 09:36:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xM3pN-0004y1-Ti for qemu-devel@nongnu.org; Wed, 28 Oct 2026 09:36:32 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xM3pC-0007h2-Fs for qemu-devel@nongnu.org; Wed, 28 Oct 2026 09:36:28 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-403-YIfRtW-MORGRODfZhlFddA-1; Wed, 28 Oct 2026 09:36:09 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 76605195606E for ; Wed, 28 Oct 2026 13:36:08 +0000 (UTC) Received: from berrange.csb (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B992F30002D1; Wed, 28 Oct 2026 13:36:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1793194577; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7mqwlJ2cpKXvG3aCVAUW6xKejx28WZYL1+my44fhoRE=; b=jIEgrKGdDbdhpxG+C/mV9Z3DX3OI/cClMnoJhEu3Fh4r5Z11/45nOBjrNE8MGEgKPFn/iq N2rEtGZbfGusme3+lA6SC5MaZ/+DX6BHbSpPwWP/ku0yifn0caK/0jP4pIuejNdMYQGUuX IRpp4bmmaFTOgEyEOC9H7UAZsCsQ0rI= X-MC-Unique: YIfRtW-MORGRODfZhlFddA-1 X-Mimecast-MFC-AGG-ID: YIfRtW-MORGRODfZhlFddA_1793194568 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: Markus Armbruster , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 1/8] qapi: make 'CompatPolicy' the first arg in compat_policy_input_ok Date: Wed, 28 Oct 2026 13:35:56 +0000 Message-ID: <20261028133603.1893289-2-berrange@redhat.com> In-Reply-To: <20261028133603.1893289-1-berrange@redhat.com> References: <20261028133603.1893289-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) 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_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1793194638594154100 The typical API design pattern is for a method to be named after the type of the first arg passed into the method. For the compat_policy_input_ok method, this points towards 'CompatPolicy' being the first arg, matching compat_policy_check_security. Signed-off-by: Daniel P. Berrang=C3=A9 --- include/qapi/compat-policy.h | 4 ++-- qapi/qapi-util.c | 16 ++++++++-------- qapi/qapi-visit-core.c | 4 ++-- qapi/qmp-dispatch.c | 2 +- qapi/qobject-input-visitor.c | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/qapi/compat-policy.h b/include/qapi/compat-policy.h index f5af2090692..df87d716439 100644 --- a/include/qapi/compat-policy.h +++ b/include/qapi/compat-policy.h @@ -18,8 +18,8 @@ =20 extern CompatPolicy compat_policy; =20 -bool compat_policy_input_ok(uint64_t features, - const CompatPolicy *policy, +bool compat_policy_input_ok(const CompatPolicy *policy, + uint64_t features, ErrorClass error_class, const char *kind, const char *name, Error **errp); diff --git a/qapi/qapi-util.c b/qapi/qapi-util.c index 38b1cec7a41..93898f57a05 100644 --- a/qapi/qapi-util.c +++ b/qapi/qapi-util.c @@ -19,8 +19,8 @@ =20 CompatPolicy compat_policy; =20 -static bool compat_policy_input_ok1(const char *adjective, - CompatPolicyInput policy, +static bool compat_policy_input_ok1(CompatPolicyInput policy, + const char *adjective, ErrorClass error_class, const char *kind, const char *name, Error **errp) @@ -38,21 +38,21 @@ static bool compat_policy_input_ok1(const char *adjecti= ve, } } =20 -bool compat_policy_input_ok(uint64_t features, - const CompatPolicy *policy, +bool compat_policy_input_ok(const CompatPolicy *policy, + uint64_t features, ErrorClass error_class, const char *kind, const char *name, Error **errp) { if ((features & 1u << QAPI_DEPRECATED) - && !compat_policy_input_ok1("Deprecated", - policy->deprecated_input, + && !compat_policy_input_ok1(policy->deprecated_input, + "Deprecated", error_class, kind, name, errp)) { return false; } if ((features & (1u << QAPI_UNSTABLE)) - && !compat_policy_input_ok1("Unstable", - policy->unstable_input, + && !compat_policy_input_ok1(policy->unstable_input, + "Unstable", error_class, kind, name, errp)) { return false; } diff --git a/qapi/qapi-visit-core.c b/qapi/qapi-visit-core.c index 706c61e0260..66d57dd447a 100644 --- a/qapi/qapi-visit-core.c +++ b/qapi/qapi-visit-core.c @@ -410,8 +410,8 @@ static bool input_type_enum(Visitor *v, const char *nam= e, int *obj, } =20 if (lookup->features - && !compat_policy_input_ok(lookup->features[value], - &v->compat_policy, + && !compat_policy_input_ok(&v->compat_policy, + lookup->features[value], ERROR_CLASS_GENERIC_ERROR, "value", enum_str, errp)) { return false; diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c index 965cad64998..f2fb8f7976c 100644 --- a/qapi/qmp-dispatch.c +++ b/qapi/qmp-dispatch.c @@ -185,7 +185,7 @@ QDict *coroutine_mixed_fn qmp_dispatch(const QmpCommand= List *cmds, QObject *requ "The command %s has not been found", command); goto out; } - if (!compat_policy_input_ok(cmd->features, &compat_policy, + if (!compat_policy_input_ok(&compat_policy, cmd->features, ERROR_CLASS_COMMAND_NOT_FOUND, "command", command, &err)) { goto out; diff --git a/qapi/qobject-input-visitor.c b/qapi/qobject-input-visitor.c index c52d36997df..17d91746d3a 100644 --- a/qapi/qobject-input-visitor.c +++ b/qapi/qobject-input-visitor.c @@ -667,7 +667,7 @@ static bool qobject_input_policy_reject(Visitor *v, con= st char *name, uint64_t features, Error **errp) { - return !compat_policy_input_ok(features, &v->compat_policy, + return !compat_policy_input_ok(&v->compat_policy, features, ERROR_CLASS_GENERIC_ERROR, "parameter", name, errp); } --=20 2.56.0 From nobody Mon Nov 23 04:18:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1793194606; cv=none; d=zohomail.com; s=zohoarc; b=J24V3fxolNYSTA+abYRPpEPX6JMbMR3sRIL/UGAheGBMhi55K4B4XtTG34XUkxqffP6tSKx3UanXYFnhRlyvJvFHdBmLpXwg1+SYE31L1OdqAtGo9hSK/Nnyh+AW3uiZ0dGtcRcWYddDyEEvvtlMueqkUrfuicAihrClX0WC7mc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793194606; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=8Nw1q2JSdXJhjqPl43S5WHTGvP3/xUVXyKO/+5mZUbs=; b=l1PKt5hab5D2SJCXlSTZACd7dJ5UqHtsjtS6CAsEueBk3xvqe6ogH56fH80b/ETM2I8i/2XICg0xNpD+4jAbhTmoUPM4FO79e44xwn8gwUF0H6zbfKYF7J+YMvYwaAojtKEu2yWRVgmnWaNAgAmHPiLgTo9CQu520MHIRFuA7Dc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793194606964158.90213790782855; Wed, 28 Oct 2026 06:36:46 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xM3pV-00050g-5k; Wed, 28 Oct 2026 09:36:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xM3pB-0004vO-87 for qemu-devel@nongnu.org; Wed, 28 Oct 2026 09:36:19 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xM3p8-0007gB-6w for qemu-devel@nongnu.org; Wed, 28 Oct 2026 09:36:16 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-533-XjqR3QxfML-yMvg0cQcs_A-1; Wed, 28 Oct 2026 09:36:10 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C600D1800DB5 for ; Wed, 28 Oct 2026 13:36:09 +0000 (UTC) Received: from berrange.csb (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C7AC030002CB; Wed, 28 Oct 2026 13:36:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1793194573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8Nw1q2JSdXJhjqPl43S5WHTGvP3/xUVXyKO/+5mZUbs=; b=RheusU7Lcoasqd2u5EXpHkcHbstNppO2H04TbDc7byloCFyQP5Z8ALYN8VPlVcy+fHzC7p +tTApWeEizhehduwWcSXciLe1EKWGlBYvpFu5sXC+cTTg8l21gJkQR2epCLHNVpuIwzRsL zUuPvlWnWhXnbhsLfnnhL+CaRYAIFBA= X-MC-Unique: XjqR3QxfML-yMvg0cQcs_A-1 X-Mimecast-MFC-AGG-ID: XjqR3QxfML-yMvg0cQcs_A_1793194570 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: Markus Armbruster , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 2/8] qapi: add 'warn' option to CompatPolicyInput Date: Wed, 28 Oct 2026 13:35:57 +0000 Message-ID: <20261028133603.1893289-3-berrange@redhat.com> In-Reply-To: <20261028133603.1893289-1-berrange@redhat.com> References: <20261028133603.1893289-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) 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_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1793194609559158500 This prints a warning on stderr every time a policy violation is encountered, but accepts the input. Signed-off-by: Daniel P. Berrang=C3=A9 --- qapi/compat.json | 4 +++- qapi/qapi-util.c | 4 ++++ qemu-options.hx | 12 ++++++++---- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/qapi/compat.json b/qapi/compat.json index 0f90ea1f524..dfa3fea0577 100644 --- a/qapi/compat.json +++ b/qapi/compat.json @@ -17,10 +17,12 @@ # # @crash: abort() the process # +# @warn: Accept with a warning printed to stderr (Since: 11.2) +# # Since: 6.0 ## { 'enum': 'CompatPolicyInput', - 'data': [ 'accept', 'reject', 'crash' ] } + 'data': [ 'accept', 'reject', 'crash', 'warn' ] } =20 ## # @CompatPolicyOutput: diff --git a/qapi/qapi-util.c b/qapi/qapi-util.c index 93898f57a05..f81a171a5b1 100644 --- a/qapi/qapi-util.c +++ b/qapi/qapi-util.c @@ -28,6 +28,10 @@ static bool compat_policy_input_ok1(CompatPolicyInput po= licy, switch (policy) { case COMPAT_POLICY_INPUT_ACCEPT: return true; + case COMPAT_POLICY_INPUT_WARN: + warn_report("%s %s %s disabled by policy", + adjective, kind, name); + return true; case COMPAT_POLICY_INPUT_REJECT: error_set(errp, error_class, "%s %s %s disabled by policy", adjective, kind, name); diff --git a/qemu-options.hx b/qemu-options.hx index f72f30e246d..16d9c6c9072 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -4693,9 +4693,9 @@ DEFHEADING() DEFHEADING(Debug/Expert options:) =20 DEF("compat", HAS_ARG, QEMU_OPTION_compat, - "-compat [deprecated-input=3Daccept|reject|crash][,deprecated-output= =3Daccept|hide]\n" + "-compat [deprecated-input=3Daccept|reject|crash|warn][,deprecated-out= put=3Daccept|hide]\n" " Policy for handling deprecated management interfaces\= n" - "-compat [unstable-input=3Daccept|reject|crash][,unstable-output=3Dacc= ept|hide]\n" + "-compat [unstable-input=3Daccept|reject|crash|warn][,unstable-output= =3Daccept|hide]\n" " Policy for handling unstable management interfaces\n", QEMU_ARCH_ALL) SRST @@ -4703,7 +4703,9 @@ SRST Set policy for handling deprecated management interfaces (experimental= ): =20 ``deprecated-input=3Daccept`` (default) - Accept deprecated commands and arguments + Accept deprecated commands and arguments silently + ``deprecated-input=3Dwarn`` + Accept deprecated commands and arguments with warning on stderr ``deprecated-input=3Dreject`` Reject deprecated commands and arguments ``deprecated-input=3Dcrash`` @@ -4719,7 +4721,9 @@ SRST Set policy for handling unstable management interfaces (experimental): =20 ``unstable-input=3Daccept`` (default) - Accept unstable commands and arguments + Accept unstable commands and arguments silently + ``unstable-input=3Dwarn`` + Accept unstable commands and arguments with warning on stderr ``unstable-input=3Dreject`` Reject unstable commands and arguments ``unstable-input=3Dcrash`` --=20 2.56.0 From nobody Mon Nov 23 04:18:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1793194598; cv=none; d=zohomail.com; s=zohoarc; b=Nt0L35ibeC1imCAvTAgLYcU98/NWyWU7101C1ChDOwt/98CMUfKFC74xmFzWxpqQwYMmroTNEzt5ToBgVvnTYKQLGYHxwCVi6kOewwv5YfZQEJV/szWjFAHbh5XzsD5C78v6fshA0RPgpy3OVybqLTJa38dIpl7AeNPXeEDsMfI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793194598; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=1+rq7QSkU88zkvPLsIUznOuFo3T8ZSDb3UEZtedQDwY=; b=FZBRymC2Nq7Nzu8M12vsvPzF8nvNXO0kBL0pwhgtssduj19HeJW7DYSVXS8qxIBtM5v/e6ZPWtsG8CH/sZsT6XM8Qq0yWW4kfjFLjHO/vplU5uJp3xRr+5hhVCA1t7ELqqFcqIIJI19fgsO+CqI3mJji9KmDCp6S22K3bAkp0xM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 179319459848219.943255728287; Wed, 28 Oct 2026 06:36:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xM3pN-0004xX-La; Wed, 28 Oct 2026 09:36:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xM3pB-0004vP-9x for qemu-devel@nongnu.org; Wed, 28 Oct 2026 09:36:19 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xM3p8-0007gE-RM for qemu-devel@nongnu.org; Wed, 28 Oct 2026 09:36:17 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-97-QESZrijDNrKwqmLqGYoSWQ-1; Wed, 28 Oct 2026 09:36:12 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1353B18021D0 for ; Wed, 28 Oct 2026 13:36:11 +0000 (UTC) Received: from berrange.csb (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1CEA530002D0; Wed, 28 Oct 2026 13:36:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1793194573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1+rq7QSkU88zkvPLsIUznOuFo3T8ZSDb3UEZtedQDwY=; b=jAkhtU+iJHBwzplQ0DnkN1gPpd/V54u1RGyyT3Ykx5+6gbf4zzRRFBB/sgNvz2YZ+oeYGN qb1eT3oH5OhRk2YyExouKScKg4D83DoG4FKH8qZihMIWMSTQuZp4Kwgb/1pioFnlwhMLSL DACIAvTUOkQJ18pP8glb88fm7ljXJ/A= X-MC-Unique: QESZrijDNrKwqmLqGYoSWQ-1 X-Mimecast-MFC-AGG-ID: QESZrijDNrKwqmLqGYoSWQ_1793194571 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: Markus Armbruster , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 3/8] qapi: rename 'insecure-types' to 'insecure-input' Date: Wed, 28 Oct 2026 13:35:58 +0000 Message-ID: <20261028133603.1893289-4-berrange@redhat.com> In-Reply-To: <20261028133603.1893289-1-berrange@redhat.com> References: <20261028133603.1893289-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) 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_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1793194601981154100 This provides better conceptual naming alignment with other -compat flags. Signed-off-by: Daniel P. Berrang=C3=A9 --- docs/system/security.rst | 2 +- qapi/compat.json | 4 ++-- qapi/qapi-util.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/system/security.rst b/docs/system/security.rst index 75e39caedea..e211fdd2344 100644 --- a/docs/system/security.rst +++ b/docs/system/security.rst @@ -168,7 +168,7 @@ eligible for CVE assignment. Annotations will be extend= ed to other backend and object types over time, to make their security status explicit. =20 It is possible to control or identify the usage of types that do not offer -an explicit security boundary using the ``insecure-types`` parameter to the +an explicit security boundary using the ``insecure-input`` parameter to the ``-compat`` argument, which accepts three values: =20 * accept: usage of any type will be permitted. This is the current diff --git a/qapi/compat.json b/qapi/compat.json index dfa3fea0577..f28c24149c8 100644 --- a/qapi/compat.json +++ b/qapi/compat.json @@ -77,7 +77,7 @@ # @unstable-output: how to handle unstable output (default 'accept') # (since 6.2) # -# @insecure-types: how to handle types that are not declared secure +# @insecure-input: how to handle types that are not declared secure # (default 'accept') (since 11.2) # # Since: 6.0 @@ -87,4 +87,4 @@ '*deprecated-output': 'CompatPolicyOutput', '*unstable-input': 'CompatPolicyInput', '*unstable-output': 'CompatPolicyOutput', - '*insecure-types': 'CompatPolicySecurity' } } + '*insecure-input': 'CompatPolicySecurity' } } diff --git a/qapi/qapi-util.c b/qapi/qapi-util.c index f81a171a5b1..e6f3006b16c 100644 --- a/qapi/qapi-util.c +++ b/qapi/qapi-util.c @@ -72,7 +72,7 @@ bool compat_policy_check_security(const CompatPolicy *pol= icy, return true; } =20 - switch (policy->insecure_types) { + switch (policy->insecure_input) { case COMPAT_POLICY_SECURITY_ACCEPT: return true; =20 --=20 2.56.0 From nobody Mon Nov 23 04:18:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1793194665; cv=none; d=zohomail.com; s=zohoarc; b=EobKmkBcl7FEO9BL9Rmu5aPPC6Lrx/Qy4A20QpEldkN7lhWNkXOLfOOcrHZD+kxqA2YVAGFl8KldhkOz0DJrBx04HitJmxP2BAsdA4kP8ezmCr/CAD60zhtSP5vWlD+Tuv/kSYxe59pG4kiWhjejbPg8CfS6FyWXqpld07VUivQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793194665; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=kPjUgdvCLuzKbey+AtYpO3u55UqZVAB51C78OCPMeYY=; b=XpJtmgpzu+XGQwu0CQydcNBQlxB+0aFPoenn5LLnB4hZ9uc96B5K9s9iit40tI+aRqj1ccBNVDzM67U6/7E8GlsQkNJtOcaXnN0D/dO5uKxpuzuf2/xt03Q135uNbwK0PTyNiyu6zJnqOyWOaRqyU3zvD24A8TMEo8JGNzj9bEI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793194664897309.88275922528544; Wed, 28 Oct 2026 06:37:44 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xM3qE-0005bi-HP; Wed, 28 Oct 2026 09:37:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xM3pN-0004xx-Ry for qemu-devel@nongnu.org; Wed, 28 Oct 2026 09:36:32 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xM3pL-0007hI-24 for qemu-devel@nongnu.org; Wed, 28 Oct 2026 09:36:28 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-220-VTksj7TTN6GAnvTsqujC5g-1; Wed, 28 Oct 2026 09:36:13 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7F1F51956069 for ; Wed, 28 Oct 2026 13:36:12 +0000 (UTC) Received: from berrange.csb (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 91F0D30002CB; Wed, 28 Oct 2026 13:36:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1793194581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kPjUgdvCLuzKbey+AtYpO3u55UqZVAB51C78OCPMeYY=; b=YtjbvIPwjTY9yaOYFMgOOSNwiHbKI6L02uqcHnhT9fep9fasbQ2Dkgq7kLXfe8qSx3lJHs o3pq7pIV1VLzjbFXG/jLjfKrV3E4JECIHv0wrdkXdNHUK7q7F1kJzpuvUOVTeq3pkhRMC7 SgBfkeL0/omWouiLrD2rw5WsYMKmFcQ= X-MC-Unique: VTksj7TTN6GAnvTsqujC5g-1 X-Mimecast-MFC-AGG-ID: VTksj7TTN6GAnvTsqujC5g_1793194572 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: Markus Armbruster , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 4/8] qapi: drop CompatPolicySecurity and use CompatPolicyInput Date: Wed, 28 Oct 2026 13:35:59 +0000 Message-ID: <20261028133603.1893289-5-berrange@redhat.com> In-Reply-To: <20261028133603.1893289-1-berrange@redhat.com> References: <20261028133603.1893289-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) 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_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1793194667661158500 With CompatPolicyInput gaining a "warn" option, the CompatPolicySecurity type is redundant. Note the error message for insecure-input changes from Type 'rtl8139' does not provide a security boundary to protect against untrusted data or actions To Insecure QOM type rtl8139 disabled by policy Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Marc-Andr=C3=A9 Lureau --- qapi/compat.json | 18 +----------------- qapi/qapi-util.c | 21 ++++----------------- 2 files changed, 5 insertions(+), 34 deletions(-) diff --git a/qapi/compat.json b/qapi/compat.json index f28c24149c8..7790a7896a8 100644 --- a/qapi/compat.json +++ b/qapi/compat.json @@ -37,22 +37,6 @@ { 'enum': 'CompatPolicyOutput', 'data': [ 'accept', 'hide' ] } =20 -## -# @CompatPolicySecurity: -# Policy for handling any devices or backends which do not provide -# a security boundary to protect against untrusted environments -# -# @accept: Allow any usage -# -# @reject: Reject with an error reported -# -# @warn: Allow any usage, with a warning reported -# -# Since: 11.2 -## -{ 'enum': 'CompatPolicySecurity', - 'data': [ 'accept', 'reject', 'warn' ] } - ## # @CompatPolicy: # Policy for handling deprecated management interfaces. @@ -87,4 +71,4 @@ '*deprecated-output': 'CompatPolicyOutput', '*unstable-input': 'CompatPolicyInput', '*unstable-output': 'CompatPolicyOutput', - '*insecure-input': 'CompatPolicySecurity' } } + '*insecure-input': 'CompatPolicyInput' } } diff --git a/qapi/qapi-util.c b/qapi/qapi-util.c index e6f3006b16c..36926b5003d 100644 --- a/qapi/qapi-util.c +++ b/qapi/qapi-util.c @@ -72,23 +72,10 @@ bool compat_policy_check_security(const CompatPolicy *p= olicy, return true; } =20 - switch (policy->insecure_input) { - case COMPAT_POLICY_SECURITY_ACCEPT: - return true; - - case COMPAT_POLICY_SECURITY_REJECT: - error_setg(errp, "Type '%s' does not provide a security boundary " - "to protect against untrusted data or actions", typenam= e); - return false; - - case COMPAT_POLICY_SECURITY_WARN: - warn_report("Type '%s' does not provide a security boundary " - "to protect against untrusted data or actions", typena= me); - return true; - - default: - g_assert_not_reached(); - } + return compat_policy_input_ok1(policy->insecure_input, + "Insecure", + ERROR_CLASS_GENERIC_ERROR, + "QOM type", typename, errp); } =20 =20 --=20 2.56.0 From nobody Mon Nov 23 04:18:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1793194680; cv=none; d=zohomail.com; s=zohoarc; b=NlkpSPOnHZO+OUcCORrZnGurBJbIPWdDDRhifsWgtgBtAs3A03pl6WuX6COl8exBRuAF3dJP/6ceT59/BlAztmgQPbMiV6ISAvc60h3KGqAKuCHUVmWZdaba/EDSB0EXAgftxmaTON6jiK383zza0ZjfBxxLNcWozeHmQ6bwZ9A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793194680; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ofXfefyr9YkyiVnlUlkou6IQdWkjE7Q/92qkX1WKPMA=; b=LXCEsKsTGzwDglyg+Bbv3IkTdrDan0Mdsc33vg1sPjvxkJTJnACObNQ+a1jrxZawFp+S8/Ulf0jIN0f5EMs9jkhUi+gsWXCCsA8zz9a0sLn1QWVIr25hglRcOvso97swBzgZN04J3v+5/z3YZ+8IScGguGO1Kr4B2Fgc4dZDk7A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793194680594636.9966688853619; Wed, 28 Oct 2026 06:38:00 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xM3qA-0005OG-96; Wed, 28 Oct 2026 09:37:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xM3pL-0004xH-Dm for qemu-devel@nongnu.org; Wed, 28 Oct 2026 09:36:27 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xM3pB-0007gl-Oz for qemu-devel@nongnu.org; Wed, 28 Oct 2026 09:36:27 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-647-N3QzSET1NEu3-8jAU7PMBg-1; Wed, 28 Oct 2026 09:36:14 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CBD3818021F0 for ; Wed, 28 Oct 2026 13:36:13 +0000 (UTC) Received: from berrange.csb (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E3A5A30002CB; Wed, 28 Oct 2026 13:36:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1793194577; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ofXfefyr9YkyiVnlUlkou6IQdWkjE7Q/92qkX1WKPMA=; b=cgYqVSo2f3kXVw8s7BqU+Ibf8u4hf4gjaLw0hQXZ4J/lnuhG1GESUrT4LRM/uoiiHgYUap LwTLeqYL0Y6LwCj2JfuwMiWYrVploVS4mqg5JNNsQry2vQDPJ59Jb1L36qurymR1o9ZDnJ k84l3CzxRvUtN3Nuf1kU9TplCiByjS0= X-MC-Unique: N3QzSET1NEu3-8jAU7PMBg-1 X-Mimecast-MFC-AGG-ID: N3QzSET1NEu3-8jAU7PMBg_1793194573 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: Markus Armbruster , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 5/8] qapi: rename compat_policy_check_security method Date: Wed, 28 Oct 2026 13:36:00 +0000 Message-ID: <20261028133603.1893289-6-berrange@redhat.com> In-Reply-To: <20261028133603.1893289-1-berrange@redhat.com> References: <20261028133603.1893289-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) 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_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1793194683284154100 Rename to compat_policy_security_ok to match the naming convention established by compat_policy_input_ok. Signed-off-by: Daniel P. Berrang=C3=A9 --- include/qapi/compat-policy.h | 8 ++++---- qapi/qapi-util.c | 8 ++++---- qom/object.c | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/qapi/compat-policy.h b/include/qapi/compat-policy.h index df87d716439..b7b543ffe74 100644 --- a/include/qapi/compat-policy.h +++ b/include/qapi/compat-policy.h @@ -24,10 +24,10 @@ bool compat_policy_input_ok(const CompatPolicy *policy, const char *kind, const char *name, Error **errp); =20 -bool compat_policy_check_security(const CompatPolicy *policy, - const char *typename, - bool is_secure, - Error **errp); +bool compat_policy_security_ok(const CompatPolicy *policy, + const char *typename, + bool is_secure, + Error **errp); =20 /* * Create a QObject input visitor for @obj for use with QMP diff --git a/qapi/qapi-util.c b/qapi/qapi-util.c index 36926b5003d..f78d45a1a51 100644 --- a/qapi/qapi-util.c +++ b/qapi/qapi-util.c @@ -63,10 +63,10 @@ bool compat_policy_input_ok(const CompatPolicy *policy, return true; } =20 -bool compat_policy_check_security(const CompatPolicy *policy, - const char *typename, - bool is_secure, - Error **errp) +bool compat_policy_security_ok(const CompatPolicy *policy, + const char *typename, + bool is_secure, + Error **errp) { if (is_secure) { return true; diff --git a/qom/object.c b/qom/object.c index 96498f3d001..ceb8e9eebec 100644 --- a/qom/object.c +++ b/qom/object.c @@ -3276,10 +3276,10 @@ void object_class_property_set_description(ObjectCl= ass *klass, =20 bool object_class_check_security(ObjectClass *klass, Error **errp) { - return compat_policy_check_security(&compat_policy, - object_class_get_name(klass), - object_class_is_secure(klass), - errp); + return compat_policy_security_ok(&compat_policy, + object_class_get_name(klass), + object_class_is_secure(klass), + errp); } =20 static void object_class_init(ObjectClass *klass, const void *data) --=20 2.56.0 From nobody Mon Nov 23 04:18:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1793194680; cv=none; d=zohomail.com; s=zohoarc; b=bcMAkYdHQqP7BePlMtg8MQpJvjtYkUQxCu1jrk1BsqEjt61hAgMBDGtQOntJjZTbiK4fuAQKRFyZRlIfR9vZiLlzjAVHgh6YWvxMDe2Zbs6NCXSs2i8hnvj7REXKs24Brfj+Vc4FOtuQmPvobP5UA/+xfxbdq4W0031ObtslX1s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793194680; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=PAy4OHRqLYG7wfryP+aL8SMz8zd3eBGw413nHouklM0=; b=JW7elRegDBjtVvsCwejd2BjUQpSiyzcmUU5lrhnHP4QT2H/MWpXRrqL0whVDVOX03oTTIbDVWTaMTwfw846YD7Q5kbJjDnLnZMbrptsHvk7JQJ/JjGrzrTb/T30ftwIw+D7QGxeqiZrhr1H+cfMgL7pWctJqdYM+NexZoECrt20= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17931946805601011.782173282864; Wed, 28 Oct 2026 06:38:00 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xM3qK-0005jp-AN; Wed, 28 Oct 2026 09:37:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xM3pQ-0004yZ-Na for qemu-devel@nongnu.org; Wed, 28 Oct 2026 09:36:33 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xM3pL-0007hc-6u for qemu-devel@nongnu.org; Wed, 28 Oct 2026 09:36:29 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-645-RR-te2slPEO83L_W_qTlig-1; Wed, 28 Oct 2026 09:36:16 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3DC3B18052D8 for ; Wed, 28 Oct 2026 13:36:15 +0000 (UTC) Received: from berrange.csb (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 29CDF30002CB; Wed, 28 Oct 2026 13:36:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1793194583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PAy4OHRqLYG7wfryP+aL8SMz8zd3eBGw413nHouklM0=; b=YUKoHVhge2HKtZMRy45BNagkApZCcCaVzlb9tIJWjRVV99AO+HNunRW6TnEabPLeAbtlE4 VbZK/9TKH3g3mBkTBMCE/EMszJnRFJujxJ4OMgi50R6HRSZzScdFIvLiyxOasaHeKdmM3V oNWAiie+bF9MlKYn3Romj12iOf7S4JU= X-MC-Unique: RR-te2slPEO83L_W_qTlig-1 X-Mimecast-MFC-AGG-ID: RR-te2slPEO83L_W_qTlig_1793194575 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: Markus Armbruster , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 6/8] qapi: reverse arg order in compat_policy_security_ok Date: Wed, 28 Oct 2026 13:36:01 +0000 Message-ID: <20261028133603.1893289-7-berrange@redhat.com> In-Reply-To: <20261028133603.1893289-1-berrange@redhat.com> References: <20261028133603.1893289-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) 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_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1793194681830158500 Match the compat_policy_input_ok design more closely by having the "relevant facts" being checked as the 2nd argument. Signed-off-by: Daniel P. Berrang=C3=A9 --- include/qapi/compat-policy.h | 2 +- qapi/qapi-util.c | 2 +- qom/object.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/qapi/compat-policy.h b/include/qapi/compat-policy.h index b7b543ffe74..53c96ce1a26 100644 --- a/include/qapi/compat-policy.h +++ b/include/qapi/compat-policy.h @@ -25,8 +25,8 @@ bool compat_policy_input_ok(const CompatPolicy *policy, Error **errp); =20 bool compat_policy_security_ok(const CompatPolicy *policy, - const char *typename, bool is_secure, + const char *typename, Error **errp); =20 /* diff --git a/qapi/qapi-util.c b/qapi/qapi-util.c index f78d45a1a51..c845cadbdf2 100644 --- a/qapi/qapi-util.c +++ b/qapi/qapi-util.c @@ -64,8 +64,8 @@ bool compat_policy_input_ok(const CompatPolicy *policy, } =20 bool compat_policy_security_ok(const CompatPolicy *policy, - const char *typename, bool is_secure, + const char *typename, Error **errp) { if (is_secure) { diff --git a/qom/object.c b/qom/object.c index ceb8e9eebec..30699f91279 100644 --- a/qom/object.c +++ b/qom/object.c @@ -3277,8 +3277,8 @@ void object_class_property_set_description(ObjectClas= s *klass, bool object_class_check_security(ObjectClass *klass, Error **errp) { return compat_policy_security_ok(&compat_policy, - object_class_get_name(klass), object_class_is_secure(klass), + object_class_get_name(klass), errp); } =20 --=20 2.56.0 From nobody Mon Nov 23 04:18:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1793194618; cv=none; d=zohomail.com; s=zohoarc; b=YANtJyYldG0KrZfmuLiUl2Vxm35XxXFu6rCWX44wyGnO6vOFsn8Nfv+aAgL9bC+KOtjWFhTUnVVuIkbCR6ApYX3Swr2fvzLe2GtvE2S3Ch08qe+UjDzcu/N8CyKkQ8fXrCA1SaX/weYKGjQwevU1IHqkhdLfQ6faVYwbM38WKqk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793194618; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=IlXKjct+pS1q6/UVSHZyFHDD3PQ7ReTmBlruhCI3o30=; b=J0ZiNw3HVZ1RwkYug14NiYAthBM/guwVv3oSaZqn5fa0T0UFZT0RJzpdN0ngbnd9/Lshz0mD+lnerri+t7IjrRqAWwUJArXf8/8XLbW+6Q4Hvwq3VtzCANIN8hijXFw+lJ9/SuCOoVG2Y9zrnrx869qS313iQepQ3DAVB79m4gA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793194618510443.8105641505849; Wed, 28 Oct 2026 06:36:58 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xM3pg-00054X-5K; Wed, 28 Oct 2026 09:36:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xM3pN-0004xy-TP for qemu-devel@nongnu.org; Wed, 28 Oct 2026 09:36:32 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xM3pJ-0007hB-Pe for qemu-devel@nongnu.org; Wed, 28 Oct 2026 09:36:28 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-330-_yRIA2rPNQSp70WVPlUV4w-1; Wed, 28 Oct 2026 09:36:17 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8DEFD1955DC1 for ; Wed, 28 Oct 2026 13:36:16 +0000 (UTC) Received: from berrange.csb (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 8EB4D30002CB; Wed, 28 Oct 2026 13:36:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1793194579; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IlXKjct+pS1q6/UVSHZyFHDD3PQ7ReTmBlruhCI3o30=; b=R4JzzSttNBzIZUx47fYH6Ep6S6iNfdA5LkXyFeAFdASOWPrrSBA95Qb0joUi7fzFsuqbg1 ysAPDhf8dRIlJrI4cV03tGdLWqoUsk0iMIBWA1NdQ9QOStANFDWgasglJX+ewBmayCTVQk IFtfp16TFAzda3v58uaYa2n6+HLUjmg= X-MC-Unique: _yRIA2rPNQSp70WVPlUV4w-1 X-Mimecast-MFC-AGG-ID: _yRIA2rPNQSp70WVPlUV4w_1793194576 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: Markus Armbruster , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 7/8] qemu-options: document -compat insecure-input parameter Date: Wed, 28 Oct 2026 13:36:02 +0000 Message-ID: <20261028133603.1893289-8-berrange@redhat.com> In-Reply-To: <20261028133603.1893289-1-berrange@redhat.com> References: <20261028133603.1893289-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) 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_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1793194621749158500 This adds documentation for the previously added 'insecure-input' parameter to -compat, which controls policy for insecure configuration requests. Signed-off-by: Daniel P. Berrang=C3=A9 --- qemu-options.hx | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/qemu-options.hx b/qemu-options.hx index 16d9c6c9072..0487e74bb3e 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -4696,7 +4696,9 @@ DEF("compat", HAS_ARG, QEMU_OPTION_compat, "-compat [deprecated-input=3Daccept|reject|crash|warn][,deprecated-out= put=3Daccept|hide]\n" " Policy for handling deprecated management interfaces\= n" "-compat [unstable-input=3Daccept|reject|crash|warn][,unstable-output= =3Daccept|hide]\n" - " Policy for handling unstable management interfaces\n", + " Policy for handling unstable management interfaces\n" + "-compat [insecure-input=3Daccept|reject|crash|warn]\n" + " Policy for handling requests for insecure configurati= on requests\n", QEMU_ARCH_ALL) SRST ``-compat [deprecated-input=3D][,deprecated-output=3D]`` @@ -4734,6 +4736,24 @@ SRST Suppress unstable command results and events =20 Limitation: covers only syntactic aspects of QMP. + +``-compat [insecure-input=3D] + Set policy for handling requests for insecure configuration + requests: + + ``insecure-input=3Daccept`` (default) + Accept insecure configurations requests silently + ``insecure-input=3Dwarn`` + Accept insecure configuration requests with warning on stderr + ``insecure-input=3Dreject`` + Reject insecure configuration requests + ``insecure-input=3Dcrash`` + Crash on insecure configuration requests + + Limitation: an insecure configuration is one where QEMU has + not intended to provide a security boundary to protect against + malicious usage. Covers only QOM types for devices, machine types + and accelerators. ERST =20 DEF("fw_cfg", HAS_ARG, QEMU_OPTION_fwcfg, --=20 2.56.0 From nobody Mon Nov 23 04:18:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1793194658; cv=none; d=zohomail.com; s=zohoarc; b=WyMzgs0+TAa0yAW10DYdWW9kb/4ZaLZ5KzmnUy5ua49gdwB7jB+pFYu3cMocAQc9nuYYi+w0mAXI4GEIiZu+iCnIFztcrbM9Acu5Hmt9Kxa6mWum4dQcWKmXOWxl2vQckp6p92ICgKQjF8J7O6LbR1zLgGlXBg6NfpTus0Ofcug= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793194658; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=qyLpDq+YtXe6OKzObj8Z7614kTOeXQz1tS4DljoDEaU=; b=ODL2wn1bha5B9zsb7kauG82SA/qEfw5pfUltH3RNYsskiJ/vIS8v3fya/MqPdPkF6RyBe7dgWYWZDx3AJXtMwU6e1Y5FpDL4VY6u/Aym4bsCAU+9v0JSTnt5JuMWbZ8mZ4rVDG3X0loYm7SlO2kCDwfdTeLhOm/t5+yjP6QZ80Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793194658440122.20366436856284; Wed, 28 Oct 2026 06:37:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xM3q0-0005EH-8n; Wed, 28 Oct 2026 09:37:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xM3pN-0004xw-RY for qemu-devel@nongnu.org; Wed, 28 Oct 2026 09:36:32 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xM3pL-0007hH-2x for qemu-devel@nongnu.org; Wed, 28 Oct 2026 09:36:28 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-672-UU4ckOlAMqeCRrqPU_HEqQ-1; Wed, 28 Oct 2026 09:36:18 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DE4131800631 for ; Wed, 28 Oct 2026 13:36:17 +0000 (UTC) Received: from berrange.csb (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id DE35730002CB; Wed, 28 Oct 2026 13:36:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1793194581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qyLpDq+YtXe6OKzObj8Z7614kTOeXQz1tS4DljoDEaU=; b=QbZZXSaSZs3SEmRuTBIjJA9Ccctjeta0YZ0fDAMAOw/V4ELjw4y+TqM4AAoUE0NtY8thQk cubk8cIax/kLkUu9fEBRoyX/Ml77eOWMQpYXaat2fSwVt9yAk23H+w1+XiYJww47xUxrBk ByVhTUuieed4KqX+PGF47DfUysL0XRs= X-MC-Unique: UU4ckOlAMqeCRrqPU_HEqQ-1 X-Mimecast-MFC-AGG-ID: UU4ckOlAMqeCRrqPU_HEqQ_1793194578 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: Markus Armbruster , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 8/8] qapi: print a message before aborting for -compat violations Date: Wed, 28 Oct 2026 13:36:03 +0000 Message-ID: <20261028133603.1893289-9-berrange@redhat.com> In-Reply-To: <20261028133603.1893289-1-berrange@redhat.com> References: <20261028133603.1893289-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) 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_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1793194661630158500 When using the 'crash' policy with -compat options, QEMU will abort() on a policy violation. All the user sees is a core dump though and while the stack trace will ultimately show what the violation was, it can be hard to reverse engineer the cause when variables are optimized out. If the crash is within a CI system, it can be even harder to determine what the cause was as a core dump may not be available. Printing a message when crashing is easier to diagnose when limited context is available. Signed-off-by: Daniel P. Berrang=C3=A9 --- qapi/qapi-util.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qapi/qapi-util.c b/qapi/qapi-util.c index c845cadbdf2..1141813747b 100644 --- a/qapi/qapi-util.c +++ b/qapi/qapi-util.c @@ -37,6 +37,9 @@ static bool compat_policy_input_ok1(CompatPolicyInput pol= icy, adjective, kind, name); return false; case COMPAT_POLICY_INPUT_CRASH: + error_report("%s %s %s disabled by policy, aborting", + adjective, kind, name); + /* fallthrough */ default: abort(); } --=20 2.56.0