From owner-freebsd-emulation@freebsd.org Sat Jan 16 17:34:04 2021 Return-Path: Delivered-To: freebsd-emulation@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 D4A234E5AF6 for ; Sat, 16 Jan 2021 17:34:04 +0000 (UTC) (envelope-from se@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4DJ4sm50rbz4ZpF for ; Sat, 16 Jan 2021 17:34:04 +0000 (UTC) (envelope-from se@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id ABA424E5E07; Sat, 16 Jan 2021 17:34:04 +0000 (UTC) Delivered-To: emulation@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 AB65A4E5AF5 for ; Sat, 16 Jan 2021 17:34:04 +0000 (UTC) (envelope-from se@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (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 "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DJ4sm3zdzz4ZpD for ; Sat, 16 Jan 2021 17:34:04 +0000 (UTC) (envelope-from se@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1610818444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=hy7lHZQ6TM5wvE+hbI9j6fqCM8mWpoqlJaC9eEx1XVQ=; b=L9EGlT/y0MB4WBbYetW70RBsPAnvwHcw20JwSW6Z87WKeQzAZY/9QVaEtemWDSJw6VAZuR dfX4xpSYgvDwr2XZMJk2Vyoe2BN/b+NEFmIIwrnPFbLCv6I7f+WPULRwAEz0madQWOx3bB PZ3nGFdzWberAcu5yy2CFLKEU28QHAuJ/Dl9oVF4oiknkEmzmGEDGzO4/hEBSy8xrHGdbd CHFutTHvr0Xe0Vqpom5eKJjbtlyxE4qKW+uJxDk0+9sELw/qynG/visGhF8jrbAsLp2FXV QqToDof6p8elHuZBjzFTE8uniRFcnCCyVD2zN0o0B/Vjmq86HWpmW1cIZSyy4A== Received: by freefall.freebsd.org (Postfix) id 792A019FB4; Sat, 16 Jan 2021 17:34:04 +0000 (UTC) Delivered-To: vbox@localmail.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits)) (Client CN "mx1.freebsd.org", Issuer "R3" (verified OK)) by freefall.freebsd.org (Postfix) with ESMTPS id 6D43919ED9; Sat, 16 Jan 2021 17:34:04 +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 4DJ4sm1gndz4b01; Sat, 16 Jan 2021 17:34:04 +0000 (UTC) (envelope-from se@freebsd.org) Received: from Stefans-MBP-WLAN.fritz.box (p200300cd5f211b005dbdaf74e2f9b8ec.dip0.t-ipconnect.de [IPv6:2003:cd:5f21:1b00:5dbd:af74:e2f9:b8ec]) (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 BDDE42BC6D; Sat, 16 Jan 2021 17:34:03 +0000 (UTC) (envelope-from se@freebsd.org) To: vbox@freebsd.org, Konstantin Belousov From: Stefan Esser Subject: [PATCH] Fix virtualbox-ose and virtualbox-ose-kmod ports Message-ID: Date: Sat, 16 Jan 2021 18:34:00 +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 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="97kIgTLGTqXLIDrvApzahFrwpnU1nSoAn" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1610818444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=hy7lHZQ6TM5wvE+hbI9j6fqCM8mWpoqlJaC9eEx1XVQ=; b=Tv9xSJIa5zZS/i+37I4TWXqDdxgdLvoMnuAGWhm9Ml+SO222MMfgZJBVy4OrN9wATL6YGT UBcYfOLBAK/oGQxCW7uBb988GFm2hA9iw6WQiBKMlfop74noOH1XO3QGOwEKFuMzsalpzx JNrD9d/7meW8Tk5kLcc0SOgr8An7C/JAS6koJbfBk5QaBKM7MF3Hh6r2FAKm2EDxX+juPA j4AZEPxP2LsEAUKi7RLGOqwDmaDq9doegB/FchpFVnOlpQsztKaFRvJw74v9J385aLNqI5 YSg5WzlD2oBSbeQnJxr+c0rU94XCyuxEBjfNYJdUkLyrEUKVltU4mABVkxXV/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1610818444; a=rsa-sha256; cv=none; b=bNKM3bIzke88IFFQMBKq9CdqeZybAIXQpGB0Cm+217m/cTTYhL8x991xa7zA0UNZVPdApP aonPcq1ePwBbx0iKAegCozkGqoB2Gh3YgJty5GQ1PHUJ7MImOaC+4KDkk09Vs/hnwP1OD6 qzj/mJ8pojR3zGH95HV/UAbxUEMW821kemigSydeSd45T7IfGtOdFDIjpvb9o4jc4b8tQt IvoXT7TotchzJ77EKQfUGmyIYPzczChvGtz4UfneDjeBIbSa7jELhbbd38LjVkRlmaEizA eJv6eaTHpKzfp2PaTG8JpJ9ls6ea1QmqOovnna2Ypsv2EfB55zn3cGRTenjK9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-Mailman-Approved-At: Sun, 17 Jan 2021 08:20:25 +0000 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 17:34:04 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --97kIgTLGTqXLIDrvApzahFrwpnU1nSoAn Content-Type: multipart/mixed; boundary="4LYttizyjC1bNKukAFNCUJHRLnGdc9aWz"; protected-headers="v1" From: Stefan Esser To: vbox@freebsd.org, Konstantin Belousov Message-ID: 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 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--