From nobody Sun Oct 17 09:32:42 2021 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A43E71807124; Sun, 17 Oct 2021 09:32:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HXFCt2pq1z3lPh; Sun, 17 Oct 2021 09:32:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3943427DD; Sun, 17 Oct 2021 09:32:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 19H9Wgrx073827; Sun, 17 Oct 2021 09:32:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 19H9Wgug073826; Sun, 17 Oct 2021 09:32:42 GMT (envelope-from git) Date: Sun, 17 Oct 2021 09:32:42 GMT Message-Id: <202110170932.19H9Wgug073826@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Guido Falsi Subject: git: c43e12a46f32 - main - emulators/virtualbox-ose-additions-legacy: Import improvements from non legacy port List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: madpilot X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c43e12a46f329c2ff336f06c61a6eb6be0ac9108 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by madpilot: URL: https://cgit.FreeBSD.org/ports/commit/?id=c43e12a46f329c2ff336f06c61a6eb6be0ac9108 commit c43e12a46f329c2ff336f06c61a6eb6be0ac9108 Author: Guido Falsi AuthorDate: 2021-10-17 09:29:56 +0000 Commit: Guido Falsi CommitDate: 2021-10-17 09:32:33 +0000 emulators/virtualbox-ose-additions-legacy: Import improvements from non legacy port Import changes from commit 1b2394551c0385 to legacy port: In the virtualbox virtual filesystem code we ship as a patch some code in an else block is commented out. This produces a code path in which a pointer variable is dereferenced in an unassigned state, causing random crashes. Lacking a better fix, give a default value of NULL to the pointer, which at least avoids the random pointer dereference issue. PR: 255386 Alsso import fix for building on recent head from cec55f41e10f13: Fix build after head commit b4a58fbf640409a1 (vfs: remove cn_thread) MFH: 2021Q4 --- emulators/virtualbox-ose-legacy/Makefile | 2 +- ...VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c | 25 +++++++++------------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/emulators/virtualbox-ose-legacy/Makefile b/emulators/virtualbox-ose-legacy/Makefile index e51925fdddf8..fa4c0a7f749f 100644 --- a/emulators/virtualbox-ose-legacy/Makefile +++ b/emulators/virtualbox-ose-legacy/Makefile @@ -2,7 +2,7 @@ PORTNAME= virtualbox-ose PORTVERSION= 5.2.44 -PORTREVISION= 8 +PORTREVISION= 9 CATEGORIES= emulators MASTER_SITES= https://download.oracle.com/virtualbox/${PORTVERSION}/ PKGNAMESUFFIX?= -legacy diff --git a/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c index bc42812105e4..068f98f21d1c 100644 --- a/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c +++ b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c @@ -1,18 +1,6 @@ ---- src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vnops.c.orig 2020-07-09 16:50:11 UTC +--- src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vnops.c.orig 2021-07-28 16:16:27 UTC +++ src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vnops.c -@@ -1,10 +1,6 @@ --/* $Id: vboxvfs_vnops.c $ */ --/** @file -- * Description. -- */ -- - /* - * Copyright (C) 2008-2017 Oracle Corporation -+ * Copyright (C) 2017 Mahdi Mokhtari - * - * This file is part of VirtualBox Open Source Edition (OSE), as - * available from http://www.virtualbox.org. This file is free software; -@@ -14,228 +10,1347 @@ +@@ -14,228 +14,1354 @@ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. */ @@ -172,6 +160,9 @@ + .vop_write = vboxfs_write, + .vop_bmap = VOP_EOPNOTSUPP }; ++#if __FreeBSD_version > 1300068 ++VFS_VOP_VECTOR_REGISTER(vboxfs_vnodeops); ++#endif -static int vboxvfs_access(struct vop_access_args *ap) +static uint64_t @@ -1128,7 +1119,7 @@ + struct vnode *vp = ap->a_vp; + struct uio *uio = ap->a_uio; + struct vboxfs_node *dir = VP_TO_VBOXFS_NODE(vp); -+ struct vboxfs_node *node; ++ struct vboxfs_node *node = NULL; + struct sffs_dirent *dirent = NULL; + sffs_dirents_t *cur_buf; + off_t offset = 0; @@ -1406,7 +1397,11 @@ + cnp->cn_flags & DOWHITEOUT && + cnp->cn_flags & ISWHITEOUT))) { + error = VOP_ACCESS(dvp, VWRITE, cnp->cn_cred, ++#if __FreeBSD_version < 1400037 + cnp->cn_thread); ++#else ++ curthread); ++#endif + if (error != 0) + goto out; +