From nobody Wed Feb 23 17:45:36 2022 X-Original-To: dev-commits-src-branches@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 B20BE19E8162; Wed, 23 Feb 2022 17:45:36 +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 4K3k344QJDz3FLJ; Wed, 23 Feb 2022 17:45:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645638336; 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=Woey9b5HBKfkoX4WRWU2XpKrpOjc5YzAxvRDHr3VYGQ=; b=yIiVTAdswWbhTxC9EPzBSNuuCzPix7TmEhx/vXKXxqoNGjI6+nEz2PA+VVMflCfQSBUNm4 mmYDAoRemorPELwdLHL9dNcxt9ZklpZjEXfiCUQHrLJrtVZ/sJX1fKFFpZaTC0dEwktqWw YIGd0/TR2jatAiqnTtTYs5vVI1vzQEhCTn9Jp4D5hbcA5OgFuNeYg/oMihmJvyG5IOQ6S+ gCk+pjAToQtOruhXg4UGUT7BUa5LPdU5kzMQQ/QWL4nTMlaxm42xt2M2/OB1a/r4YIXXJH t4+YbMLXNbZo/1zplLlu6P5C1rHnRbAlNTa80jbPWQNjqes8F027DYeSVH2A+g== 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 78CF61C86B; Wed, 23 Feb 2022 17:45:36 +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 21NHjaf5088587; Wed, 23 Feb 2022 17:45:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21NHjawo088586; Wed, 23 Feb 2022 17:45:36 GMT (envelope-from git) Date: Wed, 23 Feb 2022 17:45:36 GMT Message-Id: <202202231745.21NHjawo088586@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Robert Wing Subject: git: 487c84bb61d4 - stable/13 - bhyve/block_if: allow DIOCGMEDIASIZE ioctl List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 487c84bb61d4f06ef2cf98f806d348952f327cae Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645638336; 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=Woey9b5HBKfkoX4WRWU2XpKrpOjc5YzAxvRDHr3VYGQ=; b=yETlG8CtkSsY3vB/Bgn5ON6WSG66i5pDhHR4us29SBuMvDWQK487bH47ApYAzlmpjCmD2B YY9ZAmE4lfZV+YjT7g4EMJCGxHQbl2aaVeRuJDq8wLdqKKk27XshGwHlgrBLzjpyjDiKRJ Wmmj3ub9jCfHEVxcREpyHAubnOlbdof6rVVjKYz6WqX4OT/G175ZNS6rQSvF8OiWYjVG7N 7HXn3GQX51x3bwG6/cVgCHSekmGo17KAEwG1leFoTt+JDwXGp9HStBDXXmcXc60F5XWCpA Ji6Ely2etmtUu6D1zNn943nZTdPDcTcjiu2vs0IY9GNdlwUp0mVmBDK7fsgb/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645638336; a=rsa-sha256; cv=none; b=o6YjqmpN8n4iO8sDxuYPDHVbLb7lnvwPiGpgnL5YquTHME1mMiTOGbXq5LgF3GzG6Uqe4c EE6P0VKOKVZkFZiBSnLYk/Um3y4tIA7G6KTxKeCWsIqJ6KxWD61AeFrGB/BEF0ESYNQcRa DxmhL49bSMd+K4c++Xgoxakb0CmJ6T2/duw/94aucsyz3s/AP8ovi6Bs8jO1UdnPZXCm3A aLtpTLfCbPZxwaUB8EIHFWhBK4TOKmBcMWiAWCykpDAXqo9nR9cOrwGj5XGtIN9y3XEkHm GCdaYSbvstXWNj6sByxtgPb3UcSBxnum2CKx7SVUm2hnsTQWNL7l677o8WHk3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=487c84bb61d4f06ef2cf98f806d348952f327cae commit 487c84bb61d4f06ef2cf98f806d348952f327cae Author: Robert Wing AuthorDate: 2022-01-25 16:44:13 +0000 Commit: Robert Wing CommitDate: 2022-02-23 17:45:32 +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 (cherry picked from commit 08cb63a12fd9c0e575ee489353b53d53b4a45411) --- 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 0d41b5175166..89964969c1ee 100644 --- a/usr.sbin/bhyve/block_if.c +++ b/usr.sbin/bhyve/block_if.c @@ -468,7 +468,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);