From nobody Fri Apr 19 04:42:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1592559641; cv=none; d=zohomail.com; s=zohoarc; b=YbsHFuN7TUAkpRGzNZVrSfpAHXH54xgApphM0e8+/etfVFFNX1+0tvBYmA14bmKBSNhdIepfFVgjHxEmk9SoG0ngM9OiKQquafC0jnkPb8K8JAPOvYN5fYv611FpYYtySJnffVg2ec0/z/7XoWj2nL2PrPq7gAp1psWqxYOmNn4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592559641; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=3iuakFbtJdB5qAr8ZrBZKMvhGVB+U0YTiutOwgZeRRA=; b=Dk97L20VK4ZRdOZg7Nt61YPGb/j9fuclnzFtk9LeQBWUiInQldK2JKfmXhIIspsGJxS2ueRuwZyzCqd9PszLj8zhBnsPErfDsZgnlFbTzV7jieEMdqriTe7IoAUQ26f8ZN13ujGWqXsDCeh/jvw0H0g4WPWASQlsPzZA/ea3mg0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1592559641529565.0410688753262; Fri, 19 Jun 2020 02:40:41 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-67-XjKaoYe2NY-qvn7LRxqoQQ-1; Fri, 19 Jun 2020 05:40:15 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 21997EC1A1; Fri, 19 Jun 2020 09:40:10 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 74AEC71678; Fri, 19 Jun 2020 09:40:09 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 3CE071809547; Fri, 19 Jun 2020 09:40:05 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 05J9e4hj004795 for ; Fri, 19 Jun 2020 05:40:04 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0D8E871671; Fri, 19 Jun 2020 09:40:04 +0000 (UTC) Received: from catbus.gsslab.fab.redhat.com (mustard.gsslab.fab.redhat.com [10.33.8.112]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6EF5D71673; Fri, 19 Jun 2020 09:40:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592559640; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=3iuakFbtJdB5qAr8ZrBZKMvhGVB+U0YTiutOwgZeRRA=; b=PeGp1ASYlRQSxMpyO0qzqf5LpCQcMGX4p8RtQ/51sBqLPdilklvpmmyhvmIaTvO5QooP1v z7fN1knGUC4tMV9JZwbOxJ1JKDCqusaeYsT64jpdO2+2MYaIBx+vwXzsyiLvjs0AxCiBwS 3YjWMeKBDXjNJ5KuK4VbWX3F7aSQWAk= X-MC-Unique: XjKaoYe2NY-qvn7LRxqoQQ-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH 01/23] scripts: remove use of the term 'whitelist' from build helpers Date: Fri, 19 Jun 2020 10:32:38 +0100 Message-Id: <20200619093300.2211535-2-berrange@redhat.com> In-Reply-To: <20200619093300.2211535-1-berrange@redhat.com> References: <20200619093300.2211535-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) The term "permitted list" is a better choice for the filtering logic applied. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- scripts/check-aclrules.py | 8 ++++---- scripts/check-file-access.py | 16 ++++++++-------- scripts/mock-noinline.py | 1 - tests/Makefile.am | 4 ++-- ...s_whitelist.txt =3D> permitted_file_access.txt} | 6 +++--- 5 files changed, 17 insertions(+), 18 deletions(-) rename tests/{file_access_whitelist.txt =3D> permitted_file_access.txt} (8= 2%) diff --git a/scripts/check-aclrules.py b/scripts/check-aclrules.py index a1fa473174..2335e8cfdd 100755 --- a/scripts/check-aclrules.py +++ b/scripts/check-aclrules.py @@ -35,7 +35,7 @@ import re import sys =20 -whitelist =3D { +permitted =3D { "connectClose": True, "connectIsEncrypted": True, "connectIsSecure": True, @@ -58,7 +58,7 @@ whitelist =3D { # XXX this vzDomainMigrateConfirm3Params looks # bogus - determine why it doesn't have a valid # ACL check. -implwhitelist =3D { +implpermitted =3D { "vzDomainMigrateConfirm3Params": True, } =20 @@ -230,8 +230,8 @@ def process_file(filename): api not in ["no", "name"] and table !=3D "virStateDriver"): if (impl not in acls and - api not in whitelist and - impl not in implwhitelist): + api not in permitted and + impl not in implpermitted): print(("%s:%d Missing ACL check in " + "function '%s' for '%s'") % (filename, lineno, impl, api), diff --git a/scripts/check-file-access.py b/scripts/check-file-access.py index dd39de2d79..aa120cafac 100755 --- a/scripts/check-file-access.py +++ b/scripts/check-file-access.py @@ -25,16 +25,16 @@ import re import sys =20 if len(sys.argv) !=3D 3: - print("syntax: %s ACCESS-FILE ACCESS-WHITELIST") + print("syntax: %s ACCESS-FILE PERMITTED-ACCESS-FILE") sys.exit(1) =20 access_file =3D sys.argv[1] -whitelist_file =3D sys.argv[2] +permitted_file =3D sys.argv[2] =20 known_actions =3D ["open", "fopen", "access", "stat", "lstat", "connect"] =20 files =3D [] -whitelist =3D [] +permitted =3D [] =20 with open(access_file, "r") as fh: for line in fh: @@ -52,7 +52,7 @@ with open(access_file, "r") as fh: else: raise Exception("Malformed line %s" % line) =20 -with open(whitelist_file, "r") as fh: +with open(permitted_file, "r") as fh: for line in fh: line =3D line.rstrip("\n") =20 @@ -70,7 +70,7 @@ with open(whitelist_file, "r") as fh: "progname": m.group(4), "testname": m.group(6), } - whitelist.append(rec) + permitted.append(rec) else: m =3D re.search(r'''^(\S*)(:\s*(\S*)(\s*:\s*(.*))?)?$''', line) if m is not None: @@ -81,18 +81,18 @@ with open(whitelist_file, "r") as fh: "progname": m.group(3), "testname": m.group(5), } - whitelist.append(rec) + permitted.append(rec) else: raise Exception("Malformed line %s" % line) =20 =20 -# Now we should check if %traces is included in $whitelist. For +# Now we should check if %traces is included in $permitted. For # now checking just keys is sufficient err =3D False for file in files: match =3D False =20 - for rule in whitelist: + for rule in permitted: if not re.match("^" + rule["path"] + "$", file["path"]): continue =20 diff --git a/scripts/mock-noinline.py b/scripts/mock-noinline.py index 4fc60c0be3..a8b7680c11 100644 --- a/scripts/mock-noinline.py +++ b/scripts/mock-noinline.py @@ -23,7 +23,6 @@ noninlined =3D {} mocked =3D {} =20 # Functions in public header don't get the noinline annotation -# so whitelist them here noninlined["virEventAddTimeout"] =3D True # This one confuses the script as its defined in the mock file # but is actually just a local helper diff --git a/tests/Makefile.am b/tests/Makefile.am index 3505c40f42..65d1ceeefd 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -458,14 +458,14 @@ check-access: file-access-clean VIR_TEST_FILE_ACCESS=3D1 $(MAKE) $(AM_MAKEFLAGS) check $(RUNUTF8) $(PYTHON) $(top_srcdir)/scripts/check-file-access.py \ $(abs_builddir)/test_file_access.txt \ - $(abs_srcdir)/file_access_whitelist.txt | sort -u + $(abs_srcdir)/permitted_file_access.txt | sort -u =20 file-access-clean: > test_file_access.txt endif WITH_LINUX =20 EXTRA_DIST +=3D \ - file_access_whitelist.txt + permitted_file_access.txt =20 if WITH_TESTS noinst_PROGRAMS =3D $(test_programs) $(test_helpers) diff --git a/tests/file_access_whitelist.txt b/tests/permitted_file_access.= txt similarity index 82% rename from tests/file_access_whitelist.txt rename to tests/permitted_file_access.txt index 5ec7ee63bb..52292d56be 100644 --- a/tests/file_access_whitelist.txt +++ b/tests/permitted_file_access.txt @@ -1,6 +1,6 @@ -# This is a whitelist that allows accesses to files not in our -# build directory nor source directory. The records are in the -# following formats: +# This is a list of files not in our build directory nor source +# directory which are permitted to be accessed by tests. The +# records are in the following formats: # # $path: $progname: $testname # $path: $action: $progname: $testname --=20 2.24.1 From nobody Fri Apr 19 04:42:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1592559662; cv=none; d=zohomail.com; s=zohoarc; b=Bc5BNNj6Sxl3v2hmCCevzX5qTagdE+x4i5LvR7C7pE+mO72ON8k9GT6r3HvVDVQJmM12xu2nm1QBFIK9D9NfgN5dEYrxLlLWtsc5e/qM8K4z38jJaq6cyP+dYNfQGfJ3ZbuMDDRCp75AS5MtKBMj44UXDBF2yQ8xfuJP63KbOE0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592559662; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=qB4ZXNz4/vs04PgSnY0gz1jmugBJPrVPlTjAWXAP2Cs=; b=CQL4EGwVxt2VG/mTvGuVfgdT+oBxJJ15O/qCo1BjWPfhs64Bxe+4FGMuVn8lCHqKNbjxYSdhA7vfwZ4YdWvshxNuF8UZxYQMxi0WW1ImovB2TDi6b6DOBgRs7pn001y00MEVqHMNui2RGHN0JowEZ4Uhr2YKkYOQAY9/tGQuOSc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1592559662139750.946485000792; Fri, 19 Jun 2020 02:41:02 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-431-4QhE2bH2OzGzGiFe0gS7sg-1; Fri, 19 Jun 2020 05:40:15 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 47F0EEC1A2; Fri, 19 Jun 2020 09:40:10 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 79941709D7; Fri, 19 Jun 2020 09:40:09 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id BA5231809554; Fri, 19 Jun 2020 09:40:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 05J9e4L1004805 for ; Fri, 19 Jun 2020 05:40:04 -0400 Received: by smtp.corp.redhat.com (Postfix) id E7BA271662; Fri, 19 Jun 2020 09:40:04 +0000 (UTC) Received: from catbus.gsslab.fab.redhat.com (mustard.gsslab.fab.redhat.com [10.33.8.112]) by smtp.corp.redhat.com (Postfix) with ESMTP id 54B7971671; Fri, 19 Jun 2020 09:40:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592559660; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=qB4ZXNz4/vs04PgSnY0gz1jmugBJPrVPlTjAWXAP2Cs=; b=SDZGq5fiyq3WD5GaX0/cul6gSVrJHfgezb75kDr5cyK79X07nFrrLFk06wYtlByofu50vQ MKt61WCq67nK4KVTlp9ZD7F49PzIhtd9bibnAfx0+pqq6r9SG9k+mXY3NJFPH4KmQxIc86 E1yAcT42H1Yt9oYH2+InlmexlURxcXo= X-MC-Unique: 4QhE2bH2OzGzGiFe0gS7sg-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH 02/23] rpc: remove use of the term 'whitelist' from RPC code Date: Fri, 19 Jun 2020 10:32:39 +0100 Message-Id: <20200619093300.2211535-3-berrange@redhat.com> In-Reply-To: <20200619093300.2211535-1-berrange@redhat.com> References: <20200619093300.2211535-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) The term "access control list" better describes the concept involved. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- docs/internals/rpc.html.in | 9 ++++---- src/remote/libvirtd.conf.in | 6 +++--- src/remote/remote_daemon_dispatch.c | 4 ++-- src/rpc/virnetsaslcontext.c | 10 ++++----- src/rpc/virnetsaslcontext.h | 2 +- src/rpc/virnettlscontext.c | 32 ++++++++++++++--------------- src/rpc/virnettlscontext.h | 4 ++-- tests/virconfdata/libvirtd.conf | 6 +++--- tests/virconfdata/libvirtd.out | 6 +++--- 9 files changed, 40 insertions(+), 39 deletions(-) diff --git a/docs/internals/rpc.html.in b/docs/internals/rpc.html.in index 40d844f31c..129945bf1c 100644 --- a/docs/internals/rpc.html.in +++ b/docs/internals/rpc.html.in @@ -447,7 +447,8 @@ C <-- |32| 8 | 1 | 3 | 1 | 1 | 0 | .o.oOo | <--= S (reply)
virNetSASLContextPtr (virnetsaslcontext.h)
The virNetSASLContext APIs maintain SASL state for a network service (server or client). This is primarily used on the server - to provide a whitelist of allowed SASL usernames for clients. + to provide an access control list of SASL usernames permitted as + clients.
=20
virNetSASLSessionPtr (virnetsaslcontext.h)
@@ -460,7 +461,7 @@ C <-- |32| 8 | 1 | 3 | 1 | 1 | 0 | .o.oOo | <--= S (reply)
virNetTLSContextPtr (virnettlscontext.h)
The virNetTLSContext APIs maintain TLS state for a network service (server or client). This is primarily used on the server - to provide a whitelist of allowed x509 distinguished names, as + to provide an access control list of x509 distinguished names, as well as diffie-hellman keys. It can also do validation of x509 certificates prior to initiating a connection, in order to improve detection of configuration errors. @@ -760,8 +761,8 @@ C <-- |32| 8 | 1 | 3 | 1 | 1 | 0 | .o.oOo | <--= S (reply) next step is to decode the RPC header. The header is validated to ensure the request is sensible, ie the server should not receive a method reply from a client. If the client has not yet authenticated, - a security check is also applied to make sure the procedure is on the - whitelist of those allowed prior to auth. If the packet is a method + an access control list check is also performed to make sure the proc= edure + is one of those allowed prior to auth. If the packet is a method call, it will be placed on a global processing queue. The event loop thread is now done with the packet for the time being.

diff --git a/src/remote/libvirtd.conf.in b/src/remote/libvirtd.conf.in index 34741183cc..2607fbad86 100644 --- a/src/remote/libvirtd.conf.in +++ b/src/remote/libvirtd.conf.in @@ -253,11 +253,11 @@ # will be rejected. # # Default is to always verify. Uncommenting this will disable -# verification - make sure an IP whitelist is set +# verification. #tls_no_verify_certificate =3D 1 =20 =20 -# A whitelist of allowed x509 Distinguished Names +# An access control list of allowed x509 Distinguished Names # This list may contain wildcards such as # # "C=3DGB,ST=3DLondon,L=3DLondon,O=3DRed Hat,CN=3D*" @@ -282,7 +282,7 @@ =20 =20 @END@ -# A whitelist of allowed SASL usernames. The format for username +# An access control list of allowed SASL usernames. The format for username # depends on the SASL authentication mechanism. Kerberos usernames # look like username@REALM # diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon= _dispatch.c index 831e7d165c..67b86cff78 100644 --- a/src/remote/remote_daemon_dispatch.c +++ b/src/remote/remote_daemon_dispatch.c @@ -3861,7 +3861,7 @@ remoteDispatchAuthSaslStart(virNetServerPtr server, if (err =3D=3D VIR_NET_SASL_CONTINUE) { ret->complete =3D 0; } else { - /* Check username whitelist ACL */ + /* Check username ACL */ if ((err =3D remoteSASLFinish(server, client)) < 0) { if (err =3D=3D -2) goto authdeny; @@ -3957,7 +3957,7 @@ remoteDispatchAuthSaslStep(virNetServerPtr server, if (err =3D=3D VIR_NET_SASL_CONTINUE) { ret->complete =3D 0; } else { - /* Check username whitelist ACL */ + /* Check username ACL */ if ((err =3D remoteSASLFinish(server, client)) < 0) { if (err =3D=3D -2) goto authdeny; diff --git a/src/rpc/virnetsaslcontext.c b/src/rpc/virnetsaslcontext.c index e7ed8f4390..9253771787 100644 --- a/src/rpc/virnetsaslcontext.c +++ b/src/rpc/virnetsaslcontext.c @@ -36,7 +36,7 @@ VIR_LOG_INIT("rpc.netsaslcontext"); struct _virNetSASLContext { virObjectLockable parent; =20 - const char *const*usernameWhitelist; + const char *const *usernameACL; }; =20 struct _virNetSASLSession { @@ -121,7 +121,7 @@ virNetSASLContextPtr virNetSASLContextNewClient(void) return ctxt; } =20 -virNetSASLContextPtr virNetSASLContextNewServer(const char *const*username= Whitelist) +virNetSASLContextPtr virNetSASLContextNewServer(const char *const *usernam= eACL) { virNetSASLContextPtr ctxt; =20 @@ -132,7 +132,7 @@ virNetSASLContextPtr virNetSASLContextNewServer(const c= har *const*usernameWhitel if (!(ctxt =3D virObjectLockableNew(virNetSASLContextClass))) return NULL; =20 - ctxt->usernameWhitelist =3D usernameWhitelist; + ctxt->usernameACL =3D usernameACL; =20 return ctxt; } @@ -146,7 +146,7 @@ int virNetSASLContextCheckIdentity(virNetSASLContextPtr= ctxt, virObjectLock(ctxt); =20 /* If the list is not set, allow any DN. */ - wildcards =3D ctxt->usernameWhitelist; + wildcards =3D ctxt->usernameACL; if (!wildcards) { ret =3D 1; /* No ACL, allow all */ goto cleanup; @@ -162,7 +162,7 @@ int virNetSASLContextCheckIdentity(virNetSASLContextPtr= ctxt, } =20 /* Denied */ - VIR_ERROR(_("SASL client identity '%s' not allowed in whitelist"), ide= ntity); + VIR_ERROR(_("SASL client identity '%s' not allowed by ACL"), identity); =20 /* This is the most common error: make it informative. */ virReportError(VIR_ERR_SYSTEM_ERROR, "%s", diff --git a/src/rpc/virnetsaslcontext.h b/src/rpc/virnetsaslcontext.h index 4d1845e643..618230f42d 100644 --- a/src/rpc/virnetsaslcontext.h +++ b/src/rpc/virnetsaslcontext.h @@ -38,7 +38,7 @@ enum { }; =20 virNetSASLContextPtr virNetSASLContextNewClient(void); -virNetSASLContextPtr virNetSASLContextNewServer(const char *const*username= Whitelist); +virNetSASLContextPtr virNetSASLContextNewServer(const char *const *usernam= eACL); =20 int virNetSASLContextCheckIdentity(virNetSASLContextPtr ctxt, const char *identity); diff --git a/src/rpc/virnettlscontext.c b/src/rpc/virnettlscontext.c index a8104cf484..168f3010ae 100644 --- a/src/rpc/virnettlscontext.c +++ b/src/rpc/virnettlscontext.c @@ -60,7 +60,7 @@ struct _virNetTLSContext { =20 bool isServer; bool requireValidCert; - const char *const*x509dnWhitelist; + const char *const *x509dnACL; char *priority; }; =20 @@ -356,8 +356,8 @@ static int virNetTLSContextCheckCertKeyPurpose(gnutls_x= 509_crt_t cert, =20 /* Check DN is on tls_allowed_dn_list. */ static int -virNetTLSContextCheckCertDNWhitelist(const char *dname, - const char *const*wildcards) +virNetTLSContextCheckCertDNACL(const char *dname, + const char *const *wildcards) { while (*wildcards) { if (g_pattern_match_simple(*wildcards, dname)) @@ -367,7 +367,7 @@ virNetTLSContextCheckCertDNWhitelist(const char *dname, } =20 /* Log the client's DN for debugging */ - VIR_DEBUG("Failed whitelist check for client DN '%s'", dname); + VIR_DEBUG("Failed ACL check for client DN '%s'", dname); =20 /* This is the most common error: make it informative. */ virReportError(VIR_ERR_SYSTEM_ERROR, "%s", @@ -385,10 +385,10 @@ virNetTLSContextCheckCertDN(gnutls_x509_crt_t cert, const char *certFile, const char *hostname, const char *dname, - const char *const* whitelist) + const char *const *acl) { - if (whitelist && dname && - virNetTLSContextCheckCertDNWhitelist(dname, whitelist) <=3D 0) + if (acl && dname && + virNetTLSContextCheckCertDNACL(dname, acl) <=3D 0) return -1; =20 if (hostname && @@ -675,7 +675,7 @@ static virNetTLSContextPtr virNetTLSContextNew(const ch= ar *cacert, const char *cacrl, const char *cert, const char *key, - const char *const*x509dnWhi= telist, + const char *const *x509dnAC= L, const char *priority, bool sanityCheckCert, bool requireValidCert, @@ -740,7 +740,7 @@ static virNetTLSContextPtr virNetTLSContextNew(const ch= ar *cacert, } =20 ctxt->requireValidCert =3D requireValidCert; - ctxt->x509dnWhitelist =3D x509dnWhitelist; + ctxt->x509dnACL =3D x509dnACL; ctxt->isServer =3D isServer; =20 PROBE(RPC_TLS_CONTEXT_NEW, @@ -855,7 +855,7 @@ static int virNetTLSContextLocateCredentials(const char= *pkipath, =20 static virNetTLSContextPtr virNetTLSContextNewPath(const char *pkipath, bool tryUserPkiPath, - const char *const*x509d= nWhitelist, + const char *const *x509= dnACL, const char *priority, bool sanityCheckCert, bool requireValidCert, @@ -869,7 +869,7 @@ static virNetTLSContextPtr virNetTLSContextNewPath(cons= t char *pkipath, return NULL; =20 ctxt =3D virNetTLSContextNew(cacert, cacrl, cert, key, - x509dnWhitelist, priority, sanityCheckCert, + x509dnACL, priority, sanityCheckCert, requireValidCert, isServer); =20 VIR_FREE(cacert); @@ -882,12 +882,12 @@ static virNetTLSContextPtr virNetTLSContextNewPath(co= nst char *pkipath, =20 virNetTLSContextPtr virNetTLSContextNewServerPath(const char *pkipath, bool tryUserPkiPath, - const char *const*x509dn= Whitelist, + const char *const *x509d= nACL, const char *priority, bool sanityCheckCert, bool requireValidCert) { - return virNetTLSContextNewPath(pkipath, tryUserPkiPath, x509dnWhitelis= t, priority, + return virNetTLSContextNewPath(pkipath, tryUserPkiPath, x509dnACL, pri= ority, sanityCheckCert, requireValidCert, true= ); } =20 @@ -906,12 +906,12 @@ virNetTLSContextPtr virNetTLSContextNewServer(const c= har *cacert, const char *cacrl, const char *cert, const char *key, - const char *const*x509dnWhit= elist, + const char *const *x509dnACL, const char *priority, bool sanityCheckCert, bool requireValidCert) { - return virNetTLSContextNew(cacert, cacrl, cert, key, x509dnWhitelist, = priority, + return virNetTLSContextNew(cacert, cacrl, cert, key, x509dnACL, priori= ty, sanityCheckCert, requireValidCert, true); } =20 @@ -1063,7 +1063,7 @@ static int virNetTLSContextValidCertificate(virNetTLS= ContextPtr ctxt, VIR_DEBUG("Peer DN is %s", dname); =20 if (virNetTLSContextCheckCertDN(cert, "[session]", sess->hostn= ame, dname, - ctxt->x509dnWhitelist) < 0) { + ctxt->x509dnACL) < 0) { gnutls_x509_crt_deinit(cert); goto authdeny; } diff --git a/src/rpc/virnettlscontext.h b/src/rpc/virnettlscontext.h index fe885aed9a..8ac84027b2 100644 --- a/src/rpc/virnettlscontext.h +++ b/src/rpc/virnettlscontext.h @@ -34,7 +34,7 @@ void virNetTLSInit(void); =20 virNetTLSContextPtr virNetTLSContextNewServerPath(const char *pkipath, bool tryUserPkiPath, - const char *const*x509dn= Whitelist, + const char *const *x509d= nACL, const char *priority, bool sanityCheckCert, bool requireValidCert); @@ -49,7 +49,7 @@ virNetTLSContextPtr virNetTLSContextNewServer(const char = *cacert, const char *cacrl, const char *cert, const char *key, - const char *const*x509dnWhit= elist, + const char *const *x509dnACL, const char *priority, bool sanityCheckCert, bool requireValidCert); diff --git a/tests/virconfdata/libvirtd.conf b/tests/virconfdata/libvirtd.c= onf index 791d6c972b..6d1fd33dcd 100644 --- a/tests/virconfdata/libvirtd.conf +++ b/tests/virconfdata/libvirtd.conf @@ -174,11 +174,11 @@ crl_file =3D "/etc/pki/CA/crl.pem" # will be rejected. # # Default is to always verify. Uncommenting this will disable -# verification - make sure an IP whitelist is set +# verification. tls_no_verify_certificate =3D 1 =20 =20 -# A whitelist of allowed x509 Distinguished Names +# An access control list of allowed x509 Distinguished Names # This list may contain wildcards such as # # "C=3DGB,ST=3DLondon,L=3DLondon,O=3DRed Hat,CN=3D*" @@ -194,7 +194,7 @@ tls_no_verify_certificate =3D 1 tls_allowed_dn_list =3D ["DN1", "DN2"] =20 =20 -# A whitelist of allowed SASL usernames. The format for usernames +# An access control list of allowed SASL usernames. The format for usernam= es # depends on the SASL authentication mechanism. Kerberos usernames # look like username@REALM # diff --git a/tests/virconfdata/libvirtd.out b/tests/virconfdata/libvirtd.out index cfdd23fd21..ce50480b8c 100644 --- a/tests/virconfdata/libvirtd.out +++ b/tests/virconfdata/libvirtd.out @@ -140,9 +140,9 @@ crl_file =3D "/etc/pki/CA/crl.pem" # will be rejected. # # Default is to always verify. Uncommenting this will disable -# verification - make sure an IP whitelist is set +# verification. tls_no_verify_certificate =3D 1 -# A whitelist of allowed x509 Distinguished Names +# An access control list of allowed x509 Distinguished Names # This list may contain wildcards such as # # "C=3DGB,ST=3DLondon,L=3DLondon,O=3DRed Hat,CN=3D*" @@ -156,7 +156,7 @@ tls_no_verify_certificate =3D 1 # # By default, no DN's are checked tls_allowed_dn_list =3D [ "DN1", "DN2" ] -# A whitelist of allowed SASL usernames. The format for usernames +# An access control list of allowed SASL usernames. The format for usernam= es # depends on the SASL authentication mechanism. Kerberos usernames # look like username@REALM # --=20 2.24.1 From nobody Fri Apr 19 04:42:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1592559661; cv=none; d=zohomail.com; s=zohoarc; b=PEiiufV0mt+B0JWbpmIpQHZtys9RaWhfQK1ILpGu2dyslMU3KM69oo/Pj6ZWXHIKBjdRCe+ym/aJuTdjY4/3cJoCZcZIq1nCNzUrLprrASf3np86y3IZSvoBcF/ZZtrT68wGmeiRhigmuBFnq91QRB1N7N8OJFaxUVvwRz0r5ig= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592559661; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=lKWEQh+cLOi0AROmW07QnegLqSDLgmCPbpkAu3HrFW8=; b=CkPOngQwoQ/hYRGowswNgLH/B+CC+m2KOqhAT4bGXKhNw91fA5KfBww1Yrn5w1fDF2D28Cmj0oKeNn09900QPOEDJCIkXYlSxiBXPX92WB7FZ+xG9ckGpgt+lXlR74fFB4dM/J1nATpLrsU0ci2/uYY3BO14IwjDJ8ehp25bf6w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1592559661590676.0956782357875; Fri, 19 Jun 2020 02:41:01 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-371-0un4zVrmPWWckyX5Vl599A-1; Fri, 19 Jun 2020 05:40:28 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 595F9872FEA; Fri, 19 Jun 2020 09:40:23 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 372FB19C4F; Fri, 19 Jun 2020 09:40:23 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 0A7C4833CB; Fri, 19 Jun 2020 09:40:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 05J9e5iH004813 for ; Fri, 19 Jun 2020 05:40:05 -0400 Received: by smtp.corp.redhat.com (Postfix) id CC4F771663; Fri, 19 Jun 2020 09:40:05 +0000 (UTC) Received: from catbus.gsslab.fab.redhat.com (mustard.gsslab.fab.redhat.com [10.33.8.112]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3A31A71662; Fri, 19 Jun 2020 09:40:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592559660; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=lKWEQh+cLOi0AROmW07QnegLqSDLgmCPbpkAu3HrFW8=; b=Tm2nm9jz/U5JfUFVAbPHRbwPvCC3+qiWjqNHeM8Uckao3P70YpifA4fS7JNnAall4zqN4P U3KgzQTm/6ix0NgXw8anvmhaWs+ly8Zc3aDA6gJcQzKJaxjqLZKKUamMOuS98dW4ppMOzA 5BvxSY587DxdxlPGLR0EMzk/jhr2uWQ= X-MC-Unique: 0un4zVrmPWWckyX5Vl599A-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH 03/23] cgroup: remove use of the term 'whitelist' from cgroup code Date: Fri, 19 Jun 2020 10:32:40 +0100 Message-Id: <20200619093300.2211535-4-berrange@redhat.com> In-Reply-To: <20200619093300.2211535-1-berrange@redhat.com> References: <20200619093300.2211535-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) The term "access control list" better describes the concept involved. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- docs/drvqemu.html.in | 12 ++++++------ docs/kbase/qemu-passthrough-security.rst | 3 ++- src/lxc/lxc_cgroup.c | 2 +- src/qemu/qemu.conf | 2 +- src/qemu/qemu_cgroup.c | 2 +- src/util/vircgroup.c | 2 +- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/docs/drvqemu.html.in b/docs/drvqemu.html.in index b6d731bb59..31d3fee213 100644 --- a/docs/drvqemu.html.in +++ b/docs/drvqemu.html.in @@ -468,12 +468,12 @@ chmod o+x /path/to/directory for resource management. It is implemented via a number of "controll= ers", each controller covering a specific task/functional area. One of the available controllers is the "devices" controller, which is able to - setup whitelists of block/character devices that a cgroup should be - allowed to access. If the "devices" controller is mounted on a host, - then libvirt will automatically create a dedicated cgroup for each - QEMU virtual machine and setup the device whitelist so that the QEMU - process can only access shared devices, and explicitly disks images - backed by block devices. + setup access control lists of block/character devices that a cgroup + should be allowed to access. If the "devices" controller is mounted = on a + host, then libvirt will automatically create a dedicated cgroup for = each + QEMU virtual machine and setup the device access control list so tha= t the + QEMU process can only access shared devices, and explicitly assigned= disks + images backed by block devices.

=20

diff --git a/docs/kbase/qemu-passthrough-security.rst b/docs/kbase/qemu-pas= sthrough-security.rst index 5f761cbfcb..4381d9f3a6 100644 --- a/docs/kbase/qemu-passthrough-security.rst +++ b/docs/kbase/qemu-passthrough-security.rst @@ -110,7 +110,8 @@ Granting access per VM policy on a per VM basis. =20 * Cgroups - a custom cgroup is created per VM and this will either use the - ``devices`` controller or an ``BPF`` rule to whitelist a set of device n= odes. + ``devices`` controller or an ``BPF`` rule to define an access control li= st + for the set of device nodes. There is no way to change this policy on a per VM basis. =20 Disabling security protection per VM diff --git a/src/lxc/lxc_cgroup.c b/src/lxc/lxc_cgroup.c index e71f37d2b1..d13f2adde5 100644 --- a/src/lxc/lxc_cgroup.c +++ b/src/lxc/lxc_cgroup.c @@ -374,7 +374,7 @@ static int virLXCCgroupSetupDeviceACL(virDomainDefPtr d= ef, return -1; } =20 - VIR_DEBUG("Device whitelist complete"); + VIR_DEBUG("Device ACL setup complete"); =20 return 0; } diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf index 404961c53e..f89dbd2c3a 100644 --- a/src/qemu/qemu.conf +++ b/src/qemu/qemu.conf @@ -464,7 +464,7 @@ # What cgroup controllers to make use of with QEMU guests # # - 'cpu' - use for scheduler tunables -# - 'devices' - use for device whitelisting +# - 'devices' - use for device access control # - 'memory' - use for memory tunables # - 'blkio' - use for block devices I/O tunables # - 'cpuset' - use for CPUs and memory nodes diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index d92202f847..57c5b6e69b 100644 --- a/src/qemu/qemu_cgroup.c +++ b/src/qemu/qemu_cgroup.c @@ -745,7 +745,7 @@ qemuSetupDevicesCgroup(virDomainObjPtr vm) if (rv < 0) { if (virLastErrorIsSystemErrno(EPERM)) { virResetLastError(); - VIR_WARN("Group devices ACL is not accessible, disabling white= listing"); + VIR_WARN("Group devices ACL is not accessible, disabling filte= ring"); return 0; } =20 diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index bb535df4f2..e20cc71c78 100644 --- a/src/util/vircgroup.c +++ b/src/util/vircgroup.c @@ -773,7 +773,7 @@ virCgroupSetPartitionSuffix(const char *path, char **re= s) return ret; =20 for (i =3D 0; tokens[i] !=3D NULL; i++) { - /* Whitelist the 3 top level fixed dirs + /* Special case the 3 top level fixed dirs * NB i =3D=3D 0 is "", since we have leading '/' */ if (i =3D=3D 1 && --=20 2.24.1 From nobody Fri Apr 19 04:42:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1592559663; cv=none; d=zohomail.com; s=zohoarc; b=b59vQwEXFz9nSubPfuuBa81ywYMu8lkkFtQndllKjgkShCCYEh+EaMIcVMBiElVDda9I1Dtt7oeKOgiZTQ7IXLVwUzeAIJDFDLAc7Z4I/keuVmQy7EKJdlVIFPzQ/U+a3GlZnsZZStSmj36lc5NmTb8AiuphMqXYpwKcjlGMaNg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592559663; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=r5NB1mhx1yuUCo1vrQeNt/z5vPGjdkJBb4iwz9u5Ctw=; b=eS0qcKNy2381KeSoiz7sd2asz47khwYWxJIE8DkA+K8FK4uMwMNMn8BEIMtRk2TnX2S+m08srhTOYLqTlSDcHJffsgmel0VHa9yUlJpz0VP0+Pc8n6kTJhWNT/dj+dHO1WbWB+ZkNUhT6K5neNzPEtrgpGxx+rXfoc9rPd7lYcw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1592559663828608.1109679685013; Fri, 19 Jun 2020 02:41:03 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-425-WMvcy_N3NTSFQxkeWr9sWA-1; Fri, 19 Jun 2020 05:40:31 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 89206106B242; Fri, 19 Jun 2020 09:40:25 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6A83E5BAC7; Fri, 19 Jun 2020 09:40:25 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 3D177833C3; Fri, 19 Jun 2020 09:40:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 05J9e6Yp004822 for ; Fri, 19 Jun 2020 05:40:06 -0400 Received: by smtp.corp.redhat.com (Postfix) id B0D617166A; Fri, 19 Jun 2020 09:40:06 +0000 (UTC) Received: from catbus.gsslab.fab.redhat.com (mustard.gsslab.fab.redhat.com [10.33.8.112]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1EB5871662; Fri, 19 Jun 2020 09:40:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592559662; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=r5NB1mhx1yuUCo1vrQeNt/z5vPGjdkJBb4iwz9u5Ctw=; b=ftXIvwcW6QmnLc8YdTTgNQ4PeyirnMwe94QqMZEKjKcF8hPaCcmfKW3kESJuRa8e1SWkLD Lri+ri5TJtKOuqxnh14wvtjD3J1+4UFfch9nDoBqsUM0W+3Q8Ex8hwDOpIOiKYg3bP8GpM aUgSNSO7DZUbj2l8Bu8IvEaabcLDERA= X-MC-Unique: WMvcy_N3NTSFQxkeWr9sWA-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH 04/23] qemu: remove use of the terms 'whitelist' and 'blacklist' from CPU code Date: Fri, 19 Jun 2020 10:32:41 +0100 Message-Id: <20200619093300.2211535-5-berrange@redhat.com> In-Reply-To: <20200619093300.2211535-1-berrange@redhat.com> References: <20200619093300.2211535-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) When listing CPU models, we need to filter the data based on sets of permitted and forbidden CPU models. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 18 +++++++++--------- src/qemu/qemu_capabilities.h | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 484fff99e5..68fcbd3c4f 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -2256,8 +2256,8 @@ virQEMUCapsAddCPUDefinitions(virQEMUCapsPtr qemuCaps, =20 static virDomainCapsCPUModelsPtr virQEMUCapsCPUDefsToModels(qemuMonitorCPUDefsPtr defs, - const char **modelWhitelist, - const char **modelBlacklist) + const char **modelAllowed, + const char **modelForbidden) { g_autoptr(virDomainCapsCPUModels) cpuModels =3D NULL; size_t i; @@ -2268,10 +2268,10 @@ virQEMUCapsCPUDefsToModels(qemuMonitorCPUDefsPtr de= fs, for (i =3D 0; i < defs->ncpus; i++) { qemuMonitorCPUDefInfoPtr cpu =3D defs->cpus + i; =20 - if (modelWhitelist && !virStringListHasString(modelWhitelist, cpu-= >name)) + if (modelAllowed && !virStringListHasString(modelAllowed, cpu->nam= e)) continue; =20 - if (modelBlacklist && virStringListHasString(modelBlacklist, cpu->= name)) + if (modelForbidden && virStringListHasString(modelForbidden, cpu->= name)) continue; =20 if (virDomainCapsCPUModelsAdd(cpuModels, cpu->name, cpu->usable, @@ -2286,15 +2286,15 @@ virQEMUCapsCPUDefsToModels(qemuMonitorCPUDefsPtr de= fs, virDomainCapsCPUModelsPtr virQEMUCapsGetCPUModels(virQEMUCapsPtr qemuCaps, virDomainVirtType type, - const char **modelWhitelist, - const char **modelBlacklist) + const char **modelAllowed, + const char **modelForbidden) { qemuMonitorCPUDefsPtr defs; =20 if (!(defs =3D virQEMUCapsGetAccel(qemuCaps, type)->cpuModels)) return NULL; =20 - return virQEMUCapsCPUDefsToModels(defs, modelWhitelist, modelBlacklist= ); + return virQEMUCapsCPUDefsToModels(defs, modelAllowed, modelForbidden); } =20 =20 @@ -5976,14 +5976,14 @@ virQEMUCapsFillDomainCPUCaps(virQEMUCapsPtr qemuCap= s, if (virQEMUCapsIsCPUModeSupported(qemuCaps, hostarch, domCaps->virttyp= e, VIR_CPU_MODE_CUSTOM, domCaps->machine)) { - const char *blacklist[] =3D { "host", NULL }; + const char *forbidden[] =3D { "host", NULL }; VIR_AUTOSTRINGLIST models =3D NULL; =20 if (virCPUGetModels(domCaps->arch, &models) >=3D 0) { domCaps->cpu.custom =3D virQEMUCapsGetCPUModels(qemuCaps, domCaps->virttyp= e, (const char **)m= odels, - blacklist); + forbidden); } else { domCaps->cpu.custom =3D NULL; } diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 92d42ed80b..ad93816d41 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -629,8 +629,8 @@ int virQEMUCapsAddCPUDefinitions(virQEMUCapsPtr qemuCap= s, virDomainCapsCPUUsable usable); virDomainCapsCPUModelsPtr virQEMUCapsGetCPUModels(virQEMUCapsPtr qemuCaps, virDomainVirtType type, - const char **modelWhitel= ist, - const char **modelBlackl= ist); + const char **modelAllowe= d, + const char **modelForbid= den); int virQEMUCapsFetchCPUModels(qemuMonitorPtr mon, virArch arch, virDomainCapsCPUModelsPtr *cpuModels); --=20 2.24.1 From nobody Fri Apr 19 04:42:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1592559682; cv=none; d=zohomail.com; s=zohoarc; b=OHXXH2JUae7yfHF/qvg5HwSR4/0Fs18MPgBKpcA66JL2yXmQIgUy66mRIWL0Nq+N0SLk+GHj9wqg2GDaYw/4vg7Y6imsqqSEUsPUGHRomsvn6iZWI8N5G+qcxuaa191TidmxGJkDRhVocil6Q6DH9Ko7+8f8QC26o4sJiYkwNvw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592559682; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=OJGFAB5/T/3AMs+FDpFXzudYIgSMLJWG9UbGuiw6ft4=; b=McemewAszba38RXk22cjuDuPdw4Nfcc3koPBMX4V9GaCC90MqwO+7Rf1mLZWFDGCg81yeF3EFRfR1V/WOlZNf0bfVT2xRHOWBc26hd41uwIPMO9vIqRc2uju68JeJYHyFnIkHz8n1j8qUiVDM28KEB0RKaiaKUcXMLlKjTGZ/sI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1592559682637811.3700330854342; Fri, 19 Jun 2020 02:41:22 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-391-4yZAm_WzNwKgBaOCqbOsMA-1; Fri, 19 Jun 2020 05:40:29 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 65342872FEB; Fri, 19 Jun 2020 09:40:23 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 40DEB10013C4; Fri, 19 Jun 2020 09:40:23 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 119B3833D1; Fri, 19 Jun 2020 09:40:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 05J9e7Yj004829 for ; Fri, 19 Jun 2020 05:40:07 -0400 Received: by smtp.corp.redhat.com (Postfix) id B89C371662; Fri, 19 Jun 2020 09:40:07 +0000 (UTC) Received: from catbus.gsslab.fab.redhat.com (mustard.gsslab.fab.redhat.com [10.33.8.112]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0422F71663; Fri, 19 Jun 2020 09:40:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592559681; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=OJGFAB5/T/3AMs+FDpFXzudYIgSMLJWG9UbGuiw6ft4=; b=BTm6DGsKcbfJW5x8xfS7SpptFekij3FThfFwsuMh6DEerMxSHMQ1X7G5/a87x3xa10lyZ4 w+u1sACCxEQAN1uEoZ+m06uHWQArrDAO8YeLnYR3ZVq1zCJyY3vmTzozwWakpKFQiP8Whv RIswo1UQO6DwJK1tADXKt3UZpn6rsD8= X-MC-Unique: 4yZAm_WzNwKgBaOCqbOsMA-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH 05/23] qemu: remove use of the term 'blacklist' in seccomp capability Date: Fri, 19 Jun 2020 10:32:42 +0100 Message-Id: <20200619093300.2211535-6-berrange@redhat.com> In-Reply-To: <20200619093300.2211535-1-berrange@redhat.com> References: <20200619093300.2211535-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) The concept we're really testing for is whether QEMU supports the seccomp syscall filter groups. We need to keep one place using the old term to deal with upgrades from existing hosts with running VMs. Signed-off-by: Daniel P. Berrang=C3=A9 --- src/qemu/qemu.conf | 2 +- src/qemu/qemu_capabilities.c | 4 ++-- src/qemu/qemu_capabilities.h | 2 +- src/qemu/qemu_command.c | 4 ++-- src/qemu/qemu_domain.c | 10 +++++++--- tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 2 +- tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml | 2 +- tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml | 2 +- tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml | 2 +- tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml | 2 +- tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml | 2 +- tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 2 +- tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml | 2 +- tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml | 2 +- tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml | 2 +- tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml | 2 +- tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml | 2 +- tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml | 2 +- tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml | 2 +- tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml | 2 +- tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml | 2 +- tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml | 2 +- tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml | 2 +- tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml | 2 +- tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml | 2 +- tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 2 +- tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 2 +- tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml | 2 +- tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml | 2 +- tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 2 +- tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 2 +- tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 2 +- tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml | 2 +- tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml | 2 +- tests/qemustatusxml2xmldata/backup-pull-in.xml | 2 +- tests/qemustatusxml2xmldata/blockjob-blockdev-in.xml | 2 +- tests/qemuxml2argvtest.c | 2 +- 37 files changed, 45 insertions(+), 41 deletions(-) diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf index f89dbd2c3a..99b9ce53e5 100644 --- a/src/qemu/qemu.conf +++ b/src/qemu/qemu.conf @@ -704,7 +704,7 @@ # If it is unset (or -1), then seccomp will be enabled # only if QEMU >=3D 2.11.0 is detected, otherwise it is # left disabled. This ensures the default config gets -# protection for new QEMU using the blacklist approach. +# protection for new QEMU with filter groups. # #seccomp_sandbox =3D 1 =20 diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 68fcbd3c4f..310be800e2 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -468,7 +468,7 @@ VIR_ENUM_IMPL(virQEMUCaps, /* 285 */ "qcow2-luks", "pcie-pci-bridge", - "seccomp-blacklist", + "seccomp-filter-groups", "query-cpus-fast", "disk-write-cache", =20 @@ -3292,7 +3292,7 @@ static struct virQEMUCapsCommandLineProps virQEMUCaps= CommandLine[] =3D { { "vnc", "vnc", QEMU_CAPS_VNC_MULTI_SERVERS }, { "chardev", "reconnect", QEMU_CAPS_CHARDEV_RECONNECT }, { "sandbox", "enable", QEMU_CAPS_SECCOMP_SANDBOX }, - { "sandbox", "elevateprivileges", QEMU_CAPS_SECCOMP_BLACKLIST }, + { "sandbox", "elevateprivileges", QEMU_CAPS_SECCOMP_FILTER_GROUPS }, { "chardev", "fd", QEMU_CAPS_CHARDEV_FD_PASS }, { "overcommit", NULL, QEMU_CAPS_OVERCOMMIT }, { "smp-opts", "dies", QEMU_CAPS_SMP_DIES }, diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index ad93816d41..0ee3e357cb 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -448,7 +448,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ /* 285 */ QEMU_CAPS_QCOW2_LUKS, /* qcow2 format support LUKS encryption */ QEMU_CAPS_DEVICE_PCIE_PCI_BRIDGE, /* -device pcie-pci-bridge */ - QEMU_CAPS_SECCOMP_BLACKLIST, /* -sandbox.elevateprivileges */ + QEMU_CAPS_SECCOMP_FILTER_GROUPS, /* -sandbox.elevateprivileges */ QEMU_CAPS_QUERY_CPUS_FAST, /* query-cpus-fast command */ QEMU_CAPS_DISK_WRITE_CACHE, /* qemu block frontends support write-cach= e param */ =20 diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index f27246b4c6..37113a433a 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -9517,8 +9517,8 @@ qemuBuildSeccompSandboxCommandLine(virCommandPtr cmd, return 0; } =20 - /* Use blacklist by default if supported */ - if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_SECCOMP_BLACKLIST)) { + /* Block undesirable syscall groups by default if supported */ + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_SECCOMP_FILTER_GROUPS)) { virCommandAddArgList(cmd, "-sandbox", "on,obsolete=3Ddeny,elevateprivileges=3Ddeny," "spawn=3Ddeny,resourcecontrol=3Ddeny", diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 72874ee4fd..56ec5c0352 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -3851,9 +3851,13 @@ qemuDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt, if (str) { int flag =3D virQEMUCapsTypeFromString(str); if (flag < 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("Unknown qemu capabilities flag %s"),= str); - goto error; + if (g_str_equal(str, "seccomp-blacklist")) { + flag =3D QEMU_CAPS_SECCOMP_FILTER_GROUPS; + } else { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Unknown qemu capabilities flag %= s"), str); + goto error; + } } virQEMUCapsSet(qemuCaps, flag); } diff --git a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml b/tests/qemuc= apabilitiesdata/caps_2.11.0.s390x.xml index 0391f4b81e..9822f50827 100644 --- a/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml @@ -99,7 +99,7 @@ - + diff --git a/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml b/tests/qemu= capabilitiesdata/caps_2.11.0.x86_64.xml index 9eaafb4ba6..3e5e3b4ad3 100644 --- a/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml @@ -173,7 +173,7 @@ - + diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml b/tests/qem= ucapabilitiesdata/caps_2.12.0.aarch64.xml index a5d6dc3bef..3c5f8235fe 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml @@ -134,7 +134,7 @@ - + diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml b/tests/qemuc= apabilitiesdata/caps_2.12.0.ppc64.xml index d1ed9f6e28..e5a02c382e 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml @@ -131,7 +131,7 @@ - + diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml b/tests/qemuc= apabilitiesdata/caps_2.12.0.s390x.xml index cef6ebb9ad..238b05240c 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml @@ -99,7 +99,7 @@ - + diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml b/tests/qemu= capabilitiesdata/caps_2.12.0.x86_64.xml index 6d48699e3e..6011f2f4a2 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml @@ -170,7 +170,7 @@ - + diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_3.0.0.ppc64.xml index e4a560bac5..a1643260ab 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml @@ -130,7 +130,7 @@ - + diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml b/tests/qemu= capabilitiesdata/caps_3.0.0.riscv32.xml index 71f9b0c37f..6d1e3d8cd5 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml @@ -75,7 +75,7 @@ - + diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml b/tests/qemu= capabilitiesdata/caps_3.0.0.riscv64.xml index 279078d541..a6994acac3 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml @@ -75,7 +75,7 @@ - + diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_3.0.0.s390x.xml index f1ed34c612..4d80f9c6ba 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml @@ -101,7 +101,7 @@ - + diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_3.0.0.x86_64.xml index ae1836b28f..e31cb7c345 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml @@ -172,7 +172,7 @@ - + diff --git a/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_3.1.0.ppc64.xml index 0dc0393c22..d01de900c9 100644 --- a/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml @@ -131,7 +131,7 @@ - + diff --git a/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_3.1.0.x86_64.xml index d4ff21fdac..177dedbfb5 100644 --- a/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_3.1.0.x86_64.xml @@ -172,7 +172,7 @@ - + diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_4.0.0.aarch64.xml index 404a39af03..7afec03c2f 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml @@ -135,7 +135,7 @@ - + diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_4.0.0.ppc64.xml index cb0232173c..81ed3b58de 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml @@ -138,7 +138,7 @@ - + diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml b/tests/qemu= capabilitiesdata/caps_4.0.0.riscv32.xml index 11475306f9..bfb38b6eae 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml @@ -139,7 +139,7 @@ - + diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml b/tests/qemu= capabilitiesdata/caps_4.0.0.riscv64.xml index 608590a35b..801a7c368e 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml @@ -139,7 +139,7 @@ - + diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_4.0.0.s390x.xml index f4d20169e0..0be526ce7f 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml @@ -101,7 +101,7 @@ - + diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_4.0.0.x86_64.xml index 0e66a4c847..930f508048 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml @@ -171,7 +171,7 @@ - + diff --git a/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_4.1.0.x86_64.xml index f2d3902e6c..e1481979e8 100644 --- a/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.1.0.x86_64.xml @@ -171,7 +171,7 @@ - + diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_4.2.0.aarch64.xml index 98cee36669..bc643545ac 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml @@ -137,7 +137,7 @@ - + diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_4.2.0.ppc64.xml index 70c826e0cf..ed3c865747 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml @@ -138,7 +138,7 @@ - + diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_4.2.0.s390x.xml index 0b174ffeec..335a06d897 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml @@ -101,7 +101,7 @@ - + diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_4.2.0.x86_64.xml index eaf71eb469..009536f0b4 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml @@ -172,7 +172,7 @@ - + diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_5.0.0.aarch64.xml index f2d691734f..b2f6e0ed30 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml @@ -139,7 +139,7 @@ - + diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_5.0.0.ppc64.xml index b3f673b0f6..c9cb2c0639 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml @@ -140,7 +140,7 @@ - + diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml b/tests/qemu= capabilitiesdata/caps_5.0.0.riscv64.xml index 3119f6deb7..75c2fbfd54 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml @@ -139,7 +139,7 @@ - + diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_5.0.0.x86_64.xml index 6d1c779272..a01395cf53 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml @@ -172,7 +172,7 @@ - + diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_5.1.0.x86_64.xml index 26a7985add..7c36716d88 100644 --- a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml @@ -172,7 +172,7 @@ - + diff --git a/tests/qemustatusxml2xmldata/backup-pull-in.xml b/tests/qemusta= tusxml2xmldata/backup-pull-in.xml index 1db978a3ac..76d723cf76 100644 --- a/tests/qemustatusxml2xmldata/backup-pull-in.xml +++ b/tests/qemustatusxml2xmldata/backup-pull-in.xml @@ -189,7 +189,7 @@ - + diff --git a/tests/qemustatusxml2xmldata/blockjob-blockdev-in.xml b/tests/q= emustatusxml2xmldata/blockjob-blockdev-in.xml index cc17a17ff4..a4d9d57666 100644 --- a/tests/qemustatusxml2xmldata/blockjob-blockdev-in.xml +++ b/tests/qemustatusxml2xmldata/blockjob-blockdev-in.xml @@ -189,7 +189,7 @@ - + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index d5b2a21b5a..0989abd042 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -921,7 +921,7 @@ mymain(void) =20 DO_TEST("minimal", NONE); DO_TEST("minimal-sandbox", - QEMU_CAPS_SECCOMP_BLACKLIST); + QEMU_CAPS_SECCOMP_FILTER_GROUPS); DO_TEST_PARSE_ERROR("minimal-no-memory", NONE); DO_TEST("minimal-msg-timestamp", QEMU_CAPS_MSG_TIMESTAMP); =20 --=20 2.24.1 From nobody Fri Apr 19 04:42:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1592559668; cv=none; d=zohomail.com; s=zohoarc; b=kkpa16YBBVEC4wNuYBOFhuodV0XydYJYQJF2P/WcJTDtZjj/ERbYohfyKmcCpRs/Z9XG1WBIYRLGYIKOqB9+eWqqqHmEuRLMHzIF6Gmw1QBtNmCdqYtw54jen/4k6rJVI3jdoZpg4XHVXFH1wKXVg6z0d+alMRXj5BaeM5yCEow= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592559668; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=+KSLFtbHBF/+kq0Q51qLbYaP/kJiwLg+YZoE0CcyjY8=; b=a5bp2Z/6FzEuPEdkHCuyw4oDhY+8ZiElnvql0/8oK/lwPPysdbKSiwdC6OjTPobVQwkr4FRNl4bW8KtbqZgiEHsmuXjqFMqhUi9dEhlEe4qm8K3kEU7RD/mFIajXU+pkgd9ueuAkxCTFFzz79BjEBIWaL5QZQNF/emE1LRVSqP8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 159255966846235.94105197918259; Fri, 19 Jun 2020 02:41:08 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-236-Vl21SJvhOBmkjssXK2ZSyQ-1; Fri, 19 Jun 2020 05:40:28 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 65ED9107ACF8; Fri, 19 Jun 2020 09:40:23 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 46A6F5C1D0; Fri, 19 Jun 2020 09:40:23 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 1606C833C8; Fri, 19 Jun 2020 09:40:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 05J9e86B004839 for ; Fri, 19 Jun 2020 05:40:08 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9C5B171662; Fri, 19 Jun 2020 09:40:08 +0000 (UTC) Received: from catbus.gsslab.fab.redhat.com (mustard.gsslab.fab.redhat.com [10.33.8.112]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0B47471671; Fri, 19 Jun 2020 09:40:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592559667; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=+KSLFtbHBF/+kq0Q51qLbYaP/kJiwLg+YZoE0CcyjY8=; b=giLTaPrU4Z92E/0XvQZtd61N/U4xyrGNyZtSp1RDlm1t4D6Lr8Kol+zfZ6AoxJgjHEbYTF InnF/CrjXe4uqTiYsOOjarsQVqjqWvYd23EuyZHQr8AKVaUpu4nYIrOSLPj39BuPhMxPYu 0CbayPG6SsYSOYlb5YTKb1T9IPsyt0M= X-MC-Unique: Vl21SJvhOBmkjssXK2ZSyQ-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH 06/23] util: use short form -g arg to scsi_id Date: Fri, 19 Jun 2020 10:32:43 +0100 Message-Id: <20200619093300.2211535-7-berrange@redhat.com> In-Reply-To: <20200619093300.2211535-1-berrange@redhat.com> References: <20200619093300.2211535-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) We can't change the term used by scsi_id for its CLI arg, but we can avoid it by picking the short form instead. Signed-off-by: Daniel P. Berrang=C3=A9 --- src/util/virstoragefile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index a6357abb08..b4337c2736 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -1365,7 +1365,7 @@ virStorageFileGetSCSIKey(const char *path, =20 cmd =3D virCommandNewArgList("/lib/udev/scsi_id", "--replace-whitespace", - "--whitelisted", + "-g", "--device", path, NULL ); @@ -1433,7 +1433,7 @@ virStorageFileGetNPIVKey(const char *path, =20 cmd =3D virCommandNewArgList("/lib/udev/scsi_id", "--replace-whitespace", - "--whitelisted", + "-g", "--export", "--device", path, NULL --=20 2.24.1 From nobody Fri Apr 19 04:42:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1592559732; cv=none; d=zohomail.com; s=zohoarc; b=gP7n3MC3jKRN+yOWGpBAMpqMnyi2e8DOTMHwFIOoUDQ4Sc7qJc7pVC9LZWhbAEbe7HZvZsnkkofkJB+9a3gW1knHfjjNJzgKDRsjvjshI3hCXu0EAFxgUruyxi+mYHagXzP9zPEr1epLWF6L1Vqh/2xP3Ut8EOSlLUy4wDpVOY0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592559732; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=MqnjRIM3/jQ+M1n/KX7MvoeprrWw7bYAHElVnd4w2Sw=; b=SWEnx+hQaxSB5DcaeSPOjMX9pKlxR51IEqk62GNuBBIaY4Vv+KtyVBx2Uct2GVUmInCG3u56IhcSyVzoOOVNqICuNCTuXBJ8fDwFkkiEV242fjhA+mHk43IcRfoso6+YHu+R26iWr+bpGiDkFeDwKPbIdVDMyH1ppncmGsO3jWA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1592559732369498.1391957080542; Fri, 19 Jun 2020 02:42:12 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-507-ACFZA5zZMmuNpvj5WeDh7A-1; Fri, 19 Jun 2020 05:40:30 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 97241872FF3; Fri, 19 Jun 2020 09:40:25 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 783735BADA; Fri, 19 Jun 2020 09:40:25 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 47D50180954D; Fri, 19 Jun 2020 09:40:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 05J9e9U3004854 for ; Fri, 19 Jun 2020 05:40:09 -0400 Received: by smtp.corp.redhat.com (Postfix) id 808067167A; Fri, 19 Jun 2020 09:40:09 +0000 (UTC) Received: from catbus.gsslab.fab.redhat.com (mustard.gsslab.fab.redhat.com [10.33.8.112]) by smtp.corp.redhat.com (Postfix) with ESMTP id E2DC871662; Fri, 19 Jun 2020 09:40:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592559731; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=MqnjRIM3/jQ+M1n/KX7MvoeprrWw7bYAHElVnd4w2Sw=; b=IhSC+F5TOoJYF/SvuWHDF9mKU2KTbBnDOC3qQbYC48QSdy85GzXw8Ho/7c4eIy3UH9Ut6b tNHFI+/OK7TE2Zb5b89SloDRYD1TcZC7y/dczpzFU0rqP349C/ftf3x0oBIX0o0ZuCevtr cgoNoDazCi19/OWAmLPEDqD9Wb67HZw= X-MC-Unique: ACFZA5zZMmuNpvj5WeDh7A-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH 07/23] docs: remove use of the term 'whitelist' from documentation Date: Fri, 19 Jun 2020 10:32:44 +0100 Message-Id: <20200619093300.2211535-8-berrange@redhat.com> In-Reply-To: <20200619093300.2211535-1-berrange@redhat.com> References: <20200619093300.2211535-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) The term is redundant in the context used. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- docs/firewall.html.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/firewall.html.in b/docs/firewall.html.in index e86ab0d974..bfb5a47b1c 100644 --- a/docs/firewall.html.in +++ b/docs/firewall.html.in @@ -311,7 +311,7 @@ f5c78134-9da4-0c60-a9f0-fb37bc21ac1f no-other-rarp-tra= ffic

To associate the clean-traffic filter with a guest, edit the guest XML config and change the <interface> elem= ent to include a <filterref> and also specify the - whitelisted <ip address/> the guest is allowed to + <ip address/> that the guest is allowed to use:

--=20
2.24.1

From nobody Fri Apr 19 04:42:48 2024
Delivered-To: importer@patchew.org
Received-SPF: pass (zohomail.com: domain of redhat.com designates
 205.139.110.61 as permitted sender) client-ip=205.139.110.61;
 envelope-from=libvir-list-bounces@redhat.com;
 helo=us-smtp-delivery-1.mimecast.com;
Authentication-Results: mx.zohomail.com;
	dkim=pass;
	spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as
 permitted sender)  smtp.mailfrom=libvir-list-bounces@redhat.com;
	dmarc=pass(p=none dis=none)  header.from=redhat.com
ARC-Seal: i=1; a=rsa-sha256; t=1592559703; cv=none;
	d=zohomail.com; s=zohoarc;
	b=GX/d+x090zWoF6uXc+8AZw8b339J6rUsBcZaC5c8Q2f2ZBgEYQSWZGBQVjXhE3o7kTocJRFH/+J2A80qaPkDs+Ia2WFGJ9Yoe6jLpZlElDzUz37ome9I5lCRm2BOUEIrOYM73nByh7ME++LefEFkOTH7QUMlN1M8OAMHxip809Y=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com;
 s=zohoarc;
	t=1592559703;
 h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To;
	bh=qlwlivi0NdYFd5C5gEaWsEHUZSr8Ou9Ww+IjmdDp8lY=;
	b=UuDUQ/Y+QxtbqW1vZWjs0LytLwZTsj7DL0L5pBojezQZqiOiwhHEZlaCKxZaNOdy1gLwibkwZibyCAvlbPjzIBzXQ7PKVIsnTyGeujVTwnzCM5i08R2AkdS3hrsuCDzQ2z27ydnF0/WTlmp5Q3t0V6p76gYmrFZ+cphPLgbObp0=
ARC-Authentication-Results: i=1; mx.zohomail.com;
	dkim=pass;
	spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as
 permitted sender)  smtp.mailfrom=libvir-list-bounces@redhat.com;
	dmarc=pass header.from= (p=none dis=none)
 header.from=
