From nobody Tue Nov 30 21:51:04 2021 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 6589118B9C9F for ; Tue, 30 Nov 2021 21:51:04 +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 4J3bWX1jgzz3n7c for ; Tue, 30 Nov 2021 21:51:04 +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 1B7001DE37 for ; Tue, 30 Nov 2021 21:51:04 +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 1AULp4vP088260 for ; Tue, 30 Nov 2021 21:51:04 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 1AULp4FW088259 for virtualization@FreeBSD.org; Tue, 30 Nov 2021 21:51:04 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: Tue, 30 Nov 2021 21:51:04 +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=1638309064; 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=aGj3374HDx7IetUw54pQb80/wjCx803u6mAvUCrOe9E=; b=KDAjkg25y/KvidnAXcJINMPYrOpUDxz8Jm0JxpXIA0wnJugb/gx1MUmTbv7ZbQ75DsNsTD 2Wuq38nGompFTVrtxLYxlvxuLQHjeygCpNoTmN7qytaNyzO8lpSh39gNNA/TTS9jeZoaQH lSBS20y7ELpp0KlyIBAQkZnAmFrH9P1i/pYk1Mhxn8Z2mqFar3hmtk1RzYwtcdCffJJnjZ UjQIgTy439C4frbJSLoGfP8f4rNgDqd7e1lTpkMoCHIN3NiBOnA2Kieqro5NEeiWduTALJ zB8VT4uHOEi8IDklRGld7+krp+WTXvJ0tTe1oezZtFCiGGBN0nZctrcIpUXFpA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638309064; a=rsa-sha256; cv=none; b=ExuqWlrFTIbjiZxytGGDUNRYTtVTp9r2+MaCgxtDNk2ALwcc4NaIa3UZpFssORKzfzzftQ FL0ezhPKTN6rG0XgMK7JDXUgaFZenFchD2xZlA97KeG0OXsq3XsNWAkDYmmcYfZ4Qv52FK AdUN/Rnt4XXkHvaJYuaC2cAhF3Uw8rBayAw4FLx0r5Psf31ysIeWI6jlXUsiD4obWoMqfs jiUJrjqNGvA9jOpJXXQuBerYh2OO8WZoc/xX3wcNXnVtX7xQyjK9gzse0mqMg8dcDm1YfJ q+X+kOBwG52urJ8wkdDX32asGcpCO5Y+UPlsoht8f7kFAblXIDgAdJPeJsFB4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D260081 --- Comment #5 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3Dd8c1d7b6526c7063304cd1e938d12dec1= 37454e2 commit d8c1d7b6526c7063304cd1e938d12dec137454e2 Author: Chuck Tuffli AuthorDate: 2021-12-01 05:07:32 +0000 Commit: Chuck Tuffli CommitDate: 2021-12-01 05:49:34 +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 Reviewed by: allanjude, markj, jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D33203 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.=