From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 16:31:16 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2ED3106564A; Fri, 27 Mar 2009 16:31:16 +0000 (UTC) (envelope-from dchagin@dchagin.static.corbina.ru) Received: from contrabass.post.ru (contrabass.post.ru [85.21.78.5]) by mx1.freebsd.org (Postfix) with ESMTP id 3D94E8FC1B; Fri, 27 Mar 2009 16:31:15 +0000 (UTC) (envelope-from dchagin@dchagin.static.corbina.ru) Received: from corbina.ru (mail.post.ru [195.14.50.16]) by contrabass.post.ru (Postfix) with ESMTP id BD05A79DBE; Fri, 27 Mar 2009 19:31:13 +0300 (MSK) X-Virus-Scanned: by cgpav Uf39PSi9pFi9oFi9 Received: from [10.208.17.3] (HELO dchagin.static.corbina.ru) by corbina.ru (CommuniGate Pro SMTP 5.1.14) with ESMTPS id 1704617522; Fri, 27 Mar 2009 19:31:13 +0300 Received: from dchagin.static.corbina.ru (localhost.chd.net [127.0.0.1]) by dchagin.static.corbina.ru (8.14.3/8.14.3) with ESMTP id n2RGVDMk007619; Fri, 27 Mar 2009 19:31:13 +0300 (MSK) (envelope-from dchagin@dchagin.static.corbina.ru) Received: (from dchagin@localhost) by dchagin.static.corbina.ru (8.14.3/8.14.3/Submit) id n2RGV7fv007618; Fri, 27 Mar 2009 19:31:07 +0300 (MSK) (envelope-from dchagin) Date: Fri, 27 Mar 2009 19:31:07 +0300 From: Chagin Dmitry To: Doug Ambrisko Message-ID: <20090327163107.GA7564@dchagin.static.corbina.ru> References: <20090327060643.GA1937@dchagin.static.corbina.ru> <200903271547.n2RFl1qh044116@ambrisko.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LZvS9be/3tNcYl/X" Content-Disposition: inline In-Reply-To: <200903271547.n2RFl1qh044116@ambrisko.com> User-Agent: Mutt/1.5.19 (2009-01-05) Cc: Doug Ambrisko , src-committers@freebsd.org, John Baldwin , Roman Divacky , svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r190445 - in head/sys: amd64/linux32 compat/linprocfs compat/linux conf dev/ipmi modules/ipmi modules/linprocfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2009 16:31:17 -0000 --LZvS9be/3tNcYl/X Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 27, 2009 at 08:47:01AM -0700, Doug Ambrisko wrote: > Chagin Dmitry writes: > | On Thu, Mar 26, 2009 at 05:08:59PM -0700, Doug Ambrisko wrote: > [snip] > | > Okay, I did some more instrumenting again and found that I was=20 > | > slightly wrong. The mmap that was failing was 0xcf79c000 and not > | > 0xf0000. This probably makes since since the sign bit was set > | > on 0xcf79c000. However, it appear mmap doesn't really do negative > | > seeks. Looking at the freebsd32_mmap the structure it uses for > | > args is: > | > struct freebsd6_freebsd32_mmap_args { > | > char addr_l_[PADL_(caddr_t)]; caddr_t addr; char addr_r_[PADR= _(caddr_t)]; > | > char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(siz= e_t)]; > | > char prot_l_[PADL_(int)]; int prot; char prot_r_[PADR_(int)]; > | > char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int= )]; > | > char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; > | > char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; > | > char poslo_l_[PADL_(u_int32_t)]; u_int32_t poslo; char poslo_= r_[PADR_(u_int32_t)]; > | > char poshi_l_[PADL_(u_int32_t)]; u_int32_t poshi; char poshi_= r_[PADR_(u_int32_t)]; > | > }; > | > with both the high and the lows being u_int32_t. > | >=20 > | > So I wonder if in the linux32 the structure that is: > | > struct l_mmap_argv { > | > l_uintptr_t addr; > | > l_size_t len; > | > l_int prot; > | > l_int flags; > | > l_int fd; > | > l_off_t pgoff; > | > } __packed; > | > should be uint32_t for pgoff? > |=20 > | yes, you are right. s/uint32_t/l_ulong/ :) > | also remove __packed. > | thnx! >=20 > Index: linux.h > =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 > RCS file: /usr/local/cvsroot/freebsd/src/sys/amd64/linux32/linux.h,v > retrieving revision 1.24 > diff -u -p -r1.24 linux.h > --- linux.h 26 Mar 2009 17:14:22 -0000 1.24 > +++ linux.h 27 Mar 2009 15:38:40 -0000 > @@ -79,7 +79,7 @@ typedef l_ulong l_ino_t; > typedef l_int l_key_t; > typedef l_longlong l_loff_t; > typedef l_ushort l_mode_t; > -typedef l_ulong l_off_t; > +typedef l_long l_off_t; > typedef l_int l_pid_t; > typedef l_uint l_size_t; > typedef l_long l_suseconds_t; > @@ -179,8 +179,8 @@ struct l_mmap_argv { > l_int prot; > l_int flags; > l_int fd; > - l_off_t pgoff; > -} __packed; > + l_ulong pgoff; > +}; > =20 > /* > * stat family of syscalls >=20 > Okay, then this is my proposed patch to fix this. This version works > fine for the Linux tool. If people are happy with it then I'll check it > in. I thought that I had greped for usage of l_off_t but missed that seek > was using it :-( >=20 commit please. and. please, look to r185438. I suggest to use it in mfi --=20 Have fun! chd --LZvS9be/3tNcYl/X Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (FreeBSD) iEYEARECAAYFAknM/0sACgkQ0t2Tb3OO/O0hPgCaA6XN99uEXQcMujixOUxWIcn5 C/MAoJvbrmjA2o7VP8WLRpRz+bXE1lsI =ybS3 -----END PGP SIGNATURE----- --LZvS9be/3tNcYl/X--