Return-Path: 
Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com
 [205.139.110.61]) by mx.zohomail.com
	with SMTPS id 159255970395336.04630496162474;
 Fri, 19 Jun 2020 02:41:43 -0700 (PDT)
Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com
 [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id
 us-mta-274-wHLR_IoFNQCW1e1bBkoCzg-1; Fri, 19 Jun 2020 05:40:33 -0400
Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com
 [10.5.11.16])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8BA2A106B244;
	Fri, 19 Jun 2020 09:40:26 +0000 (UTC)
Received: from colo-mx.corp.redhat.com
 (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20])
	by smtp.corp.redhat.com (Postfix) with ESMTPS id 6F72B5C221;
	Fri, 19 Jun 2020 09:40:26 +0000 (UTC)
Received: from lists01.pubmisc.prod.ext.phx2.redhat.com
 (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33])
	by colo-mx.corp.redhat.com (Postfix) with ESMTP id 3E3D9180043A;
	Fri, 19 Jun 2020 09:40:26 +0000 (UTC)
Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com
	[10.5.11.11])
	by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id 05J9eA7d004864 for ;
	Fri, 19 Jun 2020 05:40:10 -0400
Received: by smtp.corp.redhat.com (Postfix)
	id 6484F7166A; Fri, 19 Jun 2020 09:40:10 +0000 (UTC)
