From nobody Wed May 8 22:36:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 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=1678215772; cv=none; d=zohomail.com; s=zohoarc; b=QGq48/dF+DSVYwyxV4fsb1oJ+zKR8UDy0q53wlAKUACKLzxuFZx37eyAgxuc7amZ4JtEyCWvxLj4Ap0TYjDJYroFj4ZUKNR9OoG8gkourMP6N7Gm6qg504iXUrHYLH4tj0m+L6/l3R/X/2FhwlGTNzUCVlulLh80MvylgjgLKrU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678215772; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=IfM9q0Ehk4Zt8K2xakRxl3RFjh7nE5TMZmCQibNrwbM=; b=LZzrlsrogrXgfT6AQGhQkgbpA/p9/stgsmc0hxfDPusQ27KCR7a8EIboC9PDMKB08mb/dPmFlOU5luMVqvNin0DMCyM2LJrxQ4Wy3dDcslPtAa7gs3JDglqt/2w/dbdhepTzGlR4Q+zLNQReMRM/NR/1KSYqWUy3xkzAJd6JNZw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1678215772775825.3654560919493; Tue, 7 Mar 2023 11:02:52 -0800 (PST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-313-uqrgVPC2NJGAK-p8pj1qGA-1; Tue, 07 Mar 2023 14:02:47 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 664E23804500; Tue, 7 Mar 2023 19:02:43 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5C658C15BAD; Tue, 7 Mar 2023 19:02:41 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 3681D19465A3; Tue, 7 Mar 2023 19:02:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 06EEF1946594 for ; Tue, 7 Mar 2023 19:02:39 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id B87CB14171C4; Tue, 7 Mar 2023 19:02:39 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.45.227.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1C540140EBF4; Tue, 7 Mar 2023 19:02:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678215771; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=IfM9q0Ehk4Zt8K2xakRxl3RFjh7nE5TMZmCQibNrwbM=; b=LO+W76t6lWIWy7QmgEK+DRC2bF5N7kapKcrU7WLmlLYMjFVbyD+KGM9ldKZ8rwOS3daJqg WbX8jrEwp7no6t9jzTSDl7lbVfTe0EtXpYVUpJ8wUzXhSiremQ0s2lLRA09TMMHYZly9yE 6brIgzJBfEL/PJEaIm2uW5bQxu4uodI= X-MC-Unique: uqrgVPC2NJGAK-p8pj1qGA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH] apparmor: Enable passt support Date: Tue, 7 Mar 2023 20:02:37 +0100 Message-Id: <20230307190237.521986-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sbrivio@redhat.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1678215773094100001 Content-Type: text/plain; charset="utf-8"; x-default="true" passt provides an AppArmor abstraction that covers all the inner details of its operation, so we can simply import that and add the libvirt-specific parts on top: namely, passt needs to be able to create a socket and pid file, while the libvirt daemon needs to be able to kill passt. Signed-off-by: Andrea Bolognani Signed-off-by: Stefano Brivio --- src/security/apparmor/libvirt-qemu | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/security/apparmor/libvirt-qemu b/src/security/apparmor/lib= virt-qemu index 9af1333b22..44056b5f14 100644 --- a/src/security/apparmor/libvirt-qemu +++ b/src/security/apparmor/libvirt-qemu @@ -185,6 +185,21 @@ /usr/{lib,lib64}/libswtpm_libtpms.so mr, /usr/lib/@{multiarch}/libswtpm_libtpms.so mr, =20 + # support for passt network back-end + /usr/bin/passt Cx -> passt, + + profile passt { + /usr/bin/passt r, + + signal (receive) set=3D("term") peer=3D/usr/sbin/libvirtd, + signal (receive) set=3D("term") peer=3Dlibvirtd, + signal (receive) set=3D("term") peer=3Dvirtqemud, + + owner /{,var/}run/libvirt/qemu/passt/* rw, + + include if exists + } + # for save and resume /{usr/,}bin/dash rmix, /{usr/,}bin/dd rmix, --=20 2.39.2