From owner-freebsd-current@FreeBSD.ORG Fri Aug 25 08:48:08 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AB49916A4DA; Fri, 25 Aug 2006 08:48:08 +0000 (UTC) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.10.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 63AC443D58; Fri, 25 Aug 2006 08:48:02 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (localhost [127.0.0.1]) by eva.fit.vutbr.cz (envelope-from xdivac02@eva.fit.vutbr.cz) (8.13.7/8.13.7) with ESMTP id k7P8ltxl093729 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 25 Aug 2006 10:47:55 +0200 (CEST) Received: (from xdivac02@localhost) by eva.fit.vutbr.cz (8.13.7/8.13.3/Submit) id k7P8ltt1093728; Fri, 25 Aug 2006 10:47:55 +0200 (CEST) Date: Fri, 25 Aug 2006 10:47:55 +0200 From: Divacky Roman To: Intron is my alias on the Internet Message-ID: <20060825084755.GA93151@stud.fit.vutbr.cz> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2i X-Scanned-By: MIMEDefang 2.54 on 147.229.10.14 Cc: freebsd-emulation@freebsd.org, freebsd-current@freebsd.org Subject: Re: Linuxulator: Unbreak Mozilla, Firefox and RealPlayer X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Aug 2006 08:48:08 -0000 On Fri, Aug 25, 2006 at 11:12:10AM +0800, Intron is my alias on the Internet wrote: > Debugging is somewhat MUCH MORE DIFFICULT than rewriting. > > Here is the minimum patch that can only unbreak Mozilla 1.7.12 (GTK 1), > Firefox 1.0.7 and RealPlayer 10.0.7.785 (playing video) > (sysctl compat.linux.osrelease=2.6.16). > > It doesn't mean problems of clone(2) have been fixed. Actually, clone(2), > set_thread_area(2) and get_thread_area(2) are mis-interpreted. > > Adobe Reader 7.0.8 hasn't been completely unbroken yet. Problems around > it seem to be more complicated. > > My patch (against /sys/i386/linux/linux_machdep.c of CVS revision 1.53): > > http://ftp.intron.ac/tmp/linux_machdep.c.1.53.diff + p2->p_pptr = td->td_proc->p_pptr; I already did this but differently: if (args->flags & (CLONE_PARENT|CLONE_THREAD)) { struct linux_getppid_args gpa; struct proc *pp; (void) linux_getppid(td, &gpa); pp = pfind(td->td_retval[0]); if (pp == NULL) { printf("shit\n"); return 0; } PROC_LOCK(p2); p2->p_pptr = pp; PROC_UNLOCK(p2); PROC_UNLOCK(pp); } also, linux also sets pgrp with CLONE_THREAD. can you pls explain me the set_thread_area() changes? also.. dont forget to update both instances of setting up TLS (ie. in CLONE_SETTLS and in set_thread_area() syscall) I have some more fixes uncommited which might fix the acroread. thnx for the work! roman