Received: from catbus.gsslab.fab.redhat.com (mustard.gsslab.fab.redhat.com
	[10.33.8.112])
	by smtp.corp.redhat.com (Postfix) with ESMTP id C6C7971662;
	Fri, 19 Jun 2020 09:40:09 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
	s=mimecast20190719; t=1592559702;
	h=from:from:sender:sender:reply-to:subject:subject:date:date:
	 message-id:message-id:to:to:cc:mime-version:mime-version:
	 content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references:list-id:list-help:
	 list-unsubscribe:list-subscribe:list-post;
	bh=qlwlivi0NdYFd5C5gEaWsEHUZSr8Ou9Ww+IjmdDp8lY=;
	b=SO8IL0cfvPZdLqe7ZGhJv73CrHvtSMcKwzoXUNzRAnq77mXoQ8aJqQ03EKZECVaFAd2IgX
	Oq4/siDJ5sLrQ5iq9ip4pzELvHp+9aV4la6cZktckJEGrSjzWWXVxmKzOJaOzTO0W+LIQt
	r8RYJHNlBpwuuYSqYT6rccyJL5+nrH4=
X-MC-Unique: wHLR_IoFNQCW1e1bBkoCzg-1
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= 
To: libvir-list@redhat.com
Subject: [libvirt PATCH 08/23] util: rename method to virKModIsProhibited
Date: Fri, 19 Jun 2020 10:32:45 +0100
Message-Id: <20200619093300.2211535-9-berrange@redhat.com>
In-Reply-To: <20200619093300.2211535-1-berrange@redhat.com>
References: <20200619093300.2211535-1-berrange@redhat.com>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11
X-loop: libvir-list@redhat.com
X-BeenThere: libvir-list@redhat.com
X-Mailman-Version: 2.1.12
Precedence: junk
List-Id: Development discussions about the libvirt library & tools
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
Sender: libvir-list-bounces@redhat.com
Errors-To: libvir-list-bounces@redhat.com
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-ZohoMail-DKIM: pass (identity @redhat.com)

