From nobody Sat Apr 27 02:09:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.74 as permitted sender) client-ip=63.128.21.74; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-74.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.74 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=1584979859; cv=none; d=zohomail.com; s=zohoarc; b=LnZ5FgFjKtsbdS9e7rTb31PbrhK91YjzAVzgmkzrq53IzJ13IIdpKNsgLpFiK6IoPQ3+eEP3VgZsop0fWziFGVLlktAjK//uC4uFTTxbDloiqaym3WYzk6K1cxtSVyeF+zNavphNzVWwrctRBxLiqB6XsiJdUN5amuSKVscsWr4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584979859; 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=EPQ314nk9dsbPAlVJV5gR7QBXBD4RdNKhAyn0NCn3Wg=; b=DIrfsbHT79KqLzmLAb/HbJzwEsyEtIeUl+TgMpLB9VNuiG60ld6gNkwOhNbfrq7ExhEQ1lDjQACy16XuUkwBZSdsWC/cdVxEsVZ+blRc/1z64n/fsnULiywOwoWA4XQ7dDuVjO9fhCxbrwFTvH3Rp+xItOwUKlisDLVEp0VidjI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.74 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-74.mimecast.com (us-smtp-delivery-74.mimecast.com [63.128.21.74]) by mx.zohomail.com with SMTPS id 1584979859960749.8131354344104; Mon, 23 Mar 2020 09:10:59 -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-76-BZK-bV_bPBar_mwTSHYI9g-1; Mon, 23 Mar 2020 12:10:55 -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 58561800D54; Mon, 23 Mar 2020 16:10:50 +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 30FA65C1D8; Mon, 23 Mar 2020 16:10:50 +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 697CB86382; Mon, 23 Mar 2020 16:10:47 +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 02NGAiP1004965 for ; Mon, 23 Mar 2020 12:10:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6EF579B932; Mon, 23 Mar 2020 16:10:44 +0000 (UTC) Received: from lpt.redhat.com (unknown [10.40.208.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9BDE49B931 for ; Mon, 23 Mar 2020 16:10:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584979858; 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=EPQ314nk9dsbPAlVJV5gR7QBXBD4RdNKhAyn0NCn3Wg=; b=ARZHMK4IhjQbR/8YxxV0iXfNc3418O3BNbxQrJW9R9nsP/kPha4DegqnqhVtnLchpPokf0 3vQYKwkHv5t8/f31C0st7MilY8JU+O9KO4h4BHqi1tvncW5gmTT9PpJ94NsBTnbouvVrD0 hwQH3ce8SYYy0GFL9bLdPIsgPhMjGXk= X-MC-Unique: BZK-bV_bPBar_mwTSHYI9g-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 1/4] qemu: virtiofs: kill the whole process group when stopping Date: Mon, 23 Mar 2020 17:10:34 +0100 Message-Id: <2999e56d7bf9b9899870ca7d3d327470c1bf7d4d.1584979790.git.jtomko@redhat.com> In-Reply-To: References: 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-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" After startup, virtiofds forks itself to drop its privileges. Kill the whole process group instead of just the parent. https://bugzilla.redhat.com/show_bug.cgi?id=3D1808697 Signed-off-by: J=C3=A1n Tomko Reported-by: Andrew Jones --- src/qemu/qemu_virtiofs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_virtiofs.c b/src/qemu/qemu_virtiofs.c index d579ce1d33..d6159206eb 100644 --- a/src/qemu/qemu_virtiofs.c +++ b/src/qemu/qemu_virtiofs.c @@ -285,7 +285,7 @@ qemuVirtioFSStop(virQEMUDriverPtr driver G_GNUC_UNUSED, =20 rc =3D virPidFileReadPathIfAlive(pidfile, &pid, NULL); if (rc >=3D 0 && pid !=3D (pid_t) -1) - virProcessKillPainfully(pid, true); + virProcessKillPainfully(-pid, true); =20 if (unlink(pidfile) < 0 && errno !=3D ENOENT) { --=20 2.25.1 From nobody Sat Apr 27 02:09:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.74 as permitted sender) client-ip=63.128.21.74; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-74.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.74 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=1584979875; cv=none; d=zohomail.com; s=zohoarc; b=UD60vnmtMwl/OTd6QHsw9uG1muydk0Hb7ACmhttkxIOywfj/oxN+cc4vkxLsJ/dDmFmRHt020jyGqPNQmtxc4a3ao8h4CF6SdfkPAMW+fw/TuxZjbjf4WsBoq/xmnHU8S56crRT+dNcGjXz/gzE+oSWF+vSxJ8CVIW/BG5eEyT0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584979875; 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=y4zoDWRa0R1yPNvnrWyITWHyRKBvfgSlSJhvOV4a+88=; b=F6KijopERakd9WwmwgSNeCYypnEmpdrC2KRpAqelft32C0pcK80iF8i9l/7ozHFj6S6/R/IwuFPhbaGfUjF780f1ZMjOUzhZZ9+1vnXzW6+T1ZBGWdJVCkwg1MJtEDos8it62WGn9ZlJlboN/dXV4ZAIFCE9JvK+spdI4sXi5pc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.74 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-74.mimecast.com (us-smtp-delivery-74.mimecast.com [63.128.21.74]) by mx.zohomail.com with SMTPS id 1584979875298299.8617079444814; Mon, 23 Mar 2020 09:11: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-426-otAc_OAROMivt1-q--aYsw-1; Mon, 23 Mar 2020 12:11:09 -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 BDC3E477; Mon, 23 Mar 2020 16:11:03 +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 712D4196AE; Mon, 23 Mar 2020 16:11:03 +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 03D1718089D0; Mon, 23 Mar 2020 16:11:03 +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 02NGAjjh004977 for ; Mon, 23 Mar 2020 12:10:45 -0400 Received: by smtp.corp.redhat.com (Postfix) id A76759B931; Mon, 23 Mar 2020 16:10:45 +0000 (UTC) Received: from lpt.redhat.com (unknown [10.40.208.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id DE6FD9B934 for ; Mon, 23 Mar 2020 16:10:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584979874; 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=y4zoDWRa0R1yPNvnrWyITWHyRKBvfgSlSJhvOV4a+88=; b=Q1KFUbq1rKeWWYVchlKNGjiofCD9p11vMLsP5FJJaqW/z68vUjUgyxFmAc1d1rbdgfnYhP 6E9Nh6JVOZjR/laVzTPYazaDy++T9YyGOUzVY/LWZPMhocneJ8c3EG6ho4K2MKBjfOFGpB CPq7YS2gnZeOIuKfQnfnnTrh+7SAZiM= X-MC-Unique: otAc_OAROMivt1-q--aYsw-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 2/4] qemu: virtiofs: shorten pid filename Date: Mon, 23 Mar 2020 17:10:35 +0100 Message-Id: <7cbea0bf9c3725e218ef3fe105b8d7996e429df6.1584979790.git.jtomko@redhat.com> In-Reply-To: References: 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-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" There is no need to repeat the shortName, since it's already present in the directory path. Also use just 'fs' instead of 'virtiofsd'. Signed-off-by: J=C3=A1n Tomko Suggested-by: Andrea Bolognani --- src/qemu/qemu_virtiofs.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/qemu/qemu_virtiofs.c b/src/qemu/qemu_virtiofs.c index d6159206eb..2e3535873d 100644 --- a/src/qemu/qemu_virtiofs.c +++ b/src/qemu/qemu_virtiofs.c @@ -42,13 +42,9 @@ qemuVirtioFSCreatePidFilename(virDomainObjPtr vm, const char *alias) { qemuDomainObjPrivatePtr priv =3D vm->privateData; - g_autofree char *shortName =3D NULL; g_autofree char *name =3D NULL; =20 - if (!(shortName =3D virDomainDefGetShortName(vm->def))) - return NULL; - - name =3D g_strdup_printf("%s-%s-virtiofsd", shortName, alias); + name =3D g_strdup_printf("%s-fs", alias); =20 return virPidFileBuildPath(priv->libDir, name); } --=20 2.25.1 From nobody Sat Apr 27 02:09:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.74 as permitted sender) client-ip=63.128.21.74; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-74.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.74 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=1584979871; cv=none; d=zohomail.com; s=zohoarc; b=OaXx+IJAFAgIpH2sMWpxIVXgdpVV8AH6aQxcQ+LKh7r3DYTKqKVKI7M/VWuGS3FvtgzugS2PMJz21a5UviGQcDPCcNyWGDZb4WvhnazYC7mYkk9mV4E4U+uEDjlvr3w6+ZAUqsW6xDydP7yT89G55gcE771moWOqe1KFFlLdtxo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584979871; 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=7mlhTn2QUnP6al5XvrgTnmknb7oAS6yp+KY4cp+mprQ=; b=Ydi1VbI3hWpDmS8+6wCbkmhHC1nbQkullDE1U0OTOagmEzh88kyiaimt9bnCpNdY9MXOxDikL/gurpl2OqanieJSoQA+JyOkxvDJe6JRZFtmIOpskkUsFhT8YSVJR50yTAueI017gZ0PmAO42Nl1wNx9bL5+/JuQBgXjFzPvZlM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.74 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-74.mimecast.com (us-smtp-delivery-74.mimecast.com [63.128.21.74]) by mx.zohomail.com with SMTPS id 1584979871503249.60131043789113; Mon, 23 Mar 2020 09:11:11 -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-444-DLdVETBGMvaNaxchz-snPg-1; Mon, 23 Mar 2020 12:11:07 -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 2EFEA100726C; Mon, 23 Mar 2020 16:11:02 +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 073F29B93B; Mon, 23 Mar 2020 16:11:02 +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 A528386386; Mon, 23 Mar 2020 16:11:01 +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 02NGAl3Q004982 for ; Mon, 23 Mar 2020 12:10:47 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1DD739B92D; Mon, 23 Mar 2020 16:10:47 +0000 (UTC) Received: from lpt.redhat.com (unknown [10.40.208.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 49BA7A0A60 for ; Mon, 23 Mar 2020 16:10:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584979870; 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=7mlhTn2QUnP6al5XvrgTnmknb7oAS6yp+KY4cp+mprQ=; b=WAc2OnviU2jEYGMWubayNJbvUjWU6oovzDO1/2zVELhycK99yHW7dK7nYOOHlr0hF+O7Wi dDzqrZrPiw8rYtSUAydu7aoK6joC2RljLJz7KGQYg8JojL+puA/hXhx/sk3h1VJndD/OHC bAf50sERUtE46j/w1pBDLYpR8PqyZLE= X-MC-Unique: DLdVETBGMvaNaxchz-snPg-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 3/4] qemu: virtiofs: shorten socket filename Date: Mon, 23 Mar 2020 17:10:36 +0100 Message-Id: <8510003f0dc251eada86c711165046daaa480d8c.1584979790.git.jtomko@redhat.com> In-Reply-To: References: 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-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Use just 'fs' instead of 'virtiofsd'. Signed-off-by: J=C3=A1n Tomko --- src/qemu/qemu_virtiofs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_virtiofs.c b/src/qemu/qemu_virtiofs.c index 2e3535873d..aaa25bcbb8 100644 --- a/src/qemu/qemu_virtiofs.c +++ b/src/qemu/qemu_virtiofs.c @@ -56,7 +56,7 @@ qemuVirtioFSCreateSocketFilename(virDomainObjPtr vm, { qemuDomainObjPrivatePtr priv =3D vm->privateData; =20 - return virFileBuildPath(priv->libDir, alias, "-virtiofsd.sock"); + return virFileBuildPath(priv->libDir, alias, "-fs.sock"); } =20 =20 --=20 2.25.1 From nobody Sat Apr 27 02:09:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.74 as permitted sender) client-ip=63.128.21.74; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-74.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.74 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=1584979860; cv=none; d=zohomail.com; s=zohoarc; b=UWu5IoNljskifGHcwfaCVUGg4b/K4VfqOlpZtf20NIoilwDp12gadoxDmTjbsr3SA7j/Ny6RTWh44e9yqCHSbKBtselnm2zJ9pWX/6HAbRUO1FCnGTVia034hysYdVXI6ZqQ8OCHEPvigA98iJuWuF7tUqj80mbEQZ0bg11HnT0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584979860; 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=UGHIU0do3DZupXHCadK29LinUIjT/gpGSE4ZIPy7mQo=; b=TXPAjgn1Xs8T91xiP6j+5jKPz96R8/znJ9Aszvm+bkvk1oIBbJ+n3gUC+ATeVI1mf4lybmVz4IHzSaUp9Hu567f9f/0y6BC2ajg2fXipW93Xxhg4TfOn03pOBbQQNpWPOLO+TR6OYLTtkPgJZ/BwPBQlGDZas5BwsQO6Z5PXmqQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.74 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-74.mimecast.com (us-smtp-delivery-74.mimecast.com [63.128.21.74]) by mx.zohomail.com with SMTPS id 1584979860891425.7994902742604; Mon, 23 Mar 2020 09:11:00 -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-298-i4rJE3xWMV-3VQM_gMPH-w-1; Mon, 23 Mar 2020 12:10:55 -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 65002100550D; Mon, 23 Mar 2020 16:10:50 +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 324CE196AE; Mon, 23 Mar 2020 16:10:50 +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 C074718089CD; Mon, 23 Mar 2020 16:10:49 +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 02NGAmTh004996 for ; Mon, 23 Mar 2020 12:10:48 -0400 Received: by smtp.corp.redhat.com (Postfix) id 545B19B92D; Mon, 23 Mar 2020 16:10:48 +0000 (UTC) Received: from lpt.redhat.com (unknown [10.40.208.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8B05A9B931 for ; Mon, 23 Mar 2020 16:10:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584979859; 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=UGHIU0do3DZupXHCadK29LinUIjT/gpGSE4ZIPy7mQo=; b=ZHEy6PA0DHgn4StYDKN86JKHgrsQmX9OUydzmvRFEYzQHNZjYd11i0p52TkXWheeM+ZTMl VZiCkdNvIFNFofnl5n0lROXJM/HxhEfbOMh7DNkQZhSTTTy1G7GTkndGRD+KEqlIGjgngO h6HOh/+/ZhQK1DgJEPd49VmMcjh45Lw= X-MC-Unique: i4rJE3xWMV-3VQM_gMPH-w-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 4/4] qemu: virtiofs: use a .log.fs suffix for logs Date: Mon, 23 Mar 2020 17:10:37 +0100 Message-Id: <1c61a77a689e7a1d2ff40428fa55b21fdfffe427.1584979790.git.jtomko@redhat.com> In-Reply-To: References: 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-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" As Dave pointed out, someone creative might name a domain to make its logfile conflict with a logfile of another domain's virtiofsd log. Signed-off-by: J=C3=A1n Tomko Reported-by: Dr. David Alan Gilbert Reviewed-by: Michal Privoznik --- src/qemu/qemu_virtiofs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_virtiofs.c b/src/qemu/qemu_virtiofs.c index aaa25bcbb8..575b47fd74 100644 --- a/src/qemu/qemu_virtiofs.c +++ b/src/qemu/qemu_virtiofs.c @@ -67,9 +67,9 @@ qemuVirtioFSCreateLogFilename(virQEMUDriverConfigPtr cfg, { g_autofree char *name =3D NULL; =20 - name =3D g_strdup_printf("%s-%s", def->name, alias); + name =3D g_strdup_printf("%s-%s.log.fs", def->name, alias); =20 - return virFileBuildPath(cfg->logDir, name, "-virtiofsd.log"); + return virFileBuildPath(cfg->logDir, name, NULL); } =20 =20 --=20 2.25.1