Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Nov 2021 21:51:04 +0000
From:      bugzilla-noreply@freebsd.org
To:        virtualization@FreeBSD.org
Subject:   [Bug 260081] bhyve: capsicum preventing blockif hole-punching detection
Message-ID:  <bug-260081-27103-BL8AjgcXtW@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-260081-27103@https.bugs.freebsd.org/bugzilla/>
References:  <bug-260081-27103@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <chuck@FreeBSD.org>
AuthorDate: 2021-12-01 05:07:32 +0000
Commit:     Chuck Tuffli <chuck@FreeBSD.org>
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.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-260081-27103-BL8AjgcXtW>