From owner-p4-projects Sat Jul 13 14:22: 5 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 846CD37B401; Sat, 13 Jul 2002 14:21:00 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 130FA37B400 for ; Sat, 13 Jul 2002 14:21:00 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 42B0B43E42 for ; Sat, 13 Jul 2002 14:20:59 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from freefall.freebsd.org (perforce@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g6DLKxJU054426 for ; Sat, 13 Jul 2002 14:20:59 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g6DLKwO1054423 for perforce@freebsd.org; Sat, 13 Jul 2002 14:20:58 -0700 (PDT) Date: Sat, 13 Jul 2002 14:20:58 -0700 (PDT) Message-Id: <200207132120.g6DLKwO1054423@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm Subject: PERFORCE change 14193 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://people.freebsd.org/~peter/p4db/chv.cgi?CH=14193 Change 14193 by peter@peter_daintree on 2002/07/13 14:20:21 IFC @14192 Affected files ... .. //depot/projects/pmap/sys/alpha/alpha/pmap.c#6 integrate .. //depot/projects/pmap/sys/alpha/alpha/trap.c#7 integrate .. //depot/projects/pmap/sys/alpha/conf/GENERIC#4 integrate .. //depot/projects/pmap/sys/conf/Makefile.alpha#3 integrate .. //depot/projects/pmap/sys/conf/Makefile.i386#4 integrate .. //depot/projects/pmap/sys/conf/Makefile.ia64#4 integrate .. //depot/projects/pmap/sys/conf/Makefile.pc98#3 integrate .. //depot/projects/pmap/sys/conf/Makefile.powerpc#4 integrate .. //depot/projects/pmap/sys/conf/Makefile.sparc64#4 integrate .. //depot/projects/pmap/sys/conf/Makefile.x86_64#2 integrate .. //depot/projects/pmap/sys/conf/NOTES#4 integrate .. //depot/projects/pmap/sys/conf/kern.pre.mk#9 integrate .. //depot/projects/pmap/sys/dev/usb/ucom.c#3 integrate .. //depot/projects/pmap/sys/dev/usb/uplcom.c#3 integrate .. //depot/projects/pmap/sys/i386/conf/NOTES#7 integrate .. //depot/projects/pmap/sys/i386/i386/pmap.c#27 integrate .. //depot/projects/pmap/sys/i386/i386/trap.c#7 integrate .. //depot/projects/pmap/sys/ia64/ia64/trap.c#6 integrate .. //depot/projects/pmap/sys/kern/kern_exec.c#8 integrate .. //depot/projects/pmap/sys/kern/sys_pipe.c#6 integrate .. //depot/projects/pmap/sys/kern/syscalls.master#6 integrate .. //depot/projects/pmap/sys/kern/uipc_cow.c#2 integrate .. //depot/projects/pmap/sys/kern/uipc_syscalls.c#8 integrate .. //depot/projects/pmap/sys/kern/vfs_bio.c#9 integrate .. //depot/projects/pmap/sys/kern/vfs_syscalls.c#9 integrate .. //depot/projects/pmap/sys/netinet/ip_output.c#5 integrate .. //depot/projects/pmap/sys/pc98/conf/GENERIC#4 integrate .. //depot/projects/pmap/sys/pci/agp.c#2 integrate .. //depot/projects/pmap/sys/pci/agp_i810.c#2 integrate .. //depot/projects/pmap/sys/powerpc/powerpc/trap.c#6 integrate .. //depot/projects/pmap/sys/sparc64/include/ver.h#3 integrate .. //depot/projects/pmap/sys/sparc64/include/vmparam.h#3 integrate .. //depot/projects/pmap/sys/sparc64/sparc64/identcpu.c#5 integrate .. //depot/projects/pmap/sys/sparc64/sparc64/pmap.c#10 integrate .. //depot/projects/pmap/sys/sparc64/sparc64/trap.c#8 integrate .. //depot/projects/pmap/sys/sys/cdefs.h#4 integrate .. //depot/projects/pmap/sys/sys/ucred.h#5 integrate .. //depot/projects/pmap/sys/vm/vm_fault.c#4 integrate .. //depot/projects/pmap/sys/vm/vm_glue.c#10 integrate .. //depot/projects/pmap/sys/vm/vm_kern.c#4 integrate .. //depot/projects/pmap/sys/vm/vm_map.c#6 integrate .. //depot/projects/pmap/sys/vm/vm_page.c#6 integrate .. //depot/projects/pmap/sys/vm/vm_page.h#5 integrate Differences ... ==== //depot/projects/pmap/sys/alpha/alpha/pmap.c#6 (text+ko) ==== @@ -43,7 +43,7 @@ * from: @(#)pmap.c 7.7 (Berkeley) 5/12/91 * from: i386 Id: pmap.c,v 1.193 1998/04/19 15:22:48 bde Exp * with some ideas from NetBSD's alpha pmap - * $FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.98 2002/07/09 19:20:16 obrien Exp $ + * $FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.99 2002/07/13 20:55:21 alc Exp $ */ /* @@ -997,8 +997,10 @@ vm_page_busy(m); ptek[i] = 0; pmap_invalidate_page(kernel_pmap, ks + i * PAGE_SIZE); + vm_page_lock_queues(); vm_page_unwire(m, 0); vm_page_free(m); + vm_page_unlock_queues(); } /* @@ -1036,8 +1038,10 @@ m = vm_page_lookup(ksobj, i); if (m == NULL) panic("pmap_swapout_thread: kstack already missing?"); + vm_page_lock_queues(); vm_page_dirty(m); vm_page_unwire(m, 0); + vm_page_unlock_queues(); pmap_kremove(ks + i * PAGE_SIZE); } } ==== //depot/projects/pmap/sys/alpha/alpha/trap.c#7 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/alpha/alpha/trap.c,v 1.97 2002/06/29 23:58:50 julian Exp $ */ +/* $FreeBSD: src/sys/alpha/alpha/trap.c,v 1.98 2002/07/13 04:36:30 mini Exp $ */ /* $NetBSD: trap.c,v 1.31 1998/03/26 02:21:46 thorpej Exp $ */ /* @@ -596,6 +596,9 @@ framep->tf_regs[FRAME_SP] = alpha_pal_rdusp(); userret(td, framep, sticks); mtx_assert(&Giant, MA_NOTOWNED); +#ifdef DIAGNOSTIC + cred_free_thread(td); +#endif } return; @@ -799,6 +802,9 @@ */ STOPEVENT(p, S_SCX, code); +#ifdef DIAGNOSTIC + cred_free_thread(td); +#endif #ifdef WITNESS if (witness_list(td)) { panic("system call %s returning with mutex(s) held\n", ==== //depot/projects/pmap/sys/alpha/conf/GENERIC#4 (text+ko) ==== @@ -19,7 +19,7 @@ # # For hardware specific information check HARDWARE.TXT # -# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.141 2002/07/09 19:20:16 obrien Exp $ +# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.142 2002/07/13 16:43:53 alfred Exp $ machine alpha cpu EV4 @@ -60,6 +60,7 @@ options PROCFS #Process filesystem (requires PSEUDOFS) options PSEUDOFS #Pseudo-filesystem framework options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!] +options COMPAT_FREEBSD4 #Compatible with FreeBSD4 options SCSI_DELAY=15000 #Delay (in ms) before probing SCSI options KTRACE #ktrace(1) syscall trace support options SYSVSHM #SYSV-style shared memory ==== //depot/projects/pmap/sys/conf/Makefile.alpha#3 (text+ko) ==== @@ -1,7 +1,7 @@ # Makefile.alpha -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.alpha 7.1 5/10/91 -# $FreeBSD: src/sys/conf/Makefile.alpha,v 1.123 2002/02/20 23:35:49 peter Exp $ +# $FreeBSD: src/sys/conf/Makefile.alpha,v 1.124 2002/07/13 19:36:13 bde Exp $ # # Makefile for FreeBSD # @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500010 +%VERSREQ= 500011 .if !defined(S) .if exists(./@/.) ==== //depot/projects/pmap/sys/conf/Makefile.i386#4 (text+ko) ==== @@ -1,7 +1,7 @@ # Makefile.i386 -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $FreeBSD: src/sys/conf/Makefile.i386,v 1.255 2002/02/20 23:35:49 peter Exp $ +# $FreeBSD: src/sys/conf/Makefile.i386,v 1.256 2002/07/13 19:36:13 bde Exp $ # # Makefile for FreeBSD # @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500010 +%VERSREQ= 500011 STD8X16FONT?= iso ==== //depot/projects/pmap/sys/conf/Makefile.ia64#4 (text+ko) ==== @@ -1,7 +1,7 @@ # Makefile.ia64 -- with config changes. # Copyright 1990 W. Jolitz # from: src/sys/conf/Makefile.alpha,v 1.76 -# $FreeBSD: src/sys/conf/Makefile.ia64,v 1.50 2002/05/19 03:41:48 marcel Exp $ +# $FreeBSD: src/sys/conf/Makefile.ia64,v 1.51 2002/07/13 19:36:13 bde Exp $ # # Makefile for FreeBSD # @@ -19,7 +19,7 @@ GCC3= you bet # Which version of config(8) is required. -%VERSREQ= 500010 +%VERSREQ= 500011 STD8X16FONT?= iso ==== //depot/projects/pmap/sys/conf/Makefile.pc98#3 (text+ko) ==== @@ -3,7 +3,7 @@ # Makefile.i386 -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $FreeBSD: src/sys/conf/Makefile.pc98,v 1.156 2002/02/20 23:35:51 peter Exp $ +# $FreeBSD: src/sys/conf/Makefile.pc98,v 1.157 2002/07/13 19:36:13 bde Exp $ # # Makefile for FreeBSD # @@ -19,7 +19,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500010 +%VERSREQ= 500011 .if !defined(S) .if exists(./@/.) ==== //depot/projects/pmap/sys/conf/Makefile.powerpc#4 (text+ko) ==== @@ -1,7 +1,7 @@ # Makefile.powerpc -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $FreeBSD: src/sys/conf/Makefile.powerpc,v 1.261 2002/03/24 17:45:46 obrien Exp $ +# $FreeBSD: src/sys/conf/Makefile.powerpc,v 1.262 2002/07/13 19:36:13 bde Exp $ # # Makefile for FreeBSD # @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500010 +%VERSREQ= 500011 # Temporary stuff while we're still embryonic NO_MODULES?= yes ==== //depot/projects/pmap/sys/conf/Makefile.sparc64#4 (text+ko) ==== @@ -1,7 +1,7 @@ # Makefile.sparc64 -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $FreeBSD: src/sys/conf/Makefile.sparc64,v 1.19 2002/05/26 15:55:28 jake Exp $ +# $FreeBSD: src/sys/conf/Makefile.sparc64,v 1.20 2002/07/13 19:36:14 bde Exp $ # # Makefile for FreeBSD # @@ -21,7 +21,7 @@ -ansi # Which version of config(8) is required. -%VERSREQ= 500010 +%VERSREQ= 500011 STD8X16FONT?= iso ==== //depot/projects/pmap/sys/conf/Makefile.x86_64#2 (text+ko) ==== @@ -2,7 +2,7 @@ # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 # from FreeBSD: src/sys/conf/Makefile.i386,v 1.255 2002/02/20 23:35:49 -# $FreeBSD: src/sys/conf/Makefile.x86_64,v 1.1 2002/06/30 08:05:21 obrien Exp $ +# $FreeBSD: src/sys/conf/Makefile.x86_64,v 1.2 2002/07/13 19:36:14 bde Exp $ # # Makefile for FreeBSD # @@ -18,7 +18,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500010 +%VERSREQ= 500011 STD8X16FONT?= iso ==== //depot/projects/pmap/sys/conf/NOTES#4 (text+ko) ==== @@ -14,7 +14,7 @@ # This file contains machine independent kernel configuration notes. For # machine dependent notes, look in /sys//conf/NOTES. # -# $FreeBSD: src/sys/conf/NOTES,v 1.1045 2002/07/11 20:43:37 bde Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1046 2002/07/13 16:43:53 alfred Exp $ # # @@ -172,6 +172,9 @@ # options COMPAT_43 +# Enable FreeBSD4 compatibility syscalls +options COMPAT_FREEBSD4 + # # These three options provide support for System V Interface # Definition-style interprocess communication, in the form of shared ==== //depot/projects/pmap/sys/conf/kern.pre.mk#9 (text+ko) ==== @@ -3,7 +3,7 @@ # Unified Makefile for building kenrels. This includes all the definitions # that need to be included before %BEFORE_DEPEND # -# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.13 2002/06/16 10:42:05 mux Exp $ +# $FreeBSD: src/sys/conf/kern.pre.mk,v 1.14 2002/07/13 19:36:14 bde Exp $ # # Can be overridden by makeoptions or /etc/make.conf @@ -49,6 +49,11 @@ # then it might break building of utilities. CFLAGS+= ${FMT} +.if defined(PROFLEVEL) && ${PROFLEVEL} >= 1 +IDENT= -DGPROF +PROF= -pg +.endif + DEFINED_PROF= ${PROF} .if defined(PROF) CFLAGS+= -falign-functions=16 ==== //depot/projects/pmap/sys/dev/usb/ucom.c#3 (text+ko) ==== @@ -1,5 +1,5 @@ /* $NetBSD: ucom.c,v 1.39 2001/08/16 22:31:24 augustss Exp $ */ -/* $FreeBSD: src/sys/dev/usb/ucom.c,v 1.19 2002/07/10 01:42:25 joe Exp $ */ +/* $FreeBSD: src/sys/dev/usb/ucom.c,v 1.20 2002/07/13 10:41:35 ume Exp $ */ /*- * Copyright (c) 2001-2002, Shunsuke Akiyama . @@ -174,6 +174,7 @@ }; DECLARE_MODULE(ucom, ucom_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE); +MODULE_DEPEND(uplcom, usb, 1, 1, 1); MODULE_VERSION(ucom, UCOM_MODVER); int ==== //depot/projects/pmap/sys/dev/usb/uplcom.c#3 (text+ko) ==== @@ -1,5 +1,5 @@ /* $NetBSD: uplcom.c,v 1.20 2001/07/31 12:33:11 ichiro Exp $ */ -/* $FreeBSD: src/sys/dev/usb/uplcom.c,v 1.4 2002/07/10 01:42:25 joe Exp $ */ +/* $FreeBSD: src/sys/dev/usb/uplcom.c,v 1.5 2002/07/13 10:41:35 ume Exp $ */ /*- * Copyright (c) 2001-2002, Shunsuke Akiyama . @@ -228,6 +228,7 @@ }; DRIVER_MODULE(uplcom, uhub, uplcom_driver, ucom_devclass, usbd_driver_load, 0); +MODULE_DEPEND(uplcom, usb, 1, 1, 1); MODULE_DEPEND(uplcom, ucom, UCOM_MINVER, UCOM_PREFVER, UCOM_MAXVER); MODULE_VERSION(uplcom, UPLCOM_MODVER); ==== //depot/projects/pmap/sys/i386/conf/NOTES#7 (text+ko) ==== @@ -4,7 +4,7 @@ # This file contains machine dependent kernel configuration notes. For # machine independent notes, look in /sys/conf/NOTES. # -# $FreeBSD: src/sys/i386/conf/NOTES,v 1.1021 2002/07/12 06:38:34 alfred Exp $ +# $FreeBSD: src/sys/i386/conf/NOTES,v 1.1022 2002/07/13 16:43:53 alfred Exp $ # # @@ -874,9 +874,6 @@ # and PSEUDOFS) options LINPROCFS -# Enable FreeBSD4 compatibility syscalls -options COMPAT_FREEBSD4 - # # SysVR4 ABI emulation # ==== //depot/projects/pmap/sys/i386/i386/pmap.c#27 (text+ko) ==== @@ -39,7 +39,7 @@ * SUCH DAMAGE. * * from: @(#)pmap.c 7.7 (Berkeley) 5/12/91 - * $FreeBSD: src/sys/i386/i386/pmap.c,v 1.338 2002/07/12 20:17:06 dillon Exp $ + * $FreeBSD: src/sys/i386/i386/pmap.c,v 1.342 2002/07/13 21:03:08 peter Exp $ */ /* @@ -740,7 +740,7 @@ /* otherwise, we are alternate address space */ if (frame != (APTDpde & PG_FRAME)) { APTDpde = (pd_entry_t) (frame | PG_RW | PG_V); - invltlb(); + pmap_invalidate_all(kernel_pmap); /* XXX Bandaid */ } return APTmap; } @@ -1002,9 +1002,11 @@ m = vm_page_lookup(ksobj, i); if (m == NULL) panic("pmap_dispose_thread: kstack already missing?"); + vm_page_lock_queues(); vm_page_busy(m); vm_page_unwire(m, 0); vm_page_free(m); + vm_page_unlock_queues(); } /* * Free the space that this stack was mapped to in the kernel @@ -1037,8 +1039,10 @@ m = vm_page_lookup(ksobj, i); if (m == NULL) panic("pmap_swapout_thread: kstack already missing?"); + vm_page_lock_queues(); vm_page_dirty(m); vm_page_unwire(m, 0); + vm_page_unlock_queues(); } } @@ -1385,7 +1389,7 @@ if (ptepa & PG_PS) { pmap->pm_pdir[ptepindex] = 0; ptepa = 0; - invltlb(); + pmap_invalidate_all(kernel_pmap); } /* @@ -2348,7 +2352,7 @@ ptepindex += 1; } vm_page_flag_set(p, PG_MAPPED); - invltlb(); + pmap_invalidate_all(kernel_pmap); return; } @@ -2634,7 +2638,7 @@ */ if (dst_frame != (APTDpde & PG_FRAME)) { APTDpde = dst_frame | PG_RW | PG_V; - invltlb(); + pmap_invalidate_all(kernel_pmap); /* XXX Bandaid */ } src_pte = vtopte(addr); dst_pte = avtopte(addr); @@ -2727,10 +2731,14 @@ if (*CMAP2) panic("pmap_zero_page: CMAP2 busy"); *CMAP2 = PG_V | PG_RW | phys | PG_A | PG_M; +#ifdef I386_CPU + invltlb(); +#else #ifdef SMP curthread->td_switchin = pmap_zpi_switchin2; #endif invlpg((u_int)CADDR2); +#endif #if defined(I686_CPU) if (cpu_class == CPUCLASS_686) i686_pagezero(CADDR2); @@ -2765,10 +2773,14 @@ if (*CMAP2) panic("pmap_zero_page: CMAP2 busy"); *CMAP2 = PG_V | PG_RW | phys | PG_A | PG_M; +#ifdef I386_CPU + invltlb(); +#else #ifdef SMP curthread->td_switchin = pmap_zpi_switchin2; #endif invlpg((u_int)CADDR2); +#endif #if defined(I686_CPU) if (cpu_class == CPUCLASS_686 && off == 0 && size == PAGE_SIZE) i686_pagezero(CADDR2); @@ -2803,10 +2815,14 @@ if (*CMAP3) panic("pmap_zero_page: CMAP3 busy"); *CMAP3 = PG_V | PG_RW | phys | PG_A | PG_M; +#ifdef I386_CPU + invltlb(); +#else #ifdef SMP curthread->td_switchin = pmap_zpi_switchin3; #endif invlpg((u_int)CADDR3); +#endif #if defined(I686_CPU) if (cpu_class == CPUCLASS_686) i686_pagezero(CADDR3); @@ -2845,7 +2861,6 @@ invlpg((u_int)CADDR2); #endif bcopy(CADDR1, CADDR2, PAGE_SIZE); - #ifdef SMP curthread->td_switchin = NULL; #endif ==== //depot/projects/pmap/sys/i386/i386/trap.c#7 (text+ko) ==== @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 - * $FreeBSD: src/sys/i386/i386/trap.c,v 1.229 2002/06/29 23:58:50 julian Exp $ + * $FreeBSD: src/sys/i386/i386/trap.c,v 1.230 2002/07/13 04:36:34 mini Exp $ */ /* @@ -295,7 +295,7 @@ #ifdef DEV_NPX ucode = npxtrap(); if (ucode == -1) - goto out; + goto userout; #else ucode = code; #endif @@ -345,7 +345,7 @@ } #endif if (i == -1) - goto out; + goto userout; if (i == 0) goto user; @@ -370,7 +370,7 @@ lastalert = time_second; } mtx_unlock(&Giant); - goto out; + goto userout; #else /* !POWERFAIL_NMI */ /* machine/parity/power fail/"kitchen sink" faults */ /* XXX Giant */ @@ -385,7 +385,7 @@ kdb_trap (type, 0, &frame); } #endif /* DDB */ - goto out; + goto userout; } else if (panic_on_nmi) panic("NMI indicates hardware failure"); break; @@ -406,7 +406,7 @@ #ifdef DEV_NPX /* transparent fault (due to context switch "late") */ if (npxdna()) - goto out; + goto userout; #endif if (!pmath_emulate) { i = SIGFPE; @@ -418,7 +418,7 @@ mtx_unlock(&Giant); if (i == 0) { if (!(frame.tf_eflags & PSL_T)) - goto out; + goto userout; frame.tf_eflags &= ~PSL_T; i = SIGTRAP; } @@ -662,6 +662,10 @@ user: userret(td, &frame, sticks); mtx_assert(&Giant, MA_NOTOWNED); +userout: +#ifdef DIAGNOSTIC + cred_free_thread(td); +#endif out: return; } @@ -1106,6 +1110,10 @@ */ STOPEVENT(p, S_SCX, code); +#ifdef DIAGNOSTIC + cred_free_thread(td); +#endif + #ifdef WITNESS if (witness_list(td)) { panic("system call %s returning with mutex(s) held\n", ==== //depot/projects/pmap/sys/ia64/ia64/trap.c#6 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/ia64/ia64/trap.c,v 1.61 2002/06/29 23:58:50 julian Exp $ */ +/* $FreeBSD: src/sys/ia64/ia64/trap.c,v 1.62 2002/07/13 04:36:45 mini Exp $ */ /* From: src/sys/alpha/alpha/trap.c,v 1.33 */ /* $NetBSD: trap.c,v 1.31 1998/03/26 02:21:46 thorpej Exp $ */ @@ -746,6 +746,9 @@ if (user) { userret(td, framep, sticks); mtx_assert(&Giant, MA_NOTOWNED); +#ifdef DIAGNOSTIC + cred_free_thread(td); +#endif } return; @@ -915,6 +918,9 @@ */ STOPEVENT(p, S_SCX, code); +#ifdef DIAGNOSTIC + cred_free_thread(td); +#endif #ifdef WITNESS if (witness_list(td)) { panic("system call %s returning with mutex(s) held\n", @@ -1089,6 +1095,10 @@ */ STOPEVENT(p, S_SCX, code); +#ifdef DIAGNOSTIC + cred_free_thread(td); +#endif + #ifdef WITNESS if (witness_list(td)) { panic("system call %s returning with mutex(s) held\n", ==== //depot/projects/pmap/sys/kern/kern_exec.c#8 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/kern/kern_exec.c,v 1.173 2002/07/11 18:48:05 alc Exp $ + * $FreeBSD: src/sys/kern/kern_exec.c,v 1.174 2002/07/13 03:13:15 jhb Exp $ */ #include "opt_ktrace.h" @@ -396,10 +396,8 @@ #endif /* Make sure file descriptors 0..2 are in use. */ error = fdcheckstd(td); - if (error != 0) { - oldcred = NULL; + if (error != 0) goto done1; - } /* * Set the new credentials. */ ==== //depot/projects/pmap/sys/kern/sys_pipe.c#6 (text+ko) ==== @@ -16,7 +16,7 @@ * 4. Modifications may be freely made to this file if the above conditions * are met. * - * $FreeBSD: src/sys/kern/sys_pipe.c,v 1.108 2002/06/29 01:50:25 alfred Exp $ + * $FreeBSD: src/sys/kern/sys_pipe.c,v 1.109 2002/07/13 04:09:45 alc Exp $ */ /* @@ -616,18 +616,27 @@ for (i = 0; addr < endaddr; addr += PAGE_SIZE, i++) { vm_page_t m; + /* + * vm_fault_quick() can sleep. Consequently, + * vm_page_lock_queue() and vm_page_unlock_queue() + * should not be performed outside of this loop. + */ if (vm_fault_quick((caddr_t)addr, VM_PROT_READ) < 0 || (paddr = pmap_extract(vmspace_pmap(curproc->p_vmspace), addr)) == 0) { int j; + vm_page_lock_queues(); for (j = 0; j < i; j++) vm_page_unwire(wpipe->pipe_map.ms[j], 1); + vm_page_unlock_queues(); return (EFAULT); } m = PHYS_TO_VM_PAGE(paddr); + vm_page_lock_queues(); vm_page_wire(m); + vm_page_unlock_queues(); wpipe->pipe_map.ms[i] = m; } @@ -690,8 +699,10 @@ amountpipekva -= wpipe->pipe_buffer.size + PAGE_SIZE; } } + vm_page_lock_queues(); for (i = 0; i < wpipe->pipe_map.npages; i++) vm_page_unwire(wpipe->pipe_map.ms[i], 1); + vm_page_unlock_queues(); wpipe->pipe_map.npages = 0; } ==== //depot/projects/pmap/sys/kern/syscalls.master#6 (text+ko) ==== @@ -1,4 +1,4 @@ - $FreeBSD: src/sys/kern/syscalls.master,v 1.115 2002/07/12 06:51:57 alfred Exp $ + $FreeBSD: src/sys/kern/syscalls.master,v 1.116 2002/07/13 17:11:17 alfred Exp $ ; from: @(#)syscalls.master 8.2 (Berkeley) 1/13/94 ; ; System call name/number master file. @@ -160,7 +160,6 @@ 92 MSTD POSIX { int fcntl(int fd, int cmd, long arg); } ; XXX should be { int fcntl(int fd, int cmd, ...); } ; but we're not ready for varargs. -; XXX man page says `int arg' too. 93 MSTD BSD { int select(int nd, fd_set *in, fd_set *ou, \ fd_set *ex, struct timeval *tv); } 94 UNIMPL BSD setdopt ==== //depot/projects/pmap/sys/kern/uipc_cow.c#2 (text+ko) ==== @@ -29,7 +29,7 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/kern/uipc_cow.c,v 1.3 2002/07/06 02:44:15 gallatin Exp $ + * $FreeBSD: src/sys/kern/uipc_cow.c,v 1.4 2002/07/13 04:37:22 alc Exp $ */ /* * This is a set of routines for enabling and disabling copy on write @@ -148,7 +148,9 @@ /* * wire the page for I/O */ + vm_page_lock_queues(); vm_page_wire(pp); + vm_page_unlock_queues(); /* * prevent the process from exiting on us. ==== //depot/projects/pmap/sys/kern/uipc_syscalls.c#8 (text+ko) ==== @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)uipc_syscalls.c 8.4 (Berkeley) 2/21/94 - * $FreeBSD: src/sys/kern/uipc_syscalls.c,v 1.117 2002/07/12 06:51:57 alfred Exp $ + * $FreeBSD: src/sys/kern/uipc_syscalls.c,v 1.118 2002/07/13 03:10:55 alc Exp $ */ #include "opt_compat.h" @@ -1605,6 +1605,7 @@ sf = dtosf(addr); pmap_qremove((vm_offset_t)addr, 1); m = sf->m; + vm_page_lock_queues(); vm_page_unwire(m, 0); /* * Check for the object going away on us. This can @@ -1613,6 +1614,7 @@ */ if (m->wire_count == 0 && m->object == NULL) vm_page_free(m); + vm_page_unlock_queues(); sf->m = NULL; mtx_lock(&sf_freelist.sf_lock); SLIST_INSERT_HEAD(&sf_freelist.sf_head, sf, free_list); @@ -1795,7 +1797,9 @@ * us. */ + vm_page_lock_queues(); vm_page_wire(pg); + vm_page_unlock_queues(); /* * If page is not valid for what we need, initiate I/O @@ -1823,6 +1827,7 @@ vm_page_flag_clear(pg, PG_ZERO); vm_page_io_finish(pg); if (error) { + vm_page_lock_queues(); vm_page_unwire(pg, 0); /* * See if anyone else might know about this page. @@ -1834,6 +1839,7 @@ vm_page_busy(pg); vm_page_free(pg); } + vm_page_unlock_queues(); sbunlock(&so->so_snd); goto done; } @@ -1845,9 +1851,11 @@ * but this wait can be interrupted. */ if ((sf = sf_buf_alloc()) == NULL) { + vm_page_lock_queues(); vm_page_unwire(pg, 0); if (pg->wire_count == 0 && pg->object == NULL) vm_page_free(pg); + vm_page_unlock_queues(); sbunlock(&so->so_snd); error = EINTR; goto done; ==== //depot/projects/pmap/sys/kern/vfs_bio.c#9 (text+ko) ==== @@ -11,7 +11,7 @@ * 2. Absolutely no warranty of function or purpose is made by the author * John S. Dyson. * - * $FreeBSD: src/sys/kern/vfs_bio.c,v 1.319 2002/07/10 17:02:28 dillon Exp $ + * $FreeBSD: src/sys/kern/vfs_bio.c,v 1.320 2002/07/13 20:13:34 alc Exp $ */ /* @@ -1473,7 +1473,7 @@ vm_page_t m; GIANT_REQUIRED; - + vm_page_lock_queues(); for (i = 0; i < bp->b_npages; i++) { m = bp->b_pages[i]; bp->b_pages[i] = NULL; @@ -1509,6 +1509,7 @@ } } } + vm_page_unlock_queues(); pmap_qremove(trunc_page((vm_offset_t) bp->b_data), bp->b_npages); if (bp->b_bufsize) { @@ -2652,7 +2653,9 @@ ; bp->b_pages[i] = NULL; + vm_page_lock_queues(); vm_page_unwire(m, 0); + vm_page_unlock_queues(); } pmap_qremove((vm_offset_t) trunc_page((vm_offset_t)bp->b_data) + (desiredpages << PAGE_SHIFT), (bp->b_npages - desiredpages)); @@ -3386,9 +3389,11 @@ } bp->b_pages[index] = NULL; pmap_qremove(pg, 1); + vm_page_lock_queues(); vm_page_busy(p); vm_page_unwire(p, 0); vm_page_free(p); + vm_page_unlock_queues(); } } bp->b_npages = newnpages; ==== //depot/projects/pmap/sys/kern/vfs_syscalls.c#9 (text+ko) ==== @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94 - * $FreeBSD: src/sys/kern/vfs_syscalls.c,v 1.267 2002/07/02 17:09:22 mux Exp $ + * $FreeBSD: src/sys/kern/vfs_syscalls.c,v 1.268 2002/07/13 04:07:12 jhb Exp $ */ /* For 4.3 integer FS ID compatibility */ @@ -450,20 +450,17 @@ struct file *fp; int fd; - FILEDESC_LOCK(fdp); + FILEDESC_LOCK_ASSERT(fdp, MA_OWNED); for (fd = 0; fd < fdp->fd_nfiles ; fd++) { fp = fget_locked(fdp, fd); if (fp == NULL) continue; if (fp->f_type == DTYPE_VNODE) { vp = (struct vnode *)fp->f_data; - if (vp->v_type == VDIR) { - FILEDESC_UNLOCK(fdp); + if (vp->v_type == VDIR) return (EPERM); - } } } - FILEDESC_UNLOCK(fdp); return (0); } @@ -504,21 +501,18 @@ error = suser_cred(td->td_ucred, PRISON_ROOT); if (error) return (error); + NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE, + SCARG(uap, path), td); + mtx_lock(&Giant); + if ((error = change_dir(&nd, td)) != 0) + goto error; FILEDESC_LOCK(fdp); if (chroot_allow_open_directories == 0 || (chroot_allow_open_directories == 1 && fdp->fd_rdir != rootvnode)) { - FILEDESC_UNLOCK(fdp); error = chroot_refuse_vdir_fds(fdp); - } else - FILEDESC_UNLOCK(fdp); - if (error) - return (error); - NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE, - SCARG(uap, path), td); - if ((error = change_dir(&nd, td)) != 0) - return (error); - NDFREE(&nd, NDF_ONLY_PNBUF); - FILEDESC_LOCK(fdp); + if (error) + goto error_unlock; + } vp = fdp->fd_rdir; fdp->fd_rdir = nd.ni_vp; if (!fdp->fd_jdir) { @@ -526,8 +520,16 @@ VREF(fdp->fd_jdir); } FILEDESC_UNLOCK(fdp); + NDFREE(&nd, NDF_ONLY_PNBUF); vrele(vp); + mtx_unlock(&Giant); return (0); +error_unlock: + FILEDESC_UNLOCK(fdp); +error: + mtx_unlock(&Giant); + NDFREE(&nd, 0); + return (error); } /* ==== //depot/projects/pmap/sys/netinet/ip_output.c#5 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ip_output.c 8.3 (Berkeley) 1/21/94 - * $FreeBSD: src/sys/netinet/ip_output.c,v 1.161 2002/06/27 11:02:06 mux Exp $ + * $FreeBSD: src/sys/netinet/ip_output.c,v 1.162 2002/07/12 22:08:47 luigi Exp $ */ #define _IP_VHL @@ -123,7 +123,7 @@ int hlen = sizeof (struct ip); int len, off, error = 0; struct sockaddr_in *dst = NULL; /* keep compiler happy */ - struct in_ifaddr *ia; + struct in_ifaddr *ia = NULL; int isbroadcast, sw_csum; struct in_addr pkt_dst; #ifdef IPSEC @@ -190,7 +190,8 @@ if (args.rule != NULL) { /* dummynet already saw us */ ip = mtod(m, struct ip *); hlen = IP_VHL_HL(ip->ip_vhl) << 2 ; - ia = ifatoia(ro->ro_rt->rt_ifa); + if (ro->ro_rt) + ia = ifatoia(ro->ro_rt->rt_ifa); goto sendit; } ==== //depot/projects/pmap/sys/pc98/conf/GENERIC#4 (text+ko) ==== @@ -15,7 +15,7 @@ # device lines is also present in the NOTES configuration file. If you are # in doubt as to the purpose or necessity of a line, check first in NOTES. # -# $FreeBSD: src/sys/pc98/conf/GENERIC,v 1.205 2002/06/30 04:12:20 rwatson Exp $ +# $FreeBSD: src/sys/pc98/conf/GENERIC,v 1.206 2002/07/13 16:43:52 alfred Exp $ machine pc98 #cpu I386_CPU #Do not enable with other cpu types @@ -46,6 +46,7 @@ options PROCFS #Process filesystem (requires PSEUDOFS) options PSEUDOFS #Pseudo-filesystem framework options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!] +options COMPAT_FREEBSD4 #Compatible with FreeBSD4 options SCSI_DELAY=15000 #Delay (in ms) before probing SCSI options EPSON_BOUNCEDMA #use bounce buufer for 15-16M >>> TRUNCATED FOR MAIL (1000 lines) <<< To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message