From owner-p4-projects@FreeBSD.ORG Sat Nov 25 12:13:37 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9353016A40F; Sat, 25 Nov 2006 12:13:36 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 45B5A16A4CA for ; Sat, 25 Nov 2006 12:13:36 +0000 (UTC) (envelope-from bushman@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6D3F243D49 for ; Sat, 25 Nov 2006 12:12:35 +0000 (GMT) (envelope-from bushman@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAPCDMZ7053172 for ; Sat, 25 Nov 2006 12:13:22 GMT (envelope-from bushman@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAPCDL8U053167 for perforce@freebsd.org; Sat, 25 Nov 2006 12:13:21 GMT (envelope-from bushman@freebsd.org) Date: Sat, 25 Nov 2006 12:13:21 GMT Message-Id: <200611251213.kAPCDL8U053167@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bushman@freebsd.org using -f From: Michael Bushkov To: Perforce Change Reviews Cc: Subject: PERFORCE change 110512 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Nov 2006 12:13:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=110512 Change 110512 by bushman@bushman_nss_ldap_cached on 2006/11/25 12:12:41 IFC Affected files ... .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/sys/sendfile.2#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.bin/banner/banner.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.bin/pkill/pkill.1#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.bin/pkill/pkill.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.bin/systat/vmstat.c#3 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.bin/usbhidctl/usbhid.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.bin/usbhidctl/usbhidctl.1#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.bin/vmstat/vmstat.c#3 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/crunch/crunchgen/crunchgen.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/crunch/examples/really-big.conf#3 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/freebsd-update/freebsd-update.sh#3 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/jail/jail.8#4 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/sysinstall/config.c#4 integrate Differences ... ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/sys/sendfile.2#2 (text+ko) ==== @@ -23,9 +23,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/sys/sendfile.2,v 1.30 2005/11/17 13:00:00 ru Exp $ +.\" $FreeBSD: src/lib/libc/sys/sendfile.2,v 1.31 2006/11/24 11:44:19 yar Exp $ .\" -.Dd October 31, 2005 +.Dd November 24, 2006 .Dt SENDFILE 2 .Os .Sh NAME @@ -130,7 +130,7 @@ .Fn sendfile is "zero-copy", meaning that it has been optimized so that copying of the file data is avoided. .Sh TUNING -Internally, this system call uses a special +On some architectures, this system call internally uses a special .Fn sendfile buffer .Pq Vt "struct sf_buf" @@ -184,6 +184,13 @@ buffers usage respectively. These values may also be viewed through .Nm netstat Fl m . +.Pp +If a value of zero is reported for +.Va kern.ipc.nsfbufs , +your architecture does not need to use +.Fn sendfile +buffers because their task can be efficiently performed +by the generic virtual memory structures. .Sh RETURN VALUES .Rv -std sendfile .Sh ERRORS @@ -262,6 +269,16 @@ .Xr socket 2 , .Xr writev 2 , .Xr tuning 7 +.Rs +.%A K. Elmeleegy +.%A A. Chanda +.%A A. L. Cox +.%A W. Zwaenepoel +.%T A Portable Kernel Abstraction for Low-Overhead Ephemeral Mapping Management +.%J The Proceedings of the 2005 USENIX Annual Technical Conference +.%P pp 223-236 +.%D 2005 +.Re .Sh HISTORY The .Fn sendfile ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.bin/banner/banner.c#2 (text+ko) ==== @@ -44,7 +44,7 @@ #endif #include -__FBSDID("$FreeBSD: src/usr.bin/banner/banner.c,v 1.15 2002/03/22 01:19:22 imp Exp $"); +__FBSDID("$FreeBSD: src/usr.bin/banner/banner.c,v 1.16 2006/11/22 21:05:17 maxim Exp $"); /* * banner - prints large signs @@ -1045,7 +1045,7 @@ break; case 'w': width = atoi(optarg); - if (width <= 0) + if (width <= 0 || width > DWIDTH) errx(1, "illegal argument for -w option"); break; case '?': @@ -1056,7 +1056,7 @@ argv += optind; for (i = 0; i < width; i++) { - j = i * 132 / width; + j = i * DWIDTH / width; print[j] = 1; } ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.bin/pkill/pkill.1#2 (text+ko) ==== @@ -1,6 +1,6 @@ .\" $NetBSD: pkill.1,v 1.8 2003/02/14 15:59:18 grant Exp $ .\" -.\" $FreeBSD: src/usr.bin/pkill/pkill.1,v 1.20 2005/11/18 10:36:29 ru Exp $ +.\" $FreeBSD: src/usr.bin/pkill/pkill.1,v 1.21 2006/11/23 11:55:17 yar Exp $ .\" .\" Copyright (c) 2002 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -36,7 +36,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 16, 2005 +.Dd November 23, 2006 .Dt PKILL 1 .Os .Sh NAME @@ -146,7 +146,12 @@ Restrict matches to processes inside jails with a jail ID in the comma-separated list .Ar jid . -The value zero is taken to mean any jail ID. +The value +.Dq Li any +matches processes in any jail. +The value +.Dq Li none +matches processes not in jail. .It Fl l Long output. Print the process name in addition to the process ID for each matching @@ -240,6 +245,18 @@ .It 3 An internal error occurred. .El +.Sh COMPATIBILITY +Historically the option +.Dq Fl j Li 0 +means any jail, although in other utilities such as +.Xr ps 1 +jail ID +.Li 0 +has the opposite meaning, not in jail. +Therefore +.Dq Fl j Li 0 +is deprecated, and its use is discouraged in favor of +.Dq Fl j Li any . .Sh SEE ALSO .Xr kill 1 , .Xr killall 1 , ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.bin/pkill/pkill.c#2 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/usr.bin/pkill/pkill.c,v 1.30 2005/11/16 11:03:00 pjd Exp $"); +__FBSDID("$FreeBSD: src/usr.bin/pkill/pkill.c,v 1.31 2006/11/23 11:55:17 yar Exp $"); #include #include @@ -84,6 +84,7 @@ LT_GROUP, LT_TTY, LT_PGRP, + LT_JID, LT_SID }; @@ -235,7 +236,7 @@ cflags |= REG_ICASE; break; case 'j': - makelist(&jidlist, LT_GENERIC, optarg); + makelist(&jidlist, LT_JID, optarg); criteria = 1; break; case 'l': @@ -451,12 +452,12 @@ } SLIST_FOREACH(li, &jidlist, li_chain) { - if (kp->ki_jid > 0) { - if (li->li_number == 0) - break; - if (kp->ki_jid == (int)li->li_number) - break; - } + /* A particular jail ID, including 0 (not in jail) */ + if (kp->ki_jid == (int)li->li_number) + break; + /* Any jail */ + if (kp->ki_jid > 0 && li->li_number == -1) + break; } if (SLIST_FIRST(&jidlist) != NULL && li == NULL) { selected[i] = 0; @@ -636,6 +637,14 @@ if (li->li_number == 0) li->li_number = getsid(mypid); break; + case LT_JID: + if (li->li_number < 0) + errx(STATUS_BADUSAGE, + "Negative jail ID `%s'", sp); + /* For compatibility with old -j */ + if (li->li_number == 0) + li->li_number = -1; /* any jail */ + break; case LT_TTY: usage(); /* NOTREACHED */ @@ -683,6 +692,15 @@ li->li_number = st.st_rdev; break; + case LT_JID: + if (strcmp(sp, "none") == 0) + li->li_number = 0; + else if (strcmp(sp, "any") == 0) + li->li_number = -1; + else if (*ep != '\0') + errx(STATUS_BADUSAGE, + "Invalid jail ID `%s'", sp); + break; default: usage(); } ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.bin/systat/vmstat.c#3 (text+ko) ==== @@ -33,7 +33,7 @@ #include -__FBSDID("$FreeBSD: src/usr.bin/systat/vmstat.c,v 1.81 2006/11/20 16:04:41 ru Exp $"); +__FBSDID("$FreeBSD: src/usr.bin/systat/vmstat.c,v 1.82 2006/11/23 11:51:23 ru Exp $"); #ifdef lint static const char sccsid[] = "@(#)vmstat.c 8.2 (Berkeley) 1/12/94"; @@ -747,11 +747,11 @@ addch(' '); return; } - snr = snprintf(b, sizeof(b), "%*zu", w, n); + snr = snprintf(b, sizeof(b), "%*ju", w, n); if (snr != w) - snr = snprintf(b, sizeof(b), "%*zuk", w - 1, n / 1000); + snr = snprintf(b, sizeof(b), "%*juk", w - 1, n / 1000); if (snr != w) - snr = snprintf(b, sizeof(b), "%*zuM", w - 1, n / 1000000); + snr = snprintf(b, sizeof(b), "%*juM", w - 1, n / 1000000); if (snr != w) { while (w-- > 0) addch('*'); ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.bin/usbhidctl/usbhid.c#2 (text+ko) ==== @@ -1,5 +1,5 @@ /* $NetBSD: usbhid.c,v 1.14 2000/07/03 02:51:37 matt Exp $ */ -/* $FreeBSD: src/usr.bin/usbhidctl/usbhid.c,v 1.9 2003/05/26 04:58:26 mdodd Exp $ */ +/* $FreeBSD: src/usr.bin/usbhidctl/usbhid.c,v 1.11 2006/11/23 05:07:32 grog Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -54,6 +54,7 @@ int verbose = 0; int all = 0; int noname = 0; +int hexdump = 0; static int reportid; char **names; @@ -94,8 +95,14 @@ { extern char *__progname; - fprintf(stderr, "usage: %s -f device [-l] [-n] [-r] [-t tablefile] [-v] name ...\n", __progname); - fprintf(stderr, " %s -f device [-l] [-n] [-r] [-t tablefile] [-v] -a\n", __progname); + fprintf(stderr, + "usage: %s -f device " + "[-l] [-n] [-r] [-t tablefile] [-v] [-x] name ...\n", + __progname); + fprintf(stderr, + " %s -f device " + "[-l] [-n] [-r] [-t tablefile] [-v] [-x] -a\n", + __progname); exit(1); } @@ -105,8 +112,8 @@ if ((h->flags & HIO_CONST) && !verbose) return; printf("%s size=%d count=%d page=%s usage=%s%s", label, - h->report_size, h->report_count, - hid_usage_page(HID_PAGE(h->usage)), + h->report_size, h->report_count, + hid_usage_page(HID_PAGE(h->usage)), hid_usage_in_page(h->usage), h->flags & HIO_CONST ? " Const" : ""); printf(", logical range %d..%d", @@ -130,7 +137,7 @@ switch (h.kind) { case hid_collection: printf("Collection page=%s usage=%s\n", - hid_usage_page(HID_PAGE(h.usage)), + hid_usage_page(HID_PAGE(h.usage)), hid_usage_in_page(h.usage)); break; case hid_endcollection: @@ -187,6 +194,8 @@ printf("%d", (int)data); else printf("%u", data); + if (hexdump) + printf(" [0x%x]", data); pos += h->report_size; } } @@ -204,7 +213,7 @@ char namebuf[10000], *namep; hids = 0; - for (d = hid_start_parse(rd, 1< -__FBSDID("$FreeBSD: src/usr.bin/vmstat/vmstat.c,v 1.95 2006/11/20 16:04:41 ru Exp $"); +__FBSDID("$FreeBSD: src/usr.bin/vmstat/vmstat.c,v 1.96 2006/11/23 11:47:34 ru Exp $"); #include #include @@ -579,8 +579,7 @@ total.t_rq - 1, total.t_dw + total.t_pw, total.t_sw); #define vmstat_pgtok(a) ((uintmax_t)(a) * (sum.v_page_size >> 10)) #define rate(x) (((x) + halfuptime) / uptime) /* round */ - (void)printf(" %7zu %6zu ", - vmstat_pgtok(total.t_avm), + (void)printf(" %7ju %6ju ", vmstat_pgtok(total.t_avm), vmstat_pgtok(total.t_free)); (void)printf("%5lu ", (unsigned long)rate(sum.v_vm_faults - osum.v_vm_faults)); ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/crunch/crunchgen/crunchgen.c#2 (text+ko) ==== @@ -23,7 +23,7 @@ * Computer Science Department * University of Maryland at College Park * - * $FreeBSD: src/usr.sbin/crunch/crunchgen/crunchgen.c,v 1.36 2005/12/23 15:31:37 ceri Exp $ + * $FreeBSD: src/usr.sbin/crunch/crunchgen/crunchgen.c,v 1.38 2006/11/24 03:56:25 jb Exp $ */ /* * ======================================================================== @@ -986,7 +986,7 @@ fprintf(outmk, "all: objs exe\nobjs: $(SUBMAKE_TARGETS)\n"); fprintf(outmk, "exe: %s\n", execfname); - fprintf(outmk, "%s: %s.o $(CRUNCHED_OBJS)\n", execfname, execfname); + fprintf(outmk, "%s: %s.o $(CRUNCHED_OBJS) $(SUBMAKE_TARGETS)\n", execfname, execfname); fprintf(outmk, ".if defined(LIBS_SO) && !empty(LIBS_SO)\n"); fprintf(outmk, "\t$(CC) -o %s %s.o $(CRUNCHED_OBJS) \\\n", execfname, execfname); @@ -1017,6 +1017,16 @@ p->ident); fprintf(outmk, "\n"); + fprintf(outmk, "%s_OBJPATHS=", p->ident); + if (p->objpaths) + output_strlst(outmk, p->objpaths); + else { + for (lst = p->objs; lst != NULL; lst = lst->next) { + fprintf(outmk, " $(%s_OBJDIR)/%s", p->ident, lst->str); + } + fprintf(outmk, "\n"); + } + if (p->srcdir && p->objs) { fprintf(outmk, "%s_SRCDIR=%s\n", p->ident, p->srcdir); fprintf(outmk, "%s_REALSRCDIR=%s\n", p->ident, p->realsrcdir); @@ -1027,6 +1037,7 @@ fprintf(outmk, "%s_OPTS+=", p->ident); output_strlst(outmk, p->buildopts); } + fprintf(outmk, "$(%s_OBJPATHS): %s_make\n\n", p->ident, p->ident); fprintf(outmk, "%s_make:\n", p->ident); fprintf(outmk, "\t(cd $(%s_SRCDIR) && ", p->ident); if (makeobj) @@ -1048,15 +1059,6 @@ p->name); } - fprintf(outmk, "%s_OBJPATHS=", p->ident); - if (p->objpaths) - output_strlst(outmk, p->objpaths); - else { - for (lst = p->objs; lst != NULL; lst = lst->next) { - fprintf(outmk, " $(%s_OBJDIR)/%s", p->ident, lst->str); - } - fprintf(outmk, "\n"); - } if (p->libs) { fprintf(outmk, "%s_LIBS=", p->ident); output_strlst(outmk, p->libs); ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/crunch/examples/really-big.conf#3 (text+ko) ==== @@ -5,7 +5,7 @@ # # This produces a 4608000 byte binary. Pretty sick and twisted, eh? # -# $FreeBSD: src/usr.sbin/crunch/examples/really-big.conf,v 1.6 2006/09/29 15:45:11 bms Exp $ +# $FreeBSD: src/usr.sbin/crunch/examples/really-big.conf,v 1.7 2006/11/22 00:34:17 rodrigc Exp $ # # ========================================================================= @@ -24,8 +24,8 @@ srcdirs /usr/src/sbin progs badsect bim clri disklabel dmesg dump dumpfs fdisk fsck halt -progs ifconfig init mknod modload modunload mount mount_fdescfs mount_isofs -progs mount_lofs mount_msdosfs mount_portalfs mount_procfs mountd +progs ifconfig init mknod modload modunload mount mount_isofs +progs mount_lofs mount_msdosfs mount_portalfs mountd progs newfs nfsd nfsiod ping quotacheck reboot restore route routed savecore progs shutdown slattach swapon ttyflags tunefs umount # shell scripts: fastboot ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/freebsd-update/freebsd-update.sh#3 (text+ko) ==== @@ -25,7 +25,7 @@ # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -# $FreeBSD: src/usr.sbin/freebsd-update/freebsd-update.sh,v 1.3 2006/10/21 11:04:34 cperciva Exp $ +# $FreeBSD: src/usr.sbin/freebsd-update/freebsd-update.sh,v 1.4 2006/11/25 07:30:12 cperciva Exp $ #### Usage function -- called from command-line handling code. @@ -997,7 +997,8 @@ if [ ! -f "files/${Y}.gz" ]; then echo ${Y}; fi - done > filelist + done | + sort -u > filelist if [ -s filelist ]; then echo -n "Fetching `wc -l < filelist | tr -d ' '` " @@ -1077,16 +1078,24 @@ rm $1.all $1.tmp } -# Filter the metadata file $1 by adding lines with -# /boot/`uname -i` -# replaced by -# /boot/kernel -# (or more generally, `sysctl -n kern.bootfile` minus the trailing "/kernel"). +# Filter the metadata file $1 by adding lines with "/boot/`uname -i`" +# replaced by ${KERNELDIR} (which is `sysctl -n kern.bootfile` minus the +# trailing "/kernel"); and if "/boot/`uname -i`" does not exist, remove +# the original lines which start with that. +# Put another way: Deal with the fact that the FOO kernel is sometimes +# installed in /boot/FOO/ and is sometimes installed elsewhere. fetch_filter_kernel_names () { - grep ^/boot/`uname -i` $1 | - sed -e "s,/boot/`uname -i`,${KERNELDIR}," | + KERNCONF=`uname -i` + + grep ^/boot/${KERNCONF} $1 | + sed -e "s,/boot/${KERNCONF},${KERNELDIR},g" | sort - $1 > $1.tmp mv $1.tmp $1 + + if ! [ -d /boot/${KERNCONF} ]; then + grep -v ^/boot/${KERNCONF} $1 > $1.tmp + mv $1.tmp $1 + fi } # For all paths appearing in $1 or $3, inspect the system @@ -1746,6 +1755,7 @@ # Generate subindex of old files we want to nuke sort -k 1,1 -t '|' $1 | join -t '|' -v 1 - newfiles | + sort -r -k 1,1 -t '|' | cut -f 1,2 -d '|' | tr '|' ' ' > killfiles ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/jail/jail.8#4 (text+ko) ==== @@ -31,7 +31,7 @@ .\" this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp .\" ---------------------------------------------------------------------------- .\" -.\" $FreeBSD: src/usr.sbin/jail/jail.8,v 1.81 2006/09/29 17:57:02 ru Exp $ +.\" $FreeBSD: src/usr.sbin/jail/jail.8,v 1.82 2006/11/21 23:45:44 rodrigc Exp $ .\" .Dd June 11, 2006 .Dt JAIL 8 @@ -132,7 +132,7 @@ mkdir -p $D make world DESTDIR=$D make distribution DESTDIR=$D -mount_devfs devfs $D/dev +mount -t devfs devfs $D/dev .Ed .Pp NOTE: It is important that only appropriate device nodes in devfs be @@ -587,7 +587,7 @@ .Xr inetd 8 , .Xr jexec 8 , .Xr jls 8 , -.Xr mount_devfs 8 , +.Xr mount 8 , .Xr named 8 , .Xr reboot 8 , .Xr rpcbind 8 , ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/sysinstall/config.c#4 (text+ko) ==== @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $FreeBSD: src/usr.sbin/sysinstall/config.c,v 1.239 2006/11/16 19:09:41 kensmith Exp $ + * $FreeBSD: src/usr.sbin/sysinstall/config.c,v 1.240 2006/11/23 00:57:10 kensmith Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -542,7 +542,7 @@ variable_set2(VAR_LINUX_ENABLE, "YES", 1); Mkdir("/compat/linux"); msgNotify("Installing Linux compatibility library..."); - i = package_add("linux_base-fc4"); + i = package_add("linux_base-fc"); restorescr(w); return i; }