CVS commit: src
Module Name:src Committed By: alnsn Date: Tue Nov 6 07:59:09 UTC 2012 Modified Files: src/distrib/sets/lists/modules: md.sparc src/sys/arch/sparc/conf: files.sparc src/sys/modules: Makefile Log Message: Enable bpfjit on sparc. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/distrib/sets/lists/modules/md.sparc cvs rdiff -u -r1.151 -r1.152 src/sys/arch/sparc/conf/files.sparc cvs rdiff -u -r1.114 -r1.115 src/sys/modules/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/modules/md.sparc diff -u src/distrib/sets/lists/modules/md.sparc:1.1 src/distrib/sets/lists/modules/md.sparc:1.2 --- src/distrib/sets/lists/modules/md.sparc:1.1 Mon Sep 7 02:27:29 2009 +++ src/distrib/sets/lists/modules/md.sparc Tue Nov 6 07:59:09 2012 @@ -1,3 +1,7 @@ -# $NetBSD: md.sparc,v 1.1 2009/09/07 02:27:29 jnemeth Exp $ +# $NetBSD: md.sparc,v 1.2 2012/11/06 07:59:09 alnsn Exp $ +./@MODULEDIR@/bpfjitbase-kernel-modules kmod +./@MODULEDIR@/bpfjit/bpfjit.kmod base-kernel-modules kmod ./@MODULEDIR@/exec_elf32 base-kernel-modules kmod ./@MODULEDIR@/exec_elf32/exec_elf32.kmod base-kernel-modules kmod +./@MODULEDIR@/sljitbase-kernel-modules kmod +./@MODULEDIR@/sljit/sljit.kmod base-kernel-modules kmod Index: src/sys/arch/sparc/conf/files.sparc diff -u src/sys/arch/sparc/conf/files.sparc:1.151 src/sys/arch/sparc/conf/files.sparc:1.152 --- src/sys/arch/sparc/conf/files.sparc:1.151 Sun Jun 12 03:35:46 2011 +++ src/sys/arch/sparc/conf/files.sparc Tue Nov 6 07:59:09 2012 @@ -1,4 +1,4 @@ -# $NetBSD: files.sparc,v 1.151 2011/06/12 03:35:46 rmind Exp $ +# $NetBSD: files.sparc,v 1.152 2012/11/06 07:59:09 alnsn Exp $ # @(#)files.sparc 8.1 (Berkeley) 7/19/93 # sparc-specific configuration info @@ -205,6 +205,11 @@ file dev/sun/sunms.c ms_tty # mouse l attach ms at pckbport with ms_pckbport file arch/sparc/dev/ms_pckbport.c ms_pckbport # lower/middle layers +# +# Stack-less Just-In-Time compiler +# + +include "external/bsd/sljit/conf/files.sljit" # # Machine-independent SCSI drivers Index: src/sys/modules/Makefile diff -u src/sys/modules/Makefile:1.114 src/sys/modules/Makefile:1.115 --- src/sys/modules/Makefile:1.114 Sun Oct 28 16:25:03 2012 +++ src/sys/modules/Makefile Tue Nov 6 07:59:09 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.114 2012/10/28 16:25:03 alnsn Exp $ +# $NetBSD: Makefile,v 1.115 2012/11/06 07:59:09 alnsn Exp $ .include @@ -122,7 +122,8 @@ SUBDIR+= vmt .endif .if ${MACHINE_ARCH} == "i386" || \ -${MACHINE_ARCH} == "x86_64" +${MACHINE_ARCH} == "x86_64" || \ +${MACHINE_ARCH} == "sparc" SUBDIR+= bpfjit SUBDIR+= sljit .endif
CVS commit: src/usr.sbin/npf/npfctl
Module Name:src Committed By: rmind Date: Mon Nov 5 23:47:12 UTC 2012 Modified Files: src/usr.sbin/npf/npfctl: npf_disassemble.c npf_extmod.c npf_ncgen.c npf_parse.y npf_scan.l npf_var.c npfctl.c npfctl.h Log Message: npfctl: switch to efun(3) routines. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/npf/npfctl/npf_disassemble.c cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/npf/npfctl/npf_extmod.c cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/npf/npfctl/npf_ncgen.c cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/npf/npfctl/npf_parse.y cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/npf/npfctl/npf_scan.l cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/npf/npfctl/npf_var.c cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/npf/npfctl/npfctl.c cvs rdiff -u -r1.21 -r1.22 src/usr.sbin/npf/npfctl/npfctl.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/npf/npfctl/npf_disassemble.c diff -u src/usr.sbin/npf/npfctl/npf_disassemble.c:1.10 src/usr.sbin/npf/npfctl/npf_disassemble.c:1.11 --- src/usr.sbin/npf/npfctl/npf_disassemble.c:1.10 Mon Oct 29 02:27:12 2012 +++ src/usr.sbin/npf/npfctl/npf_disassemble.c Mon Nov 5 23:47:12 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: npf_disassemble.c,v 1.10 2012/10/29 02:27:12 rmind Exp $ */ +/* $NetBSD: npf_disassemble.c,v 1.11 2012/11/05 23:47:12 rmind Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ * FIXME: config generation should be redesigned.. */ #include -__RCSID("$NetBSD: npf_disassemble.c,v 1.10 2012/10/29 02:27:12 rmind Exp $"); +__RCSID("$NetBSD: npf_disassemble.c,v 1.11 2012/11/05 23:47:12 rmind Exp $"); #include #include @@ -48,8 +48,6 @@ __RCSID("$NetBSD: npf_disassemble.c,v 1. #include #include -#include - #define NPF_OPCODES_STRINGS #include @@ -108,7 +106,7 @@ npfctl_ncode_add_target(nc_inf_t *ni, co /* Grow array, if needed, and add a new target. */ if (ni->ni_targidx == ni->ni_targsize) { ni->ni_targsize += 16; - ni->ni_targs = xrealloc(ni->ni_targs, + ni->ni_targs = erealloc(ni->ni_targs, ni->ni_targsize * sizeof(uint32_t)); } assert(ni->ni_targidx < ni->ni_targsize); @@ -372,7 +370,7 @@ npfctl_ncode_operand(nc_inf_t *ni, char nc_inf_t * npfctl_ncode_disinf(FILE *fp) { - nc_inf_t *ni = zalloc(sizeof(nc_inf_t)); + nc_inf_t *ni = emalloc(sizeof(nc_inf_t)); memset(ni, 0, sizeof(nc_inf_t)); ni->ni_fp = fp; Index: src/usr.sbin/npf/npfctl/npf_extmod.c diff -u src/usr.sbin/npf/npfctl/npf_extmod.c:1.1 src/usr.sbin/npf/npfctl/npf_extmod.c:1.2 --- src/usr.sbin/npf/npfctl/npf_extmod.c:1.1 Sun Sep 16 13:47:41 2012 +++ src/usr.sbin/npf/npfctl/npf_extmod.c Mon Nov 5 23:47:12 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: npf_extmod.c,v 1.1 2012/09/16 13:47:41 rmind Exp $ */ +/* $NetBSD: npf_extmod.c,v 1.2 2012/11/05 23:47:12 rmind Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__RCSID("$NetBSD: npf_extmod.c,v 1.1 2012/09/16 13:47:41 rmind Exp $"); +__RCSID("$NetBSD: npf_extmod.c,v 1.2 2012/11/05 23:47:12 rmind Exp $"); #include #include @@ -81,8 +81,8 @@ npf_extmod_load(const char *name) errx(EXIT_FAILURE, "dlopen: %s", dlerror()); } - ext = zalloc(sizeof(npf_extmod_t)); - ext->name = xstrdup(name); + ext = emalloc(sizeof(npf_extmod_t)); + ext->name = estrdup(name); ext->init = npf_extmod_sym(handle, name, "init"); ext->cons = npf_extmod_sym(handle, name, "construct"); ext->param = npf_extmod_sym(handle, name, "param"); Index: src/usr.sbin/npf/npfctl/npf_ncgen.c diff -u src/usr.sbin/npf/npfctl/npf_ncgen.c:1.13 src/usr.sbin/npf/npfctl/npf_ncgen.c:1.14 --- src/usr.sbin/npf/npfctl/npf_ncgen.c:1.13 Thu Jul 19 21:52:29 2012 +++ src/usr.sbin/npf/npfctl/npf_ncgen.c Mon Nov 5 23:47:12 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: npf_ncgen.c,v 1.13 2012/07/19 21:52:29 spz Exp $ */ +/* $NetBSD: npf_ncgen.c,v 1.14 2012/11/05 23:47:12 rmind Exp $ */ /*- * Copyright (c) 2009-2012 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__RCSID("$NetBSD: npf_ncgen.c,v 1.13 2012/07/19 21:52:29 spz Exp $"); +__RCSID("$NetBSD: npf_ncgen.c,v 1.14 2012/11/05 23:47:12 rmind Exp $"); #include #include @@ -91,7 +91,7 @@ npfctl_ncgen_getptr(nc_ctx_t *ctx, size_ /* Otherwise, re-allocate the buffer and update the pointers. */ ctx->nc_len = NC_ALLOC_ROUND(reqlen); - ctx->nc_buf = xrealloc(ctx->nc_buf, ctx->nc_len); + ctx->nc_buf = erealloc(ctx->nc_buf, ctx->nc_len); ctx->nc_iptr = (uint8_t *)ctx->nc_buf + offset; return ctx->nc_iptr; } @@ -126,7 +126,7 @@ npfctl_ncgen_addjmp(nc_ctx_t *ctx, uint3 reqlen = NC_ALLOC_ROUND(ctx->nc_jmp_it * sizeof(ptrdiff_t)); if (reqlen > NC_ALLOC_ROUND(ctx->nc_jmp_len)) { - ctx->nc_jmp_list = xrealloc(ctx->nc_jmp_list, reqlen); + ctx->nc_jmp_list = erealloc(ctx->nc_jmp_list, reqlen); ctx->nc_jmp_len = reqlen; } @@ -145,7 +145,7 @@ npfctl_ncgen_addjmp(nc_ctx_t *ctx, uint3 nc_
CVS commit: src/share/mk
Module Name:src Committed By: alnsn Date: Mon Nov 5 23:09:40 UTC 2012 Modified Files: src/share/mk: bsd.own.mk Log Message: Enable MKSLJIT on sparc. To generate a diff of this commit: cvs rdiff -u -r1.709 -r1.710 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.709 src/share/mk/bsd.own.mk:1.710 --- src/share/mk/bsd.own.mk:1.709 Mon Nov 5 00:57:41 2012 +++ src/share/mk/bsd.own.mk Mon Nov 5 23:09:40 2012 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.709 2012/11/05 00:57:41 alnsn Exp $ +# $NetBSD: bsd.own.mk,v 1.710 2012/11/05 23:09:40 alnsn Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -803,7 +803,8 @@ SOFTFLOAT_BITS= 32 .endif .if ${MACHINE_ARCH} == "i386" || \ -${MACHINE_ARCH} == "x86_64" +${MACHINE_ARCH} == "x86_64" || \ +${MACHINE_ARCH} == "sparc" MKSLJIT?= yes .else # Don't let this build where it really isn't supported.
CVS commit: src
Module Name:src Committed By: alnsn Date: Mon Nov 5 23:09:00 UTC 2012 Modified Files: src/distrib/sets/lists/comp: md.sparc src/sys/arch/sparc/include: Makefile Added Files: src/sys/arch/sparc/include: sljitarch.h Log Message: Add sljitarch.h on sparc. To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/distrib/sets/lists/comp/md.sparc cvs rdiff -u -r1.31 -r1.32 src/sys/arch/sparc/include/Makefile cvs rdiff -u -r0 -r1.1 src/sys/arch/sparc/include/sljitarch.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/md.sparc diff -u src/distrib/sets/lists/comp/md.sparc:1.76 src/distrib/sets/lists/comp/md.sparc:1.77 --- src/distrib/sets/lists/comp/md.sparc:1.76 Sun Jul 17 20:54:31 2011 +++ src/distrib/sets/lists/comp/md.sparc Mon Nov 5 23:09:00 2012 @@ -1,4 +1,4 @@ -# $NetBSD: md.sparc,v 1.76 2011/07/17 20:54:31 joerg Exp $ +# $NetBSD: md.sparc,v 1.77 2012/11/05 23:09:00 alnsn Exp $ ./usr/include/gcc-4.5/tgmath.h comp-c-include gcccmds,gcc=45 ./usr/include/ieeefp.hcomp-c-include ./usr/include/sparccomp-c-include @@ -57,6 +57,7 @@ ./usr/include/sparc/rwlock.h comp-c-include ./usr/include/sparc/setjmp.h comp-c-include ./usr/include/sparc/signal.h comp-c-include +./usr/include/sparc/sljitarch.h comp-c-include ./usr/include/sparc/stdarg.h comp-obsolete obsolete ./usr/include/sparc/tctrl.h comp-c-include ./usr/include/sparc/trap.h comp-c-include Index: src/sys/arch/sparc/include/Makefile diff -u src/sys/arch/sparc/include/Makefile:1.31 src/sys/arch/sparc/include/Makefile:1.32 --- src/sys/arch/sparc/include/Makefile:1.31 Sun Jul 17 20:54:47 2011 +++ src/sys/arch/sparc/include/Makefile Mon Nov 5 23:08:59 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.31 2011/07/17 20:54:47 joerg Exp $ +# $NetBSD: Makefile,v 1.32 2012/11/05 23:08:59 alnsn Exp $ INCSDIR= /usr/include/sparc @@ -16,7 +16,7 @@ INCS= ansi.h aout_machdep.h apmvar.h asm oldmon.h openpromio.h \ param.h pcb.h pmap.h pmc.h proc.h profile.h psl.h pte.h ptrace.h \ reg.h reloc.h rwlock.h \ - setjmp.h signal.h \ + setjmp.h signal.h sljitarch.h \ tctrl.h trap.h types.h \ vmparam.h vuid_event.h \ wchar_limits.h Added files: Index: src/sys/arch/sparc/include/sljitarch.h diff -u /dev/null src/sys/arch/sparc/include/sljitarch.h:1.1 --- /dev/null Mon Nov 5 23:09:00 2012 +++ src/sys/arch/sparc/include/sljitarch.h Mon Nov 5 23:08:59 2012 @@ -0,0 +1,37 @@ +/* $NetBSD: sljitarch.h,v 1.1 2012/11/05 23:08:59 alnsn Exp $ */ + +/*- + * Copyright (c) 2012 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef SPARC_SLJITARCH_H +#define SPARC_SLJITARCH_H + +#define SLJIT_CONFIG_SPARC_32 1 + +#define SLJIT_CACHE_FLUSH(from, to) \ + sparc_cache_flush((from), (to)) + +#endif
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Mon Nov 5 22:49:14 UTC 2012 Modified Files: src/share/man/man9: namecache.9 Log Message: Use other markup. Remove trailing space. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/share/man/man9/namecache.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/namecache.9 diff -u src/share/man/man9/namecache.9:1.16 src/share/man/man9/namecache.9:1.17 --- src/share/man/man9/namecache.9:1.16 Mon Nov 5 17:31:15 2012 +++ src/share/man/man9/namecache.9 Mon Nov 5 22:49:14 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: namecache.9,v 1.16 2012/11/05 17:31:15 dholland Exp $ +.\" $NetBSD: namecache.9,v 1.17 2012/11/05 22:49:14 wiz Exp $ .\" .\" Copyright (c) 2001 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -150,8 +150,8 @@ some existing object, or a negative hit, known to refer to .Em no existing object. -.Pq The lookup cannot fail, in the sense of generating an error condition \ -that requires aborting the operation in progress. +(The lookup cannot fail, in the sense of generating an error condition +that requires aborting the operation in progress.) .Pp On a cache miss, .Fn cache_lookup @@ -166,7 +166,8 @@ value is returned. On a negative hit, .Fa vpp is set to contain a null pointer and a nonzero value is returned. -Usually a negative hit will prompt the caller to fail with ENOENT. +Usually a negative hit will prompt the caller to fail with +.Er ENOENT . .Pp The .Fa iswhiteout @@ -202,7 +203,7 @@ If the lookup succeeds, the vnode is ref Returns 0 on success, -1 on cache miss, positive errno on failure. .It Fn cache_enter "dvp" "vp" "name" "namelen" "nameiflags" Add an entry to the cache. -The +The .Fa name and .Fa namelen
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Mon Nov 5 22:44:22 UTC 2012 Modified Files: src/share/man/man9: namei.9 vnodeops.9 Log Message: Bump date for previous. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/share/man/man9/namei.9 cvs rdiff -u -r1.88 -r1.89 src/share/man/man9/vnodeops.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/namei.9 diff -u src/share/man/man9/namei.9:1.29 src/share/man/man9/namei.9:1.30 --- src/share/man/man9/namei.9:1.29 Mon Nov 5 17:31:53 2012 +++ src/share/man/man9/namei.9 Mon Nov 5 22:44:22 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: namei.9,v 1.29 2012/11/05 17:31:53 dholland Exp $ +.\" $NetBSD: namei.9,v 1.30 2012/11/05 22:44:22 wiz Exp $ .\" .\" Copyright (c) 2001, 2005, 2006 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 16, 2010 +.Dd November 5, 2012 .Dt NAMEI 9 .Os .Sh NAME Index: src/share/man/man9/vnodeops.9 diff -u src/share/man/man9/vnodeops.9:1.88 src/share/man/man9/vnodeops.9:1.89 --- src/share/man/man9/vnodeops.9:1.88 Mon Nov 5 17:30:37 2012 +++ src/share/man/man9/vnodeops.9 Mon Nov 5 22:44:22 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: vnodeops.9,v 1.88 2012/11/05 17:30:37 dholland Exp $ +.\" $NetBSD: vnodeops.9,v 1.89 2012/11/05 22:44:22 wiz Exp $ .\" .\" Copyright (c) 2001, 2005, 2006 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 6, 2012 +.Dd November 5, 2012 .Dt VNODEOPS 9 .Os .Sh NAME
CVS commit: src/sys/kern
Module Name:src Committed By: para Date: Mon Nov 5 21:35:28 UTC 2012 Modified Files: src/sys/kern: vfs_lookup.c Log Message: make DEBUG kernels buildable again (typo) To generate a diff of this commit: cvs rdiff -u -r1.198 -r1.199 src/sys/kern/vfs_lookup.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/vfs_lookup.c diff -u src/sys/kern/vfs_lookup.c:1.198 src/sys/kern/vfs_lookup.c:1.199 --- src/sys/kern/vfs_lookup.c:1.198 Mon Nov 5 19:06:26 2012 +++ src/sys/kern/vfs_lookup.c Mon Nov 5 21:35:28 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_lookup.c,v 1.198 2012/11/05 19:06:26 dholland Exp $ */ +/* $NetBSD: vfs_lookup.c,v 1.199 2012/11/05 21:35:28 para Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1993 @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.198 2012/11/05 19:06:26 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.199 2012/11/05 21:35:28 para Exp $"); #include "opt_magiclinks.h" @@ -1696,7 +1696,7 @@ relookup(struct vnode *dvp, struct vnode if ((uint32_t)newhash != (uint32_t)cnp->cn_hash) panic("relookup: bad hash"); #endif - newlen = nami_getcomponent(cnp->cn_nameptr); + newlen = namei_getcomponent(cnp->cn_nameptr); if (cnp->cn_namelen != newlen) panic("relookup: bad len"); cp = cnp->cn_nameptr + cnp->cn_namelen;
CVS commit: src/distrib/sets/lists/comp
Module Name:src Committed By: alnsn Date: Mon Nov 5 20:01:39 UTC 2012 Modified Files: src/distrib/sets/lists/comp: md.amd64 md.i386 Log Message: Include sljitarch.h even when MKSLJIT=no. To generate a diff of this commit: cvs rdiff -u -r1.179 -r1.180 src/distrib/sets/lists/comp/md.amd64 cvs rdiff -u -r1.129 -r1.130 src/distrib/sets/lists/comp/md.i386 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/md.amd64 diff -u src/distrib/sets/lists/comp/md.amd64:1.179 src/distrib/sets/lists/comp/md.amd64:1.180 --- src/distrib/sets/lists/comp/md.amd64:1.179 Mon Nov 5 00:57:40 2012 +++ src/distrib/sets/lists/comp/md.amd64 Mon Nov 5 20:01:38 2012 @@ -1,4 +1,4 @@ -# $NetBSD: md.amd64,v 1.179 2012/11/05 00:57:40 alnsn Exp $ +# $NetBSD: md.amd64,v 1.180 2012/11/05 20:01:38 alnsn Exp $ ./usr/include/amd64comp-c-include ./usr/include/amd64/ansi.h comp-c-include ./usr/include/amd64/aout_machdep.h comp-c-include @@ -57,7 +57,7 @@ ./usr/include/amd64/segments.h comp-c-include ./usr/include/amd64/setjmp.h comp-c-include ./usr/include/amd64/signal.h comp-c-include -./usr/include/amd64/sljitarch.h comp-c-include sljit +./usr/include/amd64/sljitarch.h comp-c-include ./usr/include/amd64/specialreg.h comp-c-include ./usr/include/amd64/stdarg.h comp-obsolete obsolete ./usr/include/amd64/sysarch.h comp-c-include @@ -203,7 +203,7 @@ ./usr/include/i386/segments.h comp-c-include ./usr/include/i386/setjmp.h comp-c-include ./usr/include/i386/signal.h comp-c-include -./usr/include/i386/sljitarch.h comp-c-include sljit +./usr/include/i386/sljitarch.h comp-c-include ./usr/include/i386/specialreg.h comp-c-include ./usr/include/i386/spkr.h comp-c-include ./usr/include/i386/stdarg.h comp-obsolete obsolete Index: src/distrib/sets/lists/comp/md.i386 diff -u src/distrib/sets/lists/comp/md.i386:1.129 src/distrib/sets/lists/comp/md.i386:1.130 --- src/distrib/sets/lists/comp/md.i386:1.129 Mon Nov 5 00:57:40 2012 +++ src/distrib/sets/lists/comp/md.i386 Mon Nov 5 20:01:38 2012 @@ -1,4 +1,4 @@ -# $NetBSD: md.i386,v 1.129 2012/11/05 00:57:40 alnsn Exp $ +# $NetBSD: md.i386,v 1.130 2012/11/05 20:01:38 alnsn Exp $ ./usr/include/clang-3.0/avxintrin.h comp-obsolete obsolete ./usr/include/clang-3.0/avx2intrin.h comp-obsolete obsolete ./usr/include/clang-3.0/bmi2intrin.h comp-obsolete obsolete @@ -142,7 +142,7 @@ ./usr/include/i386/segments.h comp-c-include ./usr/include/i386/setjmp.h comp-c-include ./usr/include/i386/signal.h comp-c-include -./usr/include/i386/sljitarch.h comp-c-include sljit +./usr/include/i386/sljitarch.h comp-c-include ./usr/include/i386/specialreg.h comp-c-include ./usr/include/i386/spkr.h comp-c-include ./usr/include/i386/stdarg.h comp-obsolete obsolete
CVS commit: src/sys
Module Name:src Committed By: dholland Date: Mon Nov 5 19:06:40 UTC 2012 Modified Files: src/sys/rump/include/rump: rump_namei.h src/sys/sys: namei.h Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/rump/include/rump/rump_namei.h cvs rdiff -u -r1.84 -r1.85 src/sys/sys/namei.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/include/rump/rump_namei.h diff -u src/sys/rump/include/rump/rump_namei.h:1.20 src/sys/rump/include/rump/rump_namei.h:1.21 --- src/sys/rump/include/rump/rump_namei.h:1.20 Mon Nov 5 17:27:53 2012 +++ src/sys/rump/include/rump/rump_namei.h Mon Nov 5 19:06:39 2012 @@ -1,11 +1,11 @@ -/* $NetBSD: rump_namei.h,v 1.20 2012/11/05 17:27:53 dholland Exp $ */ +/* $NetBSD: rump_namei.h,v 1.21 2012/11/05 19:06:39 dholland Exp $ */ /* * WARNING: GENERATED FILE. DO NOT EDIT * (edit namei.src and run make namei in src/sys/sys) * by: NetBSD: gennameih.awk,v 1.5 2009/12/23 14:17:19 pooka Exp - * from: NetBSD: namei.src,v 1.29 2012/11/05 17:27:37 dholland Exp + * from: NetBSD: namei.src,v 1.30 2012/11/05 19:06:26 dholland Exp */ #ifndef _RUMP_RUMP_NAMEI_H_ Index: src/sys/sys/namei.h diff -u src/sys/sys/namei.h:1.84 src/sys/sys/namei.h:1.85 --- src/sys/sys/namei.h:1.84 Mon Nov 5 17:27:52 2012 +++ src/sys/sys/namei.h Mon Nov 5 19:06:39 2012 @@ -1,11 +1,11 @@ -/* $NetBSD: namei.h,v 1.84 2012/11/05 17:27:52 dholland Exp $ */ +/* $NetBSD: namei.h,v 1.85 2012/11/05 19:06:39 dholland Exp $ */ /* * WARNING: GENERATED FILE. DO NOT EDIT * (edit namei.src and run make namei in src/sys/sys) * by: NetBSD: gennameih.awk,v 1.5 2009/12/23 14:17:19 pooka Exp - * from: NetBSD: namei.src,v 1.29 2012/11/05 17:27:37 dholland Exp + * from: NetBSD: namei.src,v 1.30 2012/11/05 19:06:26 dholland Exp */ /* @@ -91,7 +91,7 @@ struct nameidata { /* * Arguments to namei/lookup. */ - struct vnode *ni_startdir; /* starting dir, cwd if null */ + struct vnode *ni_atdir; /* startup dir, cwd if null */ struct pathbuf *ni_pathbuf; /* pathname container */ char *ni_pnbuf; /* extra pathname buffer ref (XXX) */ /* @@ -176,7 +176,7 @@ struct nameidata { #define NDINIT(ndp, op, flags, pathbuf) { \ (ndp)->ni_cnd.cn_nameiop = op; \ (ndp)->ni_cnd.cn_flags = flags; \ - (ndp)->ni_startdir = NULL; \ + (ndp)->ni_atdir = NULL; \ (ndp)->ni_pathbuf = pathbuf; \ (ndp)->ni_cnd.cn_cred = kauth_cred_get(); \ } @@ -185,7 +185,7 @@ struct nameidata { * Use this to set the start directory for openat()-type operations. */ #define NDAT(ndp, dir) { \ - (ndp)->ni_startdir = (dir); \ + (ndp)->ni_atdir = (dir); \ } #endif
CVS commit: src/sys
Module Name:src Committed By: dholland Date: Mon Nov 5 19:06:27 UTC 2012 Modified Files: src/sys/kern: vfs_lookup.c src/sys/nfs: nfs_srvsubs.c src/sys/sys: namei.src Log Message: Rename the new ni_startdir (the slot used to hold the starting point for openat() and friends) to ni_atdir to avoid confusion with a previously existing (and, alas, still documented) ni_startdir field that meant something else entirely. To generate a diff of this commit: cvs rdiff -u -r1.197 -r1.198 src/sys/kern/vfs_lookup.c cvs rdiff -u -r1.13 -r1.14 src/sys/nfs/nfs_srvsubs.c cvs rdiff -u -r1.29 -r1.30 src/sys/sys/namei.src Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/vfs_lookup.c diff -u src/sys/kern/vfs_lookup.c:1.197 src/sys/kern/vfs_lookup.c:1.198 --- src/sys/kern/vfs_lookup.c:1.197 Mon Nov 5 17:24:11 2012 +++ src/sys/kern/vfs_lookup.c Mon Nov 5 19:06:26 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_lookup.c,v 1.197 2012/11/05 17:24:11 dholland Exp $ */ +/* $NetBSD: vfs_lookup.c,v 1.198 2012/11/05 19:06:26 dholland Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1993 @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.197 2012/11/05 17:24:11 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.198 2012/11/05 19:06:26 dholland Exp $"); #include "opt_magiclinks.h" @@ -564,8 +564,8 @@ namei_getstartdir(struct namei_state *st curdir = cwdi->cwdi_cdir; if (ndp->ni_pnbuf[0] != '/') { - if (ndp->ni_startdir != NULL) { - startdir = ndp->ni_startdir; + if (ndp->ni_atdir != NULL) { + startdir = ndp->ni_atdir; } else { startdir = curdir; } @@ -601,14 +601,14 @@ namei_getstartdir(struct namei_state *st static struct vnode * namei_getstartdir_for_nfsd(struct namei_state *state) { - KASSERT(state->ndp->ni_startdir != NULL); + KASSERT(state->ndp->ni_atdir != NULL); /* always use the real root, and never set an emulation root */ state->ndp->ni_rootdir = rootvnode; state->ndp->ni_erootdir = NULL; - vref(state->ndp->ni_startdir); - return state->ndp->ni_startdir; + vref(state->ndp->ni_atdir); + return state->ndp->ni_atdir; } @@ -1518,8 +1518,8 @@ lookup_for_nfsd(struct nameidata *ndp, s struct namei_state state; int error; - KASSERT(ndp->ni_startdir == NULL); - ndp->ni_startdir = forcecwd; + KASSERT(ndp->ni_atdir == NULL); + ndp->ni_atdir = forcecwd; namei_init(&state, ndp); error = namei_tryemulroot(&state, @@ -1564,7 +1564,7 @@ do_lookup_for_nfsd_index(struct namei_st KASSERT(cnp == &ndp->ni_cnd); - startdir = state->ndp->ni_startdir; + startdir = state->ndp->ni_atdir; cnp->cn_nameptr = ndp->ni_pnbuf; state->docache = 1; @@ -1631,8 +1631,8 @@ lookup_for_nfsd_index(struct nameidata * struct namei_state state; int error; - KASSERT(ndp->ni_startdir == NULL); - ndp->ni_startdir = startdir; + KASSERT(ndp->ni_atdir == NULL); + ndp->ni_atdir = startdir; /* * Note: the name sent in here (is not|should not be) allowed Index: src/sys/nfs/nfs_srvsubs.c diff -u src/sys/nfs/nfs_srvsubs.c:1.13 src/sys/nfs/nfs_srvsubs.c:1.14 --- src/sys/nfs/nfs_srvsubs.c:1.13 Sat Oct 13 17:46:50 2012 +++ src/sys/nfs/nfs_srvsubs.c Mon Nov 5 19:06:27 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_srvsubs.c,v 1.13 2012/10/13 17:46:50 dholland Exp $ */ +/* $NetBSD: nfs_srvsubs.c,v 1.14 2012/11/05 19:06:27 dholland Exp $ */ /* * Copyright (c) 1989, 1993 @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nfs_srvsubs.c,v 1.13 2012/10/13 17:46:50 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nfs_srvsubs.c,v 1.14 2012/11/05 19:06:27 dholland Exp $"); #include #include @@ -241,7 +241,7 @@ nfs_namei(struct nameidata *ndp, nfsrvfh path = cp; } - ndp->ni_startdir = NULL; + ndp->ni_atdir = NULL; ndp->ni_pathbuf = pathbuf_assimilate(path); if (ndp->ni_pathbuf == NULL) { error = ENOMEM; Index: src/sys/sys/namei.src diff -u src/sys/sys/namei.src:1.29 src/sys/sys/namei.src:1.30 --- src/sys/sys/namei.src:1.29 Mon Nov 5 17:27:37 2012 +++ src/sys/sys/namei.src Mon Nov 5 19:06:26 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: namei.src,v 1.29 2012/11/05 17:27:37 dholland Exp $ */ +/* $NetBSD: namei.src,v 1.30 2012/11/05 19:06:26 dholland Exp $ */ /* * Copyright (c) 1985, 1989, 1991, 1993 @@ -83,7 +83,7 @@ struct nameidata { /* * Arguments to namei/lookup. */ - struct vnode *ni_startdir; /* starting dir, cwd if null */ + struct vnode *ni_atdir; /* startup dir, cwd if null */ struct pathbuf *ni_pathbuf; /* pathname container */ char *ni_pnbuf; /* extra pathname buffer ref (XXX) */ /* @@ -168,7 +168,7 @@ NAMEIFL PARAMASK 0x0eee300 /* mask of pa #define NDINIT(ndp, op, flags, pathbuf) { \ (ndp)->ni_cnd.cn_nameiop = op; \ (ndp)->ni_cnd.cn_flags = flags; \ - (ndp)->ni_startdir = NULL; \ + (ndp)->ni_atdir = NULL; \ (ndp)->ni_pathbuf = pathbuf; \ (ndp)->ni_cnd.cn_cred = kauth_cred_get
CVS commit: src/share/man/man9
Module Name:src Committed By: dholland Date: Mon Nov 5 17:31:53 UTC 2012 Modified Files: src/share/man/man9: namei.9 Log Message: Document NDAT(), and while here update some of the now-outdated material in the namei man page. There's quite a bit more to be done. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/share/man/man9/namei.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/namei.9 diff -u src/share/man/man9/namei.9:1.28 src/share/man/man9/namei.9:1.29 --- src/share/man/man9/namei.9:1.28 Mon Nov 5 17:30:37 2012 +++ src/share/man/man9/namei.9 Mon Nov 5 17:31:53 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: namei.9,v 1.28 2012/11/05 17:30:37 dholland Exp $ +.\" $NetBSD: namei.9,v 1.29 2012/11/05 17:31:53 dholland Exp $ .\" .\" Copyright (c) 2001, 2005, 2006 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -36,6 +36,7 @@ .Nm lookup_for_nfsd_index , .Nm relookup , .Nm NDINIT , +.Nm NDAT , .Nm namei_simple_kernel , .Nm namei_simple_user .Nd pathname lookup @@ -56,6 +57,7 @@ .Ft void .Fn NDINIT "struct nameidata *ndp" "u_long op" "u_long flags" \ "struct pathbuf *pathbuf" +.Fn NDAT "struct nameidata *ndp" "struct vnode *dvp" .Ft int .Fn namei_simple_kernel "const char *path" "namei_simple_flags_t sflags" \ "struct vnode **ret" @@ -79,7 +81,7 @@ Except for the simple forms, the argumen encapsulated in the .Em nameidata structure. -It has the following structure: +It has the following layout: .Bd -literal struct nameidata { /* @@ -223,18 +225,14 @@ Pathname lookups cannot be done in inter .Bl -tag -width compact .It Fn namei "ndp" Convert a pathname into a pointer to a vnode. -The pathname is specified by -.Em ndp-\*[Gt]ni_dirp -and is of length -.Em ndp-\*[Gt]ni_pathlen . -The -.Em ndp-\*[Gt]segflg -flags defines whether the name in -.Em ndp-\*[Gt]ni_dirp -is an address in kernel space -.Pq Dv UIO_SYSSPACE -or an address in user space -.Pq Dv UIO_USERSPACE . +The nameidata structure pointed to by +.Fa ndp +should be initialized with the +.Fn NDINIT +macro. +Direct initialization of members of struct nameidata is +.Em not +supported and may break silently in the future. .Pp The vnode for the pathname is returned in .Em ndp-\*[Gt]ni_vp . @@ -328,18 +326,11 @@ Initialise a nameidata structure pointed for use by the .Nm interface. -It saves having to deal with the componentname structure inside -.Fa ndp . The operation and flags are specified by .Fa op and .Fa flags respectively. -These are the values to which -.Em ndp-\*[Gt]ni_cnd.cn_nameiop -and -.Em ndp-\*[Gt]ni_cnd.cn_flags -are respectively set. The pathname is passed as a pathbuf structure, which should be initialized using one of the .Xr pathbuf 9 @@ -357,6 +348,47 @@ In the rare case that another set of cre namei operation, .Em ndp-\*[Gt]ni_cnd.cn_cred must be set manually. +.Pp +The following fields of +.Fa ndp +are set: +.Bl -tag -width compact +.It Fa ni_cnd.cn_nameiop +is set to +.Fa op . +.It Fa ni_cnd.cn_flags +is set to +.Fa flags . +.It Fa ni_startdir +is set to +.Dv NULL . +.It Fa ni_pathbuf +is set to +.Fa pathbuf . +.It Fa ni_cnd.cn_cred +is set using +.Xr kauth_cred_get 9 . +.El +Other fields of struct nameidata are not +.Pq normally +initialized before +.Nm +is called. +Direct assignment of these or other fields other than by using +.Fn NDINIT +or +.Fn NDAT , +except as specifically described above, is not supported and may break +silently in the future. +.It Fn NDAT "ndp" "dvp" +This macro is used after +.Fn NDINIT +to set the starting directory. +This supersedes the current process's current working directory as the +initial point of departure for looking up relative paths. +This mechanism is used by +.Xr openat 3 +and related calls. .It Fn namei_simple_kernel "path" "sflags" "ret" Look up the path .Fa path
CVS commit: src/share/man/man9
Module Name:src Committed By: dholland Date: Mon Nov 5 17:31:16 UTC 2012 Modified Files: src/share/man/man9: namecache.9 Log Message: Update docs for namecache changes. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/share/man/man9/namecache.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/namecache.9 diff -u src/share/man/man9/namecache.9:1.15 src/share/man/man9/namecache.9:1.16 --- src/share/man/man9/namecache.9:1.15 Thu Dec 2 12:54:13 2010 +++ src/share/man/man9/namecache.9 Mon Nov 5 17:31:15 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: namecache.9,v 1.15 2010/12/02 12:54:13 wiz Exp $ +.\" $NetBSD: namecache.9,v 1.16 2012/11/05 17:31:15 dholland Exp $ .\" .\" Copyright (c) 2001 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 21, 2010 +.Dd November 5, 2012 .Dt NAMECACHE 9 .Os .Sh NAME @@ -45,14 +45,14 @@ .In sys/uio.h .In sys/vnode.h .Ft int -.Fn cache_lookup "struct vnode *dvp" "struct vnode **vpp" \ -"struct componentname *cnp" +.Fn cache_lookup "struct vnode *dvp" "const char *name" "size_t namelen" \ +"uint32_t nameiop" "uint32_t nameiflags" "int *iswhiteout" "struct vnode **vpp" .Ft int .Fn cache_revlookup "struct vnode *vp" "struct vnode *dvp" \ "char **bpp" "char *bufp" .Ft void .Fn cache_enter "struct vnode *dvp" "struct vnode *vp" \ -"struct componentname *cnp" +"const char *name" "size_t namelen" "uint32_t nameiflags" .Ft void .Fn cache_purge "struct vnode *vp" .Ft void @@ -67,7 +67,7 @@ The name lookup cache is generally acces .Xr namei 9 interface. .Pp -The name of the file is used to lookup an entry associated with the +The name of the file is used to look up an entry associated with the file in the name lookup cache. If no entry is found, one is created for it. If an entry is found, the information obtained from the cache lookup @@ -122,28 +122,68 @@ See for details on this structure. .Sh FUNCTIONS .Bl -tag -width compact -.It Fn cache_lookup "dvp" "vpp" "cnp" +.It Fn cache_lookup "dvp" "name" "namelen" "nameiop" "nameiflags" \ +"iswhiteout" "vpp" Look for a name in the cache. .Fn cache_lookup is called with .Fa dvp -pointing to the vnode of the directory to search and -.Fa cnp -pointing to the partially initialised component structure. -.Fa cnp-\*[Gt]cn_nameptr -points to the name of the entry being sought, -.Fa cnp-\*[Gt]cn_namelen -tells the length of the name, and -.Fa cnp-\*[Gt]cn_hash -contains a hash of the name. -If the lookup succeeds, the vnode is locked, stored in +pointing to the vnode of the directory to search. +The +.Fa name +and +.Fa namelen +arguments specify the name to look for. +The +.Fa nameiop +and +.Fa nameiflags +should be taken from the +.Fa cn_nameiop +and +.Fa cn_flags +fields of struct componentname. +.Pp +The lookup can produce either a cache miss or a cache hit, and a cache +hit can either be a positive hit, where the name looked up refers to +some existing object, or a negative hit, where the name looked up is +known to refer to +.Em no +existing object. +.Pq The lookup cannot fail, in the sense of generating an error condition \ +that requires aborting the operation in progress. +.Pp +On a cache miss, +.Fn cache_lookup +returns zero +.Pq false . +On a positive hit, the vnode for the object found is locked and stored +in +.Fa vpp , +and a nonzero +.Pq true +value is returned. +On a negative hit, .Fa vpp -and a status of zero is returned. -If the locking fails for whatever reason, the vnode is unlocked and the -error is returned. -If the lookup determines that the name does not exist any longer, a -status of ENOENT is returned. -If the lookup fails, a status of -1 is returned. +is set to contain a null pointer and a nonzero value is returned. +Usually a negative hit will prompt the caller to fail with ENOENT. +.Pp +The +.Fa iswhiteout +argument is a pointer to an integer result that will be set to nonzero if +the entry represents a whiteout, and zero if it does not. +This pointer may be +.Dv NULL +if the caller does not support whiteouts. +According to the current scheme for handling whiteouts, if +.Fn cache_lookup +sets +.Fa iswhiteout +the caller should add +.Dv ISWHITEOUT +to the +.Fa cn_flags +field of its struct componentname. .It Fn cache_revlookup "vp" "dvp" "bpp" "bufp" Scan cache looking for name of directory entry pointing at .Fa vp @@ -160,26 +200,31 @@ immediately before and move bpp backwards to point at the start of it. If the lookup succeeds, the vnode is referenced. Returns 0 on success, -1 on cache miss, positive errno on failure. -.It Fn cache_enter "dvp" "vp" "cnp" +.It Fn cache_enter "dvp" "vp" "name" "namelen" "nameiflags" Add an entry to the cache. -.Fn cache_enter -is called with +The +.Fa name +and
CVS commit: src/share/man/man9
Module Name:src Committed By: dholland Date: Mon Nov 5 17:30:37 UTC 2012 Modified Files: src/share/man/man9: namei.9 vnodeops.9 Log Message: These two man pages contain complete cut and paste copies of struct componentname and/or struct nameidata. Update the copies, for both today's changes and a number of earlier changes too. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/share/man/man9/namei.9 cvs rdiff -u -r1.87 -r1.88 src/share/man/man9/vnodeops.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/namei.9 diff -u src/share/man/man9/namei.9:1.27 src/share/man/man9/namei.9:1.28 --- src/share/man/man9/namei.9:1.27 Thu Dec 2 12:54:13 2010 +++ src/share/man/man9/namei.9 Mon Nov 5 17:30:37 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: namei.9,v 1.27 2010/12/02 12:54:13 wiz Exp $ +.\" $NetBSD: namei.9,v 1.28 2012/11/05 17:30:37 dholland Exp $ .\" .\" Copyright (c) 2001, 2005, 2006 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -85,8 +85,9 @@ struct nameidata { /* * Arguments to namei/lookup. */ -const char *ni_dirp;/* pathname pointer */ -enumuio_seg ni_segflg; /* location of pathname */ +struct vnode *ni_startdir; /* starting dir, cwd if null */ +struct pathbuf *ni_pathbuf; /* pathname container */ +char *ni_pnbuf; /* extra pathname buffer ref (XXX) */ /* * Arguments to lookup. */ @@ -100,9 +101,9 @@ struct nameidata { /* * Shared between namei and lookup/commit routines. */ -size_t ni_pathlen; /* remaining chars in path */ +size_t ni_pathlen; /* remaining chars in path */ const char *ni_next;/* next location in pathname */ -u_long ni_loopcnt; /* count of symlinks encountered */ +unsigned int ni_loopcnt;/* count of symlinks encountered */ /* * Lookup parameters */ @@ -110,17 +111,15 @@ struct nameidata { /* * Arguments to lookup. */ -u_long cn_nameiop; /* namei operation */ -u_long cn_flags; /* flags to namei */ +uint32_t cn_nameiop;/* namei operation */ +uint32_t cn_flags; /* flags to namei */ kauth_cred_t cn_cred; /* credentials */ /* * Shared between lookup and commit routines. */ -char*cn_pnbuf; /* pathname buffer */ const char *cn_nameptr; /* pointer to looked up name */ -longcn_namelen; /* length of looked up component */ -u_long cn_hash;/* hash value of looked up name */ -longcn_consume; /* chars to consume in lookup() */ +size_t cn_namelen; /* length of looked up component */ +size_t cn_consume; /* chars to consume in lookup() */ } ni_cnd; }; .Ed Index: src/share/man/man9/vnodeops.9 diff -u src/share/man/man9/vnodeops.9:1.87 src/share/man/man9/vnodeops.9:1.88 --- src/share/man/man9/vnodeops.9:1.87 Mon Oct 1 20:49:30 2012 +++ src/share/man/man9/vnodeops.9 Mon Nov 5 17:30:37 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: vnodeops.9,v 1.87 2012/10/01 20:49:30 wiz Exp $ +.\" $NetBSD: vnodeops.9,v 1.88 2012/11/05 17:30:37 dholland Exp $ .\" .\" Copyright (c) 2001, 2005, 2006 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -297,10 +297,8 @@ struct componentname { /* * Shared between lookup and commit routines. */ -char*cn_pnbuf; /* pathname buffer */ const char *cn_nameptr; /* pointer to looked up name */ size_t cn_namelen; /* length of looked up component */ -u_long cn_hash;/* hash value of looked up name */ size_t cn_consume; /* chars to consume in lookup() */ }; .Ed
CVS commit: src/sys/sys
Module Name:src Committed By: dholland Date: Mon Nov 5 17:28:54 UTC 2012 Modified Files: src/sys/sys: param.h Log Message: 6.99.15: namecache cleanup.CVS: -- To generate a diff of this commit: cvs rdiff -u -r1.422 -r1.423 src/sys/sys/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/param.h diff -u src/sys/sys/param.h:1.422 src/sys/sys/param.h:1.423 --- src/sys/sys/param.h:1.422 Fri Oct 19 16:49:21 2012 +++ src/sys/sys/param.h Mon Nov 5 17:28:53 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.422 2012/10/19 16:49:21 apb Exp $ */ +/* $NetBSD: param.h,v 1.423 2012/11/05 17:28:53 dholland Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -63,7 +63,7 @@ * 2.99.9 (299000900) */ -#define __NetBSD_Version__ 699001400 /* NetBSD 6.99.14 */ +#define __NetBSD_Version__ 699001500 /* NetBSD 6.99.15 */ #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \ (m) * 100) + (p) * 100) <= __NetBSD_Version__)
CVS commit: src/sys
Module Name:src Committed By: dholland Date: Mon Nov 5 17:27:53 UTC 2012 Modified Files: src/sys/rump/include/rump: rump_namei.h src/sys/sys: namei.h Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/rump/include/rump/rump_namei.h cvs rdiff -u -r1.83 -r1.84 src/sys/sys/namei.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/include/rump/rump_namei.h diff -u src/sys/rump/include/rump/rump_namei.h:1.19 src/sys/rump/include/rump/rump_namei.h:1.20 --- src/sys/rump/include/rump/rump_namei.h:1.19 Mon Nov 5 17:24:39 2012 +++ src/sys/rump/include/rump/rump_namei.h Mon Nov 5 17:27:53 2012 @@ -1,11 +1,11 @@ -/* $NetBSD: rump_namei.h,v 1.19 2012/11/05 17:24:39 dholland Exp $ */ +/* $NetBSD: rump_namei.h,v 1.20 2012/11/05 17:27:53 dholland Exp $ */ /* * WARNING: GENERATED FILE. DO NOT EDIT * (edit namei.src and run make namei in src/sys/sys) * by: NetBSD: gennameih.awk,v 1.5 2009/12/23 14:17:19 pooka Exp - * from: NetBSD: namei.src,v 1.28 2012/11/05 17:24:09 dholland Exp + * from: NetBSD: namei.src,v 1.29 2012/11/05 17:27:37 dholland Exp */ #ifndef _RUMP_RUMP_NAMEI_H_ Index: src/sys/sys/namei.h diff -u src/sys/sys/namei.h:1.83 src/sys/sys/namei.h:1.84 --- src/sys/sys/namei.h:1.83 Mon Nov 5 17:24:39 2012 +++ src/sys/sys/namei.h Mon Nov 5 17:27:52 2012 @@ -1,11 +1,11 @@ -/* $NetBSD: namei.h,v 1.83 2012/11/05 17:24:39 dholland Exp $ */ +/* $NetBSD: namei.h,v 1.84 2012/11/05 17:27:52 dholland Exp $ */ /* * WARNING: GENERATED FILE. DO NOT EDIT * (edit namei.src and run make namei in src/sys/sys) * by: NetBSD: gennameih.awk,v 1.5 2009/12/23 14:17:19 pooka Exp - * from: NetBSD: namei.src,v 1.28 2012/11/05 17:24:09 dholland Exp + * from: NetBSD: namei.src,v 1.29 2012/11/05 17:27:37 dholland Exp */ /* @@ -267,16 +267,17 @@ uint32_t namei_hash(const char *, const int lookup_for_nfsd(struct nameidata *, struct vnode *, int neverfollow); int lookup_for_nfsd_index(struct nameidata *, struct vnode *); int relookup(struct vnode *, struct vnode **, struct componentname *, int); -void cache_purge1(struct vnode *, const struct componentname *, int); +void cache_purge1(struct vnode *, const char *, size_t, int); #define PURGE_PARENTS 1 #define PURGE_CHILDREN 2 -#define cache_purge(vp) cache_purge1((vp), NULL, PURGE_PARENTS|PURGE_CHILDREN) -int cache_lookup(struct vnode *, const struct componentname *, +#define cache_purge(vp) cache_purge1((vp),NULL,0,PURGE_PARENTS|PURGE_CHILDREN) +int cache_lookup(struct vnode *, const char *, size_t, uint32_t, uint32_t, int *, struct vnode **); -int cache_lookup_raw(struct vnode *, const struct componentname *, +int cache_lookup_raw(struct vnode *, const char *, size_t, uint32_t, int *, struct vnode **); int cache_revlookup(struct vnode *, struct vnode **, char **, char *); -void cache_enter(struct vnode *, struct vnode *, struct componentname *); +void cache_enter(struct vnode *, struct vnode *, + const char *, size_t, uint32_t); void nchinit(void); void nchreinit(void); void cache_cpu_init(struct cpu_info *);
CVS commit: src/sys
Module Name:src Committed By: dholland Date: Mon Nov 5 17:27:40 UTC 2012 Modified Files: src/sys/fs/adosfs: adlookup.c src/sys/fs/cd9660: cd9660_lookup.c src/sys/fs/efs: efs_vnops.c src/sys/fs/filecorefs: filecore_lookup.c src/sys/fs/msdosfs: msdosfs_lookup.c src/sys/fs/nilfs: nilfs_vnops.c src/sys/fs/ntfs: ntfs_vnops.c src/sys/fs/puffs: puffs_msgif.c puffs_node.c puffs_vnops.c src/sys/fs/smbfs: smbfs_vnops.c src/sys/fs/tmpfs: tmpfs_vnops.c src/sys/fs/udf: udf_vnops.c src/sys/fs/unionfs: unionfs_vnops.c src/sys/kern: vfs_cache.c src/sys/nfs: nfs_vnops.c src/sys/sys: namei.src src/sys/ufs/chfs: chfs_vnops.c src/sys/ufs/ext2fs: ext2fs_lookup.c src/sys/ufs/ufs: ufs_lookup.c Log Message: Excise struct componentname from the namecache. This uglifies the interface, because several operations need to be passed the namei flags and cache_lookup also needs for the time being to be passed cnp->cn_nameiop. Nonetheless, it's a net benefit. The glop should be able to go away eventually but requires structural cleanup elsewhere first. This change requires a kernel bump. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/fs/adosfs/adlookup.c cvs rdiff -u -r1.21 -r1.22 src/sys/fs/cd9660/cd9660_lookup.c cvs rdiff -u -r1.27 -r1.28 src/sys/fs/efs/efs_vnops.c cvs rdiff -u -r1.15 -r1.16 src/sys/fs/filecorefs/filecore_lookup.c cvs rdiff -u -r1.25 -r1.26 src/sys/fs/msdosfs/msdosfs_lookup.c cvs rdiff -u -r1.19 -r1.20 src/sys/fs/nilfs/nilfs_vnops.c cvs rdiff -u -r1.53 -r1.54 src/sys/fs/ntfs/ntfs_vnops.c cvs rdiff -u -r1.92 -r1.93 src/sys/fs/puffs/puffs_msgif.c cvs rdiff -u -r1.27 -r1.28 src/sys/fs/puffs/puffs_node.c cvs rdiff -u -r1.175 -r1.176 src/sys/fs/puffs/puffs_vnops.c cvs rdiff -u -r1.81 -r1.82 src/sys/fs/smbfs/smbfs_vnops.c cvs rdiff -u -r1.99 -r1.100 src/sys/fs/tmpfs/tmpfs_vnops.c cvs rdiff -u -r1.73 -r1.74 src/sys/fs/udf/udf_vnops.c cvs rdiff -u -r1.6 -r1.7 src/sys/fs/unionfs/unionfs_vnops.c cvs rdiff -u -r1.90 -r1.91 src/sys/kern/vfs_cache.c cvs rdiff -u -r1.296 -r1.297 src/sys/nfs/nfs_vnops.c cvs rdiff -u -r1.28 -r1.29 src/sys/sys/namei.src cvs rdiff -u -r1.12 -r1.13 src/sys/ufs/chfs/chfs_vnops.c cvs rdiff -u -r1.71 -r1.72 src/sys/ufs/ext2fs/ext2fs_lookup.c cvs rdiff -u -r1.119 -r1.120 src/sys/ufs/ufs/ufs_lookup.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/fs/adosfs/adlookup.c diff -u src/sys/fs/adosfs/adlookup.c:1.17 src/sys/fs/adosfs/adlookup.c:1.18 --- src/sys/fs/adosfs/adlookup.c:1.17 Mon Nov 5 17:24:09 2012 +++ src/sys/fs/adosfs/adlookup.c Mon Nov 5 17:27:37 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: adlookup.c,v 1.17 2012/11/05 17:24:09 dholland Exp $ */ +/* $NetBSD: adlookup.c,v 1.18 2012/11/05 17:27:37 dholland Exp $ */ /* * Copyright (c) 1994 Christian E. Hopps @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: adlookup.c,v 1.17 2012/11/05 17:24:09 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: adlookup.c,v 1.18 2012/11/05 17:27:37 dholland Exp $"); #include #include @@ -110,7 +110,8 @@ adosfs_lookup(void *v) * check the name cache to see if the directory/name pair * we are looking for is known already. */ - if (cache_lookup(vdp, cnp, NULL, vpp)) { + if (cache_lookup(vdp, cnp->cn_nameptr, cnp->cn_namelen, + cnp->cn_nameiop, cnp->cn_flags, NULL, vpp)) { return *vpp == NULLVP ? ENOENT : 0; } @@ -212,7 +213,8 @@ adosfs_lookup(void *v) return(EJUSTRETURN); } if (nameiop != CREATE) - cache_enter(vdp, NULL, cnp); + cache_enter(vdp, NULL, cnp->cn_nameptr, cnp->cn_namelen, + cnp->cn_flags); #ifdef ADOSFS_DIAGNOSTIC printf("ENOENT)"); #endif @@ -242,7 +244,8 @@ found: vref(vdp); found_lockdone: if (nocache == 0) - cache_enter(vdp, *vpp, cnp); + cache_enter(vdp, *vpp, cnp->cn_nameptr, cnp->cn_namelen, + cnp->cn_flags); #ifdef ADOSFS_DIAGNOSTIC printf("0)\n"); Index: src/sys/fs/cd9660/cd9660_lookup.c diff -u src/sys/fs/cd9660/cd9660_lookup.c:1.21 src/sys/fs/cd9660/cd9660_lookup.c:1.22 --- src/sys/fs/cd9660/cd9660_lookup.c:1.21 Mon Nov 5 17:24:09 2012 +++ src/sys/fs/cd9660/cd9660_lookup.c Mon Nov 5 17:27:37 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: cd9660_lookup.c,v 1.21 2012/11/05 17:24:09 dholland Exp $ */ +/* $NetBSD: cd9660_lookup.c,v 1.22 2012/11/05 17:27:37 dholland Exp $ */ /*- * Copyright (c) 1989, 1993, 1994 @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cd9660_lookup.c,v 1.21 2012/11/05 17:24:09 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cd9660_lookup.c,v 1.22 2012/11/05 17:27:37 dholland Exp $"); #include #include @@ -151,7 +151,8 @@ cd9660_lookup(void *v) * check the name cache to see if the directory/name pair * we are looking for is known already. */ - if (cache_lookup(vdp, cnp, NULL, vpp)) { + if (cache_lookup(vdp,
CVS commit: src/sys
Module Name:src Committed By: dholland Date: Mon Nov 5 17:24:39 UTC 2012 Modified Files: src/sys/rump/include/rump: rump_namei.h src/sys/sys: namei.h Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/rump/include/rump/rump_namei.h cvs rdiff -u -r1.82 -r1.83 src/sys/sys/namei.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/include/rump/rump_namei.h diff -u src/sys/rump/include/rump/rump_namei.h:1.18 src/sys/rump/include/rump/rump_namei.h:1.19 --- src/sys/rump/include/rump/rump_namei.h:1.18 Sat Oct 13 17:47:11 2012 +++ src/sys/rump/include/rump/rump_namei.h Mon Nov 5 17:24:39 2012 @@ -1,11 +1,11 @@ -/* $NetBSD: rump_namei.h,v 1.18 2012/10/13 17:47:11 dholland Exp $ */ +/* $NetBSD: rump_namei.h,v 1.19 2012/11/05 17:24:39 dholland Exp $ */ /* * WARNING: GENERATED FILE. DO NOT EDIT * (edit namei.src and run make namei in src/sys/sys) * by: NetBSD: gennameih.awk,v 1.5 2009/12/23 14:17:19 pooka Exp - * from: NetBSD: namei.src,v 1.27 2012/10/13 17:46:50 dholland Exp + * from: NetBSD: namei.src,v 1.28 2012/11/05 17:24:09 dholland Exp */ #ifndef _RUMP_RUMP_NAMEI_H_ Index: src/sys/sys/namei.h diff -u src/sys/sys/namei.h:1.82 src/sys/sys/namei.h:1.83 --- src/sys/sys/namei.h:1.82 Sat Oct 13 17:47:11 2012 +++ src/sys/sys/namei.h Mon Nov 5 17:24:39 2012 @@ -1,11 +1,11 @@ -/* $NetBSD: namei.h,v 1.82 2012/10/13 17:47:11 dholland Exp $ */ +/* $NetBSD: namei.h,v 1.83 2012/11/05 17:24:39 dholland Exp $ */ /* * WARNING: GENERATED FILE. DO NOT EDIT * (edit namei.src and run make namei in src/sys/sys) * by: NetBSD: gennameih.awk,v 1.5 2009/12/23 14:17:19 pooka Exp - * from: NetBSD: namei.src,v 1.27 2012/10/13 17:46:50 dholland Exp + * from: NetBSD: namei.src,v 1.28 2012/11/05 17:24:09 dholland Exp */ /* @@ -127,7 +127,6 @@ struct nameidata { */ const char *cn_nameptr; /* pointer to looked up name */ size_t cn_namelen; /* length of looked up comp */ - u_long cn_hash; /* hash val of looked up name */ size_t cn_consume; /* chars to consume in lookup */ } ni_cnd; }; @@ -272,9 +271,10 @@ void cache_purge1(struct vnode *, const #define PURGE_PARENTS 1 #define PURGE_CHILDREN 2 #define cache_purge(vp) cache_purge1((vp), NULL, PURGE_PARENTS|PURGE_CHILDREN) -int cache_lookup(struct vnode *, struct vnode **, struct componentname *); -int cache_lookup_raw(struct vnode *, struct vnode **, - struct componentname *); +int cache_lookup(struct vnode *, const struct componentname *, + int *, struct vnode **); +int cache_lookup_raw(struct vnode *, const struct componentname *, + int *, struct vnode **); int cache_revlookup(struct vnode *, struct vnode **, char **, char *); void cache_enter(struct vnode *, struct vnode *, struct componentname *); void nchinit(void);
CVS commit: src/sys
Module Name:src Committed By: dholland Date: Mon Nov 5 17:24:12 UTC 2012 Modified Files: src/sys/fs/adosfs: adlookup.c src/sys/fs/cd9660: cd9660_lookup.c src/sys/fs/efs: efs_vnops.c src/sys/fs/filecorefs: filecore_lookup.c src/sys/fs/msdosfs: msdosfs_lookup.c src/sys/fs/nilfs: nilfs_vnops.c src/sys/fs/ntfs: ntfs_vnops.c src/sys/fs/puffs: puffs_vnops.c src/sys/fs/smbfs: smbfs_vnops.c src/sys/fs/tmpfs: tmpfs_vnops.c src/sys/fs/udf: udf_vnops.c src/sys/fs/union: union.h union_subr.c src/sys/kern: vfs_cache.c vfs_getcwd.c vfs_lookup.c src/sys/nfs: nfs_vnops.c src/sys/rump/librump/rumpvfs: rump_vfs.c src/sys/sys: namei.src src/sys/ufs/chfs: chfs_vnops.c src/sys/ufs/ext2fs: ext2fs_lookup.c src/sys/ufs/ufs: ufs_lookup.c Log Message: Disentangle the namecache from the internals of namei. - Move the namecache's hash computation to inside the namecache code, instead of being spread out all over the place. Remove cn_hash from struct componentname and delete all uses of it. - It is no longer necessary (if it ever was) for cache_lookup and cache_lookup_raw to clear MAKEENTRY from cnp->cn_flags for the cases that cache_enter already checks for. - Rearrange the interface of cache_lookup (and cache_lookup_raw) to make it somewhat simpler, to exclude certain nonexistent error conditions, and (most importantly) to make it not require write access to cnp->cn_flags. This change requires a kernel bump. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/fs/adosfs/adlookup.c cvs rdiff -u -r1.20 -r1.21 src/sys/fs/cd9660/cd9660_lookup.c cvs rdiff -u -r1.26 -r1.27 src/sys/fs/efs/efs_vnops.c cvs rdiff -u -r1.14 -r1.15 src/sys/fs/filecorefs/filecore_lookup.c cvs rdiff -u -r1.24 -r1.25 src/sys/fs/msdosfs/msdosfs_lookup.c cvs rdiff -u -r1.18 -r1.19 src/sys/fs/nilfs/nilfs_vnops.c cvs rdiff -u -r1.52 -r1.53 src/sys/fs/ntfs/ntfs_vnops.c cvs rdiff -u -r1.174 -r1.175 src/sys/fs/puffs/puffs_vnops.c cvs rdiff -u -r1.80 -r1.81 src/sys/fs/smbfs/smbfs_vnops.c cvs rdiff -u -r1.98 -r1.99 src/sys/fs/tmpfs/tmpfs_vnops.c cvs rdiff -u -r1.72 -r1.73 src/sys/fs/udf/udf_vnops.c cvs rdiff -u -r1.23 -r1.24 src/sys/fs/union/union.h cvs rdiff -u -r1.55 -r1.56 src/sys/fs/union/union_subr.c cvs rdiff -u -r1.89 -r1.90 src/sys/kern/vfs_cache.c cvs rdiff -u -r1.47 -r1.48 src/sys/kern/vfs_getcwd.c cvs rdiff -u -r1.196 -r1.197 src/sys/kern/vfs_lookup.c cvs rdiff -u -r1.295 -r1.296 src/sys/nfs/nfs_vnops.c cvs rdiff -u -r1.67 -r1.68 src/sys/rump/librump/rumpvfs/rump_vfs.c cvs rdiff -u -r1.27 -r1.28 src/sys/sys/namei.src cvs rdiff -u -r1.11 -r1.12 src/sys/ufs/chfs/chfs_vnops.c cvs rdiff -u -r1.70 -r1.71 src/sys/ufs/ext2fs/ext2fs_lookup.c cvs rdiff -u -r1.118 -r1.119 src/sys/ufs/ufs/ufs_lookup.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/fs/adosfs/adlookup.c diff -u src/sys/fs/adosfs/adlookup.c:1.16 src/sys/fs/adosfs/adlookup.c:1.17 --- src/sys/fs/adosfs/adlookup.c:1.16 Sun Jul 22 00:53:18 2012 +++ src/sys/fs/adosfs/adlookup.c Mon Nov 5 17:24:09 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: adlookup.c,v 1.16 2012/07/22 00:53:18 rmind Exp $ */ +/* $NetBSD: adlookup.c,v 1.17 2012/11/05 17:24:09 dholland Exp $ */ /* * Copyright (c) 1994 Christian E. Hopps @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: adlookup.c,v 1.16 2012/07/22 00:53:18 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: adlookup.c,v 1.17 2012/11/05 17:24:09 dholland Exp $"); #include #include @@ -110,8 +110,9 @@ adosfs_lookup(void *v) * check the name cache to see if the directory/name pair * we are looking for is known already. */ - if ((error = cache_lookup(vdp, vpp, cnp)) >= 0) - return (error); + if (cache_lookup(vdp, cnp, NULL, vpp)) { + return *vpp == NULLVP ? ENOENT : 0; + } /* * fake a '.' Index: src/sys/fs/cd9660/cd9660_lookup.c diff -u src/sys/fs/cd9660/cd9660_lookup.c:1.20 src/sys/fs/cd9660/cd9660_lookup.c:1.21 --- src/sys/fs/cd9660/cd9660_lookup.c:1.20 Sun Jul 22 00:53:18 2012 +++ src/sys/fs/cd9660/cd9660_lookup.c Mon Nov 5 17:24:09 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: cd9660_lookup.c,v 1.20 2012/07/22 00:53:18 rmind Exp $ */ +/* $NetBSD: cd9660_lookup.c,v 1.21 2012/11/05 17:24:09 dholland Exp $ */ /*- * Copyright (c) 1989, 1993, 1994 @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cd9660_lookup.c,v 1.20 2012/07/22 00:53:18 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cd9660_lookup.c,v 1.21 2012/11/05 17:24:09 dholland Exp $"); #include #include @@ -151,8 +151,9 @@ cd9660_lookup(void *v) * check the name cache to see if the directory/name pair * we are looking for is known already. */ - if ((error = cache_lookup(vdp, vpp, cnp)) >= 0) - return (error); + if (cache_lookup(vdp, cnp, NULL, vpp)) { + return *vpp == NULLVP ? ENOENT : 0;
CVS commit: src/sys/fs/unionfs
Module Name:src Committed By: dholland Date: Mon Nov 5 17:16:59 UTC 2012 Modified Files: src/sys/fs/unionfs: unionfs_vfsops.c Log Message: Fix build of fs/unionfs (the extra unused copy of onionfs) for the quota changes. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/fs/unionfs/unionfs_vfsops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/fs/unionfs/unionfs_vfsops.c diff -u src/sys/fs/unionfs/unionfs_vfsops.c:1.9 src/sys/fs/unionfs/unionfs_vfsops.c:1.10 --- src/sys/fs/unionfs/unionfs_vfsops.c:1.9 Sun Mar 6 17:08:35 2011 +++ src/sys/fs/unionfs/unionfs_vfsops.c Mon Nov 5 17:16:59 2012 @@ -371,7 +371,7 @@ unionfs_root(struct mount *mp, struct vn } int -unionfs_quotactl(struct mount *mp, prop_dictionary_t dict) +unionfs_quotactl(struct mount *mp, struct quotactl_args *args) { struct unionfs_mount *ump; @@ -380,7 +380,7 @@ unionfs_quotactl(struct mount *mp, prop_ /* * Writing is always performed to upper vnode. */ - return (VFS_QUOTACTL(ump->um_uppervp->v_mount, dict)); + return (VFS_QUOTACTL(ump->um_uppervp->v_mount, args)); } int
CVS commit: src/sys/sys
Module Name:src Committed By: dholland Date: Mon Nov 5 17:16:18 UTC 2012 Modified Files: src/sys/sys: mount.h Log Message: Fix the prototype of vfs_quotactl() implementations in VFS_PROTOS(), since it's wrong there. This slipped by because the only implementation is in ufs, which isn't under a VFS_PROTOS declaration. To generate a diff of this commit: cvs rdiff -u -r1.207 -r1.208 src/sys/sys/mount.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/mount.h diff -u src/sys/sys/mount.h:1.207 src/sys/sys/mount.h:1.208 --- src/sys/sys/mount.h:1.207 Wed Feb 1 05:34:42 2012 +++ src/sys/sys/mount.h Mon Nov 5 17:16:18 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: mount.h,v 1.207 2012/02/01 05:34:42 dholland Exp $ */ +/* $NetBSD: mount.h,v 1.208 2012/11/05 17:16:18 dholland Exp $ */ /* * Copyright (c) 1989, 1991, 1993 @@ -277,7 +277,7 @@ int fsname##_mount(struct mount *, const int fsname##_start(struct mount *, int);\ int fsname##_unmount(struct mount *, int);\ int fsname##_root(struct mount *, struct vnode **); \ -int fsname##_quotactl(struct mount *, int, struct quotactl_args *); \ +int fsname##_quotactl(struct mount *, struct quotactl_args *); \ int fsname##_statvfs(struct mount *, struct statvfs *); \ int fsname##_sync(struct mount *, int, struct kauth_cred *); \ int fsname##_vget(struct mount *, ino_t, struct vnode **); \
CVS commit: src/sys/arch/next68k/stand/boot
Module Name:src Committed By: apb Date: Mon Nov 5 16:53:25 UTC 2012 Modified Files: src/sys/arch/next68k/stand/boot: Makefile Log Message: Revert previous. This boot loader has its own version number, independent of the kernel version. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/next68k/stand/boot/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/next68k/stand/boot/Makefile diff -u src/sys/arch/next68k/stand/boot/Makefile:1.25 src/sys/arch/next68k/stand/boot/Makefile:1.26 --- src/sys/arch/next68k/stand/boot/Makefile:1.25 Sun Nov 4 11:12:31 2012 +++ src/sys/arch/next68k/stand/boot/Makefile Mon Nov 5 16:53:25 2012 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.25 2012/11/04 11:12:31 apb Exp $ +# $NetBSD: Makefile,v 1.26 2012/11/05 16:53:25 apb Exp $ NOMAN= # defined @@ -77,10 +77,10 @@ srt0.o: ${.CURDIR}/srt0.s ${CC} -m68040 -x assembler-with-cpp ${INCLUDES} ${DEFS} -c ${.CURDIR}/srt0.s .PHONY: build.c -build.c: ${_NETBSD_VERSION_DEPENDS} +build.c: ${HOST_SH} ${.CURDIR}/newvers.sh -vers.c: version ${_NETBSD_VERSION_DEPENDS} +vers.c: version ${HOST_SH} ${S}/conf/newvers_stand.sh ${.CURDIR}/version "next68k" #installboot: ${.CURDIR}/installboot.sh
CVS commit: src/sys/arch/ia64/ia64
Module Name:src Committed By: chs Date: Mon Nov 5 15:14:34 UTC 2012 Modified Files: src/sys/arch/ia64/ia64: syscall.c Log Message: add a cpu_spawn_return() that just calls userret(). To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/ia64/ia64/syscall.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/ia64/ia64/syscall.c diff -u src/sys/arch/ia64/ia64/syscall.c:1.5 src/sys/arch/ia64/ia64/syscall.c:1.6 --- src/sys/arch/ia64/ia64/syscall.c:1.5 Sat Jan 23 06:20:31 2010 +++ src/sys/arch/ia64/ia64/syscall.c Mon Nov 5 15:14:34 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: syscall.c,v 1.5 2010/01/23 06:20:31 kiyohara Exp $ */ +/* $NetBSD: syscall.c,v 1.6 2012/11/05 15:14:34 chs Exp $ */ /* * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -32,13 +32,14 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.5 2010/01/23 06:20:31 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.6 2012/11/05 15:14:34 chs Exp $"); #include #include #include #include +#include void syscall_intern(struct proc *); void syscall_plain(struct lwp *, u_int64_t, struct trapframe *); @@ -80,3 +81,13 @@ child_return(void *arg) printf("%s: not yet\n", __func__); return; } + +/* + * Process the tail end of a posix_spawn() for the child. + */ +void +cpu_spawn_return(struct lwp *l) +{ + + userret(l); +}
CVS commit: src/sys/arch/ia64/ia64
Module Name:src Committed By: chs Date: Mon Nov 5 15:13:04 UTC 2012 Modified Files: src/sys/arch/ia64/ia64: machdep.c Log Message: add a stub cpu_mcontext_validate(). To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/arch/ia64/ia64/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/ia64/ia64/machdep.c diff -u src/sys/arch/ia64/ia64/machdep.c:1.32 src/sys/arch/ia64/ia64/machdep.c:1.33 --- src/sys/arch/ia64/ia64/machdep.c:1.32 Sat Jul 28 19:08:24 2012 +++ src/sys/arch/ia64/ia64/machdep.c Mon Nov 5 15:13:04 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.32 2012/07/28 19:08:24 matt Exp $ */ +/* $NetBSD: machdep.c,v 1.33 2012/11/05 15:13:04 chs Exp $ */ /*- * Copyright (c) 2003,2004 Marcel Moolenaar @@ -787,6 +787,12 @@ cpu_setmcontext(struct lwp *l, const mco } int +cpu_mcontext_validate(struct lwp *l, const mcontext_t *mcp) +{ + return EINVAL; +} + +int mm_md_physacc(paddr_t pa, vm_prot_t prot) {
CVS commit: src/sys/arch/ia64/ia64
Module Name:src Committed By: chs Date: Mon Nov 5 15:11:37 UTC 2012 Modified Files: src/sys/arch/ia64/ia64: pmap.c Log Message: remove pmap_track_modified() since it references kmem globals that no longer exist. this check was a hold-over from freebsd, kmem pages on netbsd are not managed and thus mod/ref state is anyway not tracked. also remove commented-out assertions about pageq locking, this was another freebsd hold-over since pmaps do not use the pageq lock on netbsd. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/arch/ia64/ia64/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/ia64/ia64/pmap.c diff -u src/sys/arch/ia64/ia64/pmap.c:1.28 src/sys/arch/ia64/ia64/pmap.c:1.29 --- src/sys/arch/ia64/ia64/pmap.c:1.28 Fri Aug 31 14:31:46 2012 +++ src/sys/arch/ia64/ia64/pmap.c Mon Nov 5 15:11:36 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.28 2012/08/31 14:31:46 chs Exp $ */ +/* $NetBSD: pmap.c,v 1.29 2012/11/05 15:11:36 chs Exp $ */ /*- @@ -85,7 +85,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.28 2012/08/31 14:31:46 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.29 2012/11/05 15:11:36 chs Exp $"); #include #include @@ -273,9 +273,6 @@ pmap_remove_entry(pmap_t pmap, struct vm static void pmap_insert_entry(pmap_t pmap, vaddr_t va, struct vm_page *pg); -static __inline int -pmap_track_modified(vaddr_t va); - static void pmap_enter_vhpt(struct ia64_lpte *, vaddr_t); static int pmap_remove_vhpt(vaddr_t); @@ -1162,7 +1159,6 @@ pmap_protect(pmap_t pmap, vaddr_t sva, v if ((sva & PAGE_MASK) || (eva & PAGE_MASK)) panic("pmap_protect: unaligned addresses"); - //uvm_lock_pageq(); PMAP_LOCK(pmap); oldpmap = pmap_install(pmap); while (sva < eva) { @@ -1179,7 +1175,8 @@ pmap_protect(pmap_t pmap, vaddr_t sva, v if (pmap_managed(pte)) { pa = pmap_ppn(pte); pg = PHYS_TO_VM_PAGE(pa); -if (pmap_dirty(pte)) pmap_clear_dirty(pte); +if (pmap_dirty(pte)) + pmap_clear_dirty(pte); if (pmap_accessed(pte)) { pmap_clear_accessed(pte); } @@ -1190,7 +1187,6 @@ pmap_protect(pmap_t pmap, vaddr_t sva, v sva += PAGE_SIZE; } - //uvm_unlock_pageq(); pmap_install(oldpmap); PMAP_UNLOCK(pmap); } @@ -1286,8 +1282,6 @@ pmap_page_protect(struct vm_page *pg, vm PMAP_UNLOCK(pmap); } - //UVM_LOCK_ASSERT_PAGEQ(); - pg->flags |= PG_RDONLY; } else { pmap_page_purge(pg); @@ -1425,7 +1419,7 @@ pmap_enter(pmap_t pmap, vaddr_t va, padd * We might be turning off write access to the page, * so we go ahead and sense modify status. */ -if (managed && pmap_dirty(&origpte) && pmap_track_modified(va)) +if (managed && pmap_dirty(&origpte)) pg->flags &= ~PG_CLEAN; pmap_invalidate_page(pmap, va); @@ -1494,8 +1488,6 @@ pmap_page_purge(struct vm_page *pg) pmap_t oldpmap; pv_entry_t pv; - //UVM_LOCK_ASSERT_PAGEQ(); - while ((pv = TAILQ_FIRST(&md->pv_list)) != NULL) { struct ia64_lpte *pte; pmap_t pmap = pv->pv_pmap; @@ -1512,7 +1504,6 @@ pmap_page_purge(struct vm_page *pg) PMAP_UNLOCK(pmap); } - //UVM_LOCK_ASSERT_PAGEQ(); pg->flags |= PG_RDONLY; } @@ -1766,8 +1757,7 @@ pmap_remove_pte(pmap_t pmap, struct ia64 if (pmap_managed(pte)) { pg = PHYS_TO_VM_PAGE(pmap_ppn(pte)); if (pmap_dirty(pte)) - if (pmap_track_modified(va)) -pg->flags &= ~(PG_CLEAN); + pg->flags &= ~(PG_CLEAN); if (pmap_accessed(pte)) pg->flags &= ~PG_CLEAN; /* XXX: Do we need this ? */ @@ -1801,21 +1791,6 @@ pmap_free_pte(struct ia64_lpte *pte, vad } -/* - * this routine defines the region(s) of memory that should - * not be tested for the modified bit. - */ -static __inline int -pmap_track_modified(vaddr_t va) -{ - extern char *kmembase, kmemlimit; - if ((va < (vaddr_t) kmembase) || (va >= (vaddr_t) kmemlimit)) - return 1; - else - return 0; -} - - /*** * page management routines. ***/ @@ -1837,7 +1812,6 @@ get_pv_entry(pmap_t locked_pmap) pv_entry_t allocated_pv; //LOCK_ASSERT(simple_lock_held(locked_pmap->slock)); - //UVM_LOCK_ASSERT_PAGEQ(); allocated_pv = pool_get(&pmap_pv_pool, PR_NOWAIT); return allocated_pv; @@ -1985,7 +1959,6 @@ pmap_remove_entry(pmap_t pmap, struct vm TAILQ_REMOVE(&md->pv_list, pv, pv_list); md->pv_list_count--; if (TAILQ_FIRST(&md->pv_list) == NULL) { - //UVM_LOCK_ASSERT_PAGEQ(); pg->flags |= PG_RDONLY; } @@ -2013,7 +1986,6 @@ pmap_insert_entry(pmap_t pmap, vaddr_t v pv->pv_va = va; //LOCK_ASSERT(simple_lock_held(pmap->slock)); - //UVM_LOCK_ASSERT_PAGEQ(); TAILQ_INSERT_TAIL(&pmap->pm_pvlist, pv, pv_plist); TAILQ_INSERT_TA
CVS commit: src/distrib/sets/lists/tests
Module Name:src Committed By: alnsn Date: Mon Nov 5 08:07:11 UTC 2012 Modified Files: src/distrib/sets/lists/tests: mi Log Message: Untie libsljit directory from MKSLJIT. To generate a diff of this commit: cvs rdiff -u -r1.499 -r1.500 src/distrib/sets/lists/tests/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.499 src/distrib/sets/lists/tests/mi:1.500 --- src/distrib/sets/lists/tests/mi:1.499 Mon Nov 5 04:09:34 2012 +++ src/distrib/sets/lists/tests/mi Mon Nov 5 08:07:11 2012 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.499 2012/11/05 04:09:34 pgoyette Exp $ +# $NetBSD: mi,v 1.500 2012/11/05 08:07:11 alnsn Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -2755,7 +2755,7 @@ ./usr/tests/lib/libskeytests-lib-tests atf ./usr/tests/lib/libskey/Atffile tests-lib-tests atf,skey ./usr/tests/lib/libskey/t_algorithms tests-lib-tests atf,skey -./usr/tests/lib/libsljit tests-lib-tests atf,sljit +./usr/tests/lib/libsljit tests-lib-tests atf ./usr/tests/lib/libsljit/Atffile tests-lib-tests atf,sljit ./usr/tests/lib/libsljit/h_sljit tests-lib-tests atf,sljit ./usr/tests/lib/libsljit/t_sljit tests-lib-tests atf,sljit