This naming better matches the semantics usage of the test.

Signed-off-by: Daniel P. Berrang=C3=A9 
Reviewed-by: Peter Krempa 
---
 src/libvirt_private.syms |  2 +-
 src/util/virfile.c       |  2 +-
 src/util/virkmod.c       | 24 ++++++++++++------------
 src/util/virkmod.h       |  2 +-
 src/util/virpci.c        |  4 ++--
 5 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 42f8d7c222..c3ea3840d8 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -2403,7 +2403,7 @@ virKeycodeValueTranslate;
=20
 # util/virkmod.h
 virKModConfig;
-virKModIsBlacklisted;
+virKModIsProhibited;
 virKModLoad;
 virKModUnload;
=20
diff --git a/src/util/virfile.c b/src/util/virfile.c
index 20260a2e58..58dfd29304 100644
--- a/src/util/virfile.c
+++ b/src/util/virfile.c
@@ -897,7 +897,7 @@ virFileNBDDeviceFindUnused(void)
 static bool
 virFileNBDLoadDriver(void)
 {
-    if (virKModIsBlacklisted(NBD_DRIVER)) {
+    if (virKModIsProhibited(NBD_DRIVER)) {
         virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
                        _("Failed to load nbd module: "
                          "administratively prohibited"));
diff --git a/src/util/virkmod.c b/src/util/virkmod.c
index 12cb5920e8..9454581fa8 100644
--- a/src/util/virkmod.c
+++ b/src/util/virkmod.c
@@ -134,32 +134,32 @@ virKModUnload(const char *module)
=20
=20
 /**
- * virKModIsBlacklisted:
- * @module: Name of the module to check for on the blacklist
+ * virKModIsProhibited:
+ * @module: Name of the module to check
  *
- * Search the output of the configuration data for the module being
- * blacklisted.
+ * Determine if loading of @module is prohibited by admin
+ * configuration.
  *
- * returns true when found blacklisted, false otherwise.
+ * returns true when found prohibited, false otherwise.
  */
 bool
-virKModIsBlacklisted(const char *module)
+virKModIsProhibited(const char *module)
 {
     size_t i;
-    g_autofree char *drvblklst =3D NULL;
+    g_autofree char *drvmatch =3D NULL;
     g_autofree char *outbuf =3D NULL;
=20
-    drvblklst =3D g_strdup_printf("blacklist %s\n", module);
+    drvmatch =3D g_strdup_printf("blacklist %s\n", module);
=20
     /* modprobe will convert all '-' into '_', so we need to as well */
-    for (i =3D 0; i < drvblklst[i]; i++)
-        if (drvblklst[i] =3D=3D '-')
-            drvblklst[i] =3D '_';
+    for (i =3D 0; i < drvmatch[i]; i++)
+        if (drvmatch[i] =3D=3D '-')
+            drvmatch[i] =3D '_';
=20
     if (doModprobe("-c", NULL, &outbuf, NULL) < 0)
         return false;
=20
-    if (strstr(outbuf, drvblklst))
+    if (strstr(outbuf, drvmatch))
         return true;
=20
     return false;
diff --git a/src/util/virkmod.h b/src/util/virkmod.h
index f05cf83cf6..bd2fa1a1c7 100644
--- a/src/util/virkmod.h
+++ b/src/util/virkmod.h
@@ -28,5 +28,5 @@ char *virKModLoad(const char *, bool)
     ATTRIBUTE_NONNULL(1);
 char *virKModUnload(const char *)
     ATTRIBUTE_NONNULL(1);
-bool virKModIsBlacklisted(const char *)
+bool virKModIsProhibited(const char *)
     ATTRIBUTE_NONNULL(1);
diff --git a/src/util/virpci.c b/src/util/virpci.c
index 786b1393e6..e367d5d1e9 100644
--- a/src/util/virpci.c
+++ b/src/util/virpci.c
@@ -1023,10 +1023,10 @@ virPCIProbeStubDriver(virPCIStubDriver driver)
     }
=20
  cleanup:
-    /* If we know failure was because of blacklist, let's report that;
+    /* If we know failure was because of admin config, let's report that;
      * otherwise, report a more generic failure message
      */
-    if (virKModIsBlacklisted(drvname)) {
+    if (virKModIsProhibited(drvname)) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
                        _("Failed to load PCI stub module %s: "
                          "administratively prohibited"),
--=20
2.24.1

From nobody Fri Apr 19 04:42:48 2024
Delivered-To: importer@patchew.org
Received-SPF: pass (zohomail.com: domain of redhat.com designates
 207.211.31.120 as permitted sender) client-ip=207.211.31.120;
 envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com;
Authentication-Results: mx.zohomail.com;
	dkim=pass;
	spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as
 permitted sender)  smtp.mailfrom=libvir-list-bounces@redhat.com;
	dmarc=pass(p=none dis=none)  header.from=redhat.com
ARC-Seal: i=1; a=rsa-sha256; t=1592559740; cv=none;
	d=zohomail.com; s=zohoarc;
	b=WeuJxdlQ2Iy2LQb8JPtojhMxbf2KJOX6oNzFuYpOtOJGowolfYAWf4Asg6fsh7DZoQa2tXUX1P15h/2Rd1x1Hntz/k7PSYG9sqi83tgUJfj0GxthIpCEudi6ouvUYtrOBgTaCcRy3d5idnjXShy4oN7os/LZQnq51xm0i04H5kU=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com;
 s=zohoarc;
	t=1592559740;
 h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To;
	bh=7qkmtm0gIu1jZ5jFxHyKrJ/95QnbDX9njaxXJ0s6SwA=;
	b=h9EuhzI70cO/A2beiSWFomOFvufR+g0swvXzdQTEbUdBso+Og+/MRUpqZ7GkXGz8LdGDfxVCLeKvRAIb5TwjC7AkG8pSNrMcKKLWNGImGcxfU+Rx2V4ruaFno7bwLDXGTtzyl56/MTATDdqi1hpSCf0SE9ZQ0d2AvbISdG1aOG4=
ARC-Authentication-Results: i=1; mx.zohomail.com;
	dkim=pass;
	spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as
 permitted sender)  smtp.mailfrom=libvir-list-bounces@redhat.com;
	dmarc=pass header.from= (p=none dis=none)
 header.from=
Return-Path: 
Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com
 [207.211.31.120]) by mx.zohomail.com
	with SMTPS id 1592559740828361.6106927246458;
 Fri, 19 Jun 2020 02:42:20 -0700 (PDT)
Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com
 [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id
 us-mta-238-RDaGYEsgMMST4qX8ZJ8gFw-1; Fri, 19 Jun 2020 05:40:36 -0400
Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com
 [10.5.11.23])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D61B7107B789;
	Fri, 19 Jun 2020 09:40:28 +0000 (UTC)
Received: from colo-mx.corp.redhat.com
 (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21])
	by smtp.corp.redhat.com (Postfix) with ESMTPS id B26C619934;
	Fri, 19 Jun 2020 09:40:28 +0000 (UTC)
Received: from lists01.pubmisc.prod.ext.phx2.redhat.com
 (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33])
	by colo-mx.corp.redhat.com (Postfix) with ESMTP id 85618833D5;
	Fri, 19 Jun 2020 09:40:28 +0000 (UTC)
Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com
	[10.5.11.11])
	by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id 05J9eBNJ004871 for ;
	Fri, 19 Jun 2020 05:40:11 -0400
Received: by smtp.corp.redhat.com (Postfix)
	id 487D671663; Fri, 19 Jun 2020 09:40:11 +0000 (UTC)
Received: from catbus.gsslab.fab.redhat.com (mustard.gsslab.fab.redhat.com
	[10.33.8.112])
	by smtp.corp.redhat.com (Postfix) with ESMTP id AAE3B71662;
	Fri, 19 Jun 2020 09:40:10 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
	s=mimecast20190719; t=1592559739;
	h=from:from:sender:sender:reply-to:subject:subject:date:date:
	 message-id:message-id:to:to:cc:mime-version:mime-version:
	 content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references:list-id:list-help:
	 list-unsubscribe:list-subscribe:list-post;
	bh=7qkmtm0gIu1jZ5jFxHyKrJ/95QnbDX9njaxXJ0s6SwA=;
	b=On0NrZtjUxhf2KDWi5es/2w59Zz8oGltqoC197t5tImMvVovGLNqZd32CO7GFvBjycOx0I
	aqXXNEqSAGN2fhGCdfEo18SFP3hu9UjHthrlZ0Hyasc3SyURz1T3pfaZnmYd+tm2gXUT8S
	Sb7uHf+89LjC0PPO9z/4yFlt+1y4Zyk=
X-MC-Unique: RDaGYEsgMMST4qX8ZJ8gFw-1
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= 
To: libvir-list@redhat.com
Subject: [libvirt PATCH 09/23] nodedev: remove use of the term 'blacklist'
	from enumeration code
Date: Fri, 19 Jun 2020 10:32:46 +0100
Message-Id: <20200619093300.2211535-10-berrange@redhat.com>
In-Reply-To: <20200619093300.2211535-1-berrange@redhat.com>
References: <20200619093300.2211535-1-berrange@redhat.com>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11
X-loop: libvir-list@redhat.com
X-BeenThere: libvir-list@redhat.com
X-Mailman-Version: 2.1.12
Precedence: junk
List-Id: Development discussions about the libvirt library & tools
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
Sender: libvir-list-bounces@redhat.com
Errors-To: libvir-list-bounces@redhat.com
X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-ZohoMail-DKIM: pass (identity @redhat.com)

The term "ignored" is a better choice for the filtering performed
on devices from udev.

Signed-off-by: Daniel P. Berrang=C3=A9 
Reviewed-by: Peter Krempa 
---
 src/node_device/node_device_udev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_devi=
ce_udev.c
index bdf0b03add..cec99cb898 100644
--- a/src/node_device/node_device_udev.c
+++ b/src/node_device/node_device_udev.c
@@ -1397,7 +1397,7 @@ udevProcessDeviceListEntry(struct udev *udev,
  * Do not bother enumerating over subsystems that do not
  * contain interesting devices.
  */
-const char *subsystem_blacklist[] =3D {
+const char *subsystem_ignored[] =3D {
     "acpi", "tty", "vc", "i2c",
 };
=20
@@ -1406,8 +1406,8 @@ udevEnumerateAddMatches(struct udev_enumerate *udev_e=
numerate)
 {
     size_t i;
=20
-    for (i =3D 0; i < G_N_ELEMENTS(subsystem_blacklist); i++) {
-        const char *s =3D subsystem_blacklist[i];
+    for (i =3D 0; i < G_N_ELEMENTS(subsystem_ignored); i++) {
+        const char *s =3D subsystem_ignored[i];
         if (udev_enumerate_add_nomatch_subsystem(udev_enumerate, s) < 0) {
             virReportSystemError(errno, "%s", _("failed to add susbsystem =
filter"));
             return -1;
--=20
2.24.1

From nobody Fri Apr 19 04:42:48 2024
Delivered-To: importer@patchew.org
Received-SPF: pass (zohomail.com: domain of redhat.com designates
 205.139.110.61 as permitted sender) client-ip=205.139.110.61;
 envelope-from=libvir-list-bounces@redhat.com;
 helo=us-smtp-delivery-1.mimecast.com;
Authentication-Results: mx.zohomail.com;
	dkim=pass;
	spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as
 permitted sender)  smtp.mailfrom=libvir-list-bounces@redhat.com;
	dmarc=pass(p=none dis=none)  header.from=redhat.com
ARC-Seal: i=1; a=rsa-sha256; t=1592559641; cv=none;
	d=zohomail.com; s=zohoarc;
	b=RXdLOEhjcucyRxtxdMlie+B87u8qQy/j3enDfuw4A5O8i4MiKxnxF9aU+HAgK9+dmbJYeQ9ky4RYSeIOZkI29pFdJ7nkL8ePjpAQBXaU4ZH5MysoxSsyQ0wuYNco/hUflTQqZtu22+Xa1UWwxy6CvQc4KPiUuXQL60AfxD5O694=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com;
 s=zohoarc;
	t=1592559641;
 h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To;
	bh=sJDoCWcRCiLnmrFo4OQ/kaT6DDcti3Jy+5WA8K+cmDc=;
	b=cCRNzGmOe6VpFis20tBCMM+oNz3MGJht+zZwrUB6/kL+UFX24sIdqrUVOxzQV1wo+raROIAqbQSwL1PGt5+C0Dd1ADknl7Ih9wSft6bjYFG0VPtj5nfybSx/Z0OWhniyfsIkbs/0MUvRs4WFk2Mfkj8Q8yp90lFwH+vlbDfa4nw=
ARC-Authentication-Results: i=1; mx.zohomail.com;
	dkim=pass;
	spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as
 permitted sender)  smtp.mailfrom=libvir-list-bounces@redhat.com;
	dmarc=pass header.from= (p=none dis=none)
 header.from=
Return-Path: 
Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com
 [205.139.110.61]) by mx.zohomail.com
	with SMTPS id 1592559641177661.7414936122259;
 Fri, 19 Jun 2020 02:40:41 -0700 (PDT)
Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com
 [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id
 us-mta-432-ARn7GJYAOJSRC9lr-6pL1Q-1; Fri, 19 Jun 2020 05:40:37 -0400
Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com
 [10.5.11.14])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B6DAA107B791;
	Fri, 19 Jun 2020 09:40:31 +0000 (UTC)
Received: from colo-mx.corp.redhat.com
 (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20])
	by smtp.corp.redhat.com (Postfix) with ESMTPS id 966425D9F5;
	Fri, 19 Jun 2020 09:40:31 +0000 (UTC)
Received: from lists01.pubmisc.prod.ext.phx2.redhat.com
 (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33])
	by colo-mx.corp.redhat.com (Postfix) with ESMTP id 673E0180530D;
	Fri, 19 Jun 2020 09:40:31 +0000 (UTC)
Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com
	[10.5.11.11])
	by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id 05J9eCfJ004878 for ;
	Fri, 19 Jun 2020 05:40:12 -0400
Received: by smtp.corp.redhat.com (Postfix)
	id 2C7AF71663; Fri, 19 Jun 2020 09:40:12 +0000 (UTC)
Received: from catbus.gsslab.fab.redhat.com (mustard.gsslab.fab.redhat.com
	[10.33.8.112])
	by smtp.corp.redhat.com (Postfix) with ESMTP id 8ED5471662;
	Fri, 19 Jun 2020 09:40:11 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
	s=mimecast20190719; t=1592559640;
	h=from:from:sender:sender:reply-to:subject:subject:date:date:
	 message-id:message-id:to:to:cc:mime-version:mime-version:
	 content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references:list-id:list-help:
	 list-unsubscribe:list-subscribe:list-post;
	bh=sJDoCWcRCiLnmrFo4OQ/kaT6DDcti3Jy+5WA8K+cmDc=;
	b=fOarmNVzOVGWCfA8iFx37Pmpl+eFGkmVp7su0KmfLXthjR2/BYXwGAyQLkK91YGn6s60pR
	ybFN44C1BJdvZSUbs/hUIKQxgq3/iDfZuPc1ghhUEPUBqWI8jHqlN6DXSEstmeZVDxufeF
	oQfGTZa86XSZB+ZyivjzVXHoOxU8yP4=
X-MC-Unique: ARn7GJYAOJSRC9lr-6pL1Q-1
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= 
To: libvir-list@redhat.com
Subject: [libvirt PATCH 10/23] build: remove use of the term 'blacklist' from
	helper files
Date: Fri, 19 Jun 2020 10:32:47 +0100
Message-Id: <20200619093300.2211535-11-berrange@redhat.com>
In-Reply-To: <20200619093300.2211535-1-berrange@redhat.com>
References: <20200619093300.2211535-1-berrange@redhat.com>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11
X-loop: libvir-list@redhat.com
X-BeenThere: libvir-list@redhat.com
X-Mailman-Version: 2.1.12
Precedence: junk
List-Id: Development discussions about the libvirt library & tools
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
Sender: libvir-list-bounces@redhat.com
Errors-To: libvir-list-bounces@redhat.com
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-ZohoMail-DKIM: pass (identity @redhat.com)

The term is redundant or easily substituted with 'prohibit'.

Signed-off-by: Daniel P. Berrang=C3=A9 
---
 build-aux/syntax-check.mk   | 2 +-
 m4/virt-compile-warnings.m4 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk
index d47a92b530..2e49b5172e 100644
--- a/build-aux/syntax-check.mk
+++ b/build-aux/syntax-check.mk
@@ -1155,7 +1155,7 @@ sc_prohibit_class:
 # exists some filesystems will only ever return DT_UNKNOWN.
 # This field should only be used by code which is exclusively
 # run platforms supporting "d_type" and must expect DT_UNKNOWN.
-# We blacklist it to discourage accidental usage which has
+# We prohibit it to discourage accidental usage which has
 # happened many times. Add an exclude rule if it is genuinely
 # needed and the above restrictions are acceptable.
 sc_prohibit_dirent_d_type:
diff --git a/m4/virt-compile-warnings.m4 b/m4/virt-compile-warnings.m4
index d3538d59f8..4ebc25302c 100644
--- a/m4/virt-compile-warnings.m4
+++ b/m4/virt-compile-warnings.m4
@@ -123,7 +123,7 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
     # Get all possible GCC warnings
     gl_MANYWARN_ALL_GCC([maybewarn])
=20
-    # Remove the ones we don't want, blacklisted earlier
+    # Remove the ones we don't want
     gl_MANYWARN_COMPLEMENT([wantwarn], [$maybewarn], [$dontwarn])
=20
     # -Wunused-functin is implied by -Wall we must turn it
--=20
2.24.1

From nobody Fri Apr 19 04:42:48 2024
Delivered-To: importer@patchew.org
Received-SPF: pass (zohomail.com: domain of redhat.com designates
 205.139.110.120 as permitted sender) client-ip=205.139.110.120;
 envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com;
Authentication-Results: mx.zohomail.com;
	dkim=pass;
	spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as
 permitted sender)  smtp.mailfrom=libvir-list-bounces@redhat.com;
	dmarc=pass(p=none dis=none)  header.from=redhat.com
ARC-Seal: i=1; a=rsa-sha256; t=1592559850; cv=none;
	d=zohomail.com; s=zohoarc;
	b=eq9Nd/4XBBlPME7+XmajvhC49nizLwPGzTYi3lgAssvs0y0sC+s/zc4oMMKONVkQw5mkmyfhmUIPSdBSYDPResZlbCnoX6EItsiskSJNbC6MBmwPrG3NsQNi4kDMgFiMaX6PzjoiZhZEr4LY2+zs/3885gHl6YkhPTip02xpEfs=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com;
 s=zohoarc;
	t=1592559850;
 h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To;
	bh=dPNe3ndlYe7eGYvQ3zx4qtho4d58rxv7bL770s5+t+0=;
	b=Bbrc5WBZVOxebajZpFVvjYg8BTYuRXJMAcnfn7kmCNKOgIdFeOxCZwb1UGWNZUM7Aw41dm16gtviJQXKHt4uGu/pcgzDuKZToNL6Pr9k4V0/0+cmnADe/eYsOVFy0NJk6dpFmTbO7JhO4B+MQxEgRP6NU6zwbi6kzpHrk3gLj5A=
ARC-Authentication-Results: i=1; mx.zohomail.com;
	dkim=pass;
	spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as
 permitted sender)  smtp.mailfrom=libvir-list-bounces@redhat.com;
	dmarc=pass header.from= (p=none dis=none)
 header.from=
