Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Jan 2021 22:29:29 +1000
From:      Dima Panov <fluffy@FreeBSD.org>
To:        Stefan Esser <se@freebsd.org>, monochrome <monochrome@twcny.rr.com>,  vbox@freebsd.org, freebsd-current@freebsd.org
Subject:   Re: problem building virtualbox-ose-kmod
Message-ID:  <b2aa2a2f-bf7a-4cfc-9ad6-bf59bfec5e9f@Canary>
In-Reply-To: <e72ae736-39ce-4580-957f-bda007433206@freebsd.org>
References:  <58f5f4d8-c722-35eb-a66e-225d799e4a89@twcny.rr.com> <e72ae736-39ce-4580-957f-bda007433206@freebsd.org>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
Moin!

Stefan, please add check for __FreeBSD_version and fill PR or commit it directly with ports-secteam approval.

--
Dima. (desktop, kde, x11, office, ports-secteam)@FreeBSD team
(fluffy@FreeBSD.org, https://t.me/dima_panov)

> On Tuesday, Jan 26, 2021 at 8:37 PM, Stefan Esser <se@freebsd.org (mailto:se@freebsd.org)> wrote:
> Am 26.01.21 um 07:34 schrieb monochrome:
> > having this issue building virtualbox-ose-kmod, its been like this for a
> > while but I deinstalled and forgot, for quite a while now, maybe over a
> > month. now that I've moved from 13-current to stable/13 I thought I
> > would try to put it back, but it still wont build. I haven't seen anyone
> > 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
> ===================================================================
> --- files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c
> (revision 561738)
> +++ files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c
> (working copy)
> @@ -421,7 +421,8 @@
> @@ -826,6 +885,7 @@ DECLHIDDEN(int) rtR0MemObjNativeProtect(PRTR0MEMOBJINT
> ProtectionFlags |= VM_PROT_EXECUTE;
>
> - int krc = vm_map_protect(pVmMap, AddrStart, AddrEnd,
> ProtectionFlags, FALSE);
> +- int krc = vm_map_protect(pVmMap, AddrStart, AddrEnd,
> ProtectionFlags, FALSE);
> ++ int krc = vm_map_protect(pVmMap, AddrStart, AddrEnd,
> ProtectionFlags, 0, VM_MAP_PROTECT_SET_PROT);
> + IPRT_FREEBSD_RESTORE_EFL_AC();
> if (krc == 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/freebsd.amd64/release/bin/src/vboxdrv/r0drv/freebsd/memobj-r0drv-freebsd.c:887:80:
> > error: too few arguments to function call, expected 6, have 5
> > int krc = vm_map_protect(pVmMap, AddrStart, AddrEnd,
> > ProtectionFlags, FALSE);
> > ~~~~~~~~~~~~~~ ^
> > /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,
> > ^
> > 1 error generated.
> > *** [memobj-r0drv-freebsd.o] Error code 1

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: Canary PGP V3

iQJVBAABCgA/OBxEaW1hIFBhbm92IChGcmVlQlNELk9SRyBDb21taXR0ZXIpIDxm
bHVmZnlARnJlZUJTRC5PUkc+BQJgEAspAAoJEPuLoJ3VOY8puFcQAKUHvvMXbGvL
Io/p5PA1RFWB6CgU7Fo3RztoTI7rtUk1VmPtOBuaZnhMIdjwbahUG36yBBnc8kUh
YdQDP2qyrSiCI0SUYBkJ+CDaQXjmfP/ftnS/1mnQmY3VG2JOEQPj1ZsGo7qsYHsK
tqa2ZLFZ3hufGxi4y+wzTsK5BgY+ZVUaEDFaSIXENoJX6KmHzB2dL6YsGAXNPhbJ
YApmdatABTHqwXtVETpZlYfcNpuLSuky1iIq3RP0vuraMtwrkWYd/wdqs8FpTGdq
1GTqbXbxoZdE0BhO88ZxpiIhyrusVHhM2nEIIuLXQpzx3O6WrZiZ/Y3BLcoju25e
zxL93bx9FOvphBsCYhHanRySbH/JADZ0LbnpIMd/gMo5XgYxnAcINCNmHtQzJz+O
rJjHtgJAFiAu+275uAJ54kLQBg+CB282ZR+s4SSTjbEK4oJOqntwcnudmPXtJ396
MCrgaYu8+XHNDio92dH978pb4rTcLaLNRFDc4+RWZZd8IPLtJHjAAhKSpwqkmHIH
FtxikxmUv5ahGhha0hF3Ub02r4Wu8uOoPDVTDLQ9KSCPI0ns/jLp/Lic16sTLKCf
c7/lAn5B9LZNlE49v42pI6LqSDOaaHNZykAklGzifhTKcbbzLgBztpY4NvUzd09x
FIhy2Y7ysxUW8KjncAdrh4qXBY6GKe+H
=f9BJ
-----END PGP SIGNATURE-----
help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b2aa2a2f-bf7a-4cfc-9ad6-bf59bfec5e9f>