From owner-freebsd-current@freebsd.org Tue Jan 26 10:37:08 2021 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DCD9D4E85E3 for ; Tue, 26 Jan 2021 10:37:08 +0000 (UTC) (envelope-from se@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DQ3845lHxz3LwG; Tue, 26 Jan 2021 10:37:08 +0000 (UTC) (envelope-from se@freebsd.org) Received: from Stefans-MBP-449.fritz.box (p200300cd5f21fb00249b097784dcfa70.dip0.t-ipconnect.de [IPv6:2003:cd:5f21:fb00:249b:977:84dc:fa70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: se/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 3ADA089E5; Tue, 26 Jan 2021 10:37:08 +0000 (UTC) (envelope-from se@freebsd.org) To: monochrome , freebsd-current@freebsd.org, vbox@freebsd.org References: <58f5f4d8-c722-35eb-a66e-225d799e4a89@twcny.rr.com> From: Stefan Esser Subject: Re: problem building virtualbox-ose-kmod Message-ID: Date: Tue, 26 Jan 2021 11:37:07 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <58f5f4d8-c722-35eb-a66e-225d799e4a89@twcny.rr.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="P7OaZggnK0c8QiOnbeAJJ10r7XHon264g" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2021 10:37:08 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --P7OaZggnK0c8QiOnbeAJJ10r7XHon264g Content-Type: multipart/mixed; boundary="AjrSzzkctWH2XIyyZPMuxFXfrBOhsVZYV"; protected-headers="v1" From: Stefan Esser To: monochrome , freebsd-current@freebsd.org, vbox@freebsd.org Message-ID: 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--