From owner-freebsd-current Sun Dec 21 16:56:04 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id QAA12071 for current-outgoing; Sun, 21 Dec 1997 16:56:04 -0800 (PST) (envelope-from owner-freebsd-current) Received: from dyson.iquest.net (dyson.iquest.net [198.70.144.127]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id QAA12043 for ; Sun, 21 Dec 1997 16:55:59 -0800 (PST) (envelope-from toor@dyson.iquest.net) Received: (from root@localhost) by dyson.iquest.net (8.8.8/8.8.8) id TAA02333; Sun, 21 Dec 1997 19:52:40 -0500 (EST) (envelope-from toor) Message-Id: <199712220052.TAA02333@dyson.iquest.net> Subject: Re: vfork (exec?) bug confirmation In-Reply-To: <19971222005543.CE52615@@> from Pierre Beyssac at "Dec 22, 97 00:55:43 am" To: pb@fasterix.freenix.org (Pierre Beyssac) Date: Sun, 21 Dec 1997 19:52:40 -0500 (EST) Cc: ache@nagual.pp.ru, current@FreeBSD.ORG From: "John S. Dyson" Reply-To: dyson@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Pierre Beyssac said: > ??????????????? writes: > > I can confirm that following script cause immediate kernel page fault > > even with very recent -current. > > >From what I understand, it looks more and more like a vfork() bug. > The bug in execve() may be explained by a weird stack left by > vfork() which causes arguments passed by value to fail. > Bruce Evans might have found the bug. He has a fix, and I have tried a slightly more efficient fix, and have committed it to -current. Please let me know as soon as reasonably possible if my fix works. If it doesn't, I'll look at it again. I think that the problem mostly manifested itself on non-PPro's. The patch follows my signature. Thanks for your persistence! -- John | Never try to teach a pig to sing, dyson@freebsd.org | it just makes you look stupid, jdyson@nc.com | and it irritates the pig. Index: pmap.c =================================================================== RCS file: /local/home/ncvs/src/sys/i386/i386/pmap.c,v retrieving revision 1.174 diff -C2 -r1.174 pmap.c *** pmap.c 1997/12/14 02:11:04 1.174 --- pmap.c 1997/12/22 00:51:00 *************** *** 40,44 **** * * from: @(#)pmap.c 7.7 (Berkeley) 5/12/91 ! * $Id: pmap.c,v 1.174 1997/12/14 02:11:04 dyson Exp $ */ --- 40,44 ---- * * from: @(#)pmap.c 7.7 (Berkeley) 5/12/91 ! * $Id: pmap.c,v 1.175 1997/12/22 00:36:48 dyson Exp $ */ *************** *** 926,935 **** for(i=0;ip_addr + i * PAGE_SIZE); vm_page_unwire(m); --- 926,933 ---- for(i=0;ip_addr + i * PAGE_SIZE); vm_page_unwire(m); *************** *** 937,942 **** } ! vm_object_deallocate(upobj); kmem_free(u_map, (vm_offset_t)p->p_addr, ctob(UPAGES)); } --- 935,944 ---- } ! #if defined(I386_CPU) ! if (cpu_class == CPUCLASS_386) ! invltlb(); ! #endif + vm_object_deallocate(upobj); kmem_free(u_map, (vm_offset_t)p->p_addr, ctob(UPAGES)); }