libcasper(3) is not used in bhyve. So move dependency to the appropriate place.
Sponsored by: vStack
Differential D38905
bhyve: Move libcasper dependecy to lib9p gusev.vitaliy_gmail.com on Mar 4 2023, 11:07 AM. Authored by Tags Referenced Files
Details
libcasper(3) is not used in bhyve. So move dependency to the appropriate place. Sponsored by: vStack Compile, Run VM. W/o patch, rebuilt bhyve: $ ldd /data/bin/bhyve /data/bin/bhyve: libvmmapi.so.5 => /usr/lib/libvmmapi.so.5 (0x13beb90e9000) libmd.so.6 => /lib/libmd.so.6 (0x13bebae97000) libnv.so.1 => /lib/libnv.so.1 (0x13beb92e2000) libz.so.6 => /lib/libz.so.6 (0x13beb95a5000) libutil.so.9 => /lib/libutil.so.9 (0x13beb9b25000) libsbuf.so.6 => /lib/libsbuf.so.6 (0x13beb9c59000) libcam.so.7 => /lib/libcam.so.7 (0x13beba5f5000) lib9p.so.1 => /usr/lib/lib9p.so.1 (0x13bebbcee000) libcasper.so.1 => /lib/libcasper.so.1 (0x13bebcdde000) libcap_pwd.so.1 => /lib/casper/libcap_pwd.so.1 (0x13bebc3e2000) libcap_grp.so.1 => /lib/casper/libcap_grp.so.1 (0x13bebe215000) libprivateucl.so.1 => /usr/lib/libprivateucl.so.1 (0x13bebd495000) libxo.so.0 => /lib/libxo.so.0 (0x13bebe26d000) libnetgraph.so.4 => /usr/lib/libnetgraph.so.4 (0x13bebf7f4000) libcrypto.so.111 => /lib/libcrypto.so.111 (0x13bebe375000) libthr.so.3 => /lib/libthr.so.3 (0x13bebea4f000) libc.so.7 => /lib/libc.so.7 (0x13bebff5c000) libm.so.5 => /lib/libm.so.5 (0x13bec18a8000) [vdso] (0x13beb6c68580) With patch, rebuilt bhyve: $ ldd /data/bin/bhyve /data/bin/bhyve: libvmmapi.so.5 => /usr/lib/libvmmapi.so.5 (0x173b99437000) libmd.so.6 => /lib/libmd.so.6 (0x173b99fe5000) libnv.so.1 => /lib/libnv.so.1 (0x173b9adee000) libz.so.6 => /lib/libz.so.6 (0x173b9c20b000) libutil.so.9 => /lib/libutil.so.9 (0x173b9ae80000) libsbuf.so.6 => /lib/libsbuf.so.6 (0x173b9baaf000) libcam.so.7 => /lib/libcam.so.7 (0x173b9d762000) lib9p.so.1 => /usr/lib/lib9p.so.1 (0x173b9c4f8000) libprivateucl.so.1 => /usr/lib/libprivateucl.so.1 (0x173b9cbaa000) libxo.so.0 => /lib/libxo.so.0 (0x173b9dd25000) libnetgraph.so.4 => /usr/lib/libnetgraph.so.4 (0x173b9eb51000) libcrypto.so.111 => /lib/libcrypto.so.111 (0x173b9f02c000) libthr.so.3 => /lib/libthr.so.3 (0x173ba09c0000) libc.so.7 => /lib/libc.so.7 (0x173b9f69b000) libm.so.5 => /lib/libm.so.5 (0x173ba170b000) [vdso] (0x173b97423580) Without patch, rebuilt lib9p: $ 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 (0x3119ae8b9000) libc.so.7 => /lib/libc.so.7 (0x3119aa25d000) With patch, rebuilt lib9p: $ 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 (0x1424f37d8000) libcasper.so.1 => /lib/libcasper.so.1 (0x1424f4df5000) libcap_pwd.so.1 => /lib/casper/libcap_pwd.so.1 (0x1424f434f000) libcap_grp.so.1 => /lib/casper/libcap_grp.so.1 (0x1424f5851000) libc.so.7 => /lib/libc.so.7 (0x1424ef86b000) libnv.so.1 => /lib/libnv.so.1 (0x1424f6376000)
Diff Detail
Event TimelineComment Actions Seems ok. Did you test 9pfs in the guest? I would suggest trying it if so. In particular, we have no other examples where a shared library depends on casper libraries. Up until now, it is always executables which depend on casper libraries. So there might be some subtle problem or interaction. Comment Actions @markj Yes, I tested p9fs and it worked fine. Checked Cases:
4-th case (failed) is about ticket : https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269827 It is not related to this change, but mention that p9fs needs additional efforts with capsicum/libcasper. Comment Actions I see, thank you for testing.
|