svn commit: r317483 - head/usr.sbin/bhyve
Gleb Smirnoff
glebius at FreeBSD.org
Thu Apr 27 05:48:53 UTC 2017
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
More information about the svn-src-head
mailing list