Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Jan 2021 11:37:07 +0100
From:      Stefan Esser <se@freebsd.org>
To:        monochrome <monochrome@twcny.rr.com>, freebsd-current@freebsd.org, vbox@freebsd.org
Subject:   Re: problem building virtualbox-ose-kmod
Message-ID:  <e72ae736-39ce-4580-957f-bda007433206@freebsd.org>
In-Reply-To: <58f5f4d8-c722-35eb-a66e-225d799e4a89@twcny.rr.com>
References:  <58f5f4d8-c722-35eb-a66e-225d799e4a89@twcny.rr.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--P7OaZggnK0c8QiOnbeAJJ10r7XHon264g
Content-Type: multipart/mixed; boundary="AjrSzzkctWH2XIyyZPMuxFXfrBOhsVZYV";
 protected-headers="v1"
From: Stefan Esser <se@freebsd.org>
To: monochrome <monochrome@twcny.rr.com>, freebsd-current@freebsd.org,
 vbox@freebsd.org
Message-ID: <e72ae736-39ce-4580-957f-bda007433206@freebsd.org>
Subject: Re: problem building virtualbox-ose-kmod
References: <58f5f4d8-c722-35eb-a66e-225d799e4a89@twcny.rr.com>
In-Reply-To: <58f5f4d8-c722-35eb-a66e-225d799e4a89@twcny.rr.com>

--AjrSzzkctWH2XIyyZPMuxFXfrBOhsVZYV
Content-Type: multipart/mixed;
 boundary="------------69E1665DBA71162CF8272AFF"
Content-Language: de-DE

This is a multi-part message in MIME format.
--------------69E1665DBA71162CF8272AFF
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: quoted-printable

Am 26.01.21 um 07:34 schrieb monochrome:
> having this issue building virtualbox-ose-kmod, its been like this for =
a=20
> while but I deinstalled and forgot, for quite a while now, maybe over a=
=20
> month. now that I've moved from 13-current to stable/13 I thought I=20
> would try to put it back, but it still wont build. I haven't seen anyon=
e=20
> else with this problem, did I miss a memo?

I have sent a patch to vbox@on 2020-01-16, but only received an
automatic reply that it had to be accepted by the moderator of the
list (and never got any further reply or reaction on it).

The signature of vm_map_protect() has changed, but the port has not
been updated.

Here is the patch in case the attachment gets stripped (but probably
with messed-up white-space):

Index: files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c=20
(revision 561738)
+++ files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c=20
(working copy)
@@ -421,7 +421,8 @@
  @@ -826,6 +885,7 @@ DECLHIDDEN(int) rtR0MemObjNativeProtect(PRTR0MEMOBJ=
INT
           ProtectionFlags |=3D VM_PROT_EXECUTE;

-     int krc =3D vm_map_protect(pVmMap, AddrStart, AddrEnd,=20
ProtectionFlags, FALSE);
+-    int krc =3D vm_map_protect(pVmMap, AddrStart, AddrEnd,=20
ProtectionFlags, FALSE);
++    int krc =3D vm_map_protect(pVmMap, AddrStart, AddrEnd,=20
ProtectionFlags, 0, VM_MAP_PROTECT_SET_PROT);
  +    IPRT_FREEBSD_RESTORE_EFL_AC();
       if (krc =3D=3D KERN_SUCCESS)
           return VINF_SUCCESS;

Seems that __FreeBSD_version has been bumped to 1300135 less than
2 hours before 0659df6faddfb27ba54a2cae2a12552cf4f823a0 and thus
the patch could be made to depend on that __FreeBSD_version value,
but I did not bother to add the condition since all my systems have
been updated to newer versions.

Regards, STefan

> --- memobj-r0drv-freebsd.o ---
> /usr/ports/emulators/virtualbox-ose-kmod/work/VirtualBox-5.2.44/out/fre=
ebsd.amd64/release/bin/src/vboxdrv/r0drv/freebsd/memobj-r0drv-freebsd.c:8=
87:80:=20
> error: too few arguments to function call, expected 6, have 5
>  =A0=A0=A0 int krc =3D vm_map_protect(pVmMap, AddrStart, AddrEnd,=20
> ProtectionFlags, FALSE);
>  =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ~~~~~~~~~~~~~~ =A0=A0=A0=A0=A0=
=A0 ^
> /usr/src/sys/vm/vm_map.h:517:5: note: 'vm_map_protect' declared here
> int vm_map_protect(vm_map_t map, vm_offset_t start, vm_offset_t end,
>  =A0=A0=A0 ^
> 1 error generated.
> *** [memobj-r0drv-freebsd.o] Error code 1

--------------69E1665DBA71162CF8272AFF
Content-Type: text/plain; charset=UTF-8; x-mac-type="0"; x-mac-creator="0";
 name="vbox-ose-port.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
 filename="vbox-ose-port.diff"

Index: files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c	(re=
vision 561738)
+++ files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c	(wo=
rking copy)
@@ -421,7 +421,8 @@
 @@ -826,6 +885,7 @@ DECLHIDDEN(int) rtR0MemObjNativeProtect(PRTR0MEMOBJI=
NT
          ProtectionFlags |=3D VM_PROT_EXECUTE;
 =20
-     int krc =3D vm_map_protect(pVmMap, AddrStart, AddrEnd, ProtectionFl=
ags, FALSE);
+-    int krc =3D vm_map_protect(pVmMap, AddrStart, AddrEnd, ProtectionFl=
ags, FALSE);
++    int krc =3D vm_map_protect(pVmMap, AddrStart, AddrEnd, ProtectionFl=
ags, 0, VM_MAP_PROTECT_SET_PROT);
 +    IPRT_FREEBSD_RESTORE_EFL_AC();
      if (krc =3D=3D KERN_SUCCESS)
          return VINF_SUCCESS;

--------------69E1665DBA71162CF8272AFF--

--AjrSzzkctWH2XIyyZPMuxFXfrBOhsVZYV--

--P7OaZggnK0c8QiOnbeAJJ10r7XHon264g
Content-Type: application/pgp-signature; name="OpenPGP_signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="OpenPGP_signature"

-----BEGIN PGP SIGNATURE-----

wsB5BAABCAAjFiEEo3HqZZwL7MgrcVMTR+u171r99UQFAmAP8NMFAwAAAAAACgkQR+u171r99UTE
zgf+N6f7Ac1o28WjqBoWVWudWny341LQODErfx3GspMs1R1CcYouSPawpkUsabCioW3plqc179RC
T4PZdXWF+rHklNWMJLOEtKvqOg2+IxKtrYkI/oYfANgochZL10oQsIi07nTk1n5763BljQbBz5O5
RsHPCVSDRfFl52DWvFvIBk0lslc8dkB1myqNrD4QeP6BiBLNDHvNLJxzhV7SVmB5UAuF1JPrNvNr
iA7o2Y+7m7JjcfMGqVP++gi+KyhXqDOL2JycYMXhoGS4LYT321I1xq99xZfeltDfHdGfttqspube
ttKv45f1h5IEIbfSCrxSjpx76R/uFD1C3v/mpSKgJw==
=iy7u
-----END PGP SIGNATURE-----

--P7OaZggnK0c8QiOnbeAJJ10r7XHon264g--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e72ae736-39ce-4580-957f-bda007433206>