Sponsored by: vStack
Details
- Reviewers
markj corvink jhb - Group Reviewers
bhyve - Commits
- rG8371bbdadb9b: bhyve: enable capsicum for snapshot code
Compile, verify that capsicum is not disabled during compilation. Run VM, Suspend, Resume.
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
usr.sbin/bhyve/Makefile | ||
---|---|---|
89–90 | How are these casper libraries used? I can't find references to them anywhere in the bhyve code. |
usr.sbin/bhyve/Makefile | ||
---|---|---|
89–90 | I am not expert in casper library, but when I removed linking those libraries, I got: ld: error: /usr/lib/lib9p.so: undefined reference to cap_getpwuid_r [--no-allow-shlib-undefined] ld: error: /usr/lib/lib9p.so: undefined reference to cap_getgrgid_r [--no-allow-shlib-undefined] ld: error: /usr/lib/lib9p.so: undefined reference to cap_init [--no-allow-shlib-undefined] ld: error: /usr/lib/lib9p.so: undefined reference to cap_service_open [--no-allow-shlib-undefined] ld: error: /usr/lib/lib9p.so: undefined reference to cap_setpassent [--no-allow-shlib-undefined] ld: error: /usr/lib/lib9p.so: undefined reference to cap_setgroupent [--no-allow-shlib-undefined] ld: error: /usr/lib/lib9p.so: undefined reference to cap_close [--no-allow-shlib-undefined] ld: error: /usr/lib/lib9p.so: undefined reference to cap_getpwnam [--no-allow-shlib-undefined] So I assume, it is used in lib9p. |
usr.sbin/bhyve/Makefile | ||
---|---|---|
89–90 | As idea, just revert this commit 966026246e62769f3bcd8247a47fe0f4f0433aba Diff would be: --- b/usr.sbin/bhyve/Makefile +++ a/usr.sbin/bhyve/Makefile @@ -83,16 +83,7 @@ CFLAGS.kernemu_dev.c+= -I${SRCTOP}/sys/amd64 .PATH: ${BHYVE_SYSDIR}/sys/amd64/vmm SRCS+= vmm_instruction_emul.c -LIBADD= vmmapi md pthread z util sbuf cam 9p - -if ${MK_CASPER} != "no" -LIBADD+= casper -LIBADD+= cap_pwd -LIBADD+= cap_grp -# Temporary disable capsicum, until we integrate checkpoint code with it. -#CFLAGS+=-DWITH_CASPER -.endif - +LIBADD= vmmapi md pthread z util sbuf cam 9p casper cap_pwd cap_grp .if ${MK_BHYVE_SNAPSHOT} != "no" LIBADD+= ucl xo .endif |
usr.sbin/bhyve/Makefile | ||
---|---|---|
89–90 | The problem is that lib9p does not declare its dependency on casper/cap_grp/cap_pwd. Its makefile, lib/lib9p/Makefile, should include them in its LIBADD definition instead. |
Moved casper dependency to lib9p.
Check 1:
lib/lib9p $ env MK_CASPER=no make
$ ldd /usr/obj/usr/home/vetal/work/freebsd/amd64.amd64/lib/lib9p/lib9p.so
/usr/obj/usr/home/vetal/work/freebsd/amd64.amd64/lib/lib9p/lib9p.so:
libsbuf.so.6 => /lib/libsbuf.so.6 (0x18d87218a000) libc.so.7 => /lib/libc.so.7 (0x18d86e296000)
Check 2:
lib/lib9p $ env MK_CASPER=no make
$ ldd /usr/obj/usr/home/vetal/work/freebsd/amd64.amd64/lib/lib9p/lib9p.so
/usr/obj/usr/home/vetal/work/freebsd/amd64.amd64/lib/lib9p/lib9p.so:
libsbuf.so.6 => /lib/libsbuf.so.6 (0x155cf2448000) libcasper.so.1 => /lib/libcasper.so.1 (0x155cf335d000) libcap_pwd.so.1 => /lib/casper/libcap_pwd.so.1 (0x155cf4f99000) libcap_grp.so.1 => /lib/casper/libcap_grp.so.1 (0x155cf3fea000) libc.so.7 => /lib/libc.so.7 (0x155cef392000) libnv.so.1 => /lib/libnv.so.1 (0x155cf5a18000)
usr.sbin/bhyve/Makefile | ||
---|---|---|
89–90 | Done. |
https://reviews.freebsd.org/D38858 also needs to be addressed before this patch is committed.
I've dropped my request for changes in D38858 - there's nothing blocking this review from being landed.