From nobody Mon Feb 21 21:58:46 2022 X-Original-To: virtualization@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C0DF719ECAE3 for ; Mon, 21 Feb 2022 21:58:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4K2bm62GCpz4gwd for ; Mon, 21 Feb 2022 21:58:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D4709182EB for ; Mon, 21 Feb 2022 21:58:45 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 21LLwjkx037629 for ; Mon, 21 Feb 2022 21:58:45 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 21LLwj0W037628 for virtualization@FreeBSD.org; Mon, 21 Feb 2022 21:58:45 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: virtualization@FreeBSD.org Subject: [Bug 260081] bhyve: capsicum preventing blockif hole-punching detection Date: Mon, 21 Feb 2022 21:58:46 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bhyve X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: virtualization@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645480726; h=from:from: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; bh=pniOIUT5+3BHxqRMqRI76akkB0KD2wTR0eOomDat/IA=; b=KYpfwn8UiQ4QkPFwZAZFGn62iOJMg9136m3kgo/TFXyhA9RFn6ZDSmTj973SqBvz0kItcf /Qfxl2se5rl++oDlKwScIm0+uVYD7331DTM419SrXgkDRBjjeAadhTkkQv79fseQ0xWl91 0jPF1Ois27aCqh2zY2oYlsBaaMHcoDyQVoQ8726zNdcoUhqSKUg0H9N6EoTSe0jcFApkiE ahF80+Ad0VYhirMeP9sis5Nj75MV05xZZqTVezmFghxrChVvOkAUTbzDX/RfxD3PS+gKBH cEAbQtJeeAJp2qClWmFGKzkQUTn/460esSQXseWrQh4j4OwefB6tN6a+FhRofA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645480726; a=rsa-sha256; cv=none; b=rOM0NkRMvHnNoW+QdjFxNWi3C2fyekQhgwQaiz4C92nVZZC3072G/ryPN5jbnKKYFhaD4E rNiGJpnD3+1hOFque7/rDjLywe5dSY90Sq0/2wgWmqE9MZsFWYyw/FFcUf83XZPVxfe6co 5fIlPGAE25r7VY/tLfDcbJgAuuNAj//aC5e7Go96m6+x4jf/2uAnF4Yc/x0wKzt5QHCWp+ OJzuKJHD1UZ9oNXRU3/cGR9Gms0bP/hpssHi9JSshAjI8S+qOcDmbspxrleE5kB47Twjwp LBXryfS4BCUMR/77non4W1IbLOnDJpbA68JCjzNm0IPfzqj7tDmKxfDEpptpTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D260081 --- Comment #6 from commit-hook@FreeBSD.org --- A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D1685d8368c2f78012f6d2d045f2919315= 6a8580d commit 1685d8368c2f78012f6d2d045f29193156a8580d Author: Chuck Tuffli AuthorDate: 2021-12-01 05:07:32 +0000 Commit: Chuck Tuffli CommitDate: 2022-02-22 03:23:16 +0000 bhyve blockif: fix blockif_candelete with Capsicum NVMe conformance tests for the Format command failed if the backing-storage for the bhyve device was a file instead of a Zvol. The tests (and the specification) expect a Format to destroy all previously written data. The bhyve NVMe emulation implements this by trimming / deallocating all data from the backing-storage. The blockif_candelete() function indicated the file did not support deallocation (i.e. fpathconf(..., _PC_DEALLOC_PRESENT) returned FALSE) even though the kernel supported file hole punching. This occurs on builds with Capsicum enabled because blockif did not allow the fpathconf(2) right. Fix is to add CAP_FPATHCONF to the cap_rights_init(3) call. PR: 260081 (cherry picked from commit d8c1d7b6526c7063304cd1e938d12dec137454e2) usr.sbin/bhyve/block_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --=20 You are receiving this mail because: You are the assignee for the bug.=