From nobody Fri Apr 19 14:32:49 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1652362083845931.5105597094647; Thu, 12 May 2022 06:28:03 -0700 (PDT) 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-466-Q6pmleImOXOm58o8MxDBGA-1; Thu, 12 May 2022 09:27:13 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0073A38349C2; Thu, 12 May 2022 13:27:09 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 314172026D6A; Thu, 12 May 2022 13:27:07 +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 DF494193220C; Thu, 12 May 2022 13:27:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id E3B8F194975B for ; Wed, 11 May 2022 22:09:24 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id D0B6FC2810D; Wed, 11 May 2022 22:09:24 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CD2A2C2810A for ; Wed, 11 May 2022 22:09:24 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B287C185A7A4 for ; Wed, 11 May 2022 22:09:24 +0000 (UTC) Received: from mail-qt1-f169.google.com (mail-qt1-f169.google.com [209.85.160.169]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-455-S49Bee_GPI-7Q3mi6LR6Mg-1; Wed, 11 May 2022 18:09:22 -0400 Received: by mail-qt1-f169.google.com with SMTP id x9so3075739qts.6 for ; Wed, 11 May 2022 15:09:22 -0700 (PDT) Received: from alchemist.. ([2607:fb90:f80b:270b:7df4:8c6c:c9af:f07c]) by smtp.gmail.com with ESMTPSA id u18-20020ac858d2000000b002f39b99f696sm2098370qta.48.2022.05.11.15.09.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 May 2022 15:09:21 -0700 (PDT) X-MC-Unique: Q6pmleImOXOm58o8MxDBGA-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: S49Bee_GPI-7Q3mi6LR6Mg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=27p9QPEl5JzyLsDDTy168vza4hYLkz3ZTpisJ/jHuho=; b=MiX7dz00nihGhKOS0Yab+5Pp4g5jhx5hnWUf8bw+HHs3IcE/o0QZD5xIKa7D/Emrqj 8pDLSi+hih2jUqqtIEq40tUev1u28yX0g9TvnKd90k0X5wiiaD2f0n3RSSED7ZKrzqDG hxTl1PLe62lzYanOkM2m1RQ6OsUax8U7s6CraB+sxLfQhOaM7n7JwA7/0u8EsKsbA0mR Zkysc/blNI973CbHjPSFEoWItZ4wHky2wbWdged+ay99ibNFeMTYPI2E4G9obQbmOUVC QHjh5LHf/EE1d/CTleBMWLxgenjVkNrm5rkZ3xPlrXJWpu3xIlM1ZpE15ntjFWOMSLho sgAg== X-Gm-Message-State: AOAM531oiyVUOwO86yjawGrcRb7kxC0k8YPQuZ3MvScOAUbvyzQU2sWh JC68M+2aTLNU/OOmVICLNovnlXGXmWM= X-Google-Smtp-Source: ABdhPJwiaYhsbsNcbiRIbni06t77x6mG3GDGb+JczpODKAE1apvz9Ky0CFz8kAs+uTUe9W0C8lHS+A== X-Received: by 2002:a05:622a:15c4:b0:2f3:bd4b:80fa with SMTP id d4-20020a05622a15c400b002f3bd4b80famr25597799qty.21.1652306961992; Wed, 11 May 2022 15:09:21 -0700 (PDT) From: Max Goodhart To: libvir-list@redhat.com Subject: [PATCH] Allow VM to read sysfs PCI config, revision files Date: Wed, 11 May 2022 15:08:39 -0700 Message-Id: <20220511220839.5632-1-c@chromakode.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 X-Mailman-Approved-At: Thu, 12 May 2022 13:27:05 +0000 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: Max Goodhart , Max Goodhart Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 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-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1652362085759100001 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Max Goodhart This fixes a blank screen when viewing a VM with virtio graphics and gl-accelerated Spice display on Ubuntu 22.04 / libvirt 8.0.0 / qemu 6.2. Without these AppArmor permissions, the libvirt error log contains repetitions of: qemu_spice_gl_scanout_texture: failed to get fd for texture This appears to be similar to this GNOME Boxes issue: https://gitlab.gnome.org/GNOME/gnome-boxes/-/issues/586 Signed-off-by: Max Goodhart --- src/security/virt-aa-helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index 1f1cce8b3d..b314d2a059 100644 --- a/src/security/virt-aa-helper.c +++ b/src/security/virt-aa-helper.c @@ -1316,7 +1316,7 @@ get_files(vahControl * ctl) virBufferAddLit(&buf, " \"/dev/nvidiactl\" rw,\n"); virBufferAddLit(&buf, " # Probe DRI device attributes\n"); virBufferAddLit(&buf, " \"/dev/dri/\" r,\n"); - virBufferAddLit(&buf, " \"/sys/devices/**/{uevent,vendor,device,s= ubsystem_vendor,subsystem_device}\" r,\n"); + virBufferAddLit(&buf, " \"/sys/devices/**/{uevent,vendor,device,s= ubsystem_vendor,subsystem_device,config,revision}\" r,\n"); virBufferAddLit(&buf, " # dri libs will trigger that, but t is no= t requited and DAC would deny it anyway\n"); virBufferAddLit(&buf, " deny \"/var/lib/libvirt/.cache/\" w,\n"); } --=20 2.34.1