Date: Sun, 21 Dec 1997 19:52:40 -0500 (EST) From: "John S. Dyson" <dyson@FreeBSD.ORG> To: pb@fasterix.freenix.org (Pierre Beyssac) Cc: ache@nagual.pp.ru, current@FreeBSD.ORG Subject: Re: vfork (exec?) bug confirmation Message-ID: <199712220052.TAA02333@dyson.iquest.net> In-Reply-To: <19971222005543.CE52615@@> from Pierre Beyssac at "Dec 22, 97 00:55:43 am"
next in thread | previous in thread | raw e-mail | index | archive | help
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;i<UPAGES;i++) {
- unsigned oldpte;
if ((m = vm_page_lookup(upobj, i)) == NULL)
panic("pmap_dispose_proc: upage already missing???");
- oldpte = *(ptek + i);
*(ptek + i) = 0;
! if (oldpte & PG_G)
invlpg((vm_offset_t) p->p_addr + i * PAGE_SIZE);
vm_page_unwire(m);
--- 926,933 ----
for(i=0;i<UPAGES;i++) {
if ((m = vm_page_lookup(upobj, i)) == NULL)
panic("pmap_dispose_proc: upage already missing???");
*(ptek + i) = 0;
! if (cpu_class != CPUCLASS_386)
invlpg((vm_offset_t) p->p_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));
}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199712220052.TAA02333>