Return-Path: 
Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com
 [205.139.110.120]) by mx.zohomail.com
	with SMTPS id 1592559850148712.2215895758667;
 Fri, 19 Jun 2020 02:44:10 -0700 (PDT)
Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com
 [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id
 us-mta-352-s2S_VYwJNbmH1lUlnzfckA-1; Fri, 19 Jun 2020 05:40:39 -0400
Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com
 [10.5.11.15])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mimecast-mx01.redhat.com (Postfix) with ESMTPS id ED900106B245;
	Fri, 19 Jun 2020 09:40:28 +0000 (UTC)
Received: from colo-mx.corp.redhat.com
 (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20])
	by smtp.corp.redhat.com (Postfix) with ESMTPS id D08ED5BACA;
	Fri, 19 Jun 2020 09:40:28 +0000 (UTC)
Received: from lists01.pubmisc.prod.ext.phx2.redhat.com
 (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33])
	by colo-mx.corp.redhat.com (Postfix) with ESMTP id A0DAC180CB27;
	Fri, 19 Jun 2020 09:40:28 +0000 (UTC)
Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com
	[10.5.11.11])
	by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id 05J9eDTp004884 for ;
	Fri, 19 Jun 2020 05:40:13 -0400
Received: by smtp.corp.redhat.com (Postfix)
	id 108CB7166A; Fri, 19 Jun 2020 09:40:13 +0000 (UTC)
Received: from catbus.gsslab.fab.redhat.com (mustard.gsslab.fab.redhat.com
	[10.33.8.112])
	by smtp.corp.redhat.com (Postfix) with ESMTP id 7320371662;
	Fri, 19 Jun 2020 09:40:12 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
	s=mimecast20190719; t=1592559848;
	h=from:from:sender:sender:reply-to:subject:subject:date:date:
	 message-id:message-id:to:to:cc:mime-version:mime-version:
	 content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references:list-id:list-help:
	 list-unsubscribe:list-subscribe:list-post;
	bh=dPNe3ndlYe7eGYvQ3zx4qtho4d58rxv7bL770s5+t+0=;
	b=dIvM0wy1D7H/GUYqnhi+o3Q3r7kx4ny9x7r8lvNefAvXtHjuR0xmIzfp13dLtkfKddGsxJ
	gstX82MnZ6rrAY05vh+GQ7Nrxg9l6+WQ5uFrXNyHmjrm7mcmdRxNFKg6dp4c4ej6ywo/wA
	u6OpOS5aJ6ERVKLl4lIgwBu9yN/+0sA=
X-MC-Unique: s2S_VYwJNbmH1lUlnzfckA-1
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= 
To: libvir-list@redhat.com
Subject: [libvirt PATCH 11/23] src: remove use of the term 'whitelist' from
	remaining code
Date: Fri, 19 Jun 2020 10:32:48 +0100
Message-Id: <20200619093300.2211535-12-berrange@redhat.com>
In-Reply-To: <20200619093300.2211535-1-berrange@redhat.com>
References: <20200619093300.2211535-1-berrange@redhat.com>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11
X-loop: libvir-list@redhat.com
X-BeenThere: libvir-list@redhat.com
X-Mailman-Version: 2.1.12
Precedence: junk
List-Id: Development discussions about the libvirt library & tools
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
Sender: libvir-list-bounces@redhat.com
Errors-To: libvir-list-bounces@redhat.com
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-ZohoMail-DKIM: pass (identity @redhat.com)

The terms can be avoided with simple tweaks.

Signed-off-by: Daniel P. Berrang=C3=A9 
Reviewed-by: Peter Krempa 
---
 src/libvirt.c           | 2 +-
 src/qemu/qemu_command.c | 2 +-
 src/qemu/qemu_conf.c    | 4 ++--
 src/rpc/gendispatch.pl  | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/libvirt.c b/src/libvirt.c
index b2d0ba3d23..a0a21fd5d2 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -1025,7 +1025,7 @@ virConnectOpenInternal(const char *name,
             bool matchScheme =3D false;
             size_t s;
             if (!ret->uri) {
-                VIR_DEBUG("No URI, skipping driver with URI whitelist");
+                VIR_DEBUG("No URI, skipping driver with URI scheme filteri=
ng");
                 continue;
             }
             if (embed && !virConnectDriverTab[i]->embeddable) {
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 37113a433a..ff539b1556 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -9526,7 +9526,7 @@ qemuBuildSeccompSandboxCommandLine(virCommandPtr cmd,
         return 0;
     }
=20
-    /* Seccomp whitelist is opt-in */
+    /* Seccomp sandbox is opt-in */
     if (cfg->seccompSandbox > 0)
         virCommandAddArgList(cmd, "-sandbox", "on", NULL);
=20
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 33b3989268..c54f82a75f 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -1854,8 +1854,8 @@ qemuSetUnprivSGIO(virDomainDeviceDefPtr dev)
     /* By default, filter the SG_IO commands, i.e. set unpriv_sgio to 0.  =
*/
     val =3D (disk->sgio =3D=3D VIR_DOMAIN_DEVICE_SGIO_UNFILTERED);
=20
-    /* Do not do anything if unpriv_sgio is not supported by the kernel an=
d the
-     * whitelist is enabled.  But if requesting unfiltered access, always =
call
+    /* Do not do anything if unpriv_sgio is not supported by the kernel and
+     * filtering is enabled.  But if requesting unfiltered access, always =
call
      * virSetDeviceUnprivSGIO, to report an error for unsupported unpriv_s=
gio.
      */
     if ((virFileExists(sysfs_path) || val =3D=3D 1) &&
diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl
index 0b2ae59910..6c947beee1 100755
--- a/src/rpc/gendispatch.pl
+++ b/src/rpc/gendispatch.pl
@@ -171,7 +171,7 @@ sub get_conn_method {
     if ($proc =3D~ /Connect.*Network/) {
         return "remoteGetNetworkConn";
     }
-    # Carefully whitelist a few APIs with NodeDevice name
+    # Special case a few APIs with NodeDevice name
     # prefix which actually get handled by the virt drivers
     if ($proc =3D~ /Node.*Device/ &&
         !($proc =3D~ /NodeDeviceReset/ ||
--=20
2.24.1

From nobody Fri Apr 19 04:42:48 2024
Delivered-To: importer@patchew.org
Received-SPF: pass (zohomail.com: domain of redhat.com designates
 207.211.31.120 as permitted sender) client-ip=207.211.31.120;
 envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com;
Authentication-Results: mx.zohomail.com;
	dkim=pass;
	spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as
 permitted sender)  smtp.mailfrom=libvir-list-bounces@redhat.com;
	dmarc=pass(p=none dis=none)  header.from=redhat.com
ARC-Seal: i=1; a=rsa-sha256; t=1592559686; cv=none;
	d=zohomail.com; s=zohoarc;
	b=jISOoWUAmquCRtZKT0tm2ulYIXxLHZn0AjoN0YYhMhJPny4T3wOCxQk+jv2luXNb/U/C721s7U9nzApxbGoeV+Aev3mO+/ur7eEL5SDhYVi5rRzFhgnvTpihDtBdRdeVPrDej9tUgKmwx5h7unxsvt+ckpDTqit/EjNeoJe6QbI=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com;
 s=zohoarc;
	t=1592559686;
 h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To;
	bh=TW0P+Z3e4YYEzRjsVExaKt1LaudFlpCOD8xJlQMhHVw=;
	b=b2acc4F4g72m8SDunsGqiIW8mqWFOCkGEKCLq0aAOMqZKizCaKCIWqAFJEwPBXHR6Ux02sUeOVjW+UCKkWRm9m0Td9FmUI5F+zOOoxFOuyNg3pdGJYdOx9a7B1JGgDfBJZEex1cuCFllQJZk9RBihA5EkvSVmFa7vDV4SeOqOm0=
ARC-Authentication-Results: i=1; mx.zohomail.com;
	dkim=pass;
	spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as
 permitted sender)  smtp.mailfrom=libvir-list-bounces@redhat.com;
	dmarc=pass header.from= (p=none dis=none)
 header.from=
Return-Path: 
Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com
 [207.211.31.120]) by mx.zohomail.com
	with SMTPS id 1592559686804571.9522723438355;
 Fri, 19 Jun 2020 02:41:26 -0700 (PDT)
Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com
 [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id
 us-mta-169-d2LJ4HNoPOenFHRFQaIyTw-1; Fri, 19 Jun 2020 05:40:39 -0400
Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com
 [10.5.11.13])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0B1998035C8;
	Fri, 19 Jun 2020 09:40:34 +0000 (UTC)
Received: from colo-mx.corp.redhat.com
 (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21])
	by smtp.corp.redhat.com (Postfix) with ESMTPS id E11997C205;
	Fri, 19 Jun 2020 09:40:33 +0000 (UTC)
Received: from lists01.pubmisc.prod.ext.phx2.redhat.com
 (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33])
	by colo-mx.corp.redhat.com (Postfix) with ESMTP id B2F90833DB;
	Fri, 19 Jun 2020 09:40:33 +0000 (UTC)
Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com
	[10.5.11.11])
	by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id 05J9eDtf004898 for ;
	Fri, 19 Jun 2020 05:40:13 -0400
Received: by smtp.corp.redhat.com (Postfix)
	id E8E1671663; Fri, 19 Jun 2020 09:40:13 +0000 (UTC)
Received: from catbus.gsslab.fab.redhat.com (mustard.gsslab.fab.redhat.com
	[10.33.8.112])
	by smtp.corp.redhat.com (Postfix) with ESMTP id 5755B71662;
	Fri, 19 Jun 2020 09:40:13 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
	s=mimecast20190719; t=1592559685;
	h=from:from:sender:sender:reply-to:subject:subject:date:date:
	 message-id:message-id:to:to:cc:mime-version:mime-version:
	 content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references:list-id:list-help:
	 list-unsubscribe:list-subscribe:list-post;
	bh=TW0P+Z3e4YYEzRjsVExaKt1LaudFlpCOD8xJlQMhHVw=;
	b=arorqlnFy16x5lZvHnWrbE+1nTzt3Y+BTCa4ZGMlXFmbpvZ3jz7w9x3n8CTjNegpWCUEYb
	YSEX1y1cdnImE67JQWIvPdb689ZNnSrDY0DqWM+2ihZQa7nZ+RU0bq/BXOcifNcji/mMVf
	g8AXBNb8g/V8+C48elfFsLq7+W0+Ny0=
X-MC-Unique: d2LJ4HNoPOenFHRFQaIyTw-1
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= 
To: libvir-list@redhat.com
Subject: [libvirt PATCH 12/23] interface: use a constant for the sysfs bond
	device file prefix
Date: Fri, 19 Jun 2020 10:32:49 +0100
Message-Id: <20200619093300.2211535-13-berrange@redhat.com>
In-Reply-To: <20200619093300.2211535-1-berrange@redhat.com>
References: <20200619093300.2211535-1-berrange@redhat.com>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11
X-loop: libvir-list@redhat.com
X-BeenThere: libvir-list@redhat.com
X-Mailman-Version: 2.1.12
Precedence: junk
List-Id: Development discussions about the libvirt library & tools
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
Sender: libvir-list-bounces@redhat.com
Errors-To: libvir-list-bounces@redhat.com
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-ZohoMail-DKIM: pass (identity @redhat.com)

Two methods needs to deal with the fixed filename prefix on the
NIC name used by bond devices. The code is clearer if they both
make use of a defined constant.

Signed-off-by: Daniel P. Berrang=C3=A9 
---
 src/interface/interface_backend_udev.c | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/src/interface/interface_backend_udev.c b/src/interface/interfa=
ce_backend_udev.c
index e388f98536..f0594aa59c 100644
--- a/src/interface/interface_backend_udev.c
+++ b/src/interface/interface_backend_udev.c
@@ -527,8 +527,16 @@ udevInterfaceLookupByMACString(virConnectPtr conn, con=
st char *macstr)
     return ret;
 }
=20
+/*
+ * Name prefix for sysfs symlinks that indicate which
+ * NICs are part of the bonded device
+ */
+#define BOND_NIC_PREFIX "slave_"
+
 /**
- * Helper function for finding bond slaves using scandir()
+ * Helper function for finding NICs that are members of a
+ * bond device by using scandir() over the sysfs net interface
+ * dir
  *
  * @param entry - directory entry passed by scandir()
  *
@@ -542,7 +550,7 @@ udevBondScanDirFilter(const struct dirent *entry)
      * interface sysfs entry and references the slaves as slave_eth0 for
      * example.
      */
-    if (STRPREFIX(entry->d_name, "slave_"))
+    if (STRPREFIX(entry->d_name, BOND_NIC_PREFIX))
         return 1;
=20
     return 0;
@@ -763,21 +771,15 @@ udevGetIfaceDefBond(struct udev *udev,
     ifacedef->data.bond.nbItf =3D slave_count;
=20
     for (i =3D 0; i < slave_count; i++) {
-        /* Names are slave_interface. e.g. slave_eth0
-         * so we use the part after the _
-         */
-        tmp_str =3D strchr(slave_list[i]->d_name, '_');
-        if (!tmp_str || strlen(tmp_str) < 2) {
+        if (!STRPREFIX(nic_list[i]->d_name, BOND_NIC_PREFIX)) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
                            _("Invalid enslaved interface name '%s' seen fo=
r "
                              "bond '%s'"), slave_list[i]->d_name, name);
             goto error;
         }
-        /* go past the _ */
-        tmp_str++;
=20
         ifacedef->data.bond.itf[i] =3D
-            udevGetIfaceDef(udev, tmp_str);
+            udevGetIfaceDef(udev, nic_list[i]->d_name + strlen(BOND_NIC_PR=
EFIX));
         if (!ifacedef->data.bond.itf[i]) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
                 _("Could not get interface information for '%s', which is "
--=20
2.24.1

From nobody Fri Apr 19 04:42:48 2024
Delivered-To: importer@patchew.org
Received-SPF: pass (zohomail.com: domain of redhat.com designates
 205.139.110.120 as permitted sender) client-ip=205.139.110.120;
 envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com;
Authentication-Results: mx.zohomail.com;
	dkim=pass;
	spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as
 permitted sender)  smtp.mailfrom=libvir-list-bounces@redhat.com;
	dmarc=pass(p=none dis=none)  header.from=redhat.com
ARC-Seal: i=1; a=rsa-sha256; t=1592559646; cv=none;
	d=zohomail.com; s=zohoarc;
	b=d3342YhzaVKGurc7yPJrvDwhfO2VYuHuDeatudSJsdxst6/sG/qldsZx4ce1i9omUjQkWggNW1I9GQ8tGMylPxpfLAKPisnnztf0ADu9whTLyTTrEHqY7fR0gX6tcrHA2nHAQSYxJjwkCYHkXvp+PnWwqTmf3ScdfOlWiy9M030=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com;
 s=zohoarc;
	t=1592559646;
 h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To;
	bh=T1rLPtQtnZbCfxEzc9CVqHqsohSHix1hJWtgwGg7V/M=;
	b=UKuOlv/khGd8y5OIzqncVucYvXxlDBqQOl/bTtRN2L3y17US07HLFtvE+IS5Vyw4qq1dMBbHc6d6RoE+ssINyp7jc/LDurdzacDGKe3KSyuNO6vFKfDM1qZCyucJkpWLt+6+Fla1kk1pOZMbMmVPaylyTDwal6is9OjHe/4qu2A=
ARC-Authentication-Results: i=1; mx.zohomail.com;
	dkim=pass;
	spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as
 permitted sender)  smtp.mailfrom=libvir-list-bounces@redhat.com;
	dmarc=pass header.from= (p=none dis=none)
 header.from=
Return-Path: 
Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com
 [205.139.110.120]) by mx.zohomail.com
	with SMTPS id 1592559646774403.0302650267705;
 Fri, 19 Jun 2020 02:40:46 -0700 (PDT)
Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com
 [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id
 us-mta-8-j-mAS8wvOJuX2hMrFTa4xw-1; Fri, 19 Jun 2020 05:40:42 -0400
Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com
 [10.5.11.23])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3E34D872FF1;
	Fri, 19 Jun 2020 09:40:36 +0000 (UTC)
Received: from colo-mx.corp.redhat.com
 (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21])
	by smtp.corp.redhat.com (Postfix) with ESMTPS id 1CC301992F;
	Fri, 19 Jun 2020 09:40:36 +0000 (UTC)
Received: from lists01.pubmisc.prod.ext.phx2.redhat.com
 (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33])
	by colo-mx.corp.redhat.com (Postfix) with ESMTP id E3073833CD;
	Fri, 19 Jun 2020 09:40:35 +0000 (UTC)
Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com
	[10.5.11.11])
	by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id 05J9eEeY004910 for ;
	Fri, 19 Jun 2020 05:40:14 -0400
