From owner-freebsd-emulation@FreeBSD.ORG Sun Sep 7 18:53: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 31963106566C; Sun, 7 Sep 2008 18:53:57 +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 BA5CC8FC18; Sun, 7 Sep 2008 18:53:56 +0000 (UTC) (envelope-from nox@saturn.kn-bremen.de) Received: by gwyn.kn-bremen.de (Postfix, from userid 10) id 4E88F191A9A; Sun, 7 Sep 2008 20:53:55 +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 m87IqW4I072460; Sun, 7 Sep 2008 20:52:32 +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 m87IqWg1072459; Sun, 7 Sep 2008 20:52:32 +0200 (CEST) (envelope-from nox) From: Juergen Lock Date: Sun, 7 Sep 2008 20:52:31 +0200 To: "Sean C. Farley" Message-ID: <20080907185231.GA72139@saturn.kn-bremen.de> Mail-Followup-To: "Sean C. Farley" , kostikbel@gmail.com, freebsd-emulation@freebsd.org References: <20080830113448.GA2152@dchagin.dialup.corbina.ru> <20080906104659.GA2113@dchagin.dialup.corbina.ru> <200809062215.m86MF6NS040797@saturn.kn-bremen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200809062215.m86MF6NS040797@saturn.kn-bremen.de> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-emulation@freebsd.org Subject: Re: Linux applications core if running (k)qemu 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, 07 Sep 2008 18:53:57 -0000 On Sun, Sep 07, 2008 at 12:15:06AM +0200, I wrote: > In article <20080906152929.GB2038@deviant.kiev.zoral.com.ua> you write: > >-=-=-=-=-=- > > > >On Sat, Sep 06, 2008 at 02:46:59PM +0400, Chagin Dmitry wrote: > >> On Tue, Sep 02, 2008 at 03:56:33PM -0500, Sean C. Farley wrote: > >> > On Sat, 30 Aug 2008, Chagin Dmitry wrote: > >> > > >> > >On Fri, Aug 29, 2008 at 05:29:09PM -0500, Sean C. Farley wrote: > >> > >>I am having trouble with kqemu.ko and linux.ko. If I run qemu with > >> > >>the following command, Linux applications (chroot, acroread, ls) will > >> > >>start core dumping: > >> > >> qemu-system-x86_64 -m 512 \ > >> > >> -drive file=/usr/QEMU/WinXP/c.img,if=ide,media=disk -boot c \ > >> > >> -std-vga -parallel none -serial none -monitor stdio \ > >> > >> -net nic,model=e1000 -net tap,ifname=tap0,script=no -localtime > >> > >> > >> > >>Loading kqemu.ko does not cause the problem, but the cores start a > >> > >>little after WinXP starts running. Unloading kqemu.ko does not help; > >> > >>the cores still happen but more randomly. I even tried unloading all > >> > >>linux modules and reloading them without luck. It takes a reboot. > >> > >> > >> > >>Packages: > >> > >>qemu-devel-0.9.1s.20080620_1 > >> > >>kqemu-kmod-devel-1.4.0.p1 > >> > >>linux_base-f8-8_4 > >> > >> > >> > >>sysctl: > >> > >>compat.linux.osrelease: 2.6.16 > >> > >> > >> > >>dmesg: > >> > >>kqemu version 0x00010400 > >> > >>kqemu: KQEMU installed, max_locked_mem=1792492kB. > >> > >> > >> > >>System is 7-STABLE as of r181963 with or without the patch to fix RT > >> > >>signals from Chagin. > >> > > > >> > >Interestingly... Sean, can you provide ktrace/kdump log of coring > >> > >apps? thnx! > >> > > >> > Here they are (good and bad): > >> > http://www.farley.org/freebsd/tmp/linuxulator_vs_kqemu/ > >> > > >> > The good trace is after the bad trace. I just kept running ktrace > >> > /compat/linux/bin/date over and over until I got a good trace. Before > >> > loading kqemu and running qemu, there were no core dumps. Also, I > >> > compared two bad traces and they were basically the same except for PID > >> > and a couple of addresses (still very close in value). > >> > > >> > >> Most likely it is a tls problem again, some days ago kib@ has made MFC > >> r182684, probably it will help.. > > > >I doubt it. This seems to be an ingenious kqemu bug. As far as I remember, > >it tries to use GDT/LDT. This probably has unwanted interaction with > >PCB_GS32BIT. > > Wow. That corner of the code had escaped me so far, and yes this (in > amd64/linux32) looks like it won't like kqemu's seperating of the gdts > on SMP indeed. (it stores a pointer to &gdt[GUGS32_SEL] in pcb_gs32p and > lets linux processes manipulate the segment pointed to by it, and when > kqemu is (or was) running this won't be used by all cpus, see older threads > like > http://lists.freebsd.org/pipermail/freebsd-emulation/2008-May/004902.html > for the reasons.) > > What I wonder tho is, won't this also cause problems without kqemu when > there are linux processes running on multiple cpus that manipulate this > segment because the gdt is then shared between the cpus? (like, linux > process on cpu 0 changes the segment, then linux process on cpu 1 comes > along and changes it again and then the linux process on cpu 0 will pick > it up from cpu 1?) At least I must have somehow assumed the shared gdt > wouldn't be changed later because of reasons like this... > > Anyway, fixing this will require changes to the kernel, I don't see how > kqemu could fix it by itself alone. :( There is a possible workaround tho that you can try if you are on RELENG_7 or HEAD (and you are running ULE): cpuset -l 0 qemu... (Obviously this is less than ideal if you need more than one qemu at a time, so we still want a proper fix.) Btw I couldn't reproduce the crashing linux date(1) on RELENG_7_0, so I guess it was only later commits that uncovered the problem... HTH, (or at least a bit :) Juergen From owner-freebsd-emulation@FreeBSD.ORG Sun Sep 7 20:25:20 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 84ACE1065674 for ; Sun, 7 Sep 2008 20:25:20 +0000 (UTC) (envelope-from mita@ee.t.u-tokyo.ac.jp) Received: from mx.ee.t.u-tokyo.ac.jp (bell.fi.k.u-tokyo.ac.jp [157.82.13.244]) by mx1.freebsd.org (Postfix) with ESMTP id 661178FC29 for ; Sun, 7 Sep 2008 20:25:20 +0000 (UTC) (envelope-from mita@ee.t.u-tokyo.ac.jp) Received: from micro.if.t.u-tokyo.ac.jp (bell.ee.t.u-tokyo.ac.jp [157.82.13.244]) by mx.ee.t.u-tokyo.ac.jp (Postfix) with ESMTP id B528557AB4; Mon, 8 Sep 2008 04:53:27 +0900 (JST) Date: Sun, 07 Sep 2008 21:52:55 +0200 Message-ID: <7ozlmjag2w.wl%mita@ee.t.u-tokyo.ac.jp> From: MITA Yoshio To: freebsd-emulation@freebsd.org In-Reply-To: <200803162311.25730.beech@freebsd.org> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.7 Emacs/22.2 (i386-pc-freebsd) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: Subject: Skype core dumps as normal user 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, 07 Sep 2008 20:25:20 -0000 Hello, > On Sun, 16 Mar 2008 23:11:21 -0800 Beech Rintoul wrote: > > > I've run into a problem starting skype as a normal user: > > > $ skype --resources=/usr/local/share/skype > > *** glibc detected *** skype: double free or corruption (!prev): > > 0x092ad7f0 *** > > ======= Backtrace: ========= > > /lib/libc.so.6[0x295c3f64] > > /lib/libc.so.6(cfree+0x90)[0x295c7630] > > /lib/libc.so.6(closedir+0x28)[0x295e8308] > > /usr/lib/libfontconfig.so.1(FcDirScan+0x1f2)[0x2931321d] > > /usr/lib/libfontconfig.so.1(FcConfigBuildFonts+0x94)[0x2930dd51] > > /usr/lib/libfontconfig.so.1(FcInitLoadConfigAndFonts+0x26)[0x293150b3] > > /usr/lib/libfontconfig.so.1(FcInit+0x2e)[0x293152b0] > > [skip] > > > Does anyone have any ideas on where to go with this, or should I kick > > it upstream? > > Looks like http://www.freebsd.org/cgi/query-pr.cgi?pr=117010 . > > > WBR, bsam Yes it appears to be the same problem reported at pr=117010. By applying the patch posted as a followup to that PR, my skype begun to work correctly. The strange thing is that, using the identical packages and on the same 7.0-RELEASE, skype on one computer works, but another doesn't. Maybe it depends on font path configuration? as skype seems to crash on font configuration. All the best, Tested Environment: FreeBSD 7.0-RELEASE linux_base-fc6-6_5 linux-glib2-2.6.6 skype-2.0.0.68,1 /etc/sysctl.conf: compat.linux.osrelease=2.6.16 /etc/make.conf: OVERRIDE_LINUX_BASE_PORT=fc6 --- MITA Yoshio From owner-freebsd-emulation@FreeBSD.ORG Sun Sep 7 20:30: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 DCBB1106566C for ; Sun, 7 Sep 2008 20:30: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 D1E288FC2C for ; Sun, 7 Sep 2008 20:30: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 m87KU4Nk064649 for ; Sun, 7 Sep 2008 20:30:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m87KU44I064646; Sun, 7 Sep 2008 20:30:04 GMT (envelope-from gnats) Date: Sun, 7 Sep 2008 20:30:04 GMT Message-Id: <200809072030.m87KU44I064646@freefall.freebsd.org> To: freebsd-emulation@FreeBSD.org From: MITA Yoshio Cc: Subject: Re: kern/117010: [linux] linux_getdents() get something like buffer overflow or else X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: MITA Yoshio List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Sep 2008 20:30:04 -0000 The following reply was made to PR kern/117010; it has been noted by GNATS. From: MITA Yoshio To: bug-followup@FreeBSD.org,samflanker@gmail.com, Chagin Dmitry , beech@FreeBSD.org Cc: Subject: Re: kern/117010: [linux] linux_getdents() get something like buffer overflow or else Date: Sun, 07 Sep 2008 21:42:15 +0200 Hello, I've tested a patch from Mr. Dmitry concerning Mr. Ermakov's PR: http://www.freebsd.org/cgi/query-pr.cgi?pr=117010 Patch: >From: Chagin Dmitry >Date: Fri, 25 Jul 2008 10:22:46 +0400 (MSD) This worked!!! to make skype2 work. Otherwise skype2 dumped core as Mr. reported. Regards, ----- Tested Environment: FreeBSD 7.0-RELEASE linux_base-fc6-6_5 linux-glib2-2.6.6 skype-2.0.0.68,1 /etc/sysctl.conf: compat.linux.osrelease=2.6.16 /etc/make.conf: OVERRIDE_LINUX_BASE_PORT=fc6 ----- MITA Yoshio From owner-freebsd-emulation@FreeBSD.ORG Sun Sep 7 20:36: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 C9DAE1065675; Sun, 7 Sep 2008 20:36:56 +0000 (UTC) (envelope-from bsam@ipt.ru) Received: from mail.ipt.ru (mail.ipt.ru [194.62.233.102]) by mx1.freebsd.org (Postfix) with ESMTP id 920D78FC1C; Sun, 7 Sep 2008 20:36:56 +0000 (UTC) (envelope-from bsam@ipt.ru) Received: from sp34.ipt.ru ([194.62.233.107] helo=bs1.sp34.ru) by mail.ipt.ru with esmtp (Exim 4.62 (FreeBSD)) (envelope-from ) id 1KcQZ7-000E5i-Ba; Mon, 08 Sep 2008 00:08:57 +0400 Received: from bsam by bs1.sp34.ru with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1KcQZc-0002NG-FM; Mon, 08 Sep 2008 00:09:28 +0400 To: MITA Yoshio References: <7ozlmjag2w.wl%mita@ee.t.u-tokyo.ac.jp> From: Boris Samorodov Date: Mon, 08 Sep 2008 00:09:28 +0400 In-Reply-To: <7ozlmjag2w.wl%mita@ee.t.u-tokyo.ac.jp> (MITA Yoshio's message of "Sun\, 07 Sep 2008 21\:52\:55 +0200") Message-ID: <83313575@bs1.sp34.ru> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-emulation@freebsd.org Subject: Re: Skype core dumps as normal user 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, 07 Sep 2008 20:36:56 -0000 On Sun, 07 Sep 2008 21:52:55 +0200 MITA Yoshio wrote: > > On Sun, 16 Mar 2008 23:11:21 -0800 Beech Rintoul wrote: > > > > > I've run into a problem starting skype as a normal user: > > > > > $ skype --resources=/usr/local/share/skype > > > *** glibc detected *** skype: double free or corruption (!prev): > > > 0x092ad7f0 *** > > > ======= Backtrace: ========= > > > /lib/libc.so.6[0x295c3f64] > > > /lib/libc.so.6(cfree+0x90)[0x295c7630] > > > /lib/libc.so.6(closedir+0x28)[0x295e8308] > > > /usr/lib/libfontconfig.so.1(FcDirScan+0x1f2)[0x2931321d] > > > /usr/lib/libfontconfig.so.1(FcConfigBuildFonts+0x94)[0x2930dd51] > > > /usr/lib/libfontconfig.so.1(FcInitLoadConfigAndFonts+0x26)[0x293150b3] > > > /usr/lib/libfontconfig.so.1(FcInit+0x2e)[0x293152b0] > > > > [skip] > > > > > Does anyone have any ideas on where to go with this, or should I kick > > > it upstream? > > > > Looks like http://www.freebsd.org/cgi/query-pr.cgi?pr=117010 . > Yes it appears to be the same problem reported at pr=117010. By > applying the patch posted as a followup to that PR, my skype begun > to work correctly. It will be great if you can write a follow-up to the PR so this information won't get lost. > The strange thing is that, using the identical packages and on the > same 7.0-RELEASE, skype on one computer works, but another > doesn't. Maybe it depends on font path configuration? as skype > seems to crash on font configuration. AFAIK directoriea are read by a program by blocks, say 1024 bytes long. If it so happens that current portion of directory entries equals to that length, than that error occures. > All the best, > Tested Environment: > FreeBSD 7.0-RELEASE > linux_base-fc6-6_5 Seems that there were reports that the patch you had used is not needed with linux_base-f8 port. > linux-glib2-2.6.6 > skype-2.0.0.68,1 > /etc/sysctl.conf: > compat.linux.osrelease=2.6.16 > /etc/make.conf: > OVERRIDE_LINUX_BASE_PORT=fc6 WBR -- Boris Samorodov (bsam) Research Engineer, http://www.ipt.ru Telephone & Internet SP FreeBSD committer, http://www.FreeBSD.org The Power To Serve From owner-freebsd-emulation@FreeBSD.ORG Sun Sep 7 20:42:36 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 702561065673; Sun, 7 Sep 2008 20:42:36 +0000 (UTC) (envelope-from mita@ee.t.u-tokyo.ac.jp) Received: from mx.ee.t.u-tokyo.ac.jp (mx.ee.t.u-tokyo.ac.jp [157.82.13.244]) by mx1.freebsd.org (Postfix) with ESMTP id 4F0B08FC08; Sun, 7 Sep 2008 20:42:36 +0000 (UTC) (envelope-from mita@ee.t.u-tokyo.ac.jp) Received: from micro.if.t.u-tokyo.ac.jp (bell.ee.t.u-tokyo.ac.jp [157.82.13.244]) by mx.ee.t.u-tokyo.ac.jp (Postfix) with ESMTP id BA6EC57B1A; Mon, 8 Sep 2008 05:42:33 +0900 (JST) Date: Sun, 07 Sep 2008 22:42:07 +0200 Message-ID: <7ovdx7adsw.wl%mita@ee.t.u-tokyo.ac.jp> From: MITA Yoshio To: Boris Samorodov In-Reply-To: <83313575@bs1.sp34.ru> References: <7ozlmjag2w.wl%mita@ee.t.u-tokyo.ac.jp> <83313575@bs1.sp34.ru> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.7 Emacs/22.2 (i386-pc-freebsd) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: freebsd-emulation@freebsd.org, MITA Yoshio Subject: Re: Skype core dumps as normal user 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, 07 Sep 2008 20:42:36 -0000 Hello, >It will be great if you can write a follow-up to the PR so this >information won't get lost. Yes in parallel I made a follow-up Mail to that PR (followup mail to bug-followup@FreeBSD.org will be resistered to that PR?? non??) > > Tested Environment: > > FreeBSD 7.0-RELEASE > > linux_base-fc6-6_5 > > Seems that there were reports that the patch you had used is not > needed with linux_base-f8 port. Well, fc6 was recommended as skype installation procedure in /usr/ports/README for 7.0-RELEASE. So I don't know what should be changed either README or kernel... Cheers, --- MITA Yoshio From owner-freebsd-emulation@FreeBSD.ORG Sun Sep 7 20:58:42 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 85DAE106566C; Sun, 7 Sep 2008 20:58:42 +0000 (UTC) (envelope-from bsam@ipt.ru) Received: from mail.ipt.ru (mail.ipt.ru [194.62.233.102]) by mx1.freebsd.org (Postfix) with ESMTP id 4C8CF8FC15; Sun, 7 Sep 2008 20:58:42 +0000 (UTC) (envelope-from bsam@ipt.ru) Received: from sp34.ipt.ru ([194.62.233.107] helo=bs1.sp34.ru) by mail.ipt.ru with esmtp (Exim 4.62 (FreeBSD)) (envelope-from ) id 1KcRLE-000EG5-KE; Mon, 08 Sep 2008 00:58:40 +0400 Received: from bsam by bs1.sp34.ru with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1KcRLj-0002PE-Jz; Mon, 08 Sep 2008 00:59:11 +0400 To: MITA Yoshio References: <7ozlmjag2w.wl%mita@ee.t.u-tokyo.ac.jp> <83313575@bs1.sp34.ru> <7ovdx7adsw.wl%mita@ee.t.u-tokyo.ac.jp> From: Boris Samorodov Date: Mon, 08 Sep 2008 00:59:11 +0400 In-Reply-To: <7ovdx7adsw.wl%mita@ee.t.u-tokyo.ac.jp> (MITA Yoshio's message of "Sun\, 07 Sep 2008 22\:42\:07 +0200") Message-ID: <51150592@bs1.sp34.ru> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-emulation@freebsd.org Subject: Re: Skype core dumps as normal user 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, 07 Sep 2008 20:58:42 -0000 On Sun, 07 Sep 2008 22:42:07 +0200 MITA Yoshio wrote: > >It will be great if you can write a follow-up to the PR so this > >information won't get lost. > Yes in parallel I made a follow-up Mail to that PR (followup mail > to bug-followup@FreeBSD.org will be resistered to that PR?? non??) Yep, it is registered by now, thanks. > > > Tested Environment: > > > FreeBSD 7.0-RELEASE > > > linux_base-fc6-6_5 > > > > Seems that there were reports that the patch you had used is not > > needed with linux_base-f8 port. > Well, fc6 was recommended as skype installation procedure in > /usr/ports/README for 7.0-RELEASE. So I don't know what should be > changed either README or kernel... I wrote that only to inform you about other possibilities. ;-) WBR -- Boris Samorodov (bsam) Research Engineer, http://www.ipt.ru Telephone & Internet SP FreeBSD committer, http://www.FreeBSD.org The Power To Serve From owner-freebsd-emulation@FreeBSD.ORG Sun Sep 7 21:12:37 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 D4F9F1065671 for ; Sun, 7 Sep 2008 21:12:37 +0000 (UTC) (envelope-from root@dchagin.dialup.corbina.ru) Received: from contrabass.post.ru (contrabass.post.ru [85.21.78.5]) by mx1.freebsd.org (Postfix) with ESMTP id 32FB08FC0A for ; Sun, 7 Sep 2008 21:12:36 +0000 (UTC) (envelope-from root@dchagin.dialup.corbina.ru) Received: from corbina.ru (mail.post.ru [195.14.50.16]) by contrabass.post.ru (Postfix) with ESMTP id BEBC91A065E; Mon, 8 Sep 2008 01:12:34 +0400 (MSD) X-Virus-Scanned: by cgpav Uf39PSi9pFi9oFi9 Received: from [10.208.17.3] (HELO dchagin.dialup.corbina.ru) by corbina.ru (CommuniGate Pro SMTP 5.1.14) with ESMTPS id 1081057217; Mon, 08 Sep 2008 01:12:34 +0400 Received: from dchagin.dialup.corbina.ru (localhost.chd.net [127.0.0.1]) by dchagin.dialup.corbina.ru (8.14.2/8.14.2) with ESMTP id m87LCXDC051866; Mon, 8 Sep 2008 01:12:33 +0400 (MSD) (envelope-from root@dchagin.dialup.corbina.ru) Received: (from root@localhost) by dchagin.dialup.corbina.ru (8.14.2/8.14.2/Submit) id m87LCSJt051865; Mon, 8 Sep 2008 01:12:28 +0400 (MSD) (envelope-from root) Date: Mon, 8 Sep 2008 01:12:28 +0400 From: Chagin Dmitry To: MITA Yoshio Message-ID: <20080907211228.GA51816@dchagin.dialup.corbina.ru> Mail-Followup-To: MITA Yoshio , freebsd-emulation@freebsd.org References: <200809072030.m87KU44I064646@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200809072030.m87KU44I064646@freefall.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-emulation@freebsd.org Subject: Re: kern/117010: [linux] linux_getdents() get something like buffer overflow or else 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, 07 Sep 2008 21:12:37 -0000 On Sun, Sep 07, 2008 at 08:30:04PM +0000, MITA Yoshio wrote: > The following reply was made to PR kern/117010; it has been noted by GNATS. > > From: MITA Yoshio > To: bug-followup@FreeBSD.org,samflanker@gmail.com, > Chagin Dmitry , > beech@FreeBSD.org > Cc: > Subject: Re: kern/117010: [linux] linux_getdents() get something like buffer overflow or else > Date: Sun, 07 Sep 2008 21:42:15 +0200 > > Hello, > > I've tested a patch from Mr. Dmitry concerning Mr. Ermakov's PR: > > http://www.freebsd.org/cgi/query-pr.cgi?pr=117010 > > Patch: > >From: Chagin Dmitry > >Date: Fri, 25 Jul 2008 10:22:46 +0400 (MSD) > > This worked!!! to make skype2 work. > Otherwise skype2 dumped core as Mr. reported. > > Regards, > ----- > Tested Environment: > FreeBSD 7.0-RELEASE > linux_base-fc6-6_5 > linux-glib2-2.6.6 > skype-2.0.0.68,1 > > /etc/sysctl.conf: > compat.linux.osrelease=2.6.16 > > /etc/make.conf: > OVERRIDE_LINUX_BASE_PORT=fc6 Please, try a patch bellow: diff --git a/src/sys/compat/linux/linux_file.c b/src/sys/compat/linux/linux_file.c index 303bc3f..413e597 100644 --- a/src/sys/compat/linux/linux_file.c +++ b/src/sys/compat/linux/linux_file.c @@ -303,9 +303,20 @@ struct l_dirent64 { char d_name[LINUX_NAME_MAX + 1]; }; -#define LINUX_RECLEN(de,namlen) \ - ALIGN((((char *)&(de)->d_name - (char *)de) + (namlen) + 1)) +/* + * Linux uses the last byte in the dirent buffer to store d_type, + * at least glibc-2.7 requires it. For what l_dirent padded on 2 bytes. + */ +#define LINUX_RECLEN(namlen) \ + roundup((offsetof(struct l_dirent, d_name) + (namlen) + 2), \ + sizeof(l_ulong)) + +#define LINUX_RECLEN64(namlen) \ + roundup((offsetof(struct l_dirent64, d_name) + (namlen) + 1), \ + sizeof(uint64_t)) +#define LINUX_MAXRECLEN max(LINUX_RECLEN(LINUX_NAME_MAX), \ + LINUX_RECLEN64(LINUX_NAME_MAX)) #define LINUX_DIRBLKSIZ 512 static int @@ -318,12 +329,13 @@ getdents_common(struct thread *td, struct linux_getdents64_args *args, int len, reclen; /* BSD-format */ caddr_t outp; /* Linux-format */ int resid, linuxreclen=0; /* Linux-format */ + caddr_t lbuf; /* Linux-format */ struct file *fp; struct uio auio; struct iovec aiov; off_t off; - struct l_dirent linux_dirent; - struct l_dirent64 linux_dirent64; + struct l_dirent *linux_dirent; + struct l_dirent64 *linux_dirent64; int buflen, error, eofflag, nbytes, justone; u_long *cookies = NULL, *cookiep; int ncookies, vfslocked; @@ -359,6 +371,7 @@ getdents_common(struct thread *td, struct linux_getdents64_args *args, buflen = max(LINUX_DIRBLKSIZ, nbytes); buflen = min(buflen, MAXBSIZE); buf = malloc(buflen, M_TEMP, M_WAITOK); + lbuf = malloc(LINUX_MAXRECLEN, M_TEMP, M_WAITOK | M_ZERO); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); again: @@ -436,8 +449,8 @@ again: } linuxreclen = (is64bit) - ? LINUX_RECLEN(&linux_dirent64, bdp->d_namlen) - : LINUX_RECLEN(&linux_dirent, bdp->d_namlen); + ? LINUX_RECLEN64(bdp->d_namlen) + : LINUX_RECLEN(bdp->d_namlen); if (reclen > len || resid < linuxreclen) { outp++; @@ -446,34 +459,41 @@ again: if (justone) { /* readdir(2) case. */ - linux_dirent.d_ino = bdp->d_fileno; - linux_dirent.d_off = (l_off_t)linuxreclen; - linux_dirent.d_reclen = (l_ushort)bdp->d_namlen; - strcpy(linux_dirent.d_name, bdp->d_name); - error = copyout(&linux_dirent, outp, linuxreclen); - } else { - if (is64bit) { - linux_dirent64.d_ino = bdp->d_fileno; - linux_dirent64.d_off = (cookiep) - ? (l_off_t)*cookiep - : (l_off_t)(off + reclen); - linux_dirent64.d_reclen = - (l_ushort)linuxreclen; - linux_dirent64.d_type = bdp->d_type; - strcpy(linux_dirent64.d_name, bdp->d_name); - error = copyout(&linux_dirent64, outp, - linuxreclen); - } else { - linux_dirent.d_ino = bdp->d_fileno; - linux_dirent.d_off = (cookiep) - ? (l_off_t)*cookiep - : (l_off_t)(off + reclen); - linux_dirent.d_reclen = (l_ushort)linuxreclen; - strcpy(linux_dirent.d_name, bdp->d_name); - error = copyout(&linux_dirent, outp, - linuxreclen); - } + linux_dirent = (struct l_dirent*)lbuf; + linux_dirent->d_ino = bdp->d_fileno; + linux_dirent->d_off = (l_off_t)linuxreclen; + linux_dirent->d_reclen = (l_ushort)bdp->d_namlen; + strlcpy(linux_dirent->d_name, bdp->d_name, + linuxreclen - offsetof(struct l_dirent, d_name)); + error = copyout(linux_dirent, outp, linuxreclen); } + if (is64bit) { + linux_dirent64 = (struct l_dirent64*)lbuf; + linux_dirent64->d_ino = bdp->d_fileno; + linux_dirent64->d_off = (cookiep) + ? (l_off_t)*cookiep + : (l_off_t)(off + reclen); + linux_dirent64->d_reclen = (l_ushort)linuxreclen; + linux_dirent64->d_type = bdp->d_type; + strlcpy(linux_dirent64->d_name, bdp->d_name, + linuxreclen - offsetof(struct l_dirent64, d_name)); + error = copyout(linux_dirent64, outp, linuxreclen); + } else if (!justone) { + linux_dirent = (struct l_dirent*)lbuf; + linux_dirent->d_ino = bdp->d_fileno; + linux_dirent->d_off = (cookiep) + ? (l_off_t)*cookiep + : (l_off_t)(off + reclen); + linux_dirent->d_reclen = (l_ushort)linuxreclen; + /* + * Copy d_type to last byte of l_dirent buffer + */ + lbuf[linuxreclen-1] = bdp->d_type; + strlcpy(linux_dirent->d_name, bdp->d_name, + linuxreclen - offsetof(struct l_dirent, d_name)-1); + error = copyout(linux_dirent, outp, linuxreclen); + } + if (error) goto out; @@ -509,6 +529,7 @@ out: VFS_UNLOCK_GIANT(vfslocked); fdrop(fp, td); free(buf, M_TEMP); + free(lbuf, M_TEMP); return (error); } Roman, I think that this patch can be commited (if testing passes :)) thnx! -- Have fun! chd From owner-freebsd-emulation@FreeBSD.ORG Sun Sep 7 21:53: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 A3E9B106564A; Sun, 7 Sep 2008 21:53:11 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id 4B2698FC23; Sun, 7 Sep 2008 21:53:11 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtp (Exim 4.63 (FreeBSD)) (envelope-from ) id 1KcSBw-000Cld-Nn; Mon, 08 Sep 2008 00:53:09 +0300 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 m87Lr0jk016165 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 8 Sep 2008 00:53:01 +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 m87Lr0kG041672; Mon, 8 Sep 2008 00:53:00 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id m87Lr0x0041671; Mon, 8 Sep 2008 00:53:00 +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: Mon, 8 Sep 2008 00:53:00 +0300 From: Kostik Belousov To: Juergen Lock Message-ID: <20080907215300.GH2038@deviant.kiev.zoral.com.ua> References: <20080830113448.GA2152@dchagin.dialup.corbina.ru> <20080906104659.GA2113@dchagin.dialup.corbina.ru> <200809062215.m86MF6NS040797@saturn.kn-bremen.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KmlZJfNsL65MWMNI" Content-Disposition: inline In-Reply-To: <200809062215.m86MF6NS040797@saturn.kn-bremen.de> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.93.3, clamav-milter version 0.93.3 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.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1KcSBw-000Cld-Nn d7b7b5504c113b763aff89a06fa7053e X-Terabit: YES Cc: freebsd-emulation@freebsd.org, peter@freebsd.org Subject: Re: Linux applications core if running (k)qemu 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, 07 Sep 2008 21:53:11 -0000 --KmlZJfNsL65MWMNI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 07, 2008 at 12:15:06AM +0200, Juergen Lock wrote: > In article <20080906152929.GB2038@deviant.kiev.zoral.com.ua> you write: > >-=3D-=3D-=3D-=3D-=3D- > > > >On Sat, Sep 06, 2008 at 02:46:59PM +0400, Chagin Dmitry wrote: > >> On Tue, Sep 02, 2008 at 03:56:33PM -0500, Sean C. Farley wrote: > >> > On Sat, 30 Aug 2008, Chagin Dmitry wrote: > >> >=20 > >> > >On Fri, Aug 29, 2008 at 05:29:09PM -0500, Sean C. Farley wrote: > >> > >>I am having trouble with kqemu.ko and linux.ko. If I run qemu with > >> > >>the following command, Linux applications (chroot, acroread, ls) w= ill > >> > >>start core dumping: > >> > >> qemu-system-x86_64 -m 512 \ > >> > >> -drive file=3D/usr/QEMU/WinXP/c.img,if=3Dide,media=3Ddisk -boo= t c \ > >> > >> -std-vga -parallel none -serial none -monitor stdio \ > >> > >> -net nic,model=3De1000 -net tap,ifname=3Dtap0,script=3Dno -loc= altime > >> > >> > >> > >>Loading kqemu.ko does not cause the problem, but the cores start a > >> > >>little after WinXP starts running. Unloading kqemu.ko does not he= lp; > >> > >>the cores still happen but more randomly. I even tried unloading = all > >> > >>linux modules and reloading them without luck. It takes a reboot. > >> > >> > >> > >>Packages: > >> > >>qemu-devel-0.9.1s.20080620_1 > >> > >>kqemu-kmod-devel-1.4.0.p1 > >> > >>linux_base-f8-8_4 > >> > >> > >> > >>sysctl: > >> > >>compat.linux.osrelease: 2.6.16 > >> > >> > >> > >>dmesg: > >> > >>kqemu version 0x00010400 > >> > >>kqemu: KQEMU installed, max_locked_mem=3D1792492kB. > >> > >> > >> > >>System is 7-STABLE as of r181963 with or without the patch to fix = RT > >> > >>signals from Chagin. > >> > > > >> > >Interestingly... Sean, can you provide ktrace/kdump log of coring > >> > >apps? thnx! > >> >=20 > >> > Here they are (good and bad): > >> > http://www.farley.org/freebsd/tmp/linuxulator_vs_kqemu/ > >> >=20 > >> > The good trace is after the bad trace. I just kept running ktrace > >> > /compat/linux/bin/date over and over until I got a good trace. Befo= re > >> > loading kqemu and running qemu, there were no core dumps. Also, I > >> > compared two bad traces and they were basically the same except for = PID > >> > and a couple of addresses (still very close in value). > >> >=20 > >>=20 > >> Most likely it is a tls problem again, some days ago kib@ has made MFC > >> r182684, probably it will help.. > > > >I doubt it. This seems to be an ingenious kqemu bug. As far as I remembe= r, > >it tries to use GDT/LDT. This probably has unwanted interaction with > >PCB_GS32BIT. >=20 > Wow. That corner of the code had escaped me so far, and yes this (in > amd64/linux32) looks like it won't like kqemu's seperating of the gdts > on SMP indeed. (it stores a pointer to &gdt[GUGS32_SEL] in pcb_gs32p and > lets linux processes manipulate the segment pointed to by it, and when > kqemu is (or was) running this won't be used by all cpus, see older threa= ds > like > http://lists.freebsd.org/pipermail/freebsd-emulation/2008-May/004902.html > for the reasons.) >=20 > What I wonder tho is, won't this also cause problems without kqemu when > there are linux processes running on multiple cpus that manipulate this > segment because the gdt is then shared between the cpus? (like, linux > process on cpu 0 changes the segment, then linux process on cpu 1 comes > along and changes it again and then the linux process on cpu 0 will pick > it up from cpu 1?) At least I must have somehow assumed the shared gdt > wouldn't be changed later because of reasons like this... Very nice catch! Me and Peter Wemm discussed the right approach, that consists of actually providing per-cpu GDT. Patch is at http://people.freebsd.org/~kib/misc/amd64_gdt.1.patch Please, test and give a feedback. Even reports about thinks working the same as before the patch are important. >=20 > Anyway, fixing this will require changes to the kernel, I don't see how > kqemu could fix it by itself alone. :( See above. If you need some further kernel changes for kqemu, this is the best time to discuss them. --KmlZJfNsL65MWMNI Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkjETTsACgkQC3+MBN1Mb4hWnQCdF1bzuSkQZzoTc5vSGywkEY+M F/IAoPQLavVdxMDEnc7G01UQCq9ecpik =UdU6 -----END PGP SIGNATURE----- --KmlZJfNsL65MWMNI-- From owner-freebsd-emulation@FreeBSD.ORG Sun Sep 7 22:45: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 2E625106567C for ; Sun, 7 Sep 2008 22:45:56 +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 B4DFB8FC1C for ; Sun, 7 Sep 2008 22:45:55 +0000 (UTC) (envelope-from nox@saturn.kn-bremen.de) Received: by gwyn.kn-bremen.de (Postfix, from userid 10) id AD979191A32; Mon, 8 Sep 2008 00:45:53 +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 m87Mii5m078503; Mon, 8 Sep 2008 00:44:44 +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 m87MiiWO078502; Mon, 8 Sep 2008 00:44:44 +0200 (CEST) (envelope-from nox) Date: Mon, 8 Sep 2008 00:44:44 +0200 (CEST) From: Juergen Lock Message-Id: <200809072244.m87MiiWO078502@saturn.kn-bremen.de> To: kostikbel@gmail.com X-Newsgroups: local.list.freebsd.emulation In-Reply-To: <20080907215300.GH2038@deviant.kiev.zoral.com.ua> References: <20080830113448.GA2152@dchagin.dialup.corbina.ru> <20080906104659.GA2113@dchagin.dialup.corbina.ru> <200809062215.m86MF6NS040797@saturn.kn-bremen.de> Organization: home Cc: freebsd-emulation@freebsd.org, peter@freebsd.org Subject: Re: Linux applications core if running (k)qemu 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, 07 Sep 2008 22:45:56 -0000 In article <20080907215300.GH2038@deviant.kiev.zoral.com.ua> you write: >-=-=-=-=-=- > >On Sun, Sep 07, 2008 at 12:15:06AM +0200, Juergen Lock wrote: >> In article <20080906152929.GB2038@deviant.kiev.zoral.com.ua> you write: >> >-=-=-=-=-=- >> > >> >On Sat, Sep 06, 2008 at 02:46:59PM +0400, Chagin Dmitry wrote: >> >> On Tue, Sep 02, 2008 at 03:56:33PM -0500, Sean C. Farley wrote: >> >> > On Sat, 30 Aug 2008, Chagin Dmitry wrote: >> >> > >> >> > >On Fri, Aug 29, 2008 at 05:29:09PM -0500, Sean C. Farley wrote: >> >> > >>I am having trouble with kqemu.ko and linux.ko. If I run qemu with >> >> > >>the following command, Linux applications (chroot, acroread, ls) will >> >> > >>start core dumping: >> >> > >> qemu-system-x86_64 -m 512 \ >> >> > >> -drive file=/usr/QEMU/WinXP/c.img,if=ide,media=disk -boot c \ >> >> > >> -std-vga -parallel none -serial none -monitor stdio \ >> >> > >> -net nic,model=e1000 -net tap,ifname=tap0,script=no -localtime >> >> > >> >> >> > >>Loading kqemu.ko does not cause the problem, but the cores start a >> >> > >>little after WinXP starts running. Unloading kqemu.ko does not help; >> >> > >>the cores still happen but more randomly. I even tried unloading all >> >> > >>linux modules and reloading them without luck. It takes a reboot. >> >> > >> >> >> > >>Packages: >> >> > >>qemu-devel-0.9.1s.20080620_1 >> >> > >>kqemu-kmod-devel-1.4.0.p1 >> >> > >>linux_base-f8-8_4 >> >> > >> >> >> > >>sysctl: >> >> > >>compat.linux.osrelease: 2.6.16 >> >> > >> >> >> > >>dmesg: >> >> > >>kqemu version 0x00010400 >> >> > >>kqemu: KQEMU installed, max_locked_mem=1792492kB. >> >> > >> >> >> > >>System is 7-STABLE as of r181963 with or without the patch to fix RT >> >> > >>signals from Chagin. >> >> > > >> >> > >Interestingly... Sean, can you provide ktrace/kdump log of coring >> >> > >apps? thnx! >> >> > >> >> > Here they are (good and bad): >> >> > http://www.farley.org/freebsd/tmp/linuxulator_vs_kqemu/ >> >> > >> >> > The good trace is after the bad trace. I just kept running ktrace >> >> > /compat/linux/bin/date over and over until I got a good trace. Before >> >> > loading kqemu and running qemu, there were no core dumps. Also, I >> >> > compared two bad traces and they were basically the same except for PID >> >> > and a couple of addresses (still very close in value). >> >> > >> >> >> >> Most likely it is a tls problem again, some days ago kib@ has made MFC >> >> r182684, probably it will help.. >> > >> >I doubt it. This seems to be an ingenious kqemu bug. As far as I remember, >> >it tries to use GDT/LDT. This probably has unwanted interaction with >> >PCB_GS32BIT. >> >> Wow. That corner of the code had escaped me so far, and yes this (in >> amd64/linux32) looks like it won't like kqemu's seperating of the gdts >> on SMP indeed. (it stores a pointer to &gdt[GUGS32_SEL] in pcb_gs32p and >> lets linux processes manipulate the segment pointed to by it, and when >> kqemu is (or was) running this won't be used by all cpus, see older threads >> like >> http://lists.freebsd.org/pipermail/freebsd-emulation/2008-May/004902.html >> for the reasons.) >> >> What I wonder tho is, won't this also cause problems without kqemu when >> there are linux processes running on multiple cpus that manipulate this >> segment because the gdt is then shared between the cpus? (like, linux >> process on cpu 0 changes the segment, then linux process on cpu 1 comes >> along and changes it again and then the linux process on cpu 0 will pick >> it up from cpu 1?) At least I must have somehow assumed the shared gdt >> wouldn't be changed later because of reasons like this... > >Very nice catch! Me and Peter Wemm discussed the right approach, >that consists of actually providing per-cpu GDT. Patch is at >http://people.freebsd.org/~kib/misc/amd64_gdt.1.patch > Cool! >Please, test and give a feedback. Even reports about thinks working >the same as before the patch are important. >> >> Anyway, fixing this will require changes to the kernel, I don't see how >> kqemu could fix it by itself alone. :( > >See above. If you need some further kernel changes for kqemu, this is >the best time to discuss them. Well I haven't got around to testing the patch yet, but you could do an OSVERSION bump once this gets committed so that we can compile out the (then-to-be) obsolete gdt fixup code in kqemu. (Yes it should do nothing with the patched kernel except rewriting cpu 0's tss once with data it already will have, but still its unnecessary cycles. :) Thanx, Juergen From owner-freebsd-emulation@FreeBSD.ORG Mon Sep 8 02:22:19 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 043B4106564A for ; Mon, 8 Sep 2008 02:22:19 +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 E5F218FC1B for ; Mon, 8 Sep 2008 02:22:18 +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 m882MIkt006644 for ; Mon, 8 Sep 2008 02:22:18 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m882MIdL006640 for freebsd-emulation@FreeBSD.org; Mon, 8 Sep 2008 02:22:18 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 8 Sep 2008 02:22:18 GMT Message-Id: <200809080222.m882MIdL006640@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, 08 Sep 2008 02:22:19 -0000 The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/126232 emulation [linux] Linux ioctl TCGETS (0x5401) always fails o kern/122318 emulation [linux] [cmake]: Segmentation fault when running Linux o ports/121800 emulation x11-toolkits/linux-openmotif - OpenMotif upgrade to 2. o kern/117010 emulation [linux] linux_getdents() get something like buffer ove o kern/97326 emulation [linux] file descriptor leakage in linux emulation o ports/91318 emulation [fix] graphics/linux_dri: works on amd64 too o kern/91293 emulation [svr4] [patch] *Experimental* Update to the SVR4 emula o kern/73777 emulation [linux] [patch] linux emulation: root dir special hand a kern/72920 emulation [linux]: path "prefixing" is not done on unix domain s o kern/41543 emulation [patch] [request] easier wine/w23 support o kern/39201 emulation [linux] [patch] ptrace(2) and rfork(RFLINUXTHPN) confu o kern/29698 emulation [linux] [patch] linux ipcs doesn'work o kern/21463 emulation [linux] Linux compatability mode should not allow setu o kern/11165 emulation [ibcs2] IBCS2 doesn't work correctly with PID_MAX 9999 14 problems total. Bugs can be in one of several states: o - open A problem report has been submitted, no sanity checking performed. a - analyzed The problem is understood and a solution is being sought. f - feedback Further work requires additional information from the originator or the community - possibly confirmation of the effectiveness of a proposed solution. p - patched A patch has been committed, but some issues (MFC and / or confirmation from originator) are still open. r - repocopy The resolution of the problem report is dependent on a repocopy operation within the CVS repository which is awaiting completion. s - suspended The problem is not being worked on, due to lack of information or resources. This is a prime candidate for somebody who is looking for a project to do. If the problem cannot be solved at all, it will be closed, rather than suspended. c - closed A problem report is closed when any changes have been integrated, documented, and tested -- or when fixing the problem is abandoned. From owner-freebsd-emulation@FreeBSD.ORG Mon Sep 8 07:04: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 0E684106566C for ; Mon, 8 Sep 2008 07:04:56 +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 6FBC78FC15 for ; Mon, 8 Sep 2008 07:04:55 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 8FC3B65BCB8; Mon, 8 Sep 2008 09:05:08 +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 nC3z8QS5O9HV; Mon, 8 Sep 2008 09:05:07 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 3709565B6D1; Mon, 8 Sep 2008 09:05:07 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.2/8.14.2/Submit) id m88756m5021129; Mon, 8 Sep 2008 09:05:06 +0200 (CEST) (envelope-from rdivacky) Date: Mon, 8 Sep 2008 09:05:05 +0200 From: Roman Divacky To: MITA Yoshio , freebsd-emulation@freebsd.org Message-ID: <20080908070505.GA20963@freebsd.org> References: <200809072030.m87KU44I064646@freefall.freebsd.org> <20080907211228.GA51816@dchagin.dialup.corbina.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080907211228.GA51816@dchagin.dialup.corbina.ru> User-Agent: Mutt/1.4.2.3i Cc: Subject: Re: kern/117010: [linux] linux_getdents() get something like buffer overflow or else 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, 08 Sep 2008 07:04:56 -0000 On Mon, Sep 08, 2008 at 01:12:28AM +0400, Chagin Dmitry wrote: > On Sun, Sep 07, 2008 at 08:30:04PM +0000, MITA Yoshio wrote: > > The following reply was made to PR kern/117010; it has been noted by GNATS. > > > > From: MITA Yoshio > > To: bug-followup@FreeBSD.org,samflanker@gmail.com, > > Chagin Dmitry , > > beech@FreeBSD.org > > Cc: > > Subject: Re: kern/117010: [linux] linux_getdents() get something like buffer overflow or else > > Date: Sun, 07 Sep 2008 21:42:15 +0200 > > > > Hello, > > > > I've tested a patch from Mr. Dmitry concerning Mr. Ermakov's PR: > > > > http://www.freebsd.org/cgi/query-pr.cgi?pr=117010 > > > > Patch: > > >From: Chagin Dmitry > > >Date: Fri, 25 Jul 2008 10:22:46 +0400 (MSD) > > > > This worked!!! to make skype2 work. > > Otherwise skype2 dumped core as Mr. reported. > > > > Regards, > > ----- > > Tested Environment: > > FreeBSD 7.0-RELEASE > > linux_base-fc6-6_5 > > linux-glib2-2.6.6 > > skype-2.0.0.68,1 > > > > /etc/sysctl.conf: > > compat.linux.osrelease=2.6.16 > > > > /etc/make.conf: > > OVERRIDE_LINUX_BASE_PORT=fc6 > > Please, try a patch bellow: > > diff --git a/src/sys/compat/linux/linux_file.c b/src/sys/compat/linux/linux_file.c > index 303bc3f..413e597 100644 > --- a/src/sys/compat/linux/linux_file.c > +++ b/src/sys/compat/linux/linux_file.c > @@ -303,9 +303,20 @@ struct l_dirent64 { > char d_name[LINUX_NAME_MAX + 1]; > }; > > -#define LINUX_RECLEN(de,namlen) \ > - ALIGN((((char *)&(de)->d_name - (char *)de) + (namlen) + 1)) > +/* > + * Linux uses the last byte in the dirent buffer to store d_type, > + * at least glibc-2.7 requires it. For what l_dirent padded on 2 bytes. > + */ > +#define LINUX_RECLEN(namlen) \ > + roundup((offsetof(struct l_dirent, d_name) + (namlen) + 2), \ > + sizeof(l_ulong)) > + > +#define LINUX_RECLEN64(namlen) \ > + roundup((offsetof(struct l_dirent64, d_name) + (namlen) + 1), \ > + sizeof(uint64_t)) > > +#define LINUX_MAXRECLEN max(LINUX_RECLEN(LINUX_NAME_MAX), \ > + LINUX_RECLEN64(LINUX_NAME_MAX)) > #define LINUX_DIRBLKSIZ 512 > > static int > @@ -318,12 +329,13 @@ getdents_common(struct thread *td, struct linux_getdents64_args *args, > int len, reclen; /* BSD-format */ > caddr_t outp; /* Linux-format */ > int resid, linuxreclen=0; /* Linux-format */ > + caddr_t lbuf; /* Linux-format */ > struct file *fp; > struct uio auio; > struct iovec aiov; > off_t off; > - struct l_dirent linux_dirent; > - struct l_dirent64 linux_dirent64; > + struct l_dirent *linux_dirent; > + struct l_dirent64 *linux_dirent64; > int buflen, error, eofflag, nbytes, justone; > u_long *cookies = NULL, *cookiep; > int ncookies, vfslocked; > @@ -359,6 +371,7 @@ getdents_common(struct thread *td, struct linux_getdents64_args *args, > buflen = max(LINUX_DIRBLKSIZ, nbytes); > buflen = min(buflen, MAXBSIZE); > buf = malloc(buflen, M_TEMP, M_WAITOK); > + lbuf = malloc(LINUX_MAXRECLEN, M_TEMP, M_WAITOK | M_ZERO); > vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); > > again: > @@ -436,8 +449,8 @@ again: > } > > linuxreclen = (is64bit) > - ? LINUX_RECLEN(&linux_dirent64, bdp->d_namlen) > - : LINUX_RECLEN(&linux_dirent, bdp->d_namlen); > + ? LINUX_RECLEN64(bdp->d_namlen) > + : LINUX_RECLEN(bdp->d_namlen); > > if (reclen > len || resid < linuxreclen) { > outp++; > @@ -446,34 +459,41 @@ again: > > if (justone) { > /* readdir(2) case. */ > - linux_dirent.d_ino = bdp->d_fileno; > - linux_dirent.d_off = (l_off_t)linuxreclen; > - linux_dirent.d_reclen = (l_ushort)bdp->d_namlen; > - strcpy(linux_dirent.d_name, bdp->d_name); > - error = copyout(&linux_dirent, outp, linuxreclen); > - } else { > - if (is64bit) { > - linux_dirent64.d_ino = bdp->d_fileno; > - linux_dirent64.d_off = (cookiep) > - ? (l_off_t)*cookiep > - : (l_off_t)(off + reclen); > - linux_dirent64.d_reclen = > - (l_ushort)linuxreclen; > - linux_dirent64.d_type = bdp->d_type; > - strcpy(linux_dirent64.d_name, bdp->d_name); > - error = copyout(&linux_dirent64, outp, > - linuxreclen); > - } else { > - linux_dirent.d_ino = bdp->d_fileno; > - linux_dirent.d_off = (cookiep) > - ? (l_off_t)*cookiep > - : (l_off_t)(off + reclen); > - linux_dirent.d_reclen = (l_ushort)linuxreclen; > - strcpy(linux_dirent.d_name, bdp->d_name); > - error = copyout(&linux_dirent, outp, > - linuxreclen); > - } > + linux_dirent = (struct l_dirent*)lbuf; > + linux_dirent->d_ino = bdp->d_fileno; > + linux_dirent->d_off = (l_off_t)linuxreclen; > + linux_dirent->d_reclen = (l_ushort)bdp->d_namlen; > + strlcpy(linux_dirent->d_name, bdp->d_name, > + linuxreclen - offsetof(struct l_dirent, d_name)); > + error = copyout(linux_dirent, outp, linuxreclen); > } > + if (is64bit) { > + linux_dirent64 = (struct l_dirent64*)lbuf; > + linux_dirent64->d_ino = bdp->d_fileno; > + linux_dirent64->d_off = (cookiep) > + ? (l_off_t)*cookiep > + : (l_off_t)(off + reclen); > + linux_dirent64->d_reclen = (l_ushort)linuxreclen; > + linux_dirent64->d_type = bdp->d_type; > + strlcpy(linux_dirent64->d_name, bdp->d_name, > + linuxreclen - offsetof(struct l_dirent64, d_name)); > + error = copyout(linux_dirent64, outp, linuxreclen); > + } else if (!justone) { > + linux_dirent = (struct l_dirent*)lbuf; > + linux_dirent->d_ino = bdp->d_fileno; > + linux_dirent->d_off = (cookiep) > + ? (l_off_t)*cookiep > + : (l_off_t)(off + reclen); > + linux_dirent->d_reclen = (l_ushort)linuxreclen; > + /* > + * Copy d_type to last byte of l_dirent buffer > + */ > + lbuf[linuxreclen-1] = bdp->d_type; > + strlcpy(linux_dirent->d_name, bdp->d_name, > + linuxreclen - offsetof(struct l_dirent, d_name)-1); > + error = copyout(linux_dirent, outp, linuxreclen); > + } > + > if (error) > goto out; > > @@ -509,6 +529,7 @@ out: > VFS_UNLOCK_GIANT(vfslocked); > fdrop(fp, td); > free(buf, M_TEMP); > + free(lbuf, M_TEMP); > return (error); > } > > > Roman, I think that this patch can be commited (if testing passes :)) > thnx! yes.... this is the version of the patch I posted to you + the comment changed, right? From owner-freebsd-emulation@FreeBSD.ORG Mon Sep 8 07:30:23 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 B85981065674; Mon, 8 Sep 2008 07:30:23 +0000 (UTC) (envelope-from root@dchagin.dialup.corbina.ru) Received: from contrabass.post.ru (contrabass.post.ru [85.21.78.5]) by mx1.freebsd.org (Postfix) with ESMTP id 03F928FC35; Mon, 8 Sep 2008 07:30:22 +0000 (UTC) (envelope-from root@dchagin.dialup.corbina.ru) Received: from corbina.ru (mail.post.ru [195.14.50.16]) by contrabass.post.ru (Postfix) with ESMTP id 83D5C1A2E2B; Mon, 8 Sep 2008 11:30:20 +0400 (MSD) X-Virus-Scanned: by cgpav Uf39PSi9pFi9oFi9 Received: from [10.208.17.3] (HELO dchagin.dialup.corbina.ru) by corbina.ru (CommuniGate Pro SMTP 5.1.14) with ESMTPS id 1083233770; Mon, 08 Sep 2008 11:30:20 +0400 Received: from dchagin.dialup.corbina.ru (localhost.chd.net [127.0.0.1]) by dchagin.dialup.corbina.ru (8.14.2/8.14.2) with ESMTP id m887UJ0Z001497; Mon, 8 Sep 2008 11:30:19 +0400 (MSD) (envelope-from root@dchagin.dialup.corbina.ru) Received: (from root@localhost) by dchagin.dialup.corbina.ru (8.14.2/8.14.2/Submit) id m887UE7v001496; Mon, 8 Sep 2008 11:30:14 +0400 (MSD) (envelope-from root) Date: Mon, 8 Sep 2008 11:30:14 +0400 From: Chagin Dmitry To: Roman Divacky Message-ID: <20080908073014.GA1429@dchagin.dialup.corbina.ru> Mail-Followup-To: Roman Divacky , MITA Yoshio , freebsd-emulation@freebsd.org References: <200809072030.m87KU44I064646@freefall.freebsd.org> <20080907211228.GA51816@dchagin.dialup.corbina.ru> <20080908070505.GA20963@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080908070505.GA20963@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-emulation@freebsd.org, MITA Yoshio Subject: Re: kern/117010: [linux] linux_getdents() get something like buffer overflow or else 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, 08 Sep 2008 07:30:23 -0000 On Mon, Sep 08, 2008 at 09:05:05AM +0200, Roman Divacky wrote: > On Mon, Sep 08, 2008 at 01:12:28AM +0400, Chagin Dmitry wrote: > > On Sun, Sep 07, 2008 at 08:30:04PM +0000, MITA Yoshio wrote: > > > The following reply was made to PR kern/117010; it has been noted by GNATS. > > > > > > From: MITA Yoshio > > > To: bug-followup@FreeBSD.org,samflanker@gmail.com, > > > Chagin Dmitry , > > > beech@FreeBSD.org > > > Cc: > > > Subject: Re: kern/117010: [linux] linux_getdents() get something like buffer overflow or else > > > Date: Sun, 07 Sep 2008 21:42:15 +0200 > > > > > > Hello, > > > > > > I've tested a patch from Mr. Dmitry concerning Mr. Ermakov's PR: > > > > > > http://www.freebsd.org/cgi/query-pr.cgi?pr=117010 > > > > > > Patch: > > > >From: Chagin Dmitry > > > >Date: Fri, 25 Jul 2008 10:22:46 +0400 (MSD) > > > > > > This worked!!! to make skype2 work. > > > Otherwise skype2 dumped core as Mr. reported. > > > > > > Regards, > > > ----- > > > Tested Environment: > > > FreeBSD 7.0-RELEASE > > > linux_base-fc6-6_5 > > > linux-glib2-2.6.6 > > > skype-2.0.0.68,1 > > > > > > /etc/sysctl.conf: > > > compat.linux.osrelease=2.6.16 > > > > > > /etc/make.conf: > > > OVERRIDE_LINUX_BASE_PORT=fc6 > > > > Please, try a patch bellow: > > > > diff --git a/src/sys/compat/linux/linux_file.c b/src/sys/compat/linux/linux_file.c > > index 303bc3f..413e597 100644 > > --- a/src/sys/compat/linux/linux_file.c > > +++ b/src/sys/compat/linux/linux_file.c > > @@ -303,9 +303,20 @@ struct l_dirent64 { > > char d_name[LINUX_NAME_MAX + 1]; > > }; > > > > -#define LINUX_RECLEN(de,namlen) \ > > - ALIGN((((char *)&(de)->d_name - (char *)de) + (namlen) + 1)) > > +/* > > + * Linux uses the last byte in the dirent buffer to store d_type, > > + * at least glibc-2.7 requires it. For what l_dirent padded on 2 bytes. > > + */ > > +#define LINUX_RECLEN(namlen) \ > > + roundup((offsetof(struct l_dirent, d_name) + (namlen) + 2), \ > > + sizeof(l_ulong)) > > + > > +#define LINUX_RECLEN64(namlen) \ > > + roundup((offsetof(struct l_dirent64, d_name) + (namlen) + 1), \ > > + sizeof(uint64_t)) > > > > +#define LINUX_MAXRECLEN max(LINUX_RECLEN(LINUX_NAME_MAX), \ > > + LINUX_RECLEN64(LINUX_NAME_MAX)) > > #define LINUX_DIRBLKSIZ 512 > > > > static int > > @@ -318,12 +329,13 @@ getdents_common(struct thread *td, struct linux_getdents64_args *args, > > int len, reclen; /* BSD-format */ > > caddr_t outp; /* Linux-format */ > > int resid, linuxreclen=0; /* Linux-format */ > > + caddr_t lbuf; /* Linux-format */ > > struct file *fp; > > struct uio auio; > > struct iovec aiov; > > off_t off; > > - struct l_dirent linux_dirent; > > - struct l_dirent64 linux_dirent64; > > + struct l_dirent *linux_dirent; > > + struct l_dirent64 *linux_dirent64; > > int buflen, error, eofflag, nbytes, justone; > > u_long *cookies = NULL, *cookiep; > > int ncookies, vfslocked; > > @@ -359,6 +371,7 @@ getdents_common(struct thread *td, struct linux_getdents64_args *args, > > buflen = max(LINUX_DIRBLKSIZ, nbytes); > > buflen = min(buflen, MAXBSIZE); > > buf = malloc(buflen, M_TEMP, M_WAITOK); > > + lbuf = malloc(LINUX_MAXRECLEN, M_TEMP, M_WAITOK | M_ZERO); > > vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); > > > > again: > > @@ -436,8 +449,8 @@ again: > > } > > > > linuxreclen = (is64bit) > > - ? LINUX_RECLEN(&linux_dirent64, bdp->d_namlen) > > - : LINUX_RECLEN(&linux_dirent, bdp->d_namlen); > > + ? LINUX_RECLEN64(bdp->d_namlen) > > + : LINUX_RECLEN(bdp->d_namlen); > > > > if (reclen > len || resid < linuxreclen) { > > outp++; > > @@ -446,34 +459,41 @@ again: > > > > if (justone) { > > /* readdir(2) case. */ > > - linux_dirent.d_ino = bdp->d_fileno; > > - linux_dirent.d_off = (l_off_t)linuxreclen; > > - linux_dirent.d_reclen = (l_ushort)bdp->d_namlen; > > - strcpy(linux_dirent.d_name, bdp->d_name); > > - error = copyout(&linux_dirent, outp, linuxreclen); > > - } else { > > - if (is64bit) { > > - linux_dirent64.d_ino = bdp->d_fileno; > > - linux_dirent64.d_off = (cookiep) > > - ? (l_off_t)*cookiep > > - : (l_off_t)(off + reclen); > > - linux_dirent64.d_reclen = > > - (l_ushort)linuxreclen; > > - linux_dirent64.d_type = bdp->d_type; > > - strcpy(linux_dirent64.d_name, bdp->d_name); > > - error = copyout(&linux_dirent64, outp, > > - linuxreclen); > > - } else { > > - linux_dirent.d_ino = bdp->d_fileno; > > - linux_dirent.d_off = (cookiep) > > - ? (l_off_t)*cookiep > > - : (l_off_t)(off + reclen); > > - linux_dirent.d_reclen = (l_ushort)linuxreclen; > > - strcpy(linux_dirent.d_name, bdp->d_name); > > - error = copyout(&linux_dirent, outp, > > - linuxreclen); > > - } > > + linux_dirent = (struct l_dirent*)lbuf; > > + linux_dirent->d_ino = bdp->d_fileno; > > + linux_dirent->d_off = (l_off_t)linuxreclen; > > + linux_dirent->d_reclen = (l_ushort)bdp->d_namlen; > > + strlcpy(linux_dirent->d_name, bdp->d_name, > > + linuxreclen - offsetof(struct l_dirent, d_name)); > > + error = copyout(linux_dirent, outp, linuxreclen); > > } > > + if (is64bit) { > > + linux_dirent64 = (struct l_dirent64*)lbuf; > > + linux_dirent64->d_ino = bdp->d_fileno; > > + linux_dirent64->d_off = (cookiep) > > + ? (l_off_t)*cookiep > > + : (l_off_t)(off + reclen); > > + linux_dirent64->d_reclen = (l_ushort)linuxreclen; > > + linux_dirent64->d_type = bdp->d_type; > > + strlcpy(linux_dirent64->d_name, bdp->d_name, > > + linuxreclen - offsetof(struct l_dirent64, d_name)); > > + error = copyout(linux_dirent64, outp, linuxreclen); > > + } else if (!justone) { > > + linux_dirent = (struct l_dirent*)lbuf; > > + linux_dirent->d_ino = bdp->d_fileno; > > + linux_dirent->d_off = (cookiep) > > + ? (l_off_t)*cookiep > > + : (l_off_t)(off + reclen); > > + linux_dirent->d_reclen = (l_ushort)linuxreclen; > > + /* > > + * Copy d_type to last byte of l_dirent buffer > > + */ > > + lbuf[linuxreclen-1] = bdp->d_type; > > + strlcpy(linux_dirent->d_name, bdp->d_name, > > + linuxreclen - offsetof(struct l_dirent, d_name)-1); > > + error = copyout(linux_dirent, outp, linuxreclen); > > + } > > + > > if (error) > > goto out; > > > > @@ -509,6 +529,7 @@ out: > > VFS_UNLOCK_GIANT(vfslocked); > > fdrop(fp, td); > > free(buf, M_TEMP); > > + free(lbuf, M_TEMP); > > return (error); > > } > > > > > > Roman, I think that this patch can be commited (if testing passes :)) > > thnx! > > yes.... this is the version of the patch I posted to you + the comment changed, right? yes -- Have fun! chd From owner-freebsd-emulation@FreeBSD.ORG Mon Sep 8 17:46: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 672D51065676 for ; Mon, 8 Sep 2008 17:46:24 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from acme.spoerlein.net (cl-43.dus-01.de.sixxs.net [IPv6:2a01:198:200:2a::2]) by mx1.freebsd.org (Postfix) with ESMTP id D10788FC25 for ; Mon, 8 Sep 2008 17:46:23 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from roadrunner.spoerlein.net (e180169130.adsl.alicedsl.de [85.180.169.130]) by acme.spoerlein.net (8.14.2/8.14.2) with ESMTP id m88HkD2O020435 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 8 Sep 2008 19:46:15 +0200 (CEST) (envelope-from uspoerlein@gmail.com) Received: from roadrunner.spoerlein.net (localhost [127.0.0.1]) by roadrunner.spoerlein.net (8.14.2/8.14.2) with ESMTP id m88HkHrW025429 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 8 Sep 2008 19:46:18 +0200 (CEST) (envelope-from uspoerlein@gmail.com) Received: (from uqs@localhost) by roadrunner.spoerlein.net (8.14.2/8.14.2/Submit) id m88HkH7t025428 for freebsd-emulation@FreeBSD.org; Mon, 8 Sep 2008 19:46:17 +0200 (CEST) (envelope-from uspoerlein@gmail.com) Date: Mon, 8 Sep 2008 19:46:17 +0200 From: Ulrich Spoerlein To: freebsd-emulation@FreeBSD.org Message-ID: <20080908174617.GB1543@roadrunner.spoerlein.net> Mail-Followup-To: freebsd-emulation@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Subject: Update of linux-gtk2 (for linux-firefox3) possible? 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, 08 Sep 2008 17:46:24 -0000 Hi, since I'm using linux-firefox2 and the flash-plugin, I wanted to update linux-firefox to version 3.0.1 but it wants gtk version 2.10 or newer when only 2.6 is in ports. Now, I don't think there are Fedora Core 4 packages of gtk2/atk2 (and what not else) for version 2.10 available anywhere. Any ideas what to do? Which ports need to be updated in sync with gtk2? Cheers, Ulrich Spoerlein -- It is better to remain silent and be thought a fool, than to speak, and remove all doubt. From owner-freebsd-emulation@FreeBSD.ORG Mon Sep 8 19:38:50 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 896BF1065672 for ; Mon, 8 Sep 2008 19:38:50 +0000 (UTC) (envelope-from mita@ee.t.u-tokyo.ac.jp) Received: from mx.ee.t.u-tokyo.ac.jp (bell.fi.k.u-tokyo.ac.jp [157.82.13.244]) by mx1.freebsd.org (Postfix) with ESMTP id 59D6B8FC12 for ; Mon, 8 Sep 2008 19:38:50 +0000 (UTC) (envelope-from mita@ee.t.u-tokyo.ac.jp) Received: from micro.if.t.u-tokyo.ac.jp (bell.ee.t.u-tokyo.ac.jp [157.82.13.244]) by mx.ee.t.u-tokyo.ac.jp (Postfix) with ESMTP id 80CA75798F; Tue, 9 Sep 2008 04:38:47 +0900 (JST) Date: Mon, 08 Sep 2008 21:38:16 +0200 Message-ID: <7o4p4q4edz.wl%mita@ee.t.u-tokyo.ac.jp> From: MITA Yoshio To: Chagin Dmitry , freebsd-emulation@freebsd.org In-Reply-To: <20080907211228.GA51816@dchagin.dialup.corbina.ru> References: <200809072030.m87KU44I064646@freefall.freebsd.org> <20080907211228.GA51816@dchagin.dialup.corbina.ru> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.7 Emacs/22.2 (i386-pc-freebsd) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: Subject: Re: kern/117010: [linux] linux_getdents() get something like buffer overflow or else 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, 08 Sep 2008 19:38:50 -0000 Hello, > Please, try a patch bellow: > > diff --git a/src/sys/compat/linux/linux_file.c b/src/sys/compat/linux/linux_file.c > index 303bc3f..413e597 100644 > --- a/src/sys/compat/linux/linux_file.c > +++ b/src/sys/compat/linux/linux_file.c [Snip] >Roman, I think that this patch can be commited (if testing passes :)) >thnx! Yes, this works also nicely! Tested both on multi-core machine (Core2Duo 6550 2.33GHz) and single-core notebook (Pentium M 1.30GHz) under 7.0-RELEASE(-p4) >-- >Have fun! chd Thank you very much! --- MITA Yoshio From owner-freebsd-emulation@FreeBSD.ORG Mon Sep 8 20:05:14 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 23C521065670; Mon, 8 Sep 2008 20:05:14 +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 D40418FC1B; Mon, 8 Sep 2008 20:05:13 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 7979C65BD0A; Mon, 8 Sep 2008 22:05:25 +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 uqb5baQmg15s; Mon, 8 Sep 2008 22:05:24 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 59A2065BD07; Mon, 8 Sep 2008 22:05:24 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.2/8.14.2/Submit) id m88K5OgY075203; Mon, 8 Sep 2008 22:05:24 +0200 (CEST) (envelope-from rdivacky) Date: Mon, 8 Sep 2008 22:05:24 +0200 From: Roman Divacky To: FreeBSD bugmaster Message-ID: <20080908200524.GA74912@freebsd.org> References: <200809080222.m882MIdL006640@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200809080222.m882MIdL006640@freefall.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-emulation@FreeBSD.org Subject: Re: 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, 08 Sep 2008 20:05:14 -0000 On Mon, Sep 08, 2008 at 02:22:18AM +0000, FreeBSD bugmaster wrote: > The following is a listing of current problems submitted by FreeBSD users. > These represent problem reports covering all versions including > experimental development code and obsolete releases. > > S Tracker Resp. Description > -------------------------------------------------------------------------------- > o kern/126232 emulation [linux] Linux ioctl TCGETS (0x5401) always fails > o kern/122318 emulation [linux] [cmake]: Segmentation fault when running Linux kostik, I believe you commited a fix for this... can be closed > o ports/121800 emulation x11-toolkits/linux-openmotif - OpenMotif upgrade to 2. > o kern/117010 emulation [linux] linux_getdents() get something like buffer ove fix for this is about to be commited > o kern/97326 emulation [linux] file descriptor leakage in linux emulation > o ports/91318 emulation [fix] graphics/linux_dri: works on amd64 too > o kern/91293 emulation [svr4] [patch] *Experimental* Update to the SVR4 emula > o kern/73777 emulation [linux] [patch] linux emulation: root dir special hand > a kern/72920 emulation [linux]: path "prefixing" is not done on unix domain s > o kern/41543 emulation [patch] [request] easier wine/w23 support > o kern/39201 emulation [linux] [patch] ptrace(2) and rfork(RFLINUXTHPN) confu > o kern/29698 emulation [linux] [patch] linux ipcs doesn'work > o kern/21463 emulation [linux] Linux compatability mode should not allow setu > o kern/11165 emulation [ibcs2] IBCS2 doesn't work correctly with PID_MAX 9999 can you ports guys look at the ports related issues? From owner-freebsd-emulation@FreeBSD.ORG Mon Sep 8 20:08:45 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 E35961065671; Mon, 8 Sep 2008 20:08:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id BDB898FC1A; Mon, 8 Sep 2008 20:08:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from freefall.freebsd.org (kib@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m88K8jEa040361; Mon, 8 Sep 2008 20:08:45 GMT (envelope-from kib@freefall.freebsd.org) Received: (from kib@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m88K8jkT040357; Mon, 8 Sep 2008 20:08:45 GMT (envelope-from kib) Date: Mon, 8 Sep 2008 20:08:45 GMT Message-Id: <200809082008.m88K8jkT040357@freefall.freebsd.org> To: scf@freebsd.org, kib@FreeBSD.org, freebsd-emulation@FreeBSD.org, kib@FreeBSD.org From: kib@FreeBSD.org Cc: Subject: Re: kern/122318: [linux] [cmake]: Segmentation fault when running Linux cmake 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, 08 Sep 2008 20:08:46 -0000 Synopsis: [linux] [cmake]: Segmentation fault when running Linux cmake State-Changed-From-To: open->patched State-Changed-By: kib State-Changed-When: Mon Sep 8 20:07:53 UTC 2008 State-Changed-Why: Chagin supplied the patch. Patch committed to HEAD, MFC set. Responsible-Changed-From-To: freebsd-emulation->kib Responsible-Changed-By: kib Responsible-Changed-When: Mon Sep 8 20:07:53 UTC 2008 Responsible-Changed-Why: Chagin supplied the patch. Patch committed to HEAD, MFC set. http://www.freebsd.org/cgi/query-pr.cgi?pr=122318 From owner-freebsd-emulation@FreeBSD.ORG Mon Sep 8 20:21: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 93C131065676 for ; Mon, 8 Sep 2008 20:21:59 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.freebsd.org (Postfix) with ESMTP id 610F48FC20 for ; Mon, 8 Sep 2008 20:21:59 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from thor.farley.org (HPooka@thor.farley.org [192.168.1.5]) by mail.farley.org (8.14.3/8.14.3) with ESMTP id m88KLvX0032195; Mon, 8 Sep 2008 15:21:57 -0500 (CDT) (envelope-from scf@FreeBSD.org) Date: Mon, 8 Sep 2008 15:21:57 -0500 (CDT) From: "Sean C. Farley" To: kib@FreeBSD.org In-Reply-To: <200809082008.m88K8jkT040357@freefall.freebsd.org> Message-ID: References: <200809082008.m88K8jkT040357@freefall.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Spam-Status: No, score=-4.4 required=3.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail.farley.org Cc: freebsd-emulation@FreeBSD.org Subject: Re: kern/122318: [linux] [cmake]: Segmentation fault when running Linux cmake 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, 08 Sep 2008 20:21:59 -0000 On Mon, 8 Sep 2008, kib@FreeBSD.org wrote: > Synopsis: [linux] [cmake]: Segmentation fault when running Linux cmake > > State-Changed-From-To: open->patched > State-Changed-By: kib > State-Changed-When: Mon Sep 8 20:07:53 UTC 2008 > State-Changed-Why: > Chagin supplied the patch. Patch committed to HEAD, MFC set. > > > Responsible-Changed-From-To: freebsd-emulation->kib > Responsible-Changed-By: kib > Responsible-Changed-When: Mon Sep 8 20:07:53 UTC 2008 > Responsible-Changed-Why: > Chagin supplied the patch. Patch committed to HEAD, MFC set. Thank you Chagin and Kostik! Sean -- scf@FreeBSD.org From owner-freebsd-emulation@FreeBSD.ORG Mon Sep 8 20:35:54 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 E13861065681; Mon, 8 Sep 2008 20:35:54 +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 6946E8FC0A; Mon, 8 Sep 2008 20:35:54 +0000 (UTC) (envelope-from nox@saturn.kn-bremen.de) Received: by gwyn.kn-bremen.de (Postfix, from userid 10) id 21977191AA3; Mon, 8 Sep 2008 22:35:52 +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 m88KYN5r012478; Mon, 8 Sep 2008 22:34:23 +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 m88KYNrU012477; Mon, 8 Sep 2008 22:34:23 +0200 (CEST) (envelope-from nox) From: Juergen Lock Date: Mon, 8 Sep 2008 22:34:23 +0200 To: Kostik Belousov Message-ID: <20080908203423.GA12147@saturn.kn-bremen.de> Mail-Followup-To: Kostik Belousov , "Sean C. Farley" , freebsd-emulation@freebsd.org, peter@freebsd.org References: <20080830113448.GA2152@dchagin.dialup.corbina.ru> <20080906104659.GA2113@dchagin.dialup.corbina.ru> <200809062215.m86MF6NS040797@saturn.kn-bremen.de> <20080907215300.GH2038@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080907215300.GH2038@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-emulation@freebsd.org, peter@freebsd.org Subject: Re: Linux applications core if running (k)qemu 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, 08 Sep 2008 20:35:55 -0000 On Mon, Sep 08, 2008 at 12:53:00AM +0300, Kostik Belousov wrote: > On Sun, Sep 07, 2008 at 12:15:06AM +0200, Juergen Lock wrote: > > In article <20080906152929.GB2038@deviant.kiev.zoral.com.ua> you write: > > >-=-=-=-=-=- > > > > > >On Sat, Sep 06, 2008 at 02:46:59PM +0400, Chagin Dmitry wrote: > > >> On Tue, Sep 02, 2008 at 03:56:33PM -0500, Sean C. Farley wrote: > > >> > On Sat, 30 Aug 2008, Chagin Dmitry wrote: > > >> > > > >> > >On Fri, Aug 29, 2008 at 05:29:09PM -0500, Sean C. Farley wrote: > > >> > >>I am having trouble with kqemu.ko and linux.ko. If I run qemu with > > >> > >>the following command, Linux applications (chroot, acroread, ls) will > > >> > >>start core dumping: > > >> > >> qemu-system-x86_64 -m 512 \ > > >> > >> -drive file=/usr/QEMU/WinXP/c.img,if=ide,media=disk -boot c \ > > >> > >> -std-vga -parallel none -serial none -monitor stdio \ > > >> > >> -net nic,model=e1000 -net tap,ifname=tap0,script=no -localtime > > >> > >> > > >> > >>Loading kqemu.ko does not cause the problem, but the cores start a > > >> > >>little after WinXP starts running. Unloading kqemu.ko does not help; > > >> > >>the cores still happen but more randomly. I even tried unloading all > > >> > >>linux modules and reloading them without luck. It takes a reboot. > > >> > >> > > >> > >>Packages: > > >> > >>qemu-devel-0.9.1s.20080620_1 > > >> > >>kqemu-kmod-devel-1.4.0.p1 > > >> > >>linux_base-f8-8_4 > > >> > >> > > >> > >>sysctl: > > >> > >>compat.linux.osrelease: 2.6.16 > > >> > >> > > >> > >>dmesg: > > >> > >>kqemu version 0x00010400 > > >> > >>kqemu: KQEMU installed, max_locked_mem=1792492kB. > > >> > >> > > >> > >>System is 7-STABLE as of r181963 with or without the patch to fix RT > > >> > >>signals from Chagin. > > >> > > > > >> > >Interestingly... Sean, can you provide ktrace/kdump log of coring > > >> > >apps? thnx! > > >> > > > >> > Here they are (good and bad): > > >> > http://www.farley.org/freebsd/tmp/linuxulator_vs_kqemu/ > > >> > > > >> > The good trace is after the bad trace. I just kept running ktrace > > >> > /compat/linux/bin/date over and over until I got a good trace. Before > > >> > loading kqemu and running qemu, there were no core dumps. Also, I > > >> > compared two bad traces and they were basically the same except for PID > > >> > and a couple of addresses (still very close in value). > > >> > > > >> > > >> Most likely it is a tls problem again, some days ago kib@ has made MFC > > >> r182684, probably it will help.. > > > > > >I doubt it. This seems to be an ingenious kqemu bug. As far as I remember, > > >it tries to use GDT/LDT. This probably has unwanted interaction with > > >PCB_GS32BIT. > > > > Wow. That corner of the code had escaped me so far, and yes this (in > > amd64/linux32) looks like it won't like kqemu's seperating of the gdts > > on SMP indeed. (it stores a pointer to &gdt[GUGS32_SEL] in pcb_gs32p and > > lets linux processes manipulate the segment pointed to by it, and when > > kqemu is (or was) running this won't be used by all cpus, see older threads > > like > > http://lists.freebsd.org/pipermail/freebsd-emulation/2008-May/004902.html > > for the reasons.) > > > > What I wonder tho is, won't this also cause problems without kqemu when > > there are linux processes running on multiple cpus that manipulate this > > segment because the gdt is then shared between the cpus? (like, linux > > process on cpu 0 changes the segment, then linux process on cpu 1 comes > > along and changes it again and then the linux process on cpu 0 will pick > > it up from cpu 1?) At least I must have somehow assumed the shared gdt > > wouldn't be changed later because of reasons like this... > > Very nice catch! Me and Peter Wemm discussed the right approach, > that consists of actually providing per-cpu GDT. Patch is at > http://people.freebsd.org/~kib/misc/amd64_gdt.1.patch > > Please, test and give a feedback. Even reports about thinks working > the same as before the patch are important. OK I just tested the patch on RELENG_7 (updated my amd64 SMP box from RELENG_7_0) and found no problems. (I tested linux date(1), googleearth, kqemu, and a few other non-linux things so far.) Thanx, Juergen From owner-freebsd-emulation@FreeBSD.ORG Mon Sep 8 20:43:38 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 5B84E1065671; Mon, 8 Sep 2008 20:43:38 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id E94C58FC19; Mon, 8 Sep 2008 20:43:37 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtp (Exim 4.63 (FreeBSD)) (envelope-from ) id 1KcnaC-000DUI-DT; Mon, 08 Sep 2008 23:43:36 +0300 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 m88KhVib019653 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 8 Sep 2008 23:43:31 +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 m88KhVAw091539; Mon, 8 Sep 2008 23:43:31 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id m88KhVjR091538; Mon, 8 Sep 2008 23:43:31 +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: Mon, 8 Sep 2008 23:43:31 +0300 From: Kostik Belousov To: "Sean C. Farley" Message-ID: <20080908204331.GC39652@deviant.kiev.zoral.com.ua> References: <20080830113448.GA2152@dchagin.dialup.corbina.ru> <20080906104659.GA2113@dchagin.dialup.corbina.ru> <200809062215.m86MF6NS040797@saturn.kn-bremen.de> <20080907215300.GH2038@deviant.kiev.zoral.com.ua> <20080908203423.GA12147@saturn.kn-bremen.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+xNpyl7Qekk2NvDX" Content-Disposition: inline In-Reply-To: <20080908203423.GA12147@saturn.kn-bremen.de> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.93.3, clamav-milter version 0.93.3 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.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1KcnaC-000DUI-DT 070451932869d79a77aaedb8c766e084 X-Terabit: YES Cc: freebsd-emulation@freebsd.org, peter@freebsd.org Subject: Re: Linux applications core if running (k)qemu 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, 08 Sep 2008 20:43:38 -0000 --+xNpyl7Qekk2NvDX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 08, 2008 at 10:34:23PM +0200, Juergen Lock wrote: > On Mon, Sep 08, 2008 at 12:53:00AM +0300, Kostik Belousov wrote: > > On Sun, Sep 07, 2008 at 12:15:06AM +0200, Juergen Lock wrote: > > > In article <20080906152929.GB2038@deviant.kiev.zoral.com.ua> you writ= e: > > > >-=3D-=3D-=3D-=3D-=3D- > > > > > > > >On Sat, Sep 06, 2008 at 02:46:59PM +0400, Chagin Dmitry wrote: > > > >> On Tue, Sep 02, 2008 at 03:56:33PM -0500, Sean C. Farley wrote: > > > >> > On Sat, 30 Aug 2008, Chagin Dmitry wrote: > > > >> >=20 > > > >> > >On Fri, Aug 29, 2008 at 05:29:09PM -0500, Sean C. Farley wrote: > > > >> > >>I am having trouble with kqemu.ko and linux.ko. If I run qemu= with > > > >> > >>the following command, Linux applications (chroot, acroread, l= s) will > > > >> > >>start core dumping: > > > >> > >> qemu-system-x86_64 -m 512 \ > > > >> > >> -drive file=3D/usr/QEMU/WinXP/c.img,if=3Dide,media=3Ddisk = -boot c \ > > > >> > >> -std-vga -parallel none -serial none -monitor stdio \ > > > >> > >> -net nic,model=3De1000 -net tap,ifname=3Dtap0,script=3Dno = -localtime > > > >> > >> > > > >> > >>Loading kqemu.ko does not cause the problem, but the cores sta= rt a > > > >> > >>little after WinXP starts running. Unloading kqemu.ko does no= t help; > > > >> > >>the cores still happen but more randomly. I even tried unload= ing all > > > >> > >>linux modules and reloading them without luck. It takes a reb= oot. > > > >> > >> > > > >> > >>Packages: > > > >> > >>qemu-devel-0.9.1s.20080620_1 > > > >> > >>kqemu-kmod-devel-1.4.0.p1 > > > >> > >>linux_base-f8-8_4 > > > >> > >> > > > >> > >>sysctl: > > > >> > >>compat.linux.osrelease: 2.6.16 > > > >> > >> > > > >> > >>dmesg: > > > >> > >>kqemu version 0x00010400 > > > >> > >>kqemu: KQEMU installed, max_locked_mem=3D1792492kB. > > > >> > >> > > > >> > >>System is 7-STABLE as of r181963 with or without the patch to = fix RT > > > >> > >>signals from Chagin. > > > >> > > > > > >> > >Interestingly... Sean, can you provide ktrace/kdump log of cori= ng > > > >> > >apps? thnx! > > > >> >=20 > > > >> > Here they are (good and bad): > > > >> > http://www.farley.org/freebsd/tmp/linuxulator_vs_kqemu/ > > > >> >=20 > > > >> > The good trace is after the bad trace. I just kept running ktra= ce > > > >> > /compat/linux/bin/date over and over until I got a good trace. = Before > > > >> > loading kqemu and running qemu, there were no core dumps. Also,= I > > > >> > compared two bad traces and they were basically the same except = for PID > > > >> > and a couple of addresses (still very close in value). > > > >> >=20 > > > >>=20 > > > >> Most likely it is a tls problem again, some days ago kib@ has made= MFC > > > >> r182684, probably it will help.. > > > > > > > >I doubt it. This seems to be an ingenious kqemu bug. As far as I rem= ember, > > > >it tries to use GDT/LDT. This probably has unwanted interaction with > > > >PCB_GS32BIT. > > >=20 > > > Wow. That corner of the code had escaped me so far, and yes this (in > > > amd64/linux32) looks like it won't like kqemu's seperating of the gdts > > > on SMP indeed. (it stores a pointer to &gdt[GUGS32_SEL] in pcb_gs32p= and > > > lets linux processes manipulate the segment pointed to by it, and when > > > kqemu is (or was) running this won't be used by all cpus, see older t= hreads > > > like > > > http://lists.freebsd.org/pipermail/freebsd-emulation/2008-May/004902= .html > > > for the reasons.) > > >=20 > > > What I wonder tho is, won't this also cause problems without kqemu w= hen > > > there are linux processes running on multiple cpus that manipulate th= is > > > segment because the gdt is then shared between the cpus? (like, linux > > > process on cpu 0 changes the segment, then linux process on cpu 1 com= es > > > along and changes it again and then the linux process on cpu 0 will p= ick > > > it up from cpu 1?) At least I must have somehow assumed the shared g= dt > > > wouldn't be changed later because of reasons like this... > >=20 > > Very nice catch! Me and Peter Wemm discussed the right approach, > > that consists of actually providing per-cpu GDT. Patch is at > > http://people.freebsd.org/~kib/misc/amd64_gdt.1.patch > >=20 > > Please, test and give a feedback. Even reports about thinks working > > the same as before the patch are important. >=20 > OK I just tested the patch on RELENG_7 (updated my amd64 SMP box from > RELENG_7_0) and found no problems. (I tested linux date(1), googleearth, > kqemu, and a few other non-linux things so far.) Thank you for the testing. Patch was committed to HEAD already (separated into four mostly self-contained commits). I expect the MFC in one week, your testing is important for MFC decision. --+xNpyl7Qekk2NvDX Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkjFjnIACgkQC3+MBN1Mb4jH6wCg70X/w6ynwSrLxDf6/XJ+uAY2 pYYAoJe0V3jDN/PmXny1BoV4gKZcGKOi =uwmL -----END PGP SIGNATURE----- --+xNpyl7Qekk2NvDX-- From owner-freebsd-emulation@FreeBSD.ORG Tue Sep 9 07:16:47 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 57B61106566C; Tue, 9 Sep 2008 07:16:47 +0000 (UTC) (envelope-from root@dchagin.dialup.corbina.ru) Received: from contrabass.post.ru (contrabass.post.ru [85.21.78.5]) by mx1.freebsd.org (Postfix) with ESMTP id 091AA8FC18; Tue, 9 Sep 2008 07:16:46 +0000 (UTC) (envelope-from root@dchagin.dialup.corbina.ru) Received: from corbina.ru (mail.post.ru [195.14.50.16]) by contrabass.post.ru (Postfix) with ESMTP id CB4091A52DC; Tue, 9 Sep 2008 11:13:41 +0400 (MSD) X-Virus-Scanned: by cgpav Uf39PSi9pFi9oFi9 Received: from [10.208.17.3] (HELO dchagin.dialup.corbina.ru) by corbina.ru (CommuniGate Pro SMTP 5.1.14) with ESMTPS id 1089641503; Tue, 09 Sep 2008 11:13:41 +0400 Received: from dchagin.dialup.corbina.ru (localhost.chd.net [127.0.0.1]) by dchagin.dialup.corbina.ru (8.14.2/8.14.2) with ESMTP id m897DeBJ001587; Tue, 9 Sep 2008 11:13:40 +0400 (MSD) (envelope-from root@dchagin.dialup.corbina.ru) Received: (from root@localhost) by dchagin.dialup.corbina.ru (8.14.2/8.14.2/Submit) id m897DZQQ001586; Tue, 9 Sep 2008 11:13:35 +0400 (MSD) (envelope-from root) Date: Tue, 9 Sep 2008 11:13:35 +0400 From: Chagin Dmitry To: Roman Divacky Message-ID: <20080909071335.GA1522@dchagin.dialup.corbina.ru> Mail-Followup-To: Roman Divacky , FreeBSD bugmaster , freebsd-emulation@freebsd.org References: <200809080222.m882MIdL006640@freefall.freebsd.org> <20080908200524.GA74912@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080908200524.GA74912@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-emulation@freebsd.org, FreeBSD bugmaster Subject: Re: 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: Tue, 09 Sep 2008 07:16:47 -0000 On Mon, Sep 08, 2008 at 10:05:24PM +0200, Roman Divacky wrote: > On Mon, Sep 08, 2008 at 02:22:18AM +0000, FreeBSD bugmaster wrote: > > The following is a listing of current problems submitted by FreeBSD users. > > These represent problem reports covering all versions including > > experimental development code and obsolete releases. > > > > S Tracker Resp. Description > > -------------------------------------------------------------------------------- > > o kern/126232 emulation [linux] Linux ioctl TCGETS (0x5401) always fails what we will do with it? as I already wrote it not a bug. it's glibc isatty() call, which is used by many programs for check file descriptors. thnx! -- Have fun! chd From owner-freebsd-emulation@FreeBSD.ORG Tue Sep 9 07:25:00 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 F3CEB106564A; Tue, 9 Sep 2008 07:24:59 +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 AAF568FC08; Tue, 9 Sep 2008 07:24:59 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id B04C765BD4A; Tue, 9 Sep 2008 09:25:10 +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 HAno1J-fV0lx; Tue, 9 Sep 2008 09:25:09 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id CD23E65BD4E; Tue, 9 Sep 2008 09:25:09 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.2/8.14.2/Submit) id m897P9BP011119; Tue, 9 Sep 2008 09:25:09 +0200 (CEST) (envelope-from rdivacky) Date: Tue, 9 Sep 2008 09:25:09 +0200 From: Roman Divacky To: FreeBSD bugmaster , freebsd-emulation@freebsd.org Message-ID: <20080909072509.GA10750@freebsd.org> References: <200809080222.m882MIdL006640@freefall.freebsd.org> <20080908200524.GA74912@freebsd.org> <20080909071335.GA1522@dchagin.dialup.corbina.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080909071335.GA1522@dchagin.dialup.corbina.ru> User-Agent: Mutt/1.4.2.3i Cc: Subject: Re: 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: Tue, 09 Sep 2008 07:25:00 -0000 On Tue, Sep 09, 2008 at 11:13:35AM +0400, Chagin Dmitry wrote: > On Mon, Sep 08, 2008 at 10:05:24PM +0200, Roman Divacky wrote: > > On Mon, Sep 08, 2008 at 02:22:18AM +0000, FreeBSD bugmaster wrote: > > > The following is a listing of current problems submitted by FreeBSD users. > > > These represent problem reports covering all versions including > > > experimental development code and obsolete releases. > > > > > > S Tracker Resp. Description > > > -------------------------------------------------------------------------------- > > > o kern/126232 emulation [linux] Linux ioctl TCGETS (0x5401) always fails > > what we will do with it? as I already wrote it not a bug. > it's glibc isatty() call, which is used by many programs for check file > descriptors. I dont understand the PR much.... the TCGETS is already implemented but it fails for some fd... I didnt find any check in the linux code for the fd being a tty. Can we close this PR as invalid? Does the error actually cause some problems, Yuri? From owner-freebsd-emulation@FreeBSD.ORG Tue Sep 9 07:31:28 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 76BAF1065670; Tue, 9 Sep 2008 07:31:28 +0000 (UTC) (envelope-from root@dchagin.dialup.corbina.ru) Received: from contrabass.post.ru (contrabass.post.ru [85.21.78.5]) by mx1.freebsd.org (Postfix) with ESMTP id 26B488FC13; Tue, 9 Sep 2008 07:31:28 +0000 (UTC) (envelope-from root@dchagin.dialup.corbina.ru) Received: from corbina.ru (mail.post.ru [195.14.50.16]) by contrabass.post.ru (Postfix) with ESMTP id 1E72D1A0F99; Tue, 9 Sep 2008 11:31:15 +0400 (MSD) X-Virus-Scanned: by cgpav Uf39PSi9pFi9oFi9 Received: from [10.208.17.3] (HELO dchagin.dialup.corbina.ru) by corbina.ru (CommuniGate Pro SMTP 5.1.14) with ESMTPS id 1089770932; Tue, 09 Sep 2008 11:31:14 +0400 Received: from dchagin.dialup.corbina.ru (localhost.chd.net [127.0.0.1]) by dchagin.dialup.corbina.ru (8.14.2/8.14.2) with ESMTP id m897VDXW001681; Tue, 9 Sep 2008 11:31:13 +0400 (MSD) (envelope-from root@dchagin.dialup.corbina.ru) Received: (from root@localhost) by dchagin.dialup.corbina.ru (8.14.2/8.14.2/Submit) id m897V8JK001680; Tue, 9 Sep 2008 11:31:08 +0400 (MSD) (envelope-from root) Date: Tue, 9 Sep 2008 11:31:08 +0400 From: Chagin Dmitry To: Roman Divacky Message-ID: <20080909073108.GA1665@dchagin.dialup.corbina.ru> Mail-Followup-To: Roman Divacky , FreeBSD bugmaster , freebsd-emulation@freebsd.org References: <200809080222.m882MIdL006640@freefall.freebsd.org> <20080908200524.GA74912@freebsd.org> <20080909071335.GA1522@dchagin.dialup.corbina.ru> <20080909072509.GA10750@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080909072509.GA10750@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-emulation@freebsd.org, FreeBSD bugmaster Subject: Re: 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: Tue, 09 Sep 2008 07:31:28 -0000 On Tue, Sep 09, 2008 at 09:25:09AM +0200, Roman Divacky wrote: > On Tue, Sep 09, 2008 at 11:13:35AM +0400, Chagin Dmitry wrote: > > On Mon, Sep 08, 2008 at 10:05:24PM +0200, Roman Divacky wrote: > > > On Mon, Sep 08, 2008 at 02:22:18AM +0000, FreeBSD bugmaster wrote: > > > > The following is a listing of current problems submitted by FreeBSD users. > > > > These represent problem reports covering all versions including > > > > experimental development code and obsolete releases. > > > > > > > > S Tracker Resp. Description > > > > -------------------------------------------------------------------------------- > > > > o kern/126232 emulation [linux] Linux ioctl TCGETS (0x5401) always fails > > > > what we will do with it? as I already wrote it not a bug. > > it's glibc isatty() call, which is used by many programs for check file > > descriptors. > > I dont understand the PR much.... the TCGETS is already implemented but it fails > for some fd... I didnt find any check in the linux code for the fd being a tty. > csh for example -- Have fun! chd From owner-freebsd-emulation@FreeBSD.ORG Tue Sep 9 07:34:32 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 08EBE1065676; Tue, 9 Sep 2008 07:34:32 +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 B1C8C8FC1D; Tue, 9 Sep 2008 07:34:31 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 1B33B65BD4A; Tue, 9 Sep 2008 09:34:44 +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 UieMDkxT9N-u; Tue, 9 Sep 2008 09:34:43 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 27A4865BD2E; Tue, 9 Sep 2008 09:34:43 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.2/8.14.2/Submit) id m897Yhf8011753; Tue, 9 Sep 2008 09:34:43 +0200 (CEST) (envelope-from rdivacky) Date: Tue, 9 Sep 2008 09:34:43 +0200 From: Roman Divacky To: FreeBSD bugmaster , freebsd-emulation@freebsd.org Message-ID: <20080909073443.GA11721@freebsd.org> References: <200809080222.m882MIdL006640@freefall.freebsd.org> <20080908200524.GA74912@freebsd.org> <20080909071335.GA1522@dchagin.dialup.corbina.ru> <20080909072509.GA10750@freebsd.org> <20080909073108.GA1665@dchagin.dialup.corbina.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080909073108.GA1665@dchagin.dialup.corbina.ru> User-Agent: Mutt/1.4.2.3i Cc: Subject: Re: 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: Tue, 09 Sep 2008 07:34:32 -0000 On Tue, Sep 09, 2008 at 11:31:08AM +0400, Chagin Dmitry wrote: > On Tue, Sep 09, 2008 at 09:25:09AM +0200, Roman Divacky wrote: > > On Tue, Sep 09, 2008 at 11:13:35AM +0400, Chagin Dmitry wrote: > > > On Mon, Sep 08, 2008 at 10:05:24PM +0200, Roman Divacky wrote: > > > > On Mon, Sep 08, 2008 at 02:22:18AM +0000, FreeBSD bugmaster wrote: > > > > > The following is a listing of current problems submitted by FreeBSD users. > > > > > These represent problem reports covering all versions including > > > > > experimental development code and obsolete releases. > > > > > > > > > > S Tracker Resp. Description > > > > > -------------------------------------------------------------------------------- > > > > > o kern/126232 emulation [linux] Linux ioctl TCGETS (0x5401) always fails > > > > > > what we will do with it? as I already wrote it not a bug. > > > it's glibc isatty() call, which is used by many programs for check file > > > descriptors. > > > > I dont understand the PR much.... the TCGETS is already implemented but it fails > > for some fd... I didnt find any check in the linux code for the fd being a tty. > > > > csh for example csh does what? From owner-freebsd-emulation@FreeBSD.ORG Tue Sep 9 07:58:33 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 16054106564A; Tue, 9 Sep 2008 07:58:33 +0000 (UTC) (envelope-from root@dchagin.dialup.corbina.ru) Received: from contrabass.post.ru (contrabass.post.ru [85.21.78.5]) by mx1.freebsd.org (Postfix) with ESMTP id B98978FC2E; Tue, 9 Sep 2008 07:58:32 +0000 (UTC) (envelope-from root@dchagin.dialup.corbina.ru) Received: from corbina.ru (mail.post.ru [195.14.50.16]) by contrabass.post.ru (Postfix) with ESMTP id 228D31A51DA; Tue, 9 Sep 2008 11:56:43 +0400 (MSD) X-Virus-Scanned: by cgpav Uf39PSi9pFi9oFi9 Received: from [10.208.17.3] (HELO dchagin.dialup.corbina.ru) by corbina.ru (CommuniGate Pro SMTP 5.1.14) with ESMTPS id 1089941618; Tue, 09 Sep 2008 11:56:43 +0400 Received: from dchagin.dialup.corbina.ru (localhost.chd.net [127.0.0.1]) by dchagin.dialup.corbina.ru (8.14.2/8.14.2) with ESMTP id m897ufYb001839; Tue, 9 Sep 2008 11:56:41 +0400 (MSD) (envelope-from root@dchagin.dialup.corbina.ru) Received: (from root@localhost) by dchagin.dialup.corbina.ru (8.14.2/8.14.2/Submit) id m897uao5001838; Tue, 9 Sep 2008 11:56:36 +0400 (MSD) (envelope-from root) Date: Tue, 9 Sep 2008 11:56:36 +0400 From: Chagin Dmitry To: Roman Divacky Message-ID: <20080909075636.GA1763@dchagin.dialup.corbina.ru> Mail-Followup-To: Roman Divacky , FreeBSD bugmaster , freebsd-emulation@freebsd.org References: <200809080222.m882MIdL006640@freefall.freebsd.org> <20080908200524.GA74912@freebsd.org> <20080909071335.GA1522@dchagin.dialup.corbina.ru> <20080909072509.GA10750@freebsd.org> <20080909073108.GA1665@dchagin.dialup.corbina.ru> <20080909073443.GA11721@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080909073443.GA11721@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-emulation@freebsd.org, FreeBSD bugmaster Subject: Re: 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: Tue, 09 Sep 2008 07:58:33 -0000 On Tue, Sep 09, 2008 at 09:34:43AM +0200, Roman Divacky wrote: > On Tue, Sep 09, 2008 at 11:31:08AM +0400, Chagin Dmitry wrote: > > On Tue, Sep 09, 2008 at 09:25:09AM +0200, Roman Divacky wrote: > > > On Tue, Sep 09, 2008 at 11:13:35AM +0400, Chagin Dmitry wrote: > > > > On Mon, Sep 08, 2008 at 10:05:24PM +0200, Roman Divacky wrote: > > > > > On Mon, Sep 08, 2008 at 02:22:18AM +0000, FreeBSD bugmaster wrote: > > > > > > The following is a listing of current problems submitted by FreeBSD users. > > > > > > These represent problem reports covering all versions including > > > > > > experimental development code and obsolete releases. > > > > > > > > > > > > S Tracker Resp. Description > > > > > > -------------------------------------------------------------------------------- > > > > > > o kern/126232 emulation [linux] Linux ioctl TCGETS (0x5401) always fails > > > > > > > > what we will do with it? as I already wrote it not a bug. > > > > it's glibc isatty() call, which is used by many programs for check file > > > > descriptors. > > > > > > I dont understand the PR much.... the TCGETS is already implemented but it fails > > > for some fd... I didnt find any check in the linux code for the fd being a tty. > > > > > > > csh for example > > csh does what? very often uses isatty(), it from fbsd: 19750 csh 0.000010 CALL fcntl(0x6,F_SETFD,FD_CLOEXEC) 19750 csh 0.000010 RET fcntl 0 19750 csh 0.000023 CALL ioctl(0x6,TIOCGETA,0x7fffffffc740) 19750 csh 0.000011 RET ioctl -1 errno 25 Inappropriate ioctl for device 19750 csh 0.000011 CALL sigprocmask(SIG_BLOCK,0,0x57b1c8) -- Have fun! chd From owner-freebsd-emulation@FreeBSD.ORG Tue Sep 9 08:00:05 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 47F85106566B; Tue, 9 Sep 2008 08:00:05 +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 EB2268FC12; Tue, 9 Sep 2008 08:00:04 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 5367865BD52; Tue, 9 Sep 2008 10:00:17 +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 pwd3jcnuIMPm; Tue, 9 Sep 2008 10:00:11 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id CB8F665BD4C; Tue, 9 Sep 2008 10:00:11 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.2/8.14.2/Submit) id m8980B1S013547; Tue, 9 Sep 2008 10:00:11 +0200 (CEST) (envelope-from rdivacky) Date: Tue, 9 Sep 2008 10:00:11 +0200 From: Roman Divacky To: FreeBSD bugmaster , freebsd-emulation@freebsd.org Message-ID: <20080909080011.GA13405@freebsd.org> References: <200809080222.m882MIdL006640@freefall.freebsd.org> <20080908200524.GA74912@freebsd.org> <20080909071335.GA1522@dchagin.dialup.corbina.ru> <20080909072509.GA10750@freebsd.org> <20080909073108.GA1665@dchagin.dialup.corbina.ru> <20080909073443.GA11721@freebsd.org> <20080909075636.GA1763@dchagin.dialup.corbina.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080909075636.GA1763@dchagin.dialup.corbina.ru> User-Agent: Mutt/1.4.2.3i Cc: Subject: Re: 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: Tue, 09 Sep 2008 08:00:05 -0000 On Tue, Sep 09, 2008 at 11:56:36AM +0400, Chagin Dmitry wrote: > On Tue, Sep 09, 2008 at 09:34:43AM +0200, Roman Divacky wrote: > > On Tue, Sep 09, 2008 at 11:31:08AM +0400, Chagin Dmitry wrote: > > > On Tue, Sep 09, 2008 at 09:25:09AM +0200, Roman Divacky wrote: > > > > On Tue, Sep 09, 2008 at 11:13:35AM +0400, Chagin Dmitry wrote: > > > > > On Mon, Sep 08, 2008 at 10:05:24PM +0200, Roman Divacky wrote: > > > > > > On Mon, Sep 08, 2008 at 02:22:18AM +0000, FreeBSD bugmaster wrote: > > > > > > > The following is a listing of current problems submitted by FreeBSD users. > > > > > > > These represent problem reports covering all versions including > > > > > > > experimental development code and obsolete releases. > > > > > > > > > > > > > > S Tracker Resp. Description > > > > > > > -------------------------------------------------------------------------------- > > > > > > > o kern/126232 emulation [linux] Linux ioctl TCGETS (0x5401) always fails > > > > > > > > > > what we will do with it? as I already wrote it not a bug. > > > > > it's glibc isatty() call, which is used by many programs for check file > > > > > descriptors. > > > > > > > > I dont understand the PR much.... the TCGETS is already implemented but it fails > > > > for some fd... I didnt find any check in the linux code for the fd being a tty. > > > > > > > > > > csh for example > > > > csh does what? > > very often uses isatty(), it from fbsd: > > 19750 csh 0.000010 CALL fcntl(0x6,F_SETFD,FD_CLOEXEC) > 19750 csh 0.000010 RET fcntl 0 > 19750 csh 0.000023 CALL ioctl(0x6,TIOCGETA,0x7fffffffc740) > 19750 csh 0.000011 RET ioctl -1 errno 25 Inappropriate ioctl for device > 19750 csh 0.000011 CALL sigprocmask(SIG_BLOCK,0,0x57b1c8) what is the 0x6 fd? I'll see if it fails on linux too (I believe it does) From owner-freebsd-emulation@FreeBSD.ORG Tue Sep 9 08:03:28 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 DC13C1065676; Tue, 9 Sep 2008 08:03:28 +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 933DF8FC08; Tue, 9 Sep 2008 08:03:28 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 9037665BD52; Tue, 9 Sep 2008 10:03:40 +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 LsjppctfZIj9; Tue, 9 Sep 2008 10:03:39 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 62B3F65BD4C; Tue, 9 Sep 2008 10:03:39 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.2/8.14.2/Submit) id m8983dJm013790; Tue, 9 Sep 2008 10:03:39 +0200 (CEST) (envelope-from rdivacky) Date: Tue, 9 Sep 2008 10:03:39 +0200 From: Roman Divacky To: FreeBSD bugmaster , freebsd-emulation@freebsd.org Message-ID: <20080909080339.GA13747@freebsd.org> References: <200809080222.m882MIdL006640@freefall.freebsd.org> <20080908200524.GA74912@freebsd.org> <20080909071335.GA1522@dchagin.dialup.corbina.ru> <20080909072509.GA10750@freebsd.org> <20080909073108.GA1665@dchagin.dialup.corbina.ru> <20080909073443.GA11721@freebsd.org> <20080909075636.GA1763@dchagin.dialup.corbina.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080909075636.GA1763@dchagin.dialup.corbina.ru> User-Agent: Mutt/1.4.2.3i Cc: Subject: Re: 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: Tue, 09 Sep 2008 08:03:28 -0000 > very often uses isatty(), it from fbsd: > > 19750 csh 0.000010 CALL fcntl(0x6,F_SETFD,FD_CLOEXEC) > 19750 csh 0.000010 RET fcntl 0 > 19750 csh 0.000023 CALL ioctl(0x6,TIOCGETA,0x7fffffffc740) > 19750 csh 0.000011 RET ioctl -1 errno 25 Inappropriate ioctl for device > 19750 csh 0.000011 CALL sigprocmask(SIG_BLOCK,0,0x57b1c8) exactly the same happens on Linux ioctl(6, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fff02f1db00) = -1 ENOTTY (Inappropriate ioctl for device) ioctl(6, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fff02f1de10) = -1 ENOTTY (Inappropriate ioctl for device) ioctl(6, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fff02f1dae0) = -1 ENOTTY (Inappropriate ioctl for device) this is an app bug, anyone against me closing the PR? roman From owner-freebsd-emulation@FreeBSD.ORG Tue Sep 9 16:05:03 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 AF4D210656B8 for ; Tue, 9 Sep 2008 16:05:03 +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 31C548FC1D for ; Tue, 9 Sep 2008 16:05:02 +0000 (UTC) (envelope-from freebsd-emulation@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Kd4qY-0000k2-I9 for freebsd-emulation@freebsd.org; Tue, 09 Sep 2008 15:09:38 +0000 Received: from 81.210.229.80 ([81.210.229.80]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 09 Sep 2008 15:09:38 +0000 Received: from saper by 81.210.229.80 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 09 Sep 2008 15:09:38 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-emulation@freebsd.org From: Marcin Cieslak Date: Tue, 09 Sep 2008 17:09:27 +0200 Lines: 64 Message-ID: <48C691A7.5060302@system.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-ripemd160; protocol="application/pgp-signature"; boundary="------------enig4C256BDCE0C1E5115289672A" X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 81.210.229.80 User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8.1.16) Gecko/20080721 MultiZilla/1.8.3.4e SeaMonkey/1.1.11 X-Enigmail-Version: 0.95.6 Sender: news Cc: rdivacky@FreeBSD.org, rink@FreeBSD.org, Robert Watson Subject: Re: kern/102956: [linux] [patch] Add partial support for SO_PEERCRED in Linux emulation 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: Tue, 09 Sep 2008 16:05:03 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig4C256BDCE0C1E5115289672A Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: quoted-printable Hello, > (1) The value of LINUX_SO_PEERCRED is incorrect for Alpha, it should be= 18 on > that platform. Well, in the meantime Alpha support is gone... > (2) I'm a bit worried about pid not being set, but this may (may) be OK= =2E On > Linux, generally speaking you are guaranteed that either you get (0, -1= , > -1) or (pid, uid, gid), but not a blend of both. As we support the pid > for SCM_CREDS, we might also consider adding a LOCAL_PEERPID for use by= > the linux emulator to query the remote pid (we'd need to add that where= > the peercred is currently cached though). Will remote PID always be available? >=20 > (3) LOG_WARNING should perhaps be LOG_DEBUG or something more consisten= t with > the res of the linuxulator. I agree. This should be LOG_DEBUG. > FYI, I'm not sure I like that we just pass all other socket options=20 through to > getsockopt() without transformation or an error, it seems failure-prone= =2E We > may end up returning invalid data, etc, but that's not caused by this p= atch, > but a generally poor failure mode in the linuxulator. I agree. Probably we should explicitly list all supported socket option. = I think most of the translation layer is coded for "fixing known=20 differences" vs. "explicit support for X, Y, Z returning EA, EB or EC". --Marcin --------------enig4C256BDCE0C1E5115289672A Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQCVAwUBSMaRqz2W2v2wY27ZAQMSjQQAk1cWPPpb+a/lzUqVTDK5UPF62rjUVABD 5najGil8hJTcwvErzY12FLISIE+pql6rGcKKfVuP3RKR19fBmGMxeRviu8pWdF+2 wrBvcOelWavZH2qEgqd8F25F+3x2SK+QnB4SHme+OYdlOUZyGUtIZaUUWH0sbhki 7UvSZLisI+8= =9JK1 -----END PGP SIGNATURE----- --------------enig4C256BDCE0C1E5115289672A-- From owner-freebsd-emulation@FreeBSD.ORG Tue Sep 9 16:10:31 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 7639F1065672; Tue, 9 Sep 2008 16:10:31 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4CB478FC12; Tue, 9 Sep 2008 16:10:31 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from freefall.freebsd.org (rdivacky@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m89GAVOK084836; Tue, 9 Sep 2008 16:10:31 GMT (envelope-from rdivacky@freefall.freebsd.org) Received: (from rdivacky@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m89GAUPi084832; Tue, 9 Sep 2008 16:10:30 GMT (envelope-from rdivacky) Date: Tue, 9 Sep 2008 16:10:30 GMT Message-Id: <200809091610.m89GAUPi084832@freefall.freebsd.org> To: samflanker@gmail.com, rdivacky@FreeBSD.org, freebsd-emulation@FreeBSD.org From: rdivacky@FreeBSD.org Cc: Subject: Re: kern/117010: [linux] linux_getdents() get something like buffer overflow or else 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: Tue, 09 Sep 2008 16:10:31 -0000 Synopsis: [linux] linux_getdents() get something like buffer overflow or else State-Changed-From-To: open->closed State-Changed-By: rdivacky State-Changed-When: Tue Sep 9 16:07:44 UTC 2008 State-Changed-Why: Fix commited in r182892. http://www.freebsd.org/cgi/query-pr.cgi?pr=117010 From owner-freebsd-emulation@FreeBSD.ORG Tue Sep 9 16:20: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 25BF0106567A for ; Tue, 9 Sep 2008 16:20: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 14ED58FC15 for ; Tue, 9 Sep 2008 16:20: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 m89GK3FY086512 for ; Tue, 9 Sep 2008 16:20:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m89GK3aN086511; Tue, 9 Sep 2008 16:20:03 GMT (envelope-from gnats) Date: Tue, 9 Sep 2008 16:20:03 GMT Message-Id: <200809091620.m89GK3aN086511@freefall.freebsd.org> To: freebsd-emulation@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: kern/117010: commit references a PR X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2008 16:20:04 -0000 The following reply was made to PR kern/117010; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/117010: commit references a PR Date: Tue, 9 Sep 2008 16:00:49 +0000 (UTC) rdivacky 2008-09-09 16:00:17 UTC FreeBSD src repository Modified files: sys/compat/linux linux_file.c Log: SVN rev 182892 on 2008-09-09 16:00:17Z by rdivacky Getdents requires padding with 2 bytes instead of 1 byte as with getdents64. The last byte is used for storing the d_type, add this to plain getdents case where it was missing before. Also change the code to use strlcpy instead of plain strcpy. This changes fix the getdents crash we had reports about (hl2 server etc.) PR: kern/117010 MFC after: 1 week Submitted by: Dmitry Chagin (dchagin@) Tested by: MITA Yoshio Approved by: kib (mentor) Revision Changes Path 1.115 +54 -33 src/sys/compat/linux/linux_file.c _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org" From owner-freebsd-emulation@FreeBSD.ORG Wed Sep 10 08:07: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 2A8031065670 for ; Wed, 10 Sep 2008 08:07:41 +0000 (UTC) (envelope-from samflanker@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.30]) by mx1.freebsd.org (Postfix) with ESMTP id D34628FC08 for ; Wed, 10 Sep 2008 08:07:40 +0000 (UTC) (envelope-from samflanker@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so395631ywe.13 for ; Wed, 10 Sep 2008 01:07:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:content-type :content-transfer-encoding; bh=n/7rWGF4XHFZc9PGvbjgMEIpTxxfIaMwoxKj0O95Bmc=; b=lV/qDnig+yhDUmIy3XzW7fBhOOwf9VtzTI5m1NZamWAwNjS44etvz4SKruXoEstHv4 Wbo23PSRP3kARlKkCDSHDoUv/mPFKK6APDNljIkA1ZIVxiDkXx+wYUxCUCl6LfVpo+zq ugvd82dRG2TLClzsFtiolzaeQ/33HVP/+xRUk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; b=FI7Emh2UBcU1E80f8uj2FogyXUaKNknLpLd/1h9X3exOKXt/COpu7WG8HN4eudsRb8 mytSYAJ7lk0lEo0oF4fwkbIuSsrHDy2lvmIb38ISFxorv6bd9G8baIFzp/ncJmWCOyDB fQhowKQJmyb5bqJgN7Pfz31nk9PSLZyzOYlsI= Received: by 10.86.80.17 with SMTP id d17mr673737fgb.24.1221032681655; Wed, 10 Sep 2008 00:44:41 -0700 (PDT) Received: from ?192.168.1.107? ( [213.152.137.42]) by mx.google.com with ESMTPS id d4sm8071630fga.5.2008.09.10.00.44.39 (version=SSLv3 cipher=RC4-MD5); Wed, 10 Sep 2008 00:44:40 -0700 (PDT) Message-ID: <48C77AE9.90700@gmail.com> Date: Wed, 10 Sep 2008 11:44:41 +0400 From: sam User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) MIME-Version: 1.0 To: chagin.dmitry@gmail.com Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: beech@FreeBSD.org, mita@ee.t.u-tokyo.ac.jp, freebsd-emulation@freebsd.org Subject: Re: kern/117010: [linux] linux_getdents() get something like buffer overflow or else 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, 10 Sep 2008 08:07:41 -0000 On Mon, Sep 08, 2008 at 01:12:28AM +0400, Chagin Dmitry wrote: >/ Please, try a patch bellow: />/ />/ diff --git a/src/sys/compat/linux/linux_file.c b/src/sys/compat/linux/linux_file.c />/ index 303bc3f..413e597 100644 />/ --- a/src/sys/compat/linux/linux_file.c />/ +++ b/src/sys/compat/linux/linux_file.c />/ @@ -303,9 +303,20 @@ struct l_dirent64 { />/ char d_name[LINUX_NAME_MAX + 1]; />/ }; />/ />/ -#define LINUX_RECLEN(de,namlen) \ />/ - ALIGN((((char *)&(de)->d_name - (char *)de) + (namlen) + 1)) />/ +/* />/ + * Linux uses the last byte in the dirent buffer to store d_type, />/ + * at least glibc-2.7 requires it. For what l_dirent padded on 2 bytes. />/ + */ />/ +#define LINUX_RECLEN(namlen) \ />/ + roundup((offsetof(struct l_dirent, d_name) + (namlen) + 2), \ />/ + sizeof(l_ulong)) />/ + />/ +#define LINUX_RECLEN64(namlen) \ />/ + roundup((offsetof(struct l_dirent64, d_name) + (namlen) + 1), \ />/ + sizeof(uint64_t)) />/ />/ +#define LINUX_MAXRECLEN max(LINUX_RECLEN(LINUX_NAME_MAX), \ />/ + LINUX_RECLEN64(LINUX_NAME_MAX)) />/ #define LINUX_DIRBLKSIZ 512 />/ />/ static int />/ @@ -318,12 +329,13 @@ getdents_common(struct thread *td, struct linux_getdents64_args *args, />/ int len, reclen; /* BSD-format */ />/ caddr_t outp; /* Linux-format */ />/ int resid, linuxreclen=0; /* Linux-format */ />/ + caddr_t lbuf; /* Linux-format */ />/ struct file *fp; />/ struct uio auio; />/ struct iovec aiov; />/ off_t off; />/ - struct l_dirent linux_dirent; />/ - struct l_dirent64 linux_dirent64; />/ + struct l_dirent *linux_dirent; />/ + struct l_dirent64 *linux_dirent64; />/ int buflen, error, eofflag, nbytes, justone; />/ u_long *cookies = NULL, *cookiep; />/ int ncookies, vfslocked; />/ @@ -359,6 +371,7 @@ getdents_common(struct thread *td, struct linux_getdents64_args *args, />/ buflen = max(LINUX_DIRBLKSIZ, nbytes); />/ buflen = min(buflen, MAXBSIZE); />/ buf = malloc(buflen, M_TEMP, M_WAITOK); />/ + lbuf = malloc(LINUX_MAXRECLEN, M_TEMP, M_WAITOK | M_ZERO); />/ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); />/ />/ again: />/ @@ -436,8 +449,8 @@ again: />/ } />/ />/ linuxreclen = (is64bit) />/ - ? LINUX_RECLEN(&linux_dirent64, bdp->d_namlen) />/ - : LINUX_RECLEN(&linux_dirent, bdp->d_namlen); />/ + ? LINUX_RECLEN64(bdp->d_namlen) />/ + : LINUX_RECLEN(bdp->d_namlen); />/ />/ if (reclen > len || resid < linuxreclen) { />/ outp++; />/ @@ -446,34 +459,41 @@ again: />/ />/ if (justone) { />/ /* readdir(2) case. */ />/ - linux_dirent.d_ino = bdp->d_fileno; />/ - linux_dirent.d_off = (l_off_t)linuxreclen; />/ - linux_dirent.d_reclen = (l_ushort)bdp->d_namlen; />/ - strcpy(linux_dirent.d_name, bdp->d_name); />/ - error = copyout(&linux_dirent, outp, linuxreclen); />/ - } else { />/ - if (is64bit) { />/ - linux_dirent64.d_ino = bdp->d_fileno; />/ - linux_dirent64.d_off = (cookiep) />/ - ? (l_off_t)*cookiep />/ - : (l_off_t)(off + reclen); />/ - linux_dirent64.d_reclen = />/ - (l_ushort)linuxreclen; />/ - linux_dirent64.d_type = bdp->d_type; />/ - strcpy(linux_dirent64.d_name, bdp->d_name); />/ - error = copyout(&linux_dirent64, outp, />/ - linuxreclen); />/ - } else { />/ - linux_dirent.d_ino = bdp->d_fileno; />/ - linux_dirent.d_off = (cookiep) />/ - ? (l_off_t)*cookiep />/ - : (l_off_t)(off + reclen); />/ - linux_dirent.d_reclen = (l_ushort)linuxreclen; />/ - strcpy(linux_dirent.d_name, bdp->d_name); />/ - error = copyout(&linux_dirent, outp, />/ - linuxreclen); />/ - } />/ + linux_dirent = (struct l_dirent*)lbuf; />/ + linux_dirent->d_ino = bdp->d_fileno; />/ + linux_dirent->d_off = (l_off_t)linuxreclen; />/ + linux_dirent->d_reclen = (l_ushort)bdp->d_namlen; />/ + strlcpy(linux_dirent->d_name, bdp->d_name, />/ + linuxreclen - offsetof(struct l_dirent, d_name)); />/ + error = copyout(linux_dirent, outp, linuxreclen); />/ } />/ + if (is64bit) { />/ + linux_dirent64 = (struct l_dirent64*)lbuf; />/ + linux_dirent64->d_ino = bdp->d_fileno; />/ + linux_dirent64->d_off = (cookiep) />/ + ? (l_off_t)*cookiep />/ + : (l_off_t)(off + reclen); />/ + linux_dirent64->d_reclen = (l_ushort)linuxreclen; />/ + linux_dirent64->d_type = bdp->d_type; />/ + strlcpy(linux_dirent64->d_name, bdp->d_name, />/ + linuxreclen - offsetof(struct l_dirent64, d_name)); />/ + error = copyout(linux_dirent64, outp, linuxreclen); />/ + } else if (!justone) { />/ + linux_dirent = (struct l_dirent*)lbuf; />/ + linux_dirent->d_ino = bdp->d_fileno; />/ + linux_dirent->d_off = (cookiep) />/ + ? (l_off_t)*cookiep />/ + : (l_off_t)(off + reclen); />/ + linux_dirent->d_reclen = (l_ushort)linuxreclen; />/ + /* />/ + * Copy d_type to last byte of l_dirent buffer />/ + */ />/ + lbuf[linuxreclen-1] = bdp->d_type; />/ + strlcpy(linux_dirent->d_name, bdp->d_name, />/ + linuxreclen - offsetof(struct l_dirent, d_name)-1); />/ + error = copyout(linux_dirent, outp, linuxreclen); />/ + } />/ + />/ if (error) />/ goto out; />/ />/ @@ -509,6 +529,7 @@ out: />/ VFS_UNLOCK_GIANT(vfslocked); />/ fdrop(fp, td); />/ free(buf, M_TEMP); />/ + free(lbuf, M_TEMP); />/ return (error); />/ } />/ />/ />/ Roman, I think that this patch can be commited (if testing passes :)) />/ thnx! Hello Iam tested this patch on my old testing pack (with source) http://cs.udmvt.ru/files/temp/linux_getdents.tar.bz2 (bin.file linux_getdents_static compiled on system Linux 2.6.9 with old glibc version) # uname -a FreeBSD damascus 7.0-STABLE FreeBSD 7.0-STABLE #0: Mon Aug 25 12:41:55 MSD 2008 root@static:/usr/obj/usr/src/sys/DAMASCUS i386 # sysctl compat.linux.osrelease compat.linux.osrelease: 2.6.16 # pkg_info|grep linux linux_base-fc-4_13 Base set of packages needed in Linux mode (for i386/amd64) /before patch ------------------------------------------------------------------- # ./linux_getdents_static ./temp/ Reading... . .. ak47-1.wav ak47-2.wav *** sliderelease1.wav Closing... *** glibc detected *** ./linux_getdents_static: double free or corruption (!prev): 0x080c7688 *** ======= Backtrace: ========= [0x80515fe] [0x8054cdb] [0x80564b8] [0x804828b] [0x80484ab] [0x8048151] ======= Memory map: ======== 08048000-080c3000 r-xp 0008d000 00:00 4168734 /usr/home/venom/temp/temp/devel/linux/linux_getdents_static 080c3000-080c6000 rw-p 00025000 00:00 0 080c6000-080e8000 rwxp 00025000 00:00 0 480c3000-480c4000 rwxp 0013d000 00:00 0 48100000-48121000 rwxp 0013d000 00:00 0 48121000-48200000 ---p 0013d000 00:00 0 bfbe0000-bfc00000 rwxp 00020000 00:00 0 Abort trap: 6 (core dumped) ------------------------------------------------------------------- after patch ------------------------------------------------------------------- # ./linux_getdents_static ./temp/ Reading... . .. ak47-1.wav ak47-2.wav *** sliderelease1.wav Closing...Done! ------------------------------------------------------------------- thanks /Vladimir Ermakov From owner-freebsd-emulation@FreeBSD.ORG Fri Sep 12 16:58:12 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 DA493106566B for ; Fri, 12 Sep 2008 16:58:12 +0000 (UTC) (envelope-from pfgshield-freebsd@yahoo.com) Received: from web32705.mail.mud.yahoo.com (web32705.mail.mud.yahoo.com [68.142.207.249]) by mx1.freebsd.org (Postfix) with SMTP id 829DE8FC16 for ; Fri, 12 Sep 2008 16:58:12 +0000 (UTC) (envelope-from pfgshield-freebsd@yahoo.com) Received: (qmail 92712 invoked by uid 60001); 12 Sep 2008 16:31:32 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=q+uXVUXk6bp2o8s5e59yjs9ntMisV5Tv7BJZll9gh2dt6kAKx/6qtvH0ecyIbawwFaOpKSNpQ1KSkfm+lqHKVZHOqSr+Bmjg6JNM2LlrUj7QDnj4ErepoDoKNsFASzFA6kEc8t8kS6xAScSzPoB4dduSc7f9YqCMp8LVp3qvWpY=; X-YMail-OSG: TdoJOuoVM1l0einb3XvL8IGmwP7oMTu4tdDHmghYJibaqwHMt6SDdn375mH_uCBw9NUnbnA46uCu3.SpqcvHJqWsAvg.H2W2w80FLLQY8iL2uHYEvB6mmSd3QwNn_UJ3.lrE.PpjYMPezjUPJ6_PXb8- Received: from [190.158.44.173] by web32705.mail.mud.yahoo.com via HTTP; Fri, 12 Sep 2008 09:31:32 PDT X-Mailer: YahooMailWebService/0.7.218.2 Date: Fri, 12 Sep 2008 09:31:32 -0700 (PDT) From: Pedro Giffuni To: Klaus Espenlaub MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-ID: <880886.92445.qm@web32705.mail.mud.yahoo.com> Cc: freebsd-emulation@FreeBSD.org, freebsd-virtualization@FreeBSD.org Subject: Re: VirtualBox looks for FreeBSD developer X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pfgshield-freebsd@yahoo.com List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2008 16:58:12 -0000 Hi Klaus; Thank you for your posting on -ports: http://docs.freebsd.org/cgi/mid.cgi?48C8F051.7060107 I think either -emulation or -virtualization might be better targets for su= ch discussion though (indeed we did discuss it briefly in the virtualizatio= n list).=20 Some of us are very interested in having VirtualBox on FreeBSD, and I under= stand the FreeBSD Foundation would consider sponsoring such effort if someo= ne with the know-how makes the proposal. I don't have what's needed but I was thinking maybe someone that knows well= the kqemu module would have that know-how... Perhaps you could give us mor= e insight on what needs to be done/documented? Pedro. =0A=0A__________________________________________________=0ADo You Yahoo!?= =0APoco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tan= to spazio gratuito per i tuoi file e i messaggi =0Ahttp://mail.yahoo.it From owner-freebsd-emulation@FreeBSD.ORG Fri Sep 12 17:59:38 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 59B2E106567B for ; Fri, 12 Sep 2008 17:59:38 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outU.internet-mail-service.net (outu.internet-mail-service.net [216.240.47.244]) by mx1.freebsd.org (Postfix) with ESMTP id 43BB08FC21 for ; Fri, 12 Sep 2008 17:59:38 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id A75EE22FA; Fri, 12 Sep 2008 10:45:43 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 7D8382D6015; Fri, 12 Sep 2008 10:45:42 -0700 (PDT) Message-ID: <48CAAAC5.2050707@elischer.org> Date: Fri, 12 Sep 2008 10:45:41 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: pfgshield-freebsd@yahoo.com References: <880886.92445.qm@web32705.mail.mud.yahoo.com> In-Reply-To: <880886.92445.qm@web32705.mail.mud.yahoo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Klaus Espenlaub , freebsd-emulation@FreeBSD.org, freebsd-virtualization@FreeBSD.org Subject: Re: VirtualBox looks for FreeBSD developer 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, 12 Sep 2008 17:59:38 -0000 Pedro Giffuni wrote: > Hi Klaus; > > Thank you for your posting on -ports: > > http://docs.freebsd.org/cgi/mid.cgi?48C8F051.7060107 > > I think either -emulation or -virtualization might be better > targets for such discussion though (indeed we did discuss it > briefly in the virtualization list). > > Some of us are very interested in having VirtualBox on FreeBSD, and > I understand the FreeBSD Foundation would consider sponsoring such > effort if someone with the know-how makes the proposal. Klause, freebsd-virtualization@freebsd.org (this mail is there) is the place you want but it is a new list and not everyone on freebsd-emulation@freebsd.org will be on it (yet). Freebsd ports is for ported software, but virtualbox doesn't really come into that category yet.. > > I don't have what's needed but I was thinking maybe someone that > knows well the kqemu module would have that know-how... Perhaps you > could give us more insight on what needs to be done/documented? A laundry list of what is needed would be good.. Remember that we have had vmware running on FreeBSD so it can be done. > > Pedro. > > > __________________________________________________ Do You Yahoo!? > Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti > da tanto spazio gratuito per i tuoi file e i messaggi > http://mail.yahoo.it > _______________________________________________ > freebsd-virtualization@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To > unsubscribe, send any mail to > "freebsd-virtualization-unsubscribe@freebsd.org" From owner-freebsd-emulation@FreeBSD.ORG Fri Sep 12 21:19:02 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 E347D1065683 for ; Fri, 12 Sep 2008 21:19:02 +0000 (UTC) (envelope-from jjuanino@gmail.com) Received: from gv-out-0910.google.com (gv-out-0910.google.com [216.239.58.186]) by mx1.freebsd.org (Postfix) with ESMTP id 709EF8FC19 for ; Fri, 12 Sep 2008 21:19:02 +0000 (UTC) (envelope-from jjuanino@gmail.com) Received: by gv-out-0910.google.com with SMTP id n8so639770gve.39 for ; Fri, 12 Sep 2008 14:19:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:mime-version:content-type:content-disposition :x-operating-system:user-agent; bh=3W/bTAVgjHT5nzxMPbPHKxTgIWyKc/coJIWHtgNNXn0=; b=tQW4vaw/zGecPdOKZW3tuYEtLXVLchme9zfezkahUw3DZxqRL6BbckkqvsSdgzea58 02voSh659LwTxhSBQPvZ7O7pGBExKMvZXO9ibrSUucQxkuHO0ILfq5e+62mocLocsr3L a7R8VgLfcxwCfqOLyrSSreZmCxQB/4a+OH+ak= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:x-operating-system:user-agent; b=EwgcFYN56IeJYVVjoXYr4PqcQRGgQQFwUeI3evT2rTH/k8/ELE9sjJjAKRJe/+357l 4fgwoj96C4sthNiQ67vBXM9aok5ZVvgWm5aNLvP3LCkGhJbREUyM/+BkOPFWPEC4FNoz 96yETWgtCJNRDzwMxVAIwGaixXv8jMw/7EQwA= Received: by 10.86.57.9 with SMTP id f9mr3550564fga.66.1221252730015; Fri, 12 Sep 2008 13:52:10 -0700 (PDT) Received: from sanabria ( [85.54.133.208]) by mx.google.com with ESMTPS id d4sm13282569fga.5.2008.09.12.13.52.08 (version=SSLv3 cipher=RC4-MD5); Fri, 12 Sep 2008 13:52:09 -0700 (PDT) Date: Fri, 12 Sep 2008 22:52:03 +0200 From: Jose Garcia Juanino To: freebsd-emulation@freebsd.org Message-ID: <20080912205202.GA83925@sanabria> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xHFwDpU9dbj6ez1V" Content-Disposition: inline X-Operating-System: FreeBSD 7.0-RELEASE-p4 User-Agent: Mutt/1.5.18 (2008-05-17) Subject: sqlplus segfaults when receiving INT signal 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, 12 Sep 2008 21:19:03 -0000 --xHFwDpU9dbj6ez1V Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello I have installed databases/linux-oracle-instantclient-sqlplus port with emulators/linux_base-f8 linux base port (and compat.linux.osrelease=3D2.6.16): When I hit "CTRL+C" inside sqlplus or send INT signal to sqlplus process, I= get a segfautl: $ sqlplus /nolog SQL> select [hit CTRL+C here] Segmentation fault In /var/log/messages I get: Sep 12 22:37:47 ..... kernel: linux_sys_futex: unknown op 129=20 Sep 12 22:37:48 ..... kernel: pid 83975 (sqlplus), uid 1002: exited on sign= al 11=20 (the linux_sys_futex message is harmless, as I have read in other mailing list). The truss command gives: linux_rt_sigprocmask(0x0,0xbfbf9b28,0x0,0x8,0x292d5ff4,0x6) =3D 0 (0x0) linux_rt_sigprocmask(0x1,0xbfbf9b28,0x0,0x8,0x292d5ff4,0x6) =3D 0 (0x0) linux_rt_sigreturn(0xbfbf9c8c,0x2915fff4,0x2,0x292d6420,0x292da6c0,0x6) =3D= 3 (0x3) read(0,"\n",4096) =3D 1 (0x1) SIGNAL 11 (SIGSEGV) Note that this does not happen with emulators/linux_base-fc4 port and compat.linux.osrelease=3D2.4.2. Anybody has suffered this trouble? Thanks in advanced (Please Cc: me, as I have not subscribed to the list) --xHFwDpU9dbj6ez1V Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkjK1nEACgkQFOo0zaS9RnLDjgCgnaoposCFUxPOLg94N0QoMX5t x6UAoIoejywz9N4f1pCwuD1SziAU8xgZ =Kkue -----END PGP SIGNATURE----- --xHFwDpU9dbj6ez1V-- From owner-freebsd-emulation@FreeBSD.ORG Sat Sep 13 07:09:29 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 9209F106567A for ; Sat, 13 Sep 2008 07:09:29 +0000 (UTC) (envelope-from root@dchagin.dialup.corbina.ru) Received: from contrabass.post.ru (contrabass.post.ru [85.21.78.5]) by mx1.freebsd.org (Postfix) with ESMTP id 47CEE8FC13 for ; Sat, 13 Sep 2008 07:09:23 +0000 (UTC) (envelope-from root@dchagin.dialup.corbina.ru) Received: from corbina.ru (mail.post.ru [195.14.50.16]) by contrabass.post.ru (Postfix) with ESMTP id DD72B1B5623; Sat, 13 Sep 2008 11:09:21 +0400 (MSD) X-Virus-Scanned: by cgpav Uf39PSi9pFi9oFi9 Received: from dchagin.dialup.corbina.ru ([78.107.232.239] verified) by corbina.ru (CommuniGate Pro SMTP 5.1.14) with ESMTPS id 1120237376; Sat, 13 Sep 2008 11:09:21 +0400 Received: from dchagin.dialup.corbina.ru (localhost.chd.net [127.0.0.1]) by dchagin.dialup.corbina.ru (8.14.2/8.14.2) with ESMTP id m8D79LLD001486; Sat, 13 Sep 2008 11:09:21 +0400 (MSD) (envelope-from root@dchagin.dialup.corbina.ru) Received: (from root@localhost) by dchagin.dialup.corbina.ru (8.14.2/8.14.2/Submit) id m8D79KH7001485; Sat, 13 Sep 2008 11:09:20 +0400 (MSD) (envelope-from root) Date: Sat, 13 Sep 2008 11:09:20 +0400 From: Chagin Dmitry To: Jose Garcia Juanino Message-ID: <20080913070920.GA1440@dchagin.dialup.corbina.ru> Mail-Followup-To: Jose Garcia Juanino , freebsd-emulation@freebsd.org References: <20080912205202.GA83925@sanabria> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080912205202.GA83925@sanabria> User-Agent: Mutt/1.4.2.3i Cc: freebsd-emulation@freebsd.org Subject: Re: sqlplus segfaults when receiving INT signal 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, 13 Sep 2008 07:09:29 -0000 On Fri, Sep 12, 2008 at 10:52:03PM +0200, Jose Garcia Juanino wrote: > Hello > > I have installed databases/linux-oracle-instantclient-sqlplus port with > emulators/linux_base-f8 linux base port (and > compat.linux.osrelease=2.6.16): > > When I hit "CTRL+C" inside sqlplus or send INT signal to sqlplus process, I get a > segfautl: > > > $ sqlplus /nolog > SQL> select [hit CTRL+C here] > Segmentation fault > > In /var/log/messages I get: > > Sep 12 22:37:47 ..... kernel: linux_sys_futex: unknown op 129 > Sep 12 22:37:48 ..... kernel: pid 83975 (sqlplus), uid 1002: exited on signal 11 > > (the linux_sys_futex message is harmless, as I have read in other > mailing list). > > The truss command gives: > > linux_rt_sigprocmask(0x0,0xbfbf9b28,0x0,0x8,0x292d5ff4,0x6) = 0 (0x0) > linux_rt_sigprocmask(0x1,0xbfbf9b28,0x0,0x8,0x292d5ff4,0x6) = 0 (0x0) > linux_rt_sigreturn(0xbfbf9c8c,0x2915fff4,0x2,0x292d6420,0x292da6c0,0x6) = 3 (0x3) > read(0,"\n",4096) = 1 (0x1) > SIGNAL 11 (SIGSEGV) > > > Note that this does not happen with emulators/linux_base-fc4 port and > compat.linux.osrelease=2.4.2. > > Anybody has suffered this trouble? > Please, show uname -vp output -- Have fun! chd From owner-freebsd-emulation@FreeBSD.ORG Sat Sep 13 08:44:22 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 CE6181065677 for ; Sat, 13 Sep 2008 08:44:22 +0000 (UTC) (envelope-from jjuanino@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.25]) by mx1.freebsd.org (Postfix) with ESMTP id 5863F8FC0A for ; Sat, 13 Sep 2008 08:44:22 +0000 (UTC) (envelope-from jjuanino@gmail.com) Received: by ey-out-2122.google.com with SMTP id 6so482124eyi.7 for ; Sat, 13 Sep 2008 01:44:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:x-operating-system:user-agent; bh=KLh83h+X+TH9bD2i14neOct2MLMRFjRKimMpWlfmfxk=; b=PYLMT4mePAhoF2p9I1lX2o0cE7cIB5kg8gKtt7plyii2NkLUCbauAwPIb1jwiAlp0y K4/GGYhPOYdrCo0sX7TuQhVAjlLluZW/IjgZ+ORKARMm2Ke2E9EzAibx7seB/b8Fwl3V +mKdSaxNBUpu2wGaSvOY7qmuOT+T1AacCEEzk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:x-operating-system :user-agent; b=CunOBbQjFjkvfQ96XcWHg/WiStG8JE9dXeqm5zmduoTo01UP4I3Sn/fzA1efd3HIyZ /xJ3HWCFmeUe5fmtXxHgE072ahibpJJ29OuhGNSPx3VcevOZq/H5cq4HP+2xRiznSWEz gJ/hEEk+EISUGFU1ti1tQfmWpeaWmjF5+Vn78= Received: by 10.103.207.11 with SMTP id j11mr3676416muq.47.1221295460522; Sat, 13 Sep 2008 01:44:20 -0700 (PDT) Received: from sanabria ( [85.54.133.208]) by mx.google.com with ESMTPS id u26sm21443761mug.5.2008.09.13.01.44.18 (version=SSLv3 cipher=RC4-MD5); Sat, 13 Sep 2008 01:44:19 -0700 (PDT) Date: Sat, 13 Sep 2008 10:44:13 +0200 From: Jose Garcia Juanino To: freebsd-emulation@freebsd.org Message-ID: <20080913084412.GA1263@sanabria> References: <20080912205202.GA83925@sanabria> <20080913070920.GA1440@dchagin.dialup.corbina.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bg08WKrSYDhXBjb5" Content-Disposition: inline In-Reply-To: <20080913070920.GA1440@dchagin.dialup.corbina.ru> X-Operating-System: FreeBSD 7.0-RELEASE-p4 User-Agent: Mutt/1.5.18 (2008-05-17) Subject: Re: sqlplus segfaults when receiving INT signal 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, 13 Sep 2008 08:44:22 -0000 --bg08WKrSYDhXBjb5 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable El s=E1bado 13 de septiembre a las 09:09:20 CEST, Chagin Dmitry escribi=F3: > On Fri, Sep 12, 2008 at 10:52:03PM +0200, Jose Garcia Juanino wrote: > > > > [ ... ] > >=20 > > The truss command gives: > >=20 > > linux_rt_sigprocmask(0x0,0xbfbf9b28,0x0,0x8,0x292d5ff4,0x6) =3D 0 (0x0) > > linux_rt_sigprocmask(0x1,0xbfbf9b28,0x0,0x8,0x292d5ff4,0x6) =3D 0 (0x0) > > linux_rt_sigreturn(0xbfbf9c8c,0x2915fff4,0x2,0x292d6420,0x292da6c0,0x6)= =3D 3 (0x3) > > read(0,"\n",4096) =3D 1 (0x1) > > SIGNAL 11 (SIGSEGV) > >=20 > >=20 > > Note that this does not happen with emulators/linux_base-fc4 port and > > compat.linux.osrelease=3D2.4.2. > >=20 > > Anybody has suffered this trouble? > >=20 >=20 > Please, show uname -vp output Thank you for your response. The output is: # uname -vp FreeBSD 7.0-RELEASE-p4 #3: Thu Sep 4 08:54:56 CEST 2008 root@:/us= r/obj/src/sys/MK2008Jun06 i386 The kernel configuration is here: http://perso.orange.es/jogaju5001/MK2008Jun06 and the make.conf contains: MODULES_OVERRIDE=3D if_tap if_bridge bridgestp \ sound/sound sound/driver/ich \ acpi/acpi acpi/acpi_video \ linprocfs linux linsysfs \ syscons/green \ smbfs libiconv libmchain aio \ xl ath ath_hal ath_rate_sample wlan wlan_wep wlan_ccmp \ wlan_tkip wlan_scan_sta geom Best regards --bg08WKrSYDhXBjb5 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkjLfVwACgkQFOo0zaS9RnLQFQCgqLA1jmp6l0o1EbC6n6dlHSg3 +yMAnjXyoLKzRM0Tw4R7OmztG20sLzg7 =CwEf -----END PGP SIGNATURE----- --bg08WKrSYDhXBjb5-- From owner-freebsd-emulation@FreeBSD.ORG Sat Sep 13 08:53:14 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 26508106567B for ; Sat, 13 Sep 2008 08:53:14 +0000 (UTC) (envelope-from root@dchagin.dialup.corbina.ru) Received: from contrabass.post.ru (contrabass.post.ru [85.21.78.5]) by mx1.freebsd.org (Postfix) with ESMTP id CD9738FC0C for ; Sat, 13 Sep 2008 08:53:13 +0000 (UTC) (envelope-from root@dchagin.dialup.corbina.ru) Received: from corbina.ru (mail.post.ru [195.14.50.16]) by contrabass.post.ru (Postfix) with ESMTP id 354901B7AF8; Sat, 13 Sep 2008 12:51:14 +0400 (MSD) X-Virus-Scanned: by cgpav Uf39PSi9pFi9oFi9 Received: from dchagin.dialup.corbina.ru ([78.107.232.239] verified) by corbina.ru (CommuniGate Pro SMTP 5.1.14) with ESMTPS id 1120582280; Sat, 13 Sep 2008 12:51:13 +0400 Received: from dchagin.dialup.corbina.ru (localhost.chd.net [127.0.0.1]) by dchagin.dialup.corbina.ru (8.14.2/8.14.2) with ESMTP id m8D8pDSY002348; Sat, 13 Sep 2008 12:51:13 +0400 (MSD) (envelope-from root@dchagin.dialup.corbina.ru) Received: (from root@localhost) by dchagin.dialup.corbina.ru (8.14.2/8.14.2/Submit) id m8D8p89P002347; Sat, 13 Sep 2008 12:51:08 +0400 (MSD) (envelope-from root) Date: Sat, 13 Sep 2008 12:51:08 +0400 From: Chagin Dmitry To: Jose Garcia Juanino Message-ID: <20080913085108.GA2308@dchagin.dialup.corbina.ru> Mail-Followup-To: Jose Garcia Juanino , freebsd-emulation@freebsd.org References: <20080912205202.GA83925@sanabria> <20080913070920.GA1440@dchagin.dialup.corbina.ru> <20080913084412.GA1263@sanabria> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080913084412.GA1263@sanabria> User-Agent: Mutt/1.4.2.3i Cc: freebsd-emulation@freebsd.org Subject: Re: sqlplus segfaults when receiving INT signal 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, 13 Sep 2008 08:53:14 -0000 On Sat, Sep 13, 2008 at 10:44:13AM +0200, Jose Garcia Juanino wrote: > El s?bado 13 de septiembre a las 09:09:20 CEST, Chagin Dmitry escribi?: > > On Fri, Sep 12, 2008 at 10:52:03PM +0200, Jose Garcia Juanino wrote: > > > > > > [ ... ] > > > > > > The truss command gives: > > > > > > linux_rt_sigprocmask(0x0,0xbfbf9b28,0x0,0x8,0x292d5ff4,0x6) = 0 (0x0) > > > linux_rt_sigprocmask(0x1,0xbfbf9b28,0x0,0x8,0x292d5ff4,0x6) = 0 (0x0) > > > linux_rt_sigreturn(0xbfbf9c8c,0x2915fff4,0x2,0x292d6420,0x292da6c0,0x6) = 3 (0x3) > > > read(0,"\n",4096) = 1 (0x1) > > > SIGNAL 11 (SIGSEGV) > > > > > > > > > Note that this does not happen with emulators/linux_base-fc4 port and > > > compat.linux.osrelease=2.4.2. > > > > > > Anybody has suffered this trouble? > > > > > > > Please, show uname -vp output > > Thank you for your response. > > The output is: > > # uname -vp > FreeBSD 7.0-RELEASE-p4 #3: Thu Sep 4 08:54:56 CEST 2008 root@:/usr/obj/src/sys/MK2008Jun06 i386 > > The kernel configuration is here: > > http://perso.orange.es/jogaju5001/MK2008Jun06 > > and the make.conf contains: > > MODULES_OVERRIDE= if_tap if_bridge bridgestp \ > sound/sound sound/driver/ich \ > acpi/acpi acpi/acpi_video \ > linprocfs linux linsysfs \ > syscons/green \ > smbfs libiconv libmchain aio \ > xl ath ath_hal ath_rate_sample wlan wlan_wep wlan_ccmp \ > wlan_tkip wlan_scan_sta geom > > > > Best regards thnx, I believe you problem already fixed at 07.09.08, please cvsup and try yet... -- Have fun! chd From owner-freebsd-emulation@FreeBSD.ORG Sat Sep 13 13:01:21 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 D716E106564A for ; Sat, 13 Sep 2008 13:01:21 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id 74DD18FC13 for ; Sat, 13 Sep 2008 13:01:16 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtp (Exim 4.63 (FreeBSD)) (envelope-from ) id 1KeUkU-0000Um-K7; Sat, 13 Sep 2008 16:01:14 +0300 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 m8DD1BA3002284 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 13 Sep 2008 16:01:11 +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 m8DD1BCe080977; Sat, 13 Sep 2008 16:01:11 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id m8DD1Bin080976; Sat, 13 Sep 2008 16:01:11 +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: Sat, 13 Sep 2008 16:01:11 +0300 From: Kostik Belousov To: Jose Garcia Juanino Message-ID: <20080913130111.GQ39652@deviant.kiev.zoral.com.ua> References: <20080912205202.GA83925@sanabria> <20080913070920.GA1440@dchagin.dialup.corbina.ru> <20080913084412.GA1263@sanabria> <20080913085108.GA2308@dchagin.dialup.corbina.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="y8hmAOsilT9lKboI" Content-Disposition: inline In-Reply-To: <20080913085108.GA2308@dchagin.dialup.corbina.ru> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.93.3, clamav-milter version 0.93.3 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.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1KeUkU-0000Um-K7 d55ce193c351b9e6473704d1acce563b X-Terabit: YES Cc: freebsd-emulation@freebsd.org Subject: Re: sqlplus segfaults when receiving INT signal 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, 13 Sep 2008 13:01:22 -0000 --y8hmAOsilT9lKboI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Sep 13, 2008 at 12:51:08PM +0400, Chagin Dmitry wrote: > On Sat, Sep 13, 2008 at 10:44:13AM +0200, Jose Garcia Juanino wrote: > > El s?bado 13 de septiembre a las 09:09:20 CEST, Chagin Dmitry escribi?: > > > On Fri, Sep 12, 2008 at 10:52:03PM +0200, Jose Garcia Juanino wrote: > > > > > > > > [ ... ] > > > >=20 > > > > The truss command gives: > > > >=20 > > > > linux_rt_sigprocmask(0x0,0xbfbf9b28,0x0,0x8,0x292d5ff4,0x6) =3D 0 (= 0x0) > > > > linux_rt_sigprocmask(0x1,0xbfbf9b28,0x0,0x8,0x292d5ff4,0x6) =3D 0 (= 0x0) > > > > linux_rt_sigreturn(0xbfbf9c8c,0x2915fff4,0x2,0x292d6420,0x292da6c0,= 0x6) =3D 3 (0x3) > > > > read(0,"\n",4096) =3D 1 (0x1) > > > > SIGNAL 11 (SIGSEGV) > > > >=20 > > > >=20 > > > > Note that this does not happen with emulators/linux_base-fc4 port = and > > > > compat.linux.osrelease=3D2.4.2. > > > >=20 > > > > Anybody has suffered this trouble? > > > >=20 > > >=20 > > > Please, show uname -vp output > >=20 > > Thank you for your response. > >=20 > > The output is: > >=20 > > # uname -vp > > FreeBSD 7.0-RELEASE-p4 #3: Thu Sep 4 08:54:56 CEST 2008 root@= :/usr/obj/src/sys/MK2008Jun06 i386 > >=20 > > The kernel configuration is here: > >=20 > > http://perso.orange.es/jogaju5001/MK2008Jun06 > >=20 > > and the make.conf contains: > >=20 > > MODULES_OVERRIDE=3D if_tap if_bridge bridgestp \ > > sound/sound sound/driver/ich \ > > acpi/acpi acpi/acpi_video \ > > linprocfs linux linsysfs \ > > syscons/green \ > > smbfs libiconv libmchain aio \ > > xl ath ath_hal ath_rate_sample wlan wlan_wep wlan_ccmp \ > > wlan_tkip wlan_scan_sta geom > >=20 > >=20 > >=20 > > Best regards >=20 > thnx, I believe you problem already fixed at 07.09.08, > please cvsup and try yet... Note that Dmitry suggested to update to latest RELENG_7, not latest patchlevel of 7.0-RELEASE. --y8hmAOsilT9lKboI Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkjLuZYACgkQC3+MBN1Mb4ij0wCcCiMeUZJLGNEDLwAguNuQ9Kxi akUAoO8+ygITtwpXXqpBBhx7jrhy4hGK =+F0G -----END PGP SIGNATURE----- --y8hmAOsilT9lKboI-- From owner-freebsd-emulation@FreeBSD.ORG Sat Sep 13 20:55:26 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 7DEE11065678 for ; Sat, 13 Sep 2008 20:55:26 +0000 (UTC) (envelope-from jjuanino@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.187]) by mx1.freebsd.org (Postfix) with ESMTP id 0B0368FC1B for ; Sat, 13 Sep 2008 20:55:25 +0000 (UTC) (envelope-from jjuanino@gmail.com) Received: by nf-out-0910.google.com with SMTP id h3so792394nfh.33 for ; Sat, 13 Sep 2008 13:55:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:x-operating-system:user-agent; bh=nPOANlIjX8m9eRJsRcKjTGpx0HSLcIEkNhX2Ymqv24g=; b=oO+8NXFOPy6mXgtwlEQPGjaxTDjRmg1c2qAcg7LqLLZV2QbQaCJTONLSLCjwCiGWQI A7vKJUwQd0Z850bb5KknG6d46I5GL82hmzN0L7yihmpjsm+m1X+KPYpMsaNqi57GQIAW 5brxGl5YOo+mWgRxk0YVTbASz4OSWOnMXwuY8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:x-operating-system :user-agent; b=dBZgP6aUNamHVVggjs9O+1GRyTbbIonIWrP3FVb17i76USdVh5oY/WHbcoJa12jGBg bZk8kZKLfubjcPfHNDHzDdAKDNp60Sy3jkBckkr1eVYXhP9mHU/eqEwv2wz2YoCio8Dl +FvoDnal2OCHyqRlqR2n24Z6nmphc/tzySCbk= Received: by 10.86.87.5 with SMTP id k5mr4399617fgb.59.1221339324361; Sat, 13 Sep 2008 13:55:24 -0700 (PDT) Received: from sanabria ( [85.54.133.208]) by mx.google.com with ESMTPS id 12sm12548943fgg.0.2008.09.13.13.55.22 (version=SSLv3 cipher=RC4-MD5); Sat, 13 Sep 2008 13:55:23 -0700 (PDT) Date: Sat, 13 Sep 2008 22:55:17 +0200 From: Jose Garcia Juanino To: freebsd-emulation@freebsd.org Message-ID: <20080913205515.GA6158@sanabria> References: <20080912205202.GA83925@sanabria> <20080913070920.GA1440@dchagin.dialup.corbina.ru> <20080913084412.GA1263@sanabria> <20080913085108.GA2308@dchagin.dialup.corbina.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="opJtzjQTFsWo+cga" Content-Disposition: inline In-Reply-To: <20080913085108.GA2308@dchagin.dialup.corbina.ru> X-Operating-System: FreeBSD 7.0-RELEASE-p4 User-Agent: Mutt/1.5.18 (2008-05-17) Subject: Re: sqlplus segfaults when receiving INT signal 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, 13 Sep 2008 20:55:26 -0000 --opJtzjQTFsWo+cga Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable El s=E1bado 13 de septiembre a las 10:51:08 CEST, Chagin Dmitry escribi=F3: > On Sat, Sep 13, 2008 at 10:44:13AM +0200, Jose Garcia Juanino wrote: > >=20 > > Thank you for your response. > >=20 > > The output is: > >=20 > > # uname -vp > > FreeBSD 7.0-RELEASE-p4 #3: Thu Sep 4 08:54:56 CEST 2008 root@= :/usr/obj/src/sys/MK2008Jun06 i386 > >=20 > > [ .... ] > > >=20 > thnx, I believe you problem already fixed at 07.09.08, > please cvsup and try yet... I have done that now, but sadly, there is no difference with 7.0: $ uname -r 7.1-PRERELEASE $ /compat/linux/usr/lib/oracle/10.2.0.3/client/bin/sqlplus /nolog SQL*Plus: Release 10.2.0.3.0 - Production on Sat Sep 13 20:47:47 2008 Copyright (c) 1982, 2006, Oracle. All Rights Reserved. SQL> [hit CTRL+C] Segmentation fault Best regards --opJtzjQTFsWo+cga Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkjMKLMACgkQFOo0zaS9RnKCJQCgtgbFhoMCjeSaIjsBeLABx5Dy eJgAnRbkftuNYgYP2Gg0oeT7XR6r47FG =CmLu -----END PGP SIGNATURE----- --opJtzjQTFsWo+cga--