From owner-freebsd-emulation@FreeBSD.ORG Thu Mar 24 05:42:22 2005 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5671B16A4CE; Thu, 24 Mar 2005 05:42:22 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 03A7A43D4C; Thu, 24 Mar 2005 05:42:22 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id j2O5gJXf003847; Wed, 23 Mar 2005 21:42:19 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j2O5gJtu003845; Wed, 23 Mar 2005 21:42:19 -0800 Date: Wed, 23 Mar 2005 21:42:19 -0800 From: Brooks Davis To: John Baldwin Message-ID: <20050324054219.GC32114@odin.ac.hmc.edu> References: <20050302020453.GE55745@squash.dsto.defence.gov.au> <200503231546.40408.jhb@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KN5l+BnMqAQyZLvT" Content-Disposition: inline In-Reply-To: <200503231546.40408.jhb@FreeBSD.org> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu cc: emulation@freebsd.org cc: matthew.thyer@dsto.defence.gov.au cc: freebsd-current@freebsd.org cc: "Wilkinson, Alex" Subject: Re: sys/modules/linux/linux_ioctl.o - LOR [I think] X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.1 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: Thu, 24 Mar 2005 05:42:22 -0000 --KN5l+BnMqAQyZLvT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 23, 2005 at 03:46:40PM -0500, John Baldwin wrote: > On Tuesday 01 March 2005 09:04 pm, Wilkinson, Alex wrote: > > Version: FreeBSD 6.0-CURRENT #1: Tue Feb 22 12:47:37 CST 2005 > > > > Seeing these error on console: > > > > --- syscall (54, Linux ELF, linux_ioctl), eip =3D 0x283bf2a4, esp =3D > > 0xbfbf8ed0, ebp =3D 0xbfbf8f80 --- Calling uiomove() with the following > > non-sleepable locks held: > > exclusive sleep mutex ifnet r =3D 0 (0xc09b8ea0) locked @ > > /usr/src/sys/modules/linux/../../compat/linux/linux_ioctl.c:2135 KDB: s= tack > > backtrace: > > witness_warn(2,0,c08a71b8,ec80fbec,0) at witness_warn+0x175 > > uiomove(ec80fc64,20,ec80fc44,0,1) at uiomove+0x4d > > linux_ioctl_socket(c6b52000,ec80fd14,ec80fcd0,c08aa46e,68d) at > > linux_ioctl_socket+0x8f4 linux_ioctl(c6b52000,ec80fd14,c08c8f72,3ad,3) = at > > linux_ioctl+0x69 syscall(2f,2f,2f,bfbfd36c,4) at syscall+0x13b > > Xint0x80_syscall() at Xint0x80_syscall+0x1f > > --- syscall (54, Linux ELF, linux_ioctl), eip =3D 0x283bf2a4, esp =3D > > 0xbfbfd290, ebp =3D 0xbfbfd300 --- Calling uiomove() with the following > > non-sleepable locks held: > > exclusive sleep mutex ifnet r =3D 0 (0xc09b8ea0) locked @ > > /usr/src/sys/modules/linux/../../compat/linux/linux_ioctl.c:2135 KDB: s= tack > > backtrace: > > witness_warn(2,0,c08a71b8,0,0) at witness_warn+0x175 > > uiomove(ec80fc64,20,ec80fc44,0,1) at uiomove+0x4d > > linux_ioctl_socket(c6b52000,ec80fd14,ec80fcd0,c08aa46e,68d) at > > linux_ioctl_socket+0x8f4 > > linux_ioctl(c6b52000,ec80fd14,c08c8f72,3ad,3) at linux_ioctl+0x69 > > syscall(2f,2f,2f,bfbfd36c,4) at syscall+0x13b > > Xint0x80_syscall() at Xint0x80_syscall+0x1f > > --- syscall (54, Linux ELF, linux_ioctl), eip =3D 0x283bf2a4, esp =3D > > 0xbfbfd290, ebp =3D 0xbfbfd300 --- >=20 > Definitely a bug. The linux_ioctl() code needs to unlock the ifnet lock= =20 > before it calls uiomove() unless it knows for certain that it is talking = to=20 > UIO_SYSSPACE. Hmm, it looks like this stack trace is wrong. The only uiomove call in linux_ioctl.c is in linux_ifconf which is in fact broken. The solution here is almost certaintly to adapt the ifconf code I wrote to fix the LOR in the native version. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --KN5l+BnMqAQyZLvT Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFCQlJ/XY6L6fI4GtQRAkjTAKCdIF5kxZRzx6VSBppBqvRh9+T5qwCdHHTg Wcz23r1SwvNfHMzaBpXRC1M= =X6Au -----END PGP SIGNATURE----- --KN5l+BnMqAQyZLvT--