From nobody Tue Feb 10 02:54:54 2026 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; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=canonical.com ARC-Seal: i=1; a=rsa-sha256; t=1596459316; cv=none; d=zohomail.com; s=zohoarc; b=WUl11qrzn2oMImb3zlGLrfQ7j7M9aVcNldnU++zLYnJPUzTOUJZcdhZjE1CIIQJlNEl70JdLzk4MnHev1QXJkemvhdSjWcSY0jeWe/WcpdDjxCV0/rY9HJd2w+KiNUklZ1we0wW37F/snu9kPexxHryh+AcHlkUradjynPLVUOE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1596459316; h=Content-Type:Content-Transfer-Encoding:Cc: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=8Wz1B78Zm4avrOXKylf4kNIMmmOkvFCxZVZWIRHugHg=; b=lWV5rtAKxmp4XPOTLm53uaFlYm5Rxt9JH8nexxDyuD8voDjBufZqqIfMJadW6z/F59Vq4kkYBiQ3DYoKfZn60ZZZcGdNuVPaO2vXMkAV2yuySA2MYs3bciFxE7BzG4UZPr4lUyVSxwQNlYCS7RAw/GzOznKShMArNWt3k78LdoQ= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail 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 159645931685793.80152672526276; Mon, 3 Aug 2020 05:55:16 -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-299-NE7DQC4fMiy6R4e8YAbu1g-1; Mon, 03 Aug 2020 08:55:13 -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 9B23980047B; Mon, 3 Aug 2020 12:55:07 +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 7B0B5171EB; Mon, 3 Aug 2020 12:55:07 +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 208BE9A112; Mon, 3 Aug 2020 12:55:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 073Cpix4006862 for ; Mon, 3 Aug 2020 08:51:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id 78F6920234B2; Mon, 3 Aug 2020 12:51:44 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 744B420234B0 for ; Mon, 3 Aug 2020 12:51:41 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5AC608A1997 for ; Mon, 3 Aug 2020 12:51:41 +0000 (UTC) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-497-D6oXKWfVMDmd8jcEz9KHMA-1; Mon, 03 Aug 2020 08:51:39 -0400 Received: from 2.general.paelzer.uk.vpn ([10.172.196.173] helo=Keschdeichel.fritz.box) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1k2Zf7-0004mo-0s; Mon, 03 Aug 2020 12:33:53 +0000 X-MC-Unique: NE7DQC4fMiy6R4e8YAbu1g-1 X-MC-Unique: D6oXKWfVMDmd8jcEz9KHMA-1 From: Christian Ehrhardt To: libvir-list@redhat.com Subject: [PATCH 5/8] apparmor: qemu access to @{PROC}/*/auxv for hw_cap Date: Mon, 3 Aug 2020 14:33:43 +0200 Message-Id: <20200803123346.3987430-6-christian.ehrhardt@canonical.com> In-Reply-To: <20200803123346.3987430-1-christian.ehrhardt@canonical.com> References: <20200803123346.3987430-1-christian.ehrhardt@canonical.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.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Cc: =?UTF-8?q?Guido=20G=C3=BCnther?= , Jamie Strandboge , Andrea Bolognani , Stefan Bader , Christian Ehrhardt 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-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Stefan Bader On some architectures (ppc, s390x, sparc, arm) qemu will read auxv to detect hardware capabilities via qemu_getauxval. Allow that access read-only for the entry owned by the current qemu process. Signed-off-by: Christian Ehrhardt Signed-off-by: Stefan Bader --- src/security/apparmor/libvirt-qemu | 1 + 1 file changed, 1 insertion(+) diff --git a/src/security/apparmor/libvirt-qemu b/src/security/apparmor/lib= virt-qemu index b132cf0226..25eff20b82 100644 --- a/src/security/apparmor/libvirt-qemu +++ b/src/security/apparmor/libvirt-qemu @@ -33,6 +33,7 @@ owner @{PROC}/@{pid}/task/@{tid}/comm rw, @{PROC}/sys/kernel/cap_last_cap r, @{PROC}/sys/vm/overcommit_memory r, + owner @{PROC}/*/auxv r, =20 # For hostdev access. The actual devices will be added dynamically /sys/bus/usb/devices/ r, --=20 2.27.0