diff options
Diffstat (limited to 'emulators/virtualbox-ose-kmod')
5 files changed, 105 insertions, 3 deletions
diff --git a/emulators/virtualbox-ose-kmod/Makefile b/emulators/virtualbox-ose-kmod/Makefile index 818c28a54e86..76dc8b3733d4 100644 --- a/emulators/virtualbox-ose-kmod/Makefile +++ b/emulators/virtualbox-ose-kmod/Makefile @@ -6,7 +6,7 @@ # PORTNAME= virtualbox-ose -DISTVERSION= 4.1.12 +DISTVERSION= 4.1.14 CATEGORIES= emulators kld MASTER_SITES= http://tmp.chruetertee.ch/ \ http://freebsd.unixfreunde.de/sources/ \ diff --git a/emulators/virtualbox-ose-kmod/distinfo b/emulators/virtualbox-ose-kmod/distinfo index c574d8aadef4..cb0b23c10583 100644 --- a/emulators/virtualbox-ose-kmod/distinfo +++ b/emulators/virtualbox-ose-kmod/distinfo @@ -1,2 +1,2 @@ -SHA256 (VirtualBox-4.1.12.tar.bz2) = 4e4b9181a61ee9ccbe5fd28dbf528dde708fba490af5de6fac0d138b283b1d02 -SIZE (VirtualBox-4.1.12.tar.bz2) = 73250628 +SHA256 (VirtualBox-4.1.14.tar.bz2) = 034cfd19d5dd701cd1375b994ad6f2d41c207b6760c6b8c5fe3005e53134dff8 +SIZE (VirtualBox-4.1.14.tar.bz2) = 73260319 diff --git a/emulators/virtualbox-ose-kmod/files/patch-src-VBox-HostDrivers-VBoxNetAdp-freebsd-Makefile b/emulators/virtualbox-ose-kmod/files/patch-src-VBox-HostDrivers-VBoxNetAdp-freebsd-Makefile new file mode 100644 index 000000000000..821c767192e1 --- /dev/null +++ b/emulators/virtualbox-ose-kmod/files/patch-src-VBox-HostDrivers-VBoxNetAdp-freebsd-Makefile @@ -0,0 +1,16 @@ +This patch adds support for VIMAGE to VBoxNetAdp and thus +also fixes that panic. + +Submitted by: Mikolaj Golub <trociny at freebsd.org> +--- src/VBox/HostDrivers/VBoxNetAdp/freebsd/Makefile 2012-03-13 15:15:44.000000000 +0200 ++++ src/VBox/HostDrivers/VBoxNetAdp/freebsd/Makefile 2012-04-01 13:27:16.000000000 +0300 +@@ -18,7 +18,7 @@ + + KMOD = vboxnetadp + +-CFLAGS += -DRT_OS_FREEBSD -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -Iinclude -I. -Ir0drv -w -DVBOX_WITH_HARDENING ++CFLAGS += -DRT_OS_FREEBSD -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -Iinclude -I. -Ir0drv -w -DVBOX_WITH_HARDENING -DVIMAGE + + .if (${MACHINE_ARCH} == "i386") + CFLAGS += -DRT_ARCH_X86 +diff -rpu VirtualBox-4.1.10.orig/src/VBox/HostDrivers/VBoxNetAdp/freebsd/VBoxNetAdp-freebsd.c VirtualBox-4.1.10/src/VBox/HostDrivers/VBoxNetAdp/freebsd/VBoxNetAdp-freebsd.c diff --git a/emulators/virtualbox-ose-kmod/files/patch-src-VBox-HostDrivers-VBoxNetAdp-freebsd-VBoxNetAdp-freebsd.c b/emulators/virtualbox-ose-kmod/files/patch-src-VBox-HostDrivers-VBoxNetAdp-freebsd-VBoxNetAdp-freebsd.c new file mode 100644 index 000000000000..189755c1b242 --- /dev/null +++ b/emulators/virtualbox-ose-kmod/files/patch-src-VBox-HostDrivers-VBoxNetAdp-freebsd-VBoxNetAdp-freebsd.c @@ -0,0 +1,55 @@ +This patch adds support for VIMAGE to VBoxNetAdp and thus +also fixes that panic. + +Submitted by: Mikolaj Golub <trociny at freebsd.org> +--- src/VBox/HostDrivers/VBoxNetAdp/freebsd/VBoxNetAdp-freebsd.c 2012-03-13 15:15:44.000000000 +0200 ++++ src/VBox/HostDrivers/VBoxNetAdp/freebsd/VBoxNetAdp-freebsd.c 2012-04-01 13:23:58.000000000 +0300 +@@ -68,6 +68,22 @@ + #define VBOXNETADP_OS_SPECFIC 1 + #include "../VBoxNetAdpInternal.h" + ++#if defined(__FreeBSD_version) && __FreeBSD_version >= 800500 ++# include <sys/jail.h> ++# include <net/vnet.h> ++ ++# define VBOXCURVNET_SET(arg) CURVNET_SET_QUIET(arg) ++# define VBOXCURVNET_SET_FROM_UCRED() VBOXCURVNET_SET(CRED_TO_VNET(curthread->td_ucred)) ++# define VBOXCURVNET_RESTORE() CURVNET_RESTORE() ++ ++#else /* !defined(__FreeBSD_version) || __FreeBSD_version < 800500 */ ++ ++# define VBOXCURVNET_SET(arg) ++# define VBOXCURVNET_SET_FROM_UCRED() ++# define VBOXCURVNET_RESTORE() ++ ++#endif /* !defined(__FreeBSD_version) || __FreeBSD_version < 800500 */ ++ + static int VBoxNetAdpFreeBSDCtrlioctl(struct cdev *, u_long, caddr_t, int flags, + struct thread *); + static struct cdevsw vboxnetadp_cdevsw = +@@ -260,6 +276,7 @@ int vboxNetAdpOsCreate(PVBOXNETADP pThis + { + struct ifnet *ifp; + ++ VBOXCURVNET_SET_FROM_UCRED(); + ifp = if_alloc(IFT_ETHER); + if (ifp == NULL) + return VERR_NO_MEMORY; +@@ -279,6 +296,7 @@ int vboxNetAdpOsCreate(PVBOXNETADP pThis + + strncpy(pThis->szName, ifp->if_xname, VBOXNETADP_MAX_NAME_LEN); + pThis->u.s.ifp = ifp; ++ VBOXCURVNET_RESTORE(); + return 0; + } + +@@ -286,7 +304,9 @@ void vboxNetAdpOsDestroy(PVBOXNETADP pTh + { + struct ifnet *ifp; + ++ VBOXCURVNET_SET(ifp->if_vnet); + ifp = pThis->u.s.ifp; + ether_ifdetach(ifp); + if_free(ifp); ++ VBOXCURVNET_RESTORE(); + } diff --git a/emulators/virtualbox-ose-kmod/files/patch-src-VBox-HostDrivers-VBoxNetFlt-freebsd-VBoxNetFlt-freebsd.c b/emulators/virtualbox-ose-kmod/files/patch-src-VBox-HostDrivers-VBoxNetFlt-freebsd-VBoxNetFlt-freebsd.c new file mode 100644 index 000000000000..185931e4f504 --- /dev/null +++ b/emulators/virtualbox-ose-kmod/files/patch-src-VBox-HostDrivers-VBoxNetFlt-freebsd-VBoxNetFlt-freebsd.c @@ -0,0 +1,31 @@ +The attached patch fixes a kernel crash on FreeBSD 10-CURRENT hosts +with VIMAGE enabled when a VM is powered off. + +Submitted by: Mikolaj Golub <trociny at freebsd.org> +--- src/VBox/HostDrivers/VBoxNetFlt/freebsd/VBoxNetFlt-freebsd.c 2012-03-13 15:15:44.000000000 +0200 ++++ src/VBox/HostDrivers/VBoxNetFlt/freebsd/VBoxNetFlt-freebsd.c 2012-04-01 13:43:02.000000000 +0300 +@@ -651,13 +651,13 @@ bool vboxNetFltOsMaybeRediscovered(PVBOX + ng_rmnode_self(pThis->u.s.node); + pThis->u.s.node = NULL; + } ++ VBOXCURVNET_RESTORE(); + + if (ifp0 != NULL) + { + vboxNetFltOsDeleteInstance(pThis); + vboxNetFltOsInitInstance(pThis, NULL); + } +- VBOXCURVNET_RESTORE(); + + return !ASMAtomicUoReadBool(&pThis->fDisconnectedFromHost); + } +@@ -671,8 +671,10 @@ void vboxNetFltOsDeleteInstance(PVBOXNET + mtx_destroy(&pThis->u.s.inq.ifq_mtx); + mtx_destroy(&pThis->u.s.outq.ifq_mtx); + ++ VBOXCURVNET_SET_FROM_UCRED(); + if (pThis->u.s.node != NULL) + ng_rmnode_self(pThis->u.s.node); ++ VBOXCURVNET_RESTORE(); + pThis->u.s.node = NULL; + } |