From owner-freebsd-emulation@FreeBSD.ORG Sat May 31 07:18:10 2008 Return-Path: Delivered-To: emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D7B61065670 for ; Sat, 31 May 2008 07:18:10 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id EB9CF8FC13 for ; Sat, 31 May 2008 07:18:09 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A56892.dip.t-dialin.net [84.165.104.146]) by redbull.bpaserver.net (Postfix) with ESMTP id 416F72E075; Sat, 31 May 2008 09:18:04 +0200 (CEST) Received: from deskjail (unknown [192.168.1.109]) by outgoing.leidinger.net (Postfix) with ESMTP id DD38310761F; Sat, 31 May 2008 09:18:00 +0200 (CEST) Date: Sat, 31 May 2008 09:17:59 +0200 From: Alexander Leidinger To: Ed Schouten Message-ID: <20080531091759.1acaa6c4@deskjail> In-Reply-To: <20080530094911.GY64397@hoeg.nl> References: <20080529214829.GA79810@freebsd.org> <20080530050453.GX64397@hoeg.nl> <20080530114038.92102g7uj7m3haqs@webmail.leidinger.net> <20080530094911.GY64397@hoeg.nl> X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.8; i686-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, ORDB-RBL, SpamAssassin (not cached, score=-14.4, required 6, BAYES_00 -15.00, NO_RDNS 0.50, RDNS_DYNAMIC 0.10) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No Cc: emulation@freebsd.org Subject: Re: [RFC]: switch to 2.6 linux emulation on default 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, 31 May 2008 07:18:10 -0000 Quoting Ed Schouten (Fri, 30 May 2008 11:49:11 +0200): > * Alexander Leidinger wrote: > > Quoting Ed Schouten (from Fri, 30 May 2008 07:04:53 +0200): > > > >> Hello Roman, > >> > >> * Roman Divacky wrote: > >>> FreeBSD 7.0 contains support for running emulation of Linux 2.6 > >>> (= NPTL, futexes, TLS basically) and I'd like to switch this > >>> on default in HEAD to see if we can ship 8.0 with this emulation > >>> running on default. > >> > >> Speaking about Linux emulation: a couple of days ago I added Linux > >> support to my TTY code in the mpsafetty branch. This means that it can > >> handle the things done in posix_openpt() and ptsname(). > >> > >> Because Linux wants the minor number to be within a certain region, the > >> PTY driver creates a linux_device_handler for each device. ptsname() > > > > There's already something like a device handler or wrapper or whatever > > (I hadn't a close look at this) for some devices. Does your work use > > this existing infrastructure or is this something else? > > It just calls linux_device_register_handler() to create the mapping. I'm > not entirely happy with this yet, because this means our pts(4) driver > needs to be recompiled to work with Linux binary compatibility. We don't have a function in the kernel linker available which you can use to lookup the function, and if you get a good pointer back, call it? > In CVS, there is already some code in place to make the mapping work for > /dev/pts/XXX (see linux_stats.c), but it always returns the same device > number for all pts devices. I should probably just change that code to > parse the device number and base the major/minor number on that. > > >> seems to do an fstat() on the controller descriptor, followed by looping > >> on the files in /dev and /dev/pts, to find the matching device number. > >> > >> Unfortunately sendmsg() seems broken on amd64 with COMPAT_LINUX32. This > > > > The LTP test (http://wiki.freebsd.org/linux-kernel/ltp) for sendmsg > > tells it is broken on all architectures. Did you test on a i386 system > > too? > > On i386, it works good enough to at least make sshd work. On amd64 it > returns EINVAL, using the same Linux binaries. Thanks for the data point. Bye, Alexander. -- YOU!! Give me the CUTEST, PINKEST, most charming little VICTORIAN DOLLHOUSE you can find!! An make it SNAPPY!! http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137