Received: by smtp.corp.redhat.com (Postfix)
	id CC95271663; Fri, 19 Jun 2020 09:40:14 +0000 (UTC)
Received: from catbus.gsslab.fab.redhat.com (mustard.gsslab.fab.redhat.com
	[10.33.8.112])
	by smtp.corp.redhat.com (Postfix) with ESMTP id 3B58771662;
	Fri, 19 Jun 2020 09:40:14 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
	s=mimecast20190719; t=1592559645;
	h=from:from:sender:sender:reply-to:subject:subject:date:date:
	 message-id:message-id:to:to:cc:mime-version:mime-version:
	 content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references:list-id:list-help:
	 list-unsubscribe:list-subscribe:list-post;
	bh=T1rLPtQtnZbCfxEzc9CVqHqsohSHix1hJWtgwGg7V/M=;
	b=MneMivZD9rkM1XQFoYQkB9FichbUxBDkLRKuVPWaBzMOpqnnQ+AmYrWR0bm/cIR5p5Om3K
	wI6R/X+TAshbzbBpfHcfMfQvFuSmaZBCa7cKRH0Fw3xruAAB7j7akigZUbZw9JvCcDAFl7
	USAczfnias76XEs0+ytJsjeVJVzMGH0=
X-MC-Unique: j-mAS8wvOJuX2hMrFTa4xw-1
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= 
To: libvir-list@redhat.com
Subject: [libvirt PATCH 13/23] interface: remove most use of the term 'slave'
	from bonding code
Date: Fri, 19 Jun 2020 10:32:50 +0100
Message-Id: <20200619093300.2211535-14-berrange@redhat.com>
In-Reply-To: <20200619093300.2211535-1-berrange@redhat.com>
References: <20200619093300.2211535-1-berrange@redhat.com>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11
X-loop: libvir-list@redhat.com
X-BeenThere: libvir-list@redhat.com
X-Mailman-Version: 2.1.12
Precedence: junk
List-Id: Development discussions about the libvirt library & tools
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
Sender: libvir-list-bounces@redhat.com
Errors-To: libvir-list-bounces@redhat.com
X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23
Authentication-Results: relay.mimecast.com;
	auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-ZohoMail-DKIM: pass (identity @redhat.com)

We can't change the filenames used in sysfs, but we don't have
to use that terminology in our code processing the list of NICs.

Signed-off-by: Daniel P. Berrang=C3=A9 
---
 docs/schemas/interface.rng             |  2 +-
 src/interface/interface_backend_udev.c | 43 ++++++++++++--------------
 2 files changed, 21 insertions(+), 24 deletions(-)

diff --git a/docs/schemas/interface.rng b/docs/schemas/interface.rng
index a4fddaaedc..2530077190 100644
--- a/docs/schemas/interface.rng
+++ b/docs/schemas/interface.rng
@@ -237,7 +237,7 @@
         
=20
         
-          
+          
           
         
       
diff --git a/src/interface/interface_backend_udev.c b/src/interface/interfa=
ce_backend_udev.c
index f0594aa59c..f5961a93df 100644
--- a/src/interface/interface_backend_udev.c
+++ b/src/interface/interface_backend_udev.c
@@ -546,9 +546,7 @@ static int
 udevBondScanDirFilter(const struct dirent *entry)
 {
     /* This is ugly so if anyone has a better suggestion, please improve
-     * this. Unfortunately the kernel stores everything in the top level
-     * interface sysfs entry and references the slaves as slave_eth0 for
-     * example.
+     * this.
      */
     if (STRPREFIX(entry->d_name, BOND_NIC_PREFIX))
         return 1;
@@ -591,8 +589,8 @@ udevGetIfaceDefBond(struct udev *udev,
                     const char *name,
                     virInterfaceDef *ifacedef)
 {
-    struct dirent **slave_list =3D NULL;
-    int slave_count =3D 0;
+    struct dirent **nic_list =3D NULL;
+    int nic_count =3D 0;
     size_t i;
     const char *tmp_str;
     int tmp_int;
@@ -754,27 +752,26 @@ udevGetIfaceDefBond(struct udev *udev,
     }
     ifacedef->data.bond.target =3D g_strdup(tmp_str);
=20
-    /* Slaves of the bond */
-    /* Get each slave in the bond */
-    slave_count =3D scandir(udev_device_get_syspath(dev), &slave_list,
+    /* Get each NIC that is a member of the bond */
+    nic_count =3D scandir(udev_device_get_syspath(dev), &nic_list,
             udevBondScanDirFilter, alphasort);
=20
-    if (slave_count < 0) {
+    if (nic_count < 0) {
         virReportSystemError(errno,
-                _("Could not get slaves of bond '%s'"), name);
+                _("Could not get interfaces for bond '%s'"), name);
         goto error;
     }
=20
-    /* Allocate our list of slave devices */
-    if (VIR_ALLOC_N(ifacedef->data.bond.itf, slave_count) < 0)
+    /* Allocate our list of bonded devices */
+    if (VIR_ALLOC_N(ifacedef->data.bond.itf, nic_count) < 0)
         goto error;
-    ifacedef->data.bond.nbItf =3D slave_count;
+    ifacedef->data.bond.nbItf =3D nic_count;
=20
-    for (i =3D 0; i < slave_count; i++) {
+    for (i =3D 0; i < nic_count; i++) {
         if (!STRPREFIX(nic_list[i]->d_name, BOND_NIC_PREFIX)) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("Invalid enslaved interface name '%s' seen fo=
r "
-                             "bond '%s'"), slave_list[i]->d_name, name);
+                           _("Invalid bonded interface name '%s' seen for "
+                             "bond '%s'"), nic_list[i]->d_name, name);
             goto error;
         }
=20
@@ -782,21 +779,21 @@ udevGetIfaceDefBond(struct udev *udev,
             udevGetIfaceDef(udev, nic_list[i]->d_name + strlen(BOND_NIC_PR=
EFIX));
         if (!ifacedef->data.bond.itf[i]) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
-                _("Could not get interface information for '%s', which is "
-                  "a enslaved in bond '%s'"), slave_list[i]->d_name, name);
+                _("Could not get interface information for '%s', which "
+                  "is part of bond '%s'"), nic_list[i]->d_name, name);
             goto error;
         }
-        VIR_FREE(slave_list[i]);
+        VIR_FREE(nic_list[i]);
     }
=20
-    VIR_FREE(slave_list);
+    VIR_FREE(nic_list);
=20
     return 0;
=20
  error:
-    for (i =3D 0; slave_count !=3D -1 && i < slave_count; i++)
-        VIR_FREE(slave_list[i]);
-    VIR_FREE(slave_list);
+    for (i =3D 0; nic_count !=3D -1 && i < nic_count; i++)
+        VIR_FREE(nic_list[i]);
+    VIR_FREE(nic_list);
=20
     return -1;
 }
--=20
2.24.1

From nobody Fri Apr 19 04:42:48 2024
Delivered-To: importer@patchew.org
Received-SPF: pass (zohomail.com: domain of redhat.com designates
 207.211.31.81 as permitted sender) client-ip=207.211.31.81;
 envelope-from=libvir-list-bounces@redhat.com;
 helo=us-smtp-delivery-1.mimecast.com;
Authentication-Results: mx.zohomail.com;
	dkim=pass;
	spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as
 permitted sender)  smtp.mailfrom=libvir-list-bounces@redhat.com;
	dmarc=pass(p=none dis=none)  header.from=redhat.com
ARC-Seal: i=1; a=rsa-sha256; t=1592559652; cv=none;
	d=zohomail.com; s=zohoarc;
	b=GClNDOP/3HTa8RvZwnwwOxcZ8v9CXENWpTEYO8w92mct/Mri/JQj95ddVYECJWWYpF1nxUQi1IC3RElytR1l7JGt8ZYxfz80aTLKRkwsdzHwNZSp0/rahl0+L9LN50qI+gw4yJVDriamPZnDps7Pvj7lRnUSJOcGkMeGMn2glw0=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com;
 s=zohoarc;
	t=1592559652;
 h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To;
	bh=FmmZHn0SbtlLbfBLwXv3/CjlZq8abx1qIpDzN3W2iQc=;
	b=ISGxaebot184VEtxLcb7L960Fqb6RpIpOeYI/J5DdUHSesMMwYdOaW/o6IJjuEhKKg4IIwfkDN0nKMkCRPUOvJBeuJXT+thz1LOa2zx68nMo/EJ6iIlKRYH01/WB4CzMZz/4U3Euc9ExnYZvAgr2iCb58DvEtWP8vtQ/4vrjukc=
ARC-Authentication-Results: i=1; mx.zohomail.com;
	dkim=pass;
	spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as
 permitted sender)  smtp.mailfrom=libvir-list-bounces@redhat.com;
	dmarc=pass header.from= (p=none dis=none)
 header.from=
Return-Path: 
Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com
 [207.211.31.81]) by mx.zohomail.com
	with SMTPS id 1592559652968612.4685922902019;
 Fri, 19 Jun 2020 02:40:52 -0700 (PDT)
Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com
 [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id
 us-mta-121-JH8CU2Q4OsuSlmrv8vAvCw-1; Fri, 19 Jun 2020 05:40:38 -0400
Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com
 [10.5.11.14])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0A6EA107B78E;
	Fri, 19 Jun 2020 09:40:31 +0000 (UTC)
Received: from colo-mx.corp.redhat.com
 (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20])
	by smtp.corp.redhat.com (Postfix) with ESMTPS id E03175D9F3;
	Fri, 19 Jun 2020 09:40:30 +0000 (UTC)
Received: from lists01.pubmisc.prod.ext.phx2.redhat.com
 (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33])
	by colo-mx.corp.redhat.com (Postfix) with ESMTP id AD0F51805309;
	Fri, 19 Jun 2020 09:40:30 +0000 (UTC)
Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com
	[10.5.11.11])
	by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id 05J9eFpT004921 for ;
	Fri, 19 Jun 2020 05:40:15 -0400
Received: by smtp.corp.redhat.com (Postfix)
	id B112771663; Fri, 19 Jun 2020 09:40:15 +0000 (UTC)
Received: from catbus.gsslab.fab.redhat.com (mustard.gsslab.fab.redhat.com
	[10.33.8.112])
	by smtp.corp.redhat.com (Postfix) with ESMTP id 1FC2771662;
	Fri, 19 Jun 2020 09:40:14 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
	s=mimecast20190719; t=1592559651;
	h=from:from:sender:sender:reply-to:subject:subject:date:date:
	 message-id:message-id:to:to:cc:mime-version:mime-version:
	 content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references:list-id:list-help:
	 list-unsubscribe:list-subscribe:list-post;
	bh=FmmZHn0SbtlLbfBLwXv3/CjlZq8abx1qIpDzN3W2iQc=;
	b=Guib3Pu7iKYeeJ8bAyzkAoC/64RK/tIb2KM8LmZACpiTpb2jr1zh7zDZEIMlovzWR0HHpu
	EzL0RTFgsL62MNk8vVocnkXBDwrT9HGn7ncfAWpD5I3WHWQmAP6IXz7Qk1a/rMgObrl1rw
	1AGAh4Qpc/5uW+Q6U0paAB+OIi0FyoU=
X-MC-Unique: JH8CU2Q4OsuSlmrv8vAvCw-1
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= 
To: libvir-list@redhat.com
Subject: [libvirt PATCH 14/23] docs: remove use of the term 'enslaved' wrt tap
	& bridge devices
Date: Fri, 19 Jun 2020 10:32:51 +0100
Message-Id: <20200619093300.2211535-15-berrange@redhat.com>
In-Reply-To: <20200619093300.2211535-1-berrange@redhat.com>
References: <20200619093300.2211535-1-berrange@redhat.com>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11
X-loop: libvir-list@redhat.com
X-BeenThere: libvir-list@redhat.com
X-Mailman-Version: 2.1.12
Precedence: junk
List-Id: Development discussions about the libvirt library & tools
	
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
Sender: libvir-list-bounces@redhat.com
Errors-To: libvir-list-bounces@redhat.com
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-ZohoMail-DKIM: pass (identity @redhat.com)

Network interfaces are simply attached to a bridge device.

Signed-off-by: Daniel P. Berrang=C3=A9 
Reviewed-by: Peter Krempa 
---
 docs/firewall.html.in     | 4 ++--
 docs/formatdomain.html.in | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/docs/firewall.html.in b/docs/firewall.html.in
