From owner-freebsd-emulation@FreeBSD.ORG Sun Jul 6 02:26:59 2008 Return-Path: Delivered-To: emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2B0E1065674 for ; Sun, 6 Jul 2008 02:26:59 +0000 (UTC) (envelope-from kpeter@melbpc.org.au) Received: from hosted07.westnet.com.au (hosted07.westnet.com.au [203.10.1.223]) by mx1.freebsd.org (Postfix) with ESMTP id 6EEC88FC13 for ; Sun, 6 Jul 2008 02:26:59 +0000 (UTC) (envelope-from kpeter@melbpc.org.au) Received: from hosted07.westnet.com.au (hosted07.westnet.com.au [127.0.0.1]) by hosted07.westnet.com.au (Postfix) with SMTP id 453CF33D8E6 for ; Sun, 6 Jul 2008 09:55:27 +0800 (WST) Received: from baron.from.hell (dsl-124-150-124-134.vic.westnet.com.au [124.150.124.134]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by hosted07.westnet.com.au (Postfix) with ESMTP id D38CD33D84F for ; Sun, 6 Jul 2008 09:55:26 +0800 (WST) Message-ID: <4870260D.1080203@melbpc.org.au> Date: Sun, 06 Jul 2008 01:55:25 +0000 From: Peter Kostouros Organization: Melbourne PC User Group User-Agent: Thunderbird 2.0.0.14 (X11/20080421) MIME-Version: 1.0 To: emulation@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Branch: TNG-Outgoing Cc: Subject: Linux 2.6 emulation and Linux Java problem X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: kpeter@melbpc.org.au List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jul 2008 02:26:59 -0000 Hi Is anyone having difficulty running Java applications (specifically linux-netbeans 6.1, linux-glassfish V2 and some Java applets) using linux-sun-jdk1.6.0_xx under CURRENT with Linux 2.6 emulation? I am running CURRENT as of 21JUN2008 with linux_base-f8. Invoking linux-netbeans causes a java instance to crash during startup, with ktrace on that instance showing 1860 java RET open 97/0x61 1860 java CALL freebsd6_mmap(0x61, 0x2b639970, PROT_EXEC, MAP_FILE, 0xa5a5a5a5, ..., 0xa5a5a5a5, 0, ..., 0, 0xc, 0xdead0002, ... Note 1. These applications ran successfully with linux_base-fc4 and compat.linux.osrelease set to 2.4.2; 2. The success of running java applications also depends on debug.witness.watch: I get more mileage from java applications when this sysctl is 0. What can I do to help resolve the matter? Note, I do not know if my system is somehow corrupted or that I may have some stale libraries. -- Regards Peter As always the organisation disavows knowledge of this email From owner-freebsd-emulation@FreeBSD.ORG Sun Jul 6 07:41:31 2008 Return-Path: Delivered-To: emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8CFA106567E for ; Sun, 6 Jul 2008 07:41:31 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id 7618D8FC14 for ; Sun, 6 Jul 2008 07:41:31 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A57B92.dip.t-dialin.net [84.165.123.146]) by redbull.bpaserver.net (Postfix) with ESMTP id 040C02E21B; Sun, 6 Jul 2008 09:41:25 +0200 (CEST) Received: from deskjail (unknown [192.168.1.109]) by outgoing.leidinger.net (Postfix) with ESMTP id 161D3132E70; Sun, 6 Jul 2008 09:41:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1215330072; bh=ExUa8Vuf6N/yFa4D90wt3kJkmTWw5J8yo ZCMBM7OA9I=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To: References:Mime-Version:Content-Type:Content-Transfer-Encoding; b=DTTLGV+hfdlewj8TjgsEOCcFH4m0+u4tVGsWSivpjnXVsDCNzEh43ap5sGtyRUaZ0 YlGWb/k2tWYQ16JVFkfGhu91FUP/Or9SvxJBYUbRSjVefbxX8UUxyeJn5HB2hMWYH52 8afyIPfs3bs++zJ9HxVInnmiUCMDgloCD0pPYyvbUn07fczgIQl1D6cPaszcI1t1fAe mLEmrldN5HTiFnDiZYUo12FGqNOFOx0Kd/qE+tFWc0Dg2SSGfeTQMN3MW2HTS70HQlL z2EBS0RDKQD4o3Zal9kO9BAXxAMzEAKdnbrjW4KeTtTSqxsEYVDDTpoZfnIPXGaH1mW 3zusJuitw== Date: Sun, 6 Jul 2008 09:43:32 +0200 From: Alexander Leidinger To: kpeter@melbpc.org.au Message-ID: <20080706094332.4de443b0@deskjail> In-Reply-To: <4870260D.1080203@melbpc.org.au> References: <4870260D.1080203@melbpc.org.au> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; i686-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, ORDB-RBL, SpamAssassin (not cached, score=-14.4, required 6, BAYES_00 -15.00, DKIM_SIGNED 0.00, DKIM_VERIFIED -0.00, NO_RDNS 0.50, RDNS_DYNAMIC 0.10) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No Cc: emulation@freebsd.org Subject: Re: Linux 2.6 emulation and Linux Java problem X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 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: Sun, 06 Jul 2008 07:41:31 -0000 Quoting Peter Kostouros (Sun, 06 Jul 2008 01:55:25 +0000): > Hi > > Is anyone having difficulty running Java applications (specifically > linux-netbeans 6.1, linux-glassfish V2 and some Java applets) using > linux-sun-jdk1.6.0_xx under CURRENT with Linux 2.6 emulation? > > I am running CURRENT as of 21JUN2008 with linux_base-f8. Invoking > linux-netbeans causes a java instance to crash during startup, with > ktrace on that instance showing Are you using linux_kdump, or the normal kdump? If the later, you need to use the former. There's also the possibility to use dtrace (new feature in current, so no HOWTO for the linux dtrace script available yet). > 1860 java RET open 97/0x61 > > 1860 java CALL freebsd6_mmap(0x61, 0x2b639970, PROT_EXEC, MAP_FILE, 0xa5a5a5a5, ..., 0xa5a5a5a5, 0, ..., 0, 0xc, 0xdead0002, ... > > > Note > > 1. These applications ran successfully with linux_base-fc4 and > compat.linux.osrelease set to 2.4.2; > 2. The success of running java applications also depends on > debug.witness.watch: I get more mileage from java applications when this > sysctl is 0. Do you get witness warning/errors on the console? Please check and report them if there are any. Bye, Alexander. -- Everybody is ignorant, only on different subjects. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-freebsd-emulation@FreeBSD.ORG Sun Jul 6 13:56:49 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53F29106566C for ; Sun, 6 Jul 2008 13:56:49 +0000 (UTC) (envelope-from eculp@encontacto.net) Received: from ns2.bafirst.com (72-12-2-19.static.networktel.net [72.12.2.19]) by mx1.freebsd.org (Postfix) with ESMTP id 04E178FC19 for ; Sun, 6 Jul 2008 13:56:48 +0000 (UTC) (envelope-from eculp@encontacto.net) Received: from HOME.encontacto.net ([189.190.8.164]) by ns2.bafirst.com with esmtp; Sun, 06 Jul 2008 08:56:41 -0500 id 000D552D.4870CF1A.00001170 Received: from localhost (localhost [127.0.0.1]) (uid 80) by HOME.encontacto.net with local; Sun, 06 Jul 2008 08:56:36 -0500 id 0004AC27.4870CF14.0001740D Received: from dsl-189-190-8-164.prod-infinitum.com.mx (dsl-189-190-8-164.prod-infinitum.com.mx [189.190.8.164]) by intranet.encontacto.net (Horde Framework) with HTTP; Sun, 06 Jul 2008 08:56:36 -0500 Message-ID: <20080706085636.280786wmdmf7wq3c@intranet.encontacto.net> Date: Sun, 06 Jul 2008 08:56:36 -0500 From: eculp To: freebsd-emulation@freebsd.org References: <20080619135114.Y1807@kozubik.com> <20080620083906.71332251xw1ckmu8@webmail.leidinger.net> <1213972236.1505.14.camel@scotth.emsphone.com> <20080624083829.T1807@kozubik.com> <20080624121734.171218nrcilz164k@intranet.encontacto.net> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.2-cvs) Subject: Re: Lack of Flash support is no longer acceptable. alternatives? X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 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: Sun, 06 Jul 2008 13:56:49 -0000 Quoting Marcin Cieslak : > eculp wrote: >> Quoting John Kozubik : > >> Thanks, for reminding me but I will put another 100 dollars for the =20 >> same but I need it to work on FreeBSD 7 and 8, amd64 and i386 =20 >> although if justifiable I could get by without amd64 but would =20 >> rather not. (My > > A secret binary under NDA will not make users on all architectures =20 > happy (yes, you can compile once, but maintain the port...?). > > I hope that alternatives (silverlight / moonlight) and gnash will =20 > make matters better. Recent gnash snapshots are getting much more =20 > usable (0.8.2rc played Youtube movies just fine). > > Gnash has also some nice features - whitelist/blacklist and =20 > debugging so that you can see what URL's is your SWF really =20 > accessing. (I have blacklisted some YT statistics immediately). =20 > Another feature I like is that movies do not have to autostart - you =20 > can play them when you click them. This saves a lot of trouble with =20 > hanging/crashing SWF's. Plus, gnash runs as a separate standalone =20 > process, so a crash is not that bad. I assume it doesn't do any flash 8+ sites, does it? Sites are =20 changing to require flash [8,9] daily:( Youtube works fine with the =20 flash7 plugin. Some bounties have been offered, there was one for 200 dls. and I =20 offered to add 100 more. It was focused on the flashplugin but =20 anything that a regular user (read wives) could use without =20 complaining, would be great, EMO. Maybe someone who is a commiter and =20 would take charge of judging and paying the bounty, I feel others =20 would chip in and maybe we could make it worthwhile. Thanks, ed From owner-freebsd-emulation@FreeBSD.ORG Sun Jul 6 19:46:18 2008 Return-Path: Delivered-To: freebsd-emulation@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 209E2106566C; Sun, 6 Jul 2008 19:46:18 +0000 (UTC) (envelope-from nox@saturn.kn-bremen.de) Received: from gwyn.kn-bremen.de (gwyn.kn-bremen.de [212.63.36.242]) by mx1.freebsd.org (Postfix) with ESMTP id F0DE08FC12; Sun, 6 Jul 2008 19:46:16 +0000 (UTC) (envelope-from nox@saturn.kn-bremen.de) Received: by gwyn.kn-bremen.de (Postfix, from userid 10) id 01C00191B88; Sun, 6 Jul 2008 21:46:14 +0200 (CEST) Received: from saturn.kn-bremen.de (nox@localhost [127.0.0.1]) by saturn.kn-bremen.de (8.14.2/8.13.8) with ESMTP id m66Ji8At023899; Sun, 6 Jul 2008 21:44:08 +0200 (CEST) (envelope-from nox@saturn.kn-bremen.de) Received: (from nox@localhost) by saturn.kn-bremen.de (8.14.2/8.13.6/Submit) id m66Ji8tf023898; Sun, 6 Jul 2008 21:44:08 +0200 (CEST) (envelope-from nox) From: Juergen Lock Date: Sun, 6 Jul 2008 21:44:08 +0200 To: freebsd-emulation@FreeBSD.org, freebsd-ports@FreeBSD.org Message-ID: <20080706194408.GA23575@saturn.kn-bremen.de> Mail-Followup-To: freebsd-emulation@FreeBSD.org, freebsd-ports@FreeBSD.org References: <20080620211216.GA75382@saturn.kn-bremen.de> <20080622221933.GA12209@saturn.kn-bremen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080622221933.GA12209@saturn.kn-bremen.de> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: Subject: Re: please test experimental qemu-devel-20080620 snapshot and kqemu-1.4.0pre1 update! X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 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: Sun, 06 Jul 2008 19:46:18 -0000 On Mon, Jun 23, 2008 at 12:19:33AM +0200, Juergen Lock wrote: > On Fri, Jun 20, 2008 at 11:12:16PM +0200, Juergen Lock wrote: > > Hi! > > > > I've been playing with a qemu-devel update again recently (which also > > includes a kqemu api change, therefore I have a new kqemu-kmod-devel > > port too), and these are the main news: > > > > - Many targets including x86 have been converted from dyngen to tcg > > completely, which should allow building them with newer gcc versions; > > I've added an ALL_TARGETS knob that can be turned off if you only need > > these targets, that avoids building the gcc34 port if you're on 7.0 or > > later. Here is the list out of the CONFIGURE_ARGS: > > i386-softmmu,sparc-softmmu,x86_64-softmmu,mips-softmmu,mipsel-softmmu,mips64-softmmu,mips64el-softmmu,arm-softmmu,m68k-softmmu > > (I only tested i386 and x86_64 a little bit. This knob also needs testing > > on 7.0 and later i386 hosts.) > > - kqemu now also works for i386-softmmu on amd64 hosts, i.e. you no longer > > need to use qemu-system-x86_64 there if you want kqemu. > > - And of course the usual round of bugfixes and optimizations, etc. > > > > The tcg conversions can cause regressions tho, and indeed I found > > that 7.0-RELEASE-amd64-livefs.iso causes qemu-system-x86_64 to crash on > > i386 hosts, it'd be interesting if you can find more. (I'll post a seperate > > message with details about that crash on the qemu list, and probably won't > > commit this version because of that.) > > > > I didn't inline the update and kqemu port this time since its two files, > > just fetch them from: > > http://people.freebsd.org/~nox/qemu/kqemu-kmod-devel.shar > > and > > http://people.freebsd.org/~nox/qemu/qemu-devel-20080620.patch > > Ok, kqemu-kmod-devel has now been repocopied from kqemu-kmod and I have > just updated it to the new version, and I also added D_NEEDMINOR to both > ports so they now should also be back to working order on -current (untested.) > > So what this means is now you can use the new kqemu-kmod-devel port from cvs > instead of the shar for this qemu-devel update patch. OK I have been hunting tcg regessions over the last few days and can now report that at least those amd64 guests that I tested are now (mostly) back to working order on i386 hosts (see http://people.freebsd.org/~nox/qemu/fix-cvtsi2ssq-etc.mail.txt and the previos qemu list posts linked from there if you are interested in the gory details.) On another note, and this might interest some people here more, 32 bit qemu on amd64 hosts with kqemu seems to now work almost(?) like as on i386 hosts, at least I got a report of xp sp2 even working with -kernel-kqemu there... :) Here comes the current version of the qemu-devel port update, which I'll probably commit in the course of next week assuming I get no new bugreports (or negative comments about my tcg fixes from the qemu folks.) - also at: http://people.freebsd.org/~nox/qemu/qemu-devel-20080620-2nd.patch Index: Makefile =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/Makefile,v retrieving revision 1.92 diff -u -p -r1.92 Makefile --- Makefile 6 Jun 2008 13:27:04 -0000 1.92 +++ Makefile 20 Jun 2008 20:04:20 -0000 @@ -6,17 +6,14 @@ # PORTNAME= qemu -PORTVERSION= 0.9.1s.20080302 -PORTREVISION= 9 +PORTVERSION= 0.9.1s.20080620 CATEGORIES= emulators -MASTER_SITES= http://qemu.org/:release \ +MASTER_SITES= http://bellard.org/qemu/:release \ http://qemu-forum.ipi.fi/qemu-snapshots/:snapshot \ http://people.fruitsalad.org/nox/qemu/:snapshot \ - http://www.volny.cz/xnavara/qemu/:snapshot \ - http://people.brandeis.edu/~jcoiner/qemu_idedma/:idedma \ - http://people.freebsd.org/~maho/qemu/:misc + ${MASTER_SITE_LOCAL}:snapshot PKGNAMESUFFIX= -devel -DISTNAME= ${PORTNAME}-snapshot-2008-03-02_05 +DISTNAME= ${PORTNAME}-snapshot-2008-06-20_19 DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:snapshot DIST_SUBDIR= qemu EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} @@ -28,7 +25,6 @@ HAS_CONFIGURE= yes USE_BZIP2= yes USE_GMAKE= yes USE_PERL5= yes -USE_GCC= 3.4 PATCH_STRIP= -lp1 MAKE_ENV+= BSD_MAKE="${MAKE}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" MAN1= qemu.1 qemu-img.1 @@ -40,10 +36,19 @@ OPTIONS= KQEMU "Build with (alpha!) acce SAMBA "samba dependency (for -smb)" Off \ SDL "SDL/X dependency (graphical output)" On \ GNUTLS "gnutls dependency (vnc encryption)" On \ - CDROM_DMA "IDE CDROM DMA" On + CDROM_DMA "IDE CDROM DMA" On \ + ALL_TARGETS "Also build dyngen targets (requires gcc34)" On .include +.if defined(WITHOUT_ALL_TARGETS) +CONFIGURE_ARGS+= --disable-gcc-check --target-list=i386-softmmu,sparc-softmmu,x86_64-softmmu,mips-softmmu,mipsel-softmmu,mips64-softmmu,mips64el-softmmu,arm-softmmu,m68k-softmmu +PLIST_SUB+= DYNGEN="@comment " +.else +USE_GCC= 3.4 +PLIST_SUB+= DYNGEN="" +.endif + .if ${OSVERSION} < 600000 # 5.x base gcc segfaults in target-mips/op_mem.c BUILD_DEPENDS+= gcc34:${PORTSDIR}/lang/gcc34 @@ -66,16 +71,12 @@ CONFIGURE_ARGS+= --disable-vnc-tls LIB_DEPENDS+= gnutls:${PORTSDIR}/security/gnutls .endif -.if defined (WITH_HACKS_CIRRUS) || defined (WITH_HACKS) -DISTFILES+= patch3_cirrus:misc -.endif - .if defined(WITH_SAMBA) RUN_DEPENDS+= ${LOCALBASE}/sbin/smbd:${PORTSDIR}/net/samba3 .endif .if defined(WITH_KQEMU) -BUILD_DEPENDS+= kqemu-kmod>=1.3.0pre5:${PORTSDIR}/emulators/kqemu-kmod +BUILD_DEPENDS+= kqemu-kmod-devel>=1.4.0pre1:${PORTSDIR}/emulators/kqemu-kmod-devel .else CONFIGURE_ARGS+= --disable-kqemu .endif Index: distinfo =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/distinfo,v retrieving revision 1.49 diff -u -p -r1.49 distinfo --- distinfo 11 Mar 2008 23:34:13 -0000 1.49 +++ distinfo 20 Jun 2008 17:23:17 -0000 @@ -1,3 +1,3 @@ -MD5 (qemu/qemu-snapshot-2008-03-02_05.tar.bz2) = 832923647bb52f1f0408a707e98479ca -SHA256 (qemu/qemu-snapshot-2008-03-02_05.tar.bz2) = d4159530d7f6b7261a16346b013f303cfa703403e749ca49ce003ef61d7eaff1 -SIZE (qemu/qemu-snapshot-2008-03-02_05.tar.bz2) = 2394602 +MD5 (qemu/qemu-snapshot-2008-06-20_19.tar.bz2) = 7201553586b59e400664b2f9ae0b17a1 +SHA256 (qemu/qemu-snapshot-2008-06-20_19.tar.bz2) = e9a3654976b923c471f572961f244f2758d15a367cfc1b32054aa2cd4391cace +SIZE (qemu/qemu-snapshot-2008-06-20_19.tar.bz2) = 2629290 Index: pkg-message =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/pkg-message,v retrieving revision 1.27 diff -u -p -r1.27 pkg-message --- pkg-message 17 May 2008 18:53:43 -0000 1.27 +++ pkg-message 6 Jul 2008 18:55:50 -0000 @@ -88,14 +88,6 @@ to /etc/rc.conf (revision 1.25 of /usr/ports/emulators/kqemu-kmod/Makefile), so if your host is such you might want to make sure your kqemu-kmod port is new enough. (and don't forget to reload it...) -- also remember that on amd64 you need to run the amd64 (x86_64) system -emulation if you want to use kqemu, i.e. run qemu-system-x86_64 instead of -qemu (the latter only emulates a 32 bit system.) Unfortunately there can -still be guests that don't run correctly in the amd64 emulation even when -they do run in the 32 bit one, the same is true about kqemu and -kernel-kqemu -on amd64 - not much you can do about that other than help debugging (k)qemu's -amd64 emulation... (well or falling back to unaccellerated, possibly 32 bit -qemu/leaving out -kernel-kqemu if its that what's causing the problems.) - qemu's network boot roms (-boot n) have a bug when bootfiles sizes are a multiple of blksize, if this affects you (like with FreeBSD's /boot/pxeboot) you can do like @@ -107,6 +99,15 @@ extracted out of ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/200805/7.0-STABLE-200805-i386-bootonly.iso and placed it here: http://people.freebsd.org/~nox/qemu/pxeboot-qemu +- if you use slirp and want to nfs mount stuff into the guest and you are +not running qemu as root, then mountd on the exporting box needs to be run +with -n in order to accept requests from ports >= 1024. +- unfortunately there can still be guests that don't run correctly with +kqemu and -kernel-kqemu especially on amd64 - not much you can do about that +other than help debugging (k)qemu... (well or falling back to unaccellerated +qemu/leaving out -kernel-kqemu if its that what's causing the problems. +note however that kqemu now can also be used with the 32 bit qemu even +on amd64 hosts as of the 20080620 update.) - qemu now uses aio at least for ide dma, so if you get `Invalid system call' crashes that is because aio is not (kld)loaded. - The default configuration location (qemu-ifup script etc.) has been Index: pkg-plist =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/pkg-plist,v retrieving revision 1.24 diff -u -p -r1.24 pkg-plist --- pkg-plist 3 Apr 2008 20:18:40 -0000 1.24 +++ pkg-plist 20 Jun 2008 18:34:31 -0000 @@ -1,17 +1,17 @@ bin/qemu bin/qemu-img bin/qemu-system-arm -bin/qemu-system-cris +%%DYNGEN%%bin/qemu-system-cris bin/qemu-system-m68k bin/qemu-system-mips bin/qemu-system-mips64 bin/qemu-system-mips64el bin/qemu-system-mipsel -bin/qemu-system-ppc -bin/qemu-system-ppc64 -bin/qemu-system-ppcemb -bin/qemu-system-sh4 -bin/qemu-system-sh4eb +%%DYNGEN%%bin/qemu-system-ppc +%%DYNGEN%%bin/qemu-system-ppc64 +%%DYNGEN%%bin/qemu-system-ppcemb +%%DYNGEN%%bin/qemu-system-sh4 +%%DYNGEN%%bin/qemu-system-sh4eb bin/qemu-system-sparc bin/qemu-system-x86_64 @unexec if cmp -s %D/etc/qemu-ifup.sample %D/etc/qemu-ifup; then rm -f %D/etc/qemu-ifup; fi @@ -28,6 +28,7 @@ etc/qemu-ifdown.sample %%DATADIR%%/vgabios-cirrus.bin %%DATADIR%%/ppc_rom.bin %%DATADIR%%/openbios-sparc32 +%%DATADIR%%/openbios-sparc64 %%DATADIR%%/video.x %%DATADIR%%/pxe-ne2k_pci.bin %%DATADIR%%/pxe-rtl8139.bin Index: files/patch-90_security =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/files/patch-90_security,v retrieving revision 1.4 diff -u -p -r1.4 patch-90_security --- files/patch-90_security 11 Mar 2008 23:34:13 -0000 1.4 +++ files/patch-90_security 20 Jun 2008 19:45:28 -0000 @@ -1,148 +1,3 @@ -Index: qemu-0.8.2/hw/cirrus_vga.c -@@ -217,6 +217,20 @@ - #define CIRRUS_HOOK_NOT_HANDLED 0 - #define CIRRUS_HOOK_HANDLED 1 - -+#define BLTUNSAFE(s) \ -+ ( \ -+ ( /* check dst is within bounds */ \ -+ (s)->cirrus_blt_height * (s)->cirrus_blt_dstpitch \ -+ + ((s)->cirrus_blt_dstaddr & (s)->cirrus_addr_mask) > \ -+ (s)->vram_size \ -+ ) || \ -+ ( /* check src is within bounds */ \ -+ (s)->cirrus_blt_height * (s)->cirrus_blt_srcpitch \ -+ + ((s)->cirrus_blt_srcaddr & (s)->cirrus_addr_mask) > \ -+ (s)->vram_size \ -+ ) \ -+ ) -+ - struct CirrusVGAState; - typedef void (*cirrus_bitblt_rop_t) (struct CirrusVGAState *s, - uint8_t * dst, const uint8_t * src, -@@ -636,7 +650,7 @@ - - for (y = 0; y < lines; y++) { - off_cur = off_begin; -- off_cur_end = off_cur + bytesperline; -+ off_cur_end = (off_cur + bytesperline) & s->cirrus_addr_mask; - off_cur &= TARGET_PAGE_MASK; - while (off_cur < off_cur_end) { - cpu_physical_memory_set_dirty(s->vram_offset + off_cur); -@@ -651,7 +665,11 @@ - { - uint8_t *dst; - -- dst = s->vram_ptr + s->cirrus_blt_dstaddr; -+ dst = s->vram_ptr + (s->cirrus_blt_dstaddr & s->cirrus_addr_mask); -+ -+ if (BLTUNSAFE(s)) -+ return 0; -+ - (*s->cirrus_rop) (s, dst, src, - s->cirrus_blt_dstpitch, 0, - s->cirrus_blt_width, s->cirrus_blt_height); -@@ -667,8 +685,11 @@ - { - cirrus_fill_t rop_func; - -+ if (BLTUNSAFE(s)) -+ return 0; -+ - rop_func = cirrus_fill[rop_to_index[blt_rop]][s->cirrus_blt_pixelwidth - 1]; -- rop_func(s, s->vram_ptr + s->cirrus_blt_dstaddr, -+ rop_func(s, s->vram_ptr + (s->cirrus_blt_dstaddr & s->cirrus_addr_mask), - s->cirrus_blt_dstpitch, - s->cirrus_blt_width, s->cirrus_blt_height); - cirrus_invalidate_region(s, s->cirrus_blt_dstaddr, -@@ -687,8 +708,8 @@ - static int cirrus_bitblt_videotovideo_patterncopy(CirrusVGAState * s) - { - return cirrus_bitblt_common_patterncopy(s, -- s->vram_ptr + -- (s->cirrus_blt_srcaddr & ~7)); -+ s->vram_ptr + ((s->cirrus_blt_srcaddr & ~7) & -+ s->cirrus_addr_mask)); - } - - static void cirrus_do_copy(CirrusVGAState *s, int dst, int src, int w, int h) -@@ -738,8 +759,10 @@ - if (notify) - vga_hw_update(); - -- (*s->cirrus_rop) (s, s->vram_ptr + s->cirrus_blt_dstaddr, -- s->vram_ptr + s->cirrus_blt_srcaddr, -+ (*s->cirrus_rop) (s, s->vram_ptr + -+ (s->cirrus_blt_dstaddr & s->cirrus_addr_mask), -+ s->vram_ptr + -+ (s->cirrus_blt_srcaddr & s->cirrus_addr_mask), - s->cirrus_blt_dstpitch, s->cirrus_blt_srcpitch, - s->cirrus_blt_width, s->cirrus_blt_height); - -@@ -765,8 +788,14 @@ - s->cirrus_blt_srcaddr - s->start_addr, - s->cirrus_blt_width, s->cirrus_blt_height); - } else { -- (*s->cirrus_rop) (s, s->vram_ptr + s->cirrus_blt_dstaddr, -- s->vram_ptr + s->cirrus_blt_srcaddr, -+ -+ if (BLTUNSAFE(s)) -+ return 0; -+ -+ (*s->cirrus_rop) (s, s->vram_ptr + -+ (s->cirrus_blt_dstaddr & s->cirrus_addr_mask), -+ s->vram_ptr + -+ (s->cirrus_blt_srcaddr & s->cirrus_addr_mask), - s->cirrus_blt_dstpitch, s->cirrus_blt_srcpitch, - s->cirrus_blt_width, s->cirrus_blt_height); - -@@ -798,8 +827,9 @@ - } else { - /* at least one scan line */ - do { -- (*s->cirrus_rop)(s, s->vram_ptr + s->cirrus_blt_dstaddr, -- s->cirrus_bltbuf, 0, 0, s->cirrus_blt_width, 1); -+ (*s->cirrus_rop)(s, s->vram_ptr + -+ (s->cirrus_blt_dstaddr & s->cirrus_addr_mask), -+ s->cirrus_bltbuf, 0, 0, s->cirrus_blt_width, 1); - cirrus_invalidate_region(s, s->cirrus_blt_dstaddr, 0, - s->cirrus_blt_width, 1); - s->cirrus_blt_dstaddr += s->cirrus_blt_dstpitch; -@@ -1917,7 +1947,7 @@ - unsigned val = mem_value; - uint8_t *dst; - -- dst = s->vram_ptr + offset; -+ dst = s->vram_ptr + (offset &= s->cirrus_addr_mask); - for (x = 0; x < 8; x++) { - if (val & 0x80) { - *dst = s->cirrus_shadow_gr1; -@@ -1940,7 +1970,7 @@ - unsigned val = mem_value; - uint8_t *dst; - -- dst = s->vram_ptr + offset; -+ dst = s->vram_ptr + (offset &= s->cirrus_addr_mask); - for (x = 0; x < 8; x++) { - if (val & 0x80) { - *dst = s->cirrus_shadow_gr1; -Index: qemu-0.8.2/hw/cirrus_vga_rop.h -=================================================================== ---- qemu-0.8.2.orig/hw/cirrus_vga_rop.h 2006-07-22 20:23:34.000000000 +0300 -+++ qemu-0.8.2/hw/cirrus_vga_rop.h 2007-04-20 06:05:59.000000000 +0300 -@@ -31,6 +31,12 @@ glue(cirrus_bitblt_rop_fwd_, ROP_NAME)(C - int x,y; - dstpitch -= bltwidth; - srcpitch -= bltwidth; -+ -+ if (dstpitch < 0 || srcpitch < 0) { -+ /* is 0 valid? srcpitch == 0 could be useful */ -+ return; -+ } -+ - for (y = 0; y < bltheight; y++) { - for (x = 0; x < bltwidth; x++) { - ROP_OP(*dst, *src); Index: qemu-0.8.2/hw/dma.c =================================================================== --- qemu-0.8.2.orig/hw/dma.c 2006-07-22 20:23:34.000000000 +0300 @@ -162,21 +17,27 @@ Index: qemu-0.8.2/hw/dma.c ldebug ("dma_pos %d size %d\n", n, (r->base[COUNT] + 1) << ncont); } -Index: qemu-0.8.2/hw/fdc.c -@@ -1247,7 +1247,12 @@ - len = fdctrl->data_len - fdctrl->data_pos; - if (len > FD_SECTOR_LEN) - len = FD_SECTOR_LEN; -- bdrv_read(cur_drv->bs, fd_sector(cur_drv), fdctrl->fifo, 1); -+ if (cur_drv->bs) { -+ bdrv_read(cur_drv->bs, fd_sector(cur_drv), fdctrl->fifo, 1); -+ } else { -+ FLOPPY_ERROR("can't read data from drive\n"); -+ return 0; -+ } - } - } - retval = fdctrl->fifo[pos]; +Index: qemu/hw/fdc.c +@@ -1322,7 +1322,8 @@ + fd_sector(cur_drv)); + return 0; + } +- if (bdrv_read(cur_drv->bs, fd_sector(cur_drv), fdctrl->fifo, 1) < 0) { ++ if (cur_drv->bs == NULL || ++ bdrv_read(cur_drv->bs, fd_sector(cur_drv), fdctrl->fifo, 1) < 0) { + FLOPPY_DPRINTF("error getting sector %d\n", + fd_sector(cur_drv)); + /* Sure, image size is too small... */ +@@ -1776,7 +1777,8 @@ + if (pos == FD_SECTOR_LEN - 1 || + fdctrl->data_pos == fdctrl->data_len) { + cur_drv = get_cur_drv(fdctrl); +- if (bdrv_write(cur_drv->bs, fd_sector(cur_drv), fdctrl->fifo, 1) < 0) { ++ if (cur_drv->bs == NULL || ++ bdrv_write(cur_drv->bs, fd_sector(cur_drv), fdctrl->fifo, 1) < 0) { + FLOPPY_ERROR("writing sector %d\n", fd_sector(cur_drv)); + return; + } Index: qemu-0.8.2/hw/pc.c =================================================================== --- qemu-0.8.2.orig/hw/pc.c 2007-04-20 06:05:58.000000000 +0300 Index: files/patch-CVE-2008-2004 =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/files/patch-CVE-2008-2004,v retrieving revision 1.1 diff -u -p -r1.1 patch-CVE-2008-2004 --- files/patch-CVE-2008-2004 8 May 2008 20:45:10 -0000 1.1 +++ files/patch-CVE-2008-2004 20 Jun 2008 19:45:28 -0000 @@ -1,60 +0,0 @@ -Index: qemu/vl.c -=================================================================== ---- vl.c (revision 4276) -+++ vl.c (revision 4277) -@@ -4961,6 +4961,7 @@ - int bus_id, unit_id; - int cyls, heads, secs, translation; - BlockDriverState *bdrv; -+ BlockDriver *drv = NULL; - int max_devs; - int index; - int cache; -@@ -4968,7 +4969,7 @@ - char *str = arg->opt; - char *params[] = { "bus", "unit", "if", "index", "cyls", "heads", - "secs", "trans", "media", "snapshot", "file", -- "cache", NULL }; -+ "cache", "format", NULL }; - - if (check_params(buf, sizeof(buf), params, str) < 0) { - fprintf(stderr, "qemu: unknown parameter '%s' in '%s'\n", -@@ -5136,6 +5137,14 @@ - } - } - -+ if (get_param_value(buf, sizeof(buf), "format", str)) { -+ drv = bdrv_find_format(buf); -+ if (!drv) { -+ fprintf(stderr, "qemu: '%s' invalid format\n", buf); -+ return -1; -+ } -+ } -+ - if (arg->file == NULL) - get_param_value(file, sizeof(file), "file", str); - else -@@ -5238,7 +5247,7 @@ - bdrv_flags |= BDRV_O_SNAPSHOT; - if (!cache) - bdrv_flags |= BDRV_O_DIRECT; -- if (bdrv_open(bdrv, file, bdrv_flags) < 0 || qemu_key_check(bdrv, file)) { -+ if (bdrv_open2(bdrv, file, bdrv_flags, drv) < 0 || qemu_key_check(bdrv, file)) { - fprintf(stderr, "qemu: could not open disk image %s\n", - file); - return -1; -Index: qemu/qemu-doc.texi -=================================================================== ---- qemu-doc.texi (revision 4276) -+++ qemu-doc.texi (revision 4277) -@@ -261,6 +261,10 @@ - @var{snapshot} is "on" or "off" and allows to enable snapshot for given drive (see @option{-snapshot}). - @item cache=@var{cache} - @var{cache} is "on" or "off" and allows to disable host cache to access data. -+@item format=@var{format} -+Specify which disk @var{format} will be used rather than detecting -+the format. Can be used to specifiy format=raw to avoid interpreting -+an untrusted format header. - @end table - - Instead of @option{-cdrom} you can use: Index: files/patch-Makefile =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/files/patch-Makefile,v retrieving revision 1.5 diff -u -p -r1.5 patch-Makefile --- files/patch-Makefile 25 Mar 2007 16:33:01 -0000 1.5 +++ files/patch-Makefile 20 Jun 2008 19:45:28 -0000 @@ -1,17 +1,17 @@ Index: qemu/Makefile -@@ -19,7 +19,11 @@ - BASE_LDFLAGS += -static +@@ -17,7 +17,11 @@ + LDFLAGS += -static endif ifdef BUILD_DOCS +ifdef NOPORTDOCS -+DOCS=qemu.1 qemu-img.1 ++DOCS=qemu.1 qemu-img.1 qemu-nbd.8 +else - DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 + DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 +endif else DOCS= endif -@@ -60,8 +64,10 @@ +@@ -203,13 +211,13 @@ common de-ch es fo fr-ca hu ja mk nl-be pt sl tr install-doc: $(DOCS) @@ -22,3 +22,8 @@ Index: qemu/Makefile ifndef CONFIG_WIN32 mkdir -p "$(DESTDIR)$(mandir)/man1" $(INSTALL) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1" +- mkdir -p "$(DESTDIR)$(mandir)/man8" +- $(INSTALL) qemu-nbd.8 "$(DESTDIR)$(mandir)/man8" + endif + + install: all $(if $(BUILD_DOCS),install-doc) Index: files/patch-cpu-exec.c =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/files/patch-cpu-exec.c,v retrieving revision 1.4 diff -u -p -r1.4 patch-cpu-exec.c --- files/patch-cpu-exec.c 11 Mar 2008 23:34:13 -0000 1.4 +++ files/patch-cpu-exec.c 20 Jun 2008 19:45:28 -0000 @@ -1,29 +1,27 @@ ---- qemu.orig/cpu-exec.c Mon Jan 14 11:11:02 2008 -+++ qemu/cpu-exec.c Thu Jan 17 23:03:00 2008 -@@ -449,16 +449,18 @@ int cpu_exec(CPUState *env1) - (env->eflags & IF_MASK || env->hflags & HF_HIF_MASK) && - !(env->hflags & HF_INHIBIT_IRQ_MASK)) { - int intno; -- svm_check_intercept(SVM_EXIT_INTR); - env->interrupt_request &= ~(CPU_INTERRUPT_HARD | CPU_INTERRUPT_VIRQ); - intno = cpu_get_pic_interrupt(env); -- if (loglevel & CPU_LOG_TB_IN_ASM) { -- fprintf(logfile, "Servicing hardware INT=0x%02x\n", intno); -- } -- do_interrupt(intno, 0, 0, 0, 1); -- /* ensure that no TB jump will be modified as -- the program flow was changed */ -- BREAK_CHAIN; -+ if(intno>=0) { -+ svm_check_intercept(SVM_EXIT_INTR); -+ if (loglevel & CPU_LOG_TB_IN_ASM) { -+ fprintf(logfile, "Servicing hardware INT=0x%02x\n", intno); -+ } -+ do_interrupt(intno, 0, 0, 0, 1); -+ /* ensure that no TB jump will be modified as -+ the program flow was changed */ -+ BREAK_CHAIN; -+ } +Index: qemu/cpu-exec.c +@@ -394,16 +394,18 @@ + (env->eflags & IF_MASK && + !(env->hflags & HF_INHIBIT_IRQ_MASK))))) { + int intno; +- svm_check_intercept(SVM_EXIT_INTR); + env->interrupt_request &= ~(CPU_INTERRUPT_HARD | CPU_INTERRUPT_VIRQ); + intno = cpu_get_pic_interrupt(env); +- if (loglevel & CPU_LOG_TB_IN_ASM) { +- fprintf(logfile, "Servicing hardware INT=0x%02x\n", intno); ++ if (intno>=0) { ++ svm_check_intercept(SVM_EXIT_INTR); ++ if (loglevel & CPU_LOG_TB_IN_ASM) { ++ fprintf(logfile, "Servicing hardware INT=0x%02x\n", intno); ++ } ++ do_interrupt(intno, 0, 0, 0, 1); ++ /* ensure that no TB jump will be modified as ++ the program flow was changed */ ++ next_tb = 0; + } +- do_interrupt(intno, 0, 0, 0, 1); +- /* ensure that no TB jump will be modified as +- the program flow was changed */ +- next_tb = 0; #if !defined(CONFIG_USER_ONLY) - } else if ((interrupt_request & CPU_INTERRUPT_VIRQ) && - (env->eflags & IF_MASK) && !(env->hflags & HF_INHIBIT_IRQ_MASK)) { + } else if ((interrupt_request & CPU_INTERRUPT_VIRQ) && + (env->eflags & IF_MASK) && Index: files/patch-curses_keys.h =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/files/patch-curses_keys.h,v retrieving revision 1.1 diff -u -p -r1.1 patch-curses_keys.h --- files/patch-curses_keys.h 21 Mar 2008 22:20:07 -0000 1.1 +++ files/patch-curses_keys.h 20 Jun 2008 19:45:28 -0000 @@ -1,17 +0,0 @@ -Index: qemu/curses_keys.h -=================================================================== -RCS file: /sources/qemu/qemu/curses_keys.h,v -retrieving revision 1.1 -retrieving revision 1.2 -diff -u -p -r1.1 -r1.2 ---- curses_keys.h 10 Feb 2008 16:33:13 -0000 1.1 -+++ curses_keys.h 18 Mar 2008 06:55:27 -0000 1.2 -@@ -198,7 +198,7 @@ int curses2keycode[CURSES_KEYS] = { - - [0x001] = 30 | CNTRL, /* Control + a */ - [0x013] = 31 | CNTRL, /* Control + s */ -- [0x014] = 32 | CNTRL, /* Control + d */ -+ [0x004] = 32 | CNTRL, /* Control + d */ - [0x006] = 33 | CNTRL, /* Control + f */ - [0x007] = 34 | CNTRL, /* Control + g */ - [0x008] = 35 | CNTRL, /* Control + h */ Index: files/patch-fbsd =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/files/patch-fbsd,v retrieving revision 1.11 diff -u -p -r1.11 patch-fbsd --- files/patch-fbsd 11 Mar 2008 23:34:13 -0000 1.11 +++ files/patch-fbsd 20 Jun 2008 19:45:28 -0000 @@ -20,14 +20,14 @@ Index: qemu/Makefile rm -f *.o *.a $(TOOLS) dyngen$(EXESUF) TAGS *.pod *~ */*~ $(MAKE) -C tests clean Index: qemu/Makefile.target -@@ -649,8 +649,8 @@ +@@ -651,8 +651,8 @@ main.o: CFLAGS+=-p endif -$(QEMU_PROG): $(OBJS) ../libqemu_common.a libqemu.a -- $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) +- $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) +$(QEMU_PROG): $(OBJS) ../libqemu_common.a libqemu.a ../bsd/libmath.a -+ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) ../bsd/libmath.a ++ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) ../bsd/libmath.a endif # !CONFIG_USER_ONLY Index: files/patch-hw-e1000.c =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/files/patch-hw-e1000.c,v retrieving revision 1.1 diff -u -p -r1.1 patch-hw-e1000.c --- files/patch-hw-e1000.c 12 Mar 2008 20:01:31 -0000 1.1 +++ files/patch-hw-e1000.c 20 Jun 2008 19:45:28 -0000 @@ -1,17 +0,0 @@ -Index: qemu/hw/e1000.c -=================================================================== -RCS file: /sources/qemu/qemu/hw/e1000.c,v -retrieving revision 1.3 -retrieving revision 1.4 -diff -u -p -r1.3 -r1.4 ---- hw/e1000.c 10 Feb 2008 13:34:48 -0000 1.3 -+++ hw/e1000.c 10 Mar 2008 00:02:10 -0000 1.4 -@@ -50,7 +50,7 @@ static int debugflags = DBGBIT(TXERR) | - #endif - - #define IOPORT_SIZE 0x40 --#define PNPMMIO_SIZE 0x60000 -+#define PNPMMIO_SIZE 0x20000 - - /* - * HW models: Index: files/patch-libmath2 =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/files/patch-libmath2,v retrieving revision 1.2 diff -u -p -r1.2 patch-libmath2 --- files/patch-libmath2 10 Mar 2007 17:03:05 -0000 1.2 +++ files/patch-libmath2 20 Jun 2008 19:45:28 -0000 @@ -55,13 +55,3 @@ Index: qemu/bsd/amd64/s_ldexpl.c +} + +weak_alias(__ldexpl,ldexpl) -Index: qemu/target-i386/helper.c -@@ -2886,6 +2886,8 @@ - ST0 = floatx_round_to_int(ST0, &env->fp_status); - } - -+long double ldexpl(long double, int); -+ - void helper_fscale(void) - { - ST0 = ldexp (ST0, (int)(ST1)); Index: files/patch-osdep.c =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/files/patch-osdep.c,v retrieving revision 1.3 diff -u -p -r1.3 patch-osdep.c --- files/patch-osdep.c 10 Mar 2007 17:03:05 -0000 1.3 +++ files/patch-osdep.c 20 Jun 2008 19:45:28 -0000 @@ -1,5 +1,5 @@ Index: qemu/osdep.c -@@ -79,7 +79,9 @@ +@@ -68,7 +68,9 @@ #if defined(USE_KQEMU) @@ -9,7 +9,7 @@ Index: qemu/osdep.c #include #include -@@ -90,6 +92,7 @@ +@@ -79,6 +81,7 @@ const char *tmpdir; char phys_ram_file[1024]; void *ptr; @@ -17,7 +17,7 @@ Index: qemu/osdep.c #ifdef HOST_SOLARIS struct statvfs stfs; #else -@@ -151,12 +154,20 @@ +@@ -138,7 +141,9 @@ } unlink(phys_ram_file); } @@ -25,16 +25,19 @@ Index: qemu/osdep.c size = (size + 4095) & ~4095; +#ifndef __FreeBSD__ ftruncate(phys_ram_fd, phys_ram_size + size); - ptr = mmap(NULL, - size, - PROT_WRITE | PROT_READ, MAP_SHARED, - phys_ram_fd, phys_ram_size); -+#else -+ ptr = mmap(NULL, -+ size, -+ PROT_WRITE | PROT_READ, MAP_PRIVATE|MAP_ANON, -+ -1, 0); -+#endif - if (ptr == MAP_FAILED) { + ptr = mmap(NULL, + size, +@@ -148,6 +153,13 @@ fprintf(stderr, "Could not map physical memory\n"); exit(1); + } ++#else ++ ptr = malloc(size); ++ if (ptr == NULL) { ++ fprintf(stderr, "Could not allocate physical memory\n"); ++ exit(1); ++ } ++#endif + phys_ram_size += size; + return ptr; + } Index: files/patch-qemu-img.texi =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/files/patch-qemu-img.texi,v retrieving revision 1.3 diff -u -p -r1.3 patch-qemu-img.texi --- files/patch-qemu-img.texi 11 Mar 2008 23:34:14 -0000 1.3 +++ files/patch-qemu-img.texi 20 Jun 2008 19:45:28 -0000 @@ -1,19 +0,0 @@ -Index: qemu/qemu-img.texi -@@ -10,7 +10,7 @@ - @table @option - @item create [-e] [-6] [-b @var{base_image}] [-f @var{fmt}] @var{filename} [@var{size}] - @item commit [-f @var{fmt}] @var{filename} --@item convert [-c] [-e] [-6] [-f @var{fmt}] @var{filename} [-O @var{output_fmt}] @var{output_filename} -+@item convert [-c] [-e] [-6] [-f @var{fmt}] [-O @var{output_fmt}] @var{filename} @var{output_filename} - @item info [-f @var{fmt}] @var{filename} - @end table - -@@ -83,7 +83,7 @@ - - Commit the changes recorded in @var{filename} in its base image. - --@item convert [-c] [-e] [-f @var{fmt}] @var{filename} [-O @var{output_fmt}] @var{output_filename} -+@item convert [-c] [-e] [-f @var{fmt}] [-O @var{output_fmt}] @var{filename} @var{output_filename} - - Convert the disk image @var{filename} to disk image @var{output_filename} - using format @var{output_fmt}. It can be optionnaly encrypted Index: files/patch-tcg-tcg-op.h =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/files/patch-tcg-tcg-op.h,v retrieving revision 1.1 diff -u -p -r1.1 patch-tcg-tcg-op.h --- files/patch-tcg-tcg-op.h 12 Mar 2008 20:01:31 -0000 1.1 +++ files/patch-tcg-tcg-op.h 20 Jun 2008 19:45:28 -0000 @@ -1,19 +0,0 @@ -Index: qemu/tcg/tcg-op.h -@@ -1172,7 +1172,7 @@ - tcg_gen_op3i(INDEX_op_qemu_ld8s, ret, addr, mem_index); - #else - tcg_gen_op4i(INDEX_op_qemu_ld8s, ret, addr, TCGV_HIGH(addr), mem_index); -- tcg_gen_ext8s_i32(TCGV_HIGH(ret), ret); -+ tcg_gen_sari_i32(TCGV_HIGH(ret), ret, 31); - #endif - } - -@@ -1192,7 +1192,7 @@ - tcg_gen_op3i(INDEX_op_qemu_ld16s, ret, addr, mem_index); - #else - tcg_gen_op4i(INDEX_op_qemu_ld16s, ret, addr, TCGV_HIGH(addr), mem_index); -- tcg_gen_ext16s_i32(TCGV_HIGH(ret), ret); -+ tcg_gen_sari_i32(TCGV_HIGH(ret), ret, 31); - #endif - } - Index: files/patch-vl.c =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/files/patch-vl.c,v retrieving revision 1.10 diff -u -p -r1.10 patch-vl.c --- files/patch-vl.c 21 Mar 2008 17:31:52 -0000 1.10 +++ files/patch-vl.c 20 Jun 2008 19:45:28 -0000 @@ -7,23 +7,15 @@ Index: qemu/vl.c #else CharDriverState *qemu_chr_open_pty(void) -@@ -1771,14 +1771,14 @@ - return chr; +@@ -2334,7 +2334,7 @@ } + #endif -#if defined(__linux__) || defined(__sun__) +#if defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) static CharDriverState *qemu_chr_open_pty(void) { struct termios tty; - char slave_name[1024]; - int master_fd, slave_fd; - --#if defined(__linux__) -+#if defined(__linux__) || defined(__FreeBSD__) - /* Not satisfying */ - if (openpty(&master_fd, &slave_fd, slave_name, NULL, NULL) < 0) { - return NULL; @@ -3036,7 +3036,7 @@ return qemu_chr_open_pp(filename); } else Index: files/patch-vl.c-nographic =================================================================== RCS file: /home/pcvs/ports/emulators/qemu-devel/files/patch-vl.c-nographic,v retrieving revision 1.3 diff -u -p -r1.3 patch-vl.c-nographic --- files/patch-vl.c-nographic 10 Mar 2007 17:15:07 -0000 1.3 +++ files/patch-vl.c-nographic 20 Jun 2008 19:45:28 -0000 @@ -1,9 +0,0 @@ -Index: qemu/vl.c -@@ -7131,6 +7131,7 @@ - case QEMU_OPTION_nographic: - pstrcpy(serial_devices[0], sizeof(serial_devices[0]), "stdio"); - pstrcpy(monitor_device, sizeof(monitor_device), "stdio"); -+ pstrcpy(parallel_devices[0], sizeof(parallel_devices[0]), "null"); - nographic = 1; - break; - case QEMU_OPTION_kernel: Index: files/patch-exec.c @@ -0,0 +1,30 @@ +Index: qemu/exec.c +@@ -405,6 +405,28 @@ + exit(1); + } + } ++#elif defined(__FreeBSD__) ++ { ++ int flags; ++ void *addr = NULL; ++ flags = MAP_PRIVATE | MAP_ANONYMOUS; ++#if defined(__x86_64__) ++ /* FreeBSD doesn't have MAP_32BIT, use MAP_FIXED and assume ++ * 0x40000000 is free */ ++ flags |= MAP_FIXED; ++ addr = (void *)0x40000000; ++ /* Cannot map more than that */ ++ if (code_gen_buffer_size > (800 * 1024 * 1024)) ++ code_gen_buffer_size = (800 * 1024 * 1024); ++#endif ++ code_gen_buffer = mmap(addr, code_gen_buffer_size, ++ PROT_WRITE | PROT_READ | PROT_EXEC, ++ flags, -1, 0); ++ if (code_gen_buffer == MAP_FAILED) { ++ fprintf(stderr, "Could not allocate dynamic translator buffer\n"); ++ exit(1); ++ } ++ } + #else + code_gen_buffer = qemu_malloc(code_gen_buffer_size); + if (!code_gen_buffer) { Index: files/patch-exec-all.h @@ -0,0 +1,10 @@ +Index: qemu/exec-all.h +@@ -30,7 +30,7 @@ + struct TranslationBlock; + + /* XXX: make safe guess about sizes */ +-#define MAX_OP_PER_INSTR 64 ++#define MAX_OP_PER_INSTR 128 /* 64 */ + /* A Call op needs up to 6 + 2N parameters (N = number of arguments). */ + #define MAX_OPC_PARAM 10 + #define OPC_BUF_SIZE 512 Index: files/patch-tcg-i386-tcg-target.c @@ -0,0 +1,54 @@ +Index: qemu/tcg/i386/tcg-target.c +@@ -359,25 +359,36 @@ + break; + case TCG_COND_LT: + tcg_out_brcond(s, TCG_COND_LT, args[1], args[3], const_args[3], args[5]); ++ if (const_args[2] && !args[2]) ++ /* test r,r - carry can never be set */ ++ break; + tcg_out_jxx(s, JCC_JNE, label_next); +- tcg_out_brcond(s, TCG_COND_LT, args[0], args[2], const_args[2], args[5]); ++ tcg_out_brcond(s, TCG_COND_LTU, args[0], args[2], const_args[2], args[5]); + break; + case TCG_COND_LE: + tcg_out_brcond(s, TCG_COND_LT, args[1], args[3], const_args[3], args[5]); + tcg_out_jxx(s, JCC_JNE, label_next); +- tcg_out_brcond(s, TCG_COND_LE, args[0], args[2], const_args[2], args[5]); ++ tcg_out_brcond(s, TCG_COND_LEU, args[0], args[2], const_args[2], args[5]); + break; + case TCG_COND_GT: + tcg_out_brcond(s, TCG_COND_GT, args[1], args[3], const_args[3], args[5]); + tcg_out_jxx(s, JCC_JNE, label_next); +- tcg_out_brcond(s, TCG_COND_GT, args[0], args[2], const_args[2], args[5]); ++ tcg_out_brcond(s, TCG_COND_GTU, args[0], args[2], const_args[2], args[5]); + break; + case TCG_COND_GE: ++ if (const_args[2] && !args[2]) { ++ /* test r,r - carry can never be set */ ++ tcg_out_brcond(s, TCG_COND_GE, args[1], args[3], const_args[3], args[5]); ++ break; ++ } + tcg_out_brcond(s, TCG_COND_GT, args[1], args[3], const_args[3], args[5]); + tcg_out_jxx(s, JCC_JNE, label_next); +- tcg_out_brcond(s, TCG_COND_GE, args[0], args[2], const_args[2], args[5]); ++ tcg_out_brcond(s, TCG_COND_GEU, args[0], args[2], const_args[2], args[5]); + break; + case TCG_COND_LTU: ++ if (const_args[2] && !args[2]) ++ /* test r,r - carry can never be set */ ++ break; + tcg_out_brcond(s, TCG_COND_LTU, args[1], args[3], const_args[3], args[5]); + tcg_out_jxx(s, JCC_JNE, label_next); + tcg_out_brcond(s, TCG_COND_LTU, args[0], args[2], const_args[2], args[5]); +@@ -393,6 +404,11 @@ + tcg_out_brcond(s, TCG_COND_GTU, args[0], args[2], const_args[2], args[5]); + break; + case TCG_COND_GEU: ++ if (const_args[2] && !args[2]) { ++ /* test r,r - carry can never be set */ ++ tcg_out_jxx(s, JCC_JMP, args[5]); ++ break; ++ } + tcg_out_brcond(s, TCG_COND_GTU, args[1], args[3], const_args[3], args[5]); + tcg_out_jxx(s, JCC_JNE, label_next); + tcg_out_brcond(s, TCG_COND_GEU, args[0], args[2], const_args[2], args[5]); Index: files/patch-target-i386-translate.c @@ -0,0 +1,16 @@ +Index: qemu/target-i386/translate.c +@@ -3330,8 +3330,12 @@ + op1_offset = offsetof(CPUX86State,xmm_regs[reg]); + tcg_gen_addi_ptr(cpu_ptr0, cpu_env, op1_offset); + sse_op2 = sse_op_table3[(s->dflag == 2) * 2 + ((b >> 8) - 2)]; +- tcg_gen_trunc_tl_i32(cpu_tmp2_i32, cpu_T[0]); +- tcg_gen_helper_0_2(sse_op2, cpu_ptr0, cpu_tmp2_i32); ++ if (ot == OT_LONG) { ++ tcg_gen_trunc_tl_i32(cpu_tmp2_i32, cpu_T[0]); ++ tcg_gen_helper_0_2(sse_op2, cpu_ptr0, cpu_tmp2_i32); ++ } else { ++ tcg_gen_helper_0_2(sse_op2, cpu_ptr0, cpu_T[0]); ++ } + break; + case 0x02c: /* cvttps2pi */ + case 0x12c: /* cvttpd2pi */ From owner-freebsd-emulation@FreeBSD.ORG Mon Jul 7 09:22:25 2008 Return-Path: Delivered-To: emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 305EC1065676 for ; Mon, 7 Jul 2008 09:22:25 +0000 (UTC) (envelope-from kpeter@melbpc.org.au) Received: from hosted08.westnet.com.au (hosted08.westnet.com.au [203.10.1.225]) by mx1.freebsd.org (Postfix) with ESMTP id 51F2A8FC13 for ; Mon, 7 Jul 2008 09:22:24 +0000 (UTC) (envelope-from kpeter@melbpc.org.au) Received: from hosted08.westnet.com.au (hosted08.westnet.com.au [127.0.0.1]) by hosted08.westnet.com.au (Postfix) with SMTP id 377633B8B01 for ; Mon, 7 Jul 2008 17:22:22 +0800 (WST) Received: from baron.from.hell (dsl-124-150-92-236.vic.westnet.com.au [124.150.92.236]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by hosted08.westnet.com.au (Postfix) with ESMTP id 8CE3D3B90D7 for ; Mon, 7 Jul 2008 17:22:20 +0800 (WST) Message-ID: <4871E04B.305@melbpc.org.au> Date: Mon, 07 Jul 2008 09:22:19 +0000 From: Peter Kostouros Organization: Melbourne PC User Group User-Agent: Thunderbird 2.0.0.14 (X11/20080421) MIME-Version: 1.0 To: emulation@freebsd.org References: <4870260D.1080203@melbpc.org.au> <20080706094332.4de443b0@deskjail> In-Reply-To: <20080706094332.4de443b0@deskjail> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Branch: TNG-Outgoing Cc: Subject: Re: Linux 2.6 emulation and Linux Java problem X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: kpeter@melbpc.org.au List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jul 2008 09:22:25 -0000 Alexander Leidinger wrote: > Quoting Peter Kostouros (Sun, 06 Jul 2008 01:55:25 +0000): > > >> Hi >> >> Is anyone having difficulty running Java applications (specifically >> linux-netbeans 6.1, linux-glassfish V2 and some Java applets) using >> linux-sun-jdk1.6.0_xx under CURRENT with Linux 2.6 emulation? >> >> I am running CURRENT as of 21JUN2008 with linux_base-f8. Invoking >> linux-netbeans causes a java instance to crash during startup, with >> ktrace on that instance showing >> > > Are you using linux_kdump, or the normal kdump? If the later, you need > to use the former. There's also the possibility to use dtrace (new > feature in current, so no HOWTO for the linux dtrace script available > yet). > > I used the normal kdump; unfortunately I could not install linux_kdump and did not persevere with it ("does not build with the default linux base, use the package instead" and I had a hiccup installing the package, too). I will look into dtrace over the weekend. >> 1860 java RET open 97/0x61 >> >> 1860 java CALL freebsd6_mmap(0x61, 0x2b639970, PROT_EXEC, MAP_FILE, 0xa5a5a5a5, ..., 0xa5a5a5a5, 0, ..., 0, 0xc, 0xdead0002, ... >> >> >> Note >> >> 1. These applications ran successfully with linux_base-fc4 and >> compat.linux.osrelease set to 2.4.2; >> 2. The success of running java applications also depends on >> debug.witness.watch: I get more mileage from java applications when this >> sysctl is 0. >> > > Do you get witness warning/errors on the console? Please check and > report them if there are any. > > Sun Jul 6 18:10:13 EST 2008 lock order reversal: 1st 0xc488be44 user map (user map) @ /mnt/cvs/FreeBSD/usr/src/sys/modules/linprocfs/../../compat/linprocfs/linprocfs.c:902 2nd 0xc4baf594 ufs (ufs) @ /mnt/cvs/FreeBSD/usr/src/sys/modules/linprocfs/../../compat/linprocfs/linprocfs.c:937 KDB: stack backtrace: db_trace_self_wrapper(c0b8c918,e67be73c,c080cc7e,c0b8f245,c4baf594,...) at db_trace_self_wrapper+0x26 kdb_backtrace(c0b8f245,c4baf594,c0b835ea,c0b835ea,c468853e,...) at kdb_backtrace+0x29 witness_checkorder(c4baf594,1,c468853e,3a9,e67be77c,...) at witness_checkorder+0x6ee __lockmgr_args(c4baf594,200400,c4baf5b0,0,0,...) at __lockmgr_args+0x221 ffs_lock(e67be840,c4b3402c,0,200400,c4baf53c,...) at ffs_lock+0x82 VOP_LOCK1_APV(c0c87e00,e67be840,c0ca04a0,c4baf53c,200400,...) at VOP_LOCK1_APV+0xa5 _vn_lock(c4baf53c,200400,c468853e,3a9,e67be8b0,...) at _vn_lock+0x5e linprocfs_doprocmaps(c4b2e460,c4b85538,c468b100,c4657600,e67bec60,...) at linprocfs_doprocmaps+0x293 pfs_read(e67bebc8,c4b2e460,c49191f8,c4b2e460,e67bebe8,...) at pfs_read+0x59f VOP_READ_APV(c0c61ec0,e67bebc8,c0b96946,212,c0d286c8,...) at VOP_READ_APV+0xa5 vn_read(c49191f8,e67bec60,c47b8b00,0,c4b2e460,...) at vn_read+0x1ee dofileread(e67bec60,ffffffff,ffffffff,0,c49191f8,...) at dofileread+0x96 kern_readv(c4b2e460,3,e67bec60,28071000,1000,...) at kern_readv+0x58 read(c4b2e460,e67becfc,e67becf8,e67bed1c,c0eae408,...) at read+0x4f syscall(e67bed38) at syscall+0x2d3 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (3, Linux ELF, read), eip = 0x2815ef71, esp = 0x2841e534, ebp = 0x2841e54c --- lock order reversal: 1st 0xc4ccf8b8 pseudofs (pseudofs) @ /mnt/cvs/FreeBSD/usr/src/sys/kern/vfs_vnops.c:530 2nd 0xc0cd48e4 sysctl lock (sysctl lock) @ /mnt/cvs/FreeBSD/usr/src/sys/kern/kern_sysctl.c:1086 KDB: stack backtrace: db_trace_self_wrapper(c0b8c918,e67a5a08,c080cc7e,c0b8f245,c0cd48e4,...) at db_trace_self_wrapper+0x26 kdb_backtrace(c0b8f245,c0cd48e4,c0b8a47c,c0b8a47c,c0b8a39d,...) at kdb_backtrace+0x29 witness_checkorder(c0cd48e4,9,c0b8a39d,43e,e67a5a58,...) at witness_checkorder+0x6ee _sx_xlock(c0cd48e4,0,c0b8a39d,43e,c4b2ed20,...) at _sx_xlock+0x7d kernel_sysctl(c4b2ed20,e67a5b38,2,e67a5ab8,e67a5b40,...) at kernel_sysctl+0x91 linprocfs_docpuinfo(c4b2ed20,0,c45e7b00,c4bbc4e0,e67a5c60,...) at linprocfs_docpuinfo+0x88 pfs_read(e67a5bc8,c4b2ed20,c4c97d90,c4b2ed20,e67a5be8,...) at pfs_read+0x59f VOP_READ_APV(c0c61ec0,e67a5bc8,c0b96946,212,c0d28690,...) at VOP_READ_APV+0xa5 vn_read(c4c97d90,e67a5c60,c47b8b00,0,c4b2ed20,...) at vn_read+0x1ee dofileread(e67a5c60,ffffffff,ffffffff,0,c4c97d90,...) at dofileread+0x96 kern_readv(c4b2ed20,bf,e67a5c60,2c025550,2000,...) at kern_readv+0x58 read(c4b2ed20,e67a5cfc,e67a5cf8,e67a5d1c,c0eae408,...) at read+0x4f syscall(e67a5d38) at syscall+0x2d3 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (3, Linux ELF, read), eip = 0x2807f141, esp = 0x2c0254e4, ebp = 0x2c025518 --- pid 1523 (java), uid 1001 inumber 235542 on /home: filesystem full Jul 6 18:11:26 baron kernel: pid 1523 (java), uid 1001 inumber 235542 on /home: filesystem full pid 1523 (java), uid 1001: exited on signal 11 Jul 6 18:13:15 baron su: peter to root on /dev/ttyp1 > Bye, > Alexander. > > -- Regards Peter As always the organisation disavows knowledge of this email From owner-freebsd-emulation@FreeBSD.ORG Mon Jul 7 11:06:57 2008 Return-Path: Delivered-To: freebsd-emulation@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 732391065689 for ; Mon, 7 Jul 2008 11:06:57 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 5E2F18FC22 for ; Mon, 7 Jul 2008 11:06:57 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m67B6vTh062003 for ; Mon, 7 Jul 2008 11:06:57 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m67B6usw061999 for freebsd-emulation@FreeBSD.org; Mon, 7 Jul 2008 11:06:56 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 7 Jul 2008 11:06:56 GMT Message-Id: <200807071106.m67B6usw061999@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-emulation@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-emulation@FreeBSD.org X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 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, 07 Jul 2008 11:06:57 -0000 Current FreeBSD problem reports Critical problems Serious problems S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/21463 emulation [linux] Linux compatability mode should not allow setu o kern/97326 emulation [linux] file descriptor leakage in linux emulation o kern/117010 emulation [linux] linux_getdents() get something like buffer ove 3 problems total. Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/11165 emulation [ibcs2] IBCS2 doesn't work correctly with PID_MAX 9999 o kern/29698 emulation [linux] [patch] linux ipcs doesn'work o kern/39201 emulation [linux] [patch] ptrace(2) and rfork(RFLINUXTHPN) confu o kern/41543 emulation [patch] [request] easier wine/w23 support a kern/72920 emulation [linux]: path "prefixing" is not done on unix domain s o kern/73777 emulation [linux] [patch] linux emulation: root dir special hand o kern/91293 emulation [svr4] [patch] *Experimental* Update to the SVR4 emula o ports/91318 emulation [fix] graphics/linux_dri: works on amd64 too o ports/121800 emulation x11-toolkits/linux-openmotif - OpenMotif upgrade to 2. o kern/122318 emulation [linux] [cmake]: Segmentation fault when running Linux o ports/123960 emulation Port fix: archivers/linux-par2cmdline - better handlin o ports/123964 emulation Mk fix: bsd.linux-rpm.mk - Handling of NOPORTDOCS 12 problems total. From owner-freebsd-emulation@FreeBSD.ORG Mon Jul 7 11:16:22 2008 Return-Path: Delivered-To: emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7672B106567F for ; Mon, 7 Jul 2008 11:16:22 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id 2985A8FC13 for ; Mon, 7 Jul 2008 11:16:21 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 2625867E6D4; Mon, 7 Jul 2008 13:15:18 +0200 (CEST) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id h8WTDZt7ywNQ; Mon, 7 Jul 2008 13:15:17 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id EF9AC67E6CC; Mon, 7 Jul 2008 13:15:16 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.2/8.14.2/Submit) id m67BFFs9041422; Mon, 7 Jul 2008 13:15:15 +0200 (CEST) (envelope-from rdivacky) Date: Mon, 7 Jul 2008 13:15:15 +0200 From: Roman Divacky To: Peter Kostouros Message-ID: <20080707111515.GA41171@freebsd.org> References: <4870260D.1080203@melbpc.org.au> <20080706094332.4de443b0@deskjail> <4871E04B.305@melbpc.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4871E04B.305@melbpc.org.au> User-Agent: Mutt/1.4.2.3i Cc: emulation@freebsd.org Subject: Re: Linux 2.6 emulation and Linux Java problem X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 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, 07 Jul 2008 11:16:22 -0000 > I used the normal kdump; unfortunately I could not install linux_kdump > and did not persevere with it ("does not build with the default linux > base, use the package instead" and I had a hiccup installing the > package, too). I will look into dtrace over the weekend. try the linux_kdump... the dtrace might have problems on its own as it is really new code... > >>1860 java RET open 97/0x61 > >> > >>1860 java CALL freebsd6_mmap(0x61, 0x2b639970, PROT_EXEC, MAP_FILE, > >>0xa5a5a5a5, ..., 0xa5a5a5a5, 0, ..., 0, 0xc, 0xdead0002, ... > >> > >> > >>Note > >> > >>1. These applications ran successfully with linux_base-fc4 and > >>compat.linux.osrelease set to 2.4.2; > >>2. The success of running java applications also depends on > >>debug.witness.watch: I get more mileage from java applications when this > >>sysctl is 0. > >> > > > >Do you get witness warning/errors on the console? Please check and > >report them if there are any. a LOR could lead to a deadlock not a crash.... if you still have the ktrace.out I believe you can put it on a web and we can run our own linux_kdump on it to see what happened. can you make that available? From owner-freebsd-emulation@FreeBSD.ORG Wed Jul 9 17:42:59 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D24C5106566B; Wed, 9 Jul 2008 17:42:59 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from falcon.cybervisiontech.com (falcon.cybervisiontech.com [217.20.163.9]) by mx1.freebsd.org (Postfix) with ESMTP id 83FBD8FC21; Wed, 9 Jul 2008 17:42:59 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from localhost (localhost [127.0.0.1]) by falcon.cybervisiontech.com (Postfix) with ESMTP id 3FEA2744009; Wed, 9 Jul 2008 20:16:20 +0300 (EEST) X-Virus-Scanned: Debian amavisd-new at falcon.cybervisiontech.com Received: from falcon.cybervisiontech.com ([127.0.0.1]) by localhost (falcon.cybervisiontech.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 55gka+ulHraw; Wed, 9 Jul 2008 20:16:20 +0300 (EEST) Received: from [10.2.1.87] (gateway.cybervisiontech.com.ua [91.198.50.114]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by falcon.cybervisiontech.com (Postfix) with ESMTP id C6D3C744005; Wed, 9 Jul 2008 20:16:19 +0300 (EEST) Message-ID: <4874F262.9050608@icyb.net.ua> Date: Wed, 09 Jul 2008 20:16:18 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.14 (X11/20080611) MIME-Version: 1.0 To: freebsd-emulation@freebsd.org, Juergen Lock Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Subject: 6.3/amd64: linux guest hangs if kqemu is used X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 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, 09 Jul 2008 17:42:59 -0000 This report is quite low on details. My system is 6.3-RELEASE amd64. I have qemu-0.9.1_9 and kqemu-kmod-1.3.0.p11_9. Guest is 2.6.25.9-76.fc9.x86_64. kqemu.ko and aio.ko are loaded. Run like this is OK: qemu-system-x86_64 -no-kqemu -m 640 -hda box1.img -net nic -net tap Run like this - guest hangs during boot: qemu-system-x86_64 -m 640 -hda box1.img -net nic -net tap There are no messages on qemu output or in system log. qemu uses 100% CPU. Ctrl+Alt+2 works, I can execute commands in qemu console. BTW, info kqemu says "enabled for user code". Guest console messages: ... PCI: Using ACPI for IRQ routing PCI: If a device doesn't work, try "pci=routeirq". If it helps, post a report NetLabel: Initializing NetLabel: domain hash size = 128 NetLabel: protocols = UNLABELED CIPSOv4 NetLabel: unlabeled traffic allowed by default PCI-GART: No AMD northbridge found. ! ! kqemu hang is here ! ! NET: Registered protocol family 2 IP route cache hash table entries: 32768 (order: 6, 262144 bytes) TCP established hash table entries: 131072 (order: 9, 2097152 bytes) TCP bind hash table entries: 65536 (order: 8, 1048576 bytes) TCP: Hash tables configured (established 131072 bind 65536) TCP reno registered checking if image is initramfs...<7>Switched to high resolution mode on CPU 0 Clocksource tsc unstable (delta = 778613351 ns) it is ... -- Andriy Gapon From owner-freebsd-emulation@FreeBSD.ORG Wed Jul 9 20:52:41 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2903106567F for ; Wed, 9 Jul 2008 20:52:41 +0000 (UTC) (envelope-from nox@saturn.kn-bremen.de) Received: from gwyn.kn-bremen.de (gwyn.kn-bremen.de [212.63.36.242]) by mx1.freebsd.org (Postfix) with ESMTP id 296128FC0C for ; Wed, 9 Jul 2008 20:52:41 +0000 (UTC) (envelope-from nox@saturn.kn-bremen.de) Received: by gwyn.kn-bremen.de (Postfix, from userid 10) id 88AB5191AC2; Wed, 9 Jul 2008 22:52:39 +0200 (CEST) Received: from saturn.kn-bremen.de (nox@localhost [127.0.0.1]) by saturn.kn-bremen.de (8.14.2/8.13.8) with ESMTP id m69KnB5D012307; Wed, 9 Jul 2008 22:49:11 +0200 (CEST) (envelope-from nox@saturn.kn-bremen.de) Received: (from nox@localhost) by saturn.kn-bremen.de (8.14.2/8.13.6/Submit) id m69KnAgF012306; Wed, 9 Jul 2008 22:49:10 +0200 (CEST) (envelope-from nox) From: Juergen Lock Date: Wed, 9 Jul 2008 22:49:10 +0200 To: Andriy Gapon Message-ID: <20080709204910.GA11133@saturn.kn-bremen.de> Mail-Followup-To: Andriy Gapon , freebsd-emulation@freebsd.org References: <4874F262.9050608@icyb.net.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4874F262.9050608@icyb.net.ua> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-emulation@freebsd.org Subject: Re: 6.3/amd64: linux guest hangs if kqemu is used X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 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, 09 Jul 2008 20:52:41 -0000 On Wed, Jul 09, 2008 at 08:16:18PM +0300, Andriy Gapon wrote: > > This report is quite low on details. > > My system is 6.3-RELEASE amd64. > I have qemu-0.9.1_9 and kqemu-kmod-1.3.0.p11_9. > Guest is 2.6.25.9-76.fc9.x86_64. > > kqemu.ko and aio.ko are loaded. > > Run like this is OK: > qemu-system-x86_64 -no-kqemu -m 640 -hda box1.img -net nic -net tap > > Run like this - guest hangs during boot: > qemu-system-x86_64 -m 640 -hda box1.img -net nic -net tap > > There are no messages on qemu output or in system log. > qemu uses 100% CPU. > Ctrl+Alt+2 works, I can execute commands in qemu console. > BTW, info kqemu says "enabled for user code". > > Guest console messages: > ... > PCI: Using ACPI for IRQ routing > PCI: If a device doesn't work, try "pci=routeirq". If it helps, post a > report > NetLabel: Initializing > NetLabel: domain hash size = 128 > NetLabel: protocols = UNLABELED CIPSOv4 > NetLabel: unlabeled traffic allowed by default > PCI-GART: No AMD northbridge found. > ! > ! kqemu hang is here ! > ! > NET: Registered protocol family 2 > IP route cache hash table entries: 32768 (order: 6, 262144 bytes) > TCP established hash table entries: 131072 (order: 9, 2097152 bytes) > TCP bind hash table entries: 65536 (order: 8, 1048576 bytes) > TCP: Hash tables configured (established 131072 bind 65536) > TCP reno registered > checking if image is initramfs...<7>Switched to high resolution mode on > CPU 0 > Clocksource tsc unstable (delta = 778613351 ns) > it is > ... > > -- > Andriy Gapon It is true kqemu works less well on amd64 than on 32 bit hosts... (tho things have improved in qemu svn especially for 32 bit guests - the snapshot I just updated the qemu-devel port to can now also use kqemu for the 32 bit `qemu'.) Oh, if you host is SMP you probably need to pass `notsc' to your guest linux kernel, if its not that or you still get problems later you can still try the qemu-devel port (which also uses a new kqemu as mentioned in ports/UPDATING), but otherwise I guess you can only report the bug upstream i.e. on the qemu-devel mailinglist: http://lists.gnu.org/mailman/listinfo/qemu-devel HTH, Juergen From owner-freebsd-emulation@FreeBSD.ORG Fri Jul 11 11:44:13 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B69D1065670 for ; Fri, 11 Jul 2008 11:44:13 +0000 (UTC) (envelope-from freebsd-emulation@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id A6ACD8FC18 for ; Fri, 11 Jul 2008 11:44:12 +0000 (UTC) (envelope-from freebsd-emulation@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KHH2l-0008PO-Mc for freebsd-emulation@freebsd.org; Fri, 11 Jul 2008 11:44:07 +0000 Received: from 81.210.247.130 ([81.210.247.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 11 Jul 2008 11:44:07 +0000 Received: from saper by 81.210.247.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 11 Jul 2008 11:44:07 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-emulation@freebsd.org From: Marcin Cieslak Date: Fri, 11 Jul 2008 13:43:55 +0200 Lines: 285 Message-ID: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-ripemd160; protocol="application/pgp-signature"; boundary="------------enigB9C2465D4B5F6674128C91F7" X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 81.210.247.130 User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8.1.13) Gecko/20080405 SeaMonkey/1.1.9 Mnenhy/0.7.5.0 X-Enigmail-Version: 0.95.6 Sender: news Subject: linux emulation: Preliminary support for more auxvec's X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 11 Jul 2008 11:44:13 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigB9C2465D4B5F6674128C91F7 Content-Type: multipart/mixed; boundary="------------050802080807070906070205" This is a multi-part message in MIME format. --------------050802080807070906070205 Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: quoted-printable Hello, Attached please find a simple diff to implement additional loader=20 information (for background please see:=20 http://lists.freebsd.org/pipermail/freebsd-emulation/2006-September/00259= 1.html) This patch creates linux_get_machine() making linux_new_uname=20 platform-independent. AT_PLATFORM is not yet implemented, since I need to allocate a string=20 for it on the user stack. I *could* use something on the SPARE_USRSPACE, = but I think we got rid of all such tricks long time ago. A bit better solution might be to change linux_copyout_strings to=20 allocate more space for the AT_PLATFORM (but how do I then pass the=20 pointer to the elf_linux_fixup?) This would also mean to bring the linux_copyout_strings to i386. What's the best way to do this? --Marcin --------------050802080807070906070205 Content-Type: text/x-diff; name="auxvec.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="auxvec.diff" Index: compat/linux/linux_misc.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 RCS file: /usr/home/ncvs/src/sys/compat/linux/linux_misc.c,v retrieving revision 1.214.2.1 diff -u -r1.214.2.1 linux_misc.c --- compat/linux/linux_misc.c 29 Feb 2008 14:58:08 -0000 1.214.2.1 +++ compat/linux/linux_misc.c 11 Jul 2008 09:59:10 -0000 @@ -732,34 +732,8 @@ *p =3D '\0'; break; } -#ifdef __i386__ - { - const char *class; - - switch (cpu_class) { - case CPUCLASS_686: - class =3D "i686"; - break; - case CPUCLASS_586: - class =3D "i586"; - break; - case CPUCLASS_486: - class =3D "i486"; - break; - default: - class =3D "i386"; - } - strlcpy(utsname.machine, class, LINUX_MAX_UTSNAME); - } -#elif defined(__amd64__) /* XXX: Linux can change 'personality'. */ -#ifdef COMPAT_LINUX32 - strlcpy(utsname.machine, "i686", LINUX_MAX_UTSNAME); -#else - strlcpy(utsname.machine, "x86_64", LINUX_MAX_UTSNAME); -#endif /* COMPAT_LINUX32 */ -#else /* something other than i386 or amd64 - assume we and Linux agree = */ - strlcpy(utsname.machine, machine, LINUX_MAX_UTSNAME); -#endif /* __i386__ */ + + linux_get_machine(&utsname); strlcpy(utsname.domainname, domainname, LINUX_MAX_UTSNAME); =20 return (copyout(&utsname, args->buf, sizeof(utsname))); Index: i386/include/elf.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/home/ncvs/src/sys/i386/include/elf.h,v retrieving revision 1.17 diff -u -r1.17 elf.h --- i386/include/elf.h 4 Oct 2006 21:37:09 -0000 1.17 +++ i386/include/elf.h 11 Jul 2008 11:20:03 -0000 @@ -104,8 +104,12 @@ #define AT_EUID 12 /* Effective uid. */ #define AT_GID 13 /* Real gid. */ #define AT_EGID 14 /* Effective gid. */ +#define AT_PLATFORM 15 /* CPU identification string. */ +#define AT_HWCAP 16 /* CPU capabilities (arch dependent). */ +#define AT_CLKTCK 17 /* Frequency at which times() increments */ +#define AT_SECURE 23 /* Secure mode */ =20 -#define AT_COUNT 15 /* Count of defined aux entry types. */ +#define AT_COUNT 18 /* Count of defined aux entry types. */ =20 /* * Relocation types. Index: i386/linux/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/home/ncvs/src/sys/i386/linux/linux.h,v retrieving revision 1.78 diff -u -r1.78 linux.h --- i386/linux/linux.h 18 Sep 2007 19:50:33 -0000 1.78 +++ i386/linux/linux.h 11 Jul 2008 09:52:51 -0000 @@ -309,6 +309,7 @@ =20 int linux_to_bsd_sigaltstack(int lsa); int bsd_to_linux_sigaltstack(int bsa); +void linux_get_machine(struct l_new_utsname *utsname); =20 typedef void (*l_handler_t)(l_int); typedef l_ulong l_osigset_t; Index: i386/linux/linux_machdep.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 RCS file: /usr/home/ncvs/src/sys/i386/linux/linux_machdep.c,v retrieving revision 1.78.2.2 diff -u -r1.78.2.2 linux_machdep.c --- i386/linux/linux_machdep.c 14 Feb 2008 18:37:39 -0000 1.78.2.2 +++ i386/linux/linux_machdep.c 11 Jul 2008 09:57:02 -0000 @@ -971,6 +971,27 @@ return (error); } =20 +void +linux_get_machine(struct l_new_utsname *utsname) +{ + const char *class; + + switch (cpu_class) { + case CPUCLASS_686: + class =3D "i686"; + break; + case CPUCLASS_586: + class =3D "i586"; + break; + case CPUCLASS_486: + class =3D "i486"; + break; + default: + class =3D "i386"; + } + strlcpy(utsname->machine, class, LINUX_MAX_UTSNAME); +} + /* * Linux has two extra args, restart and oldmask. We dont use these, * but it seems that "restart" is actually a context pointer that Index: i386/linux/linux_sysvec.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 RCS file: /usr/home/ncvs/src/sys/i386/linux/linux_sysvec.c,v retrieving revision 1.150.2.1 diff -u -r1.150.2.1 linux_sysvec.c --- i386/linux/linux_sysvec.c 27 Mar 2008 13:46:27 -0000 1.150.2.1 +++ i386/linux/linux_sysvec.c 11 Jul 2008 10:38:55 -0000 @@ -260,6 +260,9 @@ AUXARGS_ENTRY(pos, AT_EUID, imgp->proc->p_ucred->cr_svuid); AUXARGS_ENTRY(pos, AT_GID, imgp->proc->p_ucred->cr_rgid); AUXARGS_ENTRY(pos, AT_EGID, imgp->proc->p_ucred->cr_svgid); + AUXARGS_ENTRY(pos, AT_HWCAP, cpu_feature); + AUXARGS_ENTRY(pos, AT_CLKTCK, hz); + AUXARGS_ENTRY(pos, AT_SECURE, 0); AUXARGS_ENTRY(pos, AT_NULL, 0); =20 free(imgp->auxargs, M_TEMP); Index: amd64/include/elf.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/home/ncvs/src/sys/amd64/include/elf.h,v retrieving revision 1.19 diff -u -r1.19 elf.h --- amd64/include/elf.h 4 Oct 2006 21:37:09 -0000 1.19 +++ amd64/include/elf.h 11 Jul 2008 08:53:56 -0000 @@ -101,8 +101,12 @@ #define AT_EUID 12 /* Effective uid. */ #define AT_GID 13 /* Real gid. */ #define AT_EGID 14 /* Effective gid. */ +#define AT_PLATFORM 15 /* CPU identification string. */ +#define AT_HWCAP 16 /* CPU capabilities (arch dependent). */ +#define AT_CLKTCK 17 /* Frequency at which times() increments */ +#define AT_SECURE 23 /* Secure mode */ =20 -#define AT_COUNT 15 /* Count of defined aux entry types. */ +#define AT_COUNT 18 /* Count of defined aux entry types. */ =20 /* * Relocation types. Index: amd64/linux32/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/home/ncvs/src/sys/amd64/linux32/linux.h,v retrieving revision 1.16 diff -u -r1.16 linux.h --- amd64/linux32/linux.h 18 Sep 2007 19:50:32 -0000 1.16 +++ amd64/linux32/linux.h 11 Jul 2008 09:47:58 -0000 @@ -334,6 +334,7 @@ =20 int linux_to_bsd_sigaltstack(int lsa); int bsd_to_linux_sigaltstack(int bsa); +void linux_get_machine(struct l_new_utsname *utsname); =20 typedef l_uintptr_t l_handler_t; typedef l_ulong l_osigset_t; Index: amd64/linux32/linux32_machdep.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 RCS file: /usr/home/ncvs/src/sys/amd64/linux32/linux32_machdep.c,v retrieving revision 1.45.2.1 diff -u -r1.45.2.1 linux32_machdep.c --- amd64/linux32/linux32_machdep.c 14 Feb 2008 18:37:38 -0000 1.45.2.1 +++ amd64/linux32/linux32_machdep.c 11 Jul 2008 09:51:41 -0000 @@ -103,6 +103,13 @@ return (lsa); } =20 +void +linux_get_machine(struct l_new_utsname *utsname) +{ + /* XXX Linux can change 'personality'. */ + strlcpy(utsname->machine, "i686", LINUX_MAX_UTSNAME); +} + /* * Custom version of exec_copyin_args() so that we can translate * the pointers. Index: amd64/linux32/linux32_sysvec.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 RCS file: /usr/home/ncvs/src/sys/amd64/linux32/linux32_sysvec.c,v retrieving revision 1.31.2.1 diff -u -r1.31.2.1 linux32_sysvec.c --- amd64/linux32/linux32_sysvec.c 27 Mar 2008 13:46:26 -0000 1.31.2.1 +++ amd64/linux32/linux32_sysvec.c 11 Jul 2008 09:12:56 -0000 @@ -269,6 +269,9 @@ AUXARGS_ENTRY_32(pos, AT_EUID, imgp->proc->p_ucred->cr_svuid); AUXARGS_ENTRY_32(pos, AT_GID, imgp->proc->p_ucred->cr_rgid); AUXARGS_ENTRY_32(pos, AT_EGID, imgp->proc->p_ucred->cr_svgid); + AUXARGS_ENTRY_32(pos, AT_HWCAP, cpu_feature); + AUXARGS_ENTRY_32(pos, AT_CLKTCK, hz); + AUXARGS_ENTRY_32(pos, AT_SECURE, 0); AUXARGS_ENTRY_32(pos, AT_NULL, 0); =20 free(imgp->auxargs, M_TEMP); --------------050802080807070906070205-- --------------enigB9C2465D4B5F6674128C91F7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQCVAwUBSHdHfj2W2v2wY27ZAQP8/QP/YQgMk155gipKki2BsVqqa1OmIvcE2ra4 0FdRg43tWVxm2VDgrJF1nXu6QcfGOO5jZtABjFYqn11aGbii2TPp77d84B3n8+gf XYLfJgG7mqd4+gFWsFZQuPWrT7jRyIKY5mwd70ZRW4P6YB5ooTEDddPzwnxLgTpA sRBiTNxLoxA= =9I1v -----END PGP SIGNATURE----- --------------enigB9C2465D4B5F6674128C91F7-- From owner-freebsd-emulation@FreeBSD.ORG Fri Jul 11 12:35:56 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB5FB1065674 for ; Fri, 11 Jul 2008 12:35:56 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id 532E18FC12 for ; Fri, 11 Jul 2008 12:35:55 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m6BBsbKY077761 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 11 Jul 2008 14:54:37 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m6BBsaap054566; Fri, 11 Jul 2008 14:54:36 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2/Submit) id m6BBsabh054565; Fri, 11 Jul 2008 14:54:36 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 11 Jul 2008 14:54:36 +0300 From: Kostik Belousov To: Marcin Cieslak Message-ID: <20080711115436.GZ17123@deviant.kiev.zoral.com.ua> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Owq9/LamPkWRn7rU" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.91.2, clamav-milter version 0.91.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.4 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on skuns.kiev.zoral.com.ua Cc: freebsd-emulation@freebsd.org Subject: Re: linux emulation: Preliminary support for more auxvec's X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 11 Jul 2008 12:35:56 -0000 --Owq9/LamPkWRn7rU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 11, 2008 at 01:43:55PM +0200, Marcin Cieslak wrote: > Hello, >=20 > Attached please find a simple diff to implement additional loader=20 > information (for background please see:=20 > http://lists.freebsd.org/pipermail/freebsd-emulation/2006-September/00259= 1.html) >=20 > This patch creates linux_get_machine() making linux_new_uname=20 > platform-independent. >=20 > AT_PLATFORM is not yet implemented, since I need to allocate a string=20 > for it on the user stack. I *could* use something on the SPARE_USRSPACE,= =20 > but I think we got rid of all such tricks long time ago. I think I dealt with the similar problem in the implementation of the $ORIGIN support for the rtld, that is WIP for long time. Namely, AT_EXECPATH (somewhat similar to the Solaris auxvec of the same name) provides (might be relative) path for the binary being executed. See http://people.freebsd.org/~kib/misc/rtld-origin.1.patch >=20 > A bit better solution might be to change linux_copyout_strings to=20 > allocate more space for the AT_PLATFORM (but how do I then pass the=20 > pointer to the elf_linux_fixup?) >=20 > This would also mean to bring the linux_copyout_strings to i386. >=20 > What's the best way to do this? --Owq9/LamPkWRn7rU Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkh3SfsACgkQC3+MBN1Mb4i5PQCeKTfk78EgiiE9wrSD4HMRjAS/ QdEAn3sJLWVnaCvTwWTmq7zCjY3ArZUs =KZBv -----END PGP SIGNATURE----- --Owq9/LamPkWRn7rU-- From owner-freebsd-emulation@FreeBSD.ORG Fri Jul 11 14:31:11 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48B861065670 for ; Fri, 11 Jul 2008 14:31:11 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from falcon.cybervisiontech.com (falcon.cybervisiontech.com [217.20.163.9]) by mx1.freebsd.org (Postfix) with ESMTP id D1D798FC0C for ; Fri, 11 Jul 2008 14:31:10 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from localhost (localhost [127.0.0.1]) by falcon.cybervisiontech.com (Postfix) with ESMTP id D9F7974400B; Fri, 11 Jul 2008 17:31:07 +0300 (EEST) X-Virus-Scanned: Debian amavisd-new at falcon.cybervisiontech.com Received: from falcon.cybervisiontech.com ([127.0.0.1]) by localhost (falcon.cybervisiontech.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DdLlbLaV3UQu; Fri, 11 Jul 2008 17:31:07 +0300 (EEST) Received: from [10.2.1.87] (gateway.cybervisiontech.com.ua [91.198.50.114]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by falcon.cybervisiontech.com (Postfix) with ESMTP id 87576744001; Fri, 11 Jul 2008 17:31:07 +0300 (EEST) Message-ID: <48776EA3.5040107@icyb.net.ua> Date: Fri, 11 Jul 2008 17:30:59 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.14 (X11/20080611) MIME-Version: 1.0 To: Andriy Gapon , freebsd-emulation@freebsd.org References: <4874F262.9050608@icyb.net.ua> <20080709204910.GA11133@saturn.kn-bremen.de> In-Reply-To: <20080709204910.GA11133@saturn.kn-bremen.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Cc: Subject: Re: 6.3/amd64: linux guest hangs if kqemu is used X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 11 Jul 2008 14:31:11 -0000 on 09/07/2008 23:49 Juergen Lock said the following: > On Wed, Jul 09, 2008 at 08:16:18PM +0300, Andriy Gapon wrote: >> This report is quite low on details. >> >> My system is 6.3-RELEASE amd64. >> I have qemu-0.9.1_9 and kqemu-kmod-1.3.0.p11_9. >> Guest is 2.6.25.9-76.fc9.x86_64. >> >> kqemu.ko and aio.ko are loaded. >> >> Run like this is OK: >> qemu-system-x86_64 -no-kqemu -m 640 -hda box1.img -net nic -net tap >> >> Run like this - guest hangs during boot: >> qemu-system-x86_64 -m 640 -hda box1.img -net nic -net tap [snip] > > It is true kqemu works less well on amd64 than on 32 bit hosts... > (tho things have improved in qemu svn especially for 32 bit guests - the > snapshot I just updated the qemu-devel port to can now also use kqemu > for the 32 bit `qemu'.) > > Oh, if you host is SMP you probably need to pass `notsc' to your > guest linux kernel, if its not that or you still get problems later > you can still try the qemu-devel port (which also uses a new kqemu as > mentioned in ports/UPDATING), but otherwise I guess you can only report > the bug upstream i.e. on the qemu-devel mailinglist: > http://lists.gnu.org/mailman/listinfo/qemu-devel Jürgen, thank you very much for the advice! notsc allowed linux boot to proceed past the hand point, but later qemu process aborted with the following output: $ qemu-system-x86_64 -m 800 -hda box1.img -net nic -net tap RAX=00007f7e43358000 RBX=00007f7e43358560 RCX=0000003c10615c5a RDX=0000000000000001 RSI=0000003c10618934 RDI=0000000000000000 RBP=00007f7e43358000 RSP=00007fff4b3573b0 R8 =00000000ffffffff R9 =0000000000000000 R10=0000000000000022 R11=0000000000010246 R12=0000000000000000 R13=0000000000000000 R14=0000000000000010 R15=0000000000000001 RIP=0000003c1060a667 RFL=00010206 [-----P-] CPL=3 II=0 A20=1 SMM=0 HLT=0 ES =0000 0000000000000000 00000000 00000000 CS =0033 0000000000000000 ffffffff 00affb00 SS =002b 0000000000000000 ffffffff 00cff300 DS =0000 0000000000000000 00000000 00000000 FS =0000 0000000000000000 00000000 00000000 GS =0000 0000000000000000 00000000 00000000 LDT=0000 0000000000000000 00000000 00008000 TR =0040 ffff810001009900 00002087 00008900 GDT= ffffffff81456000 00000080 IDT= ffffffff814c2000 00000fff CR0=8005003b CR2=00007f7e43358028 CR3=0000000030dfc000 CR4=000006e0 Unsupported return value: 0xffffffff This happened while starting userland daemons. I used "interactive startup" and the problem occurred on sendmail (sm-client) [!]. The problem is reliably reproducible. P.S. I disabled sendmail, services startup proceeded few more steps and then qemu reported same error again ("Unsupported return value") on some other service. I gave up after that. -- Andriy Gapon From owner-freebsd-emulation@FreeBSD.ORG Fri Jul 11 14:37:24 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E3AA1065672; Fri, 11 Jul 2008 14:37:24 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from falcon.cybervisiontech.com (falcon.cybervisiontech.com [217.20.163.9]) by mx1.freebsd.org (Postfix) with ESMTP id 3281B8FC21; Fri, 11 Jul 2008 14:37:24 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from localhost (localhost [127.0.0.1]) by falcon.cybervisiontech.com (Postfix) with ESMTP id 5557974400B; Fri, 11 Jul 2008 17:37:23 +0300 (EEST) X-Virus-Scanned: Debian amavisd-new at falcon.cybervisiontech.com Received: from falcon.cybervisiontech.com ([127.0.0.1]) by localhost (falcon.cybervisiontech.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0n+vGrDQb1v7; Fri, 11 Jul 2008 17:37:23 +0300 (EEST) Received: from [10.2.1.87] (gateway.cybervisiontech.com.ua [91.198.50.114]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by falcon.cybervisiontech.com (Postfix) with ESMTP id F2853744001; Fri, 11 Jul 2008 17:37:22 +0300 (EEST) Message-ID: <4877701D.8060402@icyb.net.ua> Date: Fri, 11 Jul 2008 17:37:17 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.14 (X11/20080611) MIME-Version: 1.0 To: Juergen Lock , freebsd-emulation@freebsd.org References: <4874F262.9050608@icyb.net.ua> <20080709204910.GA11133@saturn.kn-bremen.de> In-Reply-To: <20080709204910.GA11133@saturn.kn-bremen.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Cc: Subject: Re: 6.3/amd64: linux guest hangs if kqemu is used X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 11 Jul 2008 14:37:24 -0000 on 09/07/2008 23:49 Juergen Lock said the following: > On Wed, Jul 09, 2008 at 08:16:18PM +0300, Andriy Gapon wrote: >> This report is quite low on details. >> >> My system is 6.3-RELEASE amd64. >> I have qemu-0.9.1_9 and kqemu-kmod-1.3.0.p11_9. >> Guest is 2.6.25.9-76.fc9.x86_64. >> >> kqemu.ko and aio.ko are loaded. >> >> Run like this is OK: >> qemu-system-x86_64 -no-kqemu -m 640 -hda box1.img -net nic -net tap >> >> Run like this - guest hangs during boot: >> qemu-system-x86_64 -m 640 -hda box1.img -net nic -net tap [snip] > > It is true kqemu works less well on amd64 than on 32 bit hosts... > (tho things have improved in qemu svn especially for 32 bit guests - the > snapshot I just updated the qemu-devel port to can now also use kqemu > for the 32 bit `qemu'.) > > Oh, if you host is SMP you probably need to pass `notsc' to your > guest linux kernel, if its not that or you still get problems later > you can still try the qemu-devel port (which also uses a new kqemu as > mentioned in ports/UPDATING), but otherwise I guess you can only report > the bug upstream i.e. on the qemu-devel mailinglist: > http://lists.gnu.org/mailman/listinfo/qemu-devel Jürgen, thank you very much for the advice! notsc allowed linux boot to proceed past the hand point, but later qemu process aborted with the following output: $ qemu-system-x86_64 -m 800 -hda box1.img -net nic -net tap RAX=00007f7e43358000 RBX=00007f7e43358560 RCX=0000003c10615c5a RDX=0000000000000001 RSI=0000003c10618934 RDI=0000000000000000 RBP=00007f7e43358000 RSP=00007fff4b3573b0 R8 =00000000ffffffff R9 =0000000000000000 R10=0000000000000022 R11=0000000000010246 R12=0000000000000000 R13=0000000000000000 R14=0000000000000010 R15=0000000000000001 RIP=0000003c1060a667 RFL=00010206 [-----P-] CPL=3 II=0 A20=1 SMM=0 HLT=0 ES =0000 0000000000000000 00000000 00000000 CS =0033 0000000000000000 ffffffff 00affb00 SS =002b 0000000000000000 ffffffff 00cff300 DS =0000 0000000000000000 00000000 00000000 FS =0000 0000000000000000 00000000 00000000 GS =0000 0000000000000000 00000000 00000000 LDT=0000 0000000000000000 00000000 00008000 TR =0040 ffff810001009900 00002087 00008900 GDT= ffffffff81456000 00000080 IDT= ffffffff814c2000 00000fff CR0=8005003b CR2=00007f7e43358028 CR3=0000000030dfc000 CR4=000006e0 Unsupported return value: 0xffffffff This happened while starting userland daemons. I used "interactive startup" and the problem occurred on sendmail (sm-client) [!]. The problem is reliably reproducible. P.S. I disabled sendmail, services startup proceeded few more steps and then qemu reported same error again ("Unsupported return value") on some other service. I gave up after that. -- Andriy Gapon From owner-freebsd-emulation@FreeBSD.ORG Fri Jul 11 14:40:39 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F309106567D; Fri, 11 Jul 2008 14:40:39 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from falcon.cybervisiontech.com (falcon.cybervisiontech.com [217.20.163.9]) by mx1.freebsd.org (Postfix) with ESMTP id 22E688FC08; Fri, 11 Jul 2008 14:40:39 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from localhost (localhost [127.0.0.1]) by falcon.cybervisiontech.com (Postfix) with ESMTP id 449C874400B; Fri, 11 Jul 2008 17:40:38 +0300 (EEST) X-Virus-Scanned: Debian amavisd-new at falcon.cybervisiontech.com Received: from falcon.cybervisiontech.com ([127.0.0.1]) by localhost (falcon.cybervisiontech.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WSzNpEIzaoaM; Fri, 11 Jul 2008 17:40:38 +0300 (EEST) Received: from [10.2.1.87] (gateway.cybervisiontech.com.ua [91.198.50.114]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by falcon.cybervisiontech.com (Postfix) with ESMTP id D40E2744001; Fri, 11 Jul 2008 17:40:37 +0300 (EEST) Message-ID: <487770E4.8030005@icyb.net.ua> Date: Fri, 11 Jul 2008 17:40:36 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.14 (X11/20080611) MIME-Version: 1.0 To: Juergen Lock , freebsd-emulation@freebsd.org References: <4874F262.9050608@icyb.net.ua> <20080709204910.GA11133@saturn.kn-bremen.de> <4877701D.8060402@icyb.net.ua> In-Reply-To: <4877701D.8060402@icyb.net.ua> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Cc: Subject: Re: 6.3/amd64: linux guest hangs if kqemu is used X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 11 Jul 2008 14:40:39 -0000 on 11/07/2008 17:37 Andriy Gapon said the following: > on 09/07/2008 23:49 Juergen Lock said the following: >> On Wed, Jul 09, 2008 at 08:16:18PM +0300, Andriy Gapon wrote: >>> This report is quite low on details. >>> >>> My system is 6.3-RELEASE amd64. >>> I have qemu-0.9.1_9 and kqemu-kmod-1.3.0.p11_9. >>> Guest is 2.6.25.9-76.fc9.x86_64. >>> >>> kqemu.ko and aio.ko are loaded. >>> >>> Run like this is OK: >>> qemu-system-x86_64 -no-kqemu -m 640 -hda box1.img -net nic -net tap >>> >>> Run like this - guest hangs during boot: >>> qemu-system-x86_64 -m 640 -hda box1.img -net nic -net tap > [snip] >> It is true kqemu works less well on amd64 than on 32 bit hosts... >> (tho things have improved in qemu svn especially for 32 bit guests - the >> snapshot I just updated the qemu-devel port to can now also use kqemu >> for the 32 bit `qemu'.) >> >> Oh, if you host is SMP you probably need to pass `notsc' to your >> guest linux kernel, if its not that or you still get problems later >> you can still try the qemu-devel port (which also uses a new kqemu as >> mentioned in ports/UPDATING), but otherwise I guess you can only report >> the bug upstream i.e. on the qemu-devel mailinglist: >> http://lists.gnu.org/mailman/listinfo/qemu-devel > > Jürgen, > > thank you very much for the advice! > notsc allowed linux boot to proceed past the hand point, but later qemu > process aborted with the following output: > > $ qemu-system-x86_64 -m 800 -hda box1.img -net nic -net tap > RAX=00007f7e43358000 RBX=00007f7e43358560 RCX=0000003c10615c5a > RDX=0000000000000001 > RSI=0000003c10618934 RDI=0000000000000000 RBP=00007f7e43358000 > RSP=00007fff4b3573b0 > R8 =00000000ffffffff R9 =0000000000000000 R10=0000000000000022 > R11=0000000000010246 > R12=0000000000000000 R13=0000000000000000 R14=0000000000000010 > R15=0000000000000001 > RIP=0000003c1060a667 RFL=00010206 [-----P-] CPL=3 II=0 A20=1 SMM=0 HLT=0 > ES =0000 0000000000000000 00000000 00000000 > CS =0033 0000000000000000 ffffffff 00affb00 > SS =002b 0000000000000000 ffffffff 00cff300 > DS =0000 0000000000000000 00000000 00000000 > FS =0000 0000000000000000 00000000 00000000 > GS =0000 0000000000000000 00000000 00000000 > LDT=0000 0000000000000000 00000000 00008000 > TR =0040 ffff810001009900 00002087 00008900 > GDT= ffffffff81456000 00000080 > IDT= ffffffff814c2000 00000fff > CR0=8005003b CR2=00007f7e43358028 CR3=0000000030dfc000 CR4=000006e0 > Unsupported return value: 0xffffffff > > This happened while starting userland daemons. I used "interactive > startup" and the problem occurred on sendmail (sm-client) [!]. > The problem is reliably reproducible. > > P.S. I disabled sendmail, services startup proceeded few more steps and > then qemu reported same error again ("Unsupported return value") on some > other service. I gave up after that. > Just noticed - the following was in system log: kqemu: aborting: Unexpected exception 0x0d in monitor space err=0000 CS:EIP=f180:00000000f0002806 SS:SP=0000:00000000f00c7e00 -- Andriy Gapon From owner-freebsd-emulation@FreeBSD.ORG Fri Jul 11 19:55:51 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 543311065693 for ; Fri, 11 Jul 2008 19:55:51 +0000 (UTC) (envelope-from freebsd-emulation@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id DFF958FC39 for ; Fri, 11 Jul 2008 19:55:50 +0000 (UTC) (envelope-from freebsd-emulation@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KHOib-0004kw-3l for freebsd-emulation@freebsd.org; Fri, 11 Jul 2008 19:55:49 +0000 Received: from 81.210.247.130 ([81.210.247.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 11 Jul 2008 19:55:49 +0000 Received: from saper by 81.210.247.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 11 Jul 2008 19:55:49 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-emulation@freebsd.org From: Marcin Cieslak Date: Fri, 11 Jul 2008 21:55:36 +0200 Lines: 55 Message-ID: <4877BAB8.1030804@system.pl> References: <20080711115436.GZ17123@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-ripemd160; protocol="application/pgp-signature"; boundary="------------enigA19EF0E5CE03EC51E963D795" X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 81.210.247.130 User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8.1.13) Gecko/20080405 SeaMonkey/1.1.9 Mnenhy/0.7.5.0 In-Reply-To: <20080711115436.GZ17123@deviant.kiev.zoral.com.ua> X-Enigmail-Version: 0.95.6 Sender: news Subject: Re: linux emulation: Preliminary support for more auxvec's [patch] X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 11 Jul 2008 19:55:51 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigA19EF0E5CE03EC51E963D795 Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: quoted-printable Kostik Belousov wrote: > On Fri, Jul 11, 2008 at 01:43:55PM +0200, Marcin Cieslak wrote: >> Hello, >> >> Attached please find a simple diff to implement additional loader=20 >> information (for background please see:=20 >> http://lists.freebsd.org/pipermail/freebsd-emulation/2006-September/00= 2591.html) > Namely, AT_EXECPATH (somewhat similar to the Solaris auxvec of the same= > name) provides (might be relative) path for the binary being executed. Thank you very much. I have implemented the AT_PLATFORM, therefore all 2.6.16 (and later)=20 i386/amd64 auxvecs are implemented, except for AT_SYSINFO and=20 AT_SYSINFO_EHDR that are i386-specific and provide optional way of=20 invoking linux syscalls (using so-called virtual dynamic shared object). I think we don't need those. The code is completely untested on i386. My first attempts show that=20 skype and acroread8 launch faster (probably due to the "hz" effect). The patch is here: http://akson.sgh.waw.pl/~saper/FreeBSD/linux/auxvec.diff This was made against 7-STABLE, but there no major differences in=20 -current. It is also trivial to port to 64-bit amd64 emulation. --Marcin --------------enigA19EF0E5CE03EC51E963D795 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQCVAwUBSHe6uz2W2v2wY27ZAQNH1wQAk4BD1WAcfGJV/BQmNIR6GKniI5gF0CrI vaVwJCv2HKHvhqY51yf5Rbzxni3Dshye/2ozaS6nozNIJn79XZ7oCv4Wn95YllNW dZ6ocli+so6XUT2hUXrjE9raE9mqGVcgRqcdI1WZj6rPh58B1hqbvIHomUoHDk7q x0wo7VV8TH0= =hlz7 -----END PGP SIGNATURE----- --------------enigA19EF0E5CE03EC51E963D795-- From owner-freebsd-emulation@FreeBSD.ORG Fri Jul 11 20:14:55 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4CE41065673 for ; Fri, 11 Jul 2008 20:14:55 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id 329028FC14 for ; Fri, 11 Jul 2008 20:14:54 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m6BKEo2u015576 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 11 Jul 2008 23:14:50 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m6BKEomG063883; Fri, 11 Jul 2008 23:14:50 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2/Submit) id m6BKEo7x063882; Fri, 11 Jul 2008 23:14:50 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 11 Jul 2008 23:14:50 +0300 From: Kostik Belousov To: Marcin Cieslak Message-ID: <20080711201450.GB17123@deviant.kiev.zoral.com.ua> References: <20080711115436.GZ17123@deviant.kiev.zoral.com.ua> <4877BAB8.1030804@system.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6xO04bqTG+NC5D6o" Content-Disposition: inline In-Reply-To: <4877BAB8.1030804@system.pl> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.91.2, clamav-milter version 0.91.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.4 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on skuns.kiev.zoral.com.ua Cc: freebsd-emulation@freebsd.org Subject: Re: linux emulation: Preliminary support for more auxvec's [patch] X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 11 Jul 2008 20:14:55 -0000 --6xO04bqTG+NC5D6o Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 11, 2008 at 09:55:36PM +0200, Marcin Cieslak wrote: > Kostik Belousov wrote: > >On Fri, Jul 11, 2008 at 01:43:55PM +0200, Marcin Cieslak wrote: > >>Hello, > >> > >>Attached please find a simple diff to implement additional loader=20 > >>information (for background please see:=20 > >>http://lists.freebsd.org/pipermail/freebsd-emulation/2006-September/002= 591.html) > >Namely, AT_EXECPATH (somewhat similar to the Solaris auxvec of the same > >name) provides (might be relative) path for the binary being executed. >=20 > Thank you very much. >=20 > I have implemented the AT_PLATFORM, therefore all 2.6.16 (and later)=20 > i386/amd64 auxvecs are implemented, except for AT_SYSINFO and=20 > AT_SYSINFO_EHDR that are i386-specific and provide optional way of=20 > invoking linux syscalls (using so-called virtual dynamic shared object). >=20 > I think we don't need those. Do you know of any situation where we _must_ have those new auxvec you implemented ? >=20 > The code is completely untested on i386. My first attempts show that=20 > skype and acroread8 launch faster (probably due to the "hz" effect). >=20 > The patch is here: >=20 > http://akson.sgh.waw.pl/~saper/FreeBSD/linux/auxvec.diff I only briefly looked over it. I suggest that the new AT_COUNT requires more thinking. Look at the src/libexec/rtld-elf/rtld.c, _rtld(), at line 338, where the auxvec is digested by FreeBSD dynamic linker. It seems to be harmless, but at least this is inconsistent. May be, AT_LINUX_PLATFORM etc defines would make more sense. Do you actually need imgp->machine member ? It seems that it is used only inside linux_copyout_strings ? >=20 > This was made against 7-STABLE, but there no major differences in=20 > -current. It is also trivial to port to 64-bit amd64 emulation. Hmm, what are you referencing there ? I know only about one mostly stalled effort. --6xO04bqTG+NC5D6o Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkh3vzkACgkQC3+MBN1Mb4gcGwCeN8opVdZf5Kw3Pohrs5uQTEOb alUAnj+4JipcTqkYr7ADOFVWaZXBQyKs =cP19 -----END PGP SIGNATURE----- --6xO04bqTG+NC5D6o-- From owner-freebsd-emulation@FreeBSD.ORG Fri Jul 11 21:10:04 2008 Return-Path: Delivered-To: freebsd-emulation@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B988B106567A for ; Fri, 11 Jul 2008 21:10:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 9D3108FC1A for ; Fri, 11 Jul 2008 21:10:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m6BLA3mO090158 for ; Fri, 11 Jul 2008 21:10:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m6BLA3o4090145; Fri, 11 Jul 2008 21:10:03 GMT (envelope-from gnats) Date: Fri, 11 Jul 2008 21:10:03 GMT Message-Id: <200807112110.m6BLA3o4090145@freefall.freebsd.org> To: freebsd-emulation@FreeBSD.org From: Marcin Cieslak Cc: Subject: Re: kern/97326: [linux] file descriptor leakage in linux emulation X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Marcin Cieslak List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jul 2008 21:10:04 -0000 The following reply was made to PR kern/97326; it has been noted by GNATS. From: Marcin Cieslak To: bug-followup@FreeBSD.org, bakul@bitblocks.com Cc: Subject: Re: kern/97326: [linux] file descriptor leakage in linux emulation Date: Fri, 11 Jul 2008 23:02:36 +0200 This should be fixed in FreeBSD 7 as of November 2007: http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/compat/linux/linux_ioctl.c.diff?r1=1.138;r2=1.138.2.1 Can you check this? -- << Marcin Cieslak // saper@system.pl >> From owner-freebsd-emulation@FreeBSD.ORG Fri Jul 11 21:39:06 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D17CD106564A for ; Fri, 11 Jul 2008 21:39:06 +0000 (UTC) (envelope-from freebsd-emulation@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 60B0B8FC0C for ; Fri, 11 Jul 2008 21:39:05 +0000 (UTC) (envelope-from freebsd-emulation@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KHQKT-0000H2-RV for freebsd-emulation@freebsd.org; Fri, 11 Jul 2008 21:39:01 +0000 Received: from 81.210.247.130 ([81.210.247.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 11 Jul 2008 21:39:01 +0000 Received: from saper by 81.210.247.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 11 Jul 2008 21:39:01 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-emulation@freebsd.org From: Marcin Cieslak Date: Fri, 11 Jul 2008 23:38:47 +0200 Lines: 72 Message-ID: <4877D2E7.9020408@system.pl> References: <20080711115436.GZ17123@deviant.kiev.zoral.com.ua> <4877BAB8.1030804@system.pl> <20080711201450.GB17123@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-ripemd160; protocol="application/pgp-signature"; boundary="------------enig3BBBBF8E7698244C8C5474AC" X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 81.210.247.130 User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8.1.13) Gecko/20080405 SeaMonkey/1.1.9 Mnenhy/0.7.5.0 In-Reply-To: <20080711201450.GB17123@deviant.kiev.zoral.com.ua> X-Enigmail-Version: 0.95.6 Sender: news Subject: Re: linux emulation: Preliminary support for more auxvec's [patch] X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 11 Jul 2008 21:39:07 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig3BBBBF8E7698244C8C5474AC Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: quoted-printable Kostik Belousov wrote: > Do you know of any situation where we _must_ have those new auxvec you > implemented ? No, I learned about them today when I analyzed my auxvec fingerprint=20 from the real amd64 and i386 Linux boxes. >=20 >> >> http://akson.sgh.waw.pl/~saper/FreeBSD/linux/auxvec.diff > I only briefly looked over it. >=20 > I suggest that the new AT_COUNT requires more thinking. Look at the > src/libexec/rtld-elf/rtld.c, _rtld(), at line 338, where the auxvec is > digested by FreeBSD dynamic linker. It seems to be harmless, but at > least this is inconsistent. May be, AT_LINUX_PLATFORM etc defines > would make more sense. machine/elf.h will get updated with installworld (or make install in=20 includes) and rtld should get be recompiled with this. I did this and it works fine as it worked. The impact of this is=20 limited, since all the auxvec's rtld need are stored early. I don't think the AT_COUNT things is correct. >=20 > Do you actually need imgp->machine member ? It seems that it is used > only inside linux_copyout_strings ? No, it's referenced in elf_linux_fixup - that's the reason I need it. >> This was made against 7-STABLE, but there no major differences in=20 >> -current. It is also trivial to port to 64-bit amd64 emulation. > Hmm, what are you referencing there ? I know only about one mostly > stalled effort. Well, anyway the logic is pretty platform-independent and one needs to=20 be careful about pointer sizes (AT_PLATFORM) and such. Newly introduced linux_get_machine should take care of the 64-bit case. If we are going to support dynamic switching between 32 and 64 bit code=20 this will need to be dynamic as well ("x86_64" vs "i686"). I have my doubts about the linux_times() function in linux_misc.c, it tries to convert the clock tick to the FreeBSD value. Maybe it's no=20 longer necessary. If this is a problem, we can hardcode value "100" as being returned. --Marcin --------------enig3BBBBF8E7698244C8C5474AC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQCVAwUBSHfS6j2W2v2wY27ZAQMjHwP+NliobJxuVqw3NvAI7cc0yhbi7qaM5Ybm FAypt4puLpYYzkmKg6qAeXCWrsig/BtJ5SCKTbcPhGrVXrU4jlWf0+ZidTYGy2RM GP/91WNHyoOG3kYMU+cw0rggXFlfyuHI8gPHaqhlwkZwoYz21T5NPKYKFnt22t0l dQfenvwZ4nw= =xRtz -----END PGP SIGNATURE----- --------------enig3BBBBF8E7698244C8C5474AC-- From owner-freebsd-emulation@FreeBSD.ORG Sat Jul 12 00:19:48 2008 Return-Path: Delivered-To: emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8ED51065679 for ; Sat, 12 Jul 2008 00:19:48 +0000 (UTC) (envelope-from kpeter@melbpc.org.au) Received: from hosted07.westnet.com.au (hosted07.westnet.com.au [203.10.1.223]) by mx1.freebsd.org (Postfix) with ESMTP id 1C9328FC1F for ; Sat, 12 Jul 2008 00:19:47 +0000 (UTC) (envelope-from kpeter@melbpc.org.au) Received: from hosted07.westnet.com.au (hosted07.westnet.com.au [127.0.0.1]) by hosted07.westnet.com.au (Postfix) with SMTP id 0135633D980; Sat, 12 Jul 2008 08:19:46 +0800 (WST) Received: from baron.from.hell (dsl-220-235-227-141.vic.westnet.com.au [220.235.227.141]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by hosted07.westnet.com.au (Postfix) with ESMTP id D5B1A33D5E9; Sat, 12 Jul 2008 08:19:43 +0800 (WST) Message-ID: <4877F898.9080905@melbpc.org.au> Date: Sat, 12 Jul 2008 00:19:36 +0000 From: Peter Kostouros Organization: Melbourne PC User Group User-Agent: Thunderbird 2.0.0.14 (X11/20080421) MIME-Version: 1.0 To: Roman Divacky References: <4870260D.1080203@melbpc.org.au> <20080706094332.4de443b0@deskjail> <4871E04B.305@melbpc.org.au> <20080707111515.GA41171@freebsd.org> In-Reply-To: <20080707111515.GA41171@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Branch: TNG-Outgoing Cc: emulation@freebsd.org Subject: Re: Linux 2.6 emulation and Linux Java problem X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: kpeter@melbpc.org.au List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2008 00:19:48 -0000 Roman Divacky wrote: >> I used the normal kdump; unfortunately I could not install linux_kdump >> and did not persevere with it ("does not build with the default linux >> base, use the package instead" and I had a hiccup installing the >> package, too). I will look into dtrace over the weekend. >> > > try the linux_kdump... the dtrace might have problems on its own as it > is really new code... > > OK, I installed linux_kdump. >>>> 1860 java RET open 97/0x61 >>>> >>>> 1860 java CALL freebsd6_mmap(0x61, 0x2b639970, PROT_EXEC, MAP_FILE, >>>> 0xa5a5a5a5, ..., 0xa5a5a5a5, 0, ..., 0, 0xc, 0xdead0002, ... >>>> >>>> >>>> Note >>>> >>>> 1. These applications ran successfully with linux_base-fc4 and >>>> compat.linux.osrelease set to 2.4.2; >>>> 2. The success of running java applications also depends on >>>> debug.witness.watch: I get more mileage from java applications when this >>>> sysctl is 0. >>>> >>>> >>> Do you get witness warning/errors on the console? Please check and >>> report them if there are any. >>> > > a LOR could lead to a deadlock not a crash.... if you still have the ktrace.out > I believe you can put it on a web and we can run our own linux_kdump on it to > see what happened. can you make that available? > > ktrace.out is about 500MB. Anyways, one java process looks to be looping: RET linux_sys_futex -1 errno 110 Unknown error: 110 CALL linux_sys_futex(0x8092528,0x81,0x1,0xfffffffd,0x8092528,0x2affd250) RET linux_sys_futex 1 CALL linux_clock_gettime(0x1,0x2affd290) RET linux_clock_gettime 0 CALL gettimeofday(0x2affd2a8,0) RET gettimeofday 0 CALL linux_clock_gettime(0x1,0x2affd290) RET linux_clock_gettime 0 CALL linux_clock_gettime(0x1,0x2affd290) RET linux_clock_gettime 0 CALL gettimeofday(0x2affd240,0) RET gettimeofday 0 CALL linux_clock_gettime(0x1,0x2affd21c) RET linux_clock_gettime 0 CALL linux_sys_futex(0x80e0acc,0x80,0x1,0x2affd21c,0x1,0x2affd280) and another over sched_yield (although I am uncertain as I have not examined the entire dump). Let me know if you want anything from the trace. From owner-freebsd-emulation@FreeBSD.ORG Sat Jul 12 01:00:07 2008 Return-Path: Delivered-To: freebsd-emulation@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 573391065689 for ; Sat, 12 Jul 2008 01:00:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 3F2998FC19 for ; Sat, 12 Jul 2008 01:00:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m6C107d7009344 for ; Sat, 12 Jul 2008 01:00:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m6C1070D009343; Sat, 12 Jul 2008 01:00:07 GMT (envelope-from gnats) Date: Sat, 12 Jul 2008 01:00:07 GMT Message-Id: <200807120100.m6C1070D009343@freefall.freebsd.org> To: freebsd-emulation@FreeBSD.org From: Bakul Shah Cc: Subject: Re: kern/97326: [linux] file descriptor leakage in linux emulation X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Bakul Shah List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2008 01:00:07 -0000 The following reply was made to PR kern/97326; it has been noted by GNATS. From: Bakul Shah To: Marcin Cieslak Cc: bug-followup@FreeBSD.org, bakul@bitblocks.com Subject: Re: kern/97326: [linux] file descriptor leakage in linux emulation Date: Fri, 11 Jul 2008 17:33:11 -0700 On Fri, 11 Jul 2008 23:02:36 +0200 Marcin Cieslak wrote: > > This should be fixed in FreeBSD 7 as of November 2007: > > http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/compat/linux/linux_ioctl.c.diff > ?r1=1.138;r2=1.138.2.1 > > Can you check this? I couldn't test on the original machine with linux_base-fc-4 so I tested it on amd64 machine with linux_base-fc-8. Skype still seems to keep open far too many descriptors (480 compared to 140 on the mac) and this number goes up to 663 when making a skype test call but there seems to be no further leakage. Thanks! From owner-freebsd-emulation@FreeBSD.ORG Sat Jul 12 14:04:45 2008 Return-Path: Delivered-To: freebsd-emulation@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A40A1065671 for ; Sat, 12 Jul 2008 14:04:45 +0000 (UTC) (envelope-from itetcu@FreeBSD.org) Received: from it.buh.tecnik93.com (it.buh.tecnik93.com [81.196.204.98]) by mx1.freebsd.org (Postfix) with ESMTP id 5CCC28FC0C for ; Sat, 12 Jul 2008 14:04:44 +0000 (UTC) (envelope-from itetcu@FreeBSD.org) Received: from it.buh.tecnik93.com (localhost [127.0.0.1]) by it.buh.tecnik93.com (Postfix) with ESMTP id 0B1502C50CDD; Sat, 12 Jul 2008 16:47:40 +0300 (EEST) From: "QA Tindy" To: itetcu@FreeBSD.org X-Mailer: $Tecnik: people/itetcu/ports/QA-Tindy/QAT_postPortBuild.sh, v 1.11 2008/07/11 16:10:23 itetcu Exp $ Message-Id: <20080712064352.8E39812E3E81@quark.ds9.tecnik93.com> Date: Sat, 12 Jul 2008 09:43:52 +0300 (EEST) X-DSPAM-Result: Whitelisted X-DSPAM-Processed: Sat Jul 12 09:43:59 2008 X-DSPAM-Confidence: 0.9990 X-DSPAM-Improbability: 1 in 100261 chance of being spam X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 1001,487852af7906882918525 Resent-Date: Sat, 12 Jul 2008 16:47:39 +0300 Resent-From: Ion-Mihai Tetcu Resent-Message-ID: <20080712164739.2a3a0a57@it.buh.tecnik93.com> Resent-To: freebsd-emulation@FreeBSD.org Resent-Cc: Mark Linimon Cc: Subject: graphics/linux-png - fails: FAIL X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 12 Jul 2008 14:04:45 -0000 Hi, The build which triggered this email is done under tinderbox-2.4.3, on 7-STABLE on amd64, with tinderd_flags="-nullfs -plistcheck -onceonly" and ccache support, with the official up-to-date Ports Tree (for commit-triggered builds the files are fetched via CVSWeb), with the following vars set: NOPORTDOCS=yes, NOPORTEXAMPLES=yes, NOPORTDATA=yes, FORCE_PACKAGE=yes. Except from http://t64.tecnik93.com/logs/7-STABLE-FTP/linux-png-1.2.8_2.log: building linux-png-1.2.8_2 in directory /var/tinderbox/7-STABLE-FTP maintained by: freebsd-emulation@FreeBSD.org building for: 7.0-STABLE amd64 port directory: /usr/ports/graphics/linux-png Makefile ident: $FreeBSD: ports/graphics/linux-png/Makefile,v 1.24 2008/04/19 17:50:26 miwi Exp $ prefixes: LOCALBASE=usr/local X11BASE=usr/local NO* env vars: NOPORTDOCS=yes NOPORTEXAMPLES=yes NOPORTDATA=yes build started at Sat Jul 12 06:43:02 UTC 2008 ................................................... Let your lists for hosts, passwd and group be resolved via nsswitch.conf: passwd: files nis shadow: files nis group: files nis hosts: files dns nis WARNING: doing work which needs to chroot into the linux base may not work. In such cases (e.g. cross-development) you are better suited with a linux_dist port. ===> Installing for linux-png-1.2.8_2 ===> linux-png-1.2.8_2 depends on file: /compat/linux/etc/fedora-release - found ===> Generating temporary packing list ===> Checking if graphics/linux-png already installed cd /work/a/ports/graphics/linux-png/work && /usr/bin/find * -type d -exec /bin/mkdir -p "/compat/linux/{}" \; cd /work/a/ports/graphics/linux-png/work && /usr/bin/find * ! -type d | /usr/bin/cpio -pm -R root:wheel /compat/linux 790 blocks ===> Running linux ldconfig /compat/linux/sbin/ldconfig -r /compat/linux ===> Registering installation for linux-png-1.2.8_2 ================================================================ ======================================== ===> Building package for linux-png-1.2.8_2 Creating package /tmp/packages/All/linux-png-1.2.8_2.tbz Registering depends: linux_base-fc-4_13. Creating bzip'd tar ball in '/tmp/packages/All/linux-png-1.2.8_2.tbz' Deleting linux-png-1.2.8_2 ================================================================ === Checking filesystem state list of extra files and directories in / (not present before this port was installed but present after it was deinstalled) 15238400 4 drwxr-xr-x 2 root wheel 512 Jul 12 06:43 compat/linux/usr/share/doc/libpng-1.2.8 15238401 156 -rw-r--r-- 1 root wheel 79441 Jul 12 06:43 compat/linux/usr/share/doc/libpng-1.2.8/CHANGES 15238403 12 -rw-r--r-- 1 root wheel 4105 Jul 12 06:43 compat/linux/usr/share/doc/libpng-1.2.8/LICENSE 15238410 28 -rw-r--r-- 1 root wheel 13988 Jul 12 06:43 compat/linux/usr/share/doc/libpng-1.2.8/README 15238418 4 -rw-r--r-- 1 root wheel 1182 Jul 12 06:43 compat/linux/usr/share/doc/libpng-1.2.8/TODO 15238419 60 -rw-r--r-- 1 root wheel 29793 Jul 12 06:43 compat/linux/usr/share/doc/libpng-1.2.8/example.c 15238420 252 -rw-r--r-- 1 root wheel 127770 Jul 12 06:43 compat/linux/usr/share/doc/libpng-1.2.8/libpng.txt ================================================================ build of /usr/ports/graphics/linux-png ended at Sat Jul 12 06:43:49 UTC 2008 A description of the testing process can be found here: http://T32.TecNik93.com/FreeBSD/QA-Tindy/testing_process.txt Thanks for your work on making FreeBSD better, -- IOnut - Un^d^dregistered ;) FreeBSD "user" "Intellectual Property" is nowhere near as valuable as "Intellect" FreeBSD committer -> itetcu@FreeBSD.org, PGP Key ID 057E9F8B493A297B