From owner-svn-src-head@freebsd.org Thu Apr 27 05:48:53 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92162D525E5; Thu, 27 Apr 2017 05:48:53 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 640961DE0; Thu, 27 Apr 2017 05:48:53 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3R5mqUK086132; Thu, 27 Apr 2017 05:48:52 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3R5mqEU086131; Thu, 27 Apr 2017 05:48:52 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201704270548.v3R5mqEU086131@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 27 Apr 2017 05:48:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317483 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Apr 2017 05:48:53 -0000 Author: glebius Date: Thu Apr 27 05:48:52 2017 New Revision: 317483 URL: https://svnweb.freebsd.org/changeset/base/317483 Log: We need CAP_MMAP_RW on memfd, since init_msix_table() may call mmap(). Modified: head/usr.sbin/bhyve/pci_passthru.c Modified: head/usr.sbin/bhyve/pci_passthru.c ============================================================================== --- head/usr.sbin/bhyve/pci_passthru.c Thu Apr 27 02:17:45 2017 (r317482) +++ head/usr.sbin/bhyve/pci_passthru.c Thu Apr 27 05:48:52 2017 (r317483) @@ -703,6 +703,7 @@ passthru_init(struct vmctx *ctx, struct #ifndef WITHOUT_CAPSICUM cap_rights_clear(&rights, CAP_IOCTL); + cap_rights_set(&rights, CAP_MMAP_RW); if (cap_rights_limit(memfd, &rights) == -1 && errno != ENOSYS) errx(EX_OSERR, "Unable to apply rights for sandbox"); #endif