index bfb5a47b1c..2d55021d9b 100644
--- a/docs/firewall.html.in
+++ b/docs/firewall.html.in
@@ -12,7 +12,7 @@
       
  • The virtual network driver

    This provides an isolated bridge device (ie no physical NICs - enslaved). Guest TAP devices are attached to this bridge. + attached). Guest TAP devices are attached to this bridge. Guests can talk to each other and the host, and optionally the wider world.

    @@ -46,7 +46,7 @@

    Thus the virtual network driver in libvirt was invented. This takes the form of an isolated bridge device (ie one with no physical NICs - enslaved). The TAP devices associated with the guest NICs are attac= hed + attached). The TAP devices associated with the guest NICs are attac= hed to the bridge device. This immediately allows guests on a single ho= st to talk to each other and to the host OS (modulo host IPtables rule= s).

    diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 07d0fa5c70..3f4d633909 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -5785,11 +5785,11 @@

    Provides a bridge from the VM directly to the LAN. This assumes there is a bridge device on the host which has one or more of the ho= sts - physical NICs enslaved. The guest VM will have an associated tun dev= ice + physical NICs attached. The guest VM will have an associated tun dev= ice created with a name of vnetN, which can also be overridden with the <target> element (see overriding the target elemen= t). - The tun device will be enslaved to the bridge. The IP range / network + The tun device will be attached to the bridge. The IP range / network configuration is whatever is used on the LAN. This provides the gues= t VM full incoming & outgoing net access just like a physical machine.

    --=20 2.24.1 From nobody Fri Apr 19 04:42:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1592559641; cv=none; d=zohomail.com; s=zohoarc; b=Vp0mARbbmi1yv1+UwjA3Mg4XBUJ3WoAUNHqDs4IGCnXiuhyOpMh+BrDglhp+eIyIgatd3izzuy4/dTgwf6QJSHO1LpRoUiRGYr/gruPGxGOKogI74qTawXutJGkrlPx5SECA01hbgA+GaXUqms+/lRo3eyTQDxSvzhATsvk27MQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592559641; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=kJbuvMdQ65dnBDncqiEWZr7+lmDMiQ6JBtlHw7p7kbA=; b=ORGWkG3GzRmrr7LPhEHBp1OOHvP9ZHGFhGaItJ0zOh2SNmTbXn6qzGzlfGbLB2KAN2rlck69xxwyIkRZUtK39IhNJRP2DY0WlN6Jb+4FhJ21EVkptZWodtB5uUQLrXGjB5VOLd3D8qjiLQ2TjPFuS9LHBGhop6dam+p5Nt+Ls7k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1592559641029266.2702492631321; Fri, 19 Jun 2020 02:40:41 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-134-6QXRkElFOu2uCi2NXaFX0w-1; Fri, 19 Jun 2020 05:40:37 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 45348872FF2; Fri, 19 Jun 2020 09:40:32 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1F8B01002396; Fri, 19 Jun 2020 09:40:32 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id E2B06833D7; Fri, 19 Jun 2020 09:40:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 05J9eG2Z004939 for ; Fri, 19 Jun 2020 05:40:16 -0400 Received: by smtp.corp.redhat.com (Postfix) id 956527166A; Fri, 19 Jun 2020 09:40:16 +0000 (UTC) Received: from catbus.gsslab.fab.redhat.com (mustard.gsslab.fab.redhat.com [10.33.8.112]) by smtp.corp.redhat.com (Postfix) with ESMTP id 036BD71662; Fri, 19 Jun 2020 09:40:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592559639; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=kJbuvMdQ65dnBDncqiEWZr7+lmDMiQ6JBtlHw7p7kbA=; b=VOC4h10Jn/oIZroQyhGqkDPGORKlLv9x/YRIUlqk6O885PD7Q7RfEJ4LIhwojl+hBerRTc FiLmHzC3FBldtUre0LaHgZriIEimBxf6UtTRMa3CPLqpY5bnXPKS3z0/w9GiTzaImYXu8D anPuxQ3FgARu9jXrFvx8isZGaATl9/4= X-MC-Unique: 6QXRkElFOu2uCi2NXaFX0w-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH 15/23] tools: remove use of the term 'slave' in code dealing with bridges Date: Fri, 19 Jun 2020 10:32:52 +0100 Message-Id: <20200619093300.2211535-16-berrange@redhat.com> In-Reply-To: <20200619093300.2211535-1-berrange@redhat.com> References: <20200619093300.2211535-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Network interfaces are simply attached to a bridge device. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- tools/virsh-interface.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/virsh-interface.c b/tools/virsh-interface.c index a3cdf8630f..d754998d52 100644 --- a/tools/virsh-interface.c +++ b/tools/virsh-interface.c @@ -922,17 +922,17 @@ cmdInterfaceBridge(vshControl *ctl, const vshCmd *cmd) goto cleanup; } =20 - /* set the type of the inner/slave interface to the original + /* set the type of the attached interface to the original * if_type, and the name to the original if_name. */ if (!xmlSetProp(if_node, BAD_CAST "type", BAD_CAST if_type)) { - vshError(ctl, _("Failed to set new slave interface type to '%s' in= xml document"), + vshError(ctl, _("Failed to set new attached interface type to '%s'= in xml document"), if_type); goto cleanup; } =20 if (!xmlSetProp(if_node, BAD_CAST "name", BAD_CAST if_name)) { - vshError(ctl, _("Failed to set new slave interface name to '%s' in= xml document"), + vshError(ctl, _("Failed to set new attached interface name to '%s'= in xml document"), if_name); goto cleanup; } @@ -1010,7 +1010,7 @@ cmdInterfaceBridge(vshControl *ctl, const vshCmd *cmd) */ static const vshCmdInfo info_interface_unbridge[] =3D { {.name =3D "help", - .data =3D N_("undefine a bridge device after detaching its slave devi= ce") + .data =3D N_("undefine a bridge device after detaching its device(s)") }, {.name =3D "desc", .data =3D N_("unbridge a network device") @@ -1026,7 +1026,7 @@ static const vshCmdOptDef opts_interface_unbridge[] = =3D { }, {.name =3D "no-start", .type =3D VSH_OT_BOOL, - .help =3D N_("don't start the un-slaved interface immediately (not re= commended)") + .help =3D N_("don't start the detached interface immediately (not rec= ommended)") }, {.name =3D NULL} }; @@ -1103,8 +1103,8 @@ cmdInterfaceUnbridge(vshControl *ctl, const vshCmd *c= md) goto cleanup; } =20 - /* Change the type and name of the outer/master interface to - * the type/name of the attached slave interface. + /* Change the type and name of the bridge interface to + * the type/name of the attached interface. */ if (!(if_name =3D virXMLPropString(if_node, "name"))) { vshError(ctl, _("Device attached to bridge %s has no name"), br_na= me); @@ -1154,7 +1154,7 @@ cmdInterfaceUnbridge(vshControl *ctl, const vshCmd *c= md) xmlDocDumpMemory(xml_doc, &if_xml, &if_xml_size); =20 if (!if_xml || if_xml_size <=3D 0) { - vshError(ctl, _("Failed to format new xml document for un-enslaved= interface %s"), + vshError(ctl, _("Failed to format new xml document for detached in= terface %s"), if_name); goto cleanup; } --=20 2.24.1 From nobody Fri Apr 19 04:42:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1592559669; cv=none; d=zohomail.com; s=zohoarc; b=OzaUf5KRn+pLn/kl4qWF57P1Qwzru4B9fSns4pXMrKHfyex3zBEgOy9FXUYblYsrLUuih17tG8FbGmAcuAwMZiqIqDd9kaPe4hZ5Wvhz7ntU5E/gBfsH+pFLnrcoSZaBeE3IRmpgRm4lsWgBG4rDs5XEDXpnmZdyQkeIQQrF9lI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592559669; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Ejbo7S0zkxPGjbbuR4WAOaNvgR8p7bOKgJugMTN6KkU=; b=N3QiWv5mhVHNFpeHar6bhug4TBQzvzlKqI1jjKSXydWh/d4CMbQhRenN8baBEcFdbHt7xCexplG+3qVDkj8wcIUdroELojnBytRM8+sbWdfwrJhYzIC7CHG3PuCMrHpwIboFswmvFEzzKLcyNndvvZVs7fcNaBr3fI55sKaN+Jo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1592559669385679.777438441087; Fri, 19 Jun 2020 02:41:09 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-477-7o3YvGzEPNuu5xJTHl8ebQ-1; Fri, 19 Jun 2020 05:40:45 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7B4418035C0; Fri, 19 Jun 2020 09:40:39 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 56EEC10002B5; Fri, 19 Jun 2020 09:40:39 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 270F51800456; Fri, 19 Jun 2020 09:40:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 05J9eHa7004953 for ; Fri, 19 Jun 2020 05:40:17 -0400 Received: by smtp.corp.redhat.com (Postfix) id C15EB71662; Fri, 19 Jun 2020 09:40:17 +0000 (UTC) Received: from catbus.gsslab.fab.redhat.com (mustard.gsslab.fab.redhat.com [10.33.8.112]) by smtp.corp.redhat.com (Postfix) with ESMTP id DB99971671; Fri, 19 Jun 2020 09:40:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592559668; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Ejbo7S0zkxPGjbbuR4WAOaNvgR8p7bOKgJugMTN6KkU=; b=PsqE28wr01GtPydctQB2kmK+4f4BQc4NilRQ7bzhVgLXTLh78vUlunj/9+V2kcm+rOt8Qs 6uP/G3KVqNxn2sr7sNfy7u2tA5uFK1AtZAXOgyyV1VPIK9+u3XNujSB0ex/OIBgu1D7idH O6bKqpcXPnyzK80v4XDeBpeolN9pPt0= X-MC-Unique: 7o3YvGzEPNuu5xJTHl8ebQ-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH 16/23] util: remove use of the terms 'master' and 'slave' in PTY code Date: Fri, 19 Jun 2020 10:32:53 +0100 Message-Id: <20200619093300.2211535-17-berrange@redhat.com> In-Reply-To: <20200619093300.2211535-1-berrange@redhat.com> References: <20200619093300.2211535-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) The two sides of a PTY can be referred to as primary and secondary TTYs. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1592559849975626.7635566598542; Fri, 19 Jun 2020 02:44:09 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-213-Y58th20YMCi7IzsEE2lf2Q-1; Fri, 19 Jun 2020 05:40:40 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6DB22EC1A1; Fri, 19 Jun 2020 09:40:34 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4D0351992F; Fri, 19 Jun 2020 09:40:34 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 1C5691805311; Fri, 19 Jun 2020 09:40:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 05J9eLFD004981 for ; Fri, 19 Jun 2020 05:40:21 -0400 Received: by smtp.corp.redhat.com (Postfix) id 540BD71663; Fri, 19 Jun 2020 09:40:21 +0000 (UTC) Received: from catbus.gsslab.fab.redhat.com (mustard.gsslab.fab.redhat.com [10.33.8.112]) by smtp.corp.redhat.com (Postfix) with ESMTP id B70EB71662; Fri, 19 Jun 2020 09:40:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592559848; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=YPsItr/MtiPlbPOeTNxgzatSn95Yhf2Q+mLXBIar2o0=; b=USfIN04WculRty/NTOvNVS0DKUcEWFbqp1kL+uP1j5j10BtGeyeZwOok2/0qZzjalypX68 Jf89ddzA8E6RQ5fnO5f1vDuQF2KvcGGTHa2n1niFIZ+uPkYc3vfgydWme2xuMp3cPLZNbG JQQghOcvKGu05KV+QZ8I51xCqMDWWAI= X-MC-Unique: Y58th20YMCi7IzsEE2lf2Q-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH 17/23] qemu: remove use of the terms 'master' and 'slave' when iterating CPUs Date: Fri, 19 Jun 2020 10:32:54 +0100 Message-Id: <20200619093300.2211535-18-berrange@redhat.com> In-Reply-To: <20200619093300.2211535-1-berrange@redhat.com> References: <20200619093300.2211535-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) When querying QEMU we have to iterate over two nested sets of CPUs. The terms "main vcpu" and "sub vcpu" are a good representation. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- src/qemu/qemu_monitor.c | 46 ++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 3ec22b939f..5033cbeabf 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -1734,8 +1734,8 @@ qemuMonitorGetCPUInfoHotplug(struct qemuMonitorQueryH= otpluggableCpusEntry *hotpl char *tmp; int order =3D 1; size_t totalvcpus =3D 0; - size_t mastervcpu; /* this iterator is used for iterating hotpluggable= entities */ - size_t slavevcpu; /* this corresponds to subentries of a hotpluggable = entry */ + size_t mainvcpu; /* this iterator is used for iterating hotpluggable e= ntities */ + size_t subvcpu; /* this corresponds to subentries of a hotpluggable en= try */ size_t anyvcpu; /* this iterator is used for any vcpu entry in the res= ult */ size_t i; size_t j; @@ -1777,31 +1777,31 @@ qemuMonitorGetCPUInfoHotplug(struct qemuMonitorQuer= yHotpluggableCpusEntry *hotpl /* transfer appropriate data from the hotpluggable list to correspondi= ng * entries. the entries returned by qemu may in fact describe multiple * logical vcpus in the guest */ - mastervcpu =3D 0; + mainvcpu =3D 0; for (i =3D 0; i < nhotplugvcpus; i++) { - vcpus[mastervcpu].online =3D !!hotplugvcpus[i].qom_path; - vcpus[mastervcpu].hotpluggable =3D !!hotplugvcpus[i].alias || - !vcpus[mastervcpu].online; - vcpus[mastervcpu].socket_id =3D hotplugvcpus[i].socket_id; - vcpus[mastervcpu].die_id =3D hotplugvcpus[i].die_id; - vcpus[mastervcpu].core_id =3D hotplugvcpus[i].core_id; - vcpus[mastervcpu].thread_id =3D hotplugvcpus[i].thread_id; - vcpus[mastervcpu].node_id =3D hotplugvcpus[i].node_id; - vcpus[mastervcpu].vcpus =3D hotplugvcpus[i].vcpus; - vcpus[mastervcpu].qom_path =3D g_steal_pointer(&hotplugvcpus[i].qo= m_path); - vcpus[mastervcpu].alias =3D g_steal_pointer(&hotplugvcpus[i].alias= ); - vcpus[mastervcpu].type =3D g_steal_pointer(&hotplugvcpus[i].type); - vcpus[mastervcpu].props =3D g_steal_pointer(&hotplugvcpus[i].props= ); - vcpus[mastervcpu].id =3D hotplugvcpus[i].enable_id; - - /* copy state information to slave vcpus */ - for (slavevcpu =3D mastervcpu + 1; slavevcpu < mastervcpu + hotplu= gvcpus[i].vcpus; slavevcpu++) { - vcpus[slavevcpu].online =3D vcpus[mastervcpu].online; - vcpus[slavevcpu].hotpluggable =3D vcpus[mastervcpu].hotpluggab= le; + vcpus[mainvcpu].online =3D !!hotplugvcpus[i].qom_path; + vcpus[mainvcpu].hotpluggable =3D !!hotplugvcpus[i].alias || + !vcpus[mainvcpu].online; + vcpus[mainvcpu].socket_id =3D hotplugvcpus[i].socket_id; + vcpus[mainvcpu].die_id =3D hotplugvcpus[i].die_id; + vcpus[mainvcpu].core_id =3D hotplugvcpus[i].core_id; + vcpus[mainvcpu].thread_id =3D hotplugvcpus[i].thread_id; + vcpus[mainvcpu].node_id =3D hotplugvcpus[i].node_id; + vcpus[mainvcpu].vcpus =3D hotplugvcpus[i].vcpus; + vcpus[mainvcpu].qom_path =3D g_steal_pointer(&hotplugvcpus[i].qom_= path); + vcpus[mainvcpu].alias =3D g_steal_pointer(&hotplugvcpus[i].alias); + vcpus[mainvcpu].type =3D g_steal_pointer(&hotplugvcpus[i].type); + vcpus[mainvcpu].props =3D g_steal_pointer(&hotplugvcpus[i].props); + vcpus[mainvcpu].id =3D hotplugvcpus[i].enable_id; + + /* copy state information to sub vcpus */ + for (subvcpu =3D mainvcpu + 1; subvcpu < mainvcpu + hotplugvcpus[i= ].vcpus; subvcpu++) { + vcpus[subvcpu].online =3D vcpus[mainvcpu].online; + vcpus[subvcpu].hotpluggable =3D vcpus[mainvcpu].hotpluggable; } =20 /* calculate next master vcpu (hotpluggable unit) entry */ - mastervcpu +=3D hotplugvcpus[i].vcpus; + mainvcpu +=3D hotplugvcpus[i].vcpus; } =20 /* match entries from query cpus to the output array taking into accou= nt --=20 2.24.1 From nobody Fri Apr 19 04:42:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1592559688; cv=none; d=zohomail.com; s=zohoarc; b=E3F+8WxBAI7i0j93zUZ1K1TytU3N7a8orHyxQt1W4gC5BdqRSR2WgTFJAO1Y8TK015hFVanygXH2YUNS5SMEyN6S+kiO92V5fg79l59SofN/3WpCvEE0EtsAIF/62h4BmDfq5BcVkLaDnN7S16SqtoBuM6i9CgtbBsfW7OkNjMU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592559688; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=DLq3OIyj8mwUwT4pMv1PHxBAlZ4ZlhLOm0J4bcWlBSk=; b=IM84fcvim/AYpUEEvC8MzUZtcAINtB6FhJzFoCj+Wh/zEnufkXFHrW8HTmnDp0ROhi4vbRt5UOrjyQLX51ZDp40G6BWwv7zD/8UbmImDk3RTydUk+38Qz4QqrfK+nHTFe7/YYNsg4+x5mke2MqWYMmX4+1+TgEiBEXvfDAubx6s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1592559688066457.01250649728524; Fri, 19 Jun 2020 02:41:28 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-504-6LuyYOtePMWXY3RW7Nr39A-1; Fri, 19 Jun 2020 05:40:48 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6A9888035CE; Fri, 19 Jun 2020 09:40:42 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4C9D65C221; Fri, 19 Jun 2020 09:40:42 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C7D9F1806B0D; Fri, 19 Jun 2020 09:40:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 05J9eO3V005008 for ; Fri, 19 Jun 2020 05:40:24 -0400 Received: by smtp.corp.redhat.com (Postfix) id 419C471663; Fri, 19 Jun 2020 09:40:24 +0000 (UTC) Received: from catbus.gsslab.fab.redhat.com (mustard.gsslab.fab.redhat.com [10.33.8.112]) by smtp.corp.redhat.com (Postfix) with ESMTP id A493871662; Fri, 19 Jun 2020 09:40:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592559685; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=DLq3OIyj8mwUwT4pMv1PHxBAlZ4ZlhLOm0J4bcWlBSk=; b=I12g39VoM2rvzOTb20SriAR1ExirKN524J1oE5r3tutPo62wirvpC2n1/CAF32Oz1SdLtH fPE0s+9srOrEZaZYEGaMseobHwWSn/2Q62Fdee1F78IhacHgSkKxs5YI9cFeb0P3V7dBIX 2YQBrcnluPoB0G+Z3KU0JKNRuIJ7tYQ= X-MC-Unique: 6LuyYOtePMWXY3RW7Nr39A-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH 18/23] lxc: remove use of the terms 'master' and 'slave' in PTY setup Date: Fri, 19 Jun 2020 10:32:55 +0100 Message-Id: <20200619093300.2211535-19-berrange@redhat.com> In-Reply-To: <20200619093300.2211535-1-berrange@redhat.com> References: <20200619093300.2211535-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) The two sides of a PTY can be referred to as primary and secondary TTYs. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- src/lxc/lxc_controller.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index 2e865e0e7c..59b44dde1f 100644 --- a/src/lxc/lxc_controller.c +++ b/src/lxc/lxc_controller.c @@ -2054,25 +2054,25 @@ static int lxcSetPersonality(virDomainDefPtr def) } =20 /* Create a private tty using the private devpts at PTMX, returning - * the master in *TTYMASTER and the name of the slave, _from the + * the primary in @ttyprimary and the name of the secondary, _from the * perspective of the guest after remounting file systems_, in - * *TTYNAME. Heavily borrowed from glibc, but doesn't require that + * @ttyName. Heavily borrowed from glibc, but doesn't require that * devpts =3D=3D "/dev/pts" */ static int -lxcCreateTty(virLXCControllerPtr ctrl, int *ttymaster, +lxcCreateTty(virLXCControllerPtr ctrl, int *ttyprimary, char **ttyName, char **ttyHostPath) { int ret =3D -1; int ptyno; int unlock =3D 0; =20 - if ((*ttymaster =3D open(ctrl->devptmx, O_RDWR|O_NOCTTY|O_NONBLOCK)) <= 0) + if ((*ttyprimary =3D open(ctrl->devptmx, O_RDWR|O_NOCTTY|O_NONBLOCK)) = < 0) goto cleanup; =20 - if (ioctl(*ttymaster, TIOCSPTLCK, &unlock) < 0) + if (ioctl(*ttyprimary, TIOCSPTLCK, &unlock) < 0) goto cleanup; =20 - if (ioctl(*ttymaster, TIOCGPTN, &ptyno) < 0) + if (ioctl(*ttyprimary, TIOCGPTN, &ptyno) < 0) goto cleanup; =20 /* If mount() succeeded at honoring newinstance, then the kernel @@ -2088,7 +2088,7 @@ lxcCreateTty(virLXCControllerPtr ctrl, int *ttymaster, =20 cleanup: if (ret !=3D 0) { - VIR_FORCE_CLOSE(*ttymaster); + VIR_FORCE_CLOSE(*ttyprimary); g_free(*ttyName); *ttyName =3D NULL; } --=20 2.24.1 From nobody Fri Apr 19 04:42:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1592559658; cv=none; d=zohomail.com; s=zohoarc; b=TWl2CwO1McrjKZF9T+PKnby1wlmfxWoYijguJR83H6c8p7Ui/qXWN2I80qFCNBf2cHIJs2B5UafevwE0UQVYvoqpH/D46ZJhlYKh26lWv+Iu1xOaMjTZ7hUycT0cH2v7vKcXkisrnnYCtFInA5IicWCuwE6nVZxAbLQAgaoqdVs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592559658; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=x6imRBCevy3fnfT3/NT6ipIo3/ZMssfVFCo/kRIaTY0=; b=j8UymEWkUJ6ZhtlKm963RoKryrnYcqmjDDT5quGxRc+QLVK1GZWZC8qXVfUd/M773gwebCuBa3p2NgGYZqqIZI29pIMdCpTzzq7m8L3Zud42APChn/+uHg0yO/3FMh6E84lql6OWmpxeiGNYbCB57NfO9y9N9fQD3vfOa0yOF8A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1592559658392787.7284836089472; Fri, 19 Jun 2020 02:40:58 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-430-RGq2EnXfONeX1jlM57-wdg-1; Fri, 19 Jun 2020 05:40:40 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 787C08018AD; Fri, 19 Jun 2020 09:40:35 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5946C5BAC0; Fri, 19 Jun 2020 09:40:35 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 277DB1805313; Fri, 19 Jun 2020 09:40:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 05J9ePWM005017 for ; Fri, 19 Jun 2020 05:40:25 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2629671678; Fri, 19 Jun 2020 09:40:25 +0000 (UTC) Received: from catbus.gsslab.fab.redhat.com (mustard.gsslab.fab.redhat.com [10.33.8.112]) by smtp.corp.redhat.com (Postfix) with ESMTP id 884F071662; Fri, 19 Jun 2020 09:40:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592559657; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=x6imRBCevy3fnfT3/NT6ipIo3/ZMssfVFCo/kRIaTY0=; b=DMWK2iNhV/iHdtQ71KYQllZj5pCtz2wM+UxXwj1niiMlZciwST+ly1HRAQrBgeio/53bs0 ION37AVX7PXwnTzj7fBLAqF34Gw17BMtL1wZo7n3kYPM0xNbPk928U/ASgh50015+d6ZnU mGPQlhSIzq7b3DddQFJkQAeGlzjx0Fc= X-MC-Unique: RGq2EnXfONeX1jlM57-wdg-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH 19/23] docs: update link to the libvirt jenkins plugin Date: Fri, 19 Jun 2020 10:32:56 +0100 Message-Id: <20200619093300.2211535-20-berrange@redhat.com> In-Reply-To: <20200619093300.2211535-1-berrange@redhat.com> References: <20200619093300.2211535-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) The wiki page we currently link to is just a redirect for back compat. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- docs/apps.html.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/apps.html.in b/docs/apps.html.in index 629d740c28..c24717faa2 100644 --- a/docs/apps.html.in +++ b/docs/apps.html.in @@ -138,7 +138,7 @@ =20
    -
    Jenkins
    +
    Jenkins
    This plugin for Jenkins adds a way to control guest domains hosted on Xen or QEMU/KVM. You configure a Jenkins Slave, --=20 2.24.1 From nobody Fri Apr 19 04:42:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1592559656; cv=none; d=zohomail.com; s=zohoarc; b=a8UKlP9+N5IkO8rymzyi3yR8ru/K27ZrOdbtr+k3M656atBzscg2f2ywE56UNoVF9Z/rvqWe0zjr2lkhMA+ANqcw5NmSiqg9uyTPV4yIPtGyR8Pm4Hs3wHe2LxozhY4T6zkxrqOzHnGbS3+gSx88fc5h+qAAZQvsbUdcCeI6zSY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592559656; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=sRgdRwKahlDWE6hO0ypUJ6qw9i5GiLP7NHJl1xfP9ik=; b=ME0RnC5QBluOPRV4T9yVKoM6k4em7ZaHbKNp6ws77D4B2dvJsXzFmAKX0hcqFEhIuAZ0FtbZZ/QlSuFb4N84g/SWQfLS9RxqPv9VU5/xJTAR9cNdqr/LkUjZL2JBBKxCB/3PYGYU1/s+OEnume/Iu8HSwt9iqWEPInZowaY7yFk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1592559656602206.2281029428376; Fri, 19 Jun 2020 02:40:56 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-64-6lSQKjFePve_HC17RFJ9sA-1; Fri, 19 Jun 2020 05:40:50 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7763B872FEB; Fri, 19 Jun 2020 09:40:44 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 59B5D5C221; Fri, 19 Jun 2020 09:40:44 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 2B5B0833DD; Fri, 19 Jun 2020 09:40:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 05J9eQ7W005024 for ; Fri, 19 Jun 2020 05:40:26 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0966971686; Fri, 19 Jun 2020 09:40:26 +0000 (UTC) Received: from catbus.gsslab.fab.redhat.com (mustard.gsslab.fab.redhat.com [10.33.8.112]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6BFC571679; Fri, 19 Jun 2020 09:40:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592559655; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=sRgdRwKahlDWE6hO0ypUJ6qw9i5GiLP7NHJl1xfP9ik=; b=e8B4+DVSQ2RZIo0ZmbeD0QObJvt/vIGCF+IWLqmVwHKG1C+WvYMTVMYmlEBj0qWv6GdNgB tQQKH889jhiI4hKDLCfLSl93POc3TElQVCyGOQYTCYHYD3t0cfNgvzxtP52cjIo/19RWjc xPI04yXuZtQcOWaZkBRS+PDssmYmBj4= X-MC-Unique: 6lSQKjFePve_HC17RFJ9sA-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH 20/23] docs: remove use of the term 'slave' in Jenkins agent docs Date: Fri, 19 Jun 2020 10:32:57 +0100 Message-Id: <20200619093300.2211535-21-berrange@redhat.com> In-Reply-To: <20200619093300.2211535-1-berrange@redhat.com> References: <20200619093300.2211535-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Jenkins replaced use of the term 'slave' with 'agent' when describing its architecture. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- docs/apps.html.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/apps.html.in b/docs/apps.html.in index c24717faa2..c6d9a24fa7 100644 --- a/docs/apps.html.in +++ b/docs/apps.html.in @@ -141,9 +141,9 @@
    Jenkins
    This plugin for Jenkins adds a way to control guest domains hosted - on Xen or QEMU/KVM. You configure a Jenkins Slave, + on Xen or QEMU/KVM. You configure a Jenkins Agent, selecting the guest domain and hypervisor. When you need to build= a - job on a specific Slave, its guest domain is started, then the job= is + job on a specific Agent, its guest domain is started, then the job= is run. When the build process is finished, the guest domain is shut down, ready to be used again as required.
    --=20 2.24.1 From nobody Fri Apr 19 04:42:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1592559818; cv=none; d=zohomail.com; s=zohoarc; b=SgcfUftQQmHXddPP48yGoo6+pF3xz+wBqChvgJ1BoRCMAaku7dbCJNvWp8v7QmglY+He+pRpyO544KI4N0tLckHuw/MmdVn7+9bdWGscNg1NE4JM9W0mEobZFZqq89DKs8IPLZ79A3OUkfZBoy6P1FFl32VPZ1QhCYwv+ipXOmw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592559818; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=UmgiUysaIWZPkPhDxqv76+C9zxzIw4xMgVtTjTdX9ls=; b=mEGRZ4Tso6AFqf7/Dc6+yQcLN59MsRfih9bU1FnuZT7+S2NqC2VrddiqK9W/ZxBL9ydUk8sXIO5lR92zTX1Chfz5aJBd6DXnS+lcgcogbDxeyDFgTrIkbqM71PuS6u8En4zCZKulbDpqxrZrasc6p3KWTqbOBM8wiNQuGJ62Mso= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1592559818493255.32084445717067; Fri, 19 Jun 2020 02:43:38 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-176-eYAqDuQ6P4m933XqWml-HA-1; Fri, 19 Jun 2020 05:40:45 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D074B106B249; Fri, 19 Jun 2020 09:40:38 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AD81F10002B5; Fri, 19 Jun 2020 09:40:38 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 7D9F3180043C; Fri, 19 Jun 2020 09:40:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 05J9eSMS005041 for ; Fri, 19 Jun 2020 05:40:28 -0400 Received: by smtp.corp.redhat.com (Postfix) id 579E671689; Fri, 19 Jun 2020 09:40:28 +0000 (UTC) Received: from catbus.gsslab.fab.redhat.com (mustard.gsslab.fab.redhat.com [10.33.8.112]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5024471679; Fri, 19 Jun 2020 09:40:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592559817; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=UmgiUysaIWZPkPhDxqv76+C9zxzIw4xMgVtTjTdX9ls=; b=I/fOKSFP+Rlu2mD5HqIiQix12SUIMyg8ShwvDh6XOi5seyi1RjIPwBVUBkySF17EmyZWel aGPixTwka13AeLY9EhGRoaKZRvaM/VDetQ18lhyVy97wxpNK2XE33vXLL/4XpGpF54MiVa vck/pflSiy0FBZU6ZML2xgSzPo7OaMo= X-MC-Unique: eYAqDuQ6P4m933XqWml-HA-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH 21/23] conf: remove use of the terms 'master' and 'slave' in mndm config Date: Fri, 19 Jun 2020 10:32:58 +0100 Message-Id: <20200619093300.2211535-22-berrange@redhat.com> In-Reply-To: <20200619093300.2211535-1-berrange@redhat.com> References: <20200619093300.2211535-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) We can't change the attribute names in the public XML schema without breaking back compat, so the best we can do is replace the terms in our internal structs. Signed-off-by: Daniel P. Berrang=C3=A9 --- src/bhyve/bhyve_driver.c | 2 +- src/bhyve/bhyve_parse_command.c | 20 ++++++++++---------- src/conf/domain_conf.c | 24 ++++++++++++------------ src/conf/domain_conf.h | 4 ++-- src/util/virnetdevtap.c | 2 +- src/vbox/vbox_common.c | 4 ++-- 6 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c index b6204c7fb9..5a8be9fd0f 100644 --- a/src/bhyve/bhyve_driver.c +++ b/src/bhyve/bhyve_driver.c @@ -1072,7 +1072,7 @@ bhyveDomainOpenConsole(virDomainPtr dom, =20 chr =3D vm->def->serials[0]; =20 - if (virFDStreamOpenPTY(st, chr->source->data.nmdm.slave, + if (virFDStreamOpenPTY(st, chr->source->data.nmdm.secondary, 0, 0, O_RDWR) < 0) goto cleanup; =20 diff --git a/src/bhyve/bhyve_parse_command.c b/src/bhyve/bhyve_parse_comman= d.c index 76423730d9..3daf2572cb 100644 --- a/src/bhyve/bhyve_parse_command.c +++ b/src/bhyve/bhyve_parse_command.c @@ -290,8 +290,8 @@ bhyveParseBhyveLPCArg(virDomainDefPtr def, goto error; =20 chr->source->type =3D VIR_DOMAIN_CHR_TYPE_NMDM; - chr->source->data.nmdm.master =3D NULL; - chr->source->data.nmdm.slave =3D NULL; + chr->source->data.nmdm.primary =3D NULL; + chr->source->data.nmdm.secondary =3D NULL; chr->deviceType =3D VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL; =20 if (!STRPREFIX(param, "/dev/nmdm")) { @@ -301,24 +301,24 @@ bhyveParseBhyveLPCArg(virDomainDefPtr def, goto error; } =20 - chr->source->data.nmdm.master =3D g_strdup(param); - chr->source->data.nmdm.slave =3D g_strdup(chr->source->data.file.p= ath); + chr->source->data.nmdm.primary =3D g_strdup(param); + chr->source->data.nmdm.secondary =3D g_strdup(chr->source->data.fi= le.path); =20 - /* If the last character of the master is 'A', the slave will be '= B' + /* If the last character of the primary is 'A', the secondary will= be 'B' * and vice versa */ - last =3D strlen(chr->source->data.nmdm.master) - 1; + last =3D strlen(chr->source->data.nmdm.primary) - 1; switch (chr->source->data.file.path[last]) { case 'A': - chr->source->data.nmdm.slave[last] =3D 'B'; + chr->source->data.nmdm.secondary[last] =3D 'B'; break; case 'B': - chr->source->data.nmdm.slave[last] =3D 'A'; + chr->source->data.nmdm.secondary[last] =3D 'A'; break; default: virReportError(VIR_ERR_OPERATION_FAILED, - _("Failed to set slave for %s: last letter = not " + _("Failed to set secondary for %s: last let= ter not " "'A' or 'B'"), - NULLSTR(chr->source->data.nmdm.master)); + NULLSTR(chr->source->data.nmdm.primary)); goto error; } =20 diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index e9336fd72d..2e272c44ea 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -2596,8 +2596,8 @@ virDomainChrSourceDefClear(virDomainChrSourceDefPtr d= ef) break; =20 case VIR_DOMAIN_CHR_TYPE_NMDM: - VIR_FREE(def->data.nmdm.master); - VIR_FREE(def->data.nmdm.slave); + VIR_FREE(def->data.nmdm.primary); + VIR_FREE(def->data.nmdm.secondary); break; =20 case VIR_DOMAIN_CHR_TYPE_UDP: @@ -2671,8 +2671,8 @@ virDomainChrSourceDefCopy(virDomainChrSourceDefPtr de= st, break; =20 case VIR_DOMAIN_CHR_TYPE_NMDM: - dest->data.nmdm.master =3D g_strdup(src->data.nmdm.master); - dest->data.nmdm.slave =3D g_strdup(src->data.nmdm.slave); + dest->data.nmdm.primary =3D g_strdup(src->data.nmdm.primary); + dest->data.nmdm.secondary =3D g_strdup(src->data.nmdm.secondary); =20 break; } @@ -2724,8 +2724,8 @@ virDomainChrSourceDefIsEqual(const virDomainChrSource= Def *src, return STREQ_NULLABLE(src->data.file.path, tgt->data.file.path); break; case VIR_DOMAIN_CHR_TYPE_NMDM: - return STREQ_NULLABLE(src->data.nmdm.master, tgt->data.nmdm.master= ) && - STREQ_NULLABLE(src->data.nmdm.slave, tgt->data.nmdm.slave); + return STREQ_NULLABLE(src->data.nmdm.primary, tgt->data.nmdm.prima= ry) && + STREQ_NULLABLE(src->data.nmdm.secondary, tgt->data.nmdm.second= ary); break; case VIR_DOMAIN_CHR_TYPE_UDP: return STREQ_NULLABLE(src->data.udp.bindHost, tgt->data.udp.bindHo= st) && @@ -6220,13 +6220,13 @@ virDomainChrSourceDefValidate(const virDomainChrSou= rceDef *src_def, break; =20 case VIR_DOMAIN_CHR_TYPE_NMDM: - if (!src_def->data.nmdm.master) { + if (!src_def->data.nmdm.primary) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Missing master path attribute for nmdm devic= e")); return -1; } =20 - if (!src_def->data.nmdm.slave) { + if (!src_def->data.nmdm.secondary) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Missing slave path attribute for nmdm device= ")); return -1; @@ -13253,8 +13253,8 @@ virDomainChrSourceDefParseXML(virDomainChrSourceDef= Ptr def, break; =20 case VIR_DOMAIN_CHR_TYPE_NMDM: - def->data.nmdm.master =3D virXMLPropString(cur, "master"); - def->data.nmdm.slave =3D virXMLPropString(cur, "slave"); + def->data.nmdm.primary =3D virXMLPropString(cur, "master"); + def->data.nmdm.secondary =3D virXMLPropString(cur, "slave"= ); break; =20 case VIR_DOMAIN_CHR_TYPE_LAST: @@ -26853,8 +26853,8 @@ virDomainChrSourceDefFormat(virBufferPtr buf, =20 case VIR_DOMAIN_CHR_TYPE_NMDM: virBufferEscapeString(buf, "data.nmdm.master); - virBufferEscapeString(buf, "slave=3D'%s'/>\n", def->data.nmdm.slav= e); + def->data.nmdm.primary); + virBufferEscapeString(buf, "slave=3D'%s'/>\n", def->data.nmdm.seco= ndary); break; =20 case VIR_DOMAIN_CHR_TYPE_UDP: diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 41715c75f2..00a0e02cd1 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1201,8 +1201,8 @@ struct _virDomainChrSourceDef { int append; /* enum virTristateSwitch */ } file; /* pty, file, pipe, or device */ struct { - char *master; - char *slave; + char *primary; + char *secondary; } nmdm; struct { char *host; diff --git a/src/util/virnetdevtap.c b/src/util/virnetdevtap.c index 7bd30ea0f9..6272e03f42 100644 --- a/src/util/virnetdevtap.c +++ b/src/util/virnetdevtap.c @@ -687,7 +687,7 @@ int virNetDevTapCreateInBridgePort(const char *brname, =20 /* We need to set the interface MAC before adding it * to the bridge, because the bridge assumes the lowest - * MAC of all enslaved interfaces & we don't want it + * MAC of all member interfaces & we don't want it * seeing the kernel allocate random MAC for the TAP * device before we set our static MAC. */ diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index 15f8eb074a..493639d6d9 100644 --- a/src/vbox/vbox_common.c +++ b/src/vbox/vbox_common.c @@ -3344,8 +3344,8 @@ vboxDumpDisks(virDomainDefPtr def, vboxDriverPtr data= , IMachine *machine) switch ((enum StorageBus) storageBus) { case StorageBus_IDE: disk->bus =3D VIR_DOMAIN_DISK_BUS_IDE; - disk->info.addr.drive.bus =3D devicePort; /* primary, secondar= y */ - disk->info.addr.drive.unit =3D deviceSlot; /* master, slave */ + disk->info.addr.drive.bus =3D devicePort; + disk->info.addr.drive.unit =3D deviceSlot; =20 break; case StorageBus_SATA: --=20 2.24.1 From nobody Fri Apr 19 04:42:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1592559723; cv=none; d=zohomail.com; s=zohoarc; b=CRGUt0FurrjqEte9ZsEU9hCnRPxKxwsd3DlUkTDbDU2d6b1uCgeI+gXffXOamPXhFQUtHbfVDpB2K5DG4XT2g37zCXe63hX9GIXS1VZLPSPVRqaLg+A7dXTnOQuUQ/r+EVlcX7vP/P1h4DRfOH3/9Cz+MAvpcvOPwqUVYTpnKD0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592559723; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Q+1akdmc4ypnxOTJi7EvfmDsiaQc5oDPa1pAf7GZpjQ=; b=VW/++yQYbwiPTRIu2JFsy9VgvGFVUGdh4TajS4PkjiR1W0Vp5UoPlH5RTPLYtDOe+DOb52jQdWMrHJyuS4Egd0idxaWxbXM114/PPELsMD/xhWXAYlw3cDQ8RPvo/m5kYcN5XCwkRpbS5O0yTPTo4GldlOuwEPAYWUgEpqvWPwo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1592559723452336.3299106760737; Fri, 19 Jun 2020 02:42:03 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-361-iZx9nf-SMWaEmoTpltHIiQ-1; Fri, 19 Jun 2020 05:40:47 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 80657106B24A; Fri, 19 Jun 2020 09:40:41 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5F1AB500DE; Fri, 19 Jun 2020 09:40:41 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 2C47418006D3; Fri, 19 Jun 2020 09:40:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 05J9eVB8005064 for ; Fri, 19 Jun 2020 05:40:31 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9B78D71679; Fri, 19 Jun 2020 09:40:31 +0000 (UTC) Received: from catbus.gsslab.fab.redhat.com (mustard.gsslab.fab.redhat.com [10.33.8.112]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9E0EF71685; Fri, 19 Jun 2020 09:40:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592559722; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Q+1akdmc4ypnxOTJi7EvfmDsiaQc5oDPa1pAf7GZpjQ=; b=UQZSUUYHW05dem1L8z7905V09JmJiQq7X5UjLElUo3gurwgOvXcPji+OwQA/BTgosYS+tC hk4xvjXV7Qh8JDUfzBYu9vamPSomn8iL1h8Da8QnSCIYnOO3LpCCiZxT9+ZzmMkG8Qdt1y m9c5/eZOAoBqasTfstz2ydzYMNFecwQ= X-MC-Unique: iZx9nf-SMWaEmoTpltHIiQ-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH 22/23] lxc: replace use of term 'slave' filesystem mount setup Date: Fri, 19 Jun 2020 10:32:59 +0100 Message-Id: <20200619093300.2211535-23-berrange@redhat.com> In-Reply-To: <20200619093300.2211535-1-berrange@redhat.com> References: <20200619093300.2211535-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Refer to the notion of mount propagation instead which describes the actual behaviour more clearly. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- src/lxc/lxc_controller.c | 6 +++--- src/util/virprocess.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index 59b44dde1f..89f9773b2c 100644 --- a/src/lxc/lxc_controller.c +++ b/src/lxc/lxc_controller.c @@ -2116,9 +2116,9 @@ virLXCControllerSetupPrivateNS(void) * * Thus we call unshare(CLONE_NS) so that we can see * the guest's new /dev/pts, without it becoming - * visible to the host OS. We also put the root FS - * into slave mode, just in case it was currently - * marked as shared + * visible to the host OS. We also disable mount + * propagation out of the root FS, in case it was + * currently allowing bi-directional propagation. */ =20 return virProcessSetupPrivateMountNS(); diff --git a/src/util/virprocess.c b/src/util/virprocess.c index afb1f9b79f..a9afa2e665 100644 --- a/src/util/virprocess.c +++ b/src/util/virprocess.c @@ -1288,7 +1288,7 @@ virProcessSetupPrivateMountNS(void) =20 if (mount("", "/", "none", MS_SLAVE|MS_REC, NULL) < 0) { virReportSystemError(errno, "%s", - _("Failed to switch root mount into slave mod= e")); + _("Failed disable mount propagation out of th= e root filesystem")); return -1; } =20 --=20 2.24.1 From nobody Fri Apr 19 04:42:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1592559795; cv=none; d=zohomail.com; s=zohoarc; b=TSwq25Ql8x+KOCD4bouE42vjuyktC7q5GJjnWzsxq5/fseXsDMZ+yJobMYf7t+Pz/MMRsZ+89XUmfkO/Mhps171I41YMFOR6sNJLtC9UHrYMRh1hCc2GxiPrkdm9wWvcM6ifb6batsAXwJR8Obij8sZO76yDDq0f+5iJn3xUZDQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592559795; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=83hJUy/xopyylmQeFUCvciztXRTR8zwjeV3I/lsHCbQ=; b=nC85tbNQZ39AQs95Rm2eY2SoFQ8fpYw3R6yOY3Ia+HCIOpPqs1tNZWvPxXStVpL4335diiEzbO8ci77TKdo7HCGdu3Rh0kas3GV1kACtH2RU/KgdqrPBJRJcpqt+LVh9yZcPWDkbdV0ZrWou+GkDBilzn5wim462rLVZJbS9pKA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1592559795658118.92216810427487; Fri, 19 Jun 2020 02:43:15 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-345-vQ89HBNOMGeVe0KD86qWmg-1; Fri, 19 Jun 2020 05:40:50 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D18E6107B76B; Fri, 19 Jun 2020 09:40:43 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AE3631002397; Fri, 19 Jun 2020 09:40:43 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 7DD4B1805317; Fri, 19 Jun 2020 09:40:43 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 05J9ebFc005088 for ; Fri, 19 Jun 2020 05:40:37 -0400 Received: by smtp.corp.redhat.com (Postfix) id B24B171686; Fri, 19 Jun 2020 09:40:37 +0000 (UTC) Received: from catbus.gsslab.fab.redhat.com (mustard.gsslab.fab.redhat.com [10.33.8.112]) by smtp.corp.redhat.com (Postfix) with ESMTP id E187571685; Fri, 19 Jun 2020 09:40:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592559794; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=83hJUy/xopyylmQeFUCvciztXRTR8zwjeV3I/lsHCbQ=; b=Nbz04ZxWD+dhVH77xeZtzYMuT9qJH88qqls5721ZD3PZirrnqXKgpk5WEC/u6ItE9Xq/NT j0yzTFdKxLooKcHoGwzBvsWYBfw4Htq2iwe9tcr2gAeRblNWpF7DNFNXYZaHk4DrFk3rBh v6agifuHJxVQQaKcriTvNgOmX/B8eqE= X-MC-Unique: vQ89HBNOMGeVe0KD86qWmg-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH 23/23] build: add syntax-check rules for undesirable terms Date: Fri, 19 Jun 2020 10:33:00 +0100 Message-Id: <20200619093300.2211535-24-berrange@redhat.com> In-Reply-To: <20200619093300.2211535-1-berrange@redhat.com> References: <20200619093300.2211535-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) We don't check for "master", because there are too many cases that we're not trying to eliminate at this time. Signed-off-by: Daniel P. Berrang=C3=A9 --- build-aux/syntax-check.mk | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index 2e49b5172e..50b15e114a 100644 --- a/build-aux/syntax-check.mk +++ b/build-aux/syntax-check.mk @@ -1922,6 +1922,16 @@ sc_prohibit_path_max_allocation: halt=3D'Avoid stack allocations of size PATH_MAX' \ $(_sc_search_regexp) =20 +sc_prohibit_whitelist_blacklist: + @prohibit=3D'(white-?list|black-?list)' \ + halt=3D'Avoid the terms "whitelist" and "blacklist"' \ + $(_sc_search_regexp) + +sc_prohibit_slave: + @prohibit=3D'slave' \ + halt=3D'Avoid the term "slave"' \ + $(_sc_search_regexp) + ifneq ($(_gl-Makefile),) syntax-check: spacing-check test-wrap-argv \ prohibit-duplicate-header mock-noinline group-qemu-caps \ @@ -2128,3 +2138,9 @@ exclude_file_name_regexp--sc_prohibit_backslash_align= ment =3D \ =20 exclude_file_name_regexp--sc_prohibit_select =3D \ ^build-aux/syntax-check\.mk|src/util/vireventglibwatch\.c$$ + +exclude_file_name_regexp--sc_prohibit_whitelist_blacklist =3D \ + ^(build-aux/syntax-check\.mk|po/.*\.pot?|src/util/virkmod\.c|src/qemu/qe= mu_domain\.c)$$ + +exclude_file_name_regexp--sc_prohibit_slave =3D \ + ^build-aux/syntax-check\.mk|po/.*\.pot?|tests/qemucapabilitiesdata/.*\.r= eplies|docs/apps.html.in|tests/bhyve.*|docs/drvbhyve.html.in|docs/formatdom= ain.html.in|docs/schemas/domaincommon.rng|src/conf/domain_conf\.c|src/inter= face/interface_backend_udev\.c|src/security/apparmor/usr\.sbin\.libvirtd\.i= n$$ --=20 2.24.1