Date: Sat, 16 Jan 2021 18:34:00 +0100 From: Stefan Esser <se@freebsd.org> To: vbox@freebsd.org, Konstantin Belousov <kib@FreeBSD.org> Subject: [PATCH] Fix virtualbox-ose and virtualbox-ose-kmod ports Message-ID: <c8dcc24b-3975-0efc-d92c-507e0886a704@freebsd.org>
next in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --97kIgTLGTqXLIDrvApzahFrwpnU1nSoAn Content-Type: multipart/mixed; boundary="4LYttizyjC1bNKukAFNCUJHRLnGdc9aWz"; protected-headers="v1" From: Stefan Esser <se@freebsd.org> To: vbox@freebsd.org, Konstantin Belousov <kib@FreeBSD.org> Message-ID: <c8dcc24b-3975-0efc-d92c-507e0886a704@freebsd.org> Subject: [PATCH] Fix virtualbox-ose and virtualbox-ose-kmod ports --4LYttizyjC1bNKukAFNCUJHRLnGdc9aWz Content-Type: multipart/mixed; boundary="------------C1F418F6ADD557E90A263439" Content-Language: en-US This is a multi-part message in MIME format. --------------C1F418F6ADD557E90A263439 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable Hi, the following commit broke several virtualbox ports: commit 0659df6faddfb27ba54a2cae2a12552cf4f823a0 Author: Konstantin Belousov <kib@FreeBSD.org> Date: Tue Jan 12 14:43:39 2021 +0200 vm_map_protect: allow to set prot and max_prot in one go. This prevents a situation where other thread modifies map entries permissions between setting max_prot, then relocking, then setting=20 prot, confusing the operation outcome. E.g. you can get an error that is = not possible if operation is performed atomic. Also enable setting rwx for max_prot even if map does not allow to s= et effective rwx protection. Reviewed by: brooks, markj (previous version) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28117 A simple patch is applied, but it does not take the kernel version into account (-CURRENT before the function signature has been changed and -STABLE). 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. Regards, STefan --------------C1F418F6ADD557E90A263439 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; --------------C1F418F6ADD557E90A263439-- --4LYttizyjC1bNKukAFNCUJHRLnGdc9aWz-- --97kIgTLGTqXLIDrvApzahFrwpnU1nSoAn Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsB5BAABCAAjFiEEo3HqZZwL7MgrcVMTR+u171r99UQFAmADI4gFAwAAAAAACgkQR+u171r99URu tAf/aEBxgO8EZs2ymsQb+TgOlGST+mAJ1yH4N4RFM9uOjOeSJmBTM0a98xYd750J/DPuqXMMMFkF epUqD1pEhh9dzL/0dr3vERCXVn2lRldJunc2ok/WJKxaocZA2L5uOtgKueNT4zHOSmpwRPRsjNgC CNLssTcrRU+2mcgkcmmsXwyDADnoa28SebsXtf3HKMkGUsIw0S+apcy0RWH8+tCw6KvdyCGt1/K3 u2Zpb09OmSG3WwfLiso9Ijd7awFcEVxHlpOcFnHmfzKOH+T+5k/kmHCR2D45hJ2YYBFaINQ2lHI9 HnfzPJ7Vqf77Bko3+DqxNVR9bF1tsFh2N+UzjRlwbA== =WrcJ -----END PGP SIGNATURE----- --97kIgTLGTqXLIDrvApzahFrwpnU1nSoAn--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c8dcc24b-3975-0efc-d92c-507e0886a704>