Date: Thu, 19 Jul 2007 12:06:02 GMT From: Xin LI <delphij@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 123727 for review Message-ID: <200707191206.l6JC62M5082912@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=123727 Change 123727 by delphij@delphij_odin on 2007/07/19 12:05:04 IFC. Affected files ... .. //depot/projects/delphij_fork/contrib/diff/FREEBSD-Xlist#2 integrate .. //depot/projects/delphij_fork/contrib/diff/Makefile.am#2 delete .. //depot/projects/delphij_fork/contrib/diff/bootstrap#2 delete .. //depot/projects/delphij_fork/contrib/diff/doc/Makefile.am#2 delete .. //depot/projects/delphij_fork/contrib/diff/doc/diagmeet.note#2 delete .. //depot/projects/delphij_fork/contrib/diff/exgettext#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/Makefile.am#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/alloca.c#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/alloca_.h#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/dirname.c#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/fnmatch.c#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/fnmatch_.h#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/fnmatch_loop.c#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/getopt.c#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/getopt1.c#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/getopt_int.h#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/gettimeofday.c#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/imaxtostr.c#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/inttostr.c#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/malloc.c#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/mkstemp.c#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/offtostr.c#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/realloc.c#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/regex.c#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/regex.h#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/setmode.c#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/stdbool_.h#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/strcasecmp.c#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/stripslash.c#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/strncasecmp.c#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/strtol.c#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/strtoll.c#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/strtoul.c#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/strtoull.c#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/tempname.c#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/time_r.c#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/time_r.h#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/umaxtostr.c#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/waitpid.c#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/xstrdup.c#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/xstrtol.c#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/xstrtoul.c#2 delete .. //depot/projects/delphij_fork/contrib/diff/lib/xstrtoumax.c#2 delete .. //depot/projects/delphij_fork/contrib/diff/man/Makefile.am#2 delete .. //depot/projects/delphij_fork/contrib/diff/src/Makefile.am#2 delete .. //depot/projects/delphij_fork/share/man/man9/module.9#2 integrate .. //depot/projects/delphij_fork/sys/fs/tmpfs/tmpfs_vnops.c#3 integrate .. //depot/projects/delphij_fork/sys/kern/kern_mutex.c#2 integrate .. //depot/projects/delphij_fork/sys/kern/kern_sig.c#2 integrate .. //depot/projects/delphij_fork/sys/kern/kern_switch.c#2 integrate .. //depot/projects/delphij_fork/sys/kern/sched_4bsd.c#2 integrate .. //depot/projects/delphij_fork/sys/netinet6/in6.h#3 integrate .. //depot/projects/delphij_fork/sys/netipsec/ipsec_input.c#2 integrate .. //depot/projects/delphij_fork/sys/netipsec/ipsec_output.c#2 integrate .. //depot/projects/delphij_fork/sys/netipsec/xform_ipip.c#2 integrate .. //depot/projects/delphij_fork/sys/sparc64/sparc64/pmap.c#2 integrate .. //depot/projects/delphij_fork/sys/sys/mutex.h#2 integrate .. //depot/projects/delphij_fork/tools/build/options/WITHOUT_TOOLCHAIN#2 integrate .. //depot/projects/delphij_fork/tools/regression/fstest/fstest.c#2 integrate .. //depot/projects/delphij_fork/tools/regression/fstest/tests/open/16.t#2 integrate .. //depot/projects/delphij_fork/tools/regression/fstest/tests/open/18.t#2 integrate Differences ... ==== //depot/projects/delphij_fork/contrib/diff/FREEBSD-Xlist#2 (text+ko) ==== @@ -1,17 +1,61 @@ -# $FreeBSD: src/contrib/diff/FREEBSD-Xlist,v 1.1 2007/06/15 07:28:00 delphij Exp $ +# $FreeBSD: src/contrib/diff/FREEBSD-Xlist,v 1.2 2007/07/19 06:57:44 delphij Exp $ INSTALL +Makefile.am +Makefile.in +aclocal.m4 +bootstrap +config.hin config/ +configure +configure.ac +doc/Makefile.am +doc/Makefile.in +doc/diagmeet.note +exgettext +lib/Makefile.am +lib/Makefile.in +lib/alloca.c +lib/alloca_.h +lib/dirname.c +lib/fnmatch.c +lib/fnmatch_.h +lib/fnmatch_loop.c +lib/getopt.c +lib/getopt1.c +lib/getopt_int.h +lib/gettimeofday.c +lib/imaxtostr.c +lib/inttostr.c +lib/malloc.c +lib/mkstemp.c +lib/offtostr.c +lib/posix/Makefile.in +lib/realloc.c +lib/regex.c +lib/regex.h +lib/setmode.c +lib/stdbool_.h +lib/strcasecmp.c +lib/stripslash.c +lib/strncasecmp.c +lib/strtol.c +lib/strtoll.c +lib/strtoul.c +lib/strtoull.c +lib/tempname.c +lib/time_r.c +lib/time_r.h +lib/umaxtostr.c +lib/waitpid.c +lib/xstrdup.c +lib/xstrtol.c +lib/xstrtoul.c +lib/xstrtoumax.c m4/ +man/Makefile.am +man/Makefile.in ms/ po/ +src/Makefile.am src/Makefile.in -lib/posix/Makefile.in -lib/Makefile.in -doc/Makefile.in -man/Makefile.in -Makefile.in -aclocal.m4 -config.hin -configure -configure.ac ==== //depot/projects/delphij_fork/share/man/man9/module.9#2 (text+ko) ==== @@ -26,9 +26,9 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man9/module.9,v 1.10 2005/06/28 20:15:18 hmp Exp $ +.\" $FreeBSD: src/share/man/man9/module.9,v 1.11 2007/07/19 11:22:34 flz Exp $ .\" -.Dd March 1, 2001 +.Dd July 19, 2007 .Dt MODULE 9 .Os .Sh NAME @@ -85,7 +85,7 @@ .Pp The module should return .Er EOPNOTSUPP -for unrecognized values of +for unsupported and unrecognized values of .Fa what . .Sh EXAMPLES .Bd -literal ==== //depot/projects/delphij_fork/sys/fs/tmpfs/tmpfs_vnops.c#3 (text+ko) ==== @@ -41,7 +41,7 @@ * tmpfs vnode interface. */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/fs/tmpfs/tmpfs_vnops.c,v 1.7 2007/07/08 15:56:12 delphij Exp $"); +__FBSDID("$FreeBSD: src/sys/fs/tmpfs/tmpfs_vnops.c,v 1.8 2007/07/19 03:34:50 delphij Exp $"); #include <sys/param.h> #include <sys/fcntl.h> @@ -440,72 +440,80 @@ } /* --------------------------------------------------------------------- */ + static int -tmpfs_uio_xfer(struct tmpfs_mount *tmp, struct tmpfs_node *node, - struct uio *uio, vm_object_t uobj) +tmpfs_mappedread(vm_object_t vobj, vm_object_t tobj, size_t len, struct uio *uio) { - struct sf_buf *sf; - vm_pindex_t idx; - vm_offset_t d; - vm_page_t m; - size_t len; - int error = 0; - int behind = 0, ahead = 0; + vm_pindex_t idx; + vm_page_t m; + struct sf_buf *sf; + off_t offset, addr; + size_t tlen; + caddr_t va; + int error; - /* uobj - locked by caller */ + addr = uio->uio_offset; + idx = OFF_TO_IDX(addr); + offset = addr & PAGE_MASK; + tlen = MIN(PAGE_SIZE - offset, len); - VM_OBJECT_LOCK(uobj); - vm_object_pip_add(uobj, 1); - while (error == 0 && uio->uio_resid > 0) { - if (node->tn_size <= uio->uio_offset) - break; + if ((vobj == NULL) || (vobj->resident_page_count == 0)) + goto nocache; - len = MIN(node->tn_size - uio->uio_offset, uio->uio_resid); - if (len == 0) - break; - - idx = OFF_TO_IDX(uio->uio_offset); - d = uio->uio_offset - IDX_TO_OFF(idx); - len = MIN(len, (PAGE_SIZE - d)); - m = vm_page_grab(uobj, idx, VM_ALLOC_WIRED | VM_ALLOC_ZERO | - VM_ALLOC_NORMAL | VM_ALLOC_RETRY); - if (m->valid != VM_PAGE_BITS_ALL){ - if (vm_pager_has_page(uobj, idx, &behind, &ahead)){ - error = vm_pager_get_pages(uobj, &m, 1, 0); - if (error == VM_PAGER_ERROR){ - printf("vm_pager_get_pages error\n"); - goto out; - } -#ifdef DIAGNOSTIC - /* XXX */ - printf("tmpfs gets page from pager\n"); -#endif - } else { - vm_page_zero_invalid(m, TRUE); - } - } - VM_OBJECT_UNLOCK(uobj); + VM_OBJECT_LOCK(vobj); +lookupvpg: + if (((m = vm_page_lookup(vobj, idx)) != NULL) && + vm_page_is_valid(m, offset, tlen)) { + if (vm_page_sleep_if_busy(m, FALSE, "tmfsmr")) + goto lookupvpg; + vm_page_busy(m); + VM_OBJECT_UNLOCK(vobj); sched_pin(); sf = sf_buf_alloc(m, SFB_CPUPRIVATE); - error = uiomove((void *)(sf_buf_kva(sf) + d), len, uio); + va = (caddr_t)sf_buf_kva(sf); + error = uiomove(va + offset, tlen, uio); sf_buf_free(sf); sched_unpin(); - VM_OBJECT_LOCK(uobj); - vm_page_lock_queues(); - if (error == 0 && uio->uio_rw == UIO_WRITE) { - vm_page_set_validclean(m, d, len); + VM_OBJECT_LOCK(vobj); + vm_page_wakeup(m); + VM_OBJECT_UNLOCK(vobj); + return (error); + } + VM_OBJECT_UNLOCK(vobj); +nocache: + VM_OBJECT_LOCK(tobj); + vm_object_pip_add(tobj, 1); + m = vm_page_grab(tobj, idx, VM_ALLOC_WIRED | + VM_ALLOC_ZERO | VM_ALLOC_NORMAL | VM_ALLOC_RETRY); + if (m->valid != VM_PAGE_BITS_ALL) { + int behind, ahead; + if (vm_pager_has_page(tobj, idx, &behind, &ahead)) { + error = vm_pager_get_pages(tobj, &m, 1, 0); + if (error != 0) { + printf("tmpfs get pages from pager error [read]\n"); + goto out; + } + } else vm_page_zero_invalid(m, TRUE); - vm_page_dirty(m); - } - vm_page_unwire(m, 0); - vm_page_activate(m); - vm_page_wakeup(m); - vm_page_unlock_queues(); } + VM_OBJECT_UNLOCK(tobj); + sched_pin(); + sf = sf_buf_alloc(m, SFB_CPUPRIVATE); + va = (caddr_t)sf_buf_kva(sf); + error = uiomove(va + offset, tlen, uio); + sf_buf_free(sf); + sched_unpin(); + VM_OBJECT_LOCK(tobj); out: - vm_object_pip_subtract(uobj, 1); - VM_OBJECT_UNLOCK(uobj); - return error; + vm_page_lock_queues(); + vm_page_unwire(m, 0); + vm_page_activate(m); + vm_page_unlock_queues(); + vm_page_wakeup(m); + vm_object_pip_subtract(tobj, 1); + VM_OBJECT_UNLOCK(tobj); + + return (error); } static int @@ -516,6 +524,8 @@ struct tmpfs_node *node; vm_object_t uobj; + size_t len; + int resid; int error; @@ -534,7 +544,17 @@ node->tn_status |= TMPFS_NODE_ACCESSED; uobj = node->tn_reg.tn_aobj; - error = tmpfs_uio_xfer(VFS_TO_TMPFS(vp->v_mount), node, uio, uobj); + while ((resid = uio->uio_resid) > 0) { + error = 0; + if (node->tn_size <= uio->uio_offset) + break; + len = MIN(node->tn_size - uio->uio_offset, resid); + if (len == 0) + break; + error = tmpfs_mappedread(vp->v_object, uobj, len, uio); + if ((error != 0) || (resid == uio->uio_resid)) + break; + } out: @@ -544,6 +564,100 @@ /* --------------------------------------------------------------------- */ static int +tmpfs_mappedwrite(vm_object_t vobj, vm_object_t tobj, size_t len, struct uio *uio) +{ + vm_pindex_t idx; + vm_page_t vpg, tpg; + struct sf_buf *sf; + off_t offset, addr; + size_t tlen; + caddr_t va; + int error; + + addr = uio->uio_offset; + idx = OFF_TO_IDX(addr); + offset = addr & PAGE_MASK; + tlen = MIN(PAGE_SIZE - offset, len); + + if ((vobj == NULL) || (vobj->resident_page_count == 0)) { + vpg = NULL; + goto nocache; + } + + VM_OBJECT_LOCK(vobj); +lookupvpg: + if (((vpg = vm_page_lookup(vobj, idx)) != NULL) && + vm_page_is_valid(vpg, offset, tlen)) { + if (vm_page_sleep_if_busy(vpg, FALSE, "tmfsmw")) + goto lookupvpg; + vm_page_busy(vpg); + vm_page_lock_queues(); + vm_page_undirty(vpg); + vm_page_unlock_queues(); + VM_OBJECT_UNLOCK(vobj); + sched_pin(); + sf = sf_buf_alloc(vpg, SFB_CPUPRIVATE); + va = (caddr_t)sf_buf_kva(sf); + error = uiomove(va + offset, tlen, uio); + sf_buf_free(sf); + sched_unpin(); + } else { + VM_OBJECT_UNLOCK(vobj); + vpg = NULL; + } +nocache: + VM_OBJECT_LOCK(tobj); + vm_object_pip_add(tobj, 1); + tpg = vm_page_grab(tobj, idx, VM_ALLOC_WIRED | + VM_ALLOC_ZERO | VM_ALLOC_NORMAL | VM_ALLOC_RETRY); + if (tpg->valid != VM_PAGE_BITS_ALL) { + int behind, ahead; + if (vm_pager_has_page(tobj, idx, &behind, &ahead)) { + error = vm_pager_get_pages(tobj, &tpg, 1, 0); + if (error != 0) { + printf("tmpfs get pages from pager error [write]\n"); + goto out; + } + } else + vm_page_zero_invalid(tpg, TRUE); + } + VM_OBJECT_UNLOCK(tobj); + if (vpg == NULL) { + sched_pin(); + sf = sf_buf_alloc(tpg, SFB_CPUPRIVATE); + va = (caddr_t)sf_buf_kva(sf); + error = uiomove(va + offset, tlen, uio); + sf_buf_free(sf); + sched_unpin(); + } else { + KASSERT(vpg->valid == VM_PAGE_BITS_ALL, ("parts of vpg invalid")); + pmap_copy_page(vpg, tpg); + } + VM_OBJECT_LOCK(tobj); +out: + if (vobj != NULL) + VM_OBJECT_LOCK(vobj); + vm_page_lock_queues(); + if (error == 0) { + vm_page_set_validclean(tpg, offset, tlen); + vm_page_zero_invalid(tpg, TRUE); + vm_page_dirty(tpg); + } + vm_page_unwire(tpg, 0); + vm_page_activate(tpg); + vm_page_unlock_queues(); + vm_page_wakeup(tpg); + if (vpg != NULL) + vm_page_wakeup(vpg); + if (vobj != NULL) + VM_OBJECT_UNLOCK(vobj); + vm_object_pip_subtract(tobj, 1); + VM_OBJECT_UNLOCK(tobj); + + return (error); +} + +static int tmpfs_write(struct vop_write_args *v) { struct vnode *vp = v->a_vp; @@ -552,10 +666,12 @@ struct thread *td = uio->uio_td; boolean_t extended; - int error; + int error = 0; off_t oldsize; struct tmpfs_node *node; vm_object_t uobj; + size_t len; + int resid; node = VP_TO_TMPFS_NODE(vp); oldsize = node->tn_size; @@ -596,7 +712,16 @@ } uobj = node->tn_reg.tn_aobj; - error = tmpfs_uio_xfer(VFS_TO_TMPFS(vp->v_mount), node, uio, uobj); + while ((resid = uio->uio_resid) > 0) { + if (node->tn_size <= uio->uio_offset) + break; + len = MIN(node->tn_size - uio->uio_offset, resid); + if (len == 0) + break; + error = tmpfs_mappedwrite(vp->v_object, uobj, len, uio); + if ((error != 0) || (resid == uio->uio_resid)) + break; + } node->tn_status |= TMPFS_NODE_ACCESSED | TMPFS_NODE_MODIFIED | (extended ? TMPFS_NODE_CHANGED : 0); ==== //depot/projects/delphij_fork/sys/kern/kern_mutex.c#2 (text+ko) ==== @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/kern/kern_mutex.c,v 1.196 2007/06/09 18:09:37 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_mutex.c,v 1.198 2007/07/18 20:46:05 jeff Exp $"); #include "opt_adaptive_mutexes.h" #include "opt_ddb.h" @@ -118,7 +118,6 @@ * System-wide mutexes */ struct mtx blocked_lock; -struct mtx sched_lock; struct mtx Giant; #ifdef LOCK_PROFILING @@ -473,9 +472,12 @@ { struct mtx *m; uintptr_t tid; - int i; + int i, contested; + uint64_t waittime; - i = 0; + + contested = i = 0; + waittime = 0; tid = (uintptr_t)curthread; for (;;) { retry: @@ -488,6 +490,7 @@ m->mtx_recurse++; break; } + lock_profile_obtain_lock_failed(&m->lock_object, &contested, &waittime); /* Give interrupts a chance while we spin. */ spinlock_exit(); while (m->mtx_lock != MTX_UNOWNED) { @@ -508,6 +511,8 @@ break; _rel_spin_lock(m); /* does spinlock_exit() */ } + lock_profile_obtain_lock_success(&m->lock_object, contested, + waittime, (file), (line)); WITNESS_LOCK(&m->lock_object, opts | LOP_EXCLUSIVE, file, line); } @@ -769,7 +774,6 @@ * Initialize mutexes. */ mtx_init(&Giant, "Giant", NULL, MTX_DEF | MTX_RECURSE); - mtx_init(&sched_lock, "sched lock", NULL, MTX_SPIN | MTX_RECURSE); mtx_init(&blocked_lock, "blocked lock", NULL, MTX_SPIN); blocked_lock.mtx_lock = 0xdeadc0de; /* Always blocked. */ mtx_init(&proc0.p_mtx, "process lock", NULL, MTX_DEF | MTX_DUPOK); ==== //depot/projects/delphij_fork/sys/kern/kern_sig.c#2 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/kern/kern_sig.c,v 1.348 2007/06/11 23:27:03 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_sig.c,v 1.349 2007/07/19 08:49:16 jeff Exp $"); #include "opt_compat.h" #include "opt_ktrace.h" @@ -2365,12 +2365,8 @@ * Bring the priority of a thread up if we want it to get * killed in this lifetime. */ - if (action == SIG_DFL && (prop & SA_KILL)) { - if (p->p_nice > 0) - sched_nice(td->td_proc, 0); - if (td->td_priority > PUSER) - sched_prio(td, PUSER); - } + if (action == SIG_DFL && (prop & SA_KILL) && td->td_priority > PUSER) + sched_prio(td, PUSER); if (TD_ON_SLEEPQ(td)) { /* ==== //depot/projects/delphij_fork/sys/kern/kern_switch.c#2 (text+ko) ==== @@ -26,7 +26,7 @@ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/kern/kern_switch.c,v 1.131 2007/06/12 19:50:31 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_switch.c,v 1.132 2007/07/19 08:58:40 jeff Exp $"); #include "opt_sched.h" @@ -267,8 +267,7 @@ /* * Thread is runnable but not yet put on system run queue. */ - MPASS(ctd->td_lock == &sched_lock); - MPASS(td->td_lock == &sched_lock); + MPASS(ctd->td_lock == td->td_lock); MPASS(TD_ON_RUNQ(td)); TD_SET_RUNNING(td); CTR3(KTR_PROC, "preempting to thread %p (pid %d, %s)\n", td, ==== //depot/projects/delphij_fork/sys/kern/sched_4bsd.c#2 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/kern/sched_4bsd.c,v 1.102 2007/06/12 07:47:09 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/sched_4bsd.c,v 1.103 2007/07/18 20:46:05 jeff Exp $"); #include "opt_hwpmc_hooks.h" @@ -101,6 +101,7 @@ ((ts)->ts_runq != 0 && (ts)->ts_runq != &runq) static struct td_sched td_sched0; +struct mtx sched_lock; static int sched_tdcnt; /* Total runnable threads in the system. */ static int sched_quantum; /* Roundrobin scheduling quantum in ticks. */ @@ -578,6 +579,7 @@ thread0.td_sched = &td_sched0; thread0.td_lock = &sched_lock; td_sched0.ts_thread = &thread0; + mtx_init(&sched_lock, "sched lock", NULL, MTX_SPIN | MTX_RECURSE); } int ==== //depot/projects/delphij_fork/sys/netinet6/in6.h#3 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/netinet6/in6.h,v 1.50 2007/07/05 16:29:39 delphij Exp $ */ +/* $FreeBSD: src/sys/netinet6/in6.h,v 1.51 2007/07/19 09:16:40 bz Exp $ */ /* $KAME: in6.h,v 1.89 2001/05/27 13:28:35 itojun Exp $ */ /*- @@ -413,7 +413,7 @@ #define IPV6_BINDV6ONLY IPV6_V6ONLY #endif -#ifdef IPSEC +#if 1 /* IPSEC */ #define IPV6_IPSEC_POLICY 28 /* struct; get/set security policy */ #endif /* IPSEC */ ==== //depot/projects/delphij_fork/sys/netipsec/ipsec_input.c#2 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/netipsec/ipsec_input.c,v 1.17 2007/06/15 22:23:33 bz Exp $ */ +/* $FreeBSD: src/sys/netipsec/ipsec_input.c,v 1.18 2007/07/19 09:57:54 bz Exp $ */ /* $OpenBSD: ipsec_input.c,v 1.63 2003/02/20 18:35:43 deraadt Exp $ */ /*- * The authors of this code are John Ioannidis (ji@tla.org), @@ -56,6 +56,7 @@ #include <sys/syslog.h> #include <net/if.h> +#include <net/pfil.h> #include <net/route.h> #include <net/netisr.h> @@ -460,7 +461,7 @@ ipsec_bpf(m, sav, AF_INET); if (prot != IPPROTO_IPIP) - if ((error = ipsec_filter(&m, 1)) != 0) + if ((error = ipsec_filter(&m, PFIL_IN)) != 0) return (error); #endif ==== //depot/projects/delphij_fork/sys/netipsec/ipsec_output.c#2 (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/netipsec/ipsec_output.c,v 1.15 2007/07/01 11:38:29 gnn Exp $ + * $FreeBSD: src/sys/netipsec/ipsec_output.c,v 1.16 2007/07/19 09:57:54 bz Exp $ */ /* @@ -44,6 +44,7 @@ #include <sys/syslog.h> #include <net/if.h> +#include <net/pfil.h> #include <net/route.h> #include <netinet/in.h> @@ -362,7 +363,7 @@ #ifdef DEV_ENC /* pass the mbuf to enc0 for packet filtering */ - if ((error = ipsec_filter(&m, 2)) != 0) + if ((error = ipsec_filter(&m, PFIL_OUT)) != 0) goto bad; #endif ==== //depot/projects/delphij_fork/sys/netipsec/xform_ipip.c#2 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/netipsec/xform_ipip.c,v 1.14 2007/07/03 12:13:45 gnn Exp $ */ +/* $FreeBSD: src/sys/netipsec/xform_ipip.c,v 1.15 2007/07/19 09:57:54 bz Exp $ */ /* $OpenBSD: ip_ipip.c,v 1.25 2002/06/10 18:04:55 itojun Exp $ */ /*- * The authors of this code are John Ioannidis (ji@tla.org), @@ -52,6 +52,7 @@ #include <sys/sysctl.h> #include <net/if.h> +#include <net/pfil.h> #include <net/route.h> #include <net/netisr.h> @@ -348,7 +349,7 @@ #ifdef DEV_ENC /* pass the mbuf to enc0 for packet filtering */ - if (ipsec_filter(&m, 1) != 0) + if (ipsec_filter(&m, PFIL_IN) != 0) return; #endif ==== //depot/projects/delphij_fork/sys/sparc64/sparc64/pmap.c#2 (text+ko) ==== @@ -39,7 +39,7 @@ * SUCH DAMAGE. * * from: @(#)pmap.c 7.7 (Berkeley) 5/12/91 - * $FreeBSD: src/sys/sparc64/sparc64/pmap.c,v 1.164 2007/06/03 19:39:38 alc Exp $ + * $FreeBSD: src/sys/sparc64/sparc64/pmap.c,v 1.165 2007/07/18 20:46:05 jeff Exp $ */ /* @@ -108,6 +108,13 @@ #define PMAP_SHPGPERPROC 200 #endif +/* XXX */ +#include "opt_sched.h" +#ifndef SCHED_4BSD +#error "sparc64 only works with SCHED_4BSD which uses a global scheduler lock." +#endif +extern struct mtx sched_lock; + /* * Virtual and physical address of message buffer. */ ==== //depot/projects/delphij_fork/sys/sys/mutex.h#2 (text+ko) ==== @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * from BSDI $Id: mutex.h,v 2.7.2.35 2000/04/27 03:10:26 cp Exp $ - * $FreeBSD: src/sys/sys/mutex.h,v 1.97 2007/06/06 03:40:47 jeff Exp $ + * $FreeBSD: src/sys/sys/mutex.h,v 1.98 2007/07/18 20:46:06 jeff Exp $ */ #ifndef _SYS_MUTEX_H_ @@ -355,7 +355,6 @@ /* * Global locks. */ -extern struct mtx sched_lock; extern struct mtx Giant; extern struct mtx blocked_lock; ==== //depot/projects/delphij_fork/tools/build/options/WITHOUT_TOOLCHAIN#2 (text) ==== @@ -1,4 +1,5 @@ -.\" $FreeBSD: src/tools/build/options/WITHOUT_TOOLCHAIN,v 1.1 2006/03/21 07:50:50 ru Exp $ -Set to not build +.\" $FreeBSD: src/tools/build/options/WITHOUT_TOOLCHAIN,v 1.2 2007/07/19 08:14:28 bz Exp $ +Set to not install programs used for program development, compilers, debuggers etc. +.Sy "The option does not work for build targets." ==== //depot/projects/delphij_fork/tools/regression/fstest/fstest.c#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/tools/regression/fstest/fstest.c,v 1.1 2007/01/17 01:42:07 pjd Exp $ + * $FreeBSD: src/tools/regression/fstest/fstest.c,v 1.2 2007/07/18 18:07:14 pjd Exp $ */ #include <sys/param.h> @@ -530,6 +530,10 @@ fprintf(stderr, "cannot change groups: %s\n", strerror(errno)); exit(1); } + if (setegid(gidset[0]) < 0) { + fprintf(stderr, "cannot change effective gid: %s\n", strerror(errno)); + exit(1); + } free(gidset); } ==== //depot/projects/delphij_fork/tools/regression/fstest/tests/open/16.t#2 (text+ko) ==== @@ -1,7 +1,7 @@ #!/bin/sh -# $FreeBSD: src/tools/regression/fstest/tests/open/16.t,v 1.1 2007/01/17 01:42:10 pjd Exp $ +# $FreeBSD: src/tools/regression/fstest/tests/open/16.t,v 1.2 2007/07/18 18:07:15 pjd Exp $ -desc="open returns EMLINK when O_NOFOLLOW was specified and the target is a symbolic link" +desc="open returns EMLINK/ELOOP when O_NOFOLLOW was specified and the target is a symbolic link" dir=`dirname $0` . ${dir}/../misc.sh @@ -12,8 +12,18 @@ n1=`namegen` expect 0 symlink ${n0} ${n1} -expect EMLINK open ${n1} O_RDONLY,O_CREAT,O_NOFOLLOW 0644 -expect EMLINK open ${n1} O_RDONLY,O_NOFOLLOW -expect EMLINK open ${n1} O_WRONLY,O_NOFOLLOW -expect EMLINK open ${n1} O_RDWR,O_NOFOLLOW +case "${os}" in +SunOS) + expect ELOOP open ${n1} O_RDONLY,O_CREAT,O_NOFOLLOW 0644 + expect ELOOP open ${n1} O_RDONLY,O_NOFOLLOW + expect ELOOP open ${n1} O_WRONLY,O_NOFOLLOW + expect ELOOP open ${n1} O_RDWR,O_NOFOLLOW + ;; +*) + expect EMLINK open ${n1} O_RDONLY,O_CREAT,O_NOFOLLOW 0644 + expect EMLINK open ${n1} O_RDONLY,O_NOFOLLOW + expect EMLINK open ${n1} O_WRONLY,O_NOFOLLOW + expect EMLINK open ${n1} O_RDWR,O_NOFOLLOW + ;; +esac expect 0 unlink ${n1} ==== //depot/projects/delphij_fork/tools/regression/fstest/tests/open/18.t#2 (text+ko) ==== @@ -1,18 +1,25 @@ #!/bin/sh -# $FreeBSD: src/tools/regression/fstest/tests/open/18.t,v 1.1 2007/01/17 01:42:10 pjd Exp $ +# $FreeBSD: src/tools/regression/fstest/tests/open/18.t,v 1.2 2007/07/18 18:07:15 pjd Exp $ desc="open returns EWOULDBLOCK when O_NONBLOCK and one of O_SHLOCK or O_EXLOCK is specified and the file is locked" dir=`dirname $0` . ${dir}/../misc.sh -echo "1..6" +case "${os}" in +FreeBSD) + echo "1..6" -n0=`namegen` + n0=`namegen` -expect 0 create ${n0} 0644 -expect 0 open ${n0} O_RDONLY,O_SHLOCK : open ${n0} O_RDONLY,O_SHLOCK,O_NONBLOCK -expect "EWOULDBLOCK|EAGAIN" open ${n0} O_RDONLY,O_EXLOCK : open ${n0} O_RDONLY,O_EXLOCK,O_NONBLOCK -expect "EWOULDBLOCK|EAGAIN" open ${n0} O_RDONLY,O_SHLOCK : open ${n0} O_RDONLY,O_EXLOCK,O_NONBLOCK -expect "EWOULDBLOCK|EAGAIN" open ${n0} O_RDONLY,O_EXLOCK : open ${n0} O_RDONLY,O_SHLOCK,O_NONBLOCK -expect 0 unlink ${n0} + expect 0 create ${n0} 0644 + expect 0 open ${n0} O_RDONLY,O_SHLOCK : open ${n0} O_RDONLY,O_SHLOCK,O_NONBLOCK + expect "EWOULDBLOCK|EAGAIN" open ${n0} O_RDONLY,O_EXLOCK : open ${n0} O_RDONLY,O_EXLOCK,O_NONBLOCK + expect "EWOULDBLOCK|EAGAIN" open ${n0} O_RDONLY,O_SHLOCK : open ${n0} O_RDONLY,O_EXLOCK,O_NONBLOCK + expect "EWOULDBLOCK|EAGAIN" open ${n0} O_RDONLY,O_EXLOCK : open ${n0} O_RDONLY,O_SHLOCK,O_NONBLOCK + expect 0 unlink ${n0} + ;; +*) + quick_exit + ;; +esac
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200707191206.l6JC62M5082912>