From owner-freebsd-emulation@freebsd.org Wed Jun 24 04:15:51 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 39EE8341E6C for ; Wed, 24 Jun 2020 04:15:51 +0000 (UTC) (envelope-from mi+m@aldan.algebra.com) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 49s8vq06x7z4XHY for ; Wed, 24 Jun 2020 04:15:51 +0000 (UTC) (envelope-from mi+m@aldan.algebra.com) Received: by mailman.nyi.freebsd.org (Postfix) id 042B23421BE; Wed, 24 Jun 2020 04:15:51 +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 03F5B342382 for ; Wed, 24 Jun 2020 04:15:51 +0000 (UTC) (envelope-from mi+m@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 49s8vp5mKCz4XHX for ; Wed, 24 Jun 2020 04:15:50 +0000 (UTC) (envelope-from mi+m@aldan.algebra.com) Received: by freefall.freebsd.org (Postfix) id B02CD14AC7; Wed, 24 Jun 2020 04:15:50 +0000 (UTC) Delivered-To: vbox@localmail.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) (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 A391014C98; Wed, 24 Jun 2020 04:15:50 +0000 (UTC) (envelope-from mi+m@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 49s8vn41QFz4X8J; Wed, 24 Jun 2020 04:15:49 +0000 (UTC) (envelope-from mi+m@aldan.algebra.com) Received: from [100.67.93.114] (209.sub-174-225-17.myvzw.com [174.225.17.209]) (authenticated bits=0) by symbion.zaytman.com (8.15.2/8.15.2) with ESMTPSA id 05O4Ffnl052449 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 24 Jun 2020 00:15:41 -0400 (EDT) (envelope-from mi+m@aldan.algebra.com) X-Authentication-Warning: symbion.zaytman.com: Host 209.sub-174-225-17.myvzw.com [174.225.17.209] claimed to be [100.67.93.114] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: "Mikhail T." Mime-Version: 1.0 (1.0) Subject: Re: Old bug in patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vfsops.c Date: Wed, 24 Jun 2020 00:15:37 -0400 Message-Id: <72075655-676A-461A-8E2C-87AA866D6E68@aldan.algebra.com> References: <202006231847.05NIl6eH007223@higson.cam.lispworks.com> Cc: "Mikhail T." , "jkim@freebsd.org" , "mmokhi@freebsd.org" , "vbox@freebsd.org" In-Reply-To: <202006231847.05NIl6eH007223@higson.cam.lispworks.com> To: Martin Simmons X-Mailer: iPhone Mail (17F80) X-Rspamd-Queue-Id: 49s8vn41QFz4X8J 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.51 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; HAS_XAW(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; RECEIVED_SPAMHAUS_PBL(0.00)[174.225.17.209:received]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:394548, ipnet:64.112.176.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_FROM(0.00)[m]; R_DKIM_NA(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.69)[-0.694]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.17)[0.165]; NEURAL_HAM_LONG(-0.86)[-0.857]; TAGGED_RCPT(0.00)[t]; MIME_GOOD(-0.10)[text/plain]; AUTH_NA(1.00)[]; DMARC_NA(0.00)[algebra.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_NA(0.00)[no SPF record]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; SUSPICIOUS_RECIPS(1.50)[] X-Mailman-Approved-At: Wed, 24 Jun 2020 09:42:02 +0000 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: Wed, 24 Jun 2020 04:15:51 -0000 I don=E2=80=99t know - the compiler only warned about the bzero :-) But you may be right - and the module never worked for me anyway... --=20 Sent from mobile device, please, pardon shorthand. > 23 =D1=87=D0=B5=D1=80=D0=B2. 2020 =D1=80. =D0=BE 14:47 Martin Simmons =D0=BF=D0=B8=D1=88=D0=B5: >=20 > =EF=BB=BFIs the memcpy wrong too? It looks like fsinfo.serial is a single= uint32_t > (i.e. 32 bits), but mp->mnt_stat.f_fsid is a pair of int32_t (i.e. 64 bits= ), > so copying this pair from fsinfo.serial is wrong. >=20 > __Martin >=20 >=20 >>>>>> On Mon, 22 Jun 2020 14:22:05 -0400, Mikhail T said: >>=20 >> Gentlemen! >>=20 >> An old bug in the patch is causing compiler-warnings, and leads to=20 >> erroneous behavior where pointers are bigger than 32-bit. >>=20 >> Moreover, given the memcpy right after it, the bzero is simply not=20 >> needed at all. Instead of removing the bogus ampersand, the entire line=20= >> should be deleted. (I would've replaced the memcpy with an assignment=20 >> too, but that's not as pressing.) >>=20 >> Can I commit this? >>=20 >> Index: files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vfsops.= 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_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 th= e >> * hope that it will be useful, but WITHOUT ANY WARRANTY of any kin= d. >> */ >> @@ -466,7 +466,6 @@ >> + >> + MNT_ILOCK(mp); >> + mp->mnt_data =3D 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 |=3D MNT_LOCAL; >>=20 >> Thanks. Yours, >>=20 >> -mi >>=20 >> _______________________________________________ >> freebsd-emulation@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-emulation >> To unsubscribe, send any mail to "freebsd-emulation-unsubscribe@freebsd.o= rg" >>=20