From nobody Sun May 19 12:26:30 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1659455923; cv=none; d=zohomail.com; s=zohoarc; b=QZdkmmGKya7U2jpIuXJmsqxasZBb4a6sRytFGtO5AWlplPOcE0da5oXPeTFlXJO8q11tsByG3tcVUkU954rCnn9yctoJkQEcDlIxkzKN+l2aDMsQOacqLq5AOGbnBsQyfup/1N4P7fPh7Vd6KlPslaa31rsJJt5N8LgVLooaZEU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1659455923; 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=QcMsBDLIY06iYQJ5LPagbf0qdnKRRsXCWhMQWT1UEQA=; b=fUjDTSDQ1OKXXF5RSPVFLebDP81j5qC/w5DLz9pYlDHu5ffWqOqr9j4AvZJrWCDxDUqW9rFKHWe8zrRZ3CD9TIZkKGznqapFFKWpJkpYQl7W9ror6dVZ3n7Q+9A2+NvgUD47vsxQmh7d/vE3Ub2p44/y5YC6DZ/JX+hNvdyps+g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1659455923731268.47475289378417; Tue, 2 Aug 2022 08:58:43 -0700 (PDT) Received: from localhost ([::1]:41394 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIuI6-0000lz-Pw for importer@patchew.org; Tue, 02 Aug 2022 11:58:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54636) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIuEV-00046d-Ty for qemu-devel@nongnu.org; Tue, 02 Aug 2022 11:54:59 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:23542) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIuET-000240-0S for qemu-devel@nongnu.org; Tue, 02 Aug 2022 11:54:58 -0400 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-528-agwwrK7ZMPiXaV-WlhNweA-1; Tue, 02 Aug 2022 11:54:55 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E1CAF3C1014B; Tue, 2 Aug 2022 15:54:54 +0000 (UTC) Received: from dgilbert-t580.localhost (unknown [10.33.36.167]) by smtp.corp.redhat.com (Postfix) with ESMTP id EE173141DC28; Tue, 2 Aug 2022 15:54:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659455696; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=QcMsBDLIY06iYQJ5LPagbf0qdnKRRsXCWhMQWT1UEQA=; b=dJ9mBZHtacJCGfIglcfXze4x0chDdBF/4AAwsqubvgtsR+OKXszrsJkVSVr1+OunCs2QTu G0isNJd3rTKMq5E5GXddStmZbLA+GlPIpS7XRuHAbuPReyVir5tV0k4VBQ3cBtRManOVto 7q8WOc0VzgNPU7gR6dcS9GI7olGY/bE= X-MC-Unique: agwwrK7ZMPiXaV-WlhNweA-1 From: "Dr. David Alan Gilbert (git)" To: qemu-devel@nongnu.org, leobras@redhat.com, thuth@redhat.com, peter.maydell@linaro.org, vgoyal@redhat.com Cc: peterx@redhat.com, quintela@redhat.com Subject: [PULL 1/5] migration: add remaining params->has_* = true in migration_instance_init() Date: Tue, 2 Aug 2022 16:54:43 +0100 Message-Id: <20220802155447.216018-2-dgilbert@redhat.com> In-Reply-To: <20220802155447.216018-1-dgilbert@redhat.com> References: <20220802155447.216018-1-dgilbert@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=dgilbert@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1659455924187100001 Content-Type: text/plain; charset="utf-8" From: Leonardo Bras Some of params->has_* =3D true are missing in migration_instance_init, this causes migrate_params_check() to skip some tests, allowing some unsupported scenarios. Fix this by adding all missing params->has_* =3D true in migration_instance_init(). Fixes: 69ef1f36b0 ("migration: define 'tls-creds' and 'tls-hostname' migrat= ion parameters") Fixes: 1d58872a91 ("migration: do not wait for free thread") Fixes: d2f1d29b95 ("migration: add support for a "tls-authz" migration para= meter") Signed-off-by: Leonardo Bras Message-Id: <20220726010235.342927-1-leobras@redhat.com> Reviewed-by: Peter Xu Signed-off-by: Dr. David Alan Gilbert --- migration/migration.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/migration/migration.c b/migration/migration.c index e03f698a3c..82fbe0cf55 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -4451,6 +4451,7 @@ static void migration_instance_init(Object *obj) /* Set has_* up only for parameter checks */ params->has_compress_level =3D true; params->has_compress_threads =3D true; + params->has_compress_wait_thread =3D true; params->has_decompress_threads =3D true; params->has_throttle_trigger_threshold =3D true; params->has_cpu_throttle_initial =3D true; @@ -4471,6 +4472,9 @@ static void migration_instance_init(Object *obj) params->has_announce_max =3D true; params->has_announce_rounds =3D true; params->has_announce_step =3D true; + params->has_tls_creds =3D true; + params->has_tls_hostname =3D true; + params->has_tls_authz =3D true; =20 qemu_sem_init(&ms->postcopy_pause_sem, 0); qemu_sem_init(&ms->postcopy_pause_rp_sem, 0); --=20 2.37.1 From nobody Sun May 19 12:26:30 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1659455816; cv=none; d=zohomail.com; s=zohoarc; b=GtNsSwfzhpQiwXNRidyMhNok/HcSaz3cdrjOpiI8i6uJMLkO5osHE7RcKPj68YCkxnM5LkzPgZ6IgZquJ8evG0nJ2p2lwXiMcQQR9lE7wYcJvGm534XvAxgKkC879tH5zwIvQ9Tq1PWbn6WggVnKHm2o870q9BSw98WnX1cQYkY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1659455816; 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=R8+8OKJaUStV4lbXmW6h95Ar2+YaaztHhOQrOajZXYY=; b=l03kDON6FDkBXfvryEXwpnF8zmS6lw/gCUZ62/HybAnanLpI9UAxPhjWTnoHMNXasaqeZHa9hrVjcVNWuNeknYwQZnWXQOFswi9PZiuiQ3NgNEcUNGpdak44LXPPTFeoj3/dV3qFGxy4JsWm54WDf2q81977bhzRuGneyFaBSMg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1659455816301479.6625946477601; Tue, 2 Aug 2022 08:56:56 -0700 (PDT) Received: from localhost ([::1]:37060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIuGL-0006Jm-Jc for importer@patchew.org; Tue, 02 Aug 2022 11:56:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54666) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIuEW-00046v-4v for qemu-devel@nongnu.org; Tue, 02 Aug 2022 11:55:00 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:42763) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIuET-000248-Sh for qemu-devel@nongnu.org; Tue, 02 Aug 2022 11:54:59 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-656-WrMA4-sBONqrnmVO0N6l0w-1; Tue, 02 Aug 2022 11:54:56 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1431C8039AC; Tue, 2 Aug 2022 15:54:56 +0000 (UTC) Received: from dgilbert-t580.localhost (unknown [10.33.36.167]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1E0C0141510F; Tue, 2 Aug 2022 15:54:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659455697; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=R8+8OKJaUStV4lbXmW6h95Ar2+YaaztHhOQrOajZXYY=; b=FYheX8oaJwqaiI1uGEmX+jgJOUFM3Qh9m+JkEoKsSHARcuLJ2KO9GWD+XMf7je88R/8Oc2 BEVuxkQdBuFcgqZC+tQeDrGYz3JLp4z0U348QfHyG7qh0276o3ZKaXHbeg3pYR7JGvUdhH aFO9QbNzjujMlgRhhD/Vg9VaDZ1v39Q= X-MC-Unique: WrMA4-sBONqrnmVO0N6l0w-1 From: "Dr. David Alan Gilbert (git)" To: qemu-devel@nongnu.org, leobras@redhat.com, thuth@redhat.com, peter.maydell@linaro.org, vgoyal@redhat.com Cc: peterx@redhat.com, quintela@redhat.com Subject: [PULL 2/5] Revert "migration: Simplify unqueue_page()" Date: Tue, 2 Aug 2022 16:54:44 +0100 Message-Id: <20220802155447.216018-3-dgilbert@redhat.com> In-Reply-To: <20220802155447.216018-1-dgilbert@redhat.com> References: <20220802155447.216018-1-dgilbert@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=dgilbert@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URG_BIZ=0.573 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1659455817441100002 Content-Type: text/plain; charset="utf-8" From: Thomas Huth This reverts commit cfd66f30fb0f735df06ff4220e5000290a43dad3. The simplification of unqueue_page() introduced a bug that sometimes breaks migration on s390x hosts. The problem is not fully understood yet, but since we are already in the freeze for QEMU 7.1 and we need something working there, let's revert this patch for the upcoming release. The optimization can be redone later again in a proper way if necessary. Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=3D2099934 Signed-off-by: Thomas Huth Message-Id: <20220802061949.331576-1-thuth@redhat.com> Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Dr. David Alan Gilbert --- migration/ram.c | 37 ++++++++++++++++++++++++++----------- migration/trace-events | 3 ++- 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index b94669ba5d..dc1de9ddbc 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -1612,7 +1612,6 @@ static RAMBlock *unqueue_page(RAMState *rs, ram_addr_= t *offset) { struct RAMSrcPageRequest *entry; RAMBlock *block =3D NULL; - size_t page_size; =20 if (!postcopy_has_request(rs)) { return NULL; @@ -1629,13 +1628,10 @@ static RAMBlock *unqueue_page(RAMState *rs, ram_add= r_t *offset) entry =3D QSIMPLEQ_FIRST(&rs->src_page_requests); block =3D entry->rb; *offset =3D entry->offset; - page_size =3D qemu_ram_pagesize(block); - /* Each page request should only be multiple page size of the ramblock= */ - assert((entry->len % page_size) =3D=3D 0); =20 - if (entry->len > page_size) { - entry->len -=3D page_size; - entry->offset +=3D page_size; + if (entry->len > TARGET_PAGE_SIZE) { + entry->len -=3D TARGET_PAGE_SIZE; + entry->offset +=3D TARGET_PAGE_SIZE; } else { memory_region_unref(block->mr); QSIMPLEQ_REMOVE_HEAD(&rs->src_page_requests, next_req); @@ -1643,9 +1639,6 @@ static RAMBlock *unqueue_page(RAMState *rs, ram_addr_= t *offset) migration_consume_urgent_request(); } =20 - trace_unqueue_page(block->idstr, *offset, - test_bit((*offset >> TARGET_PAGE_BITS), block->bmap= )); - return block; } =20 @@ -2069,8 +2062,30 @@ static bool get_queued_page(RAMState *rs, PageSearch= Status *pss) { RAMBlock *block; ram_addr_t offset; + bool dirty; + + do { + block =3D unqueue_page(rs, &offset); + /* + * We're sending this page, and since it's postcopy nothing else + * will dirty it, and we must make sure it doesn't get sent again + * even if this queue request was received after the background + * search already sent it. + */ + if (block) { + unsigned long page; + + page =3D offset >> TARGET_PAGE_BITS; + dirty =3D test_bit(page, block->bmap); + if (!dirty) { + trace_get_queued_page_not_dirty(block->idstr, (uint64_t)of= fset, + page); + } else { + trace_get_queued_page(block->idstr, (uint64_t)offset, page= ); + } + } =20 - block =3D unqueue_page(rs, &offset); + } while (block && !dirty); =20 if (block) { /* See comment above postcopy_preempted_contains() */ diff --git a/migration/trace-events b/migration/trace-events index a34afe7b85..57003edcbd 100644 --- a/migration/trace-events +++ b/migration/trace-events @@ -85,6 +85,8 @@ put_qlist_end(const char *field_name, const char *vmsd_na= me) "%s(%s)" qemu_file_fclose(void) "" =20 # ram.c +get_queued_page(const char *block_name, uint64_t tmp_offset, unsigned long= page_abs) "%s/0x%" PRIx64 " page_abs=3D0x%lx" +get_queued_page_not_dirty(const char *block_name, uint64_t tmp_offset, uns= igned long page_abs) "%s/0x%" PRIx64 " page_abs=3D0x%lx" migration_bitmap_sync_start(void) "" migration_bitmap_sync_end(uint64_t dirty_pages) "dirty_pages %" PRIu64 migration_bitmap_clear_dirty(char *str, uint64_t start, uint64_t size, uns= igned long page) "rb %s start 0x%"PRIx64" size 0x%"PRIx64" page 0x%lx" @@ -110,7 +112,6 @@ ram_save_iterate_big_wait(uint64_t milliconds, int iter= ations) "big wait: %" PRI ram_load_complete(int ret, uint64_t seq_iter) "exit_code %d seq iteration = %" PRIu64 ram_write_tracking_ramblock_start(const char *block_id, size_t page_size, = void *addr, size_t length) "%s: page_size: %zu addr: %p length: %zu" ram_write_tracking_ramblock_stop(const char *block_id, size_t page_size, v= oid *addr, size_t length) "%s: page_size: %zu addr: %p length: %zu" -unqueue_page(char *block, uint64_t offset, bool dirty) "ramblock '%s' offs= et 0x%"PRIx64" dirty %d" postcopy_preempt_triggered(char *str, unsigned long page) "during sending = ramblock %s offset 0x%lx" postcopy_preempt_restored(char *str, unsigned long page) "ramblock %s offs= et 0x%lx" postcopy_preempt_hit(char *str, uint64_t offset) "ramblock %s offset 0x%"P= RIx64 --=20 2.37.1 From nobody Sun May 19 12:26:30 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1659455816; cv=none; d=zohomail.com; s=zohoarc; b=Tslc2KAuM9SaBev+5Rw1K41m/Vs4qCC1ZisXpH5WWLQQN62oxefV6XFvEMZ4Ev1toyB3o/cBSLTnd/5wOjkfJDDhwxkMNuS4O7QyVbe80VL6vjbN8POh7KOTtUI/nDg0HUKAhuch9hYgdsazztU3EZLq0/mZcgJL4bBBTco1Bd4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1659455816; 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=edEQsUhR6hr1/ASmTNeS6vScYe5Y3o/L9fpqOz8wMgA=; b=W8Y3DnXL1lfG6Mg0Nm2J91RXM+uD7XSby7kKFmr3QnTBU2d7vzhxJ0sxFq3rI3qytYcqz3iAcW6nqKlTiUU3mCILcuUKlKU/b2f4uXTg0aioH5Ln0cIs5Iefmt6wSyXlFkzfQwgVpjm4Lg7S/pbQl9gDRwADPT4HuTnjDKwtWwU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1659455816398938.8547460570195; Tue, 2 Aug 2022 08:56:56 -0700 (PDT) Received: from localhost ([::1]:37008 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIuGL-0006Hh-DI for importer@patchew.org; Tue, 02 Aug 2022 11:56:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54674) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIuEY-000475-7b for qemu-devel@nongnu.org; Tue, 02 Aug 2022 11:55:02 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:21583) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIuEV-00024P-3j for qemu-devel@nongnu.org; Tue, 02 Aug 2022 11:55:00 -0400 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-670-IYGkIK35ORyVNeZGqDzELA-1; Tue, 02 Aug 2022 11:54:57 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 37CD92800482; Tue, 2 Aug 2022 15:54:57 +0000 (UTC) Received: from dgilbert-t580.localhost (unknown [10.33.36.167]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4460C141510F; Tue, 2 Aug 2022 15:54:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659455698; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=edEQsUhR6hr1/ASmTNeS6vScYe5Y3o/L9fpqOz8wMgA=; b=Q6dcrJvk0YKCIPyqGl73z1VF//kc0k+Ag7Jzv+Nj33kieZ1rCDIIOafT1JwtCaM7mGM26C fX8nTygQpadJVF4zQrHwBjdiThXRoEuiZjItHRkg2Bd3zUHpt1yaumc8H1hajWsXJdPxaz v9DHF1FTdhuf1CHUri/LsaWpLA5+wA4= X-MC-Unique: IYGkIK35ORyVNeZGqDzELA-1 From: "Dr. David Alan Gilbert (git)" To: qemu-devel@nongnu.org, leobras@redhat.com, thuth@redhat.com, peter.maydell@linaro.org, vgoyal@redhat.com Cc: peterx@redhat.com, quintela@redhat.com Subject: [PULL 3/5] migration: Assert that migrate_multifd_compression() returns an in-range value Date: Tue, 2 Aug 2022 16:54:45 +0100 Message-Id: <20220802155447.216018-4-dgilbert@redhat.com> In-Reply-To: <20220802155447.216018-1-dgilbert@redhat.com> References: <20220802155447.216018-1-dgilbert@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=dgilbert@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1659455817437100001 Content-Type: text/plain; charset="utf-8" From: Peter Maydell Coverity complains that when we use the return value from migrate_multifd_compression() as an array index: multifd_recv_state->ops =3D multifd_ops[migrate_multifd_compression()]; that this might overrun the array (which is declared to have size MULTIFD_COMPRESSION__MAX). This is because the function return type is MultiFDCompression, which is an autogenerated enum. The code generator includes the "one greater than the maximum possible value" MULTIFD_COMPRESSION__MAX in the enum, even though this is not actually a valid value for the enum, and this makes Coverity think that migrate_multifd_compression() could return that __MAX value and index off the end of the array. Suppress the Coverity error by asserting that the value we're going to return is within range. Resolves: Coverity CID 1487239, 1487254 Signed-off-by: Peter Maydell Message-Id: <20220721115207.729615-2-peter.maydell@linaro.org> Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Signed-off-by: Dr. David Alan Gilbert --- migration/migration.c | 1 + 1 file changed, 1 insertion(+) diff --git a/migration/migration.c b/migration/migration.c index 82fbe0cf55..bb8bbddfe4 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -2617,6 +2617,7 @@ MultiFDCompression migrate_multifd_compression(void) =20 s =3D migrate_get_current(); =20 + assert(s->parameters.multifd_compression < MULTIFD_COMPRESSION__MAX); return s->parameters.multifd_compression; } =20 --=20 2.37.1 From nobody Sun May 19 12:26:30 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1659456147; cv=none; d=zohomail.com; s=zohoarc; b=MT7fiboSexRgAa5WKoRne2p9wlUA4b+bB6qvLJ+V4o8z0XHBW4e8cqNmrk7ToilSQueZjWRm5XEgigJyMU5i0KThfHZRkI5AL+DdmSXO8Tp2G1X2ZsZnJwu41q7O0pjbpEnAh2N8QXlljiCmzwvJSfM9eWfzTKGMZtNS0YBfCJ4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1659456147; 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=+OFgNyePoapxAy3B2bAo2y5raQmmWKvx7VYqBx4+H48=; b=HCB3Ls10XcVhY+nUeUZSlCwdjYRK3AuLLVLEQz21wv2yDXKr/R5gYYUZexW9ldiD0yUMLKV4sneyjFsFGzpFpJ4D8cS72yU0A7I8bQfDJ6asXicEkIlt5UvrvVFdXcNbpMJuYXC8hLi1dceIK951kwOecG3Slk4uAkKXXbet6wg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16594561477661021.06371727403; Tue, 2 Aug 2022 09:02:27 -0700 (PDT) Received: from localhost ([::1]:43678 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIuLi-0002Je-HU for importer@patchew.org; Tue, 02 Aug 2022 12:02:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54726) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIuEa-0004Dm-Hw for qemu-devel@nongnu.org; Tue, 02 Aug 2022 11:55:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:44451) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIuEY-00027X-TS for qemu-devel@nongnu.org; Tue, 02 Aug 2022 11:55:04 -0400 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-164-beB0bqqfNKKcTZicU2ocwQ-1; Tue, 02 Aug 2022 11:54:59 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E8CBF2800486; Tue, 2 Aug 2022 15:54:58 +0000 (UTC) Received: from dgilbert-t580.localhost (unknown [10.33.36.167]) by smtp.corp.redhat.com (Postfix) with ESMTP id 69161141510F; Tue, 2 Aug 2022 15:54:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659455702; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=+OFgNyePoapxAy3B2bAo2y5raQmmWKvx7VYqBx4+H48=; b=F0BMz+U2jCbzkYvPUuPpfnSTe4Rx8yfRo6wOVP2cjft0RNCgahOOGva59aBRpc06DGMuIV BrngfpkqOfkTgTH4ntws18iZvPNSgdMWH9xZLMbJFf2dLmnvFRns5uFWO+YiUaw5rfUbmE xwJKs+amRIDTOfSd/IcflZRbXm615Oc= X-MC-Unique: beB0bqqfNKKcTZicU2ocwQ-1 From: "Dr. David Alan Gilbert (git)" To: qemu-devel@nongnu.org, leobras@redhat.com, thuth@redhat.com, peter.maydell@linaro.org, vgoyal@redhat.com Cc: peterx@redhat.com, quintela@redhat.com Subject: [PULL 4/5] migration: Define BLK_MIG_BLOCK_SIZE as unsigned long long Date: Tue, 2 Aug 2022 16:54:46 +0100 Message-Id: <20220802155447.216018-5-dgilbert@redhat.com> In-Reply-To: <20220802155447.216018-1-dgilbert@redhat.com> References: <20220802155447.216018-1-dgilbert@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=dgilbert@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1659456148513100001 Content-Type: text/plain; charset="utf-8" From: Peter Maydell When we use BLK_MIG_BLOCK_SIZE in expressions like block_mig_state.submitted * BLK_MIG_BLOCK_SIZE, this multiplication is done as 32 bits, because both operands are 32 bits. Coverity complains about possible overflows because we then accumulate that into a 64 bit variable. Define BLK_MIG_BLOCK_SIZE as unsigned long long using the ULL suffix. The only two current uses of it with this problem are both in block_save_pending(), so we could just cast to uint64_t there, but using the ULL suffix is simpler and ensures that we don't accidentally introduce new variants of the same issue in future. Resolves: Coverity CID 1487136, 1487175 Signed-off-by: Peter Maydell Message-Id: <20220721115207.729615-3-peter.maydell@linaro.org> Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Signed-off-by: Dr. David Alan Gilbert --- migration/block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/block.c b/migration/block.c index 9e5aae5898..3577c815a9 100644 --- a/migration/block.c +++ b/migration/block.c @@ -28,7 +28,7 @@ #include "sysemu/block-backend.h" #include "trace.h" =20 -#define BLK_MIG_BLOCK_SIZE (1 << 20) +#define BLK_MIG_BLOCK_SIZE (1ULL << 20) #define BDRV_SECTORS_PER_DIRTY_CHUNK (BLK_MIG_BLOCK_SIZE >> BDRV_SECTOR_BI= TS) =20 #define BLK_MIG_FLAG_DEVICE_BLOCK 0x01 --=20 2.37.1 From nobody Sun May 19 12:26:30 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1659456467; cv=none; d=zohomail.com; s=zohoarc; b=WIDXewWN1ZEc73TVH57Z0hQQt4GMdX3CA7zIsA2g7F5ywxTlCgFqLfgUcHpB/St5vETLVCEmsxUv3WTzm+I0/PkjT3PPXouN0rL947M6gP3WW/VjECq/v+Uc3nUYEVvsL0tVXLyNqZAhJmDqq5STzgPbN/DEDR0ZtF1AY27VMFI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1659456467; 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=VhX4jrXbk9vtFV2Hwaj6etLo6FGmqS+rhjQArHZ+ODw=; b=EyIWVyFw/UB9TgJ0NaHwko0ftFuxmvd3msC3xjXgyVywa283niT+PPkm4VHqGvQVVpzEBzZ05+t+kigt2fUI/8BeDMeLzGo1wuQ+kzOM/AOE6Eo8qk2/SXBRMLpFCjY+gJ20SQFsUxR+juIjGKpqSHNEWbj7os+yF4zO+Y4g7OM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1659456467959824.8988521425903; Tue, 2 Aug 2022 09:07:47 -0700 (PDT) Received: from localhost ([::1]:52064 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIuQs-00087D-E3 for importer@patchew.org; Tue, 02 Aug 2022 12:07:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54750) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIuEb-0004HW-Sp for qemu-devel@nongnu.org; Tue, 02 Aug 2022 11:55:05 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:50410) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIuEa-0002Fp-5j for qemu-devel@nongnu.org; Tue, 02 Aug 2022 11:55:05 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-304-vKXp5DJvPcGv-X34qtwVuA-1; Tue, 02 Aug 2022 11:55:00 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1B50E811E7A; Tue, 2 Aug 2022 15:55:00 +0000 (UTC) Received: from dgilbert-t580.localhost (unknown [10.33.36.167]) by smtp.corp.redhat.com (Postfix) with ESMTP id 25D4B141510F; Tue, 2 Aug 2022 15:54:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659455703; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=VhX4jrXbk9vtFV2Hwaj6etLo6FGmqS+rhjQArHZ+ODw=; b=JReHz4IlAQKNPGmkUHDimAdNsi15ezGGGI9ptvZ4qLgyrvkt8H3UFuwG+9wXl1+KYd8wFP b0VHFwtvGe5bazqILiNBXsTRLWzXfJXHNkAGesn8iWFTwUWeYGqAMmqyv1wGN4zu+PkiSE xyFRqvvt4vcPPP4d5BE5BdwjsE0ZZe0= X-MC-Unique: vKXp5DJvPcGv-X34qtwVuA-1 From: "Dr. David Alan Gilbert (git)" To: qemu-devel@nongnu.org, leobras@redhat.com, thuth@redhat.com, peter.maydell@linaro.org, vgoyal@redhat.com Cc: peterx@redhat.com, quintela@redhat.com Subject: [PULL 5/5] virtiofsd: Disable killpriv_v2 by default Date: Tue, 2 Aug 2022 16:54:47 +0100 Message-Id: <20220802155447.216018-6-dgilbert@redhat.com> In-Reply-To: <20220802155447.216018-1-dgilbert@redhat.com> References: <20220802155447.216018-1-dgilbert@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=dgilbert@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1659456470006100001 Content-Type: text/plain; charset="utf-8" From: Vivek Goyal We are having bunch of issues with killpriv_v2 enabled by default. First of all it relies on clearing suid/sgid bits as needed by dropping capability CAP_FSETID. This does not work for remote filesystems like NFS (and possibly others). Secondly, we are noticing other issues related to clearing of SGID which leads to failures for xfstests generic/355 and generic/193. Thirdly, there are other issues w.r.t caching of metadata (suid/sgid) bits in fuse client with killpriv_v2 enabled. Guest can cache that data for sometime even if cleared on server. Second and Third issue are fixable. Just that it might take a little while to get it fixed in kernel. First one will probably not see any movement for a long time. Given these issues, killpriv_v2 does not seem to be a good candidate for enabling by default. We have already disabled it by default in rust version of virtiofsd. Hence this patch disabled killpriv_v2 by default. User can choose to enable it by passing option "-o killpriv_v2". Signed-off-by: Vivek Goyal Message-Id: Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Dr. David Alan Gilbert --- tools/virtiofsd/passthrough_ll.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough= _ll.c index 7a73dfcce9..371a7bead6 100644 --- a/tools/virtiofsd/passthrough_ll.c +++ b/tools/virtiofsd/passthrough_ll.c @@ -767,19 +767,10 @@ static void lo_init(void *userdata, struct fuse_conn_= info *conn) fuse_log(FUSE_LOG_DEBUG, "lo_init: enabling killpriv_v2\n"); conn->want |=3D FUSE_CAP_HANDLE_KILLPRIV_V2; lo->killpriv_v2 =3D 1; - } else if (lo->user_killpriv_v2 =3D=3D -1 && - conn->capable & FUSE_CAP_HANDLE_KILLPRIV_V2) { - /* - * User did not specify a value for killpriv_v2. By default enable= it - * if connection offers this capability - */ - fuse_log(FUSE_LOG_DEBUG, "lo_init: enabling killpriv_v2\n"); - conn->want |=3D FUSE_CAP_HANDLE_KILLPRIV_V2; - lo->killpriv_v2 =3D 1; } else { /* - * Either user specified to disable killpriv_v2, or connection does - * not offer this capability. Disable killpriv_v2 in both the cases + * Either user specified to disable killpriv_v2, or did not + * specify anything. Disable killpriv_v2 in both the cases. */ fuse_log(FUSE_LOG_DEBUG, "lo_init: disabling killpriv_v2\n"); conn->want &=3D ~FUSE_CAP_HANDLE_KILLPRIV_V2; --=20 2.37.1