Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Apr 2017 05:48:52 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r317483 - head/usr.sbin/bhyve
Message-ID:  <201704270548.v3R5mqEU086131@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704270548.v3R5mqEU086131>