svn commit: r227748 - head/sys/kern
Author: hselasky Date: Sun Nov 20 08:29:23 2011 New Revision: 227748 URL: http://svn.freebsd.org/changeset/base/227748 Log: Minor style change: Simplify the description of pause() and shorten the KASSERT message in pause. Also add a clamp for the timo argument in the non-KASSERT case. Suggested by: Bruce Evans MFC after:1 week Modified: head/sys/kern/kern_synch.c Modified: head/sys/kern/kern_synch.c == --- head/sys/kern/kern_synch.c Sun Nov 20 05:32:12 2011(r227747) +++ head/sys/kern/kern_synch.c Sun Nov 20 08:29:23 2011(r227748) @@ -325,25 +325,24 @@ msleep_spin(void *ident, struct mtx *mtx } /* - * pause() is almost like tsleep() except that the intention is to not - * be explicitly woken up by another thread. Instead, the current - * thread simply wishes to sleep until the timeout expires. It is - * implemented using a dummy wait channel. During cold bootup pause() - * will use the DELAY() function instead of tsleep() to wait the given - * number of system ticks. The passed "timo" argument must not be - * negative and also greater than zero. + * pause() delays the calling thread by the given number of system ticks. + * During cold bootup, pause() uses the DELAY() function instead of + * the tsleep() function to do the waiting. The "timo" argument must be + * greater than zero. */ int pause(const char *wmesg, int timo) { + KASSERT(timo > 0, ("pause: timo must be > 0")); - KASSERT(timo > 0, ("pause: a positive and non-zero " - "timeout is required")); + /* silently convert invalid timeouts */ + if (timo < 1) + timo = 1; if (cold) { /* * We delay one HZ at a time to avoid overflowing the -* DELAY() argument: +* system specific DELAY() function(s): */ while (timo >= hz) { DELAY(100); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r227749 - head/sys/kern
Author: hselasky Date: Sun Nov 20 08:36:18 2011 New Revision: 227749 URL: http://svn.freebsd.org/changeset/base/227749 Log: Given that the typical usage of pause() is pause("zzz", hz / N), where N can be greater than hz in some cases, simply ignore a timeout value of zero. Suggested by: Bruce Evans MFC after:1 week Modified: head/sys/kern/kern_synch.c Modified: head/sys/kern/kern_synch.c == --- head/sys/kern/kern_synch.c Sun Nov 20 08:29:23 2011(r227748) +++ head/sys/kern/kern_synch.c Sun Nov 20 08:36:18 2011(r227749) @@ -333,7 +333,7 @@ msleep_spin(void *ident, struct mtx *mtx int pause(const char *wmesg, int timo) { - KASSERT(timo > 0, ("pause: timo must be > 0")); + KASSERT(timo >= 0, ("pause: timo must be >= 0")); /* silently convert invalid timeouts */ if (timo < 1) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r227750 - head/share/man/man4
Author: miwi Date: Sun Nov 20 12:18:21 2011 New Revision: 227750 URL: http://svn.freebsd.org/changeset/base/227750 Log: - Add missing usb and ucom devices PR: usb/160301 Submitted by: Garrett Cooper Reviewed by: hselasky Approved by: hselasky, rwatson (mentor) MFC after:3 Days Modified: head/share/man/man4/u3g.4 head/share/man/man4/uark.4 head/share/man/man4/ubsa.4 head/share/man/man4/ubser.4 head/share/man/man4/uchcom.4 head/share/man/man4/ucycom.4 head/share/man/man4/ufoma.4 head/share/man/man4/uftdi.4 head/share/man/man4/uipaq.4 head/share/man/man4/umcs.4 head/share/man/man4/umct.4 head/share/man/man4/umodem.4 head/share/man/man4/uplcom.4 head/share/man/man4/uslcom.4 head/share/man/man4/uvisor.4 head/share/man/man4/uvscom.4 Modified: head/share/man/man4/u3g.4 == --- head/share/man/man4/u3g.4 Sun Nov 20 08:36:18 2011(r227749) +++ head/share/man/man4/u3g.4 Sun Nov 20 12:18:21 2011(r227750) @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 7, 2008 +.Dd November 20, 2011 .Dt U3G 4 .Os .Sh NAME @@ -29,6 +29,8 @@ To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent +.Cd "device usb" +.Cd "device ucom" .Cd "device u3g" .Ed .Pp Modified: head/share/man/man4/uark.4 == --- head/share/man/man4/uark.4 Sun Nov 20 08:36:18 2011(r227749) +++ head/share/man/man4/uark.4 Sun Nov 20 12:18:21 2011(r227750) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 15, 2006 +.Dd November 20, 2011 .Dt UARK 4 .Os .Sh NAME @@ -27,6 +27,8 @@ To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent +.Cd "device usb" +.Cd "device ucom" .Cd "device uark" .Ed .Pp Modified: head/share/man/man4/ubsa.4 == --- head/share/man/man4/ubsa.4 Sun Nov 20 08:36:18 2011(r227749) +++ head/share/man/man4/ubsa.4 Sun Nov 20 12:18:21 2011(r227750) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 28, 2008 +.Dd November 20, 2011 .Dt UBSA 4 .Os .Sh NAME @@ -39,6 +39,8 @@ To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent +.Cd "device usb" +.Cd "device ucom" .Cd "device ubsa" .Ed .Pp Modified: head/share/man/man4/ubser.4 == --- head/share/man/man4/ubser.4 Sun Nov 20 08:36:18 2011(r227749) +++ head/share/man/man4/ubser.4 Sun Nov 20 12:18:21 2011(r227750) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 22, 2006 +.Dd November 20, 2011 .Dt UBSER 4 .Os .Sh NAME @@ -39,6 +39,8 @@ To compile this driver into the kernel, place the following line in your kernel configuration file: .Bd -ragged -offset indent +.Cd "device usb" +.Cd "device ucom" .Cd "device ubser" .Ed .Pp Modified: head/share/man/man4/uchcom.4 == --- head/share/man/man4/uchcom.4Sun Nov 20 08:36:18 2011 (r227749) +++ head/share/man/man4/uchcom.4Sun Nov 20 12:18:21 2011 (r227750) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 18, 2009 +.Dd November 20, 2011 .Dt UCHCOM 4 .Os .Sh NAME @@ -40,6 +40,8 @@ To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent +.Cd "device usb" +.Cd "device ucom" .Cd "device uchcom" .Ed .Pp Modified: head/share/man/man4/ucycom.4 == --- head/share/man/man4/ucycom.4Sun Nov 20 08:36:18 2011 (r227749) +++ head/share/man/man4/ucycom.4Sun Nov 20 12:18:21 2011 (r227750) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 22, 2006 +.Dd November 20, 2011 .Dt UCYCOM 4 .Os .Sh NAME @@ -38,6 +38,8 @@ To compile this driver into the kernel, place the following line in your kernel configuration file: .Bd -ragged -offset indent +.Cd "device usb" +.Cd "device ucom" .Cd "device ucycom" .Ed .Pp Modified: head/share/man/man4/ufoma.4 == --- head/share/man/man4/ufoma.4 Sun Nov 20 08:36:18 2011(r227749) +++ head/share/man/man4/ufoma.4 Sun Nov 20 12:18:21 2011(r227750) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 22, 2006 +.Dd November 20, 2011 .Dt UFOMA 4 .Os .Sh NAME @@ -38,6 +38,8 @@ To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent +.Cd "device usb" +.Cd "device ucom" .Cd "device uf
svn commit: r227751 - head/sys/dev/usb
Author: miwi Date: Sun Nov 20 12:26:20 2011 New Revision: 227751 URL: http://svn.freebsd.org/changeset/base/227751 Log: - Add support for Add LOGITECH Webcam C100 - While here whitespace fixes PR: usb/161559 Submitted by: Sergey Zaykov Reviewed by: hselasky Approved by: hselasky, rwatson (mentor) Modified: head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsSun Nov 20 12:18:21 2011(r227750) +++ head/sys/dev/usb/usbdevsSun Nov 20 12:26:20 2011(r227751) @@ -664,7 +664,7 @@ vendor LINKSYS3 0x1915 Linksys vendor QUALCOMMINC 0x19d2 Qualcomm, Incorporated vendor WCH20x1a86 QinHeng Electronics vendor STELERA 0x1a8d Stelera Wireless -vendor MATRIXORBITAL 0x1b3d Matrix Orbital +vendor MATRIXORBITAL 0x1b3d Matrix Orbital vendor OVISLINK0x1b75 OvisLink vendor TCTMOBILE 0x1bbb TCT Mobile vendor WAGO0x1be3 WAGO Kontakttechnik GmbH. @@ -2091,6 +2091,7 @@ product LOGITECH M48480x0301 M4848 mou product LOGITECH PAGESCAN 0x040f PageScan product LOGITECH QUICKCAMWEB 0x0801 QuickCam Web product LOGITECH QUICKCAMPRO 0x0810 QuickCam Pro +product LOGITECH WEBCAMC1000X0817 Webcam C100 product LOGITECH QUICKCAMEXP 0x0840 QuickCam Express product LOGITECH QUICKCAM 0x0850 QuickCam product LOGITECH QUICKCAMPRO3 0x0990 QuickCam Pro 9000 @@ -2136,7 +2137,7 @@ product MACALLY MOUSE10x0101 mouse /* Marvell Technology Group, Ltd. products */ product MARVELL SHEEVAPLUG 0x9e8f SheevaPlug serial interface - + /* Matrix Orbital products */ product MATRIXORBITAL MOUA 0x0153 Martrix Orbital MOU-A LCD displays ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r227752 - in head/cddl: contrib/opensolaris/cmd/zdb contrib/opensolaris/cmd/zstreamdump usr.bin/zstreamdump usr.sbin/zdb
Author: mm Date: Sun Nov 20 13:11:29 2011 New Revision: 227752 URL: http://svn.freebsd.org/changeset/base/227752 Log: Update and desolarization of zdb(8) and zstreamdump(1) manual pages: - synchronized to match new vendor code [1] - removed ATTRIBUTES sections - updated SEE ALSO sections - properly updated copyright information (required by CDDL) - remove empty lines via MANFILTER Obtained from:Illumos [1] MFC after:5 days Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.8 head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 head/cddl/usr.bin/zstreamdump/Makefile head/cddl/usr.sbin/zdb/Makefile Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.8 == --- head/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Sun Nov 20 12:26:20 2011 (r227751) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Sun Nov 20 13:11:29 2011 (r227752) @@ -3,7 +3,8 @@ .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [] [name of copyright owner] -.TH zdb 1M "31 Oct 2005" "SunOS 5.11" "System Administration Commands" +.\" Portions Copyright 2011 Martin Matuska +.TH ZDB 8 "Oct 31, 2005" .SH NAME zdb \- ZFS debugger .SH SYNOPSIS @@ -15,70 +16,50 @@ zdb \- ZFS debugger .SH DESCRIPTION .sp .LP -The \fBzdb\fR command is used by support engineers to diagnose failures and gather statistics. Since the \fBZFS\fR file system is always consistent on disk and is self-repairing, \fBzdb\fR should only be run under the direction by a support engineer. +The \fBzdb\fR command is used by support engineers to diagnose failures and +gather statistics. Since the \fBZFS\fR file system is always consistent on disk +and is self-repairing, \fBzdb\fR should only be run under the direction by a +support engineer. .sp .LP -If no arguments are specified, \fBzdb\fR, performs basic consistency checks on the pool and associated datasets, and report any problems detected. +If no arguments are specified, \fBzdb\fR, performs basic consistency checks on +the pool and associated datasets, and report any problems detected. .sp .LP -Any options supported by this command are internal to Sun and subject to change at any time. +Any options supported by this command are internal to Sun and subject to change +at any time. .SH EXIT STATUS .sp .LP The following exit values are returned: .sp .ne 2 -.mk .na \fB\fB0\fR\fR .ad .RS 5n -.rt The pool is consistent. .RE .sp .ne 2 -.mk .na \fB\fB1\fR\fR .ad .RS 5n -.rt An error was detected. .RE .sp .ne 2 -.mk .na \fB\fB2\fR\fR .ad .RS 5n -.rt Invalid command line options were specified. .RE -.SH ATTRIBUTES -.sp -.LP -See \fBattributes\fR(5) for descriptions of the following attributes: -.sp - -.sp -.TS -tab() box; -cw(2.75i) |cw(2.75i) -lw(2.75i) |lw(2.75i) -. -ATTRIBUTE TYPEATTRIBUTE VALUE -_ -AvailabilitySUNWzfsu -_ -Interface StabilityUnstable -.TE - .SH SEE ALSO .sp .LP -\fBzfs\fR(1M), \fBzpool\fR(1M), \fBattributes\fR(5) +zfs(8), zpool(8) Modified: head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 == --- head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 Sun Nov 20 12:26:20 2011(r227751) +++ head/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 Sun Nov 20 13:11:29 2011(r227752) @@ -3,7 +3,8 @@ .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. .\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [] [name of copyright owner] -.TH zstreamdump 1M "21 Sep 2009" "SunOS 5.11" "System Administration Commands" +.\" Portions Copyright 2011 Martin Matuska +.TH ZSTR
svn commit: r227753 - in head: contrib/gdtoa include lib/libc/gdtoa lib/libc/gen lib/libc/locale lib/libc/regex lib/libc/stdio lib/libc/stdlib lib/libc/stdtime lib/libc/string
Author: theraven Date: Sun Nov 20 14:45:42 2011 New Revision: 227753 URL: http://svn.freebsd.org/changeset/base/227753 Log: Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a load of _l suffixed versions of various standard library functions that use the global locale, making them take an explicit locale parameter. Also adds support for per-thread locales. This work was funded by the FreeBSD Foundation. Please test any code you have that uses the C standard locale functions! Reviewed by:das (gdtoa changes) Approved by:dim (mentor) Added: head/include/_xlocale_ctype.h (contents, props changed) head/include/xlocale.h (contents, props changed) head/lib/libc/locale/DESIGN.xlocale (contents, props changed) head/lib/libc/locale/ctype.c (contents, props changed) head/lib/libc/locale/duplocale.3 (contents, props changed) head/lib/libc/locale/freelocale.3 (contents, props changed) head/lib/libc/locale/newlocale.3 (contents, props changed) head/lib/libc/locale/querylocale.3 (contents, props changed) head/lib/libc/locale/uselocale.3 (contents, props changed) head/lib/libc/locale/xlocale.3 (contents, props changed) head/lib/libc/locale/xlocale.c (contents, props changed) head/lib/libc/locale/xlocale_private.h (contents, props changed) Modified: head/contrib/gdtoa/gdtoaimp.h head/contrib/gdtoa/strtod.c head/contrib/gdtoa/strtodg.c head/contrib/gdtoa/strtof.c head/contrib/gdtoa/strtorQ.c head/contrib/gdtoa/strtord.c head/contrib/gdtoa/strtorx.c head/include/Makefile head/include/locale.h head/include/runetype.h head/include/stdlib.h head/lib/libc/gdtoa/machdep_ldisQ.c head/lib/libc/gdtoa/machdep_ldisd.c head/lib/libc/gdtoa/machdep_ldisx.c head/lib/libc/gen/fnmatch.c head/lib/libc/gen/glob.c head/lib/libc/locale/Makefile.inc head/lib/libc/locale/Symbol.map head/lib/libc/locale/ascii.c head/lib/libc/locale/big5.c head/lib/libc/locale/btowc.c head/lib/libc/locale/collate.c head/lib/libc/locale/collate.h head/lib/libc/locale/collcmp.c head/lib/libc/locale/euc.c head/lib/libc/locale/gb18030.c head/lib/libc/locale/gb2312.c head/lib/libc/locale/gbk.c head/lib/libc/locale/lmessages.c head/lib/libc/locale/lmessages.h head/lib/libc/locale/lmonetary.c head/lib/libc/locale/lmonetary.h head/lib/libc/locale/lnumeric.c head/lib/libc/locale/lnumeric.h head/lib/libc/locale/localeconv.3 head/lib/libc/locale/localeconv.c head/lib/libc/locale/mblen.c head/lib/libc/locale/mblocal.h head/lib/libc/locale/mbrlen.c head/lib/libc/locale/mbrtowc.c head/lib/libc/locale/mbsinit.c head/lib/libc/locale/mbsnrtowcs.c head/lib/libc/locale/mbsrtowcs.c head/lib/libc/locale/mbstowcs.c head/lib/libc/locale/mbtowc.c head/lib/libc/locale/mskanji.c head/lib/libc/locale/nextwctype.c head/lib/libc/locale/nl_langinfo.c head/lib/libc/locale/none.c head/lib/libc/locale/runetype.c head/lib/libc/locale/setlocale.c head/lib/libc/locale/setrunelocale.c head/lib/libc/locale/table.c head/lib/libc/locale/tolower.c head/lib/libc/locale/toupper.c head/lib/libc/locale/utf8.c head/lib/libc/locale/wcrtomb.c head/lib/libc/locale/wcsftime.c head/lib/libc/locale/wcsnrtombs.c head/lib/libc/locale/wcsrtombs.c head/lib/libc/locale/wcstod.c head/lib/libc/locale/wcstof.c head/lib/libc/locale/wcstoimax.c head/lib/libc/locale/wcstol.c head/lib/libc/locale/wcstold.c head/lib/libc/locale/wcstoll.c head/lib/libc/locale/wcstombs.c head/lib/libc/locale/wcstoul.c head/lib/libc/locale/wcstoull.c head/lib/libc/locale/wcstoumax.c head/lib/libc/locale/wctob.c head/lib/libc/locale/wctomb.c head/lib/libc/locale/wctrans.c head/lib/libc/locale/wctype.c head/lib/libc/locale/wcwidth.c head/lib/libc/regex/regcomp.c head/lib/libc/stdio/Symbol.map head/lib/libc/stdio/asprintf.c head/lib/libc/stdio/fgetwc.c head/lib/libc/stdio/fgetwln.c head/lib/libc/stdio/fgetws.c head/lib/libc/stdio/fprintf.c head/lib/libc/stdio/fputwc.c head/lib/libc/stdio/fputws.c head/lib/libc/stdio/fscanf.c head/lib/libc/stdio/fwprintf.c head/lib/libc/stdio/fwscanf.c head/lib/libc/stdio/getwc.c head/lib/libc/stdio/getwchar.c head/lib/libc/stdio/local.h head/lib/libc/stdio/printf.c head/lib/libc/stdio/printfcommon.h head/lib/libc/stdio/putwc.c head/lib/libc/stdio/putwchar.c head/lib/libc/stdio/scanf.c head/lib/libc/stdio/snprintf.c head/lib/libc/stdio/sprintf.c head/lib/libc/stdio/sscanf.c head/lib/libc/stdio/swprintf.c head/lib/libc/stdio/swscanf.c head/lib/libc/stdio/ungetwc.c head/lib/libc/stdio/vasprintf.c head/lib/libc/stdio/vdprintf.c head/lib/libc/stdio/vfprintf.c head/lib/libc/stdio/vfscanf.c head/lib/libc/stdio/vfwprintf.c head/lib/libc/stdio/vfwscanf.c head/lib/libc/stdio/vprintf.c head/lib/libc/stdio/vscanf.c head/lib/libc/stdio/vsnprintf.c head/lib/libc/stdio/vsprintf.c head/lib/libc/stdio/vsscanf.c
svn commit: r227755 - in head: lib/libc/net sys/netinet
Author: tuexen Date: Sun Nov 20 15:00:45 2011 New Revision: 227755 URL: http://svn.freebsd.org/changeset/base/227755 Log: Add support for the SCTP_REMOTE_UDP_ENCAPS_PORT socket option. Retire the the now unused sctp_udp_tunneling_for_client_enable sysctl variable. MFC after: 3 months. Modified: head/lib/libc/net/sctp_sys_calls.c head/sys/netinet/sctp.h head/sys/netinet/sctp_output.c head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_pcb.h head/sys/netinet/sctp_structs.h head/sys/netinet/sctp_sysctl.c head/sys/netinet/sctp_sysctl.h head/sys/netinet/sctp_uio.h head/sys/netinet/sctp_usrreq.c head/sys/netinet/sctputil.c Modified: head/lib/libc/net/sctp_sys_calls.c == --- head/lib/libc/net/sctp_sys_calls.c Sun Nov 20 14:51:27 2011 (r227754) +++ head/lib/libc/net/sctp_sys_calls.c Sun Nov 20 15:00:45 2011 (r227755) @@ -413,6 +413,9 @@ sctp_opt_info(int sd, sctp_assoc_t id, i case SCTP_PEER_ADDR_THLDS: ((struct sctp_paddrthlds *)arg)->spt_assoc_id = id; break; + case SCTP_REMOTE_UDP_ENCAPS_PORT: + ((struct sctp_udpencaps *)arg)->sue_assoc_id = id; + break; case SCTP_MAX_BURST: ((struct sctp_assoc_value *)arg)->assoc_id = id; break; Modified: head/sys/netinet/sctp.h == --- head/sys/netinet/sctp.h Sun Nov 20 14:51:27 2011(r227754) +++ head/sys/netinet/sctp.h Sun Nov 20 15:00:45 2011(r227755) @@ -120,6 +120,7 @@ struct sctp_paramhdr { #define SCTP_DEFAULT_SNDINFO0x0021 #define SCTP_DEFAULT_PRINFO 0x0022 #define SCTP_PEER_ADDR_THLDS0x0023 +#define SCTP_REMOTE_UDP_ENCAPS_PORT 0x0024 /* * read-only options Modified: head/sys/netinet/sctp_output.c == --- head/sys/netinet/sctp_output.c Sun Nov 20 14:51:27 2011 (r227754) +++ head/sys/netinet/sctp_output.c Sun Nov 20 15:00:45 2011 (r227755) @@ -4062,6 +4062,12 @@ sctp_lowlevel_chunk_output(struct sctp_i } } if (port) { + if (htons(SCTP_BASE_SYSCTL(sctp_udp_tunneling_port)) == 0) { + sctp_handle_no_route(stcb, net, so_locked); + SCTP_LTRACE_ERR_RET_PKT(m, inp, stcb, NULL, SCTP_FROM_SCTP_OUTPUT, EHOSTUNREACH); + sctp_m_freem(m); + return (EHOSTUNREACH); + } udp = (struct udphdr *)((caddr_t)ip + sizeof(struct ip)); udp->uh_sport = htons(SCTP_BASE_SYSCTL(sctp_udp_tunneling_port)); udp->uh_dport = port; @@ -4413,6 +4419,12 @@ sctp_lowlevel_chunk_output(struct sctp_i ip6h->ip6_src = lsa6->sin6_addr; if (port) { + if (htons(SCTP_BASE_SYSCTL(sctp_udp_tunneling_port)) == 0) { + sctp_handle_no_route(stcb, net, so_locked); + SCTP_LTRACE_ERR_RET_PKT(m, inp, stcb, NULL, SCTP_FROM_SCTP_OUTPUT, EHOSTUNREACH); + sctp_m_freem(m); + return (EHOSTUNREACH); + } udp = (struct udphdr *)((caddr_t)ip6h + sizeof(struct ip6_hdr)); udp->uh_sport = htons(SCTP_BASE_SYSCTL(sctp_udp_tunneling_port)); udp->uh_dport = port; @@ -10965,6 +10977,10 @@ sctp_send_shutdown_complete2(struct mbuf return; } if (port) { + if (htons(SCTP_BASE_SYSCTL(sctp_udp_tunneling_port)) == 0) { + sctp_m_freem(mout); + return; + } udp = (struct udphdr *)comp_cp; udp->uh_sport = htons(SCTP_BASE_SYSCTL(sctp_udp_tunneling_port)); udp->uh_dport = port; @@ -11925,6 +11941,10 @@ sctp_send_abort(struct mbuf *m, int iphl udp = (struct udphdr *)abm; if (port) { + if (htons(SCTP_BASE_SYSCTL(sctp_udp_tunneling_port)) == 0) { + sctp_m_freem(mout); + return; + } udp->uh_sport = htons(SCTP_BASE_SYSCTL(sctp_udp_tunneling_port)); udp->uh_dport = port; /* set udp->uh_ulen later */ @@ -12186,6 +12206,10 @@ sctp_send_operr_to(struct mbuf *m, int i udp = (struct udphdr *)sh_out; if (port) { +
svn commit: r227757 - head/lib/libpam/modules/pam_ssh
Author: des Date: Sun Nov 20 15:18:49 2011 New Revision: 227757 URL: http://svn.freebsd.org/changeset/base/227757 Log: key_load_private() ignores the passphrase argument if the private key is unencrypted. This defeats the nullok check, because it means a non-null passphrase will successfully unlock the key. To address this, try at first to load the key without a passphrase. If this succeeds and the user provided a non-empty passphrase *or* nullok is false, reject the key. MFC after:1 week Noticed by: Guy Helmer Modified: head/lib/libpam/modules/pam_ssh/pam_ssh.c Modified: head/lib/libpam/modules/pam_ssh/pam_ssh.c == --- head/lib/libpam/modules/pam_ssh/pam_ssh.c Sun Nov 20 15:06:39 2011 (r227756) +++ head/lib/libpam/modules/pam_ssh/pam_ssh.c Sun Nov 20 15:18:49 2011 (r227757) @@ -93,7 +93,8 @@ static char *const pam_ssh_agent_envp[] * struct pam_ssh_key containing the key and its comment. */ static struct pam_ssh_key * -pam_ssh_load_key(const char *dir, const char *kfn, const char *passphrase) +pam_ssh_load_key(const char *dir, const char *kfn, const char *passphrase, +int nullok) { struct pam_ssh_key *psk; char fn[PATH_MAX]; @@ -103,7 +104,21 @@ pam_ssh_load_key(const char *dir, const if (snprintf(fn, sizeof(fn), "%s/%s", dir, kfn) > (int)sizeof(fn)) return (NULL); comment = NULL; - key = key_load_private(fn, passphrase, &comment); + /* +* If the key is unencrypted, OpenSSL ignores the passphrase, so +* it will seem like the user typed in the right one. This allows +* a user to circumvent nullok by providing a dummy passphrase. +* Verify that the key really *is* encrypted by trying to load it +* with an empty passphrase, and if the key is not encrypted, +* accept only an empty passphrase. +*/ + key = key_load_private(fn, NULL, &comment); + if (key != NULL && !(*passphrase == '\0' && nullok)) { + key_free(key); + return (NULL); + } + if (key == NULL) + key = key_load_private(fn, passphrase, &comment); if (key == NULL) { openpam_log(PAM_LOG_DEBUG, "failed to load key from %s", fn); return (NULL); @@ -170,9 +185,6 @@ pam_sm_authenticate(pam_handle_t *pamh, if (pam_err != PAM_SUCCESS) return (pam_err); - if (*passphrase == '\0' && !nullok) - goto skip_keys; - /* switch to user credentials */ pam_err = openpam_borrow_cred(pamh, pwd); if (pam_err != PAM_SUCCESS) @@ -180,7 +192,7 @@ pam_sm_authenticate(pam_handle_t *pamh, /* try to load keys from all keyfiles we know of */ for (kfn = pam_ssh_keyfiles; *kfn != NULL; ++kfn) { - psk = pam_ssh_load_key(pwd->pw_dir, *kfn, passphrase); + psk = pam_ssh_load_key(pwd->pw_dir, *kfn, passphrase, nullok); if (psk != NULL) { pam_set_data(pamh, *kfn, psk, pam_ssh_free_key); ++nkeys; @@ -190,7 +202,6 @@ pam_sm_authenticate(pam_handle_t *pamh, /* switch back to arbitrator credentials */ openpam_restore_cred(pamh); - skip_keys: /* * If we tried an old token and didn't get anything, and * try_first_pass was specified, try again after prompting the ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r227758 - in head/sys: amd64/conf dev/ppbus kern sys vm
Author: attilio Date: Sun Nov 20 16:33:09 2011 New Revision: 227758 URL: http://svn.freebsd.org/changeset/base/227758 Log: Introduce macro stubs in the mutex implementation that will be always defined and will allow consumers, willing to provide options, file and line to locking requests, to not worry about options redefining the interfaces. This is typically useful when there is the need to build another locking interface on top of the mutex one. The introduced functions that consumers can use are: - mtx_lock_flags_ - mtx_unlock_flags_ - mtx_lock_spin_flags_ - mtx_unlock_spin_flags_ - mtx_assert_ - thread_lock_flags_ Spare notes: - Likely we can get rid of all the 'INVARIANTS' specification in the ppbus code by using the same macro as done in this patch (but this is left to the ppbus maintainer) - all the other locking interfaces may require a similar cleanup, where the most notable case is sx which will allow a further cleanup of vm_map locking facilities - The patch should be fully compatible with older branches, thus a MFC is previewed (infact it uses all the underlying mechanisms already present). Comments review by: eadler, Ben Kaduk Discussed with: kib, jhb MFC after:1 month Modified: head/sys/amd64/conf/GENERIC head/sys/dev/ppbus/ppb_base.c head/sys/kern/kern_mutex.c head/sys/sys/mutex.h head/sys/vm/vm_map.c Modified: head/sys/amd64/conf/GENERIC == --- head/sys/amd64/conf/GENERIC Sun Nov 20 15:18:49 2011(r227757) +++ head/sys/amd64/conf/GENERIC Sun Nov 20 16:33:09 2011(r227758) @@ -73,11 +73,11 @@ options KDB # Enable kernel debugger optionsDDB # Support DDB. optionsGDB # Support remote GDB. optionsDEADLKRES # Enable the deadlock resolver -optionsINVARIANTS # Enable calls of extra sanity checking +#options INVARIANTS # Enable calls of extra sanity checking optionsINVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -optionsWITNESS # Enable checks to detect deadlocks and cycles -optionsWITNESS_SKIPSPIN# Don't run witness on spinlocks for speed -optionsMALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones +#options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN# Don't run witness on spinlocks for speed +#options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones # Make an SMP-capable kernel by default optionsSMP # Symmetric MultiProcessor Kernel Modified: head/sys/dev/ppbus/ppb_base.c == --- head/sys/dev/ppbus/ppb_base.c Sun Nov 20 15:18:49 2011 (r227757) +++ head/sys/dev/ppbus/ppb_base.c Sun Nov 20 16:33:09 2011 (r227758) @@ -236,11 +236,8 @@ ppb_unlock(device_t bus) void _ppb_assert_locked(device_t bus, const char *file, int line) { -#ifdef INVARIANTS - struct ppb_data *ppb = DEVTOSOFTC(bus); - _mtx_assert(ppb->ppc_lock, MA_OWNED, file, line); -#endif + mtx_assert_(DEVTOSOFTC(bus)->ppc_lock, MA_OWNED, file, line); } void Modified: head/sys/kern/kern_mutex.c == --- head/sys/kern/kern_mutex.c Sun Nov 20 15:18:49 2011(r227757) +++ head/sys/kern/kern_mutex.c Sun Nov 20 16:33:09 2011(r227758) @@ -274,7 +274,7 @@ _mtx_unlock_spin_flags(struct mtx *m, in * is already owned, it will recursively acquire the lock. */ int -_mtx_trylock(struct mtx *m, int opts, const char *file, int line) +mtx_trylock_flags_(struct mtx *m, int opts, const char *file, int line) { #ifdef LOCK_PROFILING uint64_t waittime = 0; @@ -540,7 +540,7 @@ _mtx_lock_spin(struct mtx *m, uintptr_t #endif /* SMP */ void -_thread_lock_flags(struct thread *td, int opts, const char *file, int line) +thread_lock_flags_(struct thread *td, int opts, const char *file, int line) { struct mtx *m; uintptr_t tid; Modified: head/sys/sys/mutex.h == --- head/sys/sys/mutex.hSun Nov 20 15:18:49 2011(r227757) +++ head/sys/sys/mutex.hSun Nov 20 16:33:09 2011(r227758) @@ -81,6 +81,10 @@ * of the kernel via macros, thus allowing us to use the cpp LOCK_FILE * and LOCK_LINE. These functions should not be called directly by any * code using the API. Their macros cover their functionality. + * Functions with a `_' suffix are the entrypoint for the common + * KPI covering both compat shims and fast path case. These can be + *
svn commit: r227759 - head/sys/amd64/conf
Author: attilio Date: Sun Nov 20 16:36:02 2011 New Revision: 227759 URL: http://svn.freebsd.org/changeset/base/227759 Log: Revert part of the r227758 which crept in. Pointy hat: attilio X-MFC:r227758 Modified: head/sys/amd64/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC == --- head/sys/amd64/conf/GENERIC Sun Nov 20 16:33:09 2011(r227758) +++ head/sys/amd64/conf/GENERIC Sun Nov 20 16:36:02 2011(r227759) @@ -73,11 +73,11 @@ options KDB # Enable kernel debugger optionsDDB # Support DDB. optionsGDB # Support remote GDB. optionsDEADLKRES # Enable the deadlock resolver -#options INVARIANTS # Enable calls of extra sanity checking +optionsINVARIANTS # Enable calls of extra sanity checking optionsINVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS # Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN# Don't run witness on spinlocks for speed -#options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones +optionsWITNESS # Enable checks to detect deadlocks and cycles +optionsWITNESS_SKIPSPIN# Don't run witness on spinlocks for speed +optionsMALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones # Make an SMP-capable kernel by default optionsSMP # Symmetric MultiProcessor Kernel ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r227760 - in head/sys/fs: nfs nfsclient
Author: rmacklem Date: Sun Nov 20 16:46:50 2011 New Revision: 227760 URL: http://svn.freebsd.org/changeset/base/227760 Log: Add two arguments to the nfsrpc_rellockown() function in the NFSv4 client. This does not change the client's behaviour, but prepares the code so that nfsrpc_rellockown() can be called elsewhere in a future commit. MFC after:2 weeks Modified: head/sys/fs/nfs/nfs_var.h head/sys/fs/nfsclient/nfs_clrpcops.c Modified: head/sys/fs/nfs/nfs_var.h == --- head/sys/fs/nfs/nfs_var.h Sun Nov 20 16:36:02 2011(r227759) +++ head/sys/fs/nfs/nfs_var.h Sun Nov 20 16:46:50 2011(r227760) @@ -418,8 +418,8 @@ int nfsrpc_pathconf(vnode_t, struct nfsv struct ucred *, NFSPROC_T *, struct nfsvattr *, int *, void *); int nfsrpc_renew(struct nfsclclient *, struct ucred *, NFSPROC_T *); -int nfsrpc_rellockown(struct nfsmount *, struct nfscllockowner *, -struct ucred *, NFSPROC_T *); +int nfsrpc_rellockown(struct nfsmount *, struct nfscllockowner *, uint8_t *, +int, struct ucred *, NFSPROC_T *); int nfsrpc_getdirpath(struct nfsmount *, u_char *, struct ucred *, NFSPROC_T *); int nfsrpc_delegreturn(struct nfscldeleg *, struct ucred *, Modified: head/sys/fs/nfsclient/nfs_clrpcops.c == --- head/sys/fs/nfsclient/nfs_clrpcops.cSun Nov 20 16:36:02 2011 (r227759) +++ head/sys/fs/nfsclient/nfs_clrpcops.cSun Nov 20 16:46:50 2011 (r227760) @@ -649,7 +649,8 @@ nfsrpc_doclose(struct nfsmount *nmp, str * puts on the wire has the file handle for this file appended * to it, so it can be done now. */ - (void)nfsrpc_rellockown(nmp, lp, tcred, p); + (void)nfsrpc_rellockown(nmp, lp, lp->nfsl_open->nfso_fh, + lp->nfsl_open->nfso_fhlen, tcred, p); } /* @@ -4027,7 +4028,7 @@ nfsrpc_renew(struct nfsclclient *clp, st */ APPLESTATIC int nfsrpc_rellockown(struct nfsmount *nmp, struct nfscllockowner *lp, -struct ucred *cred, NFSPROC_T *p) +uint8_t *fh, int fhlen, struct ucred *cred, NFSPROC_T *p) { struct nfsrv_descript nfsd, *nd = &nfsd; u_int32_t *tl; @@ -4039,10 +4040,8 @@ nfsrpc_rellockown(struct nfsmount *nmp, *tl++ = nmp->nm_clp->nfsc_clientid.lval[0]; *tl = nmp->nm_clp->nfsc_clientid.lval[1]; NFSBCOPY(lp->nfsl_owner, own, NFSV4CL_LOCKNAMELEN); - NFSBCOPY(lp->nfsl_open->nfso_fh, &own[NFSV4CL_LOCKNAMELEN], - lp->nfsl_open->nfso_fhlen); - (void)nfsm_strtom(nd, own, NFSV4CL_LOCKNAMELEN + - lp->nfsl_open->nfso_fhlen); + NFSBCOPY(fh, &own[NFSV4CL_LOCKNAMELEN], fhlen); + (void)nfsm_strtom(nd, own, NFSV4CL_LOCKNAMELEN + fhlen); nd->nd_flag |= ND_USEGSSNAME; error = newnfs_request(nd, nmp, NULL, &nmp->nm_sockreq, NULL, p, cred, NFS_PROG, NFS_VER4, NULL, 1, NULL); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r227769 - head
Author: gjb (doc committer) Date: Sun Nov 20 19:05:32 2011 New Revision: 227769 URL: http://svn.freebsd.org/changeset/base/227769 Log: Add a note to src/Makefile that explains that 'rm' runs twice because the second invocation only needs to operate on files with the immutable flag set. Submitted by: arundel (via private email) (original version) Discussed on: -toolchain@ MFC after:3 days Modified: head/Makefile Modified: head/Makefile == --- head/Makefile Sun Nov 20 18:01:45 2011(r227768) +++ head/Makefile Sun Nov 20 19:05:32 2011(r227769) @@ -185,7 +185,10 @@ buildworld: upgrade_checks # files with chflags set, so this unsets them and tries the 'rm' a # second time. There are situations where this target will be cleaning # some directories via more than one method, but that duplication is -# needed to correctly handle all the possible situations. +# needed to correctly handle all the possible situations. Removing all +# files without the immutable flag set in the first 'rm' instance saves +# time, because 'chflags' will need to operate on fewer files (with the +# immutable flag set) afterwards. # BW_CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR} cleanworld: ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r227749 - head/sys/kern
Is this right? Passing 0 to timo causes a panic? That can't be good. Wanrer On Nov 20, 2011, at 1:36 AM, Hans Petter Selasky wrote: > Author: hselasky > Date: Sun Nov 20 08:36:18 2011 > New Revision: 227749 > URL: http://svn.freebsd.org/changeset/base/227749 > > Log: > Given that the typical usage of pause() is pause("zzz", hz / N), where N can > be greater than hz in some cases, simply ignore a timeout value of zero. > > Suggested by:Bruce Evans > MFC after: 1 week > > Modified: > head/sys/kern/kern_synch.c > > Modified: head/sys/kern/kern_synch.c > == > --- head/sys/kern/kern_synch.cSun Nov 20 08:29:23 2011 > (r227748) > +++ head/sys/kern/kern_synch.cSun Nov 20 08:36:18 2011 > (r227749) > @@ -333,7 +333,7 @@ msleep_spin(void *ident, struct mtx *mtx > int > pause(const char *wmesg, int timo) > { > - KASSERT(timo > 0, ("pause: timo must be > 0")); > + KASSERT(timo >= 0, ("pause: timo must be >= 0")); > > /* silently convert invalid timeouts */ > if (timo < 1) > > ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r227769 - head
On Sun Nov 20 11, Glen Barber wrote: > Author: gjb (doc committer) > Date: Sun Nov 20 19:05:32 2011 > New Revision: 227769 > URL: http://svn.freebsd.org/changeset/base/227769 > > Log: > Add a note to src/Makefile that explains that 'rm' runs twice because the > second invocation only needs to operate on files with the immutable flag thanks for taking care of this one. :) are we sure we're only dealing with the immutable flag? since chflags is being invoked as 'chflags -R 0' and not 'chflags -R noschg', wouldn't it be better to refer to "file flags" in general and not only to the "immutable flag"? cheers. alex > set. > > Submitted by: arundel (via private email) (original version) > Discussed on: -toolchain@ > MFC after: 3 days > > Modified: > head/Makefile > > Modified: head/Makefile > == > --- head/Makefile Sun Nov 20 18:01:45 2011(r227768) > +++ head/Makefile Sun Nov 20 19:05:32 2011(r227769) > @@ -185,7 +185,10 @@ buildworld: upgrade_checks > # files with chflags set, so this unsets them and tries the 'rm' a > # second time. There are situations where this target will be cleaning > # some directories via more than one method, but that duplication is > -# needed to correctly handle all the possible situations. > +# needed to correctly handle all the possible situations. Removing all > +# files without the immutable flag set in the first 'rm' instance saves > +# time, because 'chflags' will need to operate on fewer files (with the > +# immutable flag set) afterwards. > # > BW_CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR} > cleanworld: ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r227770 - head
Author: gjb (doc committer) Date: Sun Nov 20 19:27:52 2011 New Revision: 227770 URL: http://svn.freebsd.org/changeset/base/227770 Log: Fix the note in r227769 to be less specific to the immutable flag. Submitted by: arundel MFC after:3 days X-MFC-With: r227769 Modified: head/Makefile Modified: head/Makefile == --- head/Makefile Sun Nov 20 19:05:32 2011(r227769) +++ head/Makefile Sun Nov 20 19:27:52 2011(r227770) @@ -186,9 +186,8 @@ buildworld: upgrade_checks # second time. There are situations where this target will be cleaning # some directories via more than one method, but that duplication is # needed to correctly handle all the possible situations. Removing all -# files without the immutable flag set in the first 'rm' instance saves -# time, because 'chflags' will need to operate on fewer files (with the -# immutable flag set) afterwards. +# files without file flags set in the first 'rm' instance saves +# time, because 'chflags' will need to operate on fewer files afterwards. # BW_CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR} cleanworld: ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r227769 - head
On Sun, Nov 20, 2011 at 07:16:21PM +, Alexander Best wrote: > On Sun Nov 20 11, Glen Barber wrote: > > Author: gjb (doc committer) > > Date: Sun Nov 20 19:05:32 2011 > > New Revision: 227769 > > URL: http://svn.freebsd.org/changeset/base/227769 > > > > Log: > > Add a note to src/Makefile that explains that 'rm' runs twice because the > > second invocation only needs to operate on files with the immutable flag > > thanks for taking care of this one. :) > > are we sure we're only dealing with the immutable flag? since chflags is being > invoked as 'chflags -R 0' and not 'chflags -R noschg', wouldn't it be better > to > refer to "file flags" in general and not only to the "immutable flag"? You are correct, I didn't think about the 'undeletable' flag. I've committed a followup with 227770. Thanks. Glen -- Glen Barber | g...@freebsd.org FreeBSD Documentation Project pgpYLudFJUnlk.pgp Description: PGP signature
svn commit: r227771 - head
Author: gjb (doc committer) Date: Sun Nov 20 20:05:47 2011 New Revision: 227771 URL: http://svn.freebsd.org/changeset/base/227771 Log: Replace 'chflags' with 'file flags' in a comment, since 'chflags' is a command, not a flag itself. While here, wrap a line for readability. Submitted by: arundel MFC after:3 days X-MFC-With: 227769, 227770 Modified: head/Makefile Modified: head/Makefile == --- head/Makefile Sun Nov 20 19:27:52 2011(r227770) +++ head/Makefile Sun Nov 20 20:05:47 2011(r227771) @@ -182,12 +182,12 @@ buildworld: upgrade_checks # # In the following, the first 'rm' in a series will usually remove all # files and directories. If it does not, then there are probably some -# files with chflags set, so this unsets them and tries the 'rm' a +# files with file flags set, so this unsets them and tries the 'rm' a # second time. There are situations where this target will be cleaning # some directories via more than one method, but that duplication is # needed to correctly handle all the possible situations. Removing all -# files without file flags set in the first 'rm' instance saves -# time, because 'chflags' will need to operate on fewer files afterwards. +# files without file flags set in the first 'rm' instance saves time, +# because 'chflags' will need to operate on fewer files afterwards. # BW_CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR} cleanworld: ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r227773 - in head: bin/sh tools/regression/bin/sh/parameters
Author: jilles Date: Sun Nov 20 21:48:50 2011 New Revision: 227773 URL: http://svn.freebsd.org/changeset/base/227773 Log: sh: Allow unsetting OPTIND. Note that only assigning the decimal value 1 resets getopts, as before. Added: head/tools/regression/bin/sh/parameters/optind1.0 (contents, props changed) Modified: head/bin/sh/options.c Modified: head/bin/sh/options.c == --- head/bin/sh/options.c Sun Nov 20 21:47:25 2011(r227772) +++ head/bin/sh/options.c Sun Nov 20 21:48:50 2011(r227773) @@ -401,9 +401,10 @@ setcmd(int argc, char **argv) void getoptsreset(const char *value) { - if (number(value) == 1) { + while (*value == '0') + value++; + if (strcmp(value, "1") == 0) shellparam.reset = 1; - } } /* Added: head/tools/regression/bin/sh/parameters/optind1.0 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/parameters/optind1.0 Sun Nov 20 21:48:50 2011(r227773) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +unset OPTIND && [ -z "$OPTIND" ] ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r227774 - head/sbin/geom/class/part
Author: wblock (doc committer) Date: Mon Nov 21 00:02:49 2011 New Revision: 227774 URL: http://svn.freebsd.org/changeset/base/227774 Log: Add a section that explicitly describes partitioning schemes. Modify existing sections to refer to the new one. Rearrange partitioning scheme list so MBR and EBR types are together. Also add several corrections for grammar, clarity, and consistency. Approved by: gjb (mentor) MFC after:1 week Modified: head/sbin/geom/class/part/gpart.8 Modified: head/sbin/geom/class/part/gpart.8 == --- head/sbin/geom/class/part/gpart.8 Sun Nov 20 21:48:50 2011 (r227773) +++ head/sbin/geom/class/part/gpart.8 Mon Nov 21 00:02:49 2011 (r227774) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 19, 2011 +.Dd October 26, 2011 .Dt GPART 8 .Os .Sh NAME @@ -37,52 +37,20 @@ lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "options GEOM_PART_APM" .Cd "options GEOM_PART_BSD" -.Cd "options GEOM_PART_EBR" -.Cd "options GEOM_PART_EBR_COMPAT" .Cd "options GEOM_PART_GPT" .Cd "options GEOM_PART_MBR" +.Cd "options GEOM_PART_EBR" +.Cd "options GEOM_PART_EBR_COMPAT" .Cd "options GEOM_PART_PC98" .Cd "options GEOM_PART_VTOC8" .Ed .Pp -The -.Dv GEOM_PART_APM -option adds support for the Apple Partition Map (APM) -found on Apple Macintosh computers. -The -.Dv GEOM_PART_BSD -option adds support for the traditional -.Bx -disklabel. -The -.Dv GEOM_PART_EBR -option adds support for the Extended Boot Record (EBR), -which is used to define a logical partition. -The -.Dv GEOM_PART_EBR_COMPAT -option enables backward compatibility for partition names -in the EBR scheme. -Also it makes impossible any types of actions -with such partitions. -The -.Dv GEOM_PART_GPT -option adds support for the GUID Partition Table (GPT) -found on Intel Itanium computers and Intel-based Macintosh computers. -The -.Dv GEOM_PART_MBR -option adds support for the Master Boot Record (MBR) -found on PCs and used on many removable media. -The -.Dv GEOM_PART_PC98 -option adds support for the MBR variant as used on -NEC PC-98 computers. -The -.Dv GEOM_PART_VTOC8 -option adds support for Sun's SMI VTOC8 label as -found on computers based on -.Tn SPARC64 -and -.Tn UltraSPARC. +These options provide support for the various types of partitioning +schemes supported by the +.Ns Nm +utility. See +.Sx "PARTITIONING SCHEMES" +below for more details. .Pp Usage of the .Ns Nm @@ -190,7 +158,7 @@ utility: The .Nm utility is used to partition GEOM providers, normally disks. -The first argument of which is the action to be taken: +The first argument is the action to be taken: .Bl -tag -width ".Cm bootcode" .\" ADD .It Cm add @@ -245,7 +213,7 @@ about its use. .El .\" BACKUP .It Cm backup -Dump a partition table to standard output in special format used by +Dump a partition table to standard output in a special format used by the .Cm restore action. .\" BOOTCODE @@ -290,18 +258,17 @@ about its use. .It Cm commit Commit any pending changes for geom .Ar geom . -All actions are being committed by default and will not result in +All actions are committed by default and will not result in pending changes. Actions can be modified with the .Fl f Ar flags -option so that they are not being committed by default. -As such, they become pending. +option so that they are not committed, but become pending. Pending changes are reflected by the geom and the .Nm utility, but they are not actually written to disk. The .Cm commit -action will write any and all pending changes to disk. +action will write all pending changes to disk. .\" CREATE .It Cm create Create a new partitioning scheme on a provider given by @@ -309,16 +276,16 @@ Create a new partitioning scheme on a pr The .Fl s Ar scheme option determines the scheme to use. -The kernel needs to have support for a particular scheme before +The kernel must have support for a particular scheme before that scheme can be used to partition a disk. .Pp Additional options include: .Bl -tag -width 10n .It Fl n Ar entries The number of entries in the partition table. -Every partitioning scheme has a minimum and a maximum number of entries -and this option allows tables to be created with the number of entries -that lies anywhere between the minimum and the maximum. +Every partitioning scheme has a minimum and maximum number of entries. +This option allows tables to be created with a number of entries +that is within the limits. Some schemes have a maximum equal to the minimum and some schemes have a maximum large enough to be considered unlimited. By default, partition tables are created with the minimum number of @@ -392,7 +359,7 @@ about its use. .El .\" RECOVER .It Cm recover -Recover corrupt partition's scheme metadata on the geom +Recover a corrupt partition's scheme metadata on
svn commit: r227775 - in head: lib/clang share/mk
Author: nwhitehorn Date: Mon Nov 21 00:49:46 2011 New Revision: 227775 URL: http://svn.freebsd.org/changeset/base/227775 Log: Connect LLVM/clang to the build on powerpc64. After the binutils 2.17.50 import, it works without issue. Modified: head/lib/clang/clang.build.mk head/share/mk/bsd.own.mk Modified: head/lib/clang/clang.build.mk == --- head/lib/clang/clang.build.mk Mon Nov 21 00:02:49 2011 (r227774) +++ head/lib/clang/clang.build.mk Mon Nov 21 00:49:46 2011 (r227775) @@ -9,7 +9,7 @@ CFLAGS+=-I${LLVM_SRCS}/include -I${CLANG -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS #-DNDEBUG # Correct for gcc miscompilation when compiling on PPC with -O2 -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_CPUARCH} == "powerpc" CFLAGS+= -O1 .endif Modified: head/share/mk/bsd.own.mk == --- head/share/mk/bsd.own.mkMon Nov 21 00:02:49 2011(r227774) +++ head/share/mk/bsd.own.mkMon Nov 21 00:49:46 2011(r227775) @@ -428,15 +428,14 @@ __T=${TARGET_ARCH} .else __T=${MACHINE_ARCH} .endif -# Clang is only for x86 and 32-bit powerpc right now, by default. -.if ${__T} == "amd64" || ${__T} == "i386" || ${__T} == "powerpc" +# Clang is only for x86 and powerpc right now, by default. +.if ${__T} == "amd64" || ${__T} == "i386" || ${__T:Mpowerpc*} __DEFAULT_YES_OPTIONS+=CLANG .else __DEFAULT_NO_OPTIONS+=CLANG .endif -# FDT is needed only for arm, mips and powerpc (and not powerpc64) -.if ${__T} == "arm" || ${__T} == "armeb" || ${__T} == "powerpc" || \ -${__T:Mmips*} +# FDT is needed only for arm, mips and powerpc +.if ${__T:Marm*} || ${__T:Mpowerpc*} || ${__T:Mmips*} __DEFAULT_YES_OPTIONS+=FDT .else __DEFAULT_NO_OPTIONS+=FDT ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r227776 - in head: lib/libc/sys sys/amd64/linux32 sys/compat/freebsd32 sys/conf sys/i386/linux sys/kern sys/sys
Author: lstewart Date: Mon Nov 21 01:26:10 2011 New Revision: 227776 URL: http://svn.freebsd.org/changeset/base/227776 Log: - Add the ffclock_getcounter(), ffclock_getestimate() and ffclock_setestimate() system calls to provide feed-forward clock management capabilities to userspace processes. ffclock_getcounter() returns the current value of the kernel's feed-forward clock counter. ffclock_getestimate() returns the current feed-forward clock parameter estimates and ffclock_setestimate() updates the feed-forward clock parameter estimates. - Document the syscalls in the ffclock.2 man page. - Regenerate the script-derived syscall related files. Committed on behalf of Julien Ridoux and Darryl Veitch from the University of Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward Clock Synchronization Algorithms" project. For more information, see http://www.synclab.org/radclock/ Submitted by: Julien Ridoux (jridoux at unimelb edu au) Added: head/lib/libc/sys/ffclock.2 (contents, props changed) Modified: head/lib/libc/sys/Makefile.inc head/lib/libc/sys/Symbol.map head/sys/amd64/linux32/linux32_proto.h head/sys/compat/freebsd32/freebsd32_proto.h head/sys/compat/freebsd32/freebsd32_syscall.h head/sys/compat/freebsd32/freebsd32_syscalls.c head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/compat/freebsd32/freebsd32_systrace_args.c head/sys/compat/freebsd32/syscalls.master head/sys/conf/files head/sys/i386/linux/linux_proto.h head/sys/kern/init_sysent.c head/sys/kern/kern_ffclock.c head/sys/kern/makesyscalls.sh head/sys/kern/syscalls.c head/sys/kern/syscalls.master head/sys/kern/systrace_args.c head/sys/sys/syscall.h head/sys/sys/syscall.mk head/sys/sys/sysproto.h head/sys/sys/timeffc.h Modified: head/lib/libc/sys/Makefile.inc == --- head/lib/libc/sys/Makefile.inc Mon Nov 21 00:49:46 2011 (r227775) +++ head/lib/libc/sys/Makefile.inc Mon Nov 21 01:26:10 2011 (r227776) @@ -80,7 +80,7 @@ MAN+= abort2.2 accept.2 access.2 acct.2 bind.2 brk.2 cap_enter.2 cap_new.2 chdir.2 chflags.2 \ chmod.2 chown.2 chroot.2 clock_gettime.2 close.2 closefrom.2 \ connect.2 cpuset.2 cpuset_getaffinity.2 dup.2 execve.2 _exit.2 \ - extattr_get_file.2 fcntl.2 fhopen.2 flock.2 fork.2 fsync.2 \ + extattr_get_file.2 fcntl.2 ffclock.2 fhopen.2 flock.2 fork.2 fsync.2 \ getdirentries.2 getdtablesize.2 \ getfh.2 getfsstat.2 getgid.2 getgroups.2 getitimer.2 getlogin.2 \ getloginclass.2 getpeername.2 getpgrp.2 getpid.2 getpriority.2 \ @@ -142,6 +142,8 @@ MLINKS+=extattr_get_file.2 extattr.2 \ extattr_get_file.2 extattr_set_fd.2 \ extattr_get_file.2 extattr_set_file.2 \ extattr_get_file.2 extattr_set_link.2 +MLINKS+=ffclock.2 ffclock_getcounter.2 ffclock.2 ffclock_getestimate.2 \ + ffclock.2 ffclock_setestimate.2 MLINKS+=fhopen.2 fhstat.2 fhopen.2 fhstatfs.2 MLINKS+=getdirentries.2 getdents.2 MLINKS+=getfh.2 lgetfh.2 Modified: head/lib/libc/sys/Symbol.map == --- head/lib/libc/sys/Symbol.mapMon Nov 21 00:49:46 2011 (r227775) +++ head/lib/libc/sys/Symbol.mapMon Nov 21 01:26:10 2011 (r227776) @@ -365,6 +365,9 @@ FBSD_1.2 { cap_getmode; cap_new; cap_getrights; + ffclock_getcounter; + ffclock_getestimate; + ffclock_setestimate; getloginclass; pdfork; pdgetpid; Added: head/lib/libc/sys/ffclock.2 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/sys/ffclock.2 Mon Nov 21 01:26:10 2011(r227776) @@ -0,0 +1,177 @@ +.\" Copyright (c) 2011 The University of Melbourne +.\" All rights reserved. +.\" +.\" This documentation was written by Julien Ridoux at the University of +.\" Melbourne under sponsorship from the FreeBSD Foundation. +.\" +.\" 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 AUTHOR 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 AUTHOR OR CONTRIBUTORS BE LIABL
svn commit: r227777 - head/sbin/geom/class/part
Author: wblock (doc committer) Date: Mon Nov 21 02:03:18 2011 New Revision: 22 URL: http://svn.freebsd.org/changeset/base/22 Log: Fix date. Approved by: gjb (mentor) MFC after:1 week Modified: head/sbin/geom/class/part/gpart.8 Modified: head/sbin/geom/class/part/gpart.8 == --- head/sbin/geom/class/part/gpart.8 Mon Nov 21 01:26:10 2011 (r227776) +++ head/sbin/geom/class/part/gpart.8 Mon Nov 21 02:03:18 2011 (r22) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 26, 2011 +.Dd November 20, 2011 .Dt GPART 8 .Os .Sh NAME ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r227749 - head/sys/kern
On Sun, 20 Nov 2011, Warner Losh wrote: Is this right? Passing 0 to timo causes a panic? That can't be good. Because it reverses the natural order of conversations. On Nov 20, 2011, at 1:36 AM, Hans Petter Selasky wrote: Log: Given that the typical usage of pause() is pause("zzz", hz / N), where N can be greater than hz in some cases, simply ignore a timeout value of zero. Suggested by: Bruce Evans MFC after: 1 week Modified: head/sys/kern/kern_synch.c Modified: head/sys/kern/kern_synch.c == --- head/sys/kern/kern_synch.c Sun Nov 20 08:29:23 2011(r227748) +++ head/sys/kern/kern_synch.c Sun Nov 20 08:36:18 2011(r227749) @@ -333,7 +333,7 @@ msleep_spin(void *ident, struct mtx *mtx int pause(const char *wmesg, int timo) { - KASSERT(timo > 0, ("pause: timo must be > 0")); + KASSERT(timo >= 0, ("pause: timo must be >= 0")); /* silently convert invalid timeouts */ if (timo < 1) I tried to get Hans to remove the KASSERT() and its panic in one of my many reviews of changes to usb_pause() and pause(), but got confused in my review of this commit. I said that this commit restores the old KASSERT() which gives panics for a timeout of 0, but it actually completes changing the KASSERT() so that it doesn't give panics in this case. I got confused because the comments and the code are inconsistent in different ways than before (and KASSERT() has its usual negative logic complications): - a previous comment says, verbosely, that "the timeout must be greater than zero" - the previous KASSERT() requires, consisely, that "timo must be > 0". This was consistent with the comment. The new KASSERT() is inconsistent with the comment. - the "silently convert invalid timeouts" code, which was added on my request in the previous commit, was unreachable in all cases that it handles when INVARIANTS is configured. Now it is reachable for timeouts of 0. It remains unreachable for timeouts of < 0. The verbose previous comment is not as verbose as this mail, so it doesn't describe all the cases. timo isn't a function, so 0 can't be passed to it. Passing a timeout of 0 to various functions has various behaviours: - passing a timeout of 0 to msleep() is supported and means no timeout (= a timeout of infinity). (Negative timeouts don't seem to be properly handled by msleep(). They are neither rejected not silently fixed up, but are passed on.) - passing a timeout of 0 (or < 0) to callout_reset() makes no sense, but is not considered harmful enough the panic on. It was silently fixed up to be a timeout of 1. - passing a timeout of 0 (or < 0) to pause() makes no sense, but was considered to be harmful enough to panic on for a timeout of 0, while negative timeouts were just passed on. (pause()'s main comment says that it is like tsleep(), but it is really like DELAY(). Thus its timeout isn't really a (maximum) timeout, but is a (minimum) DELAY(). Another minor problem with the API or documentation is that it isn't clear if the caller is responsible for handling the implementation detail that pause(msg, 1) only delays for a fractional tick iff it is implemented using tsleep(); the caller must ask for a "timeout" of of 2 if it wants a delay of strictly >= 1 tick. Returning early is OK for a maximum timeout but not for a minimum delay. Non-hardware callers probably don't care about getting a minimum, but usb callers do. usb_pause() has always adds 1 tick to handle this and rounding errors.) After Hans' first change, negative timeouts were considered harmful enough to panic on too. I thought that this was silly, since pause() is unimportant compared with callout_reset() -- who cares if it is passed an invalid timeout? -- and asked him to change to the silent fixup used by callout_reset(). This is now done for timeouts of 0, but not for timeouts of < 0 in the INVARIANTS case (since the KASSERT() is still there for them). Checking for timeouts of < 0 in pause() is getting close to checking for parity errors in the CPU in pause(). msleep() is much more important, but never did either. pause() grew some additional complications that I don't like. Hans noticed that DELAY(n) overflows for large n on arm. So pause() now avoids passing large n to DELAY(). Probably no other callers of DELAY() do this, and no callers of pause() need large n for DELAY(). Why is top posting considered harmful? Bruce ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r227778 - head/sys/net
Author: lstewart Date: Mon Nov 21 04:17:24 2011 New Revision: 227778 URL: http://svn.freebsd.org/changeset/base/227778 Log: - When feed-forward clock support is compiled in, change the BPF header to contain both a regular timestamp obtained from the system clock and the current feed-forward ffcounter value. This enables new possibilities including comparison of timekeeping performance and timestamp correction during post processing. - Add the net.bpf.ffclock_tstamp sysctl to provide a choice between timestamping packets using the feedback or feed-forward system clock. Committed on behalf of Julien Ridoux and Darryl Veitch from the University of Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward Clock Synchronization Algorithms" project. For more information, see http://www.synclab.org/radclock/ Submitted by: Julien Ridoux (jridoux at unimelb edu au) Modified: head/sys/net/bpf.c head/sys/net/bpf.h Modified: head/sys/net/bpf.c == --- head/sys/net/bpf.c Mon Nov 21 02:03:18 2011(r22) +++ head/sys/net/bpf.c Mon Nov 21 04:17:24 2011(r227778) @@ -1,12 +1,17 @@ /*- * Copyright (c) 1990, 1991, 1993 - * The Regents of the University of California. All rights reserved. + * The Regents of the University of California. + * Copyright (c) 2011 The FreeBSD Foundation. + * All rights reserved. * * This code is derived from the Stanford/CMU enet packet filter, * (net/enet.c) distributed as part of 4.3BSD, and code contributed * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence * Berkeley Laboratory. * + * Portions of this software were developed by Julien Ridoux at the University + * of Melbourne under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -39,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include "opt_bpf.h" #include "opt_compat.h" +#include "opt_ffclock.h" #include "opt_netgraph.h" #include @@ -55,6 +61,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef FFCLOCK +#include +#endif #include #include @@ -90,8 +99,13 @@ MALLOC_DEFINE(M_BPF, "BPF", "BPF data"); #define PRINET 26 /* interruptible */ +#ifdef FFCLOCK +#define SIZEOF_BPF_HDR(type) \ +(offsetof(type, ffcount_stamp) + sizeof(((type *)0)->ffcount_stamp)) +#else #defineSIZEOF_BPF_HDR(type)\ (offsetof(type, bh_hdrlen) + sizeof(((type *)0)->bh_hdrlen)) +#endif #ifdef COMPAT_FREEBSD32 #include @@ -111,6 +125,9 @@ struct bpf_hdr32 { uint32_tbh_datalen; /* original length of packet */ uint16_tbh_hdrlen; /* length of bpf header (this struct plus alignment padding) */ +#ifdef FFCLOCK + ffcounter ffcount_stamp; /* ffcounter timestamp of packet */ +#endif }; #endif @@ -151,9 +168,16 @@ static int bpf_setif(struct bpf_d *, str static voidbpf_timed_out(void *); static __inline void bpf_wakeup(struct bpf_d *); +#ifdef FFCLOCK +static voidcatchpacket(struct bpf_d *, u_char *, unsigned int, + unsigned int, void (*)(struct bpf_d *, caddr_t, + unsigned int, void *, unsigned int), struct bintime *, + ffcounter *); +#else static voidcatchpacket(struct bpf_d *, u_char *, u_int, u_int, void (*)(struct bpf_d *, caddr_t, u_int, void *, u_int), struct bintime *); +#endif static voidreset_d(struct bpf_d *); static int bpf_setf(struct bpf_d *, struct bpf_program *, u_long cmd); static int bpf_getdltlist(struct bpf_d *, struct bpf_dltlist *); @@ -172,6 +196,12 @@ SYSCTL_INT(_net_bpf, OID_AUTO, zerocopy_ &bpf_zerocopy_enable, 0, "Enable new zero-copy BPF buffer sessions"); static SYSCTL_NODE(_net_bpf, OID_AUTO, stats, CTLFLAG_MPSAFE | CTLFLAG_RW, bpf_stats_sysctl, "bpf statistics portal"); +#ifdef FFCLOCK +static int bpf_ffclock_tstamp = 0; +SYSCTL_INT(_net_bpf, OID_AUTO, ffclock_tstamp, CTLFLAG_RW, +&bpf_ffclock_tstamp, 0, +"Set BPF to timestamp using Feed-Forward clock by default"); +#endif static d_open_tbpfopen; static d_read_tbpfread; @@ -698,6 +728,15 @@ bpfopen(struct cdev *dev, int flags, int callout_init_mtx(&d->bd_callout, &d->bd_mtx, 0); knlist_init_mtx(&d->bd_sel.si_note, &d->bd_mtx); +#ifdef FFCLOCK + /* +* Set the timestamping mode for this device, i.e. which clock is used. +* The default option is to use the feedback/ntpd system clock. +*/ + if (bpf_ffclock_tstamp) + d->bd_tstamp = d->bd_tstamp | BPF_T_FFCLOCK; +#endif + return (0); } @@ -1776,8 +1815,13 @@ bpf_ts_quality(int t
svn commit: r227779 - head/sys/powerpc/ps3
Author: nwhitehorn Date: Mon Nov 21 04:35:23 2011 New Revision: 227779 URL: http://svn.freebsd.org/changeset/base/227779 Log: The PPC IRQ layer assumes that the IPI IRQ is the last IRQ on the PIC. This assumption is invalid and the code should be fixed, but humor it for now and set the "IPI" for PS3s in the non-SMP case to a large number. This fixes boot with a non-SMP kernel. Submitted by: geoffrey dot levand at mail dot ru MFC after:1 week Modified: head/sys/powerpc/ps3/ps3pic.c Modified: head/sys/powerpc/ps3/ps3pic.c == --- head/sys/powerpc/ps3/ps3pic.c Mon Nov 21 04:17:24 2011 (r227778) +++ head/sys/powerpc/ps3/ps3pic.c Mon Nov 21 04:35:23 2011 (r227779) @@ -142,6 +142,8 @@ ps3pic_attach(device_t dev) lv1_construct_event_receive_port(&sc->sc_ipi_outlet[1]); lv1_connect_irq_plug_ext(ppe, !thread, sc->sc_ipi_outlet[0], sc->sc_ipi_outlet[1], 0); +#else + sc->sc_ipi_outlet[0] = sc->sc_ipi_outlet[1] = 63; #endif powerpc_register_pic(dev, 0, sc->sc_ipi_outlet[0], 1, FALSE); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r227778 - head/sys/net
On Sun, Nov 20, 2011 at 11:17 PM, Lawrence Stewart wrote: > Author: lstewart > Date: Mon Nov 21 04:17:24 2011 > New Revision: 227778 > URL: http://svn.freebsd.org/changeset/base/227778 > > Log: > - When feed-forward clock support is compiled in, change the BPF header to > contain both a regular timestamp obtained from the system clock and the > current feed-forward ffcounter value. This enables new possibilities > including Is it really necessary to make the ABI dependent on a kernel configuration option? This causes all sorts of headaches if loadable modules ever want to use that ABI, something that we just ran into with vm_page_t and friends and had a long thread on -current about. -Ben Kaduk ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r227778 - head/sys/net
On 11/21/11 16:12, Ben Kaduk wrote: On Sun, Nov 20, 2011 at 11:17 PM, Lawrence Stewart wrote: Author: lstewart Date: Mon Nov 21 04:17:24 2011 New Revision: 227778 URL: http://svn.freebsd.org/changeset/base/227778 Log: - When feed-forward clock support is compiled in, change the BPF header to contain both a regular timestamp obtained from the system clock and the current feed-forward ffcounter value. This enables new possibilities including Is it really necessary to make the ABI dependent on a kernel configuration option? This causes all sorts of headaches if loadable modules ever want to use that ABI, something that we just ran into with vm_page_t and friends and had a long thread on -current about. Fair question. Julien, if pcap and other consumers will happily ignore the new ffcount_stamp member in the bpf header, is there any reason to conditionally add the ffcounter into the header struct? Cheers, Lawrence ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r227778 - head/sys/net
On 21/11/2011, at 4:39 PM, Lawrence Stewart wrote: > On 11/21/11 16:12, Ben Kaduk wrote: >> On Sun, Nov 20, 2011 at 11:17 PM, Lawrence Stewart >> wrote: >>> Author: lstewart >>> Date: Mon Nov 21 04:17:24 2011 >>> New Revision: 227778 >>> URL: http://svn.freebsd.org/changeset/base/227778 >>> >>> Log: >>> - When feed-forward clock support is compiled in, change the BPF header to >>>contain both a regular timestamp obtained from the system clock and the >>>current feed-forward ffcounter value. This enables new possibilities >>> including >> >> Is it really necessary to make the ABI dependent on a kernel >> configuration option? This causes all sorts of headaches if loadable >> modules ever want to use that ABI, something that we just ran into >> with vm_page_t and friends and had a long thread on -current about. > > Fair question. Julien, if pcap and other consumers will happily ignore the > new ffcount_stamp member in the bpf header, is there any reason to > conditionally add the ffcounter into the header struct? It is a valid question indeed. The feedback I have received so far was to not have the feed-forward clock support be a default kernel configuration option. What follows is based on this assumption. The commit (r227747) introduces sysctl that are conditioned by the same "FFCLOCK" kernel configuration option. If a loadable module tests for the presence of this sysctl, it will know if the ffcount_stamp member is available. Is it too much of a hack? Alternatively, if the ffcounter is added to the bpf header unconditionally, the ffcount_stamp member can be set to 0. Loadable modules will then see a consistent ABI but will retrieve a meaningless value. I am not sure which option makes more sense, any preference? Cheers, Julien___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r227780 - head/sys/mips/conf
Author: adrian Date: Mon Nov 21 06:45:12 2011 New Revision: 227780 URL: http://svn.freebsd.org/changeset/base/227780 Log: Always leave the -current kernel debugging options on. Modified: head/sys/mips/conf/AR91XX_BASE Modified: head/sys/mips/conf/AR91XX_BASE == --- head/sys/mips/conf/AR91XX_BASE Mon Nov 21 04:35:23 2011 (r227779) +++ head/sys/mips/conf/AR91XX_BASE Mon Nov 21 06:45:12 2011 (r227780) @@ -35,16 +35,15 @@ options _KPOSIX_PRIORITY_SCHEDULING #Po # options NFS_LEGACYRPC # Debugging for use in -current -# options INVARIANTS -# options INVARIANT_SUPPORT -# options WITNESS -# options WITNESS_SKIPSPIN +optionsINVARIANTS +optionsINVARIANT_SUPPORT +optionsWITNESS +optionsWITNESS_SKIPSPIN options FFS #Berkeley Fast Filesystem options SOFTUPDATES #Enable FFS soft updates support options UFS_ACL #Support for access control lists options UFS_DIRHASH #Improve performance on big directories - # Wireless NIC cards optionsIEEE80211_DEBUG optionsIEEE80211_SUPPORT_MESH ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r227778 - head/sys/net
On Sun, Nov 20, 2011 at 10:18 PM, Julien Ridoux wrote: > > On 21/11/2011, at 4:39 PM, Lawrence Stewart wrote: > >> On 11/21/11 16:12, Ben Kaduk wrote: >>> On Sun, Nov 20, 2011 at 11:17 PM, Lawrence Stewart >>> wrote: Author: lstewart Date: Mon Nov 21 04:17:24 2011 New Revision: 227778 URL: http://svn.freebsd.org/changeset/base/227778 Log: - When feed-forward clock support is compiled in, change the BPF header to contain both a regular timestamp obtained from the system clock and the current feed-forward ffcounter value. This enables new possibilities including >>> >>> Is it really necessary to make the ABI dependent on a kernel >>> configuration option? This causes all sorts of headaches if loadable >>> modules ever want to use that ABI, something that we just ran into >>> with vm_page_t and friends and had a long thread on -current about. >> >> Fair question. Julien, if pcap and other consumers will happily ignore the >> new ffcount_stamp member in the bpf header, is there any reason to >> conditionally add the ffcounter into the header struct? > > It is a valid question indeed. The feedback I have received so far was to not > have the feed-forward clock support be a default kernel configuration option. > What follows is based on this assumption. > > The commit (r227747) introduces sysctl that are conditioned by the same > "FFCLOCK" kernel configuration option. If a loadable module tests for the > presence of this sysctl, it will know if the ffcount_stamp member is > available. Is it too much of a hack? > > Alternatively, if the ffcounter is added to the bpf header unconditionally, > the ffcount_stamp member can be set to 0. Loadable modules will then see a > consistent ABI but will retrieve a meaningless value. > > I am not sure which option makes more sense, any preference? struct inaddr, etc withstood sizing restrictions by adjusting the sin_family / sin_len values appropriate to how large the payload was made.. Could something similar be done for the ffcounter work (obscure behind a void* pointer, use a proper bitwise ORed value for the sin_len and sin_family, etc)? Thanks, -Garrett ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r227778 - head/sys/net
On 11/21/11 17:18, Julien Ridoux wrote: On 21/11/2011, at 4:39 PM, Lawrence Stewart wrote: On 11/21/11 16:12, Ben Kaduk wrote: On Sun, Nov 20, 2011 at 11:17 PM, Lawrence Stewart wrote: Author: lstewart Date: Mon Nov 21 04:17:24 2011 New Revision: 227778 URL: http://svn.freebsd.org/changeset/base/227778 Log: - When feed-forward clock support is compiled in, change the BPF header to contain both a regular timestamp obtained from the system clock and the current feed-forward ffcounter value. This enables new possibilities including Is it really necessary to make the ABI dependent on a kernel configuration option? This causes all sorts of headaches if loadable modules ever want to use that ABI, something that we just ran into with vm_page_t and friends and had a long thread on -current about. Fair question. Julien, if pcap and other consumers will happily ignore the new ffcount_stamp member in the bpf header, is there any reason to conditionally add the ffcounter into the header struct? It is a valid question indeed. The feedback I have received so far was to not have the feed-forward clock support be a default kernel configuration option. What follows is based on this assumption. The commit (r227747) introduces sysctl that are conditioned by the same "FFCLOCK" kernel configuration option. If a loadable module tests for the presence of this sysctl, it will know if the ffcount_stamp member is available. Is it too much of a hack? Alternatively, if the ffcounter is added to the bpf header unconditionally, the ffcount_stamp member can be set to 0. Loadable modules will then see a consistent ABI but will retrieve a meaningless value. I am not sure which option makes more sense, any preference? If I understand the issues correctly, I think the appropriate path forward is to remove the conditional change to the bpf header and have ffcount_stamp become a permanent member of the struct. We'll just leave the member uninitialised in the !FFCLOCK case. This change will make the patch un-MFCable, but I think that's ok. As to the issue of how a kernel module would detect if it's being loaded into a FFCLOCK enabled kernel, why wouldn't we expect modules to "#include opt_ffclock.h" and conditionally compile code based on FFCLOCK being defined? Is there a use case for run-time (as opposed to compile-time) module detection of feed-forward clock capabilities? Cheers, Lawrence ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r227369 - head/bin/sh
On Wed, 9 Nov 2011, Jilles Tjoelker wrote: On Wed, Nov 09, 2011 at 09:35:51AM +0100, Stefan Farfeleder wrote: On Tue, Nov 08, 2011 at 11:54:39PM +, Jilles Tjoelker wrote: Author: jilles Date: Tue Nov 8 23:54:39 2011 New Revision: 227369 URL: http://svn.freebsd.org/changeset/base/227369 Log: sh: Remove undefined behaviour due to overflow in +/-/* in arithmetic. With i386 base gcc and i386 base clang, arith_yacc.o remains unchanged. Modified: head/bin/sh/arith_yacc.c Modified: head/bin/sh/arith_yacc.c == --- head/bin/sh/arith_yacc.cTue Nov 8 23:44:26 2011(r227368) +++ head/bin/sh/arith_yacc.cTue Nov 8 23:54:39 2011(r227369) @@ -131,11 +131,11 @@ static arith_t do_binop(int op, arith_t yyerror("divide error"); return op == ARITH_REM ? a % b : a / b; case ARITH_MUL: - return a * b; + return (uintmax_t)a * (uintmax_t)b; case ARITH_ADD: - return a + b; + return (uintmax_t)a + (uintmax_t)b; case ARITH_SUB: - return a - b; + return (uintmax_t)a - (uintmax_t)b; case ARITH_LSHIFT: return a << b; case ARITH_RSHIFT: Isn't the behaviour undefined too when you convert an out-of-range uintmax_t value back into an intmax_t value? The result is implementation-defined or an implementation-defined signal is raised. C doesn't allow any signal, at least in C90 and n869.txt draft C99: %6.3.1.3 Signed and unsigned integers %... %[#3] Otherwise, the new type is signed and the value cannot %be represented in it; the result is implementation-defined. %J.3 Implementation-defined behavior %... %J.3.5 Integers % %[#1] %... % -- The result of converting an integer to a signed integer % type when the value cannot be represented in an object % of that type (6.3.1.3). n869.txt barely mentions signals, especially here. Its only literal match for "signal raised" is in Annex H for LIA, which says that if an arithmetic exception raises a signal, then the signal shall be SIGFPE, and this is mainly for floating point. It has many more literal matches for "exception raised", since Annex F for IEEE754 requires exceptions to be raised a lot; these exceptions normally don't generate signals. GCC documentation (gcc.info 4.5 Integers implementation) says this ] * `The result of, or the signal raised by, converting an integer to a ] signed integer type when the value cannot be represented in an ] object of that type (C90 6.2.1.2, C99 6.3.1.3).' ", or the signal raised by, " in this seems to be a bug in gcc documentation. The documentation of implementation-defined behaviour shouldn't mention that specifed behaviour is implemented, at least without distinguishing the part that is as specified. ] For conversion to a type of width N, the value is reduced modulo ] 2^N to be within range of the type; no signal is raised. which is exactly what we need. Of course, a correct implementation would give a random result, so that no one depends on implementation-defined behaviour. Bruce ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r227781 - in head/sys/dev/usb: . wlan
Author: hselasky Date: Mon Nov 21 07:50:29 2011 New Revision: 227781 URL: http://svn.freebsd.org/changeset/base/227781 Log: Add new USB IDs to RUN driver. PR: usb/162712 MFC after:1 week Modified: head/sys/dev/usb/usbdevs head/sys/dev/usb/wlan/if_run.c Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsMon Nov 21 06:45:12 2011(r227780) +++ head/sys/dev/usb/usbdevsMon Nov 21 07:50:29 2011(r227781) @@ -2086,6 +2086,7 @@ product LINKSYS4 RT3070 0x0078 RT3070 product LINKSYS4 WUSB600NV20x0079 WUSB600N v2 /* Logitech products */ +product LOGITECH LANW300NU20x0166 LAN-W300N/U2 product LOGITECH M2452 0x0203 M2452 keyboard product LOGITECH M4848 0x0301 M4848 mouse product LOGITECH PAGESCAN 0x040f PageScan @@ -2182,6 +2183,7 @@ product MELCO RT2870_10x0148 RT2870 product MELCO RT2870_2 0x0150 RT2870 product MELCO WLIUCGN 0x015d WLI-UC-GN product MELCO WLIUCG301N 0x016f WLI-UC-G301N +product MELCO WLIUCGNM 0x01a2 WLI-UC-GNM /* Merlin products */ product MERLIN V620 0x1110 Merlin V620 Modified: head/sys/dev/usb/wlan/if_run.c == --- head/sys/dev/usb/wlan/if_run.c Mon Nov 21 06:45:12 2011 (r227780) +++ head/sys/dev/usb/wlan/if_run.c Mon Nov 21 07:50:29 2011 (r227781) @@ -208,12 +208,14 @@ static const STRUCT_USB_HOST_ID run_devs RUN_DEV(LOGITEC, RT2870_1), RUN_DEV(LOGITEC, RT2870_2), RUN_DEV(LOGITEC, RT2870_3), +RUN_DEV(LOGITECH, LANW300NU2), RUN_DEV(MELCO, RT2870_1), RUN_DEV(MELCO, RT2870_2), RUN_DEV(MELCO, WLIUCAG300N), RUN_DEV(MELCO, WLIUCG300N), RUN_DEV(MELCO, WLIUCG301N), RUN_DEV(MELCO, WLIUCGN), +RUN_DEV(MELCO, WLIUCGNM), RUN_DEV(MOTOROLA4, RT2770), RUN_DEV(MOTOROLA4, RT3070), RUN_DEV(MSI, RT3070_1), ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r227782 - head/sys/mips/include
Author: jchandra Date: Mon Nov 21 07:55:37 2011 New Revision: 227782 URL: http://svn.freebsd.org/changeset/base/227782 Log: XLP processors have the release 2 pagegrain register Add accessors to cpufunc.h Obtained from:prabhath at netlogicmicro com Modified: head/sys/mips/include/cpufunc.h Modified: head/sys/mips/include/cpufunc.h == --- head/sys/mips/include/cpufunc.h Mon Nov 21 07:50:29 2011 (r227781) +++ head/sys/mips/include/cpufunc.h Mon Nov 21 07:55:37 2011 (r227782) @@ -272,6 +272,9 @@ MIPS_RW32_COP0(status, MIPS_COP_0_STATUS MIPS_RW32_COP0(entryhi, MIPS_COP_0_TLB_HI); MIPS_RW32_COP0(pagemask, MIPS_COP_0_TLB_PG_MASK); #endif +#ifdef CPU_NLM +MIPS_RW32_COP0_SEL(pagegrain, MIPS_COP_0_TLB_PG_MASK, 1); +#endif #if !defined(__mips_n64) && !defined(__mips_n32) /* !PHYSADDR_64_BIT */ MIPS_RW32_COP0(entrylo0, MIPS_COP_0_TLB_LO0); MIPS_RW32_COP0(entrylo1, MIPS_COP_0_TLB_LO1); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"