From nobody Tue Jan 25 16:48:46 2022 X-Original-To: dev-commits-src-all@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 D5BDE196DC12; Tue, 25 Jan 2022 16:48:46 +0000 (UTC) (envelope-from git@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 4Jjt8t5Yn0z4d3W; Tue, 25 Jan 2022 16:48:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643129326; 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; bh=kEFsfCvDho2ZkvzHmWNBPj0S1NqVf3DsNAF0j6VevjE=; b=os+vPBlnCfvn4W2U59n60OdDZZiUv18WUmZfMOluvZPN1P5DlvZKIa5iEi0CsoRdMtL441 /jBcIovlB7ZsTjPlYhcpDvGJuGWP0wnjMKZr4VrRTksUWuvoz9r1wJi/ufF2Z4pCkeDVqH xtE8GS/GYLNMbAGDg54jnVxybtB8mc81WlWwxQpOSrzOt6YVNLMKk+1IDLrnelG88K0bq1 v+GddJ6Ip/RrKdmzxB5xa3HgkZ/YbTQi82g7SiwRjNZb4slFC7U10KXMPByRfH+pwtyShB 9LkAEetX+jIYnB9cJJ5tTx6rT9JvXgDiXwKEpBq+MyP67u8KykWGC33Y6P0wNQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 9A1F34DFA; Tue, 25 Jan 2022 16:48:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 20PGmkqp061472; Tue, 25 Jan 2022 16:48:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20PGmkD9061471; Tue, 25 Jan 2022 16:48:46 GMT (envelope-from git) Date: Tue, 25 Jan 2022 16:48:46 GMT Message-Id: <202201251648.20PGmkD9061471@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Wing Subject: git: 08cb63a12fd9 - main - bhyve/block_if: allow DIOCGMEDIASIZE ioctl List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 08cb63a12fd9c0e575ee489353b53d53b4a45411 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643129326; 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; bh=kEFsfCvDho2ZkvzHmWNBPj0S1NqVf3DsNAF0j6VevjE=; b=ls4OH/XZeOypF4ERnFUUDbSAMlukTXM7LLe4bIjO8K9mEr5G8usd3zzYuCD4E8LZDJaKAd ux3uJ+DaUixcMh4/N+MYialMXfS/Y6f53FByhZEEoWyA5bbuJXM3R2O+HBumYbewupK/PP RRmBEBg2y3rIXqTv02VjWvZyvmJd5td680RGX3nYxWyg7iWNgFdooRpmECjMFD9JRy8jNK FnYpxp/pi+A77bsndvVYJfkRImwiLZ0QsbnAcczgtJCGTJfGpkIUqdKagWBoWlfqY5S5mq sG/rgii4NYVO5RYeUg00Rjl1olDuSJ8WSGSDhphNplwRS/dwYFWRsbRWqUqL7g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643129326; a=rsa-sha256; cv=none; b=SHR9WHdPFcClpmo+DdarqFL5DfjbIdCxhBwtOpQSwefS45Q7kxhtrutQcRatoCDnLJz/B0 Kke0taELcXofUL4I4v/2UJiedq+WyoSbpNda7jsbZWIOoUwE4o3D9cn7I3iPPQsJQwyuTy KeAiQpoqf4M5k2sn6u3hIZdUs5OO3b03WGCHDhyhXQP+n2hFKBjL9nHPHZyL56NgIY30k0 ZCKXQ4Qq8YwXCiXUpxpIxC+di6nCVeuFbu2aZYilMVJo+ICcXHzN6S4RHc6Y8yORUlNudg TfKE089eGmT8T1L8IuWVCWDhBCGRtiRoaSqnjn+jOJUEnM4wE7JDhEdGwTjVFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=08cb63a12fd9c0e575ee489353b53d53b4a45411 commit 08cb63a12fd9c0e575ee489353b53d53b4a45411 Author: Robert Wing AuthorDate: 2022-01-25 16:44:13 +0000 Commit: Robert Wing CommitDate: 2022-01-25 16:44:13 +0000 bhyve/block_if: allow DIOCGMEDIASIZE ioctl This is needed to get mediasize of the device after a resize event. I missed this earlier as I was building WITH_BHYVE_SNAPSHOT, which disables capsicum. Reviewed by: khng, markj Fixes: ae9ea22e14bf ("bhyve: get mediasize for character devices when ...") Differential Revision: https://reviews.freebsd.org/D34013 --- usr.sbin/bhyve/block_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/block_if.c b/usr.sbin/bhyve/block_if.c index 217f7181de75..06c3cb50fb13 100644 --- a/usr.sbin/bhyve/block_if.c +++ b/usr.sbin/bhyve/block_if.c @@ -481,7 +481,7 @@ blockif_open(nvlist_t *nvl, const char *ident) #ifndef WITHOUT_CAPSICUM cap_rights_t rights; - cap_ioctl_t cmds[] = { DIOCGFLUSH, DIOCGDELETE }; + cap_ioctl_t cmds[] = { DIOCGFLUSH, DIOCGDELETE, DIOCGMEDIASIZE }; #endif pthread_once(&blockif_once, blockif_init);