From owner-freebsd-emulation@FreeBSD.ORG Tue Sep 30 08:47:31 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 2184710656AC; Tue, 30 Sep 2008 08:47:31 +0000 (UTC) (envelope-from vova@sw.ru) Received: from relay.sw.ru (mailhub.sw.ru [195.214.232.25]) by mx1.freebsd.org (Postfix) with ESMTP id 5EC098FC3E; Tue, 30 Sep 2008 08:47:30 +0000 (UTC) (envelope-from vova@sw.ru) Received: from vbook.fbsd.ru ([10.30.1.111]) (authenticated bits=0) by relay.sw.ru (8.13.4/8.13.4) with ESMTP id m8U88xDU030595 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 30 Sep 2008 12:09:00 +0400 (MSD) Received: from vova by vbook.fbsd.ru with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1KkaHz-0006Qa-Ok; Tue, 30 Sep 2008 12:08:59 +0400 From: Vladimir Grebenschikov To: Chagin Dmitry In-Reply-To: <20080929200237.GA68300@dchagin.dialup.corbina.ru> References: <20080929200237.GA68300@dchagin.dialup.corbina.ru> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Tue, 30 Sep 2008 12:08:59 +0400 Message-Id: <1222762139.1675.16.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 FreeBSD GNOME Team Port Sender: Vladimir Grebenschikov Cc: freebsd-emulation@freebsd.org Subject: Re: firefox & flash9 patches 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, 30 Sep 2008 08:47:31 -0000 On Tue, 2008-09-30 at 00:02 +0400, Chagin Dmitry wrote: > Hi, > > please, test following patches (just -current). > with them firefox && flash9 forks for me, > I tested only on ia32@amd64 with 2.6.16 enabled, > firefox 2.0.0.16 and flash9 plugin. I've tried to check your patch - kernel builds ok, but nspluginwrapper drops core $ nspluginwrapper -l Segmentation fault (core dumped) $ and it kills gdb if I tried to run it under gdb $ gdb nspluginwrapper GNU gdb 6.1.1 [FreeBSD] ... (gdb) r -l Starting program: /usr/local/bin/nspluginwrapper -l (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...Assertion failed: ((mapbits & CHUNK_MAP_ALLOCATED) != 0), function arena_salloc, file /usr/src/lib/libc/stdlib/malloc.c, line 3555. Abort (core dumped) $ I am puzzled, how to use it ? Any help will be very appreciated. > If all is good, I will ask des@ and kib@ to review&commit them. thnx! > > diff --git a/src/sys/compat/linux/linux_misc.c b/src/sys/compat/linux/linux_misc.c > index 585c853..073bedb 100644 > --- a/src/sys/compat/linux/linux_misc.c > +++ b/src/sys/compat/linux/linux_misc.c > @@ -1831,9 +1831,9 @@ linux_sched_getaffinity(struct thread *td, > cga.level = CPU_LEVEL_WHICH; > cga.which = CPU_WHICH_PID; > cga.id = args->pid; > - cga.cpusetsize = sizeof(cpumask_t); > + cga.cpusetsize = sizeof(cpuset_t); > cga.mask = (cpuset_t *) args->user_mask_ptr; > - > + > if ((error = cpuset_getaffinity(td, &cga)) == 0) > td->td_retval[0] = sizeof(cpumask_t); > > > > diff --git a/src/sys/compat/linprocfs/linprocfs.c b/src/sys/compat/linprocfs/linprocfs.c > index 646d6b2..bbb0556 100644 > --- a/src/sys/compat/linprocfs/linprocfs.c > +++ b/src/sys/compat/linprocfs/linprocfs.c > @@ -873,14 +873,12 @@ linprocfs_doprocenviron(PFS_FILL_ARGS) > static int > linprocfs_doprocmaps(PFS_FILL_ARGS) > { > - char mebuffer[512]; > vm_map_t map = &p->p_vmspace->vm_map; > vm_map_entry_t entry, tmp_entry; > vm_object_t obj, tobj, lobj; > vm_offset_t saved_end; > vm_ooffset_t off = 0; > char *name = "", *freename = NULL; > - size_t len; > ino_t ino; > unsigned int last_timestamp; > int ref_count, shadow_count, flags; > @@ -898,13 +896,9 @@ linprocfs_doprocmaps(PFS_FILL_ARGS) > if (uio->uio_rw != UIO_READ) > return (EOPNOTSUPP); > > - if (uio->uio_offset != 0) > - return (0); > - > error = 0; > vm_map_lock_read(map); > - for (entry = map->header.next; > - ((uio->uio_resid > 0) && (entry != &map->header)); > + for (entry = map->header.next; entry != &map->header; > entry = entry->next) { > name = ""; > freename = NULL; > @@ -953,7 +947,7 @@ linprocfs_doprocmaps(PFS_FILL_ARGS) > * format: > * start, end, access, offset, major, minor, inode, name. > */ > - snprintf(mebuffer, sizeof mebuffer, > + error = sbuf_printf(sb, > "%08lx-%08lx %s%s%s%s %08lx %02x:%02x %lu%s%s\n", > (u_long)entry->start, (u_long)entry->end, > (entry->protection & VM_PROT_READ)?"r":"-", > @@ -969,18 +963,11 @@ linprocfs_doprocmaps(PFS_FILL_ARGS) > ); > if (freename) > free(freename, M_TEMP); > - len = strlen(mebuffer); > - if (len > uio->uio_resid) > - len = uio->uio_resid; /* > - * XXX We should probably return > - * EFBIG here, as in procfs. > - */ > last_timestamp = map->timestamp; > vm_map_unlock_read(map); > - error = uiomove(mebuffer, len, uio); > + if (error == -1) > + return (0); > vm_map_lock_read(map); > - if (error) > - break; > if (last_timestamp + 1 != map->timestamp) { > /* > * Look again for the entry because the map was > > > -- Vladimir B. Grebenschikov vova@fbsd.ru