bhyveload: enter capability mode after we setup the vcpu

Reviewed by:	allanjude (earlier version), emaste, markj
Differential Revision:	https://reviews.freebsd.org/D43286
This commit is contained in:
Kyle Evans 2024-01-03 16:18:00 -06:00
parent bf7c4fcbbb
commit 8bf0882e18
1 changed files with 7 additions and 0 deletions

View File

@ -78,6 +78,7 @@
#include <termios.h>
#include <unistd.h>
#include <capsicum_helpers.h>
#include <vmmapi.h>
#include "userboot.h"
@ -868,6 +869,12 @@ main(int argc, char** argv)
vcpu = vm_vcpu_open(ctx, BSP);
caph_cache_catpages();
if (caph_enter() < 0) {
perror("caph_enter");
exit(1);
}
/*
* setjmp in the case the guest wants to swap out interpreter,
* cb_swap_interpreter will swap out loader as appropriate and set