From owner-freebsd-emulation@freebsd.org Mon Jun 22 18:22:09 2020 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 E601E33641F for ; Mon, 22 Jun 2020 18:22:09 +0000 (UTC) (envelope-from mi+t@aldan.algebra.com) 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 49rHnF584Tz47r5 for ; Mon, 22 Jun 2020 18:22:09 +0000 (UTC) (envelope-from mi+t@aldan.algebra.com) Received: by mailman.nyi.freebsd.org (Postfix) id B084C33641C; Mon, 22 Jun 2020 18:22:09 +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 B04A4336609 for ; Mon, 22 Jun 2020 18:22:09 +0000 (UTC) (envelope-from mi+t@aldan.algebra.com) 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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49rHnF3MKyz47r4 for ; Mon, 22 Jun 2020 18:22:09 +0000 (UTC) (envelope-from mi+t@aldan.algebra.com) Received: by freefall.freebsd.org (Postfix) id 6762A13410; Mon, 22 Jun 2020 18:22:09 +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 "Let's Encrypt Authority X3" (verified OK)) by freefall.freebsd.org (Postfix) with ESMTPS id 5678D130E9; Mon, 22 Jun 2020 18:22:09 +0000 (UTC) (envelope-from mi+t@aldan.algebra.com) Received: from symbion.zaytman.com (symbion.zaytman.com [64.112.176.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "symbion", Issuer "Narawntapu" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 49rHnD0lgZz47nZ; Mon, 22 Jun 2020 18:22:07 +0000 (UTC) (envelope-from mi+t@aldan.algebra.com) Received: from narawntapu.narawntapu (pool-100-1-228-105.nwrknj.fios.verizon.net [100.1.228.105]) by symbion.zaytman.com (8.15.2/8.15.2) with ESMTPS id 05MIM6mD014119 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 22 Jun 2020 14:22:06 -0400 (EDT) (envelope-from mi+t@aldan.algebra.com) X-Authentication-Warning: symbion.zaytman.com: Host pool-100-1-228-105.nwrknj.fios.verizon.net [100.1.228.105] claimed to be narawntapu.narawntapu Received: from aldan.narawntapu (aldan [192.168.3.13]) by narawntapu.narawntapu (8.15.2/8.15.2) with ESMTP id 05MIM5t0061521; Mon, 22 Jun 2020 14:22:05 -0400 (EDT) (envelope-from mi+t@aldan.algebra.com) X-Authentication-Warning: narawntapu.narawntapu: Host aldan [192.168.3.13] claimed to be aldan.narawntapu To: Jung-uk Kim , mmokhi@FreeBSD.org, vbox@freebsd.org From: "Mikhail T." Subject: Old bug in patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vfsops.c Message-ID: <101fc234-e5c2-e8c3-9c07-3eb922c01736@aldan.algebra.com> Date: Mon, 22 Jun 2020 14:22:05 -0400 MIME-Version: 1.0 Content-Language: en-US X-DCC-MGTINTERNET-Metrics: narawntapu 1170; bulk rep Body=3 Fuz1=3 Fuz2=3 rep=69% X-Rspamd-Queue-Id: 49rHnD0lgZz47nZ X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of mi@aldan.algebra.com has no SPF policy when checking 64.112.176.10) smtp.mailfrom=mi@aldan.algebra.com X-Spamd-Result: default: False [1.05 / 15.00]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.47)[-0.471]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; HAS_XAW(0.00)[]; DMARC_NA(0.00)[algebra.com]; AUTH_NA(1.00)[]; NEURAL_SPAM_SHORT(0.11)[0.106]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_SPAM_LONG(0.51)[0.515]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:394548, ipnet:64.112.176.0/24, country:US]; TAGGED_FROM(0.00)[t]; MID_RHS_MATCH_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[100.1.228.105:received] X-Mailman-Approved-At: Tue, 23 Jun 2020 04:33:14 +0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.33 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: Mon, 22 Jun 2020 18:22:10 -0000 Gentlemen! An old bug in the patch is causing compiler-warnings, and leads to erroneous behavior where pointers are bigger than 32-bit. Moreover, given the memcpy right after it, the bzero is simply not needed at all. Instead of removing the bogus ampersand, the entire line should be deleted. (I would've replaced the memcpy with an assignment too, but that's not as pressing.) Can I commit this? Index: files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vfsops.c =================================================================== --- files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vfsops.c (revision 539883) +++ files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vfsops.c (working copy) @@ -11,7 +11,7 @@    *    * This file is part of VirtualBox Open Source Edition (OSE), as    * available from http://www.virtualbox.org. This file is free software; -@@ -14,245 +9,479 @@ +@@ -14,245 +9,478 @@    * VirtualBox OSE distribution. VirtualBox OSE is distributed in the    * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.    */ @@ -466,7 +466,6 @@  +  +      MNT_ILOCK(mp);  +      mp->mnt_data = vboxfsmp; *-+      bzero(&mp->mnt_stat.f_fsid, sizeof(&mp->mnt_stat.f_fsid));*  +      /* f_fsid is int32_t but serial is uint32_t, convert */  +      memcpy(&mp->mnt_stat.f_fsid, &fsinfo.serial, sizeof(mp->mnt_stat.f_fsid));  +      mp->mnt_flag |= MNT_LOCAL; Thanks. Yours, -mi