From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 00:37:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 24676106566C; Sun, 4 Mar 2012 00:37:56 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by mx1.freebsd.org (Postfix) with ESMTP id 7C5598FC08; Sun, 4 Mar 2012 00:37:54 +0000 (UTC) Received: from c211-30-171-136.carlnfd1.nsw.optusnet.com.au (c211-30-171-136.carlnfd1.nsw.optusnet.com.au [211.30.171.136]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q240bias011168 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 4 Mar 2012 11:37:47 +1100 Date: Sun, 4 Mar 2012 11:37:39 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Dimitry Andric In-Reply-To: <201203031858.q23IwGvG096048@svn.freebsd.org> Message-ID: <20120304102200.D942@besplex.bde.org> References: <201203031858.q23IwGvG096048@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232473 - in head: share/mk sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 00:37:56 -0000 On Sat, 3 Mar 2012, Dimitry Andric wrote: > After r232322, it turned out many people (and some ports) are building > kernel modules using their old installed /usr/share/mk/bsd.*.mk files, > instead of the updated ones in their source tree. This leads to errors > like: It is a bug for sys to depend on anything outside of itself for its configuration. I use multiple sys trees spanning up to 7 major FreeBSD versions on several hosts and expect them to work across 5-10 years of differences, not to break every day when someone changes the sys sources. The host's installed files of course can't be changed. I also don't want to create a separate share/mk tree and point to it using -m, though that was necessary with RELENG_4 sources on about RELENG_6 and later hosts, because of incompatibilities caused by fixing the bug that the sys makefiles referred to the bsd.kern.mk file which was outside of the sys tree. (Fixing this bug made it worse in some ways. /usr/share/mk/bsd.kern.mk was moved to sys/conf/kern.mk. The old version should have been left for compatibility. Removing it broke old sys trees on new hosts. It didn't help that it was renamed, so that -m to tree to find it it sys/conf had no chance of working.) Now there are much larger layering bugs in this area :-(. kern.pre.mk now includes bsd.own.mk (a clear layering violation), and a new MK_ feature is used without ifdefing it every other day to break kernel builds. The previous breakage was for MK_CTF. MK_* is also badly designed. A correct design would have used only simple ifdefs. Simple ifdefs are fail-safe since you have to use ifdef to use them. Kernel headers are much more carefully maintained. They started with many out-of-tree references to installed headers, but were eventually fixed, and the bugs don't seem to have come back. > "sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang") > > Obviously, these errors will go away after a "make installworld", or > alternatively, by using "make buildenv" before attempting to manually > build modules. I never use these (except for performance tests). buildenv is an implementation detail that is not documented in src/Makefile. I also don't want to build or install new toolchains to build kernels. I want my kernel builds from a new sys tree to take seconds, not hours. I sometimes point to an alternative compiler using CC=. BTW, CC=clang works with my -current kernels without the new MK_* foo for clang, except for warnings about tautologous comparisons of unsigned's. -Os in CFLAGS is still horribly broken for CC=gcc, but works with CC=clang. -fno-inline-functions-called-once is necessary for debugging and profiling, but CC=clang doesn't support it. No optimization above -O1 makes a significant difference for kernels, except to waste (possibly insignificant) space (except with CC=clang, -Os actually works, so it saves space). It is sometimes necessary to build but not install a new version of config(8), but this hasn't been necessary for the last 4-5 years of sys trees. Some old sys trees need genassym. I keep genassym in ~/bin for them. Fortunately its ABI was stable, so 1 version works. The only large recent gratuitous incompatibility is that a -current gas can no longer compile 4 year old sources on i386, since it now enforces sizes for accesses to segment registers. > However, since it is apparently an expected use case to build using old > .mk files, change the way we test for clang, so it also works when the > MK_CLANG_IS_CC macro doesn't exist. That is correct. Kernel makefiles shouldn't depend on anything except sys.mk, which should rarely change (MK_CTF mistakes broke it significantly too. These are smaller now). I once tried to make kernel Makefiles completely portable and not depend on depend on sys.mk or on any BSD make feature. The FreeBSD-1 versions were careful to use $@, etc., and to not use ${.TARGET}, etc. BTW, config(8)'s generated makefiles should merge all the included .mk files so that you can actually see what is in them and so that you can edit them. Editing them is useful for removing bugs like the MK_* bugs and for making minor changes to CFLAGS. CFLAGS initialization is very convoluted and broken, so it is hard to control without editing the final CFLAGS setting. This setting is now deep in the source .mk files which are too global to edit to fix just one kernel configuration. I actually fixed the MK_* bugs first by initializing MK*_ in the environment passed to make. This is possible, unlike for CFLAGS, because the initialization is not convuluted. But I got tired of that after forgetting to type the environment change a fe times, and edited the source files. > Note the conditional expressions are becoming rather unreadable now, but > I will attempt to fix that on a followup commit. They also have style bugs (long lines). My fix is missing this bug. > Modified: head/share/mk/bsd.sys.mk > ============================================================================== > --- head/share/mk/bsd.sys.mk Sat Mar 3 18:08:57 2012 (r232472) > +++ head/share/mk/bsd.sys.mk Sat Mar 3 18:58:15 2012 (r232473) > @@ -28,7 +28,7 @@ CFLAGS += -std=${CSTD} > . if defined(WARNS) > . if ${WARNS} >= 1 > CWARNFLAGS += -Wsystem-headers > -. if !defined(NO_WERROR) && ((${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang") || !defined(NO_WERROR.clang)) > +. if !defined(NO_WERROR) && ((${CC:T:Mclang} != "clang" && (!defined(MK_CLANG_IS_CC) || ${MK_CLANG_IS_CC} == "no")) || !defined(NO_WERROR.clang)) > CWARNFLAGS += -Werror > . endif > . endif bsd.sys.mk is in the same layer as bsd.own.mk, so it shouldn't need the new messes. It already had messes (long line are just the largest ones). > @@ -42,7 +42,7 @@ CWARNFLAGS += -W -Wno-unused-parameter - > . if ${WARNS} >= 4 > CWARNFLAGS += -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch\ > -Wshadow -Wunused-parameter > -. if !defined(NO_WCAST_ALIGN) && ((${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang") || !defined(NO_WCAST_ALIGN.clang)) > +. if !defined(NO_WCAST_ALIGN) && ((${CC:T:Mclang} != "clang" && (!defined(MK_CLANG_IS_CC) || ${MK_CLANG_IS_CC} == "no")) || !defined(NO_WCAST_ALIGN.clang)) > CWARNFLAGS += -Wcast-align > . endif > . endif > @@ -59,7 +59,7 @@ CWARNFLAGS += -Wno-uninitialized > CWARNFLAGS += -Wno-pointer-sign > # Clang has more warnings enabled by default, and when using -Wall, so if WARNS > # is set to low values, these have to be disabled explicitly. > -. if ${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang" > +. if ${CC:T:Mclang} == "clang" || (defined(MK_CLANG_IS_CC) && ${MK_CLANG_IS_CC} != "no") > . if ${WARNS} <= 3 > CWARNFLAGS += -Wno-tautological-compare -Wno-unused-value\ > -Wno-parentheses-equality -Wno-unused-function\ > @@ -84,12 +84,12 @@ WFORMAT = 1 > . if ${WFORMAT} > 0 > #CWARNFLAGS += -Wformat-nonliteral -Wformat-security -Wno-format-extra-args > CWARNFLAGS += -Wformat=2 -Wno-format-extra-args > -. if !defined(NO_WERROR) && ((${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang") || !defined(NO_WERROR.clang)) > +. if !defined(NO_WERROR) && ((${CC:T:Mclang} != "clang" && (!defined(MK_CLANG_IS_CC) || ${MK_CLANG_IS_CC} == "no")) || !defined(NO_WERROR.clang)) > CWARNFLAGS += -Werror > . endif > . endif > . endif > -. if defined(NO_WFORMAT) || ((${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang") && defined(NO_WFORMAT.clang)) > +. if defined(NO_WFORMAT) || ((${CC:T:Mclang} == "clang" || (defined(MK_CLANG_IS_CC) && ${MK_CLANG_IS_CC} != "no")) && defined(NO_WFORMAT.clang)) > CWARNFLAGS += -Wno-format > . endif > .endif > @@ -98,7 +98,7 @@ CWARNFLAGS += -Wno-format > CWARNFLAGS += -Wno-unknown-pragmas > .endif > > -.if ${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang" > +.if ${CC:T:Mclang} == "clang" || (defined(MK_CLANG_IS_CC) && ${MK_CLANG_IS_CC} != "no") > CLANG_NO_IAS = -no-integrated-as > CLANG_OPT_SMALL = -mllvm -stack-alignment=8 -mllvm -inline-threshold=3 \ > -mllvm -enable-load-pre=false > It has many other messes. It doesn't look anything like a BSD mk file (starting with its spaces after "." and its tabs before assignments) so I try not to look at it. Old versions of it only have a few of the long lines. Some of the long lines are made longer by the excessive indentation. > Modified: head/sys/conf/kern.mk > ============================================================================== > --- head/sys/conf/kern.mk Sat Mar 3 18:08:57 2012 (r232472) > +++ head/sys/conf/kern.mk Sat Mar 3 18:58:15 2012 (r232473) > @@ -15,7 +15,7 @@ CWARNFLAGS?= -Wall -Wredundant-decls -Wn > # Disable a few warnings for clang, since there are several places in the > # kernel where fixing them is more trouble than it is worth, or where there is > # a false positive. > -.if ${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang" > +.if ${CC:T:Mclang} == "clang" || (defined(MK_CLANG_IS_CC) && ${MK_CLANG_IS_CC} != "no") My version just defines things if they are undefined: % Index: kern.mk % =================================================================== % RCS file: /home/ncvs/src/sys/conf/kern.mk,v % retrieving revision 1.93 % diff -u -2 -r1.93 kern.mk % --- kern.mk 29 Feb 2012 22:58:51 -0000 1.93 % +++ kern.mk 2 Mar 2012 09:17:48 -0000 % @@ -16,4 +16,7 @@ % # kernel where fixing them is more trouble than it is worth, or where there is % # a false positive. % +.if !defined(MK_CLANG_IS_CC) % +MK_CLANG_IS_CC= no % +.endif % .if ${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang" % NO_WCONSTANT_CONVERSION= -Wno-constant-conversion % Index: kern.pre.mk % =================================================================== % RCS file: /home/ncvs/src/sys/conf/kern.pre.mk,v % retrieving revision 1.138 % diff -u -2 -r1.138 kern.pre.mk % --- kern.pre.mk 29 Feb 2012 22:58:51 -0000 1.138 % +++ kern.pre.mk 2 Mar 2012 09:21:35 -0000 % @@ -6,4 +6,8 @@ % .include % % +.if !defined(MK_CLANG_IS_CC) % +MK_CLANG_IS_CC= no % +.endif % + % # backwards compat option for older systems. % MACHINE_CPUARCH?=${MACHINE_ARCH:C/mipse[lb]/mips/:C/armeb/arm/:C/powerpc64/powerpc/} > Modified: head/sys/conf/kmod.mk I rarely use modules, so I didn't need to touch this. > ============================================================================== > --- head/sys/conf/kmod.mk Sat Mar 3 18:08:57 2012 (r232472) > +++ head/sys/conf/kmod.mk Sat Mar 3 18:58:15 2012 (r232473) > @@ -108,7 +108,7 @@ CFLAGS+= -I. -I@ > # for example. > CFLAGS+= -I@/contrib/altq > > -.if ${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang" > +.if ${CC:T:Mclang} != "clang" && (!defined(MK_CLANG_IS_CC) || ${MK_CLANG_IS_CC} == "no") Is any change necessary here? Normally CC is not clang, so the first test should prevent evaluation of MK_LANG_IS_CC just was well as the defined() test. When CC is clang, the defined() test is strictly needed for portability, but people who set CC=clang probably actually need to use the new feature. > CFLAGS+= -finline-limit=${INLINE_LIMIT} > CFLAGS+= --param inline-unit-growth=100 > CFLAGS+= --param large-function-growth=1000 > Bruce From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 00:42:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 53131106564A; Sun, 4 Mar 2012 00:42:19 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3EA2A8FC0C; Sun, 4 Mar 2012 00:42:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q240gJis007057; Sun, 4 Mar 2012 00:42:19 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q240gJdM007055; Sun, 4 Mar 2012 00:42:19 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201203040042.q240gJdM007055@svn.freebsd.org> From: Dimitry Andric Date: Sun, 4 Mar 2012 00:42:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232477 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 00:42:19 -0000 Author: dim Date: Sun Mar 4 00:42:18 2012 New Revision: 232477 URL: http://svn.freebsd.org/changeset/base/232477 Log: In r232322, I forgot one case where a check for MK_CLANG_IS_CC was needed, in sys/conf/kern.pre.mk. Add it now. MFC after: 2 weeks Modified: head/sys/conf/kern.pre.mk Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Sat Mar 3 23:49:53 2012 (r232476) +++ head/sys/conf/kern.pre.mk Sun Mar 4 00:42:18 2012 (r232477) @@ -101,7 +101,7 @@ WERROR?= -Werror # XXX LOCORE means "don't declare C stuff" not "for locore.s". ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} -.if ${CC:T:Mclang} == "clang" +.if ${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang" CLANG_NO_IAS= -no-integrated-as .endif From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 04:17:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6655B1065670; Sun, 4 Mar 2012 04:17:52 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 3C9A38FC08; Sun, 4 Mar 2012 04:17:52 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id E304F46B32; Sat, 3 Mar 2012 23:17:51 -0500 (EST) Received: from kavik.baldwin.cx (c-68-36-150-83.hsd1.nj.comcast.net [68.36.150.83]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 6D26BB924; Sat, 3 Mar 2012 23:17:51 -0500 (EST) From: John Baldwin To: Dimitry Andric Date: Sat, 3 Mar 2012 23:17:48 -0500 User-Agent: KMail/1.13.7 (FreeBSD/9.0-BETA2; KDE/4.6.5; i386; ; ) References: <201203032349.q23NnrIb005355@svn.freebsd.org> In-Reply-To: <201203032349.q23NnrIb005355@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201203032317.49346.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Sat, 03 Mar 2012 23:17:51 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232476 - in head: share/mk sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 04:17:52 -0000 On Saturday, March 03, 2012 06:49:53 PM Dimitry Andric wrote: > Author: dim > Date: Sat Mar 3 23:49:53 2012 > New Revision: 232476 > URL: http://svn.freebsd.org/changeset/base/232476 > > Log: > Revert r232473. I have been convinced by Doug Barton and Bjoern Zeeb > that it is better to error out when people attempt to build using the > wrong bsd.*.mk files, than to silently ignore the problem. > > This means, that after this commit, if you want to build kernel modules > by hand (or via a port) from a head source tree, you *must* make sure > the files in /usr/share/mk are in sync with that tree. If that isn't > possible, for example when you are running on an older FreeBSD branch, > you can: > > - Run "make buildenv" from your head source tree, to have the correct > environment setup. (It's advisable to have run "make buildworld", or > at a minimum "make toolchain" first.) > - Alternatively, set MAKESYSPATH to the share/mk directory under your > head source tree. If your build tools are too old, other problems may > still occur. > - Alternatively, use "make -m" and specify the share/mk directory under > your head source tree. Again, build tools that are too old may still > result in trouble. Or use 'make MK_CTF=no MK_CLANG_IS_CC=no' (which is what I do). However, I know the risks I take doing that, and I think your reversion above is correct. (Unfortunately I can't run HEAD on my primary desktop as I have to use it for ${DAYJOB}.) -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 05:19:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A510E106566C; Sun, 4 Mar 2012 05:19:56 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 949238FC08; Sun, 4 Mar 2012 05:19:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q245JuaB015766; Sun, 4 Mar 2012 05:19:56 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q245Ju6e015764; Sun, 4 Mar 2012 05:19:56 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203040519.q245Ju6e015764@svn.freebsd.org> From: Juli Mallett Date: Sun, 4 Mar 2012 05:19:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232478 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 05:19:56 -0000 Author: jmallett Date: Sun Mar 4 05:19:55 2012 New Revision: 232478 URL: http://svn.freebsd.org/changeset/base/232478 Log: Fix tls base computation with COMPAT_FREEBSD32 on n64 kernels. The previous version was missing an else and would always use the n64 TP_OFFSET. Eliminate some duplication of logic here. It may be worth getting rid of some of the ifdefs and introducing gratuitous SV_ILP32 runtime checks on n64 kernels without COMPAT_FREEBSD32 and on o32 kernels, similarly to how PowerPC works. Modified: head/sys/mips/mips/vm_machdep.c Modified: head/sys/mips/mips/vm_machdep.c ============================================================================== --- head/sys/mips/mips/vm_machdep.c Sun Mar 4 00:42:18 2012 (r232477) +++ head/sys/mips/mips/vm_machdep.c Sun Mar 4 05:19:55 2012 (r232478) @@ -618,14 +618,18 @@ cpu_set_user_tls(struct thread *td, void #ifdef __mips_n64 #ifdef COMPAT_FREEBSD32 - if (SV_PROC_FLAG(td->td_proc, SV_ILP32)) - td->td_md.md_tls = (char*)tls_base + 0x7008; + if (!SV_PROC_FLAG(td->td_proc, SV_ILP32)) { #endif - td->td_md.md_tls = (char*)tls_base + 0x7010; -#else - td->td_md.md_tls = (char*)tls_base + 0x7008; + td->td_md.md_tls = (char*)tls_base + 0x7010; + return (0); +#ifdef COMPAT_FREEBSD32 + } #endif +#endif +#if !defined(__mips_n64) || defined(COMPAT_FREEBSD32) + td->td_md.md_tls = (char*)tls_base + 0x7008; return (0); +#endif } #ifdef DDB From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 05:49:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7260C106566B; Sun, 4 Mar 2012 05:49:40 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6178F8FC08; Sun, 4 Mar 2012 05:49:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q245neBN016721; Sun, 4 Mar 2012 05:49:40 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q245nerb016714; Sun, 4 Mar 2012 05:49:40 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201203040549.q245nerb016714@svn.freebsd.org> From: Adrian Chadd Date: Sun, 4 Mar 2012 05:49:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232479 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 05:49:40 -0000 Author: adrian Date: Sun Mar 4 05:49:39 2012 New Revision: 232479 URL: http://svn.freebsd.org/changeset/base/232479 Log: * Added IEEE80211_ACTION_CAT_MESH in ieee80211.h as specified amendment spec; * Moved old categories as specified by D4.0 to be action fields of MESH category as specified in amendment spec; * Modified functions to use MESH category and its action fields: + ieee80211_send_action_register + ieee80211_send_action + ieee80211_recv_action_register +ieee80211_recv_action; * Modified ieee80211_hwmp_init and hwmp_send_action so they uses correct action fields as specified in amendment spec; * Modified ieee80211_parse_action so that it verifies MESH frames. * Change Mesh Link Metric to use one information element as amendment spec. Draft 4.0 defined two different information elements for request and response. Submitted by: monthadar@gmail.com Modified: head/sys/net80211/ieee80211.h head/sys/net80211/ieee80211_action.c head/sys/net80211/ieee80211_hwmp.c head/sys/net80211/ieee80211_input.c head/sys/net80211/ieee80211_mesh.c head/sys/net80211/ieee80211_mesh.h Modified: head/sys/net80211/ieee80211.h ============================================================================== --- head/sys/net80211/ieee80211.h Sun Mar 4 05:19:55 2012 (r232478) +++ head/sys/net80211/ieee80211.h Sun Mar 4 05:49:39 2012 (r232479) @@ -325,6 +325,7 @@ struct ieee80211_action { #define IEEE80211_ACTION_CAT_DLS 2 /* DLS */ #define IEEE80211_ACTION_CAT_BA 3 /* BA */ #define IEEE80211_ACTION_CAT_HT 7 /* HT */ +#define IEEE80211_ACTION_CAT_MESH 13 /* Mesh */ #define IEEE80211_ACTION_CAT_VENDOR 127 /* Vendor Specific */ #define IEEE80211_ACTION_HT_TXCHWIDTH 0 /* recommended xmit chan width*/ Modified: head/sys/net80211/ieee80211_action.c ============================================================================== --- head/sys/net80211/ieee80211_action.c Sun Mar 4 05:19:55 2012 (r232478) +++ head/sys/net80211/ieee80211_action.c Sun Mar 4 05:49:39 2012 (r232479) @@ -99,16 +99,20 @@ ieee80211_send_action_register(int cat, break; meshpl_send_action[act] = f; return 0; - case IEEE80211_ACTION_CAT_MESHLMETRIC: - if (act >= N(meshlm_send_action)) - break; - meshlm_send_action[act] = f; - return 0; - case IEEE80211_ACTION_CAT_MESHPATH: - if (act >= N(hwmp_send_action)) - break; - hwmp_send_action[act] = f; - return 0; + case IEEE80211_ACTION_CAT_MESH: + switch (act) { + case IEEE80211_ACTION_MESH_LMETRIC: + if (act >= N(meshlm_send_action)) + break; + meshlm_send_action[act] = f; + return 0; + case IEEE80211_ACTION_MESH_HWMP: + if (act >= N(hwmp_send_action)) + break; + hwmp_send_action[act] = f; + return 0; + } + break; case IEEE80211_ACTION_CAT_VENDOR: if (act >= N(vendor_send_action)) break; @@ -144,13 +148,17 @@ ieee80211_send_action(struct ieee80211_n if (act < N(meshpl_send_action)) f = meshpl_send_action[act]; break; - case IEEE80211_ACTION_CAT_MESHLMETRIC: - if (act < N(meshlm_send_action)) - f = meshlm_send_action[act]; - break; - case IEEE80211_ACTION_CAT_MESHPATH: - if (act < N(hwmp_send_action)) - f = hwmp_send_action[act]; + case IEEE80211_ACTION_CAT_MESH: + switch (act) { + case IEEE80211_ACTION_MESH_LMETRIC: + if (act < N(meshlm_send_action)) + f = meshlm_send_action[act]; + break; + case IEEE80211_ACTION_MESH_HWMP: + if (act < N(hwmp_send_action)) + f = hwmp_send_action[act]; + break; + } break; case IEEE80211_ACTION_CAT_VENDOR: if (act < N(vendor_send_action)) @@ -212,16 +220,20 @@ ieee80211_recv_action_register(int cat, break; meshpl_recv_action[act] = f; return 0; - case IEEE80211_ACTION_CAT_MESHLMETRIC: - if (act >= N(meshlm_recv_action)) - break; - meshlm_recv_action[act] = f; - return 0; - case IEEE80211_ACTION_CAT_MESHPATH: - if (act >= N(hwmp_recv_action)) - break; - hwmp_recv_action[act] = f; - return 0; + case IEEE80211_ACTION_CAT_MESH: + switch (act) { + case IEEE80211_ACTION_MESH_LMETRIC: + if (act >= N(meshlm_recv_action)) + break; + meshlm_recv_action[act] = f; + return 0; + case IEEE80211_ACTION_MESH_HWMP: + if (act >= N(hwmp_recv_action)) + break; + hwmp_recv_action[act] = f; + return 0; + } + break; case IEEE80211_ACTION_CAT_VENDOR: if (act >= N(vendor_recv_action)) break; @@ -261,13 +273,17 @@ ieee80211_recv_action(struct ieee80211_n if (ia->ia_action < N(meshpl_recv_action)) f = meshpl_recv_action[ia->ia_action]; break; - case IEEE80211_ACTION_CAT_MESHLMETRIC: - if (ia->ia_action < N(meshlm_recv_action)) - f = meshlm_recv_action[ia->ia_action]; - break; - case IEEE80211_ACTION_CAT_MESHPATH: - if (ia->ia_action < N(hwmp_recv_action)) - f = hwmp_recv_action[ia->ia_action]; + case IEEE80211_ACTION_CAT_MESH: + switch (ia->ia_action) { + case IEEE80211_ACTION_MESH_LMETRIC: + if (ia->ia_action < N(meshlm_recv_action)) + f = meshlm_recv_action[ia->ia_action]; + break; + case IEEE80211_ACTION_MESH_HWMP: + if (ia->ia_action < N(hwmp_recv_action)) + f = hwmp_recv_action[ia->ia_action]; + break; + } break; case IEEE80211_ACTION_CAT_VENDOR: if (ia->ia_action < N(vendor_recv_action)) Modified: head/sys/net80211/ieee80211_hwmp.c ============================================================================== --- head/sys/net80211/ieee80211_hwmp.c Sun Mar 4 05:19:55 2012 (r232478) +++ head/sys/net80211/ieee80211_hwmp.c Sun Mar 4 05:49:39 2012 (r232479) @@ -220,8 +220,8 @@ ieee80211_hwmp_init(void) /* * Register action frame handler. */ - ieee80211_recv_action_register(IEEE80211_ACTION_CAT_MESHPATH, - IEEE80211_ACTION_MESHPATH_SEL, hwmp_recv_action_meshpath); + ieee80211_recv_action_register(IEEE80211_ACTION_CAT_MESH, + IEEE80211_ACTION_MESH_HWMP, hwmp_recv_action_meshpath); /* NB: default is 5 secs per spec */ mesh_proto_hwmp.mpp_inact = msecs_to_ticks(5*1000); @@ -434,8 +434,8 @@ hwmp_send_action(struct ieee80211_node * vap->iv_stats.is_tx_nobuf++; return ENOMEM; } - *frm++ = IEEE80211_ACTION_CAT_MESHPATH; - *frm++ = IEEE80211_ACTION_MESHPATH_SEL; + *frm++ = IEEE80211_ACTION_CAT_MESH; + *frm++ = IEEE80211_ACTION_MESH_HWMP; switch (*ie) { case IEEE80211_ELEMID_MESHPREQ: frm = hwmp_add_meshpreq(frm, Modified: head/sys/net80211/ieee80211_input.c ============================================================================== --- head/sys/net80211/ieee80211_input.c Sun Mar 4 05:19:55 2012 (r232478) +++ head/sys/net80211/ieee80211_input.c Sun Mar 4 05:49:39 2012 (r232479) @@ -760,6 +760,37 @@ ieee80211_parse_action(struct ieee80211_ break; } break; + case IEEE80211_ACTION_CAT_MESH: + switch (ia->ia_action) { + case IEEE80211_ACTION_MESH_LMETRIC: + /* + * XXX: verification is true only if we are using + * Airtime link metric (default) + */ + IEEE80211_VERIFY_LENGTH(efrm - frm, + sizeof(struct ieee80211_meshlmetric_ie), + return EINVAL); + break; + case IEEE80211_ACTION_MESH_HWMP: + /* verify something */ + break; + case IEEE80211_ACTION_MESH_GANN: + case IEEE80211_ACTION_MESH_CC: + case IEEE80211_ACTION_MESH_MCCA_SREQ: + case IEEE80211_ACTION_MESH_MCCA_SREP: + case IEEE80211_ACTION_MESH_MCCA_AREQ: + case IEEE80211_ACTION_MESH_MCCA_ADVER: + case IEEE80211_ACTION_MESH_MCCA_TRDOWN: + case IEEE80211_ACTION_MESH_TBTT_REQ: + case IEEE80211_ACTION_MESH_TBTT_RES: + /* reject these early on, not implemented */ + IEEE80211_DISCARD(vap, + IEEE80211_MSG_ELEMID | IEEE80211_MSG_INPUT, + wh, NULL, "not implemented yet, act=0x%02X", + ia->ia_action); + return EINVAL; + } + break; } return 0; } Modified: head/sys/net80211/ieee80211_mesh.c ============================================================================== --- head/sys/net80211/ieee80211_mesh.c Sun Mar 4 05:19:55 2012 (r232478) +++ head/sys/net80211/ieee80211_mesh.c Sun Mar 4 05:49:39 2012 (r232479) @@ -122,14 +122,12 @@ static const uint8_t broadcastaddr[IEEE8 static ieee80211_recv_action_func mesh_recv_action_meshpeering_open; static ieee80211_recv_action_func mesh_recv_action_meshpeering_confirm; static ieee80211_recv_action_func mesh_recv_action_meshpeering_close; -static ieee80211_recv_action_func mesh_recv_action_meshlmetric_req; -static ieee80211_recv_action_func mesh_recv_action_meshlmetric_rep; +static ieee80211_recv_action_func mesh_recv_action_meshlmetric; static ieee80211_send_action_func mesh_send_action_meshpeering_open; static ieee80211_send_action_func mesh_send_action_meshpeering_confirm; static ieee80211_send_action_func mesh_send_action_meshpeering_close; -static ieee80211_send_action_func mesh_send_action_meshlink_request; -static ieee80211_send_action_func mesh_send_action_meshlink_reply; +static ieee80211_send_action_func mesh_send_action_meshlmetric; static const struct ieee80211_mesh_proto_metric mesh_metric_airtime = { .mpm_descr = "AIRTIME", @@ -437,10 +435,8 @@ ieee80211_mesh_init(void) ieee80211_recv_action_register(IEEE80211_ACTION_CAT_MESHPEERING, IEEE80211_ACTION_MESHPEERING_CLOSE, mesh_recv_action_meshpeering_close); - ieee80211_recv_action_register(IEEE80211_ACTION_CAT_MESHLMETRIC, - IEEE80211_ACTION_MESHLMETRIC_REQ, mesh_recv_action_meshlmetric_req); - ieee80211_recv_action_register(IEEE80211_ACTION_CAT_MESHLMETRIC, - IEEE80211_ACTION_MESHLMETRIC_REP, mesh_recv_action_meshlmetric_rep); + ieee80211_recv_action_register(IEEE80211_ACTION_CAT_MESH, + IEEE80211_ACTION_MESH_LMETRIC, mesh_recv_action_meshlmetric); ieee80211_send_action_register(IEEE80211_ACTION_CAT_MESHPEERING, IEEE80211_ACTION_MESHPEERING_OPEN, @@ -451,12 +447,9 @@ ieee80211_mesh_init(void) ieee80211_send_action_register(IEEE80211_ACTION_CAT_MESHPEERING, IEEE80211_ACTION_MESHPEERING_CLOSE, mesh_send_action_meshpeering_close); - ieee80211_send_action_register(IEEE80211_ACTION_CAT_MESHLMETRIC, - IEEE80211_ACTION_MESHLMETRIC_REQ, - mesh_send_action_meshlink_request); - ieee80211_send_action_register(IEEE80211_ACTION_CAT_MESHLMETRIC, - IEEE80211_ACTION_MESHLMETRIC_REP, - mesh_send_action_meshlink_reply); + ieee80211_send_action_register(IEEE80211_ACTION_CAT_MESH, + IEEE80211_ACTION_MESH_LMETRIC, + mesh_send_action_meshlmetric); /* * Register Airtime Link Metric. @@ -1861,25 +1854,24 @@ mesh_recv_action_meshpeering_close(struc * Link Metric handling. */ static int -mesh_recv_action_meshlmetric_req(struct ieee80211_node *ni, - const struct ieee80211_frame *wh, - const uint8_t *frm, const uint8_t *efrm) -{ - uint32_t metric; - - metric = mesh_airtime_calc(ni); - ieee80211_send_action(ni, - IEEE80211_ACTION_CAT_MESHLMETRIC, - IEEE80211_ACTION_MESHLMETRIC_REP, - &metric); - return 0; -} - -static int -mesh_recv_action_meshlmetric_rep(struct ieee80211_node *ni, +mesh_recv_action_meshlmetric(struct ieee80211_node *ni, const struct ieee80211_frame *wh, const uint8_t *frm, const uint8_t *efrm) { + const struct ieee80211_meshlmetric_ie *ie = + (const struct ieee80211_meshlmetric_ie *) + (frm+2); /* action + code */ + struct ieee80211_meshlmetric_ie lm_rep; + + if (ie->lm_flags & IEEE80211_MESH_LMETRIC_FLAGS_REQ) { + lm_rep.lm_flags = 0; + lm_rep.lm_metric = mesh_airtime_calc(ni); + ieee80211_send_action(ni, + IEEE80211_ACTION_CAT_MESH, + IEEE80211_ACTION_MESH_LMETRIC, + &lm_rep); + } + /* XXX: else do nothing for now */ return 0; } @@ -2091,56 +2083,23 @@ mesh_send_action_meshpeering_close(struc } static int -mesh_send_action_meshlink_request(struct ieee80211_node *ni, +mesh_send_action_meshlmetric(struct ieee80211_node *ni, int category, int action, void *arg0) { struct ieee80211vap *vap = ni->ni_vap; struct ieee80211com *ic = ni->ni_ic; + struct ieee80211_meshlmetric_ie *ie = arg0; struct mbuf *m; uint8_t *frm; - IEEE80211_NOTE(vap, IEEE80211_MSG_ACTION | IEEE80211_MSG_MESH, ni, - "%s", "send LINK METRIC REQUEST action"); - - IEEE80211_DPRINTF(vap, IEEE80211_MSG_NODE, - "ieee80211_ref_node (%s:%u) %p<%s> refcnt %d\n", __func__, __LINE__, - ni, ether_sprintf(ni->ni_macaddr), ieee80211_node_refcnt(ni)+1); - ieee80211_ref_node(ni); - - m = ieee80211_getmgtframe(&frm, - ic->ic_headroom + sizeof(struct ieee80211_frame), - sizeof(uint16_t) /* action+category */ - ); - if (m != NULL) { - /* - * mesh link metric request - * [1] category - * [1] action - */ - *frm++ = category; - *frm++ = action; - m->m_pkthdr.len = m->m_len = frm - mtod(m, uint8_t *); - return mesh_send_action(ni, m); + if (ie->lm_flags & IEEE80211_MESH_LMETRIC_FLAGS_REQ) { + IEEE80211_NOTE(vap, IEEE80211_MSG_ACTION | IEEE80211_MSG_MESH, + ni, "%s", "send LINK METRIC REQUEST action"); } else { - vap->iv_stats.is_tx_nobuf++; - ieee80211_free_node(ni); - return ENOMEM; + IEEE80211_NOTE(vap, IEEE80211_MSG_ACTION | IEEE80211_MSG_MESH, + ni, "send LINK METRIC REPLY action: metric 0x%x", + ie->lm_metric); } -} - -static int -mesh_send_action_meshlink_reply(struct ieee80211_node *ni, - int category, int action, void *args0) -{ - struct ieee80211vap *vap = ni->ni_vap; - struct ieee80211com *ic = ni->ni_ic; - uint32_t *metric = args0; - struct mbuf *m; - uint8_t *frm; - - IEEE80211_NOTE(vap, IEEE80211_MSG_ACTION | IEEE80211_MSG_MESH, ni, - "send LINK METRIC REPLY action: metric 0x%x", *metric); - IEEE80211_DPRINTF(vap, IEEE80211_MSG_NODE, "ieee80211_ref_node (%s:%u) %p<%s> refcnt %d\n", __func__, __LINE__, ni, ether_sprintf(ni->ni_macaddr), ieee80211_node_refcnt(ni)+1); @@ -2148,19 +2107,20 @@ mesh_send_action_meshlink_reply(struct i m = ieee80211_getmgtframe(&frm, ic->ic_headroom + sizeof(struct ieee80211_frame), - sizeof(uint16_t) /* action+category */ - + sizeof(struct ieee80211_meshlmetric_ie) + sizeof(uint16_t) + /* action+category */ + sizeof(struct ieee80211_meshlmetric_ie) ); if (m != NULL) { /* - * mesh link metric reply + * mesh link metric * [1] category * [1] action * [tlv] mesh link metric */ *frm++ = category; *frm++ = action; - frm = ieee80211_add_meshlmetric(frm, *metric); + frm = ieee80211_add_meshlmetric(frm, + ie->lm_flags, ie->lm_metric); m->m_pkthdr.len = m->m_len = frm - mtod(m, uint8_t *); return mesh_send_action(ni, m); } else { @@ -2505,10 +2465,11 @@ mesh_airtime_calc(struct ieee80211_node * Add a Mesh Link Metric report IE to a frame. */ uint8_t * -ieee80211_add_meshlmetric(uint8_t *frm, uint32_t metric) +ieee80211_add_meshlmetric(uint8_t *frm, uint8_t flags, uint32_t metric) { *frm++ = IEEE80211_ELEMID_MESHLINK; - *frm++ = 4; + *frm++ = 5; + *frm++ = flags; ADDWORD(frm, metric); return frm; } Modified: head/sys/net80211/ieee80211_mesh.h ============================================================================== --- head/sys/net80211/ieee80211_mesh.h Sun Mar 4 05:19:55 2012 (r232478) +++ head/sys/net80211/ieee80211_mesh.h Sun Mar 4 05:49:39 2012 (r232479) @@ -119,8 +119,14 @@ struct ieee80211_meshid_ie { /* Link Metric Report */ struct ieee80211_meshlmetric_ie { - uint8_t lm_ie; /* IEEE80211_ELEMID_MESHLINK */ + uint8_t lm_ie; /* IEEE80211_ACTION_MESH_LMETRIC */ uint8_t lm_len; + uint8_t lm_flags; +#define IEEE80211_MESH_LMETRIC_FLAGS_REQ 0x01 /* Request */ + /* + * XXX: this field should be variable in size and depend on + * the active active path selection metric identifier + */ uint32_t lm_metric; #define IEEE80211_MESHLMETRIC_INITIALVAL 0 } __packed; @@ -307,8 +313,7 @@ struct ieee80211_meshpuc_ie { * 802.11s Action Frames */ #define IEEE80211_ACTION_CAT_MESHPEERING 30 /* XXX Linux */ -#define IEEE80211_ACTION_CAT_MESHLMETRIC 13 -#define IEEE80211_ACTION_CAT_MESHPATH 32 /* XXX Linux */ +/* XXX: these need to be looked into */ #define IEEE80211_ACTION_CAT_INTERWORK 15 #define IEEE80211_ACTION_CAT_RESOURCE 16 #define IEEE80211_ACTION_CAT_PROXY 17 @@ -324,20 +329,21 @@ enum { }; /* - * Mesh Path Selection Action code. + * Mesh Action code. */ enum { - IEEE80211_ACTION_MESHPATH_SEL = 0, - /* 1-255 reserved */ -}; - -/* - * Mesh Link Metric Action codes. - */ -enum { - IEEE80211_ACTION_MESHLMETRIC_REQ = 0, /* Link Metric Request */ - IEEE80211_ACTION_MESHLMETRIC_REP = 1, /* Link Metric Report */ - /* 2-255 reserved */ + IEEE80211_ACTION_MESH_LMETRIC = 0, /* Mesh Link Metric Report */ + IEEE80211_ACTION_MESH_HWMP = 1, /* HWMP Mesh Path Selection */ + IEEE80211_ACTION_MESH_GANN = 2, /* Gate Announcement */ + IEEE80211_ACTION_MESH_CC = 3, /* Congestion Control */ + IEEE80211_ACTION_MESH_MCCA_SREQ = 4, /* MCCA Setup Request */ + IEEE80211_ACTION_MESH_MCCA_SREP = 5, /* MCCA Setup Reply */ + IEEE80211_ACTION_MESH_MCCA_AREQ = 6, /* MCCA Advertisement Req. */ + IEEE80211_ACTION_MESH_MCCA_ADVER =7, /* MCCA Advertisement */ + IEEE80211_ACTION_MESH_MCCA_TRDOWN = 8, /* MCCA Teardown */ + IEEE80211_ACTION_MESH_TBTT_REQ = 9, /* TBTT Adjustment Request */ + IEEE80211_ACTION_MESH_TBTT_RES = 10, /* TBTT Adjustment Response */ + /* 11-255 reserved */ }; /* @@ -496,7 +502,7 @@ uint8_t * ieee80211_add_meshid(uint8_t * uint8_t * ieee80211_add_meshconf(uint8_t *, struct ieee80211vap *); uint8_t * ieee80211_add_meshpeer(uint8_t *, uint8_t, uint16_t, uint16_t, uint16_t); -uint8_t * ieee80211_add_meshlmetric(uint8_t *, uint32_t); +uint8_t * ieee80211_add_meshlmetric(uint8_t *, uint8_t, uint32_t); void ieee80211_mesh_node_init(struct ieee80211vap *, struct ieee80211_node *); From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 05:52:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A6CEA106564A; Sun, 4 Mar 2012 05:52:27 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 960778FC19; Sun, 4 Mar 2012 05:52:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q245qR7d016847; Sun, 4 Mar 2012 05:52:27 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q245qRmA016843; Sun, 4 Mar 2012 05:52:27 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201203040552.q245qRmA016843@svn.freebsd.org> From: Adrian Chadd Date: Sun, 4 Mar 2012 05:52:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232480 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 05:52:27 -0000 Author: adrian Date: Sun Mar 4 05:52:26 2012 New Revision: 232480 URL: http://svn.freebsd.org/changeset/base/232480 Log: * Introduce new flag for QoS control field; * Change in mesh_input to validate that QoS is set and Mesh Control field is present, also both bytes of the QoS are read; * Moved defragmentation in mesh_input before we try to forward packet as inferred from amendment spec, because Mesh Control field only present in first fragment; * Changed in ieee80211_encap to set QoS subtype and Mesh Control field present, only first fragment have Mesh Control field present bit equal to 1; Submitted by: monthadar@gmail.com Modified: head/sys/net80211/ieee80211.h head/sys/net80211/ieee80211_mesh.c head/sys/net80211/ieee80211_output.c Modified: head/sys/net80211/ieee80211.h ============================================================================== --- head/sys/net80211/ieee80211.h Sun Mar 4 05:49:39 2012 (r232479) +++ head/sys/net80211/ieee80211.h Sun Mar 4 05:52:26 2012 (r232480) @@ -199,6 +199,13 @@ struct ieee80211_qosframe_addr4 { #define IEEE80211_QOS_EOSP 0x10 /* EndOfService Period*/ #define IEEE80211_QOS_EOSP_S 4 #define IEEE80211_QOS_TID 0x0f +/* qos[1] byte used for all frames sent by mesh STAs in a mesh BSS */ +#define IEEE80211_QOS_MC 0x10 /* Mesh control */ +/* Mesh power save level*/ +#define IEEE80211_QOS_MESH_PSL 0x20 +/* Mesh Receiver Service Period Initiated */ +#define IEEE80211_QOS_RSPI 0x40 +/* bits 11 to 15 reserved */ /* does frame have QoS sequence control data */ #define IEEE80211_QOS_HAS_SEQ(wh) \ Modified: head/sys/net80211/ieee80211_mesh.c ============================================================================== --- head/sys/net80211/ieee80211_mesh.c Sun Mar 4 05:49:39 2012 (r232479) +++ head/sys/net80211/ieee80211_mesh.c Sun Mar 4 05:52:26 2012 (r232480) @@ -1040,9 +1040,9 @@ mesh_input(struct ieee80211_node *ni, st struct ieee80211_frame *wh; const struct ieee80211_meshcntl *mc; int hdrspace, meshdrlen, need_tap; - uint8_t dir, type, subtype, qos; + uint8_t dir, type, subtype; uint32_t seq; - uint8_t *addr; + uint8_t *addr, qos[2]; ieee80211_seq rxseq; KASSERT(ni != NULL, ("null node")); @@ -1139,8 +1139,64 @@ mesh_input(struct ieee80211_node *ni, st vap->iv_stats.is_rx_wrongdir++; goto err; } - /* pull up enough to get to the mesh control */ + + /* All Mesh data frames are QoS subtype */ + if (!HAS_SEQ(type)) { + IEEE80211_DISCARD(vap, IEEE80211_MSG_INPUT, + wh, "data", "incorrect subtype 0x%x", subtype); + vap->iv_stats.is_rx_badsubtype++; + goto err; + } + + /* + * Next up, any fragmentation. + * XXX: we defrag before we even try to forward, + * Mesh Control field is not present in sub-sequent + * fragmented frames. This is in contrast to Draft 4.0. + */ hdrspace = ieee80211_hdrspace(ic, wh); + if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) { + m = ieee80211_defrag(ni, m, hdrspace); + if (m == NULL) { + /* Fragment dropped or frame not complete yet */ + goto out; + } + } + wh = mtod(m, struct ieee80211_frame *); /* NB: after defrag */ + + /* + * Now we have a complete Mesh Data frame. + */ + + /* + * Only fromDStoDS data frames use 4 address qos frames + * as specified in amendment. Otherwise addr4 is located + * in the Mesh Control field and a 3 address qos frame + * is used. + */ + if (IEEE80211_IS_DSTODS(wh)) + *(uint16_t *)qos = *(uint16_t *) + ((struct ieee80211_qosframe_addr4 *)wh)->i_qos; + else + *(uint16_t *)qos = *(uint16_t *) + ((struct ieee80211_qosframe *)wh)->i_qos; + + /* + * NB: The mesh STA sets the Mesh Control Present + * subfield to 1 in the Mesh Data frame containing + * an unfragmented MSDU, an A-MSDU, or the first + * fragment of an MSDU. + * After defrag it should always be present. + */ + if (!(qos[1] & IEEE80211_QOS_MC)) { + IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_MESH, + ni->ni_macaddr, NULL, + "%s", "Mesh control field not present"); + vap->iv_stats.is_rx_elem_missing++; /* XXX: kinda */ + goto err; + } + + /* pull up enough to get to the mesh control */ if (m->m_len < hdrspace + sizeof(struct ieee80211_meshcntl) && (m = m_pullup(m, hdrspace + sizeof(struct ieee80211_meshcntl))) == NULL) { @@ -1188,27 +1244,6 @@ mesh_input(struct ieee80211_node *ni, st /* NB: fall thru to deliver mcast frames locally */ } - /* - * Save QoS bits for use below--before we strip the header. - */ - if (subtype == IEEE80211_FC0_SUBTYPE_QOS) { - qos = (dir == IEEE80211_FC1_DIR_DSTODS) ? - ((struct ieee80211_qosframe_addr4 *)wh)->i_qos[0] : - ((struct ieee80211_qosframe *)wh)->i_qos[0]; - } else - qos = 0; - /* - * Next up, any fragmentation. - */ - if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) { - m = ieee80211_defrag(ni, m, hdrspace); - if (m == NULL) { - /* Fragment dropped or frame not complete yet */ - goto out; - } - } - wh = NULL; /* no longer valid, catch any uses */ - if (ieee80211_radiotap_active_vap(vap)) ieee80211_radiotap_rx(vap, m); need_tap = 0; @@ -1229,7 +1264,7 @@ mesh_input(struct ieee80211_node *ni, st IEEE80211_NODE_STAT(ni, rx_decap); goto err; } - if (qos & IEEE80211_QOS_AMSDU) { + if (qos[0] & IEEE80211_QOS_AMSDU) { m = ieee80211_decap_amsdu(ni, m); if (m == NULL) return IEEE80211_FC0_TYPE_DATA; Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Sun Mar 4 05:49:39 2012 (r232479) +++ head/sys/net80211/ieee80211_output.c Sun Mar 4 05:52:26 2012 (r232480) @@ -1074,9 +1074,11 @@ ieee80211_encap(struct ieee80211vap *vap * ap's require all data frames to be QoS-encapsulated * once negotiated in which case we'll need to make this * configurable. + * NB: mesh data frames are QoS. */ - addqos = (ni->ni_flags & (IEEE80211_NODE_QOS|IEEE80211_NODE_HT)) && - (m->m_flags & M_EAPOL) == 0; + addqos = ((ni->ni_flags & (IEEE80211_NODE_QOS|IEEE80211_NODE_HT)) || + (vap->iv_opmode == IEEE80211_M_MBSS)) && + (m->m_flags & M_EAPOL) == 0; if (addqos) hdrsize = sizeof(struct ieee80211_qosframe); else @@ -1282,7 +1284,12 @@ ieee80211_encap(struct ieee80211vap *vap qos[0] = tid & IEEE80211_QOS_TID; if (ic->ic_wme.wme_wmeChanParams.cap_wmeParams[ac].wmep_noackPolicy) qos[0] |= IEEE80211_QOS_ACKPOLICY_NOACK; - qos[1] = 0; +#ifdef IEEE80211_SUPPORT_MESH + if (vap->iv_opmode == IEEE80211_M_MBSS) { + qos[1] |= IEEE80211_QOS_MC; + } else +#endif + qos[1] = 0; wh->i_fc[0] |= IEEE80211_FC0_SUBTYPE_QOS; if ((m->m_flags & M_AMPDU_MPDU) == 0) { @@ -1407,9 +1414,20 @@ ieee80211_fragment(struct ieee80211vap * * we mark the first fragment with the MORE_FRAG bit * it automatically is propagated to each fragment; we * need only clear it on the last fragment (done below). + * NB: frag 1+ dont have Mesh Control field present. */ whf = mtod(m, struct ieee80211_frame *); memcpy(whf, wh, hdrsize); +#ifdef IEEE80211_SUPPORT_MESH + if (vap->iv_opmode == IEEE80211_M_MBSS) { + if (IEEE80211_IS_DSTODS(wh)) + ((struct ieee80211_qosframe_addr4 *) + whf)->i_qos[1] &= ~IEEE80211_QOS_MC; + else + ((struct ieee80211_qosframe *) + whf)->i_qos[1] &= ~IEEE80211_QOS_MC; + } +#endif *(uint16_t *)&whf->i_seq[0] |= htole16( (fragno & IEEE80211_SEQ_FRAG_MASK) << IEEE80211_SEQ_FRAG_SHIFT); From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 07:29:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4069B106564A; Sun, 4 Mar 2012 07:29:36 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F10C8FC08; Sun, 4 Mar 2012 07:29:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q247TaVn020059; Sun, 4 Mar 2012 07:29:36 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q247TZTg020057; Sun, 4 Mar 2012 07:29:35 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201203040729.q247TZTg020057@svn.freebsd.org> From: Gleb Smirnoff Date: Sun, 4 Mar 2012 07:29:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232481 - stable/9/sbin/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 07:29:36 -0000 Author: glebius Date: Sun Mar 4 07:29:35 2012 New Revision: 232481 URL: http://svn.freebsd.org/changeset/base/232481 Log: Merge r227419: Note that NAT instance argument can be tablearg. PR: misc/162265 Submitted by: Paul Procacci Modified: stable/9/sbin/ipfw/ipfw.8 Directory Properties: stable/9/sbin/ipfw/ (props changed) Modified: stable/9/sbin/ipfw/ipfw.8 ============================================================================== --- stable/9/sbin/ipfw/ipfw.8 Sun Mar 4 05:52:26 2012 (r232480) +++ stable/9/sbin/ipfw/ipfw.8 Sun Mar 4 07:29:35 2012 (r232481) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 20, 2011 +.Dd November 10, 2011 .Dt IPFW 8 .Os .Sh NAME @@ -769,7 +769,7 @@ To enable .Cm fwd a custom kernel needs to be compiled with the option .Cd "options IPFIREWALL_FORWARD" . -.It Cm nat Ar nat_nr +.It Cm nat Ar nat_nr | tablearg Pass packet to a nat instance (for network address translation, address redirect, etc.): From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 08:43:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A0EB91065674; Sun, 4 Mar 2012 08:43:33 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8E8518FC12; Sun, 4 Mar 2012 08:43:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q248hXfa022389; Sun, 4 Mar 2012 08:43:33 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q248hXVf022387; Sun, 4 Mar 2012 08:43:33 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201203040843.q248hXVf022387@svn.freebsd.org> From: Andreas Tobler Date: Sun, 4 Mar 2012 08:43:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232482 - head/sys/powerpc/powermac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 08:43:33 -0000 Author: andreast Date: Sun Mar 4 08:43:33 2012 New Revision: 232482 URL: http://svn.freebsd.org/changeset/base/232482 Log: Add support for PWM controlled fans. I found these fans on my PowerMac9,1. These fans are not located under the same node as the the RPM controlled ones, So I had to adapt the current source to parse and fill the properties correctly. To control the fans we can set the PWM ratio via sysctl between 20 and 100%. Tested by: nwhitehorn MFC after: 3 weeks Modified: head/sys/powerpc/powermac/smu.c Modified: head/sys/powerpc/powermac/smu.c ============================================================================== --- head/sys/powerpc/powermac/smu.c Sun Mar 4 07:29:35 2012 (r232481) +++ head/sys/powerpc/powermac/smu.c Sun Mar 4 08:43:33 2012 (r232482) @@ -74,8 +74,21 @@ struct smu_fan { device_t dev; cell_t reg; + enum { + SMU_FAN_RPM, + SMU_FAN_PWM + } type; int old_style; int setpoint; + int rpm; +}; + +/* We can read the PWM and the RPM from a PWM controlled fan. + * Offer both values via sysctl. + */ +enum { + SMU_PWM_SYSCTL_PWM = 1 << 8, + SMU_PWM_SYSCTL_RPM = 2 << 8 }; struct smu_sensor { @@ -205,6 +218,10 @@ static MALLOC_DEFINE(M_SMU, "smu", "SMU /* Command types */ #define SMU_ADC 0xd8 #define SMU_FAN 0x4a +#define SMU_RPM_STATUS 0x01 +#define SMU_RPM_SETPOINT 0x02 +#define SMU_PWM_STATUS 0x11 +#define SMU_PWM_SETPOINT 0x12 #define SMU_I2C 0x9a #define SMU_I2C_SIMPLE 0x00 #define SMU_I2C_NORMAL 0x01 @@ -303,19 +320,21 @@ smu_attach(device_t dev) EVENTHANDLER_REGISTER(cpufreq_post_change, smu_cpufreq_post_change, dev, EVENTHANDLER_PRI_ANY); + node = ofw_bus_get_node(dev); + + /* Some SMUs have RPM and PWM controlled fans which do not sit + * under the same node. So we have to attach them separately. + */ + smu_attach_fans(dev, node); + /* - * Detect and attach child devices. + * Now detect and attach the other child devices. */ - node = ofw_bus_get_node(dev); for (child = OF_child(node); child != 0; child = OF_peer(child)) { char name[32]; memset(name, 0, sizeof(name)); OF_getprop(child, "name", name, sizeof(name)); - if (strncmp(name, "rpm-fans", 9) == 0 || - strncmp(name, "fans", 5) == 0) - smu_attach_fans(dev, child); - if (strncmp(name, "sensors", 8) == 0) smu_attach_sensors(dev, child); @@ -660,7 +679,7 @@ smu_fan_set_rpm(struct smu_fan *fan, int cmd.data[1] = fan->reg; cmd.data[2] = (rpm >> 8) & 0xff; cmd.data[3] = rpm & 0xff; - + error = smu_run_cmd(smu, &cmd, 1); if (error && error != EWOULDBLOCK) fan->old_style = 1; @@ -668,7 +687,7 @@ smu_fan_set_rpm(struct smu_fan *fan, int if (fan->old_style) { cmd.len = 14; - cmd.data[0] = 0; + cmd.data[0] = 0x00; /* RPM fan. */ cmd.data[1] = 1 << fan->reg; cmd.data[2 + 2*fan->reg] = (rpm >> 8) & 0xff; cmd.data[3 + 2*fan->reg] = rpm & 0xff; @@ -704,7 +723,7 @@ smu_fan_read_rpm(struct smu_fan *fan) if (fan->old_style) { cmd.cmd = SMU_FAN; cmd.len = 1; - cmd.data[0] = 1; + cmd.data[0] = SMU_RPM_STATUS; error = smu_run_cmd(smu, &cmd, 1); if (error) @@ -715,6 +734,98 @@ smu_fan_read_rpm(struct smu_fan *fan) return (rpm); } +static int +smu_fan_set_pwm(struct smu_fan *fan, int pwm) +{ + device_t smu = fan->dev; + struct smu_cmd cmd; + int error; + + cmd.cmd = SMU_FAN; + error = EIO; + + /* Clamp to allowed range */ + pwm = max(fan->fan.min_rpm, pwm); + pwm = min(fan->fan.max_rpm, pwm); + + /* + * Apple has two fan control mechanisms. We can't distinguish + * them except by seeing if the new one fails. If the new one + * fails, use the old one. + */ + + if (!fan->old_style) { + cmd.len = 4; + cmd.data[0] = 0x30; + cmd.data[1] = fan->reg; + cmd.data[2] = (pwm >> 8) & 0xff; + cmd.data[3] = pwm & 0xff; + + error = smu_run_cmd(smu, &cmd, 1); + if (error && error != EWOULDBLOCK) + fan->old_style = 1; + } + + if (fan->old_style) { + cmd.len = 14; + cmd.data[0] = 0x10; /* PWM fan. */ + cmd.data[1] = 1 << fan->reg; + cmd.data[2 + 2*fan->reg] = (pwm >> 8) & 0xff; + cmd.data[3 + 2*fan->reg] = pwm & 0xff; + error = smu_run_cmd(smu, &cmd, 1); + } + + if (error == 0) + fan->setpoint = pwm; + + return (error); +} + +static int +smu_fan_read_pwm(struct smu_fan *fan, int *pwm, int *rpm) +{ + device_t smu = fan->dev; + struct smu_cmd cmd; + int error; + + if (!fan->old_style) { + cmd.cmd = SMU_FAN; + cmd.len = 2; + cmd.data[0] = 0x31; + cmd.data[1] = fan->reg; + + error = smu_run_cmd(smu, &cmd, 1); + if (error && error != EWOULDBLOCK) + fan->old_style = 1; + + *rpm = (cmd.data[0] << 8) | cmd.data[1]; + } + + if (fan->old_style) { + cmd.cmd = SMU_FAN; + cmd.len = 1; + cmd.data[0] = SMU_PWM_STATUS; + + error = smu_run_cmd(smu, &cmd, 1); + if (error) + return (error); + + *rpm = (cmd.data[fan->reg*2+1] << 8) | cmd.data[fan->reg*2+2]; + } + if (fan->old_style) { + cmd.cmd = SMU_FAN; + cmd.len = 14; + cmd.data[0] = SMU_PWM_SETPOINT; + cmd.data[1] = 1 << fan->reg; + + error = smu_run_cmd(smu, &cmd, 1); + if (error) + return (error); + + *pwm = cmd.data[fan->reg*2+2]; + } + return (0); +} static int smu_fanrpm_sysctl(SYSCTL_HANDLER_ARGS) @@ -722,24 +833,127 @@ smu_fanrpm_sysctl(SYSCTL_HANDLER_ARGS) device_t smu; struct smu_softc *sc; struct smu_fan *fan; - int rpm, error; + int pwm = 0, rpm, error = 0; smu = arg1; sc = device_get_softc(smu); - fan = &sc->sc_fans[arg2]; + fan = &sc->sc_fans[arg2 & 0xff]; - rpm = smu_fan_read_rpm(fan); - if (rpm < 0) - return (rpm); + if (fan->type == SMU_FAN_RPM) { + rpm = smu_fan_read_rpm(fan); + if (rpm < 0) + return (rpm); - error = sysctl_handle_int(oidp, &rpm, 0, req); + error = sysctl_handle_int(oidp, &rpm, 0, req); + } else { + error = smu_fan_read_pwm(fan, &pwm, &rpm); + if (error < 0) + return (EIO); + + switch (arg2 & 0xff00) { + case SMU_PWM_SYSCTL_PWM: + error = sysctl_handle_int(oidp, &pwm, 0, req); + break; + case SMU_PWM_SYSCTL_RPM: + error = sysctl_handle_int(oidp, &rpm, 0, req); + break; + default: + /* This should never happen */ + return (EINVAL); + }; + } + /* We can only read the RPM from a PWM controlled fan, so return. */ + if ((arg2 & 0xff00) == SMU_PWM_SYSCTL_RPM) + return (0); if (error || !req->newptr) return (error); sc->sc_lastuserchange = time_uptime; - return (smu_fan_set_rpm(fan, rpm)); + if (fan->type == SMU_FAN_RPM) + return (smu_fan_set_rpm(fan, rpm)); + else + return (smu_fan_set_pwm(fan, pwm)); +} + +static void +smu_fill_fan_prop(device_t dev, phandle_t child, int id) +{ + struct smu_fan *fan; + struct smu_softc *sc; + char type[32]; + + sc = device_get_softc(dev); + fan = &sc->sc_fans[id]; + + OF_getprop(child, "device_type", type, sizeof(type)); + /* We have either RPM or PWM controlled fans. */ + if (strcmp(type, "fan-rpm-control") == 0) + fan->type = SMU_FAN_RPM; + else + fan->type = SMU_FAN_PWM; + + fan->dev = dev; + fan->old_style = 0; + OF_getprop(child, "reg", &fan->reg, + sizeof(cell_t)); + OF_getprop(child, "min-value", &fan->fan.min_rpm, + sizeof(int)); + OF_getprop(child, "max-value", &fan->fan.max_rpm, + sizeof(int)); + OF_getprop(child, "zone", &fan->fan.zone, + sizeof(int)); + + if (OF_getprop(child, "unmanaged-value", + &fan->fan.default_rpm, + sizeof(int)) != sizeof(int)) + fan->fan.default_rpm = fan->fan.max_rpm; + + OF_getprop(child, "location", fan->fan.name, + sizeof(fan->fan.name)); + + if (fan->type == SMU_FAN_RPM) + fan->setpoint = smu_fan_read_rpm(fan); + else + smu_fan_read_pwm(fan, &fan->setpoint, &fan->rpm); +} + +/* On the first call count the number of fans. In the second call, + * after allocating the fan struct, fill the properties of the fans. + */ +static int +smu_count_fans(device_t dev) +{ + struct smu_softc *sc; + phandle_t child, node, root; + int nfans = 0; + + node = ofw_bus_get_node(dev); + sc = device_get_softc(dev); + + /* First find the fanroots and count the number of fans. */ + for (root = OF_child(node); root != 0; root = OF_peer(root)) { + char name[32]; + memset(name, 0, sizeof(name)); + OF_getprop(root, "name", name, sizeof(name)); + if (strncmp(name, "rpm-fans", 9) == 0 || + strncmp(name, "pwm-fans", 9) == 0 || + strncmp(name, "fans", 5) == 0) + for (child = OF_child(root); child != 0; + child = OF_peer(child)) { + nfans++; + /* When allocated, fill the fan properties. */ + if (sc->sc_fans != NULL) + smu_fill_fan_prop(dev, child, + nfans - 1); + } + } + if (nfans == 0) { + device_printf(dev, "WARNING: No fans detected!\n"); + return (0); + } + return (nfans); } static void @@ -749,79 +963,92 @@ smu_attach_fans(device_t dev, phandle_t struct smu_softc *sc; struct sysctl_oid *oid, *fanroot_oid; struct sysctl_ctx_list *ctx; - phandle_t child; - char type[32], sysctl_name[32]; - int i; + char sysctl_name[32]; + int i, j; sc = device_get_softc(dev); - sc->sc_nfans = 0; - for (child = OF_child(fanroot); child != 0; child = OF_peer(child)) - sc->sc_nfans++; - - if (sc->sc_nfans == 0) { - device_printf(dev, "WARNING: No fans detected!\n"); + /* Get the number of fans. */ + sc->sc_nfans = smu_count_fans(dev); + if (sc->sc_nfans == 0) return; - } + /* Now we're able to allocate memory for the fans struct. */ sc->sc_fans = malloc(sc->sc_nfans * sizeof(struct smu_fan), M_SMU, M_WAITOK | M_ZERO); - fan = sc->sc_fans; - sc->sc_nfans = 0; + /* Now fill in the properties. */ + smu_count_fans(dev); + + /* Register fans with pmac_thermal */ + for (i = 0; i < sc->sc_nfans; i++) + pmac_thermal_fan_register(&sc->sc_fans[i].fan); ctx = device_get_sysctl_ctx(dev); fanroot_oid = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "fans", CTLFLAG_RD, 0, "SMU Fan Information"); - for (child = OF_child(fanroot); child != 0; child = OF_peer(child)) { - OF_getprop(child, "device_type", type, sizeof(type)); - if (strcmp(type, "fan-rpm-control") != 0) - continue; + /* Add sysctls */ + for (i = 0; i < sc->sc_nfans; i++) { + fan = &sc->sc_fans[i]; + for (j = 0; j < strlen(fan->fan.name); j++) { + sysctl_name[j] = tolower(fan->fan.name[j]); + if (isspace(sysctl_name[j])) + sysctl_name[j] = '_'; + } + sysctl_name[j] = 0; + if (fan->type == SMU_FAN_RPM) { + oid = SYSCTL_ADD_NODE(ctx, + SYSCTL_CHILDREN(fanroot_oid), + OID_AUTO, sysctl_name, + CTLFLAG_RD, 0, "Fan Information"); + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "minrpm", CTLTYPE_INT | CTLFLAG_RD, + &fan->fan.min_rpm, sizeof(int), + "Minimum allowed RPM"); + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "maxrpm", CTLTYPE_INT | CTLFLAG_RD, + &fan->fan.max_rpm, sizeof(int), + "Maximum allowed RPM"); + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "rpm",CTLTYPE_INT | CTLFLAG_RW | + CTLFLAG_MPSAFE, dev, i, + smu_fanrpm_sysctl, "I", "Fan RPM"); - fan->dev = dev; - fan->old_style = 0; - OF_getprop(child, "reg", &fan->reg, sizeof(cell_t)); - OF_getprop(child, "min-value", &fan->fan.min_rpm, sizeof(int)); - OF_getprop(child, "max-value", &fan->fan.max_rpm, sizeof(int)); - OF_getprop(child, "zone", &fan->fan.zone, sizeof(int)); - - if (OF_getprop(child, "unmanaged-value", &fan->fan.default_rpm, - sizeof(int)) != sizeof(int)) - fan->fan.default_rpm = fan->fan.max_rpm; + fan->fan.read = (int (*)(struct pmac_fan *))smu_fan_read_rpm; + fan->fan.set = (int (*)(struct pmac_fan *, int))smu_fan_set_rpm; - fan->setpoint = smu_fan_read_rpm(fan); + } else { + oid = SYSCTL_ADD_NODE(ctx, + SYSCTL_CHILDREN(fanroot_oid), + OID_AUTO, sysctl_name, + CTLFLAG_RD, 0, "Fan Information"); + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "minpwm", CTLTYPE_INT | CTLFLAG_RD, + &fan->fan.min_rpm, sizeof(int), + "Minimum allowed PWM in %"); + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "maxpwm", CTLTYPE_INT | CTLFLAG_RD, + &fan->fan.max_rpm, sizeof(int), + "Maximum allowed PWM in %"); + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "pwm",CTLTYPE_INT | CTLFLAG_RW | + CTLFLAG_MPSAFE, dev, + SMU_PWM_SYSCTL_PWM | i, + smu_fanrpm_sysctl, "I", "Fan PWM in %"); + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "rpm",CTLTYPE_INT | CTLFLAG_RD | + CTLFLAG_MPSAFE, dev, + SMU_PWM_SYSCTL_RPM | i, + smu_fanrpm_sysctl, "I", "Fan RPM"); + fan->fan.read = NULL; + fan->fan.set = (int (*)(struct pmac_fan *, int))smu_fan_set_pwm; - OF_getprop(child, "location", fan->fan.name, - sizeof(fan->fan.name)); - - /* Add sysctls */ - for (i = 0; i < strlen(fan->fan.name); i++) { - sysctl_name[i] = tolower(fan->fan.name[i]); - if (isspace(sysctl_name[i])) - sysctl_name[i] = '_'; } - sysctl_name[i] = 0; - - oid = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(fanroot_oid), - OID_AUTO, sysctl_name, CTLFLAG_RD, 0, "Fan Information"); - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "minrpm", - CTLTYPE_INT | CTLFLAG_RD, &fan->fan.min_rpm, sizeof(int), - "Minimum allowed RPM"); - SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "maxrpm", - CTLTYPE_INT | CTLFLAG_RD, &fan->fan.max_rpm, sizeof(int), - "Maximum allowed RPM"); - SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "rpm", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, dev, - sc->sc_nfans, smu_fanrpm_sysctl, "I", "Fan RPM"); - - fan->fan.read = (int (*)(struct pmac_fan *))smu_fan_read_rpm; - fan->fan.set = (int (*)(struct pmac_fan *, int))smu_fan_set_rpm; - pmac_thermal_fan_register(&fan->fan); - - fan++; - sc->sc_nfans++; + if (bootverbose) + device_printf(dev, "Fan: %s type: %d\n", + fan->fan.name, fan->type); } } From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 09:38:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99C911065670; Sun, 4 Mar 2012 09:38:20 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F2FD8FC08; Sun, 4 Mar 2012 09:38:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q249cKui024118; Sun, 4 Mar 2012 09:38:20 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q249cKce024114; Sun, 4 Mar 2012 09:38:20 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201203040938.q249cKce024114@svn.freebsd.org> From: Kevin Lo Date: Sun, 4 Mar 2012 09:38:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232483 - in head/sys/fs: hpfs msdosfs ntfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 09:38:20 -0000 Author: kevlo Date: Sun Mar 4 09:38:20 2012 New Revision: 232483 URL: http://svn.freebsd.org/changeset/base/232483 Log: Clean up style(9) nits Modified: head/sys/fs/hpfs/hpfs_vfsops.c head/sys/fs/msdosfs/msdosfs_vfsops.c head/sys/fs/ntfs/ntfs_vfsops.c Modified: head/sys/fs/hpfs/hpfs_vfsops.c ============================================================================== --- head/sys/fs/hpfs/hpfs_vfsops.c Sun Mar 4 08:43:33 2012 (r232482) +++ head/sys/fs/hpfs/hpfs_vfsops.c Sun Mar 4 09:38:20 2012 (r232483) @@ -283,11 +283,11 @@ hpfs_mountfs(devvp, mp, td) hpmp->hpm_devvp = devvp; hpmp->hpm_dev = devvp->v_rdev; hpmp->hpm_mp = mp; - if (1 == vfs_scanopt(mp->mnt_optnew, "uid", "%d", &v)) + if (vfs_scanopt(mp->mnt_optnew, "uid", "%d", &v) == 1) hpmp->hpm_uid = v; - if (1 == vfs_scanopt(mp->mnt_optnew, "gid", "%d", &v)) + if (vfs_scanopt(mp->mnt_optnew, "gid", "%d", &v) == 1) hpmp->hpm_gid = v; - if (1 == vfs_scanopt(mp->mnt_optnew, "mode", "%d", &v)) + if (vfs_scanopt(mp->mnt_optnew, "mode", "%d", &v) == 1) hpmp->hpm_mode = v; error = hpfs_bminit(hpmp); Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_vfsops.c Sun Mar 4 08:43:33 2012 (r232482) +++ head/sys/fs/msdosfs/msdosfs_vfsops.c Sun Mar 4 09:38:20 2012 (r232483) @@ -149,13 +149,13 @@ update_mp(struct mount *mp, struct threa } } - if (1 == vfs_scanopt(mp->mnt_optnew, "gid", "%d", &v)) + if (vfs_scanopt(mp->mnt_optnew, "gid", "%d", &v) == 1) pmp->pm_gid = v; - if (1 == vfs_scanopt(mp->mnt_optnew, "uid", "%d", &v)) + if (vfs_scanopt(mp->mnt_optnew, "uid", "%d", &v) == 1) pmp->pm_uid = v; - if (1 == vfs_scanopt(mp->mnt_optnew, "mask", "%d", &v)) + if (vfs_scanopt(mp->mnt_optnew, "mask", "%d", &v) == 1) pmp->pm_mask = v & ALLPERMS; - if (1 == vfs_scanopt(mp->mnt_optnew, "dirmask", "%d", &v)) + if (vfs_scanopt(mp->mnt_optnew, "dirmask", "%d", &v) == 1) pmp->pm_dirmask = v & ALLPERMS; vfs_flagopt(mp->mnt_optnew, "shortname", &pmp->pm_flags, MSDOSFSMNT_SHORTNAME); Modified: head/sys/fs/ntfs/ntfs_vfsops.c ============================================================================== --- head/sys/fs/ntfs/ntfs_vfsops.c Sun Mar 4 08:43:33 2012 (r232482) +++ head/sys/fs/ntfs/ntfs_vfsops.c Sun Mar 4 09:38:20 2012 (r232483) @@ -345,11 +345,11 @@ ntfs_mountfs(devvp, mp, td) ntmp->ntm_mountp = mp; ntmp->ntm_devvp = devvp; - if (1 == vfs_scanopt(mp->mnt_optnew, "uid", "%d", &v)) + if (vfs_scanopt(mp->mnt_optnew, "uid", "%d", &v) == 1) ntmp->ntm_uid = v; - if (1 == vfs_scanopt(mp->mnt_optnew, "gid", "%d", &v)) + if (vfs_scanopt(mp->mnt_optnew, "gid", "%d", &v) == 1) ntmp->ntm_gid = v; - if (1 == vfs_scanopt(mp->mnt_optnew, "mode", "%d", &v)) + if (vfs_scanopt(mp->mnt_optnew, "mode", "%d", &v) == 1) ntmp->ntm_mode = v & ACCESSPERMS; vfs_flagopt(mp->mnt_optnew, "caseins", &ntmp->ntm_flag, NTFS_MFLAG_CASEINS); From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 09:45:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1DF31065670; Sun, 4 Mar 2012 09:45:43 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B13DB8FC0A; Sun, 4 Mar 2012 09:45:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q249jhIP024382; Sun, 4 Mar 2012 09:45:43 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q249jhWi024380; Sun, 4 Mar 2012 09:45:43 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201203040945.q249jhWi024380@svn.freebsd.org> From: Gleb Smirnoff Date: Sun, 4 Mar 2012 09:45:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232484 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 09:45:43 -0000 Author: glebius Date: Sun Mar 4 09:45:43 2012 New Revision: 232484 URL: http://svn.freebsd.org/changeset/base/232484 Log: Fix build w/o 'options IEEE80211_SUPPORT_MESH'. Modified: head/sys/net80211/ieee80211_input.c Modified: head/sys/net80211/ieee80211_input.c ============================================================================== --- head/sys/net80211/ieee80211_input.c Sun Mar 4 09:38:20 2012 (r232483) +++ head/sys/net80211/ieee80211_input.c Sun Mar 4 09:45:43 2012 (r232484) @@ -760,6 +760,7 @@ ieee80211_parse_action(struct ieee80211_ break; } break; +#ifdef IEEE80211_SUPPORT_MESH case IEEE80211_ACTION_CAT_MESH: switch (ia->ia_action) { case IEEE80211_ACTION_MESH_LMETRIC: @@ -791,6 +792,7 @@ ieee80211_parse_action(struct ieee80211_ return EINVAL; } break; +#endif } return 0; } From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 09:48:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F11DF106566B; Sun, 4 Mar 2012 09:48:58 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CF7EB8FC08; Sun, 4 Mar 2012 09:48:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q249mweg024507; Sun, 4 Mar 2012 09:48:58 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q249mwIp024505; Sun, 4 Mar 2012 09:48:58 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201203040948.q249mwIp024505@svn.freebsd.org> From: Kevin Lo Date: Sun, 4 Mar 2012 09:48:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232485 - head/sys/fs/cd9660 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 09:48:59 -0000 Author: kevlo Date: Sun Mar 4 09:48:58 2012 New Revision: 232485 URL: http://svn.freebsd.org/changeset/base/232485 Log: Remove unnecessary casts Modified: head/sys/fs/cd9660/cd9660_vfsops.c Modified: head/sys/fs/cd9660/cd9660_vfsops.c ============================================================================== --- head/sys/fs/cd9660/cd9660_vfsops.c Sun Mar 4 09:45:43 2012 (r232484) +++ head/sys/fs/cd9660/cd9660_vfsops.c Sun Mar 4 09:48:58 2012 (r232485) @@ -484,7 +484,7 @@ out: PICKUP_GIANT(); } if (isomp) { - free((caddr_t)isomp, M_ISOFSMNT); + free(isomp, M_ISOFSMNT); mp->mnt_data = NULL; } dev_rel(dev); @@ -522,7 +522,7 @@ cd9660_unmount(mp, mntflags) PICKUP_GIANT(); vrele(isomp->im_devvp); dev_rel(isomp->im_dev); - free((caddr_t)isomp, M_ISOFSMNT); + free(isomp, M_ISOFSMNT); mp->mnt_data = NULL; MNT_ILOCK(mp); mp->mnt_flag &= ~MNT_LOCAL; From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 10:37:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7129D106564A; Sun, 4 Mar 2012 10:37:26 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5F4508FC0A; Sun, 4 Mar 2012 10:37:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24AbQYL026107; Sun, 4 Mar 2012 10:37:26 GMT (envelope-from remko@svn.freebsd.org) Received: (from remko@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24AbQhv026104; Sun, 4 Mar 2012 10:37:26 GMT (envelope-from remko@svn.freebsd.org) Message-Id: <201203041037.q24AbQhv026104@svn.freebsd.org> From: Remko Lodder Date: Sun, 4 Mar 2012 10:37:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232486 - stable/9/sbin/ifconfig X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 10:37:26 -0000 Author: remko Date: Sun Mar 4 10:37:26 2012 New Revision: 232486 URL: http://svn.freebsd.org/changeset/base/232486 Log: Add an ifconfig carp option that enables users to set the state of the carp cluster. This is a direct commit to stable/9 because -HEAD's code is very different. I discussed this with Gleb and the reason for this is that since we do not touch the kernel itself and are not adding very weird or confusing things, we can commit this to the stable branch directly. The options 'master' and 'backup' are now available, which enables the administrator to force a node into the backup or master state on the cluster. Ofcourse preempt has to be disabled otherwise the master node will become master again. One can do that with: sysctl net.inet.carp.preempt=0 After that one can schedule maintenance on the node normally running as the master and such. PR: 100956 Discussed with: glebius MFC after: 1 weeks Modified: stable/9/sbin/ifconfig/ifcarp.c stable/9/sbin/ifconfig/ifconfig.8 Modified: stable/9/sbin/ifconfig/ifcarp.c ============================================================================== --- stable/9/sbin/ifconfig/ifcarp.c Sun Mar 4 09:48:58 2012 (r232485) +++ stable/9/sbin/ifconfig/ifcarp.c Sun Mar 4 10:37:26 2012 (r232486) @@ -57,6 +57,7 @@ void setcarp_advbase(const char *,int, i void setcarp_advskew(const char *, int, int, const struct afswtch *rafp); void setcarp_passwd(const char *, int, int, const struct afswtch *rafp); void setcarp_vhid(const char *, int, int, const struct afswtch *rafp); +void setcarp_state(const char *, int, int, const struct afswtch *rafp); void carp_status(int s) @@ -175,11 +176,34 @@ setcarp_advbase(const char *val, int d, return; } +void setcarp_state(const char *val, int d, int s, const struct afswtch *afp) +{ + struct carpreq carpr; + int i; + + bzero((char *)&carpr, sizeof(struct carpreq)); + ifr.ifr_data = (caddr_t)&carpr; + + if (ioctl(s, SIOCGVH, (caddr_t)&ifr) == -1) + err(1, "SIOCGVH"); + + for (i = 0; i <= CARP_MAXSTATE; i++) { + if (!strcasecmp(val, carp_states[i])) { + carpr.carpr_state = i; + break; + } + } + + if (ioctl(s, SIOCSVH, (caddr_t)&ifr) == -1) + err(1, "SIOCSVH"); +} + static struct cmd carp_cmds[] = { DEF_CMD_ARG("advbase", setcarp_advbase), DEF_CMD_ARG("advskew", setcarp_advskew), DEF_CMD_ARG("pass", setcarp_passwd), DEF_CMD_ARG("vhid", setcarp_vhid), + DEF_CMD_ARG("state", setcarp_state), }; static struct afswtch af_carp = { .af_name = "af_carp", Modified: stable/9/sbin/ifconfig/ifconfig.8 ============================================================================== --- stable/9/sbin/ifconfig/ifconfig.8 Sun Mar 4 09:48:58 2012 (r232485) +++ stable/9/sbin/ifconfig/ifconfig.8 Sun Mar 4 10:37:26 2012 (r232486) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd December 17, 2011 +.Dd March 4, 2012 .Dt IFCONFIG 8 .Os .Sh NAME @@ -2436,6 +2436,13 @@ Set the authentication key to Set the virtual host ID. This is a required setting. Acceptable values are 1 to 255. +.It Cm state Ar state +Force the interface into state +.Ar state . +Valid states are INIT, BACKUP, and MASTER. Note that manually setting the state +to INIT is ignored by +.Xr carp 4 . +This state is set automatically when the underlying interface is down. .El .Pp The From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 11:11:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0089E1065673; Sun, 4 Mar 2012 11:11:04 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E45128FC12; Sun, 4 Mar 2012 11:11:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24BB3tk032099; Sun, 4 Mar 2012 11:11:03 GMT (envelope-from zec@svn.freebsd.org) Received: (from zec@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24BB3pe032097; Sun, 4 Mar 2012 11:11:03 GMT (envelope-from zec@svn.freebsd.org) Message-Id: <201203041111.q24BB3pe032097@svn.freebsd.org> From: Marko Zec Date: Sun, 4 Mar 2012 11:11:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232487 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 11:11:04 -0000 Author: zec Date: Sun Mar 4 11:11:03 2012 New Revision: 232487 URL: http://svn.freebsd.org/changeset/base/232487 Log: Properly restore curvnet context when returning early from ether_input_internal(). This change only affects options VIMAGE kernel builds. PR: kern/165643 Submitted by: Vijay Singh MFC after: 3 days Modified: head/sys/net/if_ethersubr.c Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Sun Mar 4 10:37:26 2012 (r232486) +++ head/sys/net/if_ethersubr.c Sun Mar 4 11:11:03 2012 (r232487) @@ -661,8 +661,10 @@ ether_input_internal(struct ifnet *ifp, m = (*lagg_input_p)(ifp, m); if (m != NULL) ifp = m->m_pkthdr.rcvif; - else + else { + CURVNET_RESTORE(); return; + } } /* @@ -681,6 +683,7 @@ ether_input_internal(struct ifnet *ifp, #endif ifp->if_ierrors++; m_freem(m); + CURVNET_RESTORE(); return; } From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 11:55:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 39A41106564A; Sun, 4 Mar 2012 11:55:29 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0F29B8FC16; Sun, 4 Mar 2012 11:55:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24BtSt0033449; Sun, 4 Mar 2012 11:55:28 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24BtSZn033447; Sun, 4 Mar 2012 11:55:28 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201203041155.q24BtSZn033447@svn.freebsd.org> From: Andreas Tobler Date: Sun, 4 Mar 2012 11:55:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232488 - head/sys/powerpc/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 11:55:29 -0000 Author: andreast Date: Sun Mar 4 11:55:28 2012 New Revision: 232488 URL: http://svn.freebsd.org/changeset/base/232488 Log: Restore proper dot symbol creation for assembly files in the kernel build case. Without this patch we were not able to see the assembly function. Only the function descriptor was visible. - Distinguish between user-land and kernel when creating the ENTRY() point of assembly source. - Make the ENTRY() macro more readable, replace the .align directive with the gas platform independant .p2align directive. - Create an END()macro for later use to provide traceback tables on powerpc64. Modified: head/sys/powerpc/include/asm.h Modified: head/sys/powerpc/include/asm.h ============================================================================== --- head/sys/powerpc/include/asm.h Sun Mar 4 11:11:03 2012 (r232487) +++ head/sys/powerpc/include/asm.h Sun Mar 4 11:55:28 2012 (r232488) @@ -61,19 +61,51 @@ #define HIDENAME(asmsym) __CONCAT(.,asmsym) #endif -#define _GLOBAL(x) \ - .data; .align 2; .globl x; x: - -#ifdef __powerpc64__ -#define _ENTRY(x) \ - .text; .align 2; .globl x; .section ".opd","aw"; \ - .align 3; x: \ - .quad .L.x,.TOC.@tocbase,0; .size x,24; .previous; \ - .align 4; .type x,@function; .L.x: -#else -#define _ENTRY(x) \ - .text; .align 4; .globl x; .type x,@function; x: -#endif +#ifdef _KERNEL +#define DOT_LABEL(name) __CONCAT(.,name) +#define TYPE_ENTRY(name) .size name,24; \ + .type DOT_LABEL(name),@function; \ + .globl DOT_LABEL(name); +#define END_SIZE(name) .size DOT_LABEL(name),.-DOT_LABEL(name); +#else /* !_KERNEL */ +#define DOT_LABEL(name) __CONCAT(.L.,name) +#define TYPE_ENTRY(name) .type name,@function; +#define END_SIZE(name) .size name,.-DOT_LABEL(name); +#endif /* _KERNEL */ + +#define _GLOBAL(name) \ + .data; \ + .p2align 2; \ + .globl name; \ + name: + +#ifdef __powerpc64__ +#define _ENTRY(name) \ + .section ".text"; \ + .p2align 2; \ + .globl name; \ + .section ".opd","aw"; \ + .p2align 3; \ + name: \ + .quad DOT_LABEL(name),.TOC.@tocbase,0; \ + .previous; \ + .p2align 4; \ + TYPE_ENTRY(name) \ +DOT_LABEL(name): + +#define _END(name) \ + .long 0; \ + .byte 0,0,0,0,0,0,0,0; \ + END_SIZE(name) +#else /* !__powerpc64__ */ +#define _ENTRY(name) \ + .text; \ + .p2align 4; \ + .globl name; \ + .type name,@function; \ + name: +#define _END(name) +#endif /* __powerpc64__ */ #if defined(PROF) || (defined(_KERNEL) && defined(GPROF)) # ifdef __powerpc64__ @@ -99,6 +131,7 @@ #endif #define ASENTRY(y) _ENTRY(ASMNAME(y)); _PROF_PROLOGUE +#define END(y) _END(CNAME(y)) #define ENTRY(y) _ENTRY(CNAME(y)); _PROF_PROLOGUE #define GLOBAL(y) _GLOBAL(CNAME(y)) From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 14:00:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1EED9106564A; Sun, 4 Mar 2012 14:00:33 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C5908FC0A; Sun, 4 Mar 2012 14:00:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24E0Wvx037403; Sun, 4 Mar 2012 14:00:32 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24E0WcS037398; Sun, 4 Mar 2012 14:00:32 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201203041400.q24E0WcS037398@svn.freebsd.org> From: Tijl Coosemans Date: Sun, 4 Mar 2012 14:00:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232491 - in head/sys: amd64/include i386/include pc98/include x86/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 14:00:33 -0000 Author: tijl Date: Sun Mar 4 14:00:32 2012 New Revision: 232491 URL: http://svn.freebsd.org/changeset/base/232491 Log: Copy amd64 float.h to x86 and merge with i386 float.h. Replace amd64/i386/pc98 float.h with stubs. Added: head/sys/x86/include/float.h - copied, changed from r232490, head/sys/amd64/include/float.h Modified: head/sys/amd64/include/float.h head/sys/i386/include/float.h head/sys/pc98/include/float.h Modified: head/sys/amd64/include/float.h ============================================================================== --- head/sys/amd64/include/float.h Sun Mar 4 12:52:48 2012 (r232490) +++ head/sys/amd64/include/float.h Sun Mar 4 14:00:32 2012 (r232491) @@ -1,94 +1,6 @@ /*- - * Copyright (c) 1989 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * from: @(#)float.h 7.1 (Berkeley) 5/8/90 - * $FreeBSD$ + * This file is in the public domain. */ +/* $FreeBSD$ */ -#ifndef _MACHINE_FLOAT_H_ -#define _MACHINE_FLOAT_H_ 1 - -#include - -__BEGIN_DECLS -extern int __flt_rounds(void); -__END_DECLS - -#define FLT_RADIX 2 /* b */ -#define FLT_ROUNDS __flt_rounds() -#if __ISO_C_VISIBLE >= 1999 -#define FLT_EVAL_METHOD 0 /* no promotions */ -#define DECIMAL_DIG 21 /* max precision in decimal digits */ -#endif - -#define FLT_MANT_DIG 24 /* p */ -#define FLT_EPSILON 1.19209290E-07F /* b**(1-p) */ -#define FLT_DIG 6 /* floor((p-1)*log10(b))+(b == 10) */ -#define FLT_MIN_EXP (-125) /* emin */ -#define FLT_MIN 1.17549435E-38F /* b**(emin-1) */ -#define FLT_MIN_10_EXP (-37) /* ceil(log10(b**(emin-1))) */ -#define FLT_MAX_EXP 128 /* emax */ -#define FLT_MAX 3.40282347E+38F /* (1-b**(-p))*b**emax */ -#define FLT_MAX_10_EXP 38 /* floor(log10((1-b**(-p))*b**emax)) */ -#if __ISO_C_VISIBLE >= 2011 -#define FLT_TRUE_MIN 1.40129846E-45F /* b**(emin-p) */ -#define FLT_DECIMAL_DIG 9 /* ceil(1+p*log10(b)) */ -#define FLT_HAS_SUBNORM 1 -#endif /* __ISO_C_VISIBLE >= 2011 */ - -#define DBL_MANT_DIG 53 -#define DBL_EPSILON 2.2204460492503131E-16 -#define DBL_DIG 15 -#define DBL_MIN_EXP (-1021) -#define DBL_MIN 2.2250738585072014E-308 -#define DBL_MIN_10_EXP (-307) -#define DBL_MAX_EXP 1024 -#define DBL_MAX 1.7976931348623157E+308 -#define DBL_MAX_10_EXP 308 -#if __ISO_C_VISIBLE >= 2011 -#define DBL_TRUE_MIN 4.9406564584124654E-324 -#define DBL_DECIMAL_DIG 17 -#define DBL_HAS_SUBNORM 1 -#endif /* __ISO_C_VISIBLE >= 2011 */ - -#define LDBL_MANT_DIG 64 -#define LDBL_EPSILON 1.0842021724855044340E-19L -#define LDBL_DIG 18 -#define LDBL_MIN_EXP (-16381) -#define LDBL_MIN 3.3621031431120935063E-4932L -#define LDBL_MIN_10_EXP (-4931) -#define LDBL_MAX_EXP 16384 -#define LDBL_MAX 1.1897314953572317650E+4932L -#define LDBL_MAX_10_EXP 4932 -#if __ISO_C_VISIBLE >= 2011 -#define LDBL_TRUE_MIN 3.6451995318824746025E-4951L -#define LDBL_DECIMAL_DIG 21 -#define LDBL_HAS_SUBNORM 1 -#endif /* __ISO_C_VISIBLE >= 2011 */ - -#endif /* _MACHINE_FLOAT_H_ */ +#include Modified: head/sys/i386/include/float.h ============================================================================== --- head/sys/i386/include/float.h Sun Mar 4 12:52:48 2012 (r232490) +++ head/sys/i386/include/float.h Sun Mar 4 14:00:32 2012 (r232491) @@ -1,94 +1,6 @@ /*- - * Copyright (c) 1989 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * from: @(#)float.h 7.1 (Berkeley) 5/8/90 - * $FreeBSD$ + * This file is in the public domain. */ +/* $FreeBSD$ */ -#ifndef _MACHINE_FLOAT_H_ -#define _MACHINE_FLOAT_H_ 1 - -#include - -__BEGIN_DECLS -extern int __flt_rounds(void); -__END_DECLS - -#define FLT_RADIX 2 /* b */ -#define FLT_ROUNDS __flt_rounds() -#if __ISO_C_VISIBLE >= 1999 -#define FLT_EVAL_METHOD (-1) /* i387 semantics are...interesting */ -#define DECIMAL_DIG 21 /* max precision in decimal digits */ -#endif - -#define FLT_MANT_DIG 24 /* p */ -#define FLT_EPSILON 1.19209290E-07F /* b**(1-p) */ -#define FLT_DIG 6 /* floor((p-1)*log10(b))+(b == 10) */ -#define FLT_MIN_EXP (-125) /* emin */ -#define FLT_MIN 1.17549435E-38F /* b**(emin-1) */ -#define FLT_MIN_10_EXP (-37) /* ceil(log10(b**(emin-1))) */ -#define FLT_MAX_EXP 128 /* emax */ -#define FLT_MAX 3.40282347E+38F /* (1-b**(-p))*b**emax */ -#define FLT_MAX_10_EXP 38 /* floor(log10((1-b**(-p))*b**emax)) */ -#if __ISO_C_VISIBLE >= 2011 -#define FLT_TRUE_MIN 1.40129846E-45F /* b**(emin-p) */ -#define FLT_DECIMAL_DIG 9 /* ceil(1+p*log10(b)) */ -#define FLT_HAS_SUBNORM 1 -#endif /* __ISO_C_VISIBLE >= 2011 */ - -#define DBL_MANT_DIG 53 -#define DBL_EPSILON 2.2204460492503131E-16 -#define DBL_DIG 15 -#define DBL_MIN_EXP (-1021) -#define DBL_MIN 2.2250738585072014E-308 -#define DBL_MIN_10_EXP (-307) -#define DBL_MAX_EXP 1024 -#define DBL_MAX 1.7976931348623157E+308 -#define DBL_MAX_10_EXP 308 -#if __ISO_C_VISIBLE >= 2011 -#define DBL_TRUE_MIN 4.9406564584124654E-324 -#define DBL_DECIMAL_DIG 17 -#define DBL_HAS_SUBNORM 1 -#endif /* __ISO_C_VISIBLE >= 2011 */ - -#define LDBL_MANT_DIG 64 -#define LDBL_EPSILON 1.0842021724855044340E-19L -#define LDBL_DIG 18 -#define LDBL_MIN_EXP (-16381) -#define LDBL_MIN 3.3621031431120935063E-4932L -#define LDBL_MIN_10_EXP (-4931) -#define LDBL_MAX_EXP 16384 -#define LDBL_MAX 1.1897314953572317650E+4932L -#define LDBL_MAX_10_EXP 4932 -#if __ISO_C_VISIBLE >= 2011 -#define LDBL_TRUE_MIN 3.6451995318824746025E-4951L -#define LDBL_DECIMAL_DIG 21 -#define LDBL_HAS_SUBNORM 1 -#endif /* __ISO_C_VISIBLE >= 2011 */ - -#endif /* _MACHINE_FLOAT_H_ */ +#include Modified: head/sys/pc98/include/float.h ============================================================================== --- head/sys/pc98/include/float.h Sun Mar 4 12:52:48 2012 (r232490) +++ head/sys/pc98/include/float.h Sun Mar 4 14:00:32 2012 (r232491) @@ -3,4 +3,4 @@ */ /* $FreeBSD$ */ -#include +#include Copied and modified: head/sys/x86/include/float.h (from r232490, head/sys/amd64/include/float.h) ============================================================================== --- head/sys/amd64/include/float.h Sun Mar 4 12:52:48 2012 (r232490, copy source) +++ head/sys/x86/include/float.h Sun Mar 4 14:00:32 2012 (r232491) @@ -42,7 +42,11 @@ __END_DECLS #define FLT_RADIX 2 /* b */ #define FLT_ROUNDS __flt_rounds() #if __ISO_C_VISIBLE >= 1999 +#ifdef _LP64 #define FLT_EVAL_METHOD 0 /* no promotions */ +#else +#define FLT_EVAL_METHOD (-1) /* i387 semantics are...interesting */ +#endif #define DECIMAL_DIG 21 /* max precision in decimal digits */ #endif From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 14:12:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7269A1065674; Sun, 4 Mar 2012 14:12:58 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 56C508FC12; Sun, 4 Mar 2012 14:12:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24ECwtA037819; Sun, 4 Mar 2012 14:12:58 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24ECw3v037814; Sun, 4 Mar 2012 14:12:58 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201203041412.q24ECw3v037814@svn.freebsd.org> From: Tijl Coosemans Date: Sun, 4 Mar 2012 14:12:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232492 - in head/sys: amd64/include i386/include pc98/include x86/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 14:12:58 -0000 Author: tijl Date: Sun Mar 4 14:12:57 2012 New Revision: 232492 URL: http://svn.freebsd.org/changeset/base/232492 Log: Copy amd64 trap.h to x86 and replace amd64/i386/pc98 trap.h with stubs. Added: head/sys/x86/include/trap.h - copied unchanged from r232490, head/sys/amd64/include/trap.h Modified: head/sys/amd64/include/trap.h head/sys/i386/include/trap.h head/sys/pc98/include/trap.h Modified: head/sys/amd64/include/trap.h ============================================================================== --- head/sys/amd64/include/trap.h Sun Mar 4 14:00:32 2012 (r232491) +++ head/sys/amd64/include/trap.h Sun Mar 4 14:12:57 2012 (r232492) @@ -1,95 +1,6 @@ /*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * William Jolitz. - * - * 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. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * from: @(#)trap.h 5.4 (Berkeley) 5/9/91 - * $FreeBSD$ + * This file is in the public domain. */ +/* $FreeBSD$ */ -#ifndef _MACHINE_TRAP_H_ -#define _MACHINE_TRAP_H_ - -/* - * Trap type values - * also known in trap.c for name strings - */ - -#define T_PRIVINFLT 1 /* privileged instruction */ -#define T_BPTFLT 3 /* breakpoint instruction */ -#define T_ARITHTRAP 6 /* arithmetic trap */ -#define T_PROTFLT 9 /* protection fault */ -#define T_TRCTRAP 10 /* debug exception (sic) */ -#define T_PAGEFLT 12 /* page fault */ -#define T_ALIGNFLT 14 /* alignment fault */ - -#define T_DIVIDE 18 /* integer divide fault */ -#define T_NMI 19 /* non-maskable trap */ -#define T_OFLOW 20 /* overflow trap */ -#define T_BOUND 21 /* bound instruction fault */ -#define T_DNA 22 /* device not available fault */ -#define T_DOUBLEFLT 23 /* double fault */ -#define T_FPOPFLT 24 /* fp coprocessor operand fetch fault */ -#define T_TSSFLT 25 /* invalid tss fault */ -#define T_SEGNPFLT 26 /* segment not present fault */ -#define T_STKFLT 27 /* stack fault */ -#define T_MCHK 28 /* machine check trap */ -#define T_XMMFLT 29 /* SIMD floating-point exception */ -#define T_RESERVED 30 /* reserved (unknown) */ -#define T_DTRACE_RET 32 /* DTrace pid return */ -#define T_DTRACE_PROBE 33 /* DTrace fasttrap probe */ - -/* XXX most of the following codes aren't used, but could be. */ - -/* definitions for */ -#define ILL_RESAD_FAULT T_RESADFLT -#define ILL_PRIVIN_FAULT T_PRIVINFLT -#define ILL_RESOP_FAULT T_RESOPFLT -#define ILL_ALIGN_FAULT T_ALIGNFLT -#define ILL_FPOP_FAULT T_FPOPFLT /* coprocessor operand fault */ - -/* old FreeBSD macros, deprecated */ -#define FPE_INTOVF_TRAP 0x1 /* integer overflow */ -#define FPE_INTDIV_TRAP 0x2 /* integer divide by zero */ -#define FPE_FLTDIV_TRAP 0x3 /* floating/decimal divide by zero */ -#define FPE_FLTOVF_TRAP 0x4 /* floating overflow */ -#define FPE_FLTUND_TRAP 0x5 /* floating underflow */ -#define FPE_FPU_NP_TRAP 0x6 /* floating point unit not present */ -#define FPE_SUBRNG_TRAP 0x7 /* subrange out of bounds */ - -/* codes for SIGBUS */ -#define BUS_PAGE_FAULT T_PAGEFLT /* page fault protection base */ -#define BUS_SEGNP_FAULT T_SEGNPFLT /* segment not present */ -#define BUS_STK_FAULT T_STKFLT /* stack segment */ -#define BUS_SEGM_FAULT T_RESERVED /* segment protection base */ - -/* Trap's coming from user mode */ -#define T_USER 0x100 - -#endif /* !_MACHINE_TRAP_H_ */ +#include Modified: head/sys/i386/include/trap.h ============================================================================== --- head/sys/i386/include/trap.h Sun Mar 4 14:00:32 2012 (r232491) +++ head/sys/i386/include/trap.h Sun Mar 4 14:12:57 2012 (r232492) @@ -1,95 +1,6 @@ /*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * William Jolitz. - * - * 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. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * from: @(#)trap.h 5.4 (Berkeley) 5/9/91 - * $FreeBSD$ + * This file is in the public domain. */ +/* $FreeBSD$ */ -#ifndef _MACHINE_TRAP_H_ -#define _MACHINE_TRAP_H_ - -/* - * Trap type values - * also known in trap.c for name strings - */ - -#define T_PRIVINFLT 1 /* privileged instruction */ -#define T_BPTFLT 3 /* breakpoint instruction */ -#define T_ARITHTRAP 6 /* arithmetic trap */ -#define T_PROTFLT 9 /* protection fault */ -#define T_TRCTRAP 10 /* debug exception (sic) */ -#define T_PAGEFLT 12 /* page fault */ -#define T_ALIGNFLT 14 /* alignment fault */ - -#define T_DIVIDE 18 /* integer divide fault */ -#define T_NMI 19 /* non-maskable trap */ -#define T_OFLOW 20 /* overflow trap */ -#define T_BOUND 21 /* bound instruction fault */ -#define T_DNA 22 /* device not available fault */ -#define T_DOUBLEFLT 23 /* double fault */ -#define T_FPOPFLT 24 /* fp coprocessor operand fetch fault */ -#define T_TSSFLT 25 /* invalid tss fault */ -#define T_SEGNPFLT 26 /* segment not present fault */ -#define T_STKFLT 27 /* stack fault */ -#define T_MCHK 28 /* machine check trap */ -#define T_XMMFLT 29 /* SIMD floating-point exception */ -#define T_RESERVED 30 /* reserved (unknown) */ -#define T_DTRACE_RET 32 /* DTrace pid return */ -#define T_DTRACE_PROBE 33 /* DTrace fasttrap probe */ - -/* XXX most of the following codes aren't used, but could be. */ - -/* definitions for */ -#define ILL_RESAD_FAULT T_RESADFLT -#define ILL_PRIVIN_FAULT T_PRIVINFLT -#define ILL_RESOP_FAULT T_RESOPFLT -#define ILL_ALIGN_FAULT T_ALIGNFLT -#define ILL_FPOP_FAULT T_FPOPFLT /* coprocessor operand fault */ - -/* old FreeBSD macros, deprecated */ -#define FPE_INTOVF_TRAP 0x1 /* integer overflow */ -#define FPE_INTDIV_TRAP 0x2 /* integer divide by zero */ -#define FPE_FLTDIV_TRAP 0x3 /* floating/decimal divide by zero */ -#define FPE_FLTOVF_TRAP 0x4 /* floating overflow */ -#define FPE_FLTUND_TRAP 0x5 /* floating underflow */ -#define FPE_FPU_NP_TRAP 0x6 /* floating point unit not present */ -#define FPE_SUBRNG_TRAP 0x7 /* subrange out of bounds */ - -/* codes for SIGBUS */ -#define BUS_PAGE_FAULT T_PAGEFLT /* page fault protection base */ -#define BUS_SEGNP_FAULT T_SEGNPFLT /* segment not present */ -#define BUS_STK_FAULT T_STKFLT /* stack segment */ -#define BUS_SEGM_FAULT T_RESERVED /* segment protection base */ - -/* Trap's coming from user mode */ -#define T_USER 0x100 - -#endif /* !_MACHINE_TRAP_H_ */ +#include Modified: head/sys/pc98/include/trap.h ============================================================================== --- head/sys/pc98/include/trap.h Sun Mar 4 14:00:32 2012 (r232491) +++ head/sys/pc98/include/trap.h Sun Mar 4 14:12:57 2012 (r232492) @@ -3,4 +3,4 @@ */ /* $FreeBSD$ */ -#include +#include Copied: head/sys/x86/include/trap.h (from r232490, head/sys/amd64/include/trap.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/x86/include/trap.h Sun Mar 4 14:12:57 2012 (r232492, copy of r232490, head/sys/amd64/include/trap.h) @@ -0,0 +1,95 @@ +/*- + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * William Jolitz. + * + * 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. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * from: @(#)trap.h 5.4 (Berkeley) 5/9/91 + * $FreeBSD$ + */ + +#ifndef _MACHINE_TRAP_H_ +#define _MACHINE_TRAP_H_ + +/* + * Trap type values + * also known in trap.c for name strings + */ + +#define T_PRIVINFLT 1 /* privileged instruction */ +#define T_BPTFLT 3 /* breakpoint instruction */ +#define T_ARITHTRAP 6 /* arithmetic trap */ +#define T_PROTFLT 9 /* protection fault */ +#define T_TRCTRAP 10 /* debug exception (sic) */ +#define T_PAGEFLT 12 /* page fault */ +#define T_ALIGNFLT 14 /* alignment fault */ + +#define T_DIVIDE 18 /* integer divide fault */ +#define T_NMI 19 /* non-maskable trap */ +#define T_OFLOW 20 /* overflow trap */ +#define T_BOUND 21 /* bound instruction fault */ +#define T_DNA 22 /* device not available fault */ +#define T_DOUBLEFLT 23 /* double fault */ +#define T_FPOPFLT 24 /* fp coprocessor operand fetch fault */ +#define T_TSSFLT 25 /* invalid tss fault */ +#define T_SEGNPFLT 26 /* segment not present fault */ +#define T_STKFLT 27 /* stack fault */ +#define T_MCHK 28 /* machine check trap */ +#define T_XMMFLT 29 /* SIMD floating-point exception */ +#define T_RESERVED 30 /* reserved (unknown) */ +#define T_DTRACE_RET 32 /* DTrace pid return */ +#define T_DTRACE_PROBE 33 /* DTrace fasttrap probe */ + +/* XXX most of the following codes aren't used, but could be. */ + +/* definitions for */ +#define ILL_RESAD_FAULT T_RESADFLT +#define ILL_PRIVIN_FAULT T_PRIVINFLT +#define ILL_RESOP_FAULT T_RESOPFLT +#define ILL_ALIGN_FAULT T_ALIGNFLT +#define ILL_FPOP_FAULT T_FPOPFLT /* coprocessor operand fault */ + +/* old FreeBSD macros, deprecated */ +#define FPE_INTOVF_TRAP 0x1 /* integer overflow */ +#define FPE_INTDIV_TRAP 0x2 /* integer divide by zero */ +#define FPE_FLTDIV_TRAP 0x3 /* floating/decimal divide by zero */ +#define FPE_FLTOVF_TRAP 0x4 /* floating overflow */ +#define FPE_FLTUND_TRAP 0x5 /* floating underflow */ +#define FPE_FPU_NP_TRAP 0x6 /* floating point unit not present */ +#define FPE_SUBRNG_TRAP 0x7 /* subrange out of bounds */ + +/* codes for SIGBUS */ +#define BUS_PAGE_FAULT T_PAGEFLT /* page fault protection base */ +#define BUS_SEGNP_FAULT T_SEGNPFLT /* segment not present */ +#define BUS_STK_FAULT T_STKFLT /* stack segment */ +#define BUS_SEGM_FAULT T_RESERVED /* segment protection base */ + +/* Trap's coming from user mode */ +#define T_USER 0x100 + +#endif /* !_MACHINE_TRAP_H_ */ From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 14:51:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A6AB106566B; Sun, 4 Mar 2012 14:51:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 39D348FC17; Sun, 4 Mar 2012 14:51:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24EphLU039229; Sun, 4 Mar 2012 14:51:43 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24Eph4f039227; Sun, 4 Mar 2012 14:51:43 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203041451.q24Eph4f039227@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 4 Mar 2012 14:51:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232493 - head/sys/fs/cd9660 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 14:51:43 -0000 Author: kib Date: Sun Mar 4 14:51:42 2012 New Revision: 232493 URL: http://svn.freebsd.org/changeset/base/232493 Log: Remove unneeded cast to u_int. The values as small enough to fit into int, beside the use of MIN macro which performs type promotions. Submitted by: bde MFC after: 3 weeks Modified: head/sys/fs/cd9660/cd9660_vnops.c Modified: head/sys/fs/cd9660/cd9660_vnops.c ============================================================================== --- head/sys/fs/cd9660/cd9660_vnops.c Sun Mar 4 14:12:57 2012 (r232492) +++ head/sys/fs/cd9660/cd9660_vnops.c Sun Mar 4 14:51:42 2012 (r232493) @@ -318,8 +318,7 @@ cd9660_read(ap) do { lbn = lblkno(imp, uio->uio_offset); on = blkoff(imp, uio->uio_offset); - n = MIN((u_int)(imp->logical_block_size - on), - uio->uio_resid); + n = MIN(imp->logical_block_size - on, uio->uio_resid); diff = (off_t)ip->i_size - uio->uio_offset; if (diff <= 0) return (0); From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 14:55:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9444C1065670; Sun, 4 Mar 2012 14:55:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6936E8FC18; Sun, 4 Mar 2012 14:55:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24EtcSb039404; Sun, 4 Mar 2012 14:55:38 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24Etcmi039402; Sun, 4 Mar 2012 14:55:38 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203041455.q24Etcmi039402@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 4 Mar 2012 14:55:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232494 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 14:55:38 -0000 Author: kib Date: Sun Mar 4 14:55:37 2012 New Revision: 232494 URL: http://svn.freebsd.org/changeset/base/232494 Log: Instead of incomplete handling of read(2)/write(2) return values that does not fit into registers, declare that we do not support this case using CTASSERT(), and remove endianess-unsafe code to split return value into td_retval. While there, change the style of the sysctl debug.iosize_max_clamp definition. Requested by: bde MFC after: 3 weeks Modified: head/sys/kern/sys_generic.c Modified: head/sys/kern/sys_generic.c ============================================================================== --- head/sys/kern/sys_generic.c Sun Mar 4 14:51:42 2012 (r232493) +++ head/sys/kern/sys_generic.c Sun Mar 4 14:55:37 2012 (r232494) @@ -75,8 +75,14 @@ __FBSDID("$FreeBSD$"); #include int iosize_max_clamp = 1; -SYSCTL_INT(_debug, OID_AUTO, iosize_max_clamp, CTLFLAG_RW, &iosize_max_clamp, 0, - "Clamp max i/o size to INT_MAX"); +SYSCTL_INT(_debug, OID_AUTO, iosize_max_clamp, CTLFLAG_RW, + &iosize_max_clamp, 0, "Clamp max i/o size to INT_MAX"); +/* + * Assert that the return value of read(2) and write(2) syscalls fits + * into a register. If not, an architecture will need to provide the + * usermode wrappers to reconstruct the result. + */ +CTASSERT(sizeof(register_t) >= sizeof(size_t)); static MALLOC_DEFINE(M_IOCTLOPS, "ioctlops", "ioctl data buffer"); static MALLOC_DEFINE(M_SELECT, "select", "select() buffer"); @@ -338,12 +344,7 @@ dofileread(td, fd, fp, auio, offset, fla ktrgenio(fd, UIO_READ, ktruio, error); } #endif -#if SSIZE_MAX > LONG_MAX - td->td_retval[1] = cnt >> (sizeof(register_t) * CHAR_BIT); - td->td_retval[0] = cnt; -#else td->td_retval[0] = cnt; -#endif return (error); } @@ -555,12 +556,7 @@ dofilewrite(td, fd, fp, auio, offset, fl ktrgenio(fd, UIO_WRITE, ktruio, error); } #endif -#if SSIZE_MAX > LONG_MAX - td->td_retval[1] = cnt >> (sizeof(register_t) * CHAR_BIT); - td->td_retval[0] = cnt; -#else td->td_retval[0] = cnt; -#endif return (error); } From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 15:09:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5495F106566C; Sun, 4 Mar 2012 15:09:02 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4428A8FC0C; Sun, 4 Mar 2012 15:09:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24F92G3039880; Sun, 4 Mar 2012 15:09:02 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24F92WU039878; Sun, 4 Mar 2012 15:09:02 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203041509.q24F92WU039878@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 4 Mar 2012 15:09:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232495 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 15:09:02 -0000 Author: kib Date: Sun Mar 4 15:09:01 2012 New Revision: 232495 URL: http://svn.freebsd.org/changeset/base/232495 Log: pipe_read(): change the type of size to int, and remove signed clamp. pipe_write(): change the type of desiredsize back to int, its value fits. Requested by: bde MFC after: 3 weeks Modified: head/sys/kern/sys_pipe.c Modified: head/sys/kern/sys_pipe.c ============================================================================== --- head/sys/kern/sys_pipe.c Sun Mar 4 14:55:37 2012 (r232494) +++ head/sys/kern/sys_pipe.c Sun Mar 4 15:09:01 2012 (r232495) @@ -647,7 +647,7 @@ pipe_read(fp, uio, active_cred, flags, t struct pipe *rpipe; int error; int nread = 0; - u_int size; + int size; rpipe = fp->f_data; PIPE_LOCK(rpipe); @@ -681,7 +681,7 @@ pipe_read(fp, uio, active_cred, flags, t if (size > rpipe->pipe_buffer.cnt) size = rpipe->pipe_buffer.cnt; if (size > uio->uio_resid) - size = (u_int) uio->uio_resid; + size = uio->uio_resid; PIPE_UNLOCK(rpipe); error = uiomove( @@ -1023,8 +1023,9 @@ pipe_write(fp, uio, active_cred, flags, struct thread *td; int flags; { - int error; - size_t desiredsize, orig_resid; + int error = 0; + int desiredsize; + ssize_t orig_resid; struct pipe *wpipe, *rpipe; rpipe = fp->f_data; From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 15:22:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50F8C106564A; Sun, 4 Mar 2012 15:22:04 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3FB6E8FC15; Sun, 4 Mar 2012 15:22:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24FM4lU040521; Sun, 4 Mar 2012 15:22:04 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24FM4sB040519; Sun, 4 Mar 2012 15:22:04 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201203041522.q24FM4sB040519@svn.freebsd.org> From: Eitan Adler Date: Sun, 4 Mar 2012 15:22:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232496 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 15:22:04 -0000 Author: eadler Date: Sun Mar 4 15:22:03 2012 New Revision: 232496 URL: http://svn.freebsd.org/changeset/base/232496 Log: PR: docs/158813 Submitted by: Ben Kaduk Approved by: bcr MFC after: 1 week Modified: head/share/man/man4/jme.4 Modified: head/share/man/man4/jme.4 ============================================================================== --- head/share/man/man4/jme.4 Sun Mar 4 15:09:01 2012 (r232495) +++ head/share/man/man4/jme.4 Sun Mar 4 15:22:03 2012 (r232496) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 29, 2011 +.Dd March 4, 2012 .Dt JME 4 .Os .Sh NAME @@ -130,23 +130,26 @@ variables and tunables: .Bl -tag -width "xxxxxx" .It Va dev.jme.%d.tx_coal_to -Maximum amount of time to delay for Tx completion interrupt in -units of 1us. -The accepted range is 1 to 65535, the default is 100 (100us). +This variable sets the maximum amount of time to delay +before sending a Tx completion interrupt, in microseconds. +The accepted range is 1 to 65535; the default is 100 (100us). .It Va dev.jme.%d.tx_coal_pkt -Maximum number of packets to fire Tx completion interrupt. -The accepted range is 1 to 255, the default is 8. +This variable sets the maximum number of outgoing packets which may be +coalesced together into a single Tx completion interrupt. +The accepted range is 1 to 255; the default is 8. .It Va dev.jme.%d.rx_coal_to -Maximum amount of time to delay for Rx completion interrupt in -units of 1us. -The accepted range is 1 to 65535, the default is 100 (100us). +This variable sets the maximum amount of time to wait for +additional packets to arrive (for possible packet coalescing) +before firing an Rx completion interrupt, in microseconds. +The accepted range is 1 to 65535; the default is 100 (100us). .It Va dev.jme.%d.rx_coal_pkt -Maximum number of packets to fire Rx completion interrupt. -The accepted range is 1 to 255, the default is 2. +This variable sets the maximum number of incoming packets which may be +coalesced into a single Rx completion interrupt. +The accepted range is 1 to 255; the default is 2. .It Va dev.jme.%d.process_limit -Maximum amount of Rx events to be processed in the event loop before -rescheduling a taskqueue. -The accepted range is 10 to 255, the default value is 128 events. +This variable sets the maximum number of events that will be processed +in a single batch before the handler is requeued into a taskqueue. +The accepted range is 10 to 255; the default value is 128 events. The interface does not need to be brought down and up again before a change takes effect. .El @@ -173,22 +176,22 @@ driver tries to avoid unnecessary statio controllers that use eFuse to store station address. The number of times that eFuse can be safely reprogrammed is 16 at most. -In addition, there is no way to restore factory default station -address once station address is reprogrammed via eFuse. -It is highly recommended not to reprogram station address and -it is responsibility of administrator to store original station -address into a safe place when station address should be changed. +In addition, there is no way to restore the factory default station +address once the station address has been reprogrammed via eFuse. +It is highly recommended not to reprogram the station address and +it is the responsibility of the administrator to store the original station +address in a safe place when station address is changed. .Pp There are two known 1000baseT link establishment issues with JMC25x. If the full mask revision number of JMC25x controller is less than -or equal to 4 and link partner enabled IEEE 802.3az Energy Efficient -Ethernet feature, the controller would not be able to establish a +or equal to 4 and the link partner enabled the IEEE 802.3az Energy Efficient +Ethernet feature, the controller will not be able to establish a 1000baseT link. -Also if the length of cable is longer than 120 meters, controller +Also, if the length of the cable is longer than 120 meters, the controller can not establish a 1000baseT link. -The known workaround for the issue is to force manual link +The known workaround for these issues is to force manual link configuration with 100baseTX instead of relying on auto-negotiation. -The full mask revision number of controller could be checked with +The full mask revision number of controller can be checked with the verbose kernel boot option. -Use lower nibble of chip revision number to get full mask revision of -the controller. +Use the lower nibble of the chip revision number to get the +full mask revision of the controller. From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 15:24:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 771D2106566B for ; Sun, 4 Mar 2012 15:24:05 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id EF8C68FC1E for ; Sun, 4 Mar 2012 15:24:04 +0000 (UTC) Received: by wgbds12 with SMTP id ds12so2659412wgb.31 for ; Sun, 04 Mar 2012 07:24:04 -0800 (PST) Received-SPF: pass (google.com: domain of lists@eitanadler.com designates 10.216.136.68 as permitted sender) client-ip=10.216.136.68; Authentication-Results: mr.google.com; spf=pass (google.com: domain of lists@eitanadler.com designates 10.216.136.68 as permitted sender) smtp.mail=lists@eitanadler.com; dkim=pass header.i=lists@eitanadler.com Received: from mr.google.com ([10.216.136.68]) by 10.216.136.68 with SMTP id v46mr4666411wei.31.1330874644103 (num_hops = 1); Sun, 04 Mar 2012 07:24:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type :content-transfer-encoding; bh=u7FRdu/vmOvMzUth0/UNXv1/+l1UE89QdmBr1fEQtdU=; b=bqpDeO3C9GUx1ADQGdpH1kN823DEXdG40UmDORV/rQYvfKWdWgV8DonFcusj2A1lGh ebYkzI8Pac/mKQRPgd8eao+QZjDZClXaEOUpfGU7p9LDNmjGj3HfVlw+eaLKCxyW63nZ sZEIbFYrn3zBua5Pv44OTfAl75pnulKmcUimg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type :content-transfer-encoding:x-gm-message-state; bh=u7FRdu/vmOvMzUth0/UNXv1/+l1UE89QdmBr1fEQtdU=; b=MS35jZGVGvmtfVawRFTKng4d/hGR5iIZNUnoRcOkXwakHH7DNSZ/xBCaPaxNq4Eczh LSkNkJEL8rntYrND8GsHBUlbP6vzHKR8Ue7bao9w6slvn9p6xv5GeA8fNTlPflNwm9+h BbWHzmDWw+USKOIYyiNo9hyzMjBdIHayMucdPgMIT1tQsl5f/37lk997dcXe++OLwWsg NWrT0yCB9s7CZm5uSqt42BFuYJ+/tyCfWObCB5y7hYykr3L+nfGrZABPHidonKqSbCRM a5kcPamVJZdiioUH3Id3IGs2C3Ngz64DklVBFZAN6dLL9OCtj/mryxFFJ69BY0dxOXzl AiLw== Received: by 10.216.136.68 with SMTP id v46mr3747926wei.31.1330874643595; Sun, 04 Mar 2012 07:24:03 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.223.15.90 with HTTP; Sun, 4 Mar 2012 07:23:33 -0800 (PST) In-Reply-To: <201203041522.q24FM4sB040519@svn.freebsd.org> References: <201203041522.q24FM4sB040519@svn.freebsd.org> From: Eitan Adler Date: Sun, 4 Mar 2012 10:23:33 -0500 X-Google-Sender-Auth: GRMGFTs80ADbK2gCa3doXvEHCKs Message-ID: To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQkaLikfxy2Fkxe/mwWKKiXIvlKHwaFR3Z06xSCFjpyBziHhRE8hbVKACH/6tSwSeacaIG7P Cc: Subject: Re: svn commit: r232496 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 15:24:05 -0000 On Sun, Mar 4, 2012 at 10:22 AM, Eitan Adler wrote: > Author: eadler > Date: Sun Mar =C2=A04 15:22:03 2012 > New Revision: 232496 > URL: http://svn.freebsd.org/changeset/base/232496 > > Log: > =C2=A0PR: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 docs/158813 > =C2=A0Submitted by: Ben Kaduk > =C2=A0Approved by: =C2=A0bcr > =C2=A0MFC after: =C2=A0 =C2=A01 week Forgot the actual log message. :( "Fix a variety of English language grammar issues and style nits" --=20 Eitan Adler Source & Ports committer X11, Bugbusting teams From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 15:25:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DE400106564A; Sun, 4 Mar 2012 15:25:11 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B47A38FC08; Sun, 4 Mar 2012 15:25:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24FPBWO040648; Sun, 4 Mar 2012 15:25:11 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24FPBMm040646; Sun, 4 Mar 2012 15:25:11 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201203041525.q24FPBMm040646@svn.freebsd.org> From: Olivier Houchard Date: Sun, 4 Mar 2012 15:25:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232497 - head/lib/libc/arm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 15:25:12 -0000 Author: cognet Date: Sun Mar 4 15:25:11 2012 New Revision: 232497 URL: http://svn.freebsd.org/changeset/base/232497 Log: Add __aeabi_read_tp to the symbol list. Modified: head/lib/libc/arm/Symbol.map Modified: head/lib/libc/arm/Symbol.map ============================================================================== --- head/lib/libc/arm/Symbol.map Sun Mar 4 15:22:03 2012 (r232496) +++ head/lib/libc/arm/Symbol.map Sun Mar 4 15:25:11 2012 (r232497) @@ -40,6 +40,7 @@ FBSDprivate_1.0 { __sys_exit; _set_tp; + __aeabi_read_tp; ___longjmp; __umodsi3; __modsi3; From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 15:31:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10EDA106566C; Sun, 4 Mar 2012 15:31:14 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F1D438FC08; Sun, 4 Mar 2012 15:31:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24FVDdb040916; Sun, 4 Mar 2012 15:31:13 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24FVDm5040897; Sun, 4 Mar 2012 15:31:13 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201203041531.q24FVDm5040897@svn.freebsd.org> From: David Chisnall Date: Sun, 4 Mar 2012 15:31:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232498 - in head: etc/mtree include include/xlocale lib/libc/locale sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 15:31:14 -0000 Author: theraven Date: Sun Mar 4 15:31:13 2012 New Revision: 232498 URL: http://svn.freebsd.org/changeset/base/232498 Log: Reapply 227753 (xlocale cleanup), plus some fixes so that it passes build universe with gcc. Approved by: dim (mentor) Added: head/include/xlocale/ - copied from r231713, head/include/xlocale/ Deleted: head/include/_xlocale_ctype.h Modified: head/etc/mtree/BSD.include.dist head/include/Makefile head/include/ctype.h head/include/langinfo.h head/include/locale.h head/include/runetype.h head/include/string.h head/include/time.h head/include/wchar.h head/include/wctype.h head/include/xlocale.h head/include/xlocale/_ctype.h head/lib/libc/locale/Symbol.map head/lib/libc/locale/setrunelocale.c head/lib/libc/locale/table.c head/lib/libc/locale/xlocale.c head/lib/libc/locale/xlocale_private.h head/sys/sys/cdefs.h Modified: head/etc/mtree/BSD.include.dist ============================================================================== --- head/etc/mtree/BSD.include.dist Sun Mar 4 15:25:11 2012 (r232497) +++ head/etc/mtree/BSD.include.dist Sun Mar 4 15:31:13 2012 (r232498) @@ -329,4 +329,6 @@ .. vm .. + xlocale + .. .. Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Sun Mar 4 15:25:11 2012 (r232497) +++ head/include/Makefile Sun Mar 4 15:31:13 2012 (r232498) @@ -6,7 +6,7 @@ .include CLEANFILES= osreldate.h version vers.c -SUBDIR= arpa gssapi protocols rpcsvc rpc +SUBDIR= arpa gssapi protocols rpcsvc rpc xlocale INCS= a.out.h ar.h assert.h bitstring.h complex.h cpio.h _ctype.h ctype.h \ db.h \ dirent.h dlfcn.h elf.h elf-hints.h err.h fmtmsg.h fnmatch.h fstab.h \ @@ -24,7 +24,7 @@ INCS= a.out.h ar.h assert.h bitstring.h strings.h sysexits.h tar.h termios.h tgmath.h \ time.h timeconv.h timers.h ttyent.h \ ulimit.h unistd.h utime.h utmpx.h uuid.h varargs.h vis.h \ - wchar.h wctype.h wordexp.h xlocale.h _xlocale_ctype.h + wchar.h wctype.h wordexp.h xlocale.h MHDRS= float.h floatingpoint.h stdarg.h Modified: head/include/ctype.h ============================================================================== --- head/include/ctype.h Sun Mar 4 15:25:11 2012 (r232497) +++ head/include/ctype.h Sun Mar 4 15:31:13 2012 (r232498) @@ -78,6 +78,10 @@ int isphonogram(int); int isrune(int); int isspecial(int); #endif + +#if __POSIX_VISIBLE >= 200809 +#include +#endif __END_DECLS #ifndef __cplusplus Modified: head/include/langinfo.h ============================================================================== --- head/include/langinfo.h Sun Mar 4 15:25:11 2012 (r232497) +++ head/include/langinfo.h Sun Mar 4 15:31:13 2012 (r232498) @@ -130,6 +130,10 @@ typedef __nl_item nl_item; __BEGIN_DECLS char *nl_langinfo(nl_item); + +#if __POSIX_VISIBLE >= 200809 +#include +#endif __END_DECLS #endif /* !_LANGINFO_H_ */ Modified: head/include/locale.h ============================================================================== --- head/include/locale.h Sun Mar 4 15:25:11 2012 (r232497) +++ head/include/locale.h Sun Mar 4 15:31:13 2012 (r232498) @@ -77,54 +77,11 @@ struct lconv { __BEGIN_DECLS struct lconv *localeconv(void); char *setlocale(int, const char *); -__END_DECLS #if __POSIX_VISIBLE >= 200809 - -#define LC_COLLATE_MASK (1<<0) -#define LC_CTYPE_MASK (1<<1) -#define LC_MESSAGES_MASK (1<<2) -#define LC_MONETARY_MASK (1<<3) -#define LC_NUMERIC_MASK (1<<4) -#define LC_TIME_MASK (1<<5) -#define LC_ALL_MASK (LC_COLLATE_MASK | LC_CTYPE_MASK | LC_MESSAGES_MASK | \ - LC_MONETARY_MASK | LC_NUMERIC_MASK | LC_TIME_MASK) - -#define LC_GLOBAL_LOCALE ((locale_t)-1) - -__BEGIN_DECLS - -typedef struct _xlocale *locale_t; -/** - * Creates a new locale. - */ -locale_t newlocale(int mask, const char *locale, locale_t base); - -/** - * Returns an identical duplicate of the passed locale. The returned locale - * must be freed with freelocale(). The returned locale will share components - * with the original. - */ -locale_t duplocale(locale_t base); -/* - * Free a locale_t. This is quite a poorly named function. It actually - * disclaims a reference to a locale_t, rather than freeing it. - */ -int freelocale(locale_t loc); - -/* - * Returns the name of the locale for a particular component of a locale_t. - */ -const char *querylocale(int mask, locale_t loc); - -/* - * Installs the specified locale_t as this thread's locale. - */ -locale_t uselocale(locale_t loc); - +#include +#endif __END_DECLS -#endif /* __POSIX_VISIBLE >= 200809 */ - #endif /* _LOCALE_H_ */ Modified: head/include/runetype.h ============================================================================== --- head/include/runetype.h Sun Mar 4 15:25:11 2012 (r232497) +++ head/include/runetype.h Sun Mar 4 15:31:13 2012 (r232498) @@ -85,11 +85,21 @@ typedef struct { #define _RUNE_MAGIC_1 "RuneMagi" /* Indicates version 0 of RuneLocale */ __BEGIN_DECLS extern const _RuneLocale _DefaultRuneLocale; -__attribute__((deprecated)) -extern _RuneLocale *_CurrentRuneLocale; -/* TODO: This is called quite a lot, so we should use a __thread variable when - * it's available. */ -extern _RuneLocale *__getCurrentRuneLocale(void); +extern const _RuneLocale *_CurrentRuneLocale; +#if defined(__NO_TLS) || defined(__RUNETYPE_INTERNAL) +extern const _RuneLocale *__getCurrentRuneLocale(void); +#else +extern _Thread_local const _RuneLocale *_ThreadRuneLocale; +static inline const _RuneLocale *__getCurrentRuneLocale(void) +{ + + if (_ThreadRuneLocale) + return _ThreadRuneLocale; + if (_CurrentRuneLocale) + return _CurrentRuneLocale; + return &_DefaultRuneLocale; +} +#endif /* __NO_TLS || __RUNETYPE_INTERNAL */ #define _CurrentRuneLocale (__getCurrentRuneLocale()) __END_DECLS Modified: head/include/string.h ============================================================================== --- head/include/string.h Sun Mar 4 15:25:11 2012 (r232497) +++ head/include/string.h Sun Mar 4 15:31:13 2012 (r232498) @@ -132,6 +132,10 @@ void swab(const void * __restrict, void #endif /* _SWAB_DECLARED */ #endif /* __BSD_VISIBLE */ + +#if __POSIX_VISIBLE >= 200809 +#include +#endif __END_DECLS #endif /* _STRING_H_ */ Modified: head/include/time.h ============================================================================== --- head/include/time.h Sun Mar 4 15:25:11 2012 (r232497) +++ head/include/time.h Sun Mar 4 15:31:13 2012 (r232498) @@ -183,6 +183,10 @@ void tzsetwall(void); time_t timelocal(struct tm * const); time_t timegm(struct tm * const); #endif /* __BSD_VISIBLE */ + +#if __POSIX_VISIBLE >= 200809 +#include +#endif __END_DECLS #endif /* !_TIME_H_ */ Modified: head/include/wchar.h ============================================================================== --- head/include/wchar.h Sun Mar 4 15:25:11 2012 (r232497) +++ head/include/wchar.h Sun Mar 4 15:31:13 2012 (r232498) @@ -224,6 +224,10 @@ wchar_t *fgetwln(FILE * __restrict, size size_t wcslcat(wchar_t *, const wchar_t *, size_t); size_t wcslcpy(wchar_t *, const wchar_t *, size_t); #endif + +#if __POSIX_VISIBLE >= 200809 +#include +#endif __END_DECLS #endif /* !_WCHAR_H_ */ Modified: head/include/wctype.h ============================================================================== --- head/include/wctype.h Sun Mar 4 15:25:11 2012 (r232497) +++ head/include/wctype.h Sun Mar 4 15:31:13 2012 (r232498) @@ -87,6 +87,11 @@ wint_t iswrune(wint_t); wint_t iswspecial(wint_t); wint_t nextwctype(wint_t, wctype_t); #endif + +#if __POSIX_VISIBLE >= 200809 +#define _XLOCALE_WCTYPES 1 +#include +#endif /* __POSIX_VISIBLE >= 200809 */ __END_DECLS #ifndef __cplusplus Modified: head/include/xlocale.h ============================================================================== --- head/include/xlocale.h Sun Mar 4 15:25:11 2012 (r232497) +++ head/include/xlocale.h Sun Mar 4 15:31:13 2012 (r232498) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 The FreeBSD Foundation + * Copyright (c) 2011, 2012 The FreeBSD Foundation * All rights reserved. * * This software was developed by David Chisnall under sponsorship from @@ -8,16 +8,16 @@ * 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. + * 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 LIABLE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -33,225 +33,52 @@ #define _XLOCALE_H_ #include - __BEGIN_DECLS +#include -/* - * Extended locale versions of the locale-aware functions from string.h. - * - * Include before to expose these. - */ #ifdef _STRING_H_ -int strcoll_l(const char *, const char *, locale_t); -size_t strxfrm_l(char *, const char *, size_t, locale_t); -int strcasecmp_l(const char *, const char *, locale_t); -char *strcasestr_l(const char *, const char *, locale_t); -int strncasecmp_l(const char *, const char *, size_t, locale_t); +#include #endif -/* - * Extended locale versions of the locale-aware functions from inttypes.h. - * - * Include before to expose these. - */ + #ifdef _INTTYPES_H_ -intmax_t -strtoimax_l(const char * __restrict, char ** __restrict, int, locale_t); -uintmax_t -strtoumax_l(const char * __restrict, char ** __restrict, int, locale_t); -intmax_t -wcstoimax_l(const wchar_t * __restrict, wchar_t ** __restrict, int , locale_t); -uintmax_t -wcstoumax_l(const wchar_t * __restrict, wchar_t ** __restrict, int, locale_t); +#include #endif -/* - * Extended locale versions of the locale-aware functions from monetary.h. - * - * Include before to expose these. - */ + #ifdef _MONETARY_H_ -ssize_t strfmon_l(char *, size_t, locale_t, const char *, ...) -# if __GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ >= 7 - __attribute__((__format__ (__strfmon__, 4, 5))) -# endif - ; +#include #endif -/* - * Extended locale versions of the locale-aware functions from stdlib.h. - * - * Include before to expose these. - */ #ifdef _STDLIB_H_ -double atof_l(const char *, locale_t); -int atoi_l(const char *, locale_t); -long atol_l(const char *, locale_t); -long long atoll_l(const char *, locale_t); -int mblen_l(const char *, size_t, locale_t); -size_t -mbstowcs_l(wchar_t * __restrict, const char * __restrict, size_t, locale_t); -int -mbtowc_l(wchar_t * __restrict, const char * __restrict, size_t, locale_t); -double strtod_l(const char *, char **, locale_t); -float strtof_l(const char *, char **, locale_t); -long strtol_l(const char *, char **, int, locale_t); -long double strtold_l(const char *, char **, locale_t); -long long strtoll_l(const char *, char **, int, locale_t); -unsigned long strtoul_l(const char *, char **, int, locale_t); -unsigned long long strtoull_l(const char *, char **, int, locale_t); -size_t -wcstombs_l(char * __restrict, const wchar_t * __restrict, size_t, locale_t); -int wctomb_l(char *, wchar_t, locale_t); - -int ___mb_cur_max_l(locale_t); -#define MB_CUR_MAX_L(x) (___mb_cur_max_l(x)) - +#include #endif -/* - * Extended locale versions of the locale-aware functions from time.h. - * - * Include before to expose these. - */ + #ifdef _TIME_H_ -size_t -strftime_l(char * __restrict, size_t, const char * __restrict, const - struct tm * __restrict, locale_t) -# if __GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ >= 7 - __attribute__((__format__ (__strftime__, 3, 0))) -# endif - ; -char * -strptime_l(const char * __restrict, const char * __restrict, - struct tm * __restrict, locale_t); +#include #endif + #ifdef _LANGINFO_H_ -char *nl_langinfo_l(nl_item, locale_t); +#include #endif + #ifdef _CTYPE_H_ -#include <_xlocale_ctype.h> +#include #endif + #ifdef _WCTYPE_H_ -#define XLOCALE_WCTYPES 1 -#include <_xlocale_ctype.h> +#define _XLOCALE_WCTYPES 1 +#include #endif #ifdef _STDIO_H_ -int fprintf_l(FILE * __restrict, locale_t, const char * __restrict, ...) - __printflike(3, 4); -int fscanf_l(FILE * __restrict, locale_t, const char * __restrict, ...) - __scanflike(3, 4); -int printf_l(locale_t, const char * __restrict, ...) __printflike(2, 3); -int scanf_l(locale_t, const char * __restrict, ...) __scanflike(2, 3); -int sprintf_l(char * __restrict, locale_t, const char * __restrict, ...) - __printflike(3, 4); -int sscanf_l(const char * __restrict, locale_t, const char * __restrict, ...) - __scanflike(3, 4); -int vfprintf_l(FILE * __restrict, locale_t, const char * __restrict, __va_list) - __printflike(3, 0); -int vprintf_l(locale_t, const char * __restrict, __va_list) __printflike(2, 0); -int vsprintf_l(char * __restrict, locale_t, const char * __restrict, __va_list) - __printflike(3, 0); - -int snprintf_l(char * __restrict, size_t, locale_t, const char * __restrict, - ...) __printflike(4, 5); -int vfscanf_l(FILE * __restrict, locale_t, const char * __restrict, __va_list) - __scanflike(3, 0); -int vscanf_l(locale_t, const char * __restrict, __va_list) __scanflike(2, 0); -int vsnprintf_l(char * __restrict, size_t, locale_t, const char * __restrict, - __va_list) __printflike(4, 0); -int vsscanf_l(const char * __restrict, locale_t, const char * __restrict, - __va_list) __scanflike(3, 0); -int dprintf_l(int, locale_t, const char * __restrict, ...) __printflike(3, 4); -int vdprintf_l(int, locale_t, const char * __restrict, __va_list) - __printflike(3, 0); -int asprintf_l(char **, locale_t, const char *, ...) __printflike(3, 4); -int vasprintf_l(char **, locale_t, const char *, __va_list) __printflike(3, 0); +#include #endif -#ifdef _WCHAR_H_ -wint_t btowc_l(int, locale_t); -wint_t fgetwc_l(FILE *, locale_t); -wchar_t * -fgetws_l(wchar_t * __restrict, int, FILE * __restrict, locale_t); -wint_t fputwc_l(wchar_t, FILE *, locale_t); -int -fputws_l(const wchar_t * __restrict, FILE * __restrict, locale_t); -int -fwprintf_l(FILE * __restrict, locale_t, const wchar_t * __restrict, - ...); -int -fwscanf_l(FILE * __restrict, locale_t, const wchar_t * __restrict, ...); -wint_t getwc_l(FILE *, locale_t); -wint_t getwchar_l(locale_t); -size_t -mbrlen_l(const char * __restrict, size_t, mbstate_t * __restrict, locale_t); -size_t -mbrtowc_l(wchar_t * __restrict, const char * __restrict, size_t, - mbstate_t * __restrict, locale_t); -int mbsinit_l(const mbstate_t *, locale_t); -size_t -mbsrtowcs_l(wchar_t * __restrict, const char ** __restrict, size_t, - mbstate_t * __restrict, locale_t); -wint_t putwc_l(wchar_t, FILE *, locale_t); -wint_t putwchar_l(wchar_t, locale_t); -int -swprintf_l(wchar_t * __restrict, size_t n, locale_t, - const wchar_t * __restrict, ...); -int -swscanf_l(const wchar_t * __restrict, locale_t, const wchar_t * __restrict, - ...); -wint_t ungetwc_l(wint_t, FILE *, locale_t); -int -vfwprintf_l(FILE * __restrict, locale_t, const wchar_t * __restrict, - __va_list); -int -vswprintf_l(wchar_t * __restrict, size_t n, locale_t, - const wchar_t * __restrict, __va_list); -int vwprintf_l(locale_t, const wchar_t * __restrict, __va_list); -size_t -wcrtomb_l(char * __restrict, wchar_t, mbstate_t * __restrict, locale_t); -int wcscoll_l(const wchar_t *, const wchar_t *, locale_t); -size_t -wcsftime_l(wchar_t * __restrict, size_t, const wchar_t * __restrict, - const struct tm * __restrict, locale_t); -size_t -wcsrtombs_l(char * __restrict, const wchar_t ** __restrict, size_t, - mbstate_t * __restrict, locale_t); -double wcstod_l(const wchar_t * __restrict, wchar_t ** __restrict, locale_t); -long -wcstol_l(const wchar_t * __restrict, wchar_t ** __restrict, int, locale_t); -unsigned long -wcstoul_l(const wchar_t * __restrict, wchar_t ** __restrict, int, locale_t); -int wcswidth_l(const wchar_t *, size_t, locale_t); -size_t -wcsxfrm_l(wchar_t * __restrict, const wchar_t * __restrict, size_t, locale_t); -int wctob_l(wint_t, locale_t); -int wcwidth_l(wchar_t, locale_t); -int wprintf_l(locale_t, const wchar_t * __restrict, ...); -int wscanf_l(locale_t, const wchar_t * __restrict, ...); - -int -vfwscanf_l(FILE * __restrict, locale_t, const wchar_t * __restrict, - __va_list); -int vswscanf_l(const wchar_t * __restrict, locale_t, -const wchar_t *__restrict, __va_list); -int vwscanf_l(locale_t, const wchar_t * __restrict, __va_list); -float wcstof_l(const wchar_t * __restrict, wchar_t ** __restrict, locale_t); -long double -wcstold_l(const wchar_t * __restrict, wchar_t ** __restrict, locale_t); -long long -wcstoll_l(const wchar_t * __restrict, wchar_t ** __restrict, int, locale_t); -unsigned long long -wcstoull_l(const wchar_t * __restrict, wchar_t ** __restrict, int, locale_t); -size_t -mbsnrtowcs_l(wchar_t * __restrict, const char ** __restrict, size_t, size_t, - mbstate_t * __restrict, locale_t); -int wcscasecmp_l(const wchar_t *, const wchar_t *, locale_t); -int wcsncasecmp_l(const wchar_t *, const wchar_t *, size_t, locale_t); -size_t -wcsnrtombs_l(char * __restrict, const wchar_t ** __restrict, size_t, size_t, - mbstate_t * __restrict, locale_t); +#ifdef _WCHAR_H_ +#include #endif + + struct lconv *localeconv_l(locale_t); __END_DECLS Modified: head/include/xlocale/_ctype.h ============================================================================== --- head/include/xlocale/_ctype.h Tue Feb 14 21:36:55 2012 (r231713) +++ head/include/xlocale/_ctype.h Sun Mar 4 15:31:13 2012 (r232498) @@ -44,7 +44,8 @@ typedef struct _xlocale *locale_t; #endif -#ifndef _XLOCALE_CTYPE_H_ +#ifndef _XLOCALE_RUN_FUNCTIONS_DEFINED +#define _XLOCALE_RUN_FUNCTIONS_DEFINED 1 unsigned long ___runetype_l(__ct_rune_t, locale_t) __pure; __ct_rune_t ___tolower_l(__ct_rune_t, locale_t) __pure; __ct_rune_t ___toupper_l(__ct_rune_t, locale_t) __pure; @@ -83,8 +84,9 @@ __istype_l(__ct_rune_t _c, unsigned long } #define XLOCALE_ISCTYPE(fname, cat) \ - _XLOCALE_INLINE int isw##fname##_l(int c, locale_t l)\ - { return __istype_l(c, cat, l); } + _XLOCALE_INLINE int isw##fname##_l(int, locale_t);\ + _XLOCALE_INLINE int isw##fname##_l(int __c, locale_t __l)\ + { return __istype_l(__c, cat, __l); } #else static __inline int __sbmaskrune_l(__ct_rune_t _c, unsigned long _f, locale_t locale) @@ -102,6 +104,7 @@ __sbistype_l(__ct_rune_t _c, unsigned lo } #define XLOCALE_ISCTYPE(fname, cat) \ + _XLOCALE_INLINE int is##fname##_l(int c, locale_t l); \ _XLOCALE_INLINE int is##fname##_l(int c, locale_t l)\ { return __sbistype_l(c, cat, l); } #endif @@ -127,55 +130,63 @@ XLOCALE_ISCTYPE(xdigit, _CTYPE_X) #undef XLOCALE_ISCTYPE #ifdef _XLOCALE_WCTYPES -_XLOCALE_INLINE int towlower_l(int c, locale_t locale) +_XLOCALE_INLINE int towlower_l(int, locale_t); +_XLOCALE_INLINE int __wcwidth_l(__ct_rune_t, locale_t); +_XLOCALE_INLINE int towupper_l(int, locale_t); + +_XLOCALE_INLINE int towlower_l(int __c, locale_t __l) { int mb_sb_limit; - _RuneLocale *runes = __runes_for_locale(locale, &mb_sb_limit); - return (c < 0 || c >= _CACHED_RUNES) ? ___tolower_l(c, locale) : - runes->__maplower[c]; + _RuneLocale *__runes = __runes_for_locale(__l, &mb_sb_limit); + return (__c < 0 || __c >= _CACHED_RUNES) ? ___tolower_l(__c, __l) : + __runes->__maplower[__c]; } -_XLOCALE_INLINE int towupper_l(int c, locale_t locale) +_XLOCALE_INLINE int towupper_l(int __c, locale_t __l) { int mb_sb_limit; - _RuneLocale *runes = __runes_for_locale(locale, &mb_sb_limit); - return (c < 0 || c >= _CACHED_RUNES) ? ___toupper_l(c, locale) : - runes->__mapupper[c]; + _RuneLocale *__runes = __runes_for_locale(__l, &mb_sb_limit); + return (__c < 0 || __c >= _CACHED_RUNES) ? ___toupper_l(__c, __l) : + __runes->__mapupper[__c]; } _XLOCALE_INLINE int -__wcwidth_l(__ct_rune_t _c, locale_t locale) +__wcwidth_l(__ct_rune_t _c, locale_t __l) { unsigned int _x; if (_c == 0) return (0); - _x = (unsigned int)__maskrune_l(_c, _CTYPE_SWM|_CTYPE_R, locale); + _x = (unsigned int)__maskrune_l(_c, _CTYPE_SWM|_CTYPE_R, __l); if ((_x & _CTYPE_SWM) != 0) return ((_x & _CTYPE_SWM) >> _CTYPE_SWS); return ((_x & _CTYPE_R) != 0 ? 1 : -1); } -int iswctype_l(wint_t wc, wctype_t charclass, locale_t locale); -wctype_t wctype_l(const char *property, locale_t locale); -wint_t towctrans_l(wint_t wc, wctrans_t desc, locale_t locale); -wint_t nextwctype_l(wint_t wc, wctype_t wct, locale_t locale); -wctrans_t wctrans_l(const char *charclass, locale_t locale); +int iswctype_l(wint_t __wc, wctype_t __charclass, locale_t __l); +wctype_t wctype_l(const char *property, locale_t __l); +wint_t towctrans_l(wint_t __wc, wctrans_t desc, locale_t __l); +wint_t nextwctype_l(wint_t __wc, wctype_t wct, locale_t __l); +wctrans_t wctrans_l(const char *__charclass, locale_t __l); #undef _XLOCALE_WCTYPES #else -_XLOCALE_INLINE int digittoint_l(int c, locale_t locale) -{ return __sbmaskrune_l((c), 0xFF, locale); } - -_XLOCALE_INLINE int tolower_l(int c, locale_t locale) -{ - int mb_sb_limit; - _RuneLocale *runes = __runes_for_locale(locale, &mb_sb_limit); - return (c < 0 || c >= mb_sb_limit) ? c : - runes->__maplower[c]; -} -_XLOCALE_INLINE int toupper_l(int c, locale_t locale) -{ - int mb_sb_limit; - _RuneLocale *runes = __runes_for_locale(locale, &mb_sb_limit); - return (c < 0 || c >= mb_sb_limit) ? c : - runes->__mapupper[c]; +_XLOCALE_INLINE int digittoint_l(int, locale_t); +_XLOCALE_INLINE int tolower_l(int, locale_t); +_XLOCALE_INLINE int toupper_l(int, locale_t); + +_XLOCALE_INLINE int digittoint_l(int __c, locale_t __l) +{ return __sbmaskrune_l((__c), 0xFF, __l); } + +_XLOCALE_INLINE int tolower_l(int __c, locale_t __l) +{ + int __limit; + _RuneLocale *__runes = __runes_for_locale(__l, &__limit); + return (__c < 0 || __c >= __limit) ? __c : + __runes->__maplower[__c]; +} +_XLOCALE_INLINE int toupper_l(int __c, locale_t __l) +{ + int __limit; + _RuneLocale *__runes = __runes_for_locale(__l, &__limit); + return (__c < 0 || __c >= __limit) ? __c : + __runes->__mapupper[__c]; } #endif #endif /* (defined(_XLOCALE_WCTYPES) && !defined(_XLOCALE_WCTYPE_H)) || \ Modified: head/lib/libc/locale/Symbol.map ============================================================================== --- head/lib/libc/locale/Symbol.map Sun Mar 4 15:25:11 2012 (r232497) +++ head/lib/libc/locale/Symbol.map Sun Mar 4 15:31:13 2012 (r232498) @@ -194,6 +194,7 @@ FBSD_1.3 { wcstoull_l; wcstoumax_l; __runes_for_locale; + _ThreadRuneLocale; }; FBSDprivate_1.0 { Modified: head/lib/libc/locale/setrunelocale.c ============================================================================== --- head/lib/libc/locale/setrunelocale.c Sun Mar 4 15:25:11 2012 (r232497) +++ head/lib/libc/locale/setrunelocale.c Sun Mar 4 15:31:13 2012 (r232498) @@ -38,6 +38,8 @@ #include __FBSDID("$FreeBSD$"); +#define __RUNETYPE_INTERNAL 1 + #include #include #include @@ -50,6 +52,15 @@ __FBSDID("$FreeBSD$"); #include "mblocal.h" #include "setlocale.h" +#undef _CurrentRuneLocale +extern _RuneLocale const *_CurrentRuneLocale; +#ifndef __NO_TLS +/* + * A cached version of the runes for this thread. Used by ctype.h + */ +_Thread_local const _RuneLocale *_ThreadRuneLocale; +#endif + extern int __mb_sb_limit; extern _RuneLocale *_Read_RuneMagi(FILE *); @@ -72,7 +83,8 @@ static void destruct_ctype(void *v) free(l->runes); free(l); } -_RuneLocale *__getCurrentRuneLocale(void) + +const _RuneLocale *__getCurrentRuneLocale(void) { return XLOCALE_CTYPE(__get_locale())->runes; } @@ -168,9 +180,24 @@ __wrap_setrunelocale(const char *locale) } __mb_cur_max = __xlocale_global_ctype.__mb_cur_max; __mb_sb_limit = __xlocale_global_ctype.__mb_sb_limit; + _CurrentRuneLocale = __xlocale_global_ctype.runes; return (_LDP_LOADED); } -void *__ctype_load(const char *locale, locale_t unused) + +#ifndef __NO_TLS +void +__set_thread_rune_locale(locale_t loc) { + + if (loc == NULL) { + _ThreadRuneLocale = &_DefaultRuneLocale; + } else { + _ThreadRuneLocale = XLOCALE_CTYPE(loc)->runes; + } +} +#endif + +void * +__ctype_load(const char *locale, locale_t unused) { struct xlocale_ctype *l = calloc(sizeof(struct xlocale_ctype), 1); l->header.header.destructor = destruct_ctype; Modified: head/lib/libc/locale/table.c ============================================================================== --- head/lib/libc/locale/table.c Sun Mar 4 15:25:11 2012 (r232497) +++ head/lib/libc/locale/table.c Sun Mar 4 15:31:13 2012 (r232498) @@ -251,7 +251,7 @@ const _RuneLocale _DefaultRuneLocale = { }; #undef _CurrentRuneLocale -_RuneLocale *_CurrentRuneLocale = (_RuneLocale*)&_DefaultRuneLocale; +const _RuneLocale *_CurrentRuneLocale = &_DefaultRuneLocale; _RuneLocale * __runes_for_locale(locale_t locale, int *mb_sb_limit) Modified: head/lib/libc/locale/xlocale.c ============================================================================== --- head/lib/libc/locale/xlocale.c Sun Mar 4 15:25:11 2012 (r232497) +++ head/lib/libc/locale/xlocale.c Sun Mar 4 15:31:13 2012 (r232498) @@ -6,17 +6,18 @@ * 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. + * 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 LIABLE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -31,6 +32,7 @@ #include #include #include +#include #include "libc_private.h" #include "xlocale_private.h" @@ -50,6 +52,17 @@ extern struct xlocale_component __xlocal */ extern struct xlocale_component __xlocale_C_collate; extern struct xlocale_component __xlocale_C_ctype; + +#ifndef __NO_TLS +/* + * The locale for this thread. + */ +_Thread_local locale_t __thread_locale; +#endif +/* + * Flag indicating that one or more per-thread locales exist. + */ +int __has_thread_locale; /* * Private functions in setlocale.c. */ @@ -103,6 +116,7 @@ static locale_t thread_local_locale; static void init_key(void) { + pthread_key_create(&locale_info_key, xlocale_release); pthread_setspecific(locale_info_key, (void*)42); if (pthread_getspecific(locale_info_key) == (void*)42) { @@ -110,6 +124,8 @@ static void init_key(void) } else { fake_tls = 1; } + /* At least one per-thread locale has now been set. */ + __has_thread_locale = 1; __detect_path_locale(); } @@ -118,12 +134,14 @@ static pthread_once_t once_control = PTH static locale_t get_thread_locale(void) { + _once(&once_control, init_key); return (fake_tls ? thread_local_locale : pthread_getspecific(locale_info_key)); } +#ifdef __NO_TLS locale_t __get_locale(void) { @@ -131,11 +149,13 @@ __get_locale(void) return (l ? l : &__xlocale_global_locale); } +#endif static void set_thread_locale(locale_t loc) { - pthread_once(&once_control, init_key); + + _once(&once_control, init_key); if (NULL != loc) { xlocale_retain((struct xlocale_refcounted*)loc); @@ -149,6 +169,10 @@ set_thread_locale(locale_t loc) } else { pthread_setspecific(locale_info_key, loc); } +#ifndef __NO_TLS + __thread_locale = loc; + __set_thread_rune_locale(loc); +#endif } /** @@ -159,6 +183,7 @@ static void destruct_locale(void *l) { locale_t loc = l; + for (int type=0 ; typecomponents[type]) { xlocale_release(loc->components[type]); @@ -177,6 +202,7 @@ static locale_t alloc_locale(void) { locale_t new = calloc(sizeof(struct _xlocale), 1); + new->header.destructor = destruct_locale; new->monetary_locale_changed = 1; new->numeric_locale_changed = 1; @@ -193,19 +219,23 @@ copyflags(locale_t new, locale_t old) static int dupcomponent(int type, locale_t base, locale_t new) { - /* Always copy from the global locale, since it has mutable components. */ + /* Always copy from the global locale, since it has mutable components. + */ struct xlocale_component *src = base->components[type]; + if (&__xlocale_global_locale == base) { new->components[type] = constructors[type](src->locale, new); if (new->components[type]) { - strncpy(new->components[type]->locale, src->locale, ENCODING_LEN); + strncpy(new->components[type]->locale, src->locale, + ENCODING_LEN); } } else if (base->components[type]) { new->components[type] = xlocale_retain(base->components[type]); } else { - /* If the component was NULL, return success - if base is a valid - * locale then the flag indicating that this isn't present should be - * set. If it isn't a valid locale, then we're stuck anyway. */ + /* If the component was NULL, return success - if base is a + * valid locale then the flag indicating that this isn't + * present should be set. If it isn't a valid locale, then + * we're stuck anyway. */ return 1; } return (0 != new->components[type]); @@ -244,9 +274,11 @@ locale_t newlocale(int mask, const char if (useenv) { realLocale = __get_locale_env(type); } - new->components[type] = constructors[type](realLocale, new); + new->components[type] = + constructors[type](realLocale, new); if (new->components[type]) { - strncpy(new->components[type]->locale, realLocale, ENCODING_LEN); + strncpy(new->components[type]->locale, + realLocale, ENCODING_LEN); } else { success = 0; break; @@ -319,7 +351,7 @@ const char *querylocale(int mask, locale return (NULL); if (loc->components[type]) return (loc->components[type]->locale); - return "C"; + return ("C"); } /* Modified: head/lib/libc/locale/xlocale_private.h ============================================================================== --- head/lib/libc/locale/xlocale_private.h Sun Mar 4 15:25:11 2012 (r232497) +++ head/lib/libc/locale/xlocale_private.h Sun Mar 4 15:31:13 2012 (r232498) @@ -8,16 +8,16 @@ * 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. + * 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 LIABLE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) @@ -85,14 +85,14 @@ struct _xlocale { struct xlocale_refcounted header; /** Components for the locale. */ struct xlocale_component *components[XLC_LAST]; - /** Flag indicating if components[XLC_MONETARY] has changed since the last - * call to localeconv_l() with this locale. */ + /** Flag indicating if components[XLC_MONETARY] has changed since the + * last call to localeconv_l() with this locale. */ int monetary_locale_changed; /** Flag indicating whether this locale is actually using a locale for * LC_MONETARY (1), or if it should use the C default instead (0). */ int using_monetary_locale; - /** Flag indicating if components[XLC_NUMERIC] has changed since the last - * call to localeconv_l() with this locale. */ + /** Flag indicating if components[XLC_NUMERIC] has changed since the + * last call to localeconv_l() with this locale. */ int numeric_locale_changed; /** Flag indicating whether this locale is actually using a locale for * LC_NUMERIC (1), or if it should use the C default instead (0). */ @@ -170,12 +170,38 @@ extern struct _xlocale __xlocale_global_ extern struct _xlocale __xlocale_C_locale; /** + * Caches the rune table in TLS for fast access. + */ +void __set_thread_rune_locale(locale_t loc); +/** + * Flag indicating whether a per-thread locale has been set. If no per-thread + * locale has ever been set, then we always use the global locale. + */ +extern int __has_thread_locale; +#ifndef __NO_TLS +/** + * The per-thread locale. Avoids the need to use pthread lookup functions when + * getting the per-thread locale. + */ +extern _Thread_local locale_t __thread_locale; + +/** * Returns the current locale for this thread, or the global locale if none is * set. The caller does not have to free the locale. The return value from * this call is not guaranteed to remain valid after the locale changes. As * such, this should only be called within libc functions. */ +inline locale_t __get_locale(void) +{ + + if (!__has_thread_locale) { + return (&__xlocale_global_locale); + } + return (__thread_locale ? __thread_locale : &__xlocale_global_locale); +} +#else locale_t __get_locale(void); +#endif /** * Two magic values are allowed for locale_t objects. NULL and -1. This Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Sun Mar 4 15:25:11 2012 (r232497) +++ head/sys/sys/cdefs.h Sun Mar 4 15:31:13 2012 (r232498) @@ -230,7 +230,8 @@ #define _Alignof(e) alignof(e) #define _Noreturn [[noreturn]] #define _Static_assert(e, s) static_assert(e, s) -#define _Thread_local thread_local +/* FIXME: change this to thread_local when clang in base supports it */ +#define _Thread_local __thread #elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L /* Do nothing. They are language keywords. */ #else @@ -400,12 +401,18 @@ #define __printflike(fmtarg, firstvararg) #define __scanflike(fmtarg, firstvararg) #define __format_arg(fmtarg) +#define __strfmonlike(fmtarg, firstvararg) +#define __strftimelike(fmtarg, firstvararg) #else #define __printflike(fmtarg, firstvararg) \ __attribute__((__format__ (__printf__, fmtarg, firstvararg))) #define __scanflike(fmtarg, firstvararg) \ __attribute__((__format__ (__scanf__, fmtarg, firstvararg))) #define __format_arg(fmtarg) __attribute__((__format_arg__ (fmtarg))) +#define __strfmonlike(fmtarg, firstvararg) \ + __attribute__((__format__ (__strfmon__, fmtarg, firstvararg))) +#define __strftimelike(fmtarg, firstvararg) \ + __attribute__((__format__ (__strftime__, fmtarg, firstvararg))) #endif /* Compiler-dependent macros that rely on FreeBSD-specific extensions. */ @@ -650,4 +657,8 @@ #define __has_builtin(x) 0 #endif +#if defined(__mips) || defined(__powerpc64__) +#define __NO_TLS 1 +#endif + #endif /* !_SYS_CDEFS_H_ */ From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 16:21:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B119106566B; Sun, 4 Mar 2012 16:21:21 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 09C448FC16; Sun, 4 Mar 2012 16:21:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24GLK1Z042695; Sun, 4 Mar 2012 16:21:20 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24GLKO0042693; Sun, 4 Mar 2012 16:21:20 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201203041621.q24GLKO0042693@svn.freebsd.org> From: Eitan Adler Date: Sun, 4 Mar 2012 16:21:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232499 - stable/9/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 16:21:21 -0000 Author: eadler Date: Sun Mar 4 16:21:20 2012 New Revision: 232499 URL: http://svn.freebsd.org/changeset/base/232499 Log: MFC r227626, r227642: - be more precise about the unit of measurement Approved by: cperciva Modified: stable/9/sys/dev/acpica/acpi_thermal.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/acpica/acpi_thermal.c ============================================================================== --- stable/9/sys/dev/acpica/acpi_thermal.c Sun Mar 4 15:31:13 2012 (r232498) +++ stable/9/sys/dev/acpica/acpi_thermal.c Sun Mar 4 16:21:20 2012 (r232499) @@ -245,7 +245,7 @@ acpi_tz_attach(device_t dev) SYSCTL_ADD_INT(&acpi_tz_sysctl_ctx, SYSCTL_CHILDREN(acpi_tz_sysctl_tree), OID_AUTO, "polling_rate", CTLFLAG_RW, - &acpi_tz_polling_rate, 0, "monitor polling rate"); + &acpi_tz_polling_rate, 0, "monitor polling interval in seconds"); SYSCTL_ADD_INT(&acpi_tz_sysctl_ctx, SYSCTL_CHILDREN(acpi_tz_sysctl_tree), OID_AUTO, "user_override", CTLFLAG_RW, &acpi_tz_override, 0, From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 16:24:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A89C41065687; Sun, 4 Mar 2012 16:24:59 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5D60E8FC12; Sun, 4 Mar 2012 16:24:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24GOxHA042857; Sun, 4 Mar 2012 16:24:59 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24GOx7A042855; Sun, 4 Mar 2012 16:24:59 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201203041624.q24GOx7A042855@svn.freebsd.org> From: Eitan Adler Date: Sun, 4 Mar 2012 16:24:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232500 - stable/7/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 16:24:59 -0000 Author: eadler Date: Sun Mar 4 16:24:58 2012 New Revision: 232500 URL: http://svn.freebsd.org/changeset/base/232500 Log: MFC r227626, r227642: - be more precise about the unit of measurement Approved by: cperciva Modified: stable/7/sys/dev/acpica/acpi_thermal.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/acpica/acpi_thermal.c ============================================================================== --- stable/7/sys/dev/acpica/acpi_thermal.c Sun Mar 4 16:21:20 2012 (r232499) +++ stable/7/sys/dev/acpica/acpi_thermal.c Sun Mar 4 16:24:58 2012 (r232500) @@ -243,7 +243,7 @@ acpi_tz_attach(device_t dev) SYSCTL_ADD_INT(&acpi_tz_sysctl_ctx, SYSCTL_CHILDREN(acpi_tz_sysctl_tree), OID_AUTO, "polling_rate", CTLFLAG_RW, - &acpi_tz_polling_rate, 0, "monitor polling rate"); + &acpi_tz_polling_rate, 0, "monitor polling interval in seconds"); SYSCTL_ADD_INT(&acpi_tz_sysctl_ctx, SYSCTL_CHILDREN(acpi_tz_sysctl_tree), OID_AUTO, "user_override", CTLFLAG_RW, &acpi_tz_override, 0, From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 16:26:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1E7C106566C; Sun, 4 Mar 2012 16:26:49 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C164C8FC0A; Sun, 4 Mar 2012 16:26:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24GQnKj042950; Sun, 4 Mar 2012 16:26:49 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24GQnV5042948; Sun, 4 Mar 2012 16:26:49 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201203041626.q24GQnV5042948@svn.freebsd.org> From: Eitan Adler Date: Sun, 4 Mar 2012 16:26:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232501 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 16:26:49 -0000 Author: eadler Date: Sun Mar 4 16:26:49 2012 New Revision: 232501 URL: http://svn.freebsd.org/changeset/base/232501 Log: ehci tunables are only available when kernel is compiled with USB_DEBUG PR: docs/163646 Reported by: Momchil Ivanov Submitted by: Benjamin Kaduk Approved by: cperciva MFC after: 1 week Modified: head/share/man/man4/ehci.4 Modified: head/share/man/man4/ehci.4 ============================================================================== --- head/share/man/man4/ehci.4 Sun Mar 4 16:24:58 2012 (r232500) +++ head/share/man/man4/ehci.4 Sun Mar 4 16:26:49 2012 (r232501) @@ -80,7 +80,11 @@ The device driver first appeared in .Fx 5.1 . .Sh LOADER TUNABLES -Tunables can be set at the +When the kernel has been compiled with +.Cd options USB_DEBUG , +some tunables become available that affect the behavior of +.Nm . +These tunables can be set at the .Xr loader 8 prompt before booting the kernel or stored in .Xr loader.conf 5 . From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 16:37:45 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 62B201065673; Sun, 4 Mar 2012 16:37:45 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5071D8FC14; Sun, 4 Mar 2012 16:37:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24GbjBf043311; Sun, 4 Mar 2012 16:37:45 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24Gbjcj043308; Sun, 4 Mar 2012 16:37:45 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201203041637.q24Gbjcj043308@svn.freebsd.org> From: Eitan Adler Date: Sun, 4 Mar 2012 16:37:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232502 - head/sbin/geom/class/eli X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 16:37:45 -0000 Author: eadler Date: Sun Mar 4 16:37:44 2012 New Revision: 232502 URL: http://svn.freebsd.org/changeset/base/232502 Log: Fix a variety of grammar issues and style nits. PR: docs/165668 Submitted by: Robert Simmons Reviewed by: kaduk@mit.edu Approved by: cperciva MFC after: 1 week Modified: head/sbin/geom/class/eli/geli.8 Modified: head/sbin/geom/class/eli/geli.8 ============================================================================== --- head/sbin/geom/class/eli/geli.8 Sun Mar 4 16:26:49 2012 (r232501) +++ head/sbin/geom/class/eli/geli.8 Sun Mar 4 16:37:44 2012 (r232502) @@ -24,29 +24,29 @@ .\" .\" $FreeBSD$ .\" -.Dd October 25, 2011 +.Dd March 4, 2012 .Dt GELI 8 .Os .Sh NAME .Nm geli -.Nd "control utility for cryptographic GEOM class" +.Nd "control utility for the cryptographic GEOM class" .Sh SYNOPSIS -To compile GEOM_ELI into your kernel, place the following lines in your kernel +To compile GEOM_ELI into your kernel, add the following lines to your kernel configuration file: .Bd -ragged -offset indent .Cd "device crypto" .Cd "options GEOM_ELI" .Ed .Pp -Alternately, to load the GEOM_ELI module at boot time, place the following line -in your +Alternatively, to load the GEOM_ELI module at boot time, add the following line +to your .Xr loader.conf 5 : .Bd -literal -offset indent geom_eli_load="YES" .Ed .Pp Usage of the -.Xr geli 8 +.Nm utility: .Pp .Nm @@ -189,7 +189,8 @@ or Can create a key from a couple of components (user entered passphrase, random bits from a file, etc.). .It -Allows to encrypt the root partition - the user will be asked for the +Allows encryption of the root partition. +The user will be asked for the passphrase before the root file system is mounted. .It The passphrase of the user is strengthened with: @@ -200,29 +201,30 @@ The passphrase of the user is strengthen .%N 2898 .Re .It -Allows to use two independent keys (e.g. +Allows the use of two independent keys (e.g., a .Qq "user key" -and +and a .Qq "company key" ) . .It It is fast - .Nm performs simple sector-to-sector encryption. .It -Allows to backup/restore Master Keys, so when a user has to quickly -destroy his keys, -it is possible to get the data back by restoring keys from the backup. +Allows Master Keys to be backed up and restored, +so that if a user has to quickly destroy his keys, +it is possible to get the data back by restoring keys from +backup. .It Providers can be configured to automatically detach on last close (so users do not have to remember to detach providers after unmounting the file systems). .It -Allows to attach a provider with a random, one-time key - useful for swap +Allows attaching a provider with a random, one-time key - useful for swap partitions and temporary file systems. .It -Allows to verify data integrity (data authentication). +Allows verification of data integrity (data authentication). .It -Allows to suspend and resume encrypted devices. +Allows suspending and resuming encrypted devices. .El .Pp The first argument to @@ -230,12 +232,12 @@ The first argument to indicates an action to be performed: .Bl -tag -width ".Cm configure" .It Cm init -Initialize provider which needs to be encrypted. +Initialize the provider which needs to be encrypted. Here you can set up the cryptographic algorithm to use, key length, etc. -The last provider's sector is used to store metadata. +The last sector of the provider is used to store metadata. The .Cm init -subcommand also automatically backups metadata in +subcommand also automatically writes metadata backups to .Pa /var/backups/.eli file. The metadata can be recovered with the @@ -246,7 +248,7 @@ Additional options include: .Bl -tag -width ".Fl J Ar newpassfile" .It Fl a Ar aalgo Enable data integrity verification (authentication) using the given algorithm. -This will reduce size of available storage and also reduce speed. +This will reduce the size of storage available and also reduce speed. For example, when using 4096 bytes sector and .Nm HMAC/SHA256 algorithm, 89% of the original provider storage will be available for use. @@ -320,9 +322,9 @@ and 192 for Do not use passphrase as the key component. .It Fl s Ar sectorsize Change decrypted provider's sector size. -Increasing sector size allows to increase performance, because we need to -generate an IV and do encrypt/decrypt for every single sector - less number -of sectors means less work to do. +Increasing the sector size allows increased performance, +because encryption/decryption which requires an initialization vector +is done per sector; fewer sectors means less computational work. .It Fl V Ar version Metadata version to use. This option is helpful when creating provider that may be used by older @@ -345,7 +347,7 @@ Additional options include: .Bl -tag -width ".Fl j Ar passfile" .It Fl d If specified, a decrypted provider will be detached automatically on last close. -This can help with short memory - user does not have to remember to detach the +This can help with scarce memory so the user does not have to remember to detach the provider after unmounting the file system. It only works when the provider was opened for writing, so it will not work if the file system on the provider is mounted read-only. @@ -385,9 +387,8 @@ Force detach - detach even if the provid .It Fl l Mark provider to detach on last close. If this option is specified, the provider will not be detached -until it is open, but when it will be closed last time, it will -be automatically detached (even -if it was only opened for reading). +while it is open, but will be automatically detached when it is closed for the +last time even if it was only opened for reading. .El .It Cm onetime Attach the given providers with random, one-time keys. @@ -407,7 +408,7 @@ For more information, see the descriptio subcommand. .It Fl d Detach on last close. -Note, the option is not usable for temporary file systems as the provider will +Note: this option is not usable for temporary file systems as the provider will be detached after creating the file system on it. It still can (and should be) used for swap partitions. For more information, see the description of the @@ -444,7 +445,7 @@ With the .Cm init subcommand, only key number 0 is initialized. The key can always be changed: for an attached provider, -for a detached provider or on the backup file. +for a detached provider, or on the backup file. When a provider is attached, the user does not have to provide an old passphrase/keyfile. .Pp @@ -453,9 +454,9 @@ Additional options include: .It Fl i Ar iterations Number of iterations to use with PKCS#5v2. If 0 is given, PKCS#5v2 will not be used. -To be able to use this option with +To be able to use this option with the .Cm setkey -subcommand, only one key have to be defined and this key has to be changed. +subcommand, only one key has to be defined and this key must be changed. .It Fl j Ar passfile Specifies a file which contains the old passphrase or its part. .It Fl J Ar newpassfile @@ -479,8 +480,8 @@ Do not use passphrase as the new key com .It Cm delkey Destroy (overwrite with random data) the selected key. If one is destroying keys for an attached provider, the provider -will not be detached even if all keys will be destroyed. -It can be even rescued with the +will not be detached even if all keys are destroyed. +It can even be rescued with the .Cm setkey subcommand. .Pp @@ -501,8 +502,8 @@ If provider is detached (or we are opera has to be given. .El .It Cm kill -This command should be used in emergency situations. -It will destroy all keys on the given provider and will detach it forcibly +This command should be used only in emergency situations. +It will destroy all the keys on a given provider and will detach it forcibly (if it is attached). This is absolutely a one-way command - if you do not have a metadata backup, your data is gone for good. @@ -540,29 +541,30 @@ and .Cm restore . .El .It Cm suspend -Suspend device by waiting for all inflight request to finish, clearing all -sensitive informations (like keys) from the kernel memory and blocking all +Suspend device by waiting for all inflight requests to finish, clearing all +sensitive information (like keys) from kernel memory, and blocking all further I/O requests until the .Cm resume subcommand is executed. -This functionality is useful for eg. laptops - when one wants to suspend a -laptop, one does not want to leave encrypted device attached. -Instead of closing all files and directories opened from a file system placed -on an encrypted device, unmounting the file system and detaching the device, +This functionality is useful for laptops: when one wants to suspend a +laptop, one does not want to leave an encrypted device attached. +Instead of closing all files and directories opened from a file system located +on an encrypted device, unmounting the file system, and detaching the device, the .Cm suspend subcommand can be used. Any access to the encrypted device will be blocked until the keys are -recovered through +recovered through the .Cm resume -subcommand, thus there is no need to close nor unmount anything. +subcommand. +Thus there is no need to close nor unmount anything. The .Cm suspend subcommand does not work with devices created with the .Cm onetime subcommand. Please note that sensitive data might still be present in memory after -suspending encrypted device, because of file system cache, etc. +suspending an encrypted device due to the file system cache, etc. .Pp Additional options include: .Bl -tag -width ".Fl a" @@ -573,9 +575,9 @@ devices. .El .It Cm resume Resume previously suspended device. -The caller must ensure that executing this subcommand won't try to access -suspended device, which will lead to a deadlock. -For example suspending device, which contains file system where the +The caller must ensure that executing this subcommand doesn't access the +suspended device, leading to a deadlock. +For example suspending a device which contains the file system where the .Nm utility is stored is bad idea. .Pp @@ -669,7 +671,7 @@ If set to 3, the maximum amount of debug information is printed. .It Va kern.geom.eli.tries : No 3 Number of times a user is asked for the passphrase. -This is only used for providers which should be attached on boot +This is only used for providers which are attached on boot (before the root file system is mounted). If set to 0, attaching providers on boot will be disabled. This variable should be set in @@ -681,7 +683,7 @@ After this operation it is filled with z .It Va kern.geom.eli.visible_passphrase : No 0 If set to 1, the passphrase entered on boot (before the root file system is mounted) will be visible. -This possibility should be used with caution as the entered +This alternative should be used with caution as the entered passphrase can be logged and exposed via .Xr dmesg 8 . This variable should be set in @@ -691,18 +693,17 @@ Specifies how many kernel threads should cryptography. Its purpose is to increase performance on SMP systems. If hardware acceleration is available, only one thread will be started. -If set to 0, CPU-bound thread will be started for every active CPU. +If set to 0, a CPU-pinned thread will be started for every active CPU. .It Va kern.geom.eli.batch : No 0 When set to 1, can speed-up crypto operations by using batching. -Batching allows to reduce number of interrupts by responding on a group of +Batching reduces the number of interrupts by responding to a group of crypto requests with one interrupt. The crypto card and the driver has to support this feature. .It Va kern.geom.eli.key_cache_limit : No 8192 Specifies how many encryption keys to cache. The default limit -.No ( 8192 -keys) will allow to cache all keys for 4TB provider with 512 bytes sectors and -will take around 1MB of memory. +(8192 keys) will allow caching of all keys for a 4TB provider with 512 byte +sectors and will take around 1MB of memory. .It Va kern.geom.eli.key_cache_hits Reports how many times we were looking up a key and it was already in cache. This sysctl is not updated for providers that need less keys than the limit @@ -710,7 +711,7 @@ specified in .Va kern.geom.eli.key_cache_limit . .It Va kern.geom.eli.key_cache_misses Reports how many times we were looking up a key and it was not in cache. -This sysctl is not updated for providers that need less keys than the limit +This sysctl is not updated for providers that need fewer keys than the limit specified in .Va kern.geom.eli.key_cache_limit . .El @@ -720,7 +721,7 @@ Exit status is 0 on success, and 1 if th Initialize a provider which is going to be encrypted with a passphrase and random data from a file on the user's pen drive. Use 4kB sector size. -Attach the provider, create a file system and mount it. +Attach the provider, create a file system, and mount it. Do the work. Unmount the provider and detach it: .Bd -literal -offset indent @@ -739,28 +740,28 @@ Enter passphrase: .Ed .Pp Create an encrypted provider, but use two keys: -one for your employee and one for you as company's security officer -(so there is no tragedy if the employee +one for your employee and one for you as the company's security officer +(so it's not a tragedy if the employee .Qq accidentally forgets his passphrase): .Bd -literal -offset indent # geli init /dev/da2 -Enter new passphrase: (enter security officer passphrase) +Enter new passphrase: (enter security officer's passphrase) Reenter new passphrase: # geli setkey -n 1 /dev/da2 -Enter passphrase: (enter security officer passphrase) +Enter passphrase: (enter security officer's passphrase) Enter new passphrase: (let your employee enter his passphrase ...) Reenter new passphrase: (... twice) .Ed .Pp -You are the security-person in your company. +You are the security officer in your company. Create an encrypted provider for use by the user, but remember that users -forget their passphrases, so back Master Key up with your own random key: +forget their passphrases, so backup the Master Key with your own random key: .Bd -literal -offset indent # dd if=/dev/random of=/mnt/pendrive/keys/`hostname` bs=64 count=1 # geli init -P -K /mnt/pendrive/keys/`hostname` /dev/ad0s1e # geli backup /dev/ad0s1e /mnt/pendrive/backups/`hostname` -(use key number 0, so the encrypted Master Key by you will be overwritten) +(use key number 0, so the encrypted Master Key will be overwritten by this) # geli setkey -n 0 -k /mnt/pendrive/keys/`hostname` /dev/ad0s1e (allow the user to enter his passphrase) Enter new passphrase: @@ -791,7 +792,7 @@ Reenter new passphrase: # geli init -b -P -K /boot/keys/da1s3a.key da1s3a .Ed .Pp -The providers are initialized, now we have to add those lines to +The providers are initialized, now we have to add these lines to .Pa /boot/loader.conf : .Bd -literal -offset indent geli_da0_keyfile0_load="YES" @@ -823,10 +824,10 @@ Enter passphrase: .Ed .Pp .Cm geli -backups metadata by default to the +writes the metadata backup by default to the .Pa /var/backups/.eli file. -If metadata is lost in any way (eg. by accidental overwrite), it can be restored. +If the metadata is lost in any way (e.g., by accidental overwrite), it can be restored. Consider the following situation: .Bd -literal -offset indent # geli init /dev/da0 @@ -846,7 +847,7 @@ geli: Cannot read metadata from /dev/da0 Enter passphrase: .Ed .Pp -If an encrypted filesystem is extended, it is necessary to relocate and +If an encrypted file system is extended, it is necessary to relocate and update the metadata: .Bd -literal -offset indent # gpart create -s GPT ada0 @@ -857,10 +858,10 @@ update the metadata: # geli attach -k keyfile -p ada0p1 .Ed .Pp -Initialize provider with passphrase split into two files. -The provider can be attached by giving those two files or by giving +Initialize provider with the passphrase split into two files. +The provider can be attached using those two files or by entering .Dq foobar -passphrase on +as the passphrase at the .Nm prompt: .Bd -literal -offset indent @@ -875,8 +876,8 @@ Enter passphrase: foobar .Pp Suspend all .Nm -devices, suspend a laptop, then resume devices one by one after resuming a -laptop: +devices on a laptop, suspend the laptop, then resume devices one by one after +resuming the laptop: .Bd -literal -offset indent # geli suspend -a # zzz @@ -916,12 +917,12 @@ to another even without modification, .Nm should be able to detect such a change. If an attacker can remember the encrypted data, he can overwrite any future -changes with the data he owns without notice. +changes with the data he owns without it being noticed. In other words .Nm will not protect your data against replay attacks. .Pp -It is recommended to write the whole provider before the first use, +It is recommended to write to the whole provider before first use, in order to make sure that all sectors and their corresponding checksums are properly initialized into a consistent state. .Sh SEE ALSO @@ -937,7 +938,7 @@ The .Nm utility appeared in .Fx 6.0 . -Support for +Support for the .Nm Camellia block cipher is implemented by Yoshisato Yanagisawa in .Fx 7.0 . From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 16:39:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0936B106564A; Sun, 4 Mar 2012 16:39:09 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ECCAE8FC12; Sun, 4 Mar 2012 16:39:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24Gd8s9043390; Sun, 4 Mar 2012 16:39:08 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24Gd8dJ043387; Sun, 4 Mar 2012 16:39:08 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201203041639.q24Gd8dJ043387@svn.freebsd.org> From: Eitan Adler Date: Sun, 4 Mar 2012 16:39:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232503 - head/lib/libc/string X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 16:39:09 -0000 Author: eadler Date: Sun Mar 4 16:39:08 2012 New Revision: 232503 URL: http://svn.freebsd.org/changeset/base/232503 Log: POSIX mandates that swab do nothing when len < 0 PR: kern/140690 Submitted by: Jeremy Huddleston Approved by: cperciva MFC after: 2 weeks Modified: head/lib/libc/string/swab.3 head/lib/libc/string/swab.c Modified: head/lib/libc/string/swab.3 ============================================================================== --- head/lib/libc/string/swab.3 Sun Mar 4 16:37:44 2012 (r232502) +++ head/lib/libc/string/swab.3 Sun Mar 4 16:39:08 2012 (r232503) @@ -28,7 +28,7 @@ .\" @(#)swab.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd December 10, 2004 +.Dd March 4, 2012 .Dt SWAB 3 .Os .Sh NAME @@ -54,6 +54,9 @@ swapping adjacent bytes. The argument .Fa len must be an even number. +If +.Fa len +is less than zero, nothing will be done. .Sh SEE ALSO .Xr bzero 3 , .Xr memset 3 Modified: head/lib/libc/string/swab.c ============================================================================== --- head/lib/libc/string/swab.c Sun Mar 4 16:37:44 2012 (r232502) +++ head/lib/libc/string/swab.c Sun Mar 4 16:39:08 2012 (r232503) @@ -45,6 +45,8 @@ swab(const void * __restrict from, void int n; char *fp, *tp; + if (len <= 0) + return; n = len >> 1; fp = (char *)from; tp = (char *)to; From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 16:41:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6726A1065674; Sun, 4 Mar 2012 16:41:08 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 56BBE8FC0C; Sun, 4 Mar 2012 16:41:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24Gf8jD043490; Sun, 4 Mar 2012 16:41:08 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24Gf8gM043488; Sun, 4 Mar 2012 16:41:08 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201203041641.q24Gf8gM043488@svn.freebsd.org> From: Eitan Adler Date: Sun, 4 Mar 2012 16:41:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232504 - head/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 16:41:08 -0000 Author: eadler Date: Sun Mar 4 16:41:07 2012 New Revision: 232504 URL: http://svn.freebsd.org/changeset/base/232504 Log: Remove reference to gcc's non-standard -fwritable-strings, which doesn't exist in recent releases (and is bad advice anyway) PR: docs/163119 Submitted by: Yuri Pankov Approved by: cperciva MFC after: 1 week Modified: head/lib/libc/stdio/mktemp.3 Modified: head/lib/libc/stdio/mktemp.3 ============================================================================== --- head/lib/libc/stdio/mktemp.3 Sun Mar 4 16:39:08 2012 (r232503) +++ head/lib/libc/stdio/mktemp.3 Sun Mar 4 16:41:07 2012 (r232504) @@ -28,7 +28,7 @@ .\" @(#)mktemp.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd February 11, 1998 +.Dd March 4, 2012 .Dt MKTEMP 3 .Os .Sh NAME @@ -180,12 +180,6 @@ with an argument of will result in a core dump due to .Fn mkstemp attempting to modify the string constant that was given. -If the program in question makes heavy use of that type -of function call, you do have the option of compiling the program -so that it will store string constants in a writable segment of memory. -See -.Xr gcc 1 -for more information. .Sh SEE ALSO .Xr chmod 2 , .Xr getpid 2 , From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 16:44:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DFF91106564A; Sun, 4 Mar 2012 16:44:04 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CF6AE8FC08; Sun, 4 Mar 2012 16:44:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24Gi4uZ043627; Sun, 4 Mar 2012 16:44:04 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24Gi4TL043625; Sun, 4 Mar 2012 16:44:04 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201203041644.q24Gi4TL043625@svn.freebsd.org> From: Eitan Adler Date: Sun, 4 Mar 2012 16:44:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232505 - head/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 16:44:05 -0000 Author: eadler Date: Sun Mar 4 16:44:04 2012 New Revision: 232505 URL: http://svn.freebsd.org/changeset/base/232505 Log: Remove outdated comment of seven years PR: docs/116116 Approved by: cperciva MFC after: 1 week Modified: head/lib/libc/stdio/mktemp.3 Modified: head/lib/libc/stdio/mktemp.3 ============================================================================== --- head/lib/libc/stdio/mktemp.3 Sun Mar 4 16:41:07 2012 (r232504) +++ head/lib/libc/stdio/mktemp.3 Sun Mar 4 16:44:04 2012 (r232505) @@ -236,10 +236,3 @@ and the return status of the call should This will ensure that the program does not continue blindly in the event that an attacker has already created the file with the intention of manipulating or reading its contents. -.Pp -The implementation of these functions calls -.Xr arc4random 3 , -which is not reentrant. -You must provide your own locking around this and other consumers of the -.Xr arc4random 3 -API. From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 16:46:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 936B91065670; Sun, 4 Mar 2012 16:46:28 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E2678FC14; Sun, 4 Mar 2012 16:46:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24GkSLE043756; Sun, 4 Mar 2012 16:46:28 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24GkSig043754; Sun, 4 Mar 2012 16:46:28 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201203041646.q24GkSig043754@svn.freebsd.org> From: Eitan Adler Date: Sun, 4 Mar 2012 16:46:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232506 - head/sys/modules/dtrace/dtrace X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 16:46:28 -0000 Author: eadler Date: Sun Mar 4 16:46:27 2012 New Revision: 232506 URL: http://svn.freebsd.org/changeset/base/232506 Log: Explicitly list dependency PR: misc/160463 Submitted by: Garrett Cooper Helped by: kan Approved by: cperciva MFC after: 3 days Modified: head/sys/modules/dtrace/dtrace/Makefile Modified: head/sys/modules/dtrace/dtrace/Makefile ============================================================================== --- head/sys/modules/dtrace/dtrace/Makefile Sun Mar 4 16:44:04 2012 (r232505) +++ head/sys/modules/dtrace/dtrace/Makefile Sun Mar 4 16:46:27 2012 (r232506) @@ -42,4 +42,6 @@ EXPORT_SYMS= dtrace_register \ dtrace_unregister \ dtrace_probe_lookup +dtrace_asm.o: assym.s + .include From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 16:59:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1424F1065674; Sun, 4 Mar 2012 16:59:46 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA95B8FC12; Sun, 4 Mar 2012 16:59:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24GxjDk044206; Sun, 4 Mar 2012 16:59:45 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24GxjOT044204; Sun, 4 Mar 2012 16:59:45 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201203041659.q24GxjOT044204@svn.freebsd.org> From: Eitan Adler Date: Sun, 4 Mar 2012 16:59:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232507 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 16:59:46 -0000 Author: eadler Date: Sun Mar 4 16:59:45 2012 New Revision: 232507 URL: http://svn.freebsd.org/changeset/base/232507 Log: Bump date as modified the man page Submitted by: gjb Modified: head/share/man/man4/ehci.4 Modified: head/share/man/man4/ehci.4 ============================================================================== --- head/share/man/man4/ehci.4 Sun Mar 4 16:46:27 2012 (r232506) +++ head/share/man/man4/ehci.4 Sun Mar 4 16:59:45 2012 (r232507) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 24, 2011 +.Dd March 4, 2012 .Dt EHCI 4 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 17:00:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBCE31065672; Sun, 4 Mar 2012 17:00:46 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ACBF18FC13; Sun, 4 Mar 2012 17:00:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24H0kWk044301; Sun, 4 Mar 2012 17:00:46 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24H0kL8044297; Sun, 4 Mar 2012 17:00:46 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201203041700.q24H0kL8044297@svn.freebsd.org> From: Rafal Jaworowski Date: Sun, 4 Mar 2012 17:00:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232508 - in stable/9/sys: arm/arm arm/include i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 17:00:47 -0000 Author: raj Date: Sun Mar 4 17:00:46 2012 New Revision: 232508 URL: http://svn.freebsd.org/changeset/base/232508 Log: MFC r228504, r228530. r228504: Make *intr{cnt,names} on ARM reside in data section, similar to other arches. sintrnames and sintrcnt are initialized with non-zero values, which were discarded by the .bss directive, so consumers like "vmstat -i" were not getting correct data. Submitted by: Lukasz Plachno Obtained from: Semihalf r228530: ARM pmap fixes: - Write Buffers have to be drained after write to Page Table even if caches are in write-through mode. - Make sure to sync PTE in pmap_zero_page_generic(). Submitted by: Michal Mazur Reviewed by: cognet Obtained from: Semihalf Modified: stable/9/sys/arm/arm/irq_dispatch.S stable/9/sys/arm/arm/pmap.c stable/9/sys/arm/include/pmap.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) Modified: stable/9/sys/arm/arm/irq_dispatch.S ============================================================================== --- stable/9/sys/arm/arm/irq_dispatch.S Sun Mar 4 16:59:45 2012 (r232507) +++ stable/9/sys/arm/arm/irq_dispatch.S Sun Mar 4 17:00:46 2012 (r232508) @@ -98,10 +98,9 @@ ASENTRY_NP(irq_entry) PULLFRAMEFROMSVCANDEXIT movs pc, lr /* Exit */ - .bss + .data .align 0 - .global _C_LABEL(intrnames), _C_LABEL(sintrnames) .global _C_LABEL(intrcnt), _C_LABEL(sintrcnt) _C_LABEL(intrnames): Modified: stable/9/sys/arm/arm/pmap.c ============================================================================== --- stable/9/sys/arm/arm/pmap.c Sun Mar 4 16:59:45 2012 (r232507) +++ stable/9/sys/arm/arm/pmap.c Sun Mar 4 17:00:46 2012 (r232508) @@ -4044,6 +4044,7 @@ pmap_zero_page_generic(vm_paddr_t phys, * order to work without corruption when write-allocate is enabled. */ *cdst_pte = L2_S_PROTO | phys | L2_S_PROT(PTE_KERNEL, VM_PROT_WRITE); + PTE_SYNC(cdst_pte); cpu_tlb_flushD_SE(cdstp); cpu_cpwait(); if (off || size != PAGE_SIZE) Modified: stable/9/sys/arm/include/pmap.h ============================================================================== --- stable/9/sys/arm/include/pmap.h Sun Mar 4 16:59:45 2012 (r232507) +++ stable/9/sys/arm/include/pmap.h Sun Mar 4 17:00:46 2012 (r232508) @@ -382,7 +382,8 @@ do { \ if (PMAP_NEEDS_PTE_SYNC) { \ cpu_dcache_wb_range((vm_offset_t)(pte), sizeof(pt_entry_t));\ cpu_l2cache_wb_range((vm_offset_t)(pte), sizeof(pt_entry_t));\ - }\ + } else \ + cpu_drain_writebuf(); \ } while (/*CONSTCOND*/0) #define PTE_SYNC_RANGE(pte, cnt) \ @@ -392,7 +393,8 @@ do { \ (cnt) << 2); /* * sizeof(pt_entry_t) */ \ cpu_l2cache_wb_range((vm_offset_t)(pte), \ (cnt) << 2); /* * sizeof(pt_entry_t) */ \ - } \ + } else \ + cpu_drain_writebuf(); \ } while (/*CONSTCOND*/0) extern pt_entry_t pte_l1_s_cache_mode; From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 17:08:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6857A1065670; Sun, 4 Mar 2012 17:08:44 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 53C938FC12; Sun, 4 Mar 2012 17:08:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24H8iIT044603; Sun, 4 Mar 2012 17:08:44 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24H8iAR044601; Sun, 4 Mar 2012 17:08:44 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201203041708.q24H8iAR044601@svn.freebsd.org> From: Bruce Cran Date: Sun, 4 Mar 2012 17:08:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232509 - head/sys/compat/ndis X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 17:08:44 -0000 Author: brucec Date: Sun Mar 4 17:08:43 2012 New Revision: 232509 URL: http://svn.freebsd.org/changeset/base/232509 Log: Fix race condition in KfRaiseIrql(). After getting the current irql, if the kthread gets preempted and subsequently runs on a different CPU, the saved irql could be wrong. Also, correct the panic string. PR: kern/165630 Submitted by: Vladislav Movchan Modified: head/sys/compat/ndis/subr_hal.c Modified: head/sys/compat/ndis/subr_hal.c ============================================================================== --- head/sys/compat/ndis/subr_hal.c Sun Mar 4 17:00:46 2012 (r232508) +++ head/sys/compat/ndis/subr_hal.c Sun Mar 4 17:08:43 2012 (r232509) @@ -392,16 +392,18 @@ KfRaiseIrql(uint8_t irql) { uint8_t oldirql; + sched_pin(); oldirql = KeGetCurrentIrql(); /* I am so going to hell for this. */ if (oldirql > irql) - panic("IRQL_NOT_LESS_THAN"); + panic("IRQL_NOT_LESS_THAN_OR_EQUAL"); - if (oldirql != DISPATCH_LEVEL) { - sched_pin(); + if (oldirql != DISPATCH_LEVEL) mtx_lock(&disp_lock[curthread->td_oncpu]); - } + else + sched_unpin(); + /*printf("RAISE IRQL: %d %d\n", irql, oldirql);*/ return (oldirql); From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 17:33:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CA9F7106566B; Sun, 4 Mar 2012 17:33:22 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B5DD18FC12; Sun, 4 Mar 2012 17:33:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24HXMLQ045467; Sun, 4 Mar 2012 17:33:22 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24HXM0p045465; Sun, 4 Mar 2012 17:33:22 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201203041733.q24HXM0p045465@svn.freebsd.org> From: Eitan Adler Date: Sun, 4 Mar 2012 17:33:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232510 - head/usr.sbin/pc-sysinstall/backend X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 17:33:22 -0000 Author: eadler Date: Sun Mar 4 17:33:22 2012 New Revision: 232510 URL: http://svn.freebsd.org/changeset/base/232510 Log: Permit the use of raidz3 in pc-sysinstall PR: conf/164709 Submitted by: Garrett Cooper Reviewed by: brd, brooks Approved by: cperciva MFC after: 3 days Modified: head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Modified: head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Sun Mar 4 17:08:43 2012 (r232509) +++ head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Sun Mar 4 17:33:22 2012 (r232510) @@ -59,7 +59,7 @@ get_fs_line_xvars() ZTYPE="NONE" ZFSVARS="`echo $LINE | cut -d '(' -f 2- | cut -d ')' -f 1 | xargs`" - echo $ZFSVARS | grep -qE "^(disk|file|mirror|raidz(1|2)?|spare|log|cache):" 2>/dev/null + echo $ZFSVARS | grep -qE "^(disk|file|mirror|raidz(1|2|3)?|spare|log|cache):" 2>/dev/null if [ $? -eq 0 ] ; then ZTYPE=`echo $ZFSVARS | cut -f1 -d:` ZFSVARS=`echo $ZFSVARS | sed "s|$ZTYPE: ||g" | sed "s|$ZTYPE:||g"` From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 17:53:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 085F7106564A; Sun, 4 Mar 2012 17:53:41 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E6E0F8FC08; Sun, 4 Mar 2012 17:53:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24HreoR046136; Sun, 4 Mar 2012 17:53:40 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24Hreiv046133; Sun, 4 Mar 2012 17:53:40 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201203041753.q24Hreiv046133@svn.freebsd.org> From: Rafal Jaworowski Date: Sun, 4 Mar 2012 17:53:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232511 - in stable/9/sys: dev/mvs i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 17:53:41 -0000 Author: raj Date: Sun Mar 4 17:53:40 2012 New Revision: 232511 URL: http://svn.freebsd.org/changeset/base/232511 Log: MFC r230865: Adjust mvs(4) to handle interrupt cause reg depending on the actual number of channels available - current code treats bits 4:7 in 'SATAHC interrupt mask' and 'SATAHC interrupt cause' as flags for SATA channels 2 and 3 - for embedded SATA controllers (SoC) these bits have been marked as reserved in datasheets so far, but for some new and upcoming chips they are used for purposes other than SATA Submitted by: Lukasz Plachno Reviewed by: mav Obtained from: Semihalf Modified: stable/9/sys/dev/mvs/mvs.h stable/9/sys/dev/mvs/mvs_soc.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) Modified: stable/9/sys/dev/mvs/mvs.h ============================================================================== --- stable/9/sys/dev/mvs/mvs.h Sun Mar 4 17:33:22 2012 (r232510) +++ stable/9/sys/dev/mvs/mvs.h Sun Mar 4 17:53:40 2012 (r232511) @@ -61,6 +61,9 @@ #define CHIP_SOC_LED 0x2C /* SoC LED Configuration */ +/* Additional mask for SoC devices with less than 4 channels */ +#define CHIP_SOC_HC0_MASK(num) (0xff >> ((4 - (num)) * 2)) + /* Chip CCC registers */ #define CHIP_ICC 0x18008 #define CHIP_ICC_ALL_PORTS (1 << 4) /* all ports irq event */ Modified: stable/9/sys/dev/mvs/mvs_soc.c ============================================================================== --- stable/9/sys/dev/mvs/mvs_soc.c Sun Mar 4 17:33:22 2012 (r232510) +++ stable/9/sys/dev/mvs/mvs_soc.c Sun Mar 4 17:53:40 2012 (r232511) @@ -216,7 +216,9 @@ mvs_ctlr_setup(device_t dev) if (ccc) ccim |= IC_HC0_COAL_DONE; /* Enable chip interrupts */ - ctlr->gmim = (ccc ? IC_HC0_COAL_DONE : IC_DONE_HC0) | IC_ERR_HC0; + ctlr->gmim = ((ccc ? IC_HC0_COAL_DONE : + (IC_DONE_HC0 & CHIP_SOC_HC0_MASK(ctlr->channels))) | + (IC_ERR_HC0 & CHIP_SOC_HC0_MASK(ctlr->channels))); ATA_OUTL(ctlr->r_mem, CHIP_SOC_MIM, ctlr->gmim | ctlr->pmim); return (0); } @@ -291,25 +293,26 @@ mvs_intr(void *data) struct mvs_controller *ctlr = data; struct mvs_intr_arg arg; void (*function)(void *); - int p; + int p, chan_num; u_int32_t ic, aic; ic = ATA_INL(ctlr->r_mem, CHIP_SOC_MIC); if ((ic & IC_HC0) == 0) return; + /* Acknowledge interrupts of this HC. */ aic = 0; - if (ic & (IC_DONE_IRQ << 0)) - aic |= HC_IC_DONE(0) | HC_IC_DEV(0); - if (ic & (IC_DONE_IRQ << 2)) - aic |= HC_IC_DONE(1) | HC_IC_DEV(1); - if (ic & (IC_DONE_IRQ << 4)) - aic |= HC_IC_DONE(2) | HC_IC_DEV(2); - if (ic & (IC_DONE_IRQ << 6)) - aic |= HC_IC_DONE(3) | HC_IC_DEV(3); + + /* Processing interrupts from each initialized channel */ + for (chan_num = 0; chan_num < ctlr->channels; chan_num++) { + if (ic & (IC_DONE_IRQ << (chan_num * 2))) + aic |= HC_IC_DONE(chan_num) | HC_IC_DEV(chan_num); + } + if (ic & IC_HC0_COAL_DONE) aic |= HC_IC_COAL; ATA_OUTL(ctlr->r_mem, HC_IC, ~aic); + /* Call per-port interrupt handler. */ for (p = 0; p < ctlr->channels; p++) { arg.cause = ic & (IC_ERR_IRQ|IC_DONE_IRQ); From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 18:13:45 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E668A106564A; Sun, 4 Mar 2012 18:13:45 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D1B318FC0A; Sun, 4 Mar 2012 18:13:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24IDj05046843; Sun, 4 Mar 2012 18:13:45 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24IDj0R046841; Sun, 4 Mar 2012 18:13:45 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201203041813.q24IDj0R046841@svn.freebsd.org> From: Rafal Jaworowski Date: Sun, 4 Mar 2012 18:13:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232512 - head/sys/arm/mv X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 18:13:46 -0000 Author: raj Date: Sun Mar 4 18:13:45 2012 New Revision: 232512 URL: http://svn.freebsd.org/changeset/base/232512 Log: Remove unused #defines. All this is now retrieved from the device tree. MFC after: 1 week Modified: head/sys/arm/mv/mvreg.h Modified: head/sys/arm/mv/mvreg.h ============================================================================== --- head/sys/arm/mv/mvreg.h Sun Mar 4 17:53:40 2012 (r232511) +++ head/sys/arm/mv/mvreg.h Sun Mar 4 18:13:45 2012 (r232512) @@ -34,132 +34,6 @@ #ifndef _MVREG_H_ #define _MVREG_H_ -/* - * Interrupt sources - */ -#if defined(SOC_MV_ORION) - -#define MV_INT_BRIDGE 0 /* AHB-MBus Bridge Interrupt */ -#define MV_INT_UART0 3 /* UART0 Interrupt */ -#define MV_INT_UART1 4 -#define MV_INT_GPIO7_0 6 /* GPIO[7:0] Interrupt */ -#define MV_INT_GPIO15_8 7 /* GPIO[15:8] Interrupt */ -#define MV_INT_GPIO23_16 8 /* GPIO[23:16] Interrupt */ -#define MV_INT_GPIO31_24 9 /* GPIO[31:24] Interrupt */ -#define MV_INT_PEX0_ERR 10 /* PCI Express Error */ -#define MV_INT_PEX0 11 /* PCI Express INTA,B,C,D Message */ -#define MV_INT_PCI_ERR 15 /* PCI Error */ -#define MV_INT_USB_BERR 16 /* USB Bridge Error */ -#define MV_INT_USB_CI 17 /* USB Controller interrupt */ -#define MV_INT_GBERX 18 /* GbE receive interrupt */ -#define MV_INT_GBETX 19 /* GbE transmit interrupt */ -#define MV_INT_GBEMISC 20 /* GbE misc. interrupt */ -#define MV_INT_GBESUM 21 /* GbE summary interrupt */ -#define MV_INT_GBEERR 22 /* GbE error interrupt */ -#define MV_INT_IDMA_ERR 23 /* DMA error interrupt */ -#define MV_INT_IDMA0 24 /* IDMA chan. 0 completion interrupt */ -#define MV_INT_IDMA1 25 /* IDMA chan. 1 completion interrupt */ -#define MV_INT_IDMA2 26 /* IDMA chan. 2 completion interrupt */ -#define MV_INT_IDMA3 27 /* IDMA chan. 3 completion interrupt */ -#define MV_INT_SATA 29 /* Serial-ATA Interrupt */ - -#elif defined(SOC_MV_KIRKWOOD) - -#define MV_INT_BRIDGE 1 /* AHB-MBus Bridge Interrupt */ -#define MV_INT_XOR0_CHAN0 5 /* XOR engine 0 channel 0 Interrupt */ -#define MV_INT_XOR0_CHAN1 6 /* XOR engine 0 channel 1 Interrupt */ -#define MV_INT_XOR1_CHAN0 7 /* XOR engine 1 channel 0 Interrupt */ -#define MV_INT_XOR1_CHAN1 8 /* XOR engine 1 channel 1 Interrupt */ -#define MV_INT_PEX0 9 /* PCI Express INTA,B,C,D Message */ -#define MV_INT_GBESUM 11 /* GbE0 summary interrupt */ -#define MV_INT_GBERX 12 /* GbE0 receive interrupt */ -#define MV_INT_GBETX 13 /* GbE0 transmit interrupt */ -#define MV_INT_GBEMISC 14 /* GbE0 misc. interrupt */ -#define MV_INT_GBE1SUM 15 /* GbE1 summary interrupt */ -#define MV_INT_GBE1RX 16 /* GbE1 receive interrupt */ -#define MV_INT_GBE1TX 17 /* GbE1 transmit interrupt */ -#define MV_INT_GBE1MISC 18 /* GbE1 misc. interrupt */ -#define MV_INT_USB_CI 19 /* USB Controller interrupt */ -#define MV_INT_SATA 21 /* Serial-ATA Interrupt */ -#define MV_INT_CESA 22 /* Security engine completion int. */ -#define MV_INT_IDMA_ERR 23 /* DMA error interrupt */ -#define MV_INT_UART0 33 /* UART0 Interrupt */ -#define MV_INT_UART1 34 -#define MV_INT_GPIO7_0 35 /* GPIO[7:0] Interrupt */ -#define MV_INT_GPIO15_8 36 /* GPIO[15:8] Interrupt */ -#define MV_INT_GPIO23_16 37 /* GPIO[23:16] Interrupt */ -#define MV_INT_GPIO31_24 38 /* GPIO[31:24] Interrupt */ -#define MV_INT_GPIOHI7_0 39 /* GPIOHI[7:0] Interrupt */ -#define MV_INT_GPIOHI15_8 40 /* GPIOHI[15:8] Interrupt */ -#define MV_INT_GPIOHI23_16 41 /* GPIOHI[23:16] Interrupt */ -#define MV_INT_XOR0_ERR 42 /* XOR engine 0 error Interrupt */ -#define MV_INT_XOR1_ERR 43 /* XOR engine 1 error Interrupt */ -#define MV_INT_PEX0_ERR 44 /* PCI Express Error */ -#define MV_INT_GBEERR 46 /* GbE0 error interrupt */ -#define MV_INT_GBE1ERR 47 /* GbE1 error interrupt */ -#define MV_INT_USB_BERR 48 /* USB Bridge Error */ - -#elif defined(SOC_MV_DISCOVERY) - -#define MV_INT_ERRSUM 0 /* Summary of error interrupts */ -#define MV_INT_SPI 1 /* SPI interrupt */ -#define MV_INT_TWSI0 2 /* TWSI0 interrupt */ -#define MV_INT_TWSI1 3 /* TWSI1 interrupt */ -#define MV_INT_IDMA0 4 /* IDMA Channel0 completion */ -#define MV_INT_IDMA1 5 /* IDMA Channel0 completion */ -#define MV_INT_IDMA2 6 /* IDMA Channel0 completion */ -#define MV_INT_IDMA3 7 /* IDMA Channel0 completion */ -#define MV_INT_TIMER0 8 /* Timer0 interrupt */ -#define MV_INT_TIMER1 9 /* Timer1 interrupt */ -#define MV_INT_TIMER2 10 /* Timer2 interrupt */ -#define MV_INT_TIMER3 11 /* Timer3 interrupt */ -#define MV_INT_UART0 12 /* UART0 interrupt */ -#define MV_INT_UART1 13 /* UART1 interrupt */ -#define MV_INT_UART2 14 /* UART2 interrupt */ -#define MV_INT_UART3 15 /* UART3 interrupt */ -#define MV_INT_USB0 16 /* USB0 interrupt */ -#define MV_INT_USB1 17 /* USB1 interrupt */ -#define MV_INT_USB2 18 /* USB2 interrupt */ -#define MV_INT_CESA 19 /* Crypto engine completion interrupt */ -#define MV_INT_XOR0 22 /* XOR engine 0 completion interrupt */ -#define MV_INT_XOR1 23 /* XOR engine 1 completion interrupt */ -#define MV_INT_SATA 26 /* SATA interrupt */ -#define MV_INT_PEX00 32 /* PCI Express port 0.0 INTA/B/C/D */ -#define MV_INT_PEX01 33 /* PCI Express port 0.1 INTA/B/C/D */ -#define MV_INT_PEX02 34 /* PCI Express port 0.2 INTA/B/C/D */ -#define MV_INT_PEX03 35 /* PCI Express port 0.3 INTA/B/C/D */ -#define MV_INT_PEX10 36 /* PCI Express port 1.0 INTA/B/C/D */ -#define MV_INT_PEX11 37 /* PCI Express port 1.1 INTA/B/C/D */ -#define MV_INT_PEX12 38 /* PCI Express port 1.2 INTA/B/C/D */ -#define MV_INT_PEX13 39 /* PCI Express port 1.3 INTA/B/C/D */ -#define MV_INT_GBESUM 40 /* Gigabit Ethernet Port 0 summary */ -#define MV_INT_GBERX 41 /* Gigabit Ethernet Port 0 Rx summary */ -#define MV_INT_GBETX 42 /* Gigabit Ethernet Port 0 Tx summary */ -#define MV_INT_GBEMISC 43 /* Gigabit Ethernet Port 0 Misc summ. */ -#define MV_INT_GBE1SUM 44 /* Gigabit Ethernet Port 1 summary */ -#define MV_INT_GBE1RX 45 /* Gigabit Ethernet Port 1 Rx summary */ -#define MV_INT_GBE1TX 46 /* Gigabit Ethernet Port 1 Tx summary */ -#define MV_INT_GBE1MISC 47 /* Gigabit Ethernet Port 1 Misc summ. */ -#define MV_INT_GPIO7_0 56 /* GPIO[7:0] Interrupt */ -#define MV_INT_GPIO15_8 57 /* GPIO[15:8] Interrupt */ -#define MV_INT_GPIO23_16 58 /* GPIO[23:16] Interrupt */ -#define MV_INT_GPIO31_24 59 /* GPIO[31:24] Interrupt */ -#define MV_INT_DB_IN 60 /* Inbound Doorbell Cause reg Summary */ -#define MV_INT_DB_OUT 61 /* Outbound Doorbell Cause reg Summ. */ -#define MV_INT_CRYPT_ERR 64 /* Crypto engine error */ -#define MV_INT_DEV_ERR 65 /* Device bus error */ -#define MV_INT_IDMA_ERR 66 /* DMA error */ -#define MV_INT_CPU_ERR 67 /* CPU error */ -#define MV_INT_PEX0_ERR 68 /* PCI-Express port0 error */ -#define MV_INT_PEX1_ERR 69 /* PCI-Express port1 error */ -#define MV_INT_GBE_ERR 70 /* Gigabit Ethernet error */ -#define MV_INT_USB_ERR 72 /* USB error */ -#define MV_INT_DRAM_ERR 73 /* DRAM ECC error */ -#define MV_INT_XOR_ERR 74 /* XOR engine error */ -#define MV_INT_WD 79 /* WD Timer interrupt */ - -#endif /* SOC_MV_ORION */ - #define BRIDGE_IRQ_CAUSE 0x10 #define BRIGDE_IRQ_MASK 0x14 From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 18:47:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22F21106564A; Sun, 4 Mar 2012 18:47:21 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E0608FC16; Sun, 4 Mar 2012 18:47:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24IlK42047923; Sun, 4 Mar 2012 18:47:20 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24IlKij047921; Sun, 4 Mar 2012 18:47:20 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201203041847.q24IlKij047921@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 4 Mar 2012 18:47:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232513 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 18:47:21 -0000 Author: bz Date: Sun Mar 4 18:47:20 2012 New Revision: 232513 URL: http://svn.freebsd.org/changeset/base/232513 Log: Correct typo in the RFC number for the constants based on IANA assignments for IPv6 Neighbor Discovery Option types for "IPv6 Router Advertisement Options for DNS Configuration". It is RFC 6106. MFC after: 3 days Modified: head/sys/netinet/icmp6.h Modified: head/sys/netinet/icmp6.h ============================================================================== --- head/sys/netinet/icmp6.h Sun Mar 4 18:13:45 2012 (r232512) +++ head/sys/netinet/icmp6.h Sun Mar 4 18:47:20 2012 (r232513) @@ -298,8 +298,8 @@ struct nd_opt_hdr { /* Neighbor discove #define ND_OPT_REDIRECTED_HEADER 4 #define ND_OPT_MTU 5 #define ND_OPT_ROUTE_INFO 24 /* RFC 4191 */ -#define ND_OPT_RDNSS 25 /* RFC 6016 */ -#define ND_OPT_DNSSL 31 /* RFC 6016 */ +#define ND_OPT_RDNSS 25 /* RFC 6106 */ +#define ND_OPT_DNSSL 31 /* RFC 6106 */ struct nd_opt_prefix_info { /* prefix information */ u_int8_t nd_opt_pi_type; From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 18:51:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 03B3B106566C; Sun, 4 Mar 2012 18:51:26 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id CA4268FC08; Sun, 4 Mar 2012 18:51:25 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 6AB7446B0D; Sun, 4 Mar 2012 13:51:25 -0500 (EST) Received: from kavik.baldwin.cx (c-68-36-150-83.hsd1.nj.comcast.net [68.36.150.83]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E9C0EB974; Sun, 4 Mar 2012 13:51:24 -0500 (EST) From: John Baldwin To: Tijl Coosemans Date: Sun, 4 Mar 2012 13:51:22 -0500 User-Agent: KMail/1.13.7 (FreeBSD/9.0-BETA2; KDE/4.6.5; i386; ; ) References: <201202281838.q1SIcYhE082928@svn.freebsd.org> In-Reply-To: <201202281838.q1SIcYhE082928@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201203041351.22847.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Sun, 04 Mar 2012 13:51:25 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232264 - in head/sys: amd64/include i386/include pc98/include x86/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 18:51:26 -0000 On Tuesday, February 28, 2012 01:38:34 PM Tijl Coosemans wrote: > Author: tijl > Date: Tue Feb 28 18:38:33 2012 > New Revision: 232264 > URL: http://svn.freebsd.org/changeset/base/232264 > > Log: > Copy amd64 _stdint.h to x86 and merge with i386 _stdint.h. Replace > amd64/i386/pc98 _stdint.h with stubs. > > Added: > head/sys/x86/include/_stdint.h > - copied, changed from r232259, head/sys/amd64/include/_stdint.h This broke C++ software (such as the audio/flac port), that #includes with __STDC_LIMIT_MACROS defined but not __STDC_CONSTANT_MACROS defined. The problem is that you have changed UINT64_MAX and INT64_MAX to use UINT64_C() and INT64_C(), so in this case UINT64_MAX now expands to UINT64_C(...) which can't be resolved to a constant. You should be able to reproduce this via the following: % cat > bar.cc #define __STDC_LIMIT_MACROS #include % c++ -c bar.cc (The test to see if __WORDSIZE should be defined at the end of stdint.h trips over this bug.) While you could do something like add __INT64_C() and __UINT64_C() macros that are always defined and use them for INT64_MAX and UINT64_MAX, I think the simplest fix is probably to just use #ifdef _LP64 tests to define INT64_MAX and UINT64_MAX as pure constants as those are the only two macros effected. (I've just hardcoded those two constants on my little netbook so I can keep building ports and that worked fine for audio/flac). -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 18:51:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70F07106564A; Sun, 4 Mar 2012 18:51:46 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C6F48FC17; Sun, 4 Mar 2012 18:51:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24Ipk8q048085; Sun, 4 Mar 2012 18:51:46 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24IpkOY048083; Sun, 4 Mar 2012 18:51:46 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201203041851.q24IpkOY048083@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 4 Mar 2012 18:51:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232514 - head/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 18:51:46 -0000 Author: bz Date: Sun Mar 4 18:51:45 2012 New Revision: 232514 URL: http://svn.freebsd.org/changeset/base/232514 Log: In nd6_options() ignore the RFC 6106 options completely rather than printing them if nd6_debug is enabled as unknown. Leave a comment about the RFC4191 option as I am undecided so far. Discussed with: hrs MFC after: 3 days Modified: head/sys/netinet6/nd6.c Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Sun Mar 4 18:47:20 2012 (r232513) +++ head/sys/netinet6/nd6.c Sun Mar 4 18:51:45 2012 (r232514) @@ -380,6 +380,14 @@ nd6_options(union nd_opts *ndopts) ndopts->nd_opts_pi_end = (struct nd_opt_prefix_info *)nd_opt; break; + /* What about ND_OPT_ROUTE_INFO? RFC 4191 */ + case ND_OPT_RDNSS: /* RFC 6106 */ + case ND_OPT_DNSSL: /* RFC 6106 */ + /* + * Silently ignore options we know and do not care about + * in the kernel. + */ + break; default: /* * Unknown options must be silently ignored, From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 18:53:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0445D106566B; Sun, 4 Mar 2012 18:53:36 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CA8298FC08; Sun, 4 Mar 2012 18:53:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24IrZem048171; Sun, 4 Mar 2012 18:53:35 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24IrZ5m048169; Sun, 4 Mar 2012 18:53:35 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201203041853.q24IrZ5m048169@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 4 Mar 2012 18:53:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232515 - head/etc/rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 18:53:36 -0000 Author: bz Date: Sun Mar 4 18:53:35 2012 New Revision: 232515 URL: http://svn.freebsd.org/changeset/base/232515 Log: Rather than printing the output from route add for all FIBs just print them for the default FIB followed by a statement with a list of FIB numbers for all the other FIBs we install the routes for. Request by: kib (to make it less noisy) Tested by: kib MFC after: 3 days Modified: head/etc/rc.d/routing Modified: head/etc/rc.d/routing ============================================================================== --- head/etc/rc.d/routing Sun Mar 4 18:51:45 2012 (r232514) +++ head/etc/rc.d/routing Sun Mar 4 18:53:35 2012 (r232515) @@ -147,14 +147,21 @@ static_inet6() : ${fibs:=1} # disallow "internal" addresses to appear on the wire - i=0 - while test ${i} -lt ${fibs}; do - setfib -F ${i} route ${_action} \ - -inet6 ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject - setfib -F ${i} route ${_action} \ - -inet6 ::0.0.0.0 -prefixlen 96 ::1 -reject - i=$((i + 1)) - done + route ${_action} -inet6 ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject + route ${_action} -inet6 ::0.0.0.0 -prefixlen 96 ::1 -reject + i=1 + if test ${i} -lt ${fibs}; then + printf "Also installing reject routes for FIBs" + while test ${i} -lt ${fibs}; do + setfib -F ${i} route -q ${_action} \ + -inet6 ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject + setfib -F ${i} route -q ${_action} \ + -inet6 ::0.0.0.0 -prefixlen 96 ::1 -reject + printf " %d" ${i} + i=$((i + 1)) + done + printf "\n" + fi case ${ipv6_defaultrouter} in [Nn][Oo] | '') @@ -226,14 +233,21 @@ static_inet6() # for the host case, you will allow to omit the identifiers. # Under this configuration, the packets will go to the default # interface. - i=0 - while test ${i} -lt ${fibs}; do - setfib -F ${i} route ${_action} \ - -inet6 fe80:: -prefixlen 10 ::1 -reject - setfib -F ${i} route ${_action} \ - -inet6 ff02:: -prefixlen 16 ::1 -reject - i=$((i + 1)) - done + route ${_action} -inet6 fe80:: -prefixlen 10 ::1 -reject + route ${_action} -inet6 ff02:: -prefixlen 16 ::1 -reject + i=1 + if test ${i} -lt ${fibs}; then + printf "Also installing reject routes for FIBs" + while test ${i} -lt ${fibs}; do + setfib -F ${i} route -q ${_action} \ + -inet6 fe80:: -prefixlen 10 ::1 -reject + setfib -F ${i} route -q ${_action} \ + -inet6 ff02:: -prefixlen 16 ::1 -reject + printf " %d" ${i} + i=$((i + 1)) + done + printf "\n" + fi case ${ipv6_default_interface} in '') From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 18:55:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9AE7F106566B; Sun, 4 Mar 2012 18:55:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6D8A88FC15; Sun, 4 Mar 2012 18:55:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24ItYcN048293; Sun, 4 Mar 2012 18:55:34 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24ItYvx048290; Sun, 4 Mar 2012 18:55:34 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201203041855.q24ItYvx048290@svn.freebsd.org> From: John Baldwin Date: Sun, 4 Mar 2012 18:55:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232516 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 18:55:34 -0000 Author: jhb Date: Sun Mar 4 18:55:33 2012 New Revision: 232516 URL: http://svn.freebsd.org/changeset/base/232516 Log: Document pci_find_extcap() and pci_find_htcap(). Modified: head/share/man/man9/Makefile head/share/man/man9/pci.9 Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Sun Mar 4 18:53:35 2012 (r232515) +++ head/share/man/man9/Makefile Sun Mar 4 18:55:33 2012 (r232516) @@ -981,6 +981,8 @@ MLINKS+=pci.9 pci_alloc_msi.9 \ pci.9 pci_find_cap.9 \ pci.9 pci_find_dbsf.9 \ pci.9 pci_find_device.9 \ + pci.9 pci_find_extcap.9 \ + pci.9 pci_find_htcap.9 \ pci.9 pci_get_max_read_req.9 \ pci.9 pci_get_powerstate.9 \ pci.9 pci_get_vpd_ident.9 \ Modified: head/share/man/man9/pci.9 ============================================================================== --- head/share/man/man9/pci.9 Sun Mar 4 18:53:35 2012 (r232515) +++ head/share/man/man9/pci.9 Sun Mar 4 18:55:33 2012 (r232516) @@ -40,6 +40,8 @@ .Nm pci_find_cap , .Nm pci_find_dbsf , .Nm pci_find_device , +.Nm pci_find_extcap , +.Nm pci_find_htcap , .Nm pci_get_max_read_req , .Nm pci_get_powerstate , .Nm pci_get_vpd_ident , @@ -81,6 +83,10 @@ .Ft device_t .Fn pci_find_device "uint16_t vendor" "uint16_t device" .Ft int +.Fn pci_find_extcap "device_t dev" "int capability" "int *capreg" +.Ft int +.Fn pci_find_htcap "device_t dev" "int capability" "int *capreg" +.Ft int .Fn pci_get_max_read_req "device_t dev" .Ft int .Fn pci_get_powerstate "device_t dev" @@ -225,6 +231,49 @@ If the capability is not found or the de returns an error. .Pp The +.Fn pci_find_extcap +function is used to locate the first instance of a PCI-express +extended capability register set for the device +.Fa dev . +The extended capability to locate is specified by ID via +.Fa capability . +Constant macros of the form +.Dv PCIZ_xxx +for standard extended capability IDs are defined in +.In dev/pci/pcireg.h . +If the extended capability is found, then +.Fa *capreg +is set the offset in configuration space of the extended capability +register set, and +.Fn pci_find_extcap +returns zero. +If the extended capability is not found or the device is not a +PCI-express device, +.Fn pci_find_extcap +returns an error. +.Pp +The +.Fn pci_find_htcap +function is used to locate the first instance of a HyperTransport capability +register set for the device +.Fa dev . +The capability to locate is specified by type via +.Fa capability . +Constant macros of the form +.Dv PCIM_HTCAP_xxx +for standard HyperTransport capability types are defined in +.In dev/pci/pcireg.h . +If the capability is found, then +.Fa *capreg +is set the offset in configuration space of the capability register set, +and +.Fn pci_find_htcap +returns zero. +If the capability is not found or the device is not a HyperTransport device, +.Fn pci_find_htcap +returns an error. +.Pp +The .Fn pci_get_vpd_ident function is used to fetch a device's Vital Product Data .Pq VPD From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 18:59:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BB0F106564A; Sun, 4 Mar 2012 18:59:39 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7725C8FC18; Sun, 4 Mar 2012 18:59:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24IxdCo048447; Sun, 4 Mar 2012 18:59:39 GMT (envelope-from zec@svn.freebsd.org) Received: (from zec@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24Ixd29048445; Sun, 4 Mar 2012 18:59:39 GMT (envelope-from zec@svn.freebsd.org) Message-Id: <201203041859.q24Ixd29048445@svn.freebsd.org> From: Marko Zec Date: Sun, 4 Mar 2012 18:59:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232517 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 18:59:39 -0000 Author: zec Date: Sun Mar 4 18:59:38 2012 New Revision: 232517 URL: http://svn.freebsd.org/changeset/base/232517 Log: Change SYSINIT priorities so that ip_mroute_modevent() is executed before vnet_mroute_init(), since vnet_mroute_init() depends on mfchashsize tunable to be set, and that is done in in ip_mroute_modevent(). Apparently I broke that ordering with r208744 almost 2 years ago... PR: kern/162201 Submitted by: Stevan Markovic (mcafee.com) MFC after: 3 days Modified: head/sys/netinet/ip_mroute.c Modified: head/sys/netinet/ip_mroute.c ============================================================================== --- head/sys/netinet/ip_mroute.c Sun Mar 4 18:55:33 2012 (r232516) +++ head/sys/netinet/ip_mroute.c Sun Mar 4 18:59:38 2012 (r232517) @@ -2822,7 +2822,7 @@ vnet_mroute_init(const void *unused __un callout_init(&V_bw_meter_ch, CALLOUT_MPSAFE); } -VNET_SYSINIT(vnet_mroute_init, SI_SUB_PSEUDO, SI_ORDER_MIDDLE, vnet_mroute_init, +VNET_SYSINIT(vnet_mroute_init, SI_SUB_PSEUDO, SI_ORDER_ANY, vnet_mroute_init, NULL); static void @@ -2945,4 +2945,4 @@ static moduledata_t ip_mroutemod = { 0 }; -DECLARE_MODULE(ip_mroute, ip_mroutemod, SI_SUB_PSEUDO, SI_ORDER_ANY); +DECLARE_MODULE(ip_mroute, ip_mroutemod, SI_SUB_PSEUDO, SI_ORDER_MIDDLE); From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 19:03:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 144381065670; Sun, 4 Mar 2012 19:03:32 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id DC5228FC08; Sun, 4 Mar 2012 19:03:31 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 92DE346B39; Sun, 4 Mar 2012 14:03:31 -0500 (EST) Received: from kavik.baldwin.cx (c-68-36-150-83.hsd1.nj.comcast.net [68.36.150.83]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 0DCD6B969; Sun, 4 Mar 2012 14:03:31 -0500 (EST) From: John Baldwin To: Eitan Adler Date: Sun, 4 Mar 2012 13:52:50 -0500 User-Agent: KMail/1.13.7 (FreeBSD/9.0-BETA2; KDE/4.6.5; i386; ; ) References: <201203041522.q24FM4sB040519@svn.freebsd.org> In-Reply-To: <201203041522.q24FM4sB040519@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201203041352.50593.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Sun, 04 Mar 2012 14:03:31 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232496 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 19:03:32 -0000 On Sunday, March 04, 2012 10:22:04 AM Eitan Adler wrote: > Author: eadler > Date: Sun Mar 4 15:22:03 2012 > New Revision: 232496 > URL: http://svn.freebsd.org/changeset/base/232496 > > Log: > PR: docs/158813 > Submitted by: Ben Kaduk > Approved by: bcr > MFC after: 1 week Can you do a forced commit to add a commit log of the actual change please? -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 19:22:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9FF09106566B; Sun, 4 Mar 2012 19:22:53 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 892A38FC17; Sun, 4 Mar 2012 19:22:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24JMrMQ049230; Sun, 4 Mar 2012 19:22:53 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24JMria049221; Sun, 4 Mar 2012 19:22:53 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201203041922.q24JMria049221@svn.freebsd.org> From: Rafal Jaworowski Date: Sun, 4 Mar 2012 19:22:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232518 - in head/sys: boot/fdt/dts dev/fdt dev/mge dev/tsec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 19:22:53 -0000 Author: raj Date: Sun Mar 4 19:22:52 2012 New Revision: 232518 URL: http://svn.freebsd.org/changeset/base/232518 Log: Respect phy-handle property in Ethernet nodes of the device tree. This lets specify whereabouts of the parent PHY for a given MAC node (and get rid of ugly kludges in mge(4) and tsec(4)). Obtained from: Semihalf MFC after: 1 week Modified: head/sys/boot/fdt/dts/db78100.dts head/sys/dev/fdt/fdt_common.c head/sys/dev/fdt/fdt_common.h head/sys/dev/mge/if_mge.c head/sys/dev/mge/if_mgevar.h head/sys/dev/tsec/if_tsec.c head/sys/dev/tsec/if_tsec.h head/sys/dev/tsec/if_tsec_fdt.c Modified: head/sys/boot/fdt/dts/db78100.dts ============================================================================== --- head/sys/boot/fdt/dts/db78100.dts Sun Mar 4 18:59:38 2012 (r232517) +++ head/sys/boot/fdt/dts/db78100.dts Sun Mar 4 19:22:52 2012 (r232518) @@ -221,6 +221,9 @@ phy0: ethernet-phy@0 { reg = <0x8>; }; + phy1: ethernet-phy@1 { + reg = <0x9>; + }; }; }; @@ -234,17 +237,7 @@ local-mac-address = [ 00 00 00 00 00 00 ]; interrupts = <45 46 47 44 70>; interrupt-parent = <&PIC>; - phy-handle = <&phy0>; - - mdio@0 { - #address-cells = <1>; - #size-cells = <0>; - compatible = "mrvl,mdio"; - - phy0: ethernet-phy@0 { - reg = <0x9>; - }; - }; + phy-handle = <&phy1>; }; serial0: serial@12000 { Modified: head/sys/dev/fdt/fdt_common.c ============================================================================== --- head/sys/dev/fdt/fdt_common.c Sun Mar 4 18:59:38 2012 (r232517) +++ head/sys/dev/fdt/fdt_common.c Sun Mar 4 19:22:52 2012 (r232518) @@ -542,11 +542,13 @@ out: } int -fdt_get_phyaddr(phandle_t node, int *phy_addr) +fdt_get_phyaddr(phandle_t node, device_t dev, int *phy_addr, void **phy_sc) { phandle_t phy_node; ihandle_t phy_ihandle; pcell_t phy_handle, phy_reg; + uint32_t i; + device_t parent, child; if (OF_getprop(node, "phy-handle", (void *)&phy_handle, sizeof(phy_handle)) <= 0) @@ -561,6 +563,47 @@ fdt_get_phyaddr(phandle_t node, int *phy return (ENXIO); *phy_addr = fdt32_to_cpu(phy_reg); + + /* + * Search for softc used to communicate with phy. + */ + + /* + * Step 1: Search for ancestor of the phy-node with a "phy-handle" + * property set. + */ + phy_node = OF_parent(phy_node); + while (phy_node != 0) { + if (OF_getprop(phy_node, "phy-handle", (void *)&phy_handle, + sizeof(phy_handle)) > 0) + break; + phy_node = OF_parent(phy_node); + } + if (phy_node == 0) + return (ENXIO); + + /* + * Step 2: For each device with the same parent and name as ours + * compare its node with the one found in step 1, ancestor of phy + * node (stored in phy_node). + */ + parent = device_get_parent(dev); + i = 0; + child = device_find_child(parent, device_get_name(dev), i); + while (child != NULL) { + if (ofw_bus_get_node(child) == phy_node) + break; + i++; + child = device_find_child(parent, device_get_name(dev), i); + } + if (child == NULL) + return (ENXIO); + + /* + * Use softc of the device found. + */ + *phy_sc = (void *)device_get_softc(child); + return (0); } Modified: head/sys/dev/fdt/fdt_common.h ============================================================================== --- head/sys/dev/fdt/fdt_common.h Sun Mar 4 18:59:38 2012 (r232517) +++ head/sys/dev/fdt/fdt_common.h Sun Mar 4 19:22:52 2012 (r232518) @@ -89,7 +89,7 @@ int fdt_data_to_res(pcell_t *, int, int, int fdt_data_verify(void *, int); phandle_t fdt_find_compatible(phandle_t, const char *, int); int fdt_get_mem_regions(struct mem_region *, int *, uint32_t *); -int fdt_get_phyaddr(phandle_t node, int *); +int fdt_get_phyaddr(phandle_t, device_t, int *, void **); int fdt_immr_addr(vm_offset_t); int fdt_regsize(phandle_t, u_long *, u_long *); int fdt_intr_decode(phandle_t, pcell_t *, int *, int *, int *); Modified: head/sys/dev/mge/if_mge.c ============================================================================== --- head/sys/dev/mge/if_mge.c Sun Mar 4 18:59:38 2012 (r232517) +++ head/sys/dev/mge/if_mge.c Sun Mar 4 19:22:52 2012 (r232518) @@ -79,9 +79,6 @@ __FBSDID("$FreeBSD$"); #include "miibus_if.h" -/* PHY registers are in the address space of the first mge unit */ -static struct mge_softc *sc_mge0 = NULL; - static int mge_probe(device_t dev); static int mge_attach(device_t dev); static int mge_detach(device_t dev); @@ -635,14 +632,11 @@ mge_attach(device_t dev) sc->dev = dev; sc->node = ofw_bus_get_node(dev); - if (device_get_unit(dev) == 0) - sc_mge0 = sc; - /* Set chip version-dependent parameters */ mge_ver_params(sc); - /* Get phy address from fdt */ - if (fdt_get_phyaddr(sc->node, &phy) != 0) + /* Get phy address and used softc from fdt */ + if (fdt_get_phyaddr(sc->node, sc->dev, &phy, (void **)&sc->phy_sc) != 0) return (ENXIO); /* Initialize mutexes */ @@ -1294,17 +1288,18 @@ mge_miibus_readreg(device_t dev, int phy sc = device_get_softc(dev); - MGE_WRITE(sc_mge0, MGE_REG_SMI, 0x1fffffff & + MGE_WRITE(sc->phy_sc, MGE_REG_SMI, 0x1fffffff & (MGE_SMI_READ | (reg << 21) | (phy << 16))); retries = MGE_SMI_READ_RETRIES; - while (--retries && !(MGE_READ(sc_mge0, MGE_REG_SMI) & MGE_SMI_READVALID)) + while (--retries && + !(MGE_READ(sc->phy_sc, MGE_REG_SMI) & MGE_SMI_READVALID)) DELAY(MGE_SMI_READ_DELAY); if (retries == 0) device_printf(dev, "Timeout while reading from PHY\n"); - return (MGE_READ(sc_mge0, MGE_REG_SMI) & 0xffff); + return (MGE_READ(sc->phy_sc, MGE_REG_SMI) & 0xffff); } static int @@ -1315,11 +1310,11 @@ mge_miibus_writereg(device_t dev, int ph sc = device_get_softc(dev); - MGE_WRITE(sc_mge0, MGE_REG_SMI, 0x1fffffff & + MGE_WRITE(sc->phy_sc, MGE_REG_SMI, 0x1fffffff & (MGE_SMI_WRITE | (reg << 21) | (phy << 16) | (value & 0xffff))); retries = MGE_SMI_WRITE_RETRIES; - while (--retries && MGE_READ(sc_mge0, MGE_REG_SMI) & MGE_SMI_BUSY) + while (--retries && MGE_READ(sc->phy_sc, MGE_REG_SMI) & MGE_SMI_BUSY) DELAY(MGE_SMI_WRITE_DELAY); if (retries == 0) Modified: head/sys/dev/mge/if_mgevar.h ============================================================================== --- head/sys/dev/mge/if_mgevar.h Sun Mar 4 18:59:38 2012 (r232517) +++ head/sys/dev/mge/if_mgevar.h Sun Mar 4 19:22:52 2012 (r232518) @@ -103,6 +103,8 @@ struct mge_softc { uint32_t mge_tx_tok_cnt; uint16_t mge_mtu; int mge_ver; + + struct mge_softc *phy_sc; }; Modified: head/sys/dev/tsec/if_tsec.c ============================================================================== --- head/sys/dev/tsec/if_tsec.c Sun Mar 4 18:59:38 2012 (r232517) +++ head/sys/dev/tsec/if_tsec.c Sun Mar 4 19:22:52 2012 (r232518) @@ -106,8 +106,6 @@ static void tsec_offload_process_frame(s static void tsec_setup_multicast(struct tsec_softc *sc); static int tsec_set_mtu(struct tsec_softc *sc, unsigned int mtu); -struct tsec_softc *tsec0_sc = NULL; /* XXX ugly hack! */ - devclass_t tsec_devclass; DRIVER_MODULE(miibus, tsec, miibus_driver, miibus_devclass, 0, 0); MODULE_DEPEND(tsec, ether, 1, 1, 1); @@ -406,14 +404,14 @@ tsec_init_locked(struct tsec_softc *sc) TSEC_WRITE(sc, TSEC_REG_TBIPA, 5); /* Step 6: Reset the management interface */ - TSEC_WRITE(tsec0_sc, TSEC_REG_MIIMCFG, TSEC_MIIMCFG_RESETMGMT); + TSEC_WRITE(sc->phy_sc, TSEC_REG_MIIMCFG, TSEC_MIIMCFG_RESETMGMT); /* Step 7: Setup the MII Mgmt clock speed */ - TSEC_WRITE(tsec0_sc, TSEC_REG_MIIMCFG, TSEC_MIIMCFG_CLKDIV28); + TSEC_WRITE(sc->phy_sc, TSEC_REG_MIIMCFG, TSEC_MIIMCFG_CLKDIV28); /* Step 8: Read MII Mgmt indicator register and check for Busy = 0 */ timeout = TSEC_READ_RETRY; - while (--timeout && (TSEC_READ(tsec0_sc, TSEC_REG_MIIMIND) & + while (--timeout && (TSEC_READ(sc->phy_sc, TSEC_REG_MIIMIND) & TSEC_MIIMIND_BUSY)) DELAY(TSEC_READ_DELAY); if (timeout == 0) { @@ -1561,21 +1559,21 @@ tsec_miibus_readreg(device_t dev, int ph struct tsec_softc *sc; uint32_t timeout; - sc = tsec0_sc; + sc = device_get_softc(dev); - TSEC_WRITE(sc, TSEC_REG_MIIMADD, (phy << 8) | reg); - TSEC_WRITE(sc, TSEC_REG_MIIMCOM, 0); - TSEC_WRITE(sc, TSEC_REG_MIIMCOM, TSEC_MIIMCOM_READCYCLE); + TSEC_WRITE(sc->phy_sc, TSEC_REG_MIIMADD, (phy << 8) | reg); + TSEC_WRITE(sc->phy_sc, TSEC_REG_MIIMCOM, 0); + TSEC_WRITE(sc->phy_sc, TSEC_REG_MIIMCOM, TSEC_MIIMCOM_READCYCLE); timeout = TSEC_READ_RETRY; - while (--timeout && TSEC_READ(sc, TSEC_REG_MIIMIND) & + while (--timeout && TSEC_READ(sc->phy_sc, TSEC_REG_MIIMIND) & (TSEC_MIIMIND_NOTVALID | TSEC_MIIMIND_BUSY)) DELAY(TSEC_READ_DELAY); if (timeout == 0) device_printf(dev, "Timeout while reading from PHY!\n"); - return (TSEC_READ(sc, TSEC_REG_MIIMSTAT)); + return (TSEC_READ(sc->phy_sc, TSEC_REG_MIIMSTAT)); } int @@ -1584,13 +1582,13 @@ tsec_miibus_writereg(device_t dev, int p struct tsec_softc *sc; uint32_t timeout; - sc = tsec0_sc; + sc = device_get_softc(dev); - TSEC_WRITE(sc, TSEC_REG_MIIMADD, (phy << 8) | reg); - TSEC_WRITE(sc, TSEC_REG_MIIMCON, value); + TSEC_WRITE(sc->phy_sc, TSEC_REG_MIIMADD, (phy << 8) | reg); + TSEC_WRITE(sc->phy_sc, TSEC_REG_MIIMCON, value); timeout = TSEC_READ_RETRY; - while (--timeout && (TSEC_READ(sc, TSEC_REG_MIIMIND) & + while (--timeout && (TSEC_READ(sc->phy_sc, TSEC_REG_MIIMIND) & TSEC_MIIMIND_BUSY)) DELAY(TSEC_READ_DELAY); Modified: head/sys/dev/tsec/if_tsec.h ============================================================================== --- head/sys/dev/tsec/if_tsec.h Sun Mar 4 18:59:38 2012 (r232517) +++ head/sys/dev/tsec/if_tsec.h Sun Mar 4 19:22:52 2012 (r232518) @@ -133,6 +133,7 @@ struct tsec_softc { struct mbuf *frame; int phyaddr; + struct tsec_softc *phy_sc; }; /* interface to get/put generic objects */ Modified: head/sys/dev/tsec/if_tsec_fdt.c ============================================================================== --- head/sys/dev/tsec/if_tsec_fdt.c Sun Mar 4 18:59:38 2012 (r232517) +++ head/sys/dev/tsec/if_tsec_fdt.c Sun Mar 4 19:22:52 2012 (r232518) @@ -68,8 +68,6 @@ __FBSDID("$FreeBSD$"); #define TSEC_RID_RXIRQ 1 #define TSEC_RID_ERRIRQ 2 -extern struct tsec_softc *tsec0_sc; - static int tsec_fdt_probe(device_t dev); static int tsec_fdt_attach(device_t dev); static int tsec_fdt_detach(device_t dev); @@ -156,12 +154,9 @@ tsec_fdt_attach(device_t dev) sc->dev = dev; sc->node = ofw_bus_get_node(dev); - /* XXX add comment on weird FSL's MII registers access design */ - if (device_get_unit(dev) == 0) - tsec0_sc = sc; - /* Get phy address from fdt */ - if (fdt_get_phyaddr(sc->node, &sc->phyaddr) != 0) + if (fdt_get_phyaddr(sc->node, sc->dev, &sc->phyaddr, + (void **)&sc->phy_sc) != 0) return (ENXIO); /* Init timer */ From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 19:33:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DACB01065675 for ; Sun, 4 Mar 2012 19:33:03 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 2523A8FC15 for ; Sun, 4 Mar 2012 19:33:02 +0000 (UTC) Received: by werl4 with SMTP id l4so2593400wer.13 for ; Sun, 04 Mar 2012 11:33:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=g2oBvWzeHmSzTb5QjZKL2kzOFrbUi1KPJ+raluEiPqk=; b=nKKmgwUQ7l9pY3mjqNlflZchlYLyOgba7ryWM0buvGiXqIzrUQmyR3dFPvd93KFM2F l1+bPNbd38+DfVAKf8XmMkzfd+iV0tNhTpwjBR8s3/ukwWeq9riePKlCkLzt2xovqKbu dhCp1Sx+NOr58opBULvD+msWZwcpPrVCLiTAw= Received: by 10.180.76.175 with SMTP id l15mr8449841wiw.2.1330889581999; Sun, 04 Mar 2012 11:33:01 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.223.15.90 with HTTP; Sun, 4 Mar 2012 11:32:31 -0800 (PST) In-Reply-To: <201203041352.50593.jhb@freebsd.org> References: <201203041522.q24FM4sB040519@svn.freebsd.org> <201203041352.50593.jhb@freebsd.org> From: Eitan Adler Date: Sun, 4 Mar 2012 14:32:31 -0500 X-Google-Sender-Auth: s0hgOzwMRxzAiT-MRkZZ3R0YQ9M Message-ID: To: John Baldwin Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQmbZIYjCF6MDUeTZM93KLcWoAGVeM/cZ3Z6oSUoXAmA5PQK/pmvLIFOixM9gtUj9msmy5l4 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232496 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 19:33:03 -0000 On Sun, Mar 4, 2012 at 1:52 PM, John Baldwin wrote: > Can you do a forced commit to add a commit log of the actual change please? I don't know of any real way to do forced commits so does the following look acceptable? %cat log Forced commit because I forgot my log message in r232496: Fix a variety of English language grammar issues and style nits %svn diff Index: share/man/man4/jme.4 =================================================================== --- share/man/man4/jme.4 (revision 231896) +++ share/man/man4/jme.4 (working copy) Property changes on: share/man/man4/jme.4 ___________________________________________________________________ Added: forcecommit ## -0,0 +1 ## +1 \ No newline at end of property -- Eitan Adler Source & Ports committer X11, Bugbusting teams From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 20:02:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0493D106564A; Sun, 4 Mar 2012 20:02:21 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E40DA8FC16; Sun, 4 Mar 2012 20:02:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24K2KJF050462; Sun, 4 Mar 2012 20:02:20 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24K2KWF050460; Sun, 4 Mar 2012 20:02:20 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201203042002.q24K2KWF050460@svn.freebsd.org> From: Tijl Coosemans Date: Sun, 4 Mar 2012 20:02:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232519 - head/sys/x86/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 20:02:21 -0000 Author: tijl Date: Sun Mar 4 20:02:20 2012 New Revision: 232519 URL: http://svn.freebsd.org/changeset/base/232519 Log: Do not use INT64_C and UINT64_C to define 64 bit integer limits. They aren't defined for C++ code unless __STDC_CONSTANT_MACROS is defined. Reported by: jhb Modified: head/sys/x86/include/_stdint.h Modified: head/sys/x86/include/_stdint.h ============================================================================== --- head/sys/x86/include/_stdint.h Sun Mar 4 19:22:52 2012 (r232518) +++ head/sys/x86/include/_stdint.h Sun Mar 4 20:02:20 2012 (r232519) @@ -69,23 +69,27 @@ * ISO/IEC 9899:1999 * 7.18.2.1 Limits of exact-width integer types */ -/* Minimum values of exact-width signed integer types. */ #define INT8_MIN (-0x7f-1) #define INT16_MIN (-0x7fff-1) #define INT32_MIN (-0x7fffffff-1) -#define INT64_MIN (-INT64_C(0x7fffffffffffffff)-1) -/* Maximum values of exact-width signed integer types. */ #define INT8_MAX 0x7f #define INT16_MAX 0x7fff #define INT32_MAX 0x7fffffff -#define INT64_MAX INT64_C(0x7fffffffffffffff) -/* Maximum values of exact-width unsigned integer types. */ #define UINT8_MAX 0xff #define UINT16_MAX 0xffff #define UINT32_MAX 0xffffffffU -#define UINT64_MAX UINT64_C(0xffffffffffffffff) + +#ifdef _LP64 +#define INT64_MIN (-0x7fffffffffffffff-1) +#define INT64_MAX 0x7fffffffffffffff +#define UINT64_MAX 0xffffffffffffffff +#else +#define INT64_MIN (-0x7fffffffffffffffLL-1) +#define INT64_MAX 0x7fffffffffffffffLL +#define UINT64_MAX 0xffffffffffffffffULL +#endif /* * ISO/IEC 9899:1999 From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 20:05:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 618A2106567F; Sun, 4 Mar 2012 20:05:27 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay005.isp.belgacom.be (mailrelay005.isp.belgacom.be [195.238.6.171]) by mx1.freebsd.org (Postfix) with ESMTP id 522338FC14; Sun, 4 Mar 2012 20:05:25 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EAOvJU09bsWcW/2dsb2JhbABDhTSvDYEIgX0BAQUjMyMQCw4GBCoCAjkeBogeB6ZukRqPR4EWBKVQgmQ Received: from 22.103-177-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.177.103.22]) by relay.skynet.be with ESMTP; 04 Mar 2012 21:05:18 +0100 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.5/8.14.5) with ESMTP id q24K5ISa008170; Sun, 4 Mar 2012 21:05:18 +0100 (CET) (envelope-from tijl@freebsd.org) From: Tijl Coosemans To: John Baldwin Date: Sun, 4 Mar 2012 21:05:09 +0100 User-Agent: KMail/1.13.7 (FreeBSD/10.0-CURRENT; KDE/4.7.3; i386; ; ) References: <201202281838.q1SIcYhE082928@svn.freebsd.org> <201203041351.22847.jhb@freebsd.org> In-Reply-To: <201203041351.22847.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1698307.50t2qeN2gg"; protocol="application/pgp-signature"; micalg=pgp-sha256 Content-Transfer-Encoding: 7bit Message-Id: <201203042105.15916.tijl@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232264 - in head/sys: amd64/include i386/include pc98/include x86/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 20:05:27 -0000 --nextPart1698307.50t2qeN2gg Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Sunday 04 March 2012 19:51:22 John Baldwin wrote: > On Tuesday, February 28, 2012 01:38:34 PM Tijl Coosemans wrote: >> Author: tijl >> Date: Tue Feb 28 18:38:33 2012 >> New Revision: 232264 >> URL: http://svn.freebsd.org/changeset/base/232264 >>=20 >> Log: >> Copy amd64 _stdint.h to x86 and merge with i386 _stdint.h. Replace >> amd64/i386/pc98 _stdint.h with stubs. >>=20 >> Added: >> head/sys/x86/include/_stdint.h >> - copied, changed from r232259, head/sys/amd64/include/_stdint.h >=20 > This broke C++ software (such as the audio/flac port), that #includes > with __STDC_LIMIT_MACROS defined but not __STDC_CONSTANT_MACRO= S=20 > defined. The problem is that you have changed UINT64_MAX and INT64_MAX t= o use=20 > UINT64_C() and INT64_C(), so in this case UINT64_MAX now expands to=20 > UINT64_C(...) which can't be resolved to a constant. >=20 > You should be able to reproduce this via the following: >=20 > % cat > bar.cc > #define __STDC_LIMIT_MACROS > #include > % c++ -c bar.cc >=20 > (The test to see if __WORDSIZE should be defined at the end of stdint.h t= rips=20 > over this bug.) >=20 > While you could do something like add __INT64_C() and __UINT64_C() macros= that=20 > are always defined and use them for INT64_MAX and UINT64_MAX, I think the= =20 > simplest fix is probably to just use #ifdef _LP64 tests to define INT64_M= AX=20 > and UINT64_MAX as pure constants as those are the only two macros effecte= d. >=20 > (I've just hardcoded those two constants on my little netbook so I can ke= ep=20 > building ports and that worked fine for audio/flac). =46ixed in r232519. --nextPart1698307.50t2qeN2gg Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iF4EABEIAAYFAk9TyvsACgkQfoCS2CCgtisF9wD/SfvlMj3E2vfcD/7Mb6iUlJ1a fWY+7zWyjv18kcCuUlYA/3wQkD1hjPQW02PTS1+7GXEDLMoEFPLSIX9ltvGvG3Re =753o -----END PGP SIGNATURE----- --nextPart1698307.50t2qeN2gg-- From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 20:24:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4CA61065673; Sun, 4 Mar 2012 20:24:28 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CEA608FC0A; Sun, 4 Mar 2012 20:24:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24KOSLx051198; Sun, 4 Mar 2012 20:24:28 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24KOSWK051192; Sun, 4 Mar 2012 20:24:28 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201203042024.q24KOSWK051192@svn.freebsd.org> From: Tijl Coosemans Date: Sun, 4 Mar 2012 20:24:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232520 - in head/sys: amd64/amd64 amd64/include i386/include pc98/include x86/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 20:24:29 -0000 Author: tijl Date: Sun Mar 4 20:24:28 2012 New Revision: 232520 URL: http://svn.freebsd.org/changeset/base/232520 Log: Copy amd64 ptrace.h to x86 and merge with i386 ptrace.h. Replace amd64/i386/pc98 ptrace.h with stubs. For amd64 PT_GETXSTATE and PT_SETXSTATE have been redefined to match the i386 values. The old values are still supported but should no longer be used. Reviewed by: kib Added: head/sys/x86/include/ptrace.h - copied, changed from r232518, head/sys/amd64/include/ptrace.h Modified: head/sys/amd64/amd64/ptrace_machdep.c head/sys/amd64/include/ptrace.h head/sys/i386/include/ptrace.h head/sys/pc98/include/ptrace.h Modified: head/sys/amd64/amd64/ptrace_machdep.c ============================================================================== --- head/sys/amd64/amd64/ptrace_machdep.c Sun Mar 4 20:02:20 2012 (r232519) +++ head/sys/amd64/amd64/ptrace_machdep.c Sun Mar 4 20:24:28 2012 (r232520) @@ -126,6 +126,12 @@ cpu_ptrace(struct thread *td, int req, v return (cpu32_ptrace(td, req, addr, data)); #endif + /* Support old values of PT_GETXSTATE and PT_SETXSTATE. */ + if (req == PT_FIRSTMACH + 0) + req = PT_GETXSTATE; + if (req == PT_FIRSTMACH + 1) + req = PT_SETXSTATE; + switch (req) { case PT_GETXSTATE: case PT_SETXSTATE: Modified: head/sys/amd64/include/ptrace.h ============================================================================== --- head/sys/amd64/include/ptrace.h Sun Mar 4 20:02:20 2012 (r232519) +++ head/sys/amd64/include/ptrace.h Sun Mar 4 20:24:28 2012 (r232520) @@ -1,41 +1,6 @@ /*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)ptrace.h 8.1 (Berkeley) 6/11/93 - * $FreeBSD$ + * This file is in the public domain. */ +/* $FreeBSD$ */ -#ifndef _MACHINE_PTRACE_H_ -#define _MACHINE_PTRACE_H_ - -#define __HAVE_PTRACE_MACHDEP - -#define PT_GETXSTATE (PT_FIRSTMACH + 0) -#define PT_SETXSTATE (PT_FIRSTMACH + 1) - -#endif +#include Modified: head/sys/i386/include/ptrace.h ============================================================================== --- head/sys/i386/include/ptrace.h Sun Mar 4 20:02:20 2012 (r232519) +++ head/sys/i386/include/ptrace.h Sun Mar 4 20:24:28 2012 (r232520) @@ -1,43 +1,6 @@ /*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)ptrace.h 8.1 (Berkeley) 6/11/93 - * $FreeBSD$ + * This file is in the public domain. */ +/* $FreeBSD$ */ -#ifndef _MACHINE_PTRACE_H_ -#define _MACHINE_PTRACE_H_ - -#define __HAVE_PTRACE_MACHDEP - -#define PT_GETXMMREGS (PT_FIRSTMACH + 0) -#define PT_SETXMMREGS (PT_FIRSTMACH + 1) -#define PT_GETXSTATE (PT_FIRSTMACH + 2) -#define PT_SETXSTATE (PT_FIRSTMACH + 3) - -#endif +#include Modified: head/sys/pc98/include/ptrace.h ============================================================================== --- head/sys/pc98/include/ptrace.h Sun Mar 4 20:02:20 2012 (r232519) +++ head/sys/pc98/include/ptrace.h Sun Mar 4 20:24:28 2012 (r232520) @@ -3,4 +3,4 @@ */ /* $FreeBSD$ */ -#include +#include Copied and modified: head/sys/x86/include/ptrace.h (from r232518, head/sys/amd64/include/ptrace.h) ============================================================================== --- head/sys/amd64/include/ptrace.h Sun Mar 4 19:22:52 2012 (r232518, copy source) +++ head/sys/x86/include/ptrace.h Sun Mar 4 20:24:28 2012 (r232520) @@ -35,7 +35,14 @@ #define __HAVE_PTRACE_MACHDEP -#define PT_GETXSTATE (PT_FIRSTMACH + 0) -#define PT_SETXSTATE (PT_FIRSTMACH + 1) +/* + * On amd64 (PT_FIRSTMACH + 0) and (PT_FIRSTMACH + 1) are old values for + * PT_GETXSTATE and PT_SETXSTATE. They should not be (re)used. + */ + +#define PT_GETXMMREGS (PT_FIRSTMACH + 0) /* i386 only */ +#define PT_SETXMMREGS (PT_FIRSTMACH + 1) /* i386 only */ +#define PT_GETXSTATE (PT_FIRSTMACH + 2) +#define PT_SETXSTATE (PT_FIRSTMACH + 3) #endif From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 20:32:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57C181065670; Sun, 4 Mar 2012 20:32:38 +0000 (UTC) (envelope-from minimarmot@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8041B8FC0C; Sun, 4 Mar 2012 20:32:37 +0000 (UTC) Received: by vcmm1 with SMTP id m1so1900610vcm.13 for ; Sun, 04 Mar 2012 12:32:37 -0800 (PST) Received-SPF: pass (google.com: domain of minimarmot@gmail.com designates 10.52.96.70 as permitted sender) client-ip=10.52.96.70; Authentication-Results: mr.google.com; spf=pass (google.com: domain of minimarmot@gmail.com designates 10.52.96.70 as permitted sender) smtp.mail=minimarmot@gmail.com; dkim=pass header.i=minimarmot@gmail.com Received: from mr.google.com ([10.52.96.70]) by 10.52.96.70 with SMTP id dq6mr30945973vdb.124.1330893157085 (num_hops = 1); Sun, 04 Mar 2012 12:32:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=JUmB3rf5StbvMFdL/d58ofTpDrZCxGmzXPTAFQkhNYE=; b=Ndek70lNeznvQuwwPs36cadOaibYtIC8siYnnJ9WW8+b/LgFXNZzSE56B7z4bx8TpS 5yKULzjpcr82Z9RsauTOPTBKsUdfuhPZIM9Uo3ZN0EAT2T+B0wrHBkKm4H4HOgdVDSan 1F+FuMww09RvRLxqUDzrZXc6hFkujt3bkZThuovEMQeEuI+508GwG91tYHNIQ5fEWykX iMuZfrJeNhiptMFJT+EpYbqEdoDfmcdZRkRkcp/ixafXjGNK6wcNtYl9UZDnRhorge+K LvWEJRnx1NFVEjbPW9a5rQEN1619xqXHGgQ4qB0VdpmlzXNXq2ikB9gRG9/DQXITSGIZ 3Rcw== MIME-Version: 1.0 Received: by 10.52.96.70 with SMTP id dq6mr26532180vdb.124.1330893157004; Sun, 04 Mar 2012 12:32:37 -0800 (PST) Received: by 10.52.0.14 with HTTP; Sun, 4 Mar 2012 12:32:36 -0800 (PST) In-Reply-To: References: <201203041522.q24FM4sB040519@svn.freebsd.org> <201203041352.50593.jhb@freebsd.org> Date: Sun, 4 Mar 2012 15:32:36 -0500 Message-ID: From: Ben Kaduk To: Eitan Adler Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232496 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 20:32:38 -0000 On Sun, Mar 4, 2012 at 2:32 PM, Eitan Adler wrote: > On Sun, Mar 4, 2012 at 1:52 PM, John Baldwin wrote: >> Can you do a forced commit to add a commit log of the actual change plea= se? > > I don't know of any real way to do forced commits so does the > following look acceptable? You should be able to start that commit with an interactive editor for the commit message, background the editor, revert the actual change, and then foreground the editor and finish the commit. I believe that's the current best practice for doing forced commits. -Ben > > %cat log > Forced commit because I forgot my log message in r232496: > > Fix a variety of English language grammar issues and style nits > > %svn diff > Index: share/man/man4/jme.4 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- share/man/man4/jme.4 =A0 =A0 =A0 =A0(revision 231896) > +++ share/man/man4/jme.4 =A0 =A0 =A0 =A0(working copy) > > Property changes on: share/man/man4/jme.4 > ___________________________________________________________________ > Added: forcecommit > ## -0,0 +1 ## > +1 > \ No newline at end of property > > > > -- > Eitan Adler > Source & Ports committer > X11, Bugbusting teams > _______________________________________________ > 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-unsubscribe@freebsd.org" From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 21:31:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 242E1106564A; Sun, 4 Mar 2012 21:31:14 +0000 (UTC) (envelope-from rmh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0598E8FC13; Sun, 4 Mar 2012 21:31:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24LVDjv053232; Sun, 4 Mar 2012 21:31:13 GMT (envelope-from rmh@svn.freebsd.org) Received: (from rmh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24LVDfO053228; Sun, 4 Mar 2012 21:31:13 GMT (envelope-from rmh@svn.freebsd.org) Message-Id: <201203042131.q24LVDfO053228@svn.freebsd.org> From: Robert Millan Date: Sun, 4 Mar 2012 21:31:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232521 - in head/sys: amd64/conf i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 21:31:14 -0000 Author: rmh Date: Sun Mar 4 21:31:13 2012 New Revision: 232521 URL: http://svn.freebsd.org/changeset/base/232521 Log: Exclude USB drivers (except umass and ukbd) from main kernel image on i386 and amd64. Reviewed by: hselasky, arch, usb Approved by: kib (mentor) Modified: head/sys/amd64/conf/GENERIC head/sys/i386/conf/GENERIC head/sys/i386/conf/XBOX Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Sun Mar 4 20:24:28 2012 (r232520) +++ head/sys/amd64/conf/GENERIC Sun Mar 4 21:31:13 2012 (r232521) @@ -303,39 +303,8 @@ device ohci # OHCI PCI->USB interface device ehci # EHCI PCI->USB interface (USB 2.0) device xhci # XHCI PCI->USB interface (USB 3.0) device usb # USB Bus (required) -#device udbp # USB Double Bulk Pipe devices (needs netgraph) -device uhid # "Human Interface Devices" device ukbd # Keyboard -device ulpt # Printer device umass # Disks/Mass storage - Requires scbus and da -device ums # Mouse -device urio # Diamond Rio 500 MP3 player -# USB Serial devices -device u3g # USB-based 3G modems (Option, Huawei, Sierra) -device uark # Technologies ARK3116 based serial adapters -device ubsa # Belkin F5U103 and compatible serial adapters -device uftdi # For FTDI usb serial adapters -device uipaq # Some WinCE based devices -device uplcom # Prolific PL-2303 serial adapters -device uslcom # SI Labs CP2101/CP2102 serial adapters -device uvisor # Visor and Palm devices -device uvscom # USB serial support for DDI pocket's PHS -# USB Ethernet, requires miibus -device aue # ADMtek USB Ethernet -device axe # ASIX Electronics USB Ethernet -device cdce # Generic USB over Ethernet -device cue # CATC USB Ethernet -device kue # Kawasaki LSI USB Ethernet -device rue # RealTek RTL8150 USB Ethernet -device udav # Davicom DM9601E USB -# USB Wireless -device rum # Ralink Technology RT2501USB wireless NICs -device run # Ralink Technology RT2700/RT2800/RT3000 NICs. -device uath # Atheros AR5523 wireless NICs -device upgt # Conexant/Intersil PrismGT wireless NICs. -device ural # Ralink Technology RT2500USB wireless NICs -device urtw # Realtek RTL8187B/L wireless NICs -device zyd # ZyDAS zd1211/zd1211b wireless NICs # FireWire support device firewire # FireWire bus code @@ -351,7 +320,6 @@ device sound # Generic sound driver (r device snd_es137x # Ensoniq AudioPCI ES137x device snd_hda # Intel High Definition Audio device snd_ich # Intel, NVidia and other ICH AC'97 Audio -device snd_uaudio # USB Audio device snd_via8233 # VIA VT8233x Audio # MMC/SD Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Sun Mar 4 20:24:28 2012 (r232520) +++ head/sys/i386/conf/GENERIC Sun Mar 4 21:31:13 2012 (r232521) @@ -316,39 +316,8 @@ device ohci # OHCI PCI->USB interface device ehci # EHCI PCI->USB interface (USB 2.0) device xhci # XHCI PCI->USB interface (USB 3.0) device usb # USB Bus (required) -#device udbp # USB Double Bulk Pipe devices (needs netgraph) -device uhid # "Human Interface Devices" device ukbd # Keyboard -device ulpt # Printer device umass # Disks/Mass storage - Requires scbus and da -device ums # Mouse -device urio # Diamond Rio 500 MP3 player -# USB Serial devices -device u3g # USB-based 3G modems (Option, Huawei, Sierra) -device uark # Technologies ARK3116 based serial adapters -device ubsa # Belkin F5U103 and compatible serial adapters -device uftdi # For FTDI usb serial adapters -device uipaq # Some WinCE based devices -device uplcom # Prolific PL-2303 serial adapters -device uslcom # SI Labs CP2101/CP2102 serial adapters -device uvisor # Visor and Palm devices -device uvscom # USB serial support for DDI pocket's PHS -# USB Ethernet, requires miibus -device aue # ADMtek USB Ethernet -device axe # ASIX Electronics USB Ethernet -device cdce # Generic USB over Ethernet -device cue # CATC USB Ethernet -device kue # Kawasaki LSI USB Ethernet -device rue # RealTek RTL8150 USB Ethernet -device udav # Davicom DM9601E USB -# USB Wireless -device rum # Ralink Technology RT2501USB wireless NICs -device run # Ralink Technology RT2700/RT2800/RT3000 NICs. -device uath # Atheros AR5523 wireless NICs -device upgt # Conexant/Intersil PrismGT wireless NICs. -device ural # Ralink Technology RT2500USB wireless NICs -device urtw # Realtek RTL8187B/L wireless NICs -device zyd # ZyDAS zd1211/zd1211b wireless NICs # FireWire support device firewire # FireWire bus code @@ -364,7 +333,6 @@ device sound # Generic sound driver (r device snd_es137x # Ensoniq AudioPCI ES137x device snd_hda # Intel High Definition Audio device snd_ich # Intel, NVidia and other ICH AC'97 Audio -device snd_uaudio # USB Audio device snd_via8233 # VIA VT8233x Audio # MMC/SD Modified: head/sys/i386/conf/XBOX ============================================================================== --- head/sys/i386/conf/XBOX Sun Mar 4 20:24:28 2012 (r232520) +++ head/sys/i386/conf/XBOX Sun Mar 4 21:31:13 2012 (r232521) @@ -80,20 +80,10 @@ options USB_DEBUG # enable debug msgs #device uhci # UHCI PCI->USB interface device ohci # OHCI PCI->USB interface device usb # USB Bus (required) -device uhid # "Human Interface Devices" device ukbd # Keyboard -device ulpt # Printer device umass # Disks/Mass storage - Requires scbus and da -device ums # Mouse -device urio # Diamond Rio 500 MP3 player device miibus -device aue # ADMtek USB Ethernet -device axe # ASIX Electronics USB Ethernet -device cdce # Generic USB over Ethernet -device cue # CATC USB Ethernet -device kue # Kawasaki LSI USB Ethernet -device rue # RealTek RTL8150 USB Ethernet device sound device snd_ich # nForce audio From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 21:36:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 59FBC1065678; Sun, 4 Mar 2012 21:36:19 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 458998FC19; Sun, 4 Mar 2012 21:36:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24LaJ37053420; Sun, 4 Mar 2012 21:36:19 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24LaJ6l053418; Sun, 4 Mar 2012 21:36:19 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201203042136.q24LaJ6l053418@svn.freebsd.org> From: Dimitry Andric Date: Sun, 4 Mar 2012 21:36:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232522 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 21:36:19 -0000 Author: dim Date: Sun Mar 4 21:36:18 2012 New Revision: 232522 URL: http://svn.freebsd.org/changeset/base/232522 Log: Fix a thinko in r232322, where gcc (and its tools) are not built during the cross-tools stage, if CC=clang and WITH_CLANG_IS_CC is not set. This causes no 'cc' to be installed in the temporary cross-tools tree, making lint fall over later in the build, because it ignores ${CC} and attempts to run 'cc' anyway. To fix this, only skip building gcc during cross-tools, if WITHOUT_GCC is set, or if WITH_CLANG_IS_CC is set. Pointy hat to: dim MFC after: 2 weeks Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sun Mar 4 21:31:13 2012 (r232521) +++ head/Makefile.inc1 Sun Mar 4 21:36:18 2012 (r232522) @@ -1108,7 +1108,7 @@ _aicasm= sys/modules/aic7xxx/aicasm _share= share/syscons/scrnmaps .endif -.if ${MK_GCC} != "no" && (${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang") +.if ${MK_GCC} != "no" && ${MK_CLANG_IS_CC} == "no" _gcc_tools= gnu/usr.bin/cc/cc_tools .endif @@ -1175,7 +1175,7 @@ _clang= usr.bin/clang _clang_libs= lib/clang .endif -.if ${MK_GCC} != "no" && (${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang") +.if ${MK_GCC} != "no" && ${MK_CLANG_IS_CC} == "no" _cc= gnu/usr.bin/cc .endif From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 21:44:19 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6A59106564A; Sun, 4 Mar 2012 21:44:19 +0000 (UTC) (envelope-from ache@vniz.net) Received: from vniz.net (vniz.net [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id EBDF78FC19; Sun, 4 Mar 2012 21:44:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by vniz.net (8.14.5/8.14.5) with ESMTP id q24LiBAk076846; Mon, 5 Mar 2012 01:44:11 +0400 (MSK) (envelope-from ache@vniz.net) Received: (from ache@localhost) by localhost (8.14.5/8.14.5/Submit) id q24LiB2B076845; Mon, 5 Mar 2012 01:44:11 +0400 (MSK) (envelope-from ache) Date: Mon, 5 Mar 2012 01:44:11 +0400 From: Andrey Chernov To: Robert Millan Message-ID: <20120304214411.GA76767@vniz.net> Mail-Followup-To: Andrey Chernov , Robert Millan , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <201203042131.q24LVDfO053228@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201203042131.q24LVDfO053228@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG Subject: Re: svn commit: r232521 - in head/sys: amd64/conf i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 21:44:19 -0000 On Sun, Mar 04, 2012 at 09:31:13PM +0000, Robert Millan wrote: > Author: rmh > Date: Sun Mar 4 21:31:13 2012 > New Revision: 232521 > URL: http://svn.freebsd.org/changeset/base/232521 > > Log: > Exclude USB drivers (except umass and ukbd) from main kernel image on i386 > and amd64. IMHO, generic should support USB mouse too. -- http://ache.vniz.net/ From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 21:49:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EDDD106566C; Sun, 4 Mar 2012 21:49:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 60E4D8FC0A; Sun, 4 Mar 2012 21:49:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24LnV31053832; Sun, 4 Mar 2012 21:49:31 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24LnVB9053830; Sun, 4 Mar 2012 21:49:31 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203042149.q24LnVB9053830@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 4 Mar 2012 21:49:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232523 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 21:49:31 -0000 Author: kib Date: Sun Mar 4 21:49:30 2012 New Revision: 232523 URL: http://svn.freebsd.org/changeset/base/232523 Log: Free Robert. Discussed with: adrian Approved by: core (implicit) Modified: svnadmin/conf/mentors Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Sun Mar 4 21:36:18 2012 (r232522) +++ svnadmin/conf/mentors Sun Mar 4 21:49:30 2012 (r232523) @@ -34,7 +34,6 @@ pfg jhb randi cperciva ray adrian rdivacky rpaulo -rmh adrian Co-mentor: kib sbruno scottl snb dwmalone sson gnn From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 22:00:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8883A1065678; Sun, 4 Mar 2012 22:00:13 +0000 (UTC) (envelope-from andrey.kosachenko@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 41C3D8FC17; Sun, 4 Mar 2012 22:00:11 +0000 (UTC) Received: by bkcjc3 with SMTP id jc3so3603212bkc.13 for ; Sun, 04 Mar 2012 14:00:11 -0800 (PST) Received-SPF: pass (google.com: domain of andrey.kosachenko@gmail.com designates 10.205.122.144 as permitted sender) client-ip=10.205.122.144; Authentication-Results: mr.google.com; spf=pass (google.com: domain of andrey.kosachenko@gmail.com designates 10.205.122.144 as permitted sender) smtp.mail=andrey.kosachenko@gmail.com; dkim=pass header.i=andrey.kosachenko@gmail.com Received: from mr.google.com ([10.205.122.144]) by 10.205.122.144 with SMTP id gg16mr9737232bkc.12.1330898411354 (num_hops = 1); Sun, 04 Mar 2012 14:00:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=S7KX2/Lymizupu+MwQNpQolkT9bVpEM9L11WT0dDewg=; b=lJKpu+ifezTlZEDFOfdlOD45oy1iRdFqUA2EpJpMsQsXic6dSfB9d6/eT9L/hkgTbm rqJBm/X2dw4qBBXbrxiXTv8AsaoP8LFQk5WTmzvXw0Gfl5g9ZhIBA4api5Dm/RJBnXkW QiQi3/2IybDNNqelxVzUvuuRuxxwl0WeTD69zf6fY0i6FmHOfIRvaD7/6o5mleLJ8v9C 65vHEQntq/5VIRYrco4x5Zc531IMPlxGrMhUf/a+8ktLOPuFsXeLDbXN7US95n8E1YLT WMSl+am1JMibuUlSahGP1ZHrvq2zEyCqkhBOVDG0hKWUsbAKoUl12FiQKyTE7/R63wNS KtlQ== Received: by 10.205.122.144 with SMTP id gg16mr7739234bkc.12.1330896664811; Sun, 04 Mar 2012 13:31:04 -0800 (PST) Received: from beastie.intra ([46.149.81.168]) by mx.google.com with ESMTPS id t17sm21323812bke.6.2012.03.04.13.31.02 (version=SSLv3 cipher=OTHER); Sun, 04 Mar 2012 13:31:03 -0800 (PST) Message-ID: <4F53DF10.5080303@gmail.com> Date: Sun, 04 Mar 2012 23:30:56 +0200 From: Andrey Kosachenko User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20120115 Thunderbird/9.0 MIME-Version: 1.0 To: John Baldwin References: <201202281838.q1SIcYhE082928@svn.freebsd.org> <201203041351.22847.jhb@freebsd.org> In-Reply-To: <201203041351.22847.jhb@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Tijl Coosemans , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r232264 - in head/sys: amd64/include i386/include pc98/include x86/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 22:00:13 -0000 Hi, On 04.03.2012 20:51, John Baldwin wrote: > On Tuesday, February 28, 2012 01:38:34 PM Tijl Coosemans wrote: >> Author: tijl >> Date: Tue Feb 28 18:38:33 2012 >> New Revision: 232264 >> URL: http://svn.freebsd.org/changeset/base/232264 >> >> Log: >> Copy amd64 _stdint.h to x86 and merge with i386 _stdint.h. Replace >> amd64/i386/pc98 _stdint.h with stubs. >> >> Added: >> head/sys/x86/include/_stdint.h >> - copied, changed from r232259, head/sys/amd64/include/_stdint.h > > This broke C++ software (such as the audio/flac port), that #includes > with __STDC_LIMIT_MACROS defined but not __STDC_CONSTANT_MACROS > defined. The problem is that you have changed UINT64_MAX and INT64_MAX to use > UINT64_C() and INT64_C(), so in this case UINT64_MAX now expands to > UINT64_C(...) which can't be resolved to a constant. > > You should be able to reproduce this via the following: > > % cat> bar.cc > #define __STDC_LIMIT_MACROS > #include > % c++ -c bar.cc > > (The test to see if __WORDSIZE should be defined at the end of stdint.h trips > over this bug.) > > While you could do something like add __INT64_C() and __UINT64_C() macros that > are always defined and use them for INT64_MAX and UINT64_MAX, I think the > simplest fix is probably to just use #ifdef _LP64 tests to define INT64_MAX > and UINT64_MAX as pure constants as those are the only two macros effected. > > (I've just hardcoded those two constants on my little netbook so I can keep > building ports and that worked fine for audio/flac). As far as I can see reported issue was addressed in -r232519. However there is one more issue that might be connected to recent changes (sorry, not sure what exactly is wrong here). Attempt to build emulators/virtualbox-ose fails with the following error: --- kBuild: Compiling tstVMStructRC - /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/src/VBox/VMM/testcase/tstVMStructRC.cpp In file included from /usr/include/sys/types.h:63, from /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/include/iprt/types.h:85, from /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/include/VBox/types.h:30, from /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/src/VBox/VMM/testcase/tstVMStructRC.cpp:33: /usr/include/sys/_stdint.h:74: error: conflicting declaration 'typedef __intptr_t intptr_t' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/include/iprt/stdint.h:162: error: 'intptr_t' has a previous declaration as 'typedef long int intptr_t' /usr/include/sys/_stdint.h:78: error: conflicting declaration 'typedef __uintptr_t uintptr_t' /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/include/iprt/stdint.h:165: error: 'uintptr_t' has a previous declaration as 'typedef long unsigned int uintptr_t' kBuild: Compiling tstAsmStructsasm - /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/src/VBox/VMM/testcase/tstAsmStructsAsm.asm kBuild: Compiling tstGlobalConfig - /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/src/VBox/VMM/testcase/tstGlobalConfig.cpp kmk: *** [/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/out/freebsd.amd64/release/obj/tstVMStructRC/tstVMStructRC.o] Error 1 The failing command: @c++ -m32 -c -O2 -g -pipe -pedantic -Wshadow -Wall -Wextra -Wno-missing-field-initializers -Wno-unused -Wno-trigraphs -fdiagnostics-show-option -Wno-long-long -Wno-variadic-macros -fno-exceptions -O2 -mtune=generic -fno-omit-frame-pointer -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-strict-aliasing -fno-stack-protector -fvisibility=hidden -DVBOX_HAVE_VISIBILITY_HIDDEN -DRT_USE_VISIBILITY_DEFAULT -fvisibility-inlines-hidden -fno-rtti -O0 -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/src/VBox/VMM/include -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/src/VBox/VMM/PATM -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/include -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/out/freebsd.amd64/release -DVBOX -DVBOX_WITH_DEBUGGER -DVBOX_OSE -DVBOX_WITH_64_BITS_GUESTS -DVBOX_WITH_HARDENING -DRTPATH_APP_PRIVATE=\"/usr/local/share/virtualbox-ose\" -DRTPATH_APP_PRIVATE_ARCH=\"/usr/local/lib/virtualbox\" -DRTPATH_SHARED_LIBS=\"/usr/local/lib/virtualbox\" -DRTPATH_APP_DOCS=\"/usr/local/share/doc/virtualbox-ose\" -DRT_OS_FREEBSD -D__FREEBSD__ -DRT_ARCH_X86 -D__X86__ -DIN_RC -DHC_ARCH_BITS=64 -DGC_ARCH_BITS=64 -DIN_VMM_RC -DIN_DIS -DIN_RT_RC -DVBOX_WITH_RAW_MODE -DIPRT_DONT_USE_SYSTEM_STDINT_H -Wp,-MD,/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/out/freebsd.amd64/release/obj/tstVMStructRC/tstVMStructRC.o.dep -Wp,-MT,/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/out/freebsd.amd64/release/obj/tstVMStructRC/tstVMStructRC.o -Wp,-MP -o /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/out/freebsd.amd64/release/obj/tstVMStructRC/tstVMStructRC.o /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/src/VBox/VMM/testcase/tstVMStructRC.cpp kmk: *** Waiting for unfinished jobs.... kmk: *** Exiting with status 2 *** [do-build] Error code 2 Stop in /usr/ports/emulators/virtualbox-ose. *** [build] Error code 1 Stop in /usr/ports/emulators/virtualbox-ose. --- --- WBR, Andrey Kosachenko From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 23:04:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 991B31065675; Sun, 4 Mar 2012 23:04:17 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 851EC8FC12; Sun, 4 Mar 2012 23:04:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24N4HVi056244; Sun, 4 Mar 2012 23:04:17 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24N4HUt056242; Sun, 4 Mar 2012 23:04:17 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201203042304.q24N4HUt056242@svn.freebsd.org> From: Adrian Chadd Date: Sun, 4 Mar 2012 23:04:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232525 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 23:04:17 -0000 Author: adrian Date: Sun Mar 4 23:04:16 2012 New Revision: 232525 URL: http://svn.freebsd.org/changeset/base/232525 Log: Fix style(9) issues. Modified: head/sys/net80211/ieee80211_alq.c Modified: head/sys/net80211/ieee80211_alq.c ============================================================================== --- head/sys/net80211/ieee80211_alq.c Sun Mar 4 22:46:11 2012 (r232524) +++ head/sys/net80211/ieee80211_alq.c Sun Mar 4 23:04:16 2012 (r232525) @@ -85,8 +85,10 @@ ieee80211_alq_setlogging(int enable) ieee80211_alq_qsize); ieee80211_alq_lost = 0; ieee80211_alq_logged = 0; - printf("net80211: logging to %s enabled; struct size %d bytes\n", - ieee80211_alq_logfile, sizeof(struct ieee80211_alq_rec)); + printf("net80211: logging to %s enabled; " + "struct size %d bytes\n", + ieee80211_alq_logfile, + sizeof(struct ieee80211_alq_rec)); } else { if (ieee80211_alq) alq_close(ieee80211_alq); @@ -100,14 +102,14 @@ ieee80211_alq_setlogging(int enable) static int sysctl_ieee80211_alq_log(SYSCTL_HANDLER_ARGS) { - int error, enable; + int error, enable; - enable = (ieee80211_alq != NULL); - error = sysctl_handle_int(oidp, &enable, 0, req); - if (error || !req->newptr) - return (error); - else - return (ieee80211_alq_setlogging(enable)); + enable = (ieee80211_alq != NULL); + error = sysctl_handle_int(oidp, &enable, 0, req); + if (error || !req->newptr) + return (error); + else + return (ieee80211_alq_setlogging(enable)); } SYSCTL_PROC(_net_wlan, OID_AUTO, alq, CTLTYPE_INT|CTLFLAG_RW, From owner-svn-src-all@FreeBSD.ORG Sun Mar 4 23:13:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA44F1065764; Sun, 4 Mar 2012 23:13:52 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D53E08FC22; Sun, 4 Mar 2012 23:13:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q24NDqJ4056559; Sun, 4 Mar 2012 23:13:52 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q24NDqVx056556; Sun, 4 Mar 2012 23:13:52 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201203042313.q24NDqVx056556@svn.freebsd.org> From: Adrian Chadd Date: Sun, 4 Mar 2012 23:13:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232526 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Mar 2012 23:13:53 -0000 Author: adrian Date: Sun Mar 4 23:13:52 2012 New Revision: 232526 URL: http://svn.freebsd.org/changeset/base/232526 Log: Add the thread id to the net80211 alq records. This will (hopefully) aid in debugging concurrency related issues. Modified: head/sys/net80211/ieee80211_alq.c head/sys/net80211/ieee80211_alq.h Modified: head/sys/net80211/ieee80211_alq.c ============================================================================== --- head/sys/net80211/ieee80211_alq.c Sun Mar 4 23:04:16 2012 (r232525) +++ head/sys/net80211/ieee80211_alq.c Sun Mar 4 23:13:52 2012 (r232526) @@ -152,6 +152,7 @@ ieee80211_alq_log(struct ieee80211vap *v r->r_version = 1; r->r_wlan = htons(vap->iv_ifp->if_dunit); r->r_op = op; + r->r_threadid = (uint32_t) curthread->td_ucred; memcpy(&r->r_payload, p, MIN(l, sizeof(r->r_payload))); alq_post(ieee80211_alq, ale); } Modified: head/sys/net80211/ieee80211_alq.h ============================================================================== --- head/sys/net80211/ieee80211_alq.h Sun Mar 4 23:04:16 2012 (r232525) +++ head/sys/net80211/ieee80211_alq.h Sun Mar 4 23:13:52 2012 (r232526) @@ -38,6 +38,7 @@ */ struct ieee80211_alq_rec { uint32_t r_timestamp; /* XXX may wrap! */ + uint32_t r_threadid; /* current thread id */ uint16_t r_wlan; /* wlan interface number */ uint8_t r_version; /* version */ uint8_t r_op; /* top-level operation id */ @@ -46,6 +47,7 @@ struct ieee80211_alq_rec { }; /* General logging function */ -extern void ieee80211_alq_log(struct ieee80211vap *vap, uint8_t op, u_char *p, int l); +extern void ieee80211_alq_log(struct ieee80211vap *vap, uint8_t op, + u_char *p, int l); #endif /* __IEEE80211_ALQ_H__ */ From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 00:53:07 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 044EE106566B for ; Mon, 5 Mar 2012 00:53:07 +0000 (UTC) (envelope-from andy@fud.org.nz) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id C2F368FC18 for ; Mon, 5 Mar 2012 00:53:06 +0000 (UTC) Received: by iahk25 with SMTP id k25so6608634iah.13 for ; Sun, 04 Mar 2012 16:53:06 -0800 (PST) MIME-Version: 1.0 Received: by 10.50.15.129 with SMTP id x1mr4343961igc.14.1330908786104; Sun, 04 Mar 2012 16:53:06 -0800 (PST) Sender: andy@fud.org.nz Received: by 10.231.28.225 with HTTP; Sun, 4 Mar 2012 16:53:06 -0800 (PST) In-Reply-To: <201203042313.q24NDqVx056556@svn.freebsd.org> References: <201203042313.q24NDqVx056556@svn.freebsd.org> Date: Mon, 5 Mar 2012 13:53:06 +1300 X-Google-Sender-Auth: mISgUBBcl_qAqcm4oY5hVBJzhTQ Message-ID: From: Andrew Thompson To: Adrian Chadd Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQnM9ncE19LabwoOp8V2lswuWz9CbqA+ZinfqTmJVaa6yPPaIbbH8nwyUr22feGbrHY1wnOm Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232526 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 00:53:07 -0000 On 5 March 2012 12:13, Adrian Chadd wrote: > Author: adrian > Date: Sun Mar =A04 23:13:52 2012 > New Revision: 232526 > URL: http://svn.freebsd.org/changeset/base/232526 > > Log: > =A0Add the thread id to the net80211 alq records. > > =A0This will (hopefully) aid in debugging concurrency related issues. > > Modified: > =A0head/sys/net80211/ieee80211_alq.c > =A0head/sys/net80211/ieee80211_alq.h > > Modified: head/sys/net80211/ieee80211_alq.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/net80211/ieee80211_alq.c =A0 Sun Mar =A04 23:04:16 2012 =A0 = =A0 =A0 =A0(r232525) > +++ head/sys/net80211/ieee80211_alq.c =A0 Sun Mar =A04 23:13:52 2012 =A0 = =A0 =A0 =A0(r232526) > @@ -152,6 +152,7 @@ ieee80211_alq_log(struct ieee80211vap *v > =A0 =A0 =A0 =A0r->r_version =3D 1; > =A0 =A0 =A0 =A0r->r_wlan =3D htons(vap->iv_ifp->if_dunit); > =A0 =A0 =A0 =A0r->r_op =3D op; > + =A0 =A0 =A0 r->r_threadid =3D (uint32_t) curthread->td_ucred; Shouldn't this be td_tid? Andrew From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 01:37:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77E991065676; Mon, 5 Mar 2012 01:37:58 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by mx1.freebsd.org (Postfix) with ESMTP id 84DD48FC08; Mon, 5 Mar 2012 01:37:57 +0000 (UTC) Received: by wibhn6 with SMTP id hn6so2141259wib.13 for ; Sun, 04 Mar 2012 17:37:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=ldL2klxrcFFHyQ++QEhJ8mTG78kYvlhYEPVQMTOjNTY=; b=hAM+TsHmXnJXa2mjZn/Wojxfr55PFlwcyjSuKy1pAowz5I9v4upmOxfpHtrNxSRNk2 L5ocOnfca6QQ34sLKxJHLO0dk4lufj2BE32SvllJ7vK2To27Tci4isvSk5E+TWamFM2Y FILULShYyj9G2Fk4uigQ4knWM7lysvcG8kSpNZd7EjNlpKZ3AaRLh4f6LVKrvGU2pwAo PXcCUOGg/RnF7Kq20jeAzzozGeW1AgAEwM4muNCpOHQnJgPa0KXz1hQfmeSorCxoyBX8 3MBxmHh0xXCZyxYsDEDuvFt59YqMgmUhsXHpuA+52Z26kp/BSwWc6VNWKv1QVN29ml86 r7Sg== MIME-Version: 1.0 Received: by 10.180.96.8 with SMTP id do8mr9183532wib.21.1330911476445; Sun, 04 Mar 2012 17:37:56 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.198.81 with HTTP; Sun, 4 Mar 2012 17:37:56 -0800 (PST) In-Reply-To: References: <201203042313.q24NDqVx056556@svn.freebsd.org> Date: Sun, 4 Mar 2012 17:37:56 -0800 X-Google-Sender-Auth: h2NPbqDV4NGv0CSu-Exh3yGDk1g Message-ID: From: Adrian Chadd To: Andrew Thompson Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232526 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 01:37:58 -0000 grr, i must've mis-pasted the line. thanks, I'll fix this. Adrian On 4 March 2012 16:53, Andrew Thompson wrote: > On 5 March 2012 12:13, Adrian Chadd wrote: >> Author: adrian >> Date: Sun Mar =A04 23:13:52 2012 >> New Revision: 232526 >> URL: http://svn.freebsd.org/changeset/base/232526 >> >> Log: >> =A0Add the thread id to the net80211 alq records. >> >> =A0This will (hopefully) aid in debugging concurrency related issues. >> >> Modified: >> =A0head/sys/net80211/ieee80211_alq.c >> =A0head/sys/net80211/ieee80211_alq.h >> >> Modified: head/sys/net80211/ieee80211_alq.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/net80211/ieee80211_alq.c =A0 Sun Mar =A04 23:04:16 2012 =A0= =A0 =A0 =A0(r232525) >> +++ head/sys/net80211/ieee80211_alq.c =A0 Sun Mar =A04 23:13:52 2012 =A0= =A0 =A0 =A0(r232526) >> @@ -152,6 +152,7 @@ ieee80211_alq_log(struct ieee80211vap *v >> =A0 =A0 =A0 =A0r->r_version =3D 1; >> =A0 =A0 =A0 =A0r->r_wlan =3D htons(vap->iv_ifp->if_dunit); >> =A0 =A0 =A0 =A0r->r_op =3D op; >> + =A0 =A0 =A0 r->r_threadid =3D (uint32_t) curthread->td_ucred; > > Shouldn't this be td_tid? > > > Andrew From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 02:36:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 50B2E106564A; Mon, 5 Mar 2012 02:36:16 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C0398FC0A; Mon, 5 Mar 2012 02:36:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q252aGSH062694; Mon, 5 Mar 2012 02:36:16 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q252aG7v062692; Mon, 5 Mar 2012 02:36:16 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201203050236.q252aG7v062692@svn.freebsd.org> From: Adrian Chadd Date: Mon, 5 Mar 2012 02:36:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232530 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 02:36:16 -0000 Author: adrian Date: Mon Mar 5 02:36:15 2012 New Revision: 232530 URL: http://svn.freebsd.org/changeset/base/232530 Log: Oops - used the wrong field. Noticed by: nwhitehorn Modified: head/sys/net80211/ieee80211_alq.c Modified: head/sys/net80211/ieee80211_alq.c ============================================================================== --- head/sys/net80211/ieee80211_alq.c Mon Mar 5 02:14:47 2012 (r232529) +++ head/sys/net80211/ieee80211_alq.c Mon Mar 5 02:36:15 2012 (r232530) @@ -152,7 +152,7 @@ ieee80211_alq_log(struct ieee80211vap *v r->r_version = 1; r->r_wlan = htons(vap->iv_ifp->if_dunit); r->r_op = op; - r->r_threadid = (uint32_t) curthread->td_ucred; + r->r_threadid = (uint32_t) curthread->td_tid; memcpy(&r->r_payload, p, MIN(l, sizeof(r->r_payload))); alq_post(ieee80211_alq, ale); } From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 02:40:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 23AA3106566C; Mon, 5 Mar 2012 02:40:19 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0F4638FC1A; Mon, 5 Mar 2012 02:40:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q252eI7A062836; Mon, 5 Mar 2012 02:40:18 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q252eI3J062834; Mon, 5 Mar 2012 02:40:18 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201203050240.q252eI3J062834@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 5 Mar 2012 02:40:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232531 - head/usr.sbin/bsdinstall/scripts X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 02:40:19 -0000 Author: nwhitehorn Date: Mon Mar 5 02:40:18 2012 New Revision: 232531 URL: http://svn.freebsd.org/changeset/base/232531 Log: Make the chroot shell more functional by providing devfs. Reported by: Robert Simmons MFC after: 4 days Modified: head/usr.sbin/bsdinstall/scripts/auto Modified: head/usr.sbin/bsdinstall/scripts/auto ============================================================================== --- head/usr.sbin/bsdinstall/scripts/auto Mon Mar 5 02:36:15 2012 (r232530) +++ head/usr.sbin/bsdinstall/scripts/auto Mon Mar 5 02:40:18 2012 (r232531) @@ -216,6 +216,7 @@ dialog --backtitle "FreeBSD Installer" - --yesno "The installation is now finished. Before exiting the installer, would you like to open a shell in the new system to make any final manual modifications?" 0 0 if [ $? -eq 0 ]; then clear + mount -t devfs devfs "$BSDINSTALL_CHROOT/dev" echo This shell is operating in a chroot in the new system. \ When finished making configuration changes, type \"exit\". chroot "$BSDINSTALL_CHROOT" /bin/sh 2>&1 From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 04:46:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACCC81065673; Mon, 5 Mar 2012 04:46:28 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9691B8FC12; Mon, 5 Mar 2012 04:46:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q254kSMP067233; Mon, 5 Mar 2012 04:46:28 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q254kSCd067231; Mon, 5 Mar 2012 04:46:28 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201203050446.q254kSCd067231@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 5 Mar 2012 04:46:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232534 - stable/9/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 04:46:28 -0000 Author: ae Date: Mon Mar 5 04:46:28 2012 New Revision: 232534 URL: http://svn.freebsd.org/changeset/base/232534 Log: MFC r231751: Add PART::type attribute handler. It returns partition type as string. Modified: stable/9/sys/geom/part/g_part.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/part/g_part.c ============================================================================== --- stable/9/sys/geom/part/g_part.c Mon Mar 5 03:44:16 2012 (r232533) +++ stable/9/sys/geom/part/g_part.c Mon Mar 5 04:46:28 2012 (r232534) @@ -2056,6 +2056,7 @@ g_part_start(struct bio *bp) struct g_part_table *table; struct g_kerneldump *gkd; struct g_provider *pp; + char buf[64]; pp = bp->bio_to; gp = pp->geom; @@ -2104,6 +2105,9 @@ g_part_start(struct bio *bp) if (g_handleattr_str(bp, "PART::scheme", table->gpt_scheme->name)) return; + if (g_handleattr_str(bp, "PART::type", + G_PART_TYPE(table, entry, buf, sizeof(buf)))) + return; if (!strcmp("GEOM::kerneldump", bp->bio_attribute)) { /* * Check that the partition is suitable for kernel From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 04:51:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BCCF1065670; Mon, 5 Mar 2012 04:51:23 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 25C238FC1A; Mon, 5 Mar 2012 04:51:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q254pN8P067444; Mon, 5 Mar 2012 04:51:23 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q254pMab067441; Mon, 5 Mar 2012 04:51:22 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201203050451.q254pMab067441@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 5 Mar 2012 04:51:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232535 - stable/9/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 04:51:23 -0000 Author: ae Date: Mon Mar 5 04:51:22 2012 New Revision: 232535 URL: http://svn.freebsd.org/changeset/base/232535 Log: MFC r231754: Add additional check to EBR probe and create methods: don't try probe and create EBR scheme when parent partition type is not "ebr". This fixes error messages about corrupted EBR for some partitions where is actually another partition scheme. NOTE: if you have EBR on the partition with different than "ebr" (0x05) type, then you will lost access to partitions until it will be changed. MFC r231928: Add alias for the partition type 0x0f. Now "ebr" name is used for both types 0x05 and 0x0f, but 0x05 is preferred and used when partition is created with "gpart add -t ebr ...". This should keep EBR partitions accessible after r231754 for those, who have EBR on the partition with type 0x0f. Modified: stable/9/sys/geom/part/g_part_ebr.c stable/9/sys/geom/part/g_part_mbr.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/part/g_part_ebr.c ============================================================================== --- stable/9/sys/geom/part/g_part_ebr.c Mon Mar 5 04:46:28 2012 (r232534) +++ stable/9/sys/geom/part/g_part_ebr.c Mon Mar 5 04:51:22 2012 (r232535) @@ -268,7 +268,7 @@ g_part_ebr_add(struct g_part_table *base static int g_part_ebr_create(struct g_part_table *basetable, struct g_part_parms *gpp) { - char psn[8]; + char type[64]; struct g_consumer *cp; struct g_provider *pp; uint32_t msize; @@ -285,10 +285,15 @@ g_part_ebr_create(struct g_part_table *b if (basetable->gpt_depth == 0) return (ENXIO); cp = LIST_FIRST(&pp->consumers); - error = g_getattr("PART::scheme", cp, &psn); - if (error) + error = g_getattr("PART::scheme", cp, &type); + if (error != 0) return (error); - if (strcmp(psn, "MBR")) + if (strcmp(type, "MBR") != 0) + return (ENXIO); + error = g_getattr("PART::type", cp, &type); + if (error != 0) + return (error); + if (strcmp(type, "ebr") != 0) return (ENXIO); msize = MIN(pp->mediasize / pp->sectorsize, UINT32_MAX); @@ -405,7 +410,7 @@ g_part_ebr_precheck(struct g_part_table static int g_part_ebr_probe(struct g_part_table *table, struct g_consumer *cp) { - char psn[8]; + char type[64]; struct g_provider *pp; u_char *buf, *p; int error, index, res; @@ -422,10 +427,16 @@ g_part_ebr_probe(struct g_part_table *ta /* Check that we have a parent and that it's a MBR. */ if (table->gpt_depth == 0) return (ENXIO); - error = g_getattr("PART::scheme", cp, &psn); - if (error) + error = g_getattr("PART::scheme", cp, &type); + if (error != 0) + return (error); + if (strcmp(type, "MBR") != 0) + return (ENXIO); + /* Check that partition has type DOSPTYP_EBR. */ + error = g_getattr("PART::type", cp, &type); + if (error != 0) return (error); - if (strcmp(psn, "MBR")) + if (strcmp(type, "ebr") != 0) return (ENXIO); /* Check that there's a EBR. */ Modified: stable/9/sys/geom/part/g_part_mbr.c ============================================================================== --- stable/9/sys/geom/part/g_part_mbr.c Mon Mar 5 04:46:28 2012 (r232534) +++ stable/9/sys/geom/part/g_part_mbr.c Mon Mar 5 04:51:22 2012 (r232535) @@ -119,6 +119,7 @@ static struct g_part_mbr_alias { { DOSPTYP_EXT, G_PART_ALIAS_EBR }, { DOSPTYP_NTFS, G_PART_ALIAS_MS_NTFS }, { DOSPTYP_FAT32, G_PART_ALIAS_MS_FAT32 }, + { DOSPTYP_EXTLBA, G_PART_ALIAS_EBR }, { DOSPTYP_LDM, G_PART_ALIAS_MS_LDM_DATA }, { DOSPTYP_LINSWP, G_PART_ALIAS_LINUX_SWAP }, { DOSPTYP_LINUX, G_PART_ALIAS_LINUX_DATA }, From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 04:53:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3D771065674; Mon, 5 Mar 2012 04:53:49 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE4988FC12; Mon, 5 Mar 2012 04:53:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q254rnoA067565; Mon, 5 Mar 2012 04:53:49 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q254rnEx067563; Mon, 5 Mar 2012 04:53:49 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201203050453.q254rnEx067563@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 5 Mar 2012 04:53:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232536 - stable/9/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 04:53:49 -0000 Author: ae Date: Mon Mar 5 04:53:49 2012 New Revision: 232536 URL: http://svn.freebsd.org/changeset/base/232536 Log: MFC r231929: If nested scheme allows dump kernel to its partition, we may allow dump for the parent partition too. Modified: stable/9/sys/geom/part/g_part.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/part/g_part.c ============================================================================== --- stable/9/sys/geom/part/g_part.c Mon Mar 5 04:51:22 2012 (r232535) +++ stable/9/sys/geom/part/g_part.c Mon Mar 5 04:53:49 2012 (r232536) @@ -2112,9 +2112,12 @@ g_part_start(struct bio *bp) /* * Check that the partition is suitable for kernel * dumps. Typically only swap partitions should be - * used. + * used. If the request comes from the nested scheme + * we allow dumping there as well. */ - if (!G_PART_DUMPTO(table, entry)) { + if ((bp->bio_from == NULL || + bp->bio_from->geom->class != &g_part_class) && + G_PART_DUMPTO(table, entry) == 0) { g_io_deliver(bp, ENODEV); printf("GEOM_PART: Partition '%s' not suitable" " for kernel dumps (wrong type?)\n", From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 05:18:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 96563106564A; Mon, 5 Mar 2012 05:18:58 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7855E8FC08; Mon, 5 Mar 2012 05:18:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q255Iwf3068495; Mon, 5 Mar 2012 05:18:58 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q255Iw40068493; Mon, 5 Mar 2012 05:18:58 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201203050518.q255Iw40068493@svn.freebsd.org> From: Xin LI Date: Mon, 5 Mar 2012 05:18:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232537 - stable/9/usr.sbin/cron/crontab X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 05:18:58 -0000 Author: delphij Date: Mon Mar 5 05:18:58 2012 New Revision: 232537 URL: http://svn.freebsd.org/changeset/base/232537 Log: MFC r232202: Drop setuid status while doing file operations to prevent potential information leak. This changeset is intended to be a minimal one to make backports easier. Reviewed by: kevlo, remko Modified: stable/9/usr.sbin/cron/crontab/crontab.c Directory Properties: stable/9/usr.sbin/cron/ (props changed) stable/9/usr.sbin/cron/crontab/ (props changed) Modified: stable/9/usr.sbin/cron/crontab/crontab.c ============================================================================== --- stable/9/usr.sbin/cron/crontab/crontab.c Mon Mar 5 04:53:49 2012 (r232536) +++ stable/9/usr.sbin/cron/crontab/crontab.c Mon Mar 5 05:18:58 2012 (r232537) @@ -194,6 +194,17 @@ parse_args(argc, argv) } if (Option == opt_replace) { + /* relinquish the setuid status of the binary during + * the open, lest nonroot users read files they should + * not be able to read. we can't use access() here + * since there's a race condition. thanks go out to + * Arnt Gulbrandsen for spotting + * the race. + */ + + if (swap_uids() < OK) + err(ERROR_EXIT, "swapping uids"); + /* we have to open the file here because we're going to * chdir(2) into /var/cron before we get around to * reading the file. @@ -204,21 +215,11 @@ parse_args(argc, argv) !strcmp(resolved_path, SYSCRONTAB)) { err(ERROR_EXIT, SYSCRONTAB " must be edited manually"); } else { - /* relinquish the setuid status of the binary during - * the open, lest nonroot users read files they should - * not be able to read. we can't use access() here - * since there's a race condition. thanks go out to - * Arnt Gulbrandsen for spotting - * the race. - */ - - if (swap_uids() < OK) - err(ERROR_EXIT, "swapping uids"); if (!(NewCrontab = fopen(Filename, "r"))) err(ERROR_EXIT, "%s", Filename); - if (swap_uids_back() < OK) - err(ERROR_EXIT, "swapping uids back"); } + if (swap_uids_back() < OK) + err(ERROR_EXIT, "swapping uids back"); } Debug(DMISC, ("user=%s, file=%s, option=%s\n", @@ -363,11 +364,15 @@ edit_cmd() { goto fatal; } again: + if (swap_uids() < OK) + err(ERROR_EXIT, "swapping uids"); if (stat(Filename, &statbuf) < 0) { warn("stat"); fatal: unlink(Filename); exit(ERROR_EXIT); } + if (swap_uids_back() < OK) + err(ERROR_EXIT, "swapping uids back"); if (statbuf.st_dev != fsbuf.st_dev || statbuf.st_ino != fsbuf.st_ino) errx(ERROR_EXIT, "temp file must be edited in place"); if (MD5File(Filename, orig_md5) == NULL) { @@ -433,6 +438,8 @@ edit_cmd() { editor, WTERMSIG(waiter), WCOREDUMP(waiter) ?"" :"no "); goto fatal; } + if (swap_uids() < OK) + err(ERROR_EXIT, "swapping uids"); if (stat(Filename, &statbuf) < 0) { warn("stat"); goto fatal; @@ -443,6 +450,8 @@ edit_cmd() { warn("MD5"); goto fatal; } + if (swap_uids_back() < OK) + err(ERROR_EXIT, "swapping uids back"); if (strcmp(orig_md5, new_md5) == 0 && !syntax_error) { warnx("no changes made to crontab"); goto remove; From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 06:12:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 24BE31065711; Mon, 5 Mar 2012 06:12:16 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0F62A8FC19; Mon, 5 Mar 2012 06:12:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q256CFQs070223; Mon, 5 Mar 2012 06:12:15 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q256CF3h070221; Mon, 5 Mar 2012 06:12:15 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201203050612.q256CF3h070221@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 5 Mar 2012 06:12:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232538 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 06:12:16 -0000 Author: glebius Date: Mon Mar 5 06:12:15 2012 New Revision: 232538 URL: http://svn.freebsd.org/changeset/base/232538 Log: Fix ng_ipfw(4) cookie number in example. Pointed out by: "Jacco van Buuren" Modified: head/share/man/man4/ng_patch.4 Modified: head/share/man/man4/ng_patch.4 ============================================================================== --- head/share/man/man4/ng_patch.4 Mon Mar 5 05:18:58 2012 (r232537) +++ head/share/man/man4/ng_patch.4 Mon Mar 5 06:12:15 2012 (r232538) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 9, 2010 +.Dd March 5, 2012 .Dt NG_PATCH 4 .Os .Sh NAME @@ -185,7 +185,7 @@ So you do: { mode=7 value=0xf7 length=1 offset=1 } \e { mode=8 value=0x02 length=1 offset=1 } ] } SEQ -/sbin/ipfw add 160 netgraph 600 ip from any to any not dst-port 80 +/sbin/ipfw add 160 netgraph 300 ip from any to any not dst-port 80 .Ed .Pp This first does From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 06:41:45 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7590A1065678; Mon, 5 Mar 2012 06:41:45 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 560BB8FC12; Mon, 5 Mar 2012 06:41:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q256fjvS071144; Mon, 5 Mar 2012 06:41:45 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q256fjk2071140; Mon, 5 Mar 2012 06:41:45 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201203050641.q256fjk2071140@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 5 Mar 2012 06:41:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232539 - head/sys/dev/usb/controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 06:41:45 -0000 Author: hselasky Date: Mon Mar 5 06:41:44 2012 New Revision: 232539 URL: http://svn.freebsd.org/changeset/base/232539 Log: Fix for DWC OTG interrupt register programming. Fix a compiler warning. Add missing header file. MFC after: 1 week Modified: head/sys/dev/usb/controller/dwc_otg.c head/sys/dev/usb/controller/dwc_otg.h head/sys/dev/usb/controller/dwc_otg_atmelarm.c Modified: head/sys/dev/usb/controller/dwc_otg.c ============================================================================== --- head/sys/dev/usb/controller/dwc_otg.c Mon Mar 5 06:12:15 2012 (r232538) +++ head/sys/dev/usb/controller/dwc_otg.c Mon Mar 5 06:41:44 2012 (r232539) @@ -91,6 +91,7 @@ __FBSDID("$FreeBSD$"); #define DWC_OTG_MSK_GINT_ENABLED \ (DWC_OTG_MSK_GINT_ENUM_DONE | \ + DWC_OTG_MSK_GINT_USB_RESET | \ DWC_OTG_MSK_GINT_USB_SUSPEND | \ DWC_OTG_MSK_GINT_INEP | \ DWC_OTG_MSK_GINT_RXFLVL | \ @@ -730,7 +731,10 @@ repeat: } } - /* check if no packets have been transferred */ + if (!to--) + goto not_complete; + + /* check if not all packets have been transferred */ temp = DWC_OTG_READ_4(sc, DWC_OTG_REG_DIEPTSIZ(td->ep_no)); if (DWC_OTG_MSK_DXEPTSIZ_GET_NPKT(temp) != 0) { @@ -812,9 +816,7 @@ repeat: /* else we need to transmit a short packet */ } - - if (--to) - goto repeat; + goto repeat; not_complete: return (1); /* not complete */ @@ -927,7 +929,6 @@ repeat: if (sc->sc_last_rx_status != 0) { - uint32_t temp; uint8_t ep_no; temp = DWC_OTG_MSK_GRXSTS_GET_BYTE_CNT( @@ -1042,6 +1043,18 @@ dwc_otg_interrupt(struct dwc_otg_softc * DPRINTFN(14, "GINTSTS=0x%08x\n", status); + if (status & DWC_OTG_MSK_GINT_USB_RESET) { + + /* set correct state */ + sc->sc_flags.status_bus_reset = 0; + sc->sc_flags.status_suspend = 0; + sc->sc_flags.change_suspend = 0; + sc->sc_flags.change_connect = 1; + + /* complete root HUB interrupt endpoint */ + dwc_otg_root_intr(sc); + } + /* check for any bus state change interrupts */ if (status & DWC_OTG_MSK_GINT_ENUM_DONE) { @@ -1115,6 +1128,7 @@ dwc_otg_interrupt(struct dwc_otg_softc * } /* check VBUS */ if (status & (DWC_OTG_MSK_GINT_USB_SUSPEND | + DWC_OTG_MSK_GINT_USB_RESET | DWC_OTG_MSK_GINT_SESSREQINT)) { uint32_t temp; @@ -1133,9 +1147,10 @@ dwc_otg_interrupt(struct dwc_otg_softc * for (x = 0; x != sc->sc_dev_in_ep_max; x++) { temp = DWC_OTG_READ_4(sc, DWC_OTG_REG_DIEPINT(x)); - if (temp == 0) - continue; - DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DIEPINT(x), temp); + if (temp & DWC_OTG_MSK_DIEP_XFER_COMPLETE) { + DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DIEPINT(x), + DWC_OTG_MSK_DIEP_XFER_COMPLETE); + } } } @@ -1773,17 +1788,25 @@ dwc_otg_init(struct dwc_otg_softc *sc) sc->sc_irq_mask = DWC_OTG_MSK_GINT_ENABLED; DWC_OTG_WRITE_4(sc, DWC_OTG_REG_GINTMSK, sc->sc_irq_mask); - /* - * Disable all endpoint interrupts, - * we use the SOF IRQ for transmit: - */ - /* enable all endpoint interrupts */ - DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DIEPMSK, - /* DWC_OTG_MSK_DIEP_FIFO_EMPTY | */ - DWC_OTG_MSK_DIEP_XFER_COMPLETE); - DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DOEPMSK, 0); - DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DAINTMSK, 0xFFFF); + temp = DWC_OTG_READ_4(sc, DWC_OTG_REG_GHWCFG2); + if (temp & DWC_OTG_MSK_GHWCFG2_MPI) { + uint8_t x; + + DPRINTF("Multi Process Interrupts\n"); + + for (x = 0; x != sc->sc_dev_in_ep_max; x++) { + DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DIEPEACHMSK(x), + DWC_OTG_MSK_DIEP_XFER_COMPLETE); + DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DOEPEACHMSK(x), 0); + } + DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DEACHINTMSK, 0xFFFF); + } else { + DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DIEPMSK, + DWC_OTG_MSK_DIEP_XFER_COMPLETE); + DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DOEPMSK, 0); + DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DAINTMSK, 0xFFFF); + } /* enable global IRQ */ DWC_OTG_WRITE_4(sc, DWC_OTG_REG_GAHBCFG, Modified: head/sys/dev/usb/controller/dwc_otg.h ============================================================================== --- head/sys/dev/usb/controller/dwc_otg.h Mon Mar 5 06:12:15 2012 (r232538) +++ head/sys/dev/usb/controller/dwc_otg.h Mon Mar 5 06:41:44 2012 (r232539) @@ -140,6 +140,8 @@ #define DWC_OTG_REG_GHWCFG2 0x0048 #define DWC_OTG_MSK_GHWCFG2_NUM_DEV_EP(x) ((((x) >> 10) & 15) + 1) #define DWC_OTG_MSK_GHWCFG2_NUM_HOST_EP(x) ((((x) >> 14) & 15) + 1) +#define DWC_OTG_MSK_GHWCFG2_DYN_FIFO (1U << 19) +#define DWC_OTG_MSK_GHWCFG2_MPI (1U << 20) #define DWC_OTG_REG_GHWCFG3 0x004C #define DWC_OTG_MSK_GHWCFG3_GET_DFIFO(x) ((x) >> 16) #define DWC_OTG_MSK_GHWCFG3_PKT_SIZE (0x10U << (((x) >> 4) & 7)) @@ -245,11 +247,7 @@ #define DWC_OTG_REG_DEACHINT 0x0838 #define DWC_OTG_REG_DEACHINTMSK 0x083C #define DWC_OTG_REG_DIEPEACHMSK(n) (0x0840 + (4*(n))) -#define DWC_OTG_MSK_DIEPEACH_XFER_COMPLETE (1U << 0) - #define DWC_OTG_REG_DOEPEACHMSK(n) (0x0880 + (4*(n))) -#define DWC_OTG_MSK_DOEPEACH_SETUP (1U << 3) -#define DWC_OTG_MSK_DOEPEACH_XFER_COMPLETE (1U << 0) #define DWC_OTG_REG_DIEPCTL(n) (0x0900 + (32*(n))) #define DWC_OTG_MSK_DIEPCTL_ENABLE (1U << 31) Modified: head/sys/dev/usb/controller/dwc_otg_atmelarm.c ============================================================================== --- head/sys/dev/usb/controller/dwc_otg_atmelarm.c Mon Mar 5 06:12:15 2012 (r232538) +++ head/sys/dev/usb/controller/dwc_otg_atmelarm.c Mon Mar 5 06:41:44 2012 (r232539) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 06:46:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 78A45106564A; Mon, 5 Mar 2012 06:46:36 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 58F688FC0C; Mon, 5 Mar 2012 06:46:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q256kaHN071331; Mon, 5 Mar 2012 06:46:36 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q256kajW071328; Mon, 5 Mar 2012 06:46:36 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201203050646.q256kajW071328@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 5 Mar 2012 06:46:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232540 - in head/sys/modules/usb: . dwc_otg X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 06:46:36 -0000 Author: hselasky Date: Mon Mar 5 06:46:35 2012 New Revision: 232540 URL: http://svn.freebsd.org/changeset/base/232540 Log: Add DWC OTG module to ARM builds. MFC after: 1 week Added: head/sys/modules/usb/dwc_otg/ head/sys/modules/usb/dwc_otg/Makefile (contents, props changed) Modified: head/sys/modules/usb/Makefile Modified: head/sys/modules/usb/Makefile ============================================================================== --- head/sys/modules/usb/Makefile Mon Mar 5 06:41:44 2012 (r232539) +++ head/sys/modules/usb/Makefile Mon Mar 5 06:46:35 2012 (r232540) @@ -31,7 +31,7 @@ # MK_SOURCELESS_UCODE option (see below). SUBDIR = usb -SUBDIR += ehci musb ohci uhci xhci uss820dci ${_at91dci} ${_atmegadci} ${_avr32dci} +SUBDIR += ${_dwc_otg} ehci ${_musb} ohci uhci xhci ${_uss820dci} ${_at91dci} ${_atmegadci} ${_avr32dci} SUBDIR += ${_rum} run ${_uath} upgt usie ural ${_zyd} ${_urtw} SUBDIR += atp uhid ukbd ums udbp ufm uep SUBDIR += ucom u3g uark ubsa ubser uchcom ucycom ufoma uftdi ugensa uipaq ulpt \ @@ -54,6 +54,9 @@ _urtw= urtw .if ${MACHINE_CPUARCH} == "arm" _at91dci= at91dci _atmegadci= atmegadci +_dwc_otg= dwc_otg +_musb= musb +_uss820dci= uss820dci .endif .if ${MACHINE_CPUARCH} == "i386" Added: head/sys/modules/usb/dwc_otg/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/usb/dwc_otg/Makefile Mon Mar 5 06:46:35 2012 (r232540) @@ -0,0 +1,42 @@ +# +# $FreeBSD$ +# +# Copyright (c) 2012 Hans Petter Selasky. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE 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 LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# + +S= ${.CURDIR}/../../.. + +.PATH: $S/dev/usb/controller + +KMOD= dwc_otg +SRCS= bus_if.h device_if.h usb_if.h \ + opt_bus.h opt_usb.h \ + dwc_otg.c \ + pci_if.h + +.if defined(HAS_ATMELARM) +SRCS+= dwc_otg_atmelarm.c +.endif + +.include From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 11:38:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9B5881065674; Mon, 5 Mar 2012 11:38:02 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 70F1C8FC19; Mon, 5 Mar 2012 11:38:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25Bc21U084763; Mon, 5 Mar 2012 11:38:02 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25Bc2Q2084761; Mon, 5 Mar 2012 11:38:02 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203051138.q25Bc2Q2084761@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 5 Mar 2012 11:38:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232541 - head/sys/fs/pseudofs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 11:38:02 -0000 Author: kib Date: Mon Mar 5 11:38:02 2012 New Revision: 232541 URL: http://svn.freebsd.org/changeset/base/232541 Log: Apply inlined vn_vget_ino() algorithm for ".." lookup in pseudofs. Reported and tested by: pho MFC after: 2 weeks Modified: head/sys/fs/pseudofs/pseudofs_vnops.c Modified: head/sys/fs/pseudofs/pseudofs_vnops.c ============================================================================== --- head/sys/fs/pseudofs/pseudofs_vnops.c Mon Mar 5 06:46:35 2012 (r232540) +++ head/sys/fs/pseudofs/pseudofs_vnops.c Mon Mar 5 11:38:02 2012 (r232541) @@ -432,6 +432,7 @@ pfs_lookup(struct vop_cachedlookup_args struct pfs_vdata *pvd = vn->v_data; struct pfs_node *pd = pvd->pvd_pn; struct pfs_node *pn, *pdn = NULL; + struct mount *mp; pid_t pid = pvd->pvd_pid; char *pname; int error, i, namelen, visible; @@ -474,10 +475,26 @@ pfs_lookup(struct vop_cachedlookup_args PFS_RETURN (0); } + mp = vn->v_mount; + /* parent */ if (cnp->cn_flags & ISDOTDOT) { if (pd->pn_type == pfstype_root) PFS_RETURN (EIO); + error = vfs_busy(mp, MBF_NOWAIT); + if (error != 0) { + vfs_ref(mp); + VOP_UNLOCK(vn, 0); + error = vfs_busy(mp, 0); + vn_lock(vn, LK_EXCLUSIVE | LK_RETRY); + vfs_rel(mp); + if (error != 0) + PFS_RETURN(ENOENT); + if (vn->v_iflag & VI_DOOMED) { + vfs_unbusy(mp); + PFS_RETURN(ENOENT); + } + } VOP_UNLOCK(vn, 0); KASSERT(pd->pn_parent != NULL, ("%s(): non-root directory has no parent", __func__)); @@ -535,18 +552,28 @@ pfs_lookup(struct vop_cachedlookup_args goto failed; } - error = pfs_vncache_alloc(vn->v_mount, vpp, pn, pid); + error = pfs_vncache_alloc(mp, vpp, pn, pid); if (error) goto failed; - if (cnp->cn_flags & ISDOTDOT) - vn_lock(vn, LK_EXCLUSIVE|LK_RETRY); + if (cnp->cn_flags & ISDOTDOT) { + vfs_unbusy(mp); + vn_lock(vn, LK_EXCLUSIVE | LK_RETRY); + if (vn->v_iflag & VI_DOOMED) { + vput(*vpp); + *vpp = NULL; + PFS_RETURN(ENOENT); + } + } if (cnp->cn_flags & MAKEENTRY && !(vn->v_iflag & VI_DOOMED)) cache_enter(vn, *vpp, cnp); PFS_RETURN (0); failed: - if (cnp->cn_flags & ISDOTDOT) - vn_lock(vn, LK_EXCLUSIVE|LK_RETRY); + if (cnp->cn_flags & ISDOTDOT) { + vfs_unbusy(mp); + vn_lock(vn, LK_EXCLUSIVE | LK_RETRY); + *vpp = NULL; + } PFS_RETURN(error); } From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 11:43:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 564DC106564A; Mon, 5 Mar 2012 11:43:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 450B18FC08; Mon, 5 Mar 2012 11:43:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25BhSQF084960; Mon, 5 Mar 2012 11:43:28 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25BhS50084958; Mon, 5 Mar 2012 11:43:28 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203051143.q25BhS50084958@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 5 Mar 2012 11:43:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232542 - stable/9/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 11:43:28 -0000 Author: kib Date: Mon Mar 5 11:43:27 2012 New Revision: 232542 URL: http://svn.freebsd.org/changeset/base/232542 Log: MFC r232392: Belatedly add dl_iterate_phdr(3) to the list of installed manpages. Modified: stable/9/lib/libc/gen/Makefile.inc Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/gen/Makefile.inc ============================================================================== --- stable/9/lib/libc/gen/Makefile.inc Mon Mar 5 11:38:02 2012 (r232541) +++ stable/9/lib/libc/gen/Makefile.inc Mon Mar 5 11:43:27 2012 (r232542) @@ -52,7 +52,7 @@ SYM_MAPS+=${.CURDIR}/gen/Symbol.map MAN+= alarm.3 arc4random.3 \ basename.3 check_utility_compat.3 clock.3 \ confstr.3 ctermid.3 daemon.3 devname.3 directory.3 dirname.3 \ - dladdr.3 dlinfo.3 dllockinit.3 dlopen.3 \ + dl_iterate_phdr.3 dladdr.3 dlinfo.3 dllockinit.3 dlopen.3 \ err.3 exec.3 \ feature_present.3 fmtcheck.3 fmtmsg.3 fnmatch.3 fpclassify.3 frexp.3 \ ftok.3 fts.3 ftw.3 \ From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 11:45:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3CCED106564A; Mon, 5 Mar 2012 11:45:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2B9FD8FC0A; Mon, 5 Mar 2012 11:45:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25BjKre085077; Mon, 5 Mar 2012 11:45:20 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25BjKP2085075; Mon, 5 Mar 2012 11:45:20 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203051145.q25BjKP2085075@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 5 Mar 2012 11:45:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232543 - stable/9/contrib/top X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 11:45:20 -0000 Author: kib Date: Mon Mar 5 11:45:19 2012 New Revision: 232543 URL: http://svn.freebsd.org/changeset/base/232543 Log: MFC r232239: Fix a race in top non-interactive mode. Use plain sleep(3) call instead of arming timer and then pausing. If SIGALRM is delivered before pause(3) is entered, top hangs. Modified: stable/9/contrib/top/top.c Directory Properties: stable/9/contrib/top/ (props changed) Modified: stable/9/contrib/top/top.c ============================================================================== --- stable/9/contrib/top/top.c Mon Mar 5 11:43:27 2012 (r232542) +++ stable/9/contrib/top/top.c Mon Mar 5 11:45:19 2012 (r232543) @@ -70,7 +70,6 @@ int pcpu_stats = No; /* signal handling routines */ sigret_t leave(); -sigret_t onalrm(); sigret_t tstop(); #ifdef SIGWINCH sigret_t winch(); @@ -723,12 +722,7 @@ restart: no_command = Yes; if (!interactive) { - /* set up alarm */ - (void) signal(SIGALRM, onalrm); - (void) alarm((unsigned)delay); - - /* wait for the rest of it .... */ - pause(); + sleep(delay); } else while (no_command) { @@ -1174,11 +1168,3 @@ int status; exit(status); /*NOTREACHED*/ } - -sigret_t onalrm() /* SIGALRM handler */ - -{ - /* this is only used in batch mode to break out of the pause() */ - /* return; */ -} - From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 12:50:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DDC2E106566B; Mon, 5 Mar 2012 12:50:15 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay004.isp.belgacom.be (mailrelay004.isp.belgacom.be [195.238.6.170]) by mx1.freebsd.org (Postfix) with ESMTP id 92D148FC17; Mon, 5 Mar 2012 12:50:13 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EACS2VE9bsWcW/2dsb2JhbABDhTSvFIEIgX0BAQUjMyMQHwQjBwICOR4GiB4HphWRYY9HgRYEjlKWfoJk Received: from 22.103-177-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.177.103.22]) by relay.skynet.be with ESMTP; 05 Mar 2012 13:50:12 +0100 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.5/8.14.5) with ESMTP id q25CoB7J002882; Mon, 5 Mar 2012 13:50:11 +0100 (CET) (envelope-from tijl@freebsd.org) From: Tijl Coosemans To: Andrey Kosachenko Date: Mon, 5 Mar 2012 13:50:03 +0100 User-Agent: KMail/1.13.7 (FreeBSD/10.0-CURRENT; KDE/4.7.3; i386; ; ) References: <201202281838.q1SIcYhE082928@svn.freebsd.org> <201203041351.22847.jhb@freebsd.org> <4F53DF10.5080303@gmail.com> In-Reply-To: <4F53DF10.5080303@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2952423.uHyMEgrBsJ"; protocol="application/pgp-signature"; micalg=pgp-sha256 Content-Transfer-Encoding: 7bit Message-Id: <201203051350.09141.tijl@freebsd.org> Cc: svn-src-head@freebsd.org, emulation@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: virtualbox fix for recent current (was Re: svn commit: r232264 - in head/sys: amd64/include i386/include pc98/include x86/include) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 12:50:16 -0000 --nextPart2952423.uHyMEgrBsJ Content-Type: multipart/mixed; boundary="Boundary-01=_7ZLVPBzqF4/B/pY" Content-Transfer-Encoding: 7bit --Boundary-01=_7ZLVPBzqF4/B/pY Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sunday 04 March 2012 22:30:56 Andrey Kosachenko wrote: >> On Tuesday, February 28, 2012 01:38:34 PM Tijl Coosemans wrote: >>> Author: tijl >>> Date: Tue Feb 28 18:38:33 2012 >>> New Revision: 232264 >>> URL: http://svn.freebsd.org/changeset/base/232264 >>> >>> Log: >>> Copy amd64 _stdint.h to x86 and merge with i386 _stdint.h. Replace >>> amd64/i386/pc98 _stdint.h with stubs. >>> >>> Added: >>> head/sys/x86/include/_stdint.h >>> - copied, changed from r232259, head/sys/amd64/include/_stdint.h > Attempt to build=20 > emulators/virtualbox-ose fails with the following error: >=20 > --- > kBuild: Compiling tstVMStructRC -=20 > /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/src/VBox/VM= M/testcase/tstVMStructRC.cpp > In file included from /usr/include/sys/types.h:63, > from=20 > /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/include/ipr= t/types.h:85, > from=20 > /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/include/VBo= x/types.h:30, > from=20 > /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/src/VBox/VM= M/testcase/tstVMStructRC.cpp:33: > /usr/include/sys/_stdint.h:74: error: conflicting declaration 'typedef=20 > __intptr_t intptr_t' > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >=20 > /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/include/ipr= t/stdint.h:162:=20 > error: 'intptr_t' has a previous declaration as 'typedef long int intptr_= t' > /usr/include/sys/_stdint.h:78: error: conflicting declaration 'typedef=20 > __uintptr_t uintptr_t' > /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/include/ipr= t/stdint.h:165:=20 > error: 'uintptr_t' has a previous declaration as 'typedef long unsigned=20 > int uintptr_t' > kBuild: Compiling tstAsmStructsasm -=20 > /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/src/VBox/VM= M/testcase/tstAsmStructsAsm.asm > kBuild: Compiling tstGlobalConfig -=20 > /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/src/VBox/VM= M/testcase/tstGlobalConfig.cpp > kmk: ***=20 > [/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/out/freebs= d.amd64/release/obj/tstVMStructRC/tstVMStructRC.o]=20 > Error 1 > The failing command: > @c++ -m32 -c -O2 -g -pipe -pedantic -Wshadow -Wall -Wextra=20 Compiling with -m32 wasn't really supported (until now)... > -Wno-missing-field-initializers -Wno-unused -Wno-trigraphs=20 > -fdiagnostics-show-option -Wno-long-long -Wno-variadic-macros=20 > -fno-exceptions -O2 -mtune=3Dgeneric -fno-omit-frame-pointer -mno-sse=20 > -mno-mmx -mno-sse2 -mno-3dnow -fno-strict-aliasing -fno-stack-protector=20 > -fvisibility=3Dhidden -DVBOX_HAVE_VISIBILITY_HIDDEN=20 > -DRT_USE_VISIBILITY_DEFAULT -fvisibility-inlines-hidden -fno-rtti -O0=20 > -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/src/VBox/= VMM/include=20 > -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/src/VBox/= VMM/PATM=20 > -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/include=20 > -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/out/freeb= sd.amd64/release=20 > -DVBOX -DVBOX_WITH_DEBUGGER -DVBOX_OSE -DVBOX_WITH_64_BITS_GUESTS=20 > -DVBOX_WITH_HARDENING=20 > -DRTPATH_APP_PRIVATE=3D\"/usr/local/share/virtualbox-ose\"=20 > -DRTPATH_APP_PRIVATE_ARCH=3D\"/usr/local/lib/virtualbox\"=20 > -DRTPATH_SHARED_LIBS=3D\"/usr/local/lib/virtualbox\"=20 > -DRTPATH_APP_DOCS=3D\"/usr/local/share/doc/virtualbox-ose\"=20 > -DRT_OS_FREEBSD -D__FREEBSD__ -DRT_ARCH_X86 -D__X86__ -DIN_RC=20 > -DHC_ARCH_BITS=3D64 -DGC_ARCH_BITS=3D64 -DIN_VMM_RC -DIN_DIS -DIN_RT_RC=20 > -DVBOX_WITH_RAW_MODE -DIPRT_DONT_USE_SYSTEM_STDINT_H=20 =2E..so virtualbox has hacks like IPRT_DONT_USE_SYSTEM_STDINT_H to make it work. I've attached a patch that you can put in the port's files/ directory. I'll leave it to the port maintainers to commit it or work out something else, because I think some hacks aren't necessary anymore (on current). > -Wp,-MD,/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/out= /freebsd.amd64/release/obj/tstVMStructRC/tstVMStructRC.o.dep=20 > -Wp,-MT,/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/out= /freebsd.amd64/release/obj/tstVMStructRC/tstVMStructRC.o=20 > -Wp,-MP -o=20 > /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/out/freebsd= =2Eamd64/release/obj/tstVMStructRC/tstVMStructRC.o=20 > /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/src/VBox/VM= M/testcase/tstVMStructRC.cpp > kmk: *** Waiting for unfinished jobs.... > kmk: *** Exiting with status 2 > *** [do-build] Error code 2 >=20 > Stop in /usr/ports/emulators/virtualbox-ose. > *** [build] Error code 1 >=20 > Stop in /usr/ports/emulators/virtualbox-ose. > --- --Boundary-01=_7ZLVPBzqF4/B/pY Content-Type: text/plain; charset="utf-8"; name="patch-include-iprt-types.h" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="patch-include-iprt-types.h" =2D-- include/iprt/types.h.orig 2012-03-05 10:48:48.000000000 +0100 +++ include/iprt/types.h 2012-03-05 11:21:25.000000000 +0100 @@ -82,6 +82,8 @@ # include # define _UINT64_T_DECLARED # define _INT64_T_DECLARED +# define _UINTPTR_T_DECLARED +# define _INTPTR_T_DECLARED # include =20 # elif defined(RT_OS_LINUX) && defined(__KERNEL__) --Boundary-01=_7ZLVPBzqF4/B/pY-- --nextPart2952423.uHyMEgrBsJ Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iF4EABEIAAYFAk9UtoAACgkQfoCS2CCgtisVKQEAhL1bKk/NPyUPcp1H6VRwL6CV 8SKQzJF6E+Kepty6+OsA/2AnKMCwA/RydENuAA+Oj2H68NVFSHED8YKgSPQ5sXIH =2v6X -----END PGP SIGNATURE----- --nextPart2952423.uHyMEgrBsJ-- From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 14:04:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5EF6D1065677; Mon, 5 Mar 2012 14:04:14 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E2158FC23; Mon, 5 Mar 2012 14:04:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25E4E1w089368; Mon, 5 Mar 2012 14:04:14 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25E4EN0089366; Mon, 5 Mar 2012 14:04:14 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201203051404.q25E4EN0089366@svn.freebsd.org> From: Ken Smith Date: Mon, 5 Mar 2012 14:04:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232546 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 14:04:14 -0000 Author: kensmith Date: Mon Mar 5 14:04:12 2012 New Revision: 232546 URL: http://svn.freebsd.org/changeset/base/232546 Log: Release stable/8 from code freeze. Release activity for the 8.3-RELEASE release cycle will now be on releng/8.3. Approved by: core (implicit) Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers ============================================================================== --- svnadmin/conf/approvers Mon Mar 5 11:59:26 2012 (r232545) +++ svnadmin/conf/approvers Mon Mar 5 14:04:12 2012 (r232546) @@ -18,7 +18,7 @@ # #^head/ re #^stable/9/ re -^stable/8/ re +#^stable/8/ re #^stable/7/ re ^releng/9.0/ (security-officer|so) ^releng/8.3/ re From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 14:19:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B119106566C; Mon, 5 Mar 2012 14:19:44 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EE6328FC18; Mon, 5 Mar 2012 14:19:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25EJhUr089888; Mon, 5 Mar 2012 14:19:43 GMT (envelope-from ivoras@svn.freebsd.org) Received: (from ivoras@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25EJhWk089886; Mon, 5 Mar 2012 14:19:43 GMT (envelope-from ivoras@svn.freebsd.org) Message-Id: <201203051419.q25EJhWk089886@svn.freebsd.org> From: Ivan Voras Date: Mon, 5 Mar 2012 14:19:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232547 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 14:19:44 -0000 Author: ivoras Date: Mon Mar 5 14:19:43 2012 New Revision: 232547 URL: http://svn.freebsd.org/changeset/base/232547 Log: Print out process name and thread id in the debugging message. This is useful because the message can end up in system logs in non-debugging operation. Reviewed by: attilio (earlier version) Modified: head/sys/kern/kern_lock.c Modified: head/sys/kern/kern_lock.c ============================================================================== --- head/sys/kern/kern_lock.c Mon Mar 5 14:04:12 2012 (r232546) +++ head/sys/kern/kern_lock.c Mon Mar 5 14:19:43 2012 (r232547) @@ -1277,8 +1277,9 @@ lockmgr_printinfo(const struct lock *lk) (uintmax_t)LK_SHARERS(lk->lk_lock)); else { td = lockmgr_xholder(lk); - printf("lock type %s: EXCL by thread %p (pid %d)\n", - lk->lock_object.lo_name, td, td->td_proc->p_pid); + printf("lock type %s: EXCL by thread %p " + "(pid %d, %s, tid %d)\n", lk->lock_object.lo_name, td, + td->td_proc->p_pid, td->td_proc->p_comm, td->td_tid); } x = lk->lk_lock; From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 16:37:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0449106564A; Mon, 5 Mar 2012 16:37:51 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CDF908FC1B; Mon, 5 Mar 2012 16:37:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25Gbpkv094175; Mon, 5 Mar 2012 16:37:51 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25Gbp1u094172; Mon, 5 Mar 2012 16:37:51 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201203051637.q25Gbp1u094172@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 5 Mar 2012 16:37:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232548 - head/sbin/growfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 16:37:52 -0000 Author: trasz Date: Mon Mar 5 16:37:51 2012 New Revision: 232548 URL: http://svn.freebsd.org/changeset/base/232548 Log: Make growfs(8) mostly style compliant. No functional changes, verified with MD5. Modified: head/sbin/growfs/debug.c head/sbin/growfs/growfs.c Modified: head/sbin/growfs/debug.c ============================================================================== --- head/sbin/growfs/debug.c Mon Mar 5 14:19:43 2012 (r232547) +++ head/sbin/growfs/debug.c Mon Mar 5 16:37:51 2012 (r232548) @@ -44,7 +44,6 @@ static const char rcsid[] = "$FreeBSD$"; #endif /* not lint */ -/* ********************************************************** INCLUDES ***** */ #include #include @@ -57,15 +56,13 @@ static const char rcsid[] = #ifdef FS_DEBUG -/* *********************************************************** GLOBALS ***** */ -static FILE *dbg_log=NULL; -static unsigned int indent=0; +static FILE *dbg_log = NULL; +static unsigned int indent = 0; /* * prototypes not done here, as they come with debug.h */ -/* ********************************************************** dbg_open ***** */ /* * Open the filehandle where all debug output has to go. */ @@ -74,14 +71,13 @@ dbg_open(const char *fn) { if (strcmp(fn, "-") == 0) - dbg_log=fopen("/dev/stdout", "a"); + dbg_log = fopen("/dev/stdout", "a"); else - dbg_log=fopen(fn, "a"); + dbg_log = fopen(fn, "a"); return; } -/* ********************************************************* dbg_close ***** */ /* * Close the filehandle where all debug output went to. */ @@ -89,15 +85,14 @@ void dbg_close(void) { - if(dbg_log) { + if (dbg_log) { fclose(dbg_log); - dbg_log=NULL; + dbg_log = NULL; } return; } -/* ****************************************************** dbg_dump_hex ***** */ /* * Dump out a full file system block in hex. */ @@ -106,17 +101,16 @@ dbg_dump_hex(struct fs *sb, const char * { int i, j, k; - if(!dbg_log) { + if (!dbg_log) return; - } + fprintf(dbg_log, "===== START HEXDUMP =====\n"); fprintf(dbg_log, "# %d@%lx: %s\n", indent, (unsigned long)mem, comment); indent++; - for (i=0; ifs_bsize; i+=24) { - for (j=0; j<3; j++) { - for (k=0; k<8; k++) { + for (i = 0; i < sb->fs_bsize; i += 24) { + for (j = 0; j < 3; j++) { + for (k = 0; k < 8; k++) fprintf(dbg_log, "%02x ", *mem++); - } fprintf(dbg_log, " "); } fprintf(dbg_log, "\n"); @@ -127,7 +121,6 @@ dbg_dump_hex(struct fs *sb, const char * return; } -/* ******************************************************* dbg_dump_fs ***** */ /* * Dump the superblock. */ @@ -135,12 +128,11 @@ void dbg_dump_fs(struct fs *sb, const char *comment) { #ifdef FSMAXSNAP - int j; + int j; #endif /* FSMAXSNAP */ - if(!dbg_log) { + if (!dbg_log) return; - } fprintf(dbg_log, "===== START SUPERBLOCK =====\n"); fprintf(dbg_log, "# %d@%lx: %s\n", indent, (unsigned long)sb, comment); @@ -308,10 +300,10 @@ dbg_dump_fs(struct fs *sb, const char *c sb->fs_pendinginodes); #ifdef FSMAXSNAP - for(j=0; jfs_snapinum[j]); - if(!sb->fs_snapinum[j]) { /* list is dense */ + if (!sb->fs_snapinum[j]) { /* list is dense */ break; } } @@ -356,7 +348,6 @@ dbg_dump_fs(struct fs *sb, const char *c return; } -/* ******************************************************* dbg_dump_cg ***** */ /* * Dump a cylinder group. */ @@ -365,9 +356,8 @@ dbg_dump_cg(const char *comment, struct { int j; - if(!dbg_log) { + if (!dbg_log) return; - } fprintf(dbg_log, "===== START CYLINDER GROUP =====\n"); fprintf(dbg_log, "# %d@%lx: %s\n", indent, (unsigned long)cgr, comment); @@ -383,7 +373,7 @@ dbg_dump_cg(const char *comment, struct fprintf(dbg_log, "rotor int32_t 0x%08x\n", cgr->cg_rotor); fprintf(dbg_log, "frotor int32_t 0x%08x\n", cgr->cg_frotor); fprintf(dbg_log, "irotor int32_t 0x%08x\n", cgr->cg_irotor); - for(j=0; jcg_frsum[j]); } @@ -411,7 +401,6 @@ dbg_dump_cg(const char *comment, struct return; } -/* ***************************************************** dbg_dump_csum ***** */ /* * Dump a cylinder summary. */ @@ -419,9 +408,8 @@ void dbg_dump_csum(const char *comment, struct csum *cs) { - if(!dbg_log) { + if (!dbg_log) return; - } fprintf(dbg_log, "===== START CYLINDER SUMMARY =====\n"); fprintf(dbg_log, "# %d@%lx: %s\n", indent, (unsigned long)cs, comment); @@ -438,7 +426,6 @@ dbg_dump_csum(const char *comment, struc return; } -/* ************************************************ dbg_dump_csum_total ***** */ /* * Dump a cylinder summary. */ @@ -446,9 +433,8 @@ void dbg_dump_csum_total(const char *comment, struct csum_total *cs) { - if(!dbg_log) { + if (!dbg_log) return; - } fprintf(dbg_log, "===== START CYLINDER SUMMARY TOTAL =====\n"); fprintf(dbg_log, "# %d@%lx: %s\n", indent, (unsigned long)cs, comment); @@ -475,7 +461,6 @@ dbg_dump_csum_total(const char *comment, return; } -/* **************************************************** dbg_dump_inmap ***** */ /* * Dump the inode allocation map in one cylinder group. */ @@ -485,30 +470,29 @@ dbg_dump_inmap(struct fs *sb, const char int j,k,l,e; unsigned char *cp; - if(!dbg_log) { + if (!dbg_log) return; - } fprintf(dbg_log, "===== START INODE ALLOCATION MAP =====\n"); fprintf(dbg_log, "# %d@%lx: %s\n", indent, (unsigned long)cgr, comment); indent++; - cp=(unsigned char *)cg_inosused(cgr); - e=sb->fs_ipg/8; - for(j=0; jfs_ipg / 8; + for (j = 0; j < e; j += 32) { fprintf(dbg_log, "%08x: ", j); - for(k=0; k<32; k+=8) { - if(j+k+8fs_old_nspf) - e=howmany((sb->fs_old_cpg * sb->fs_old_spc / sb->fs_old_nspf), CHAR_BIT); + e = howmany((sb->fs_old_cpg * sb->fs_old_spc / sb->fs_old_nspf), CHAR_BIT); else e = 0; - for(j=0; jfs_old_nspf) - e=howmany(sb->fs_old_cpg * sb->fs_old_spc / (sb->fs_old_nspf << sb->fs_fragshift), CHAR_BIT); + e = howmany(sb->fs_old_cpg * sb->fs_old_spc / (sb->fs_old_nspf << sb->fs_fragshift), CHAR_BIT); else e = 0; - for(j=0; jfs_contigsumsize; j++) { + ip = (int *)cg_clustersum(cgr); + for (j = 0; j <= sb->fs_contigsumsize; j++) { fprintf(dbg_log, "%02d: %8d\n", j, *ip++); } @@ -651,7 +629,6 @@ dbg_dump_clsum(struct fs *sb, const char * will leave it disabled for now; it should probably be re-enabled * specifically for UFS1. */ -/* **************************************************** dbg_dump_sptbl ***** */ /* * Dump the block summary, and the rotational layout table. */ @@ -661,23 +638,21 @@ dbg_dump_sptbl(struct fs *sb, const char int j,k; int *ip; - if(!dbg_log) { + if (!dbg_log) return; - } fprintf(dbg_log, "===== START BLOCK SUMMARY AND POSITION TABLE =====\n"); fprintf(dbg_log, "# %d@%lx: %s\n", indent, (unsigned long)cgr, comment); indent++; - ip=(int *)cg_blktot(cgr); - for(j=0; jfs_old_cpg; j++) { + ip = (int *)cg_blktot(cgr); + for (j = 0; j < sb->fs_old_cpg; j++) { fprintf(dbg_log, "%2d: %5d = ", j, *ip++); - for(k=0; kfs_old_nrpos; k++) { + for (k = 0; k < sb->fs_old_nrpos; k++) { fprintf(dbg_log, "%4d", cg_blks(sb, cgr, j)[k]); - if(kfs_old_nrpos-1) { + if (k < sb->fs_old_nrpos - 1) fprintf(dbg_log, " + "); - } } fprintf(dbg_log, "\n"); } @@ -689,7 +664,6 @@ dbg_dump_sptbl(struct fs *sb, const char } #endif -/* ************************************************** dbg_dump_ufs1_ino ***** */ /* * Dump a UFS1 inode structure. */ @@ -699,9 +673,8 @@ dbg_dump_ufs1_ino(struct fs *sb, const c int ictr; int remaining_blocks; - if(!dbg_log) { + if (!dbg_log) return; - } fprintf(dbg_log, "===== START UFS1 INODE DUMP =====\n"); fprintf(dbg_log, "# %d@%lx: %s\n", indent, (unsigned long)ino, comment); @@ -723,25 +696,25 @@ dbg_dump_ufs1_ino(struct fs *sb, const c fprintf(dbg_log, "ctimensec int32_t 0x%08x\n", ino->di_ctimensec); - remaining_blocks=howmany(ino->di_size, sb->fs_bsize); /* XXX ts - +1? */ - for(ictr=0; ictr < MIN(NDADDR, remaining_blocks); ictr++) { + remaining_blocks = howmany(ino->di_size, sb->fs_bsize); /* XXX ts - +1? */ + for (ictr = 0; ictr < MIN(NDADDR, remaining_blocks); ictr++) { fprintf(dbg_log, "db ufs_daddr_t[%x] 0x%08x\n", ictr, ino->di_db[ictr]); } - remaining_blocks-=NDADDR; - if(remaining_blocks>0) { + remaining_blocks -= NDADDR; + if (remaining_blocks > 0) { fprintf(dbg_log, "ib ufs_daddr_t[0] 0x%08x\n", ino->di_ib[0]); } - remaining_blocks-=howmany(sb->fs_bsize, sizeof(ufs1_daddr_t)); - if(remaining_blocks>0) { + remaining_blocks -= howmany(sb->fs_bsize, sizeof(ufs1_daddr_t)); + if (remaining_blocks > 0) { fprintf(dbg_log, "ib ufs_daddr_t[1] 0x%08x\n", ino->di_ib[1]); } -#define SQUARE(a) ((a)*(a)) - remaining_blocks-=SQUARE(howmany(sb->fs_bsize, sizeof(ufs1_daddr_t))); +#define SQUARE(a) ((a) * (a)) + remaining_blocks -= SQUARE(howmany(sb->fs_bsize, sizeof(ufs1_daddr_t))); #undef SQUARE - if(remaining_blocks>0) { + if (remaining_blocks > 0) { fprintf(dbg_log, "ib ufs_daddr_t[2] 0x%08x\n", ino->di_ib[2]); } @@ -758,7 +731,6 @@ dbg_dump_ufs1_ino(struct fs *sb, const c return; } -/* ************************************************** dbg_dump_ufs2_ino ***** */ /* * Dump a UFS2 inode structure. */ @@ -768,9 +740,8 @@ dbg_dump_ufs2_ino(struct fs *sb, const c int ictr; int remaining_blocks; - if(!dbg_log) { + if (!dbg_log) return; - } fprintf(dbg_log, "===== START UFS2 INODE DUMP =====\n"); fprintf(dbg_log, "# %d@%lx: %s\n", indent, (unsigned long)ino, comment); @@ -785,8 +756,8 @@ dbg_dump_ufs2_ino(struct fs *sb, const c ((unsigned int *)&(ino->di_size))[1], ((unsigned int *)&(ino->di_size))[0]); fprintf(dbg_log, "blocks u_int64_t 0x%08x%08x\n", - ((unsigned int *)&(ino->di_blocks))[1], - ((unsigned int *)&(ino->di_blocks))[0]); + ((unsigned int *)&(ino->di_blocks))[1], + ((unsigned int *)&(ino->di_blocks))[0]); fprintf(dbg_log, "atime ufs_time_t %10jd\n", ino->di_atime); fprintf(dbg_log, "mtime ufs_time_t %10jd\n", ino->di_mtime); fprintf(dbg_log, "ctime ufs_time_t %10jd\n", ino->di_ctime); @@ -802,25 +773,25 @@ dbg_dump_ufs2_ino(struct fs *sb, const c /* XXX: What do we do with di_extb[NXADDR]? */ - remaining_blocks=howmany(ino->di_size, sb->fs_bsize); /* XXX ts - +1? */ - for(ictr=0; ictr < MIN(NDADDR, remaining_blocks); ictr++) { + remaining_blocks = howmany(ino->di_size, sb->fs_bsize); /* XXX ts - +1? */ + for (ictr = 0; ictr < MIN(NDADDR, remaining_blocks); ictr++) { fprintf(dbg_log, "db ufs2_daddr_t[%x] 0x%16jx\n", ictr, ino->di_db[ictr]); } - remaining_blocks-=NDADDR; - if(remaining_blocks>0) { + remaining_blocks -= NDADDR; + if (remaining_blocks > 0) { fprintf(dbg_log, "ib ufs2_daddr_t[0] 0x%16jx\n", ino->di_ib[0]); } - remaining_blocks-=howmany(sb->fs_bsize, sizeof(ufs2_daddr_t)); - if(remaining_blocks>0) { + remaining_blocks -= howmany(sb->fs_bsize, sizeof(ufs2_daddr_t)); + if (remaining_blocks > 0) { fprintf(dbg_log, "ib ufs2_daddr_t[1] 0x%16jx\n", ino->di_ib[1]); } -#define SQUARE(a) ((a)*(a)) - remaining_blocks-=SQUARE(howmany(sb->fs_bsize, sizeof(ufs2_daddr_t))); +#define SQUARE(a) ((a) * (a)) + remaining_blocks -= SQUARE(howmany(sb->fs_bsize, sizeof(ufs2_daddr_t))); #undef SQUARE - if(remaining_blocks>0) { + if (remaining_blocks > 0) { fprintf(dbg_log, "ib ufs2_daddr_t[2] 0x%16jx\n", ino->di_ib[2]); } @@ -831,7 +802,6 @@ dbg_dump_ufs2_ino(struct fs *sb, const c return; } -/* ***************************************************** dbg_dump_iblk ***** */ /* * Dump an indirect block. The iteration to dump a full file has to be * written around. @@ -841,9 +811,8 @@ dbg_dump_iblk(struct fs *sb, const char { unsigned int *mem, i, j, size; - if(!dbg_log) { + if (!dbg_log) return; - } fprintf(dbg_log, "===== START INDIRECT BLOCK DUMP =====\n"); fprintf(dbg_log, "# %d@%lx: %s\n", indent, (unsigned long)block, @@ -855,14 +824,13 @@ dbg_dump_iblk(struct fs *sb, const char else size = sizeof(ufs2_daddr_t); - mem=(unsigned int *)block; - for (i=0; (size_t)ifs_bsize, size), - length); i+=8) { + mem = (unsigned int *)block; + for (i = 0; (size_t)i < MIN(howmany(sb->fs_bsize, size), length); + i += 8) { fprintf(dbg_log, "%04x: ", i); - for (j=0; j<8; j++) { - if((size_t)(i+j) __FBSDID("$FreeBSD$"); -/* ********************************************************** INCLUDES ***** */ #include #include #include @@ -72,7 +71,6 @@ __FBSDID("$FreeBSD$"); #include "debug.h" -/* *************************************************** GLOBALS & TYPES ***** */ #ifdef FS_DEBUG int _dbg_lvl_ = (DL_INFO); /* DL_TRC */ #endif /* FS_DEBUG */ @@ -117,7 +115,7 @@ union dinode { static ufs2_daddr_t inoblk; /* inode block address */ static char inobuf[MAXBSIZE]; /* inode block */ static ino_t maxino; /* last valid inode */ -static int unlabeled; /* unlabeled partition, e.g. vinum volume etc. */ +static int unlabeled; /* unlabeled partition, e.g. vinum volume */ /* * An array of elements of type struct gfs_bpp describes all blocks to @@ -130,10 +128,9 @@ struct gfs_bpp { #define GFS_FL_FIRST 1 #define GFS_FL_LAST 2 unsigned int flags; /* special handling required */ - int found; /* how many references were updated */ + int found; /* how many references were updated */ }; -/* ******************************************************** PROTOTYPES ***** */ static void growfs(int, int, unsigned int); static void rdfs(ufs2_daddr_t, size_t, void *, int); static void wtfs(ufs2_daddr_t, size_t, void *, int, unsigned int); @@ -158,7 +155,6 @@ static void indirchk(ufs_lbn_t, ufs_lbn_ struct gfs_bpp *, int, int, unsigned int); static void get_dev_size(int, int *); -/* ************************************************************ growfs ***** */ /* * Here we actually start growing the file system. We basically read the * cylinder summary from the first cylinder group as we want to update @@ -174,12 +170,12 @@ static void growfs(int fsi, int fso, unsigned int Nflag) { DBG_FUNC("growfs") - time_t modtime; - uint cylno; - int i, j, width; - char tmpbuf[100]; + time_t modtime; + uint cylno; + int i, j, width; + char tmpbuf[100]; #ifdef FSIRAND - static int randinit=0; + static int randinit=0; DBG_ENTER; @@ -198,37 +194,35 @@ growfs(int fsi, int fso, unsigned int Nf * Get the cylinder summary into the memory. */ fscs = (struct csum *)calloc((size_t)1, (size_t)sblock.fs_cssize); - if(fscs == NULL) { + if (fscs == NULL) errx(1, "calloc failed"); - } for (i = 0; i < osblock.fs_cssize; i += osblock.fs_bsize) { rdfs(fsbtodb(&osblock, osblock.fs_csaddr + numfrags(&osblock, i)), (size_t)MIN(osblock.fs_cssize - i, - osblock.fs_bsize), (void *)(((char *)fscs)+i), fsi); + osblock.fs_bsize), (void *)(((char *)fscs) + i), fsi); } #ifdef FS_DEBUG -{ - struct csum *dbg_csp; - int dbg_csc; - char dbg_line[80]; - - dbg_csp=fscs; - for(dbg_csc=0; dbg_csc= width) { printf("\n"); i = 0; @@ -288,20 +282,18 @@ growfs(int fsi, int fso, unsigned int Nf DBG_PRINT0("fscs written\n"); #ifdef FS_DEBUG -{ - struct csum *dbg_csp; - int dbg_csc; - char dbg_line[80]; - - dbg_csp=fscs; - for(dbg_csc=0; dbg_csc 0) @@ -549,7 +538,6 @@ initcg(int cylno, time_t modtime, int fs return; } -/* ******************************************************* frag_adjust ***** */ /* * Here we add or subtract (sign +1/-1) the available fragments in a given * block to or from the fragment statistics. By subtracting before and adding @@ -570,45 +558,38 @@ frag_adjust(ufs2_daddr_t frag, int sign) * Here frag only needs to point to any fragment in the block we want * to examine. */ - for(f=rounddown(frag, sblock.fs_frag); - ffound++; DBG_PRINT3("scg (%jd->%jd)[%d] reference updated\n", - (intmax_t)f->old, - (intmax_t)f->new, - fragnum); + (intmax_t)f->old, (intmax_t)f->new, fragnum); /* * Copy the block back immediately. @@ -669,7 +648,6 @@ cond_bl_upd(ufs2_daddr_t *block, struct return (0); } -/* ************************************************************ updjcg ***** */ /* * Here we do all needed work for the former last cylinder group. It has to be * changed in any case, even if the file system ended exactly on the end of @@ -685,10 +663,10 @@ static void updjcg(int cylno, time_t modtime, int fsi, int fso, unsigned int Nflag) { DBG_FUNC("updjcg") - ufs2_daddr_t cbase, dmax, dupper; - struct csum *cs; - int i,k; - int j=0; + ufs2_daddr_t cbase, dmax, dupper; + struct csum *cs; + int i, k; + int j = 0; DBG_ENTER; @@ -699,9 +677,7 @@ updjcg(int cylno, time_t modtime, int fs rdfs(fsbtodb(&osblock, cgtod(&osblock, cylno)), (size_t)osblock.fs_cgsize, (void *)&aocg, fsi); DBG_PRINT0("jcg read\n"); - DBG_DUMP_CG(&sblock, - "old joining cg", - &aocg); + DBG_DUMP_CG(&sblock, "old joining cg", &aocg); memcpy((void *)&cgun1, (void *)&cgun2, sizeof(cgun2)); @@ -713,16 +689,14 @@ updjcg(int cylno, time_t modtime, int fs * cylinder group we have to change that value now to fs_cpg. */ - if(cgbase(&osblock, cylno+1) == osblock.fs_size) { + if (cgbase(&osblock, cylno + 1) == osblock.fs_size) { if (sblock.fs_magic == FS_UFS1_MAGIC) acg.cg_old_ncyl=sblock.fs_old_cpg; wtfs(fsbtodb(&sblock, cgtod(&sblock, cylno)), (size_t)sblock.fs_cgsize, (void *)&acg, fso, Nflag); DBG_PRINT0("jcg written\n"); - DBG_DUMP_CG(&sblock, - "new joining cg", - &acg); + DBG_DUMP_CG(&sblock, "new joining cg", &acg); DBG_LEAVE; return; @@ -736,9 +710,8 @@ updjcg(int cylno, time_t modtime, int fs if (dmax > sblock.fs_size) dmax = sblock.fs_size; dupper = cgdmin(&sblock, cylno) - cbase; - if (cylno == 0) { /* XXX fscs may be relocated */ + if (cylno == 0) /* XXX fscs may be relocated */ dupper += howmany(sblock.fs_cssize, sblock.fs_fsize); - } /* * Set pointer to the cylinder summary for our cylinder group. @@ -760,21 +733,16 @@ updjcg(int cylno, time_t modtime, int fs } else { acg.cg_old_ncyl = sblock.fs_old_cpg; } - DBG_PRINT2("jcg dbg: %d %u", - cylno, - sblock.fs_ncg); + DBG_PRINT2("jcg dbg: %d %u", cylno, sblock.fs_ncg); #ifdef FS_DEBUG if (sblock.fs_magic == FS_UFS1_MAGIC) - DBG_PRINT2("%d %u", - acg.cg_old_ncyl, - sblock.fs_old_cpg); + DBG_PRINT2("%d %u", acg.cg_old_ncyl, sblock.fs_old_cpg); #endif DBG_PRINT0("\n"); acg.cg_ndblk = dmax - cbase; - sblock.fs_dsize += acg.cg_ndblk-aocg.cg_ndblk; - if (sblock.fs_contigsumsize > 0) { + sblock.fs_dsize += acg.cg_ndblk - aocg.cg_ndblk; + if (sblock.fs_contigsumsize > 0) acg.cg_nclusterblks = acg.cg_ndblk / sblock.fs_frag; - } /* * Now we have to update the free fragment bitmap for our new free @@ -788,15 +756,16 @@ updjcg(int cylno, time_t modtime, int fs * Handle the first new block here if it was partially available * before. */ - if(osblock.fs_size % sblock.fs_frag) { - if(roundup(osblock.fs_size, sblock.fs_frag)<=sblock.fs_size) { + if (osblock.fs_size % sblock.fs_frag) { + if (roundup(osblock.fs_size, sblock.fs_frag) <= + sblock.fs_size) { /* * The new space is enough to fill at least this * block */ - j=0; - for(i=roundup(osblock.fs_size-cbase, sblock.fs_frag)-1; - i>=osblock.fs_size-cbase; + j = 0; + for (i = roundup(osblock.fs_size - cbase, + sblock.fs_frag) - 1; i >= osblock.fs_size - cbase; i--) { setbit(cg_blksfree(&acg), i); acg.cg_cs.cs_nffree++; @@ -808,44 +777,43 @@ updjcg(int cylno, time_t modtime, int fs * already existing fragment at the former end of the * file system. */ - if(isblock(&sblock, cg_blksfree(&acg), - ((osblock.fs_size - cgbase(&sblock, cylno))/ - sblock.fs_frag))) { + if (isblock(&sblock, cg_blksfree(&acg), + ((osblock.fs_size - cgbase(&sblock, cylno)) / + sblock.fs_frag))) { /* * The block is now completely available. */ DBG_PRINT0("block was\n"); - acg.cg_frsum[osblock.fs_size%sblock.fs_frag]--; + acg.cg_frsum[osblock.fs_size % sblock.fs_frag]--; acg.cg_cs.cs_nbfree++; - acg.cg_cs.cs_nffree-=sblock.fs_frag; - k=rounddown(osblock.fs_size-cbase, + acg.cg_cs.cs_nffree -= sblock.fs_frag; + k = rounddown(osblock.fs_size - cbase, + sblock.fs_frag); + updclst((osblock.fs_size - cbase) / sblock.fs_frag); - updclst((osblock.fs_size-cbase)/sblock.fs_frag); } else { /* * Lets rejoin a possible partially growed * fragment. */ - k=0; - while(isset(cg_blksfree(&acg), i) && - (i>=rounddown(osblock.fs_size-cbase, + k = 0; + while (isset(cg_blksfree(&acg), i) && + (i >= rounddown(osblock.fs_size - cbase, sblock.fs_frag))) { i--; k++; } - if(k) { + if (k) acg.cg_frsum[k]--; - } - acg.cg_frsum[k+j]++; + acg.cg_frsum[k + j]++; } } else { /* * We only grow by some fragments within this last * block. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 17:06:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CA271065674; Mon, 5 Mar 2012 17:06:35 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B3478FC19; Mon, 5 Mar 2012 17:06:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25H6Zlt095204; Mon, 5 Mar 2012 17:06:35 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25H6ZtK095202; Mon, 5 Mar 2012 17:06:35 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201203051706.q25H6ZtK095202@svn.freebsd.org> From: Xin LI Date: Mon, 5 Mar 2012 17:06:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232549 - stable/8/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 17:06:35 -0000 Author: delphij Date: Mon Mar 5 17:06:34 2012 New Revision: 232549 URL: http://svn.freebsd.org/changeset/base/232549 Log: MFC r231888: Put the signal trap output to standard error instead of standard output. Without this change, pressing ^T could result in rc.d script putting junk strings like: Script running in configuration files when redirecting standard output to these files. Modified: stable/8/etc/rc.subr Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/rc.subr ============================================================================== --- stable/8/etc/rc.subr Mon Mar 5 16:37:51 2012 (r232548) +++ stable/8/etc/rc.subr Mon Mar 5 17:06:34 2012 (r232549) @@ -1027,9 +1027,9 @@ run_rc_script() if [ -n "$rc_fast_and_loose" ]; then set $_arg; . $_file else - ( trap "echo Script $_file interrupted; kill -QUIT $$" 3 - trap "echo Script $_file interrupted; exit 1" 2 - trap "echo Script $_file running" 29 + ( trap "echo Script $_file interrupted >&2 ; kill -QUIT $$" 3 + trap "echo Script $_file interrupted >&2 ; exit 1" 2 + trap "echo Script $_file running >&2" 29 set $_arg; . $_file ) fi fi From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 17:08:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 03597106566B; Mon, 5 Mar 2012 17:08:43 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E61D28FC0C; Mon, 5 Mar 2012 17:08:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25H8gY0095318; Mon, 5 Mar 2012 17:08:42 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25H8g1o095316; Mon, 5 Mar 2012 17:08:42 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201203051708.q25H8g1o095316@svn.freebsd.org> From: Xin LI Date: Mon, 5 Mar 2012 17:08:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232550 - stable/8/usr.sbin/pw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 17:08:43 -0000 Author: delphij Date: Mon Mar 5 17:08:42 2012 New Revision: 232550 URL: http://svn.freebsd.org/changeset/base/232550 Log: Backout r223115 and restore the historic behavior (create the default base directory in pw.conf). Modified: stable/8/usr.sbin/pw/pw_user.c Directory Properties: stable/8/usr.sbin/pw/ (props changed) Modified: stable/8/usr.sbin/pw/pw_user.c ============================================================================== --- stable/8/usr.sbin/pw/pw_user.c Mon Mar 5 17:06:34 2012 (r232549) +++ stable/8/usr.sbin/pw/pw_user.c Mon Mar 5 17:08:42 2012 (r232550) @@ -170,7 +170,7 @@ pw_user(struct userconf * cnf, int mode, * If we'll need to use it or we're updating it, * then create the base home directory if necessary */ - if ((arg != NULL || getarg(args, 'm') != NULL) && (getarg(args, 'd') == NULL)) { + if (arg != NULL || getarg(args, 'm') != NULL) { int l = strlen(cnf->home); if (l > 1 && cnf->home[l-1] == '/') /* Shave off any trailing path delimiter */ From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 17:09:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59FF8106566C; Mon, 5 Mar 2012 17:09:17 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3ECD98FC25; Mon, 5 Mar 2012 17:09:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25H9GZo095373; Mon, 5 Mar 2012 17:09:16 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25H9GkP095370; Mon, 5 Mar 2012 17:09:16 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201203051709.q25H9GkP095370@svn.freebsd.org> From: Xin LI Date: Mon, 5 Mar 2012 17:09:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232551 - stable/8/usr.sbin/cron/crontab X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 17:09:17 -0000 Author: delphij Date: Mon Mar 5 17:09:16 2012 New Revision: 232551 URL: http://svn.freebsd.org/changeset/base/232551 Log: MFC r232202: Drop setuid status while doing file operations to prevent potential information leak. This changeset is intended to be a minimal one to make backports easier. Reviewed by: kevlo, remko Modified: stable/8/usr.sbin/cron/crontab/crontab.c Directory Properties: stable/8/usr.sbin/cron/ (props changed) stable/8/usr.sbin/cron/crontab/ (props changed) Modified: stable/8/usr.sbin/cron/crontab/crontab.c ============================================================================== --- stable/8/usr.sbin/cron/crontab/crontab.c Mon Mar 5 17:08:42 2012 (r232550) +++ stable/8/usr.sbin/cron/crontab/crontab.c Mon Mar 5 17:09:16 2012 (r232551) @@ -194,6 +194,17 @@ parse_args(argc, argv) } if (Option == opt_replace) { + /* relinquish the setuid status of the binary during + * the open, lest nonroot users read files they should + * not be able to read. we can't use access() here + * since there's a race condition. thanks go out to + * Arnt Gulbrandsen for spotting + * the race. + */ + + if (swap_uids() < OK) + err(ERROR_EXIT, "swapping uids"); + /* we have to open the file here because we're going to * chdir(2) into /var/cron before we get around to * reading the file. @@ -204,21 +215,11 @@ parse_args(argc, argv) !strcmp(resolved_path, SYSCRONTAB)) { err(ERROR_EXIT, SYSCRONTAB " must be edited manually"); } else { - /* relinquish the setuid status of the binary during - * the open, lest nonroot users read files they should - * not be able to read. we can't use access() here - * since there's a race condition. thanks go out to - * Arnt Gulbrandsen for spotting - * the race. - */ - - if (swap_uids() < OK) - err(ERROR_EXIT, "swapping uids"); if (!(NewCrontab = fopen(Filename, "r"))) err(ERROR_EXIT, "%s", Filename); - if (swap_uids_back() < OK) - err(ERROR_EXIT, "swapping uids back"); } + if (swap_uids_back() < OK) + err(ERROR_EXIT, "swapping uids back"); } Debug(DMISC, ("user=%s, file=%s, option=%s\n", @@ -363,11 +364,15 @@ edit_cmd() { goto fatal; } again: + if (swap_uids() < OK) + err(ERROR_EXIT, "swapping uids"); if (stat(Filename, &statbuf) < 0) { warn("stat"); fatal: unlink(Filename); exit(ERROR_EXIT); } + if (swap_uids_back() < OK) + err(ERROR_EXIT, "swapping uids back"); if (statbuf.st_dev != fsbuf.st_dev || statbuf.st_ino != fsbuf.st_ino) errx(ERROR_EXIT, "temp file must be edited in place"); if (MD5File(Filename, orig_md5) == NULL) { @@ -433,6 +438,8 @@ edit_cmd() { editor, WTERMSIG(waiter), WCOREDUMP(waiter) ?"" :"no "); goto fatal; } + if (swap_uids() < OK) + err(ERROR_EXIT, "swapping uids"); if (stat(Filename, &statbuf) < 0) { warn("stat"); goto fatal; @@ -443,6 +450,8 @@ edit_cmd() { warn("MD5"); goto fatal; } + if (swap_uids_back() < OK) + err(ERROR_EXIT, "swapping uids back"); if (strcmp(orig_md5, new_md5) == 0 && !syntax_error) { warnx("no changes made to crontab"); goto remove; From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 17:33:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1779F106566B; Mon, 5 Mar 2012 17:33:02 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F1A608FC13; Mon, 5 Mar 2012 17:33:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25HX1R7096156; Mon, 5 Mar 2012 17:33:01 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25HX1CM096134; Mon, 5 Mar 2012 17:33:01 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201203051733.q25HX1CM096134@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 5 Mar 2012 17:33:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232552 - in stable/8: contrib/netcat etc etc/rc.d share/man/man4 sys/contrib/pf/net sys/fs/nfsclient sys/i386/conf sys/kern sys/net sys/netinet sys/netinet/ipfw sys/netinet6 sys/netips... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 17:33:02 -0000 Author: bz Date: Mon Mar 5 17:33:01 2012 New Revision: 232552 URL: http://svn.freebsd.org/changeset/base/232552 Log: MFC r231852,232127: Merge multi-FIB IPv6 support. Extend the so far IPv4-only support for multiple routing tables (FIBs) introduced in r178888 to IPv6 providing feature parity. This includes an extended rtalloc(9) KPI for IPv6, the necessary adjustments to the network stack, and user land support as in netstat. Sponsored by: Cisco Systems, Inc. Modified: stable/8/contrib/netcat/netcat.c stable/8/etc/network.subr stable/8/etc/rc.d/network_ipv6 stable/8/etc/rc.d/routing stable/8/share/man/man4/faith.4 stable/8/sys/contrib/pf/net/pf.c stable/8/sys/contrib/pf/net/pf_ioctl.c stable/8/sys/fs/nfsclient/nfs_clport.c stable/8/sys/fs/nfsclient/nfs_clvfsops.c stable/8/sys/kern/uipc_socket.c stable/8/sys/net/flowtable.c stable/8/sys/net/if_faith.c stable/8/sys/net/route.c stable/8/sys/net/route.h stable/8/sys/netinet/in.c stable/8/sys/netinet/ipfw/ip_fw2.c stable/8/sys/netinet/sctp_os_bsd.h stable/8/sys/netinet/tcp_subr.c stable/8/sys/netinet6/icmp6.c stable/8/sys/netinet6/in6.c stable/8/sys/netinet6/in6_gif.c stable/8/sys/netinet6/in6_ifattach.c stable/8/sys/netinet6/in6_mcast.c stable/8/sys/netinet6/in6_rmx.c stable/8/sys/netinet6/in6_src.c stable/8/sys/netinet6/in6_var.h stable/8/sys/netinet6/ip6_forward.c stable/8/sys/netinet6/ip6_input.c stable/8/sys/netinet6/ip6_output.c stable/8/sys/netinet6/ip6_var.h stable/8/sys/netinet6/nd6.c stable/8/sys/netinet6/nd6_nbr.c stable/8/sys/netinet6/nd6_rtr.c stable/8/sys/netinet6/raw_ip6.c stable/8/sys/netipsec/ipsec_output.c stable/8/sys/nfs/bootp_subr.c stable/8/sys/nfsclient/nfs_vfsops.c stable/8/usr.bin/netstat/route.c (contents, props changed) Directory Properties: stable/8/contrib/netcat/ (props changed) stable/8/etc/ (props changed) stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/sys/i386/conf/XENHVM (props changed) stable/8/usr.bin/netstat/ (props changed) stable/8/usr.bin/netstat/Makefile (props changed) stable/8/usr.bin/netstat/atalk.c (props changed) stable/8/usr.bin/netstat/bpf.c (props changed) stable/8/usr.bin/netstat/if.c (props changed) stable/8/usr.bin/netstat/inet.c (props changed) stable/8/usr.bin/netstat/inet6.c (props changed) stable/8/usr.bin/netstat/ipsec.c (props changed) stable/8/usr.bin/netstat/ipx.c (props changed) stable/8/usr.bin/netstat/main.c (props changed) stable/8/usr.bin/netstat/mbuf.c (props changed) stable/8/usr.bin/netstat/mroute.c (props changed) stable/8/usr.bin/netstat/mroute6.c (props changed) stable/8/usr.bin/netstat/netgraph.c (props changed) stable/8/usr.bin/netstat/netisr.c (props changed) stable/8/usr.bin/netstat/netstat.1 (props changed) stable/8/usr.bin/netstat/netstat.h (props changed) stable/8/usr.bin/netstat/pfkey.c (props changed) stable/8/usr.bin/netstat/sctp.c (props changed) stable/8/usr.bin/netstat/unix.c (props changed) Modified: stable/8/contrib/netcat/netcat.c ============================================================================== --- stable/8/contrib/netcat/netcat.c Mon Mar 5 17:09:16 2012 (r232551) +++ stable/8/contrib/netcat/netcat.c Mon Mar 5 17:33:01 2012 (r232552) @@ -605,8 +605,10 @@ remote_connect(const char *host, const c #endif if (rtableid) { - if (setfib(rtableid) == -1) - err(1, "setfib"); + if (setsockopt(s, SOL_SOCKET, SO_SETFIB, &rtableid, + sizeof(rtableid)) == -1) + err(1, "setsockopt(.., SO_SETFIB, %u, ..)", + rtableid); } /* Bind to a local port or source address if specified. */ @@ -678,8 +680,11 @@ local_listen(char *host, char *port, str continue; if (rtableid) { - if (setfib(rtableid) == -1) - err(1, "setfib"); + ret = setsockopt(s, SOL_SOCKET, SO_SETFIB, &rtableid, + sizeof(rtableid)); + if (ret == -1) + err(1, "setsockopt(.., SO_SETFIB, %u, ..)", + rtableid); } ret = setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof(x)); Modified: stable/8/etc/network.subr ============================================================================== --- stable/8/etc/network.subr Mon Mar 5 17:09:16 2012 (r232551) +++ stable/8/etc/network.subr Mon Mar 5 17:33:01 2012 (r232552) @@ -1125,16 +1125,33 @@ network6_default_interface_setup() ;; esac + # Get the number of FIBs supported. + fibs=`sysctl -n net.fibs` + : ${fibs:=1} + # Disallow unicast packets without outgoing scope identifiers, # or route such packets to a "default" interface, if it is specified. route add -inet6 fe80:: -prefixlen 10 ::1 -reject case ${ipv6_default_interface} in [Nn][Oo] | '') - route add -inet6 ff02:: -prefixlen 16 ::1 -reject + i=0 + while test ${i} -lt ${fibs}; do + setfib -F ${i} \ + route add -inet6 ff02:: -prefixlen 16 ::1 -reject + i=$((i + 1)) + done ;; *) laddr=`network6_getladdr ${ipv6_default_interface}` + # Only add the laddr route to the default FIB and a reject + # route to all others. route add -inet6 ff02:: ${laddr} -prefixlen 16 -interface + i=1 + while test ${i} -lt ${fibs}; do + setfib -F ${i} \ + route add -inet6 ff02:: -prefixlen 16 ::1 -reject + i=$((i + 1)) + done # Disable installing the default interface with the # case net.inet6.ip6.forwarding=0 and Modified: stable/8/etc/rc.d/network_ipv6 ============================================================================== --- stable/8/etc/rc.d/network_ipv6 Mon Mar 5 17:09:16 2012 (r232551) +++ stable/8/etc/rc.d/network_ipv6 Mon Mar 5 17:33:01 2012 (r232552) @@ -41,6 +41,7 @@ start_cmd="network_ipv6_start" network_ipv6_start() { + case ${ipv6_network_interfaces} in [Aa][Uu][Tt][Oo]) # Get a list of network interfaces Modified: stable/8/etc/rc.d/routing ============================================================================== --- stable/8/etc/rc.d/routing Mon Mar 5 17:09:16 2012 (r232551) +++ stable/8/etc/rc.d/routing Mon Mar 5 17:33:01 2012 (r232552) @@ -61,9 +61,21 @@ static_start() # Disallow "internal" addresses to appear on the wire if inet6 # is enabled. if afexists inet6; then + local fibs i + + # Get the number of FIBs supported. + fibs=`sysctl -n net.fibs` + : ${fibs:=1} + # disallow "internal" addresses to appear on the wire - route add -inet6 ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject - route add -inet6 ::0.0.0.0 -prefixlen 96 ::1 -reject + i=0 + while test ${i} -lt ${fibs}; do + setfib -F ${i} route add -inet6 \ + ::ffff:0.0.0.0 -prefixlen 96 ::1 -reject + setfib -F ${i} route add -inet6 \ + ::0.0.0.0 -prefixlen 96 ::1 -reject + i=$((i + 1)) + done fi } Modified: stable/8/share/man/man4/faith.4 ============================================================================== --- stable/8/share/man/man4/faith.4 Mon Mar 5 17:09:16 2012 (r232551) +++ stable/8/share/man/man4/faith.4 Mon Mar 5 17:33:01 2012 (r232552) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 10, 1999 +.Dd January 23, 2012 .Dt FAITH 4 .Os .Sh NAME @@ -58,7 +58,7 @@ variable in .Xr rc.conf 5 . .Pp Special action will be taken when IPv6 TCP traffic is seen on a router, -and the routing table suggests to route it to the +and the default routing table suggests to route it to the .Nm interface. In this case, the packet will be accepted by the router, Modified: stable/8/sys/contrib/pf/net/pf.c ============================================================================== --- stable/8/sys/contrib/pf/net/pf.c Mon Mar 5 17:09:16 2012 (r232551) +++ stable/8/sys/contrib/pf/net/pf.c Mon Mar 5 17:33:01 2012 (r232552) @@ -3197,11 +3197,7 @@ pf_calc_mss(struct pf_addr *addr, sa_fam dst->sin_len = sizeof(*dst); dst->sin_addr = addr->v4; #ifdef __FreeBSD__ -#ifdef RTF_PRCLONING - rtalloc_ign(&ro, (RTF_CLONING | RTF_PRCLONING)); -#else /* !RTF_PRCLONING */ - in_rtalloc_ign(&ro, 0, 0); -#endif + in_rtalloc_ign(&ro, 0, RT_DEFAULT_FIB); #else /* ! __FreeBSD__ */ rtalloc_noclone(&ro, NO_CLONING); #endif @@ -3217,12 +3213,7 @@ pf_calc_mss(struct pf_addr *addr, sa_fam dst6->sin6_len = sizeof(*dst6); dst6->sin6_addr = addr->v6; #ifdef __FreeBSD__ -#ifdef RTF_PRCLONING - rtalloc_ign((struct route *)&ro6, - (RTF_CLONING | RTF_PRCLONING)); -#else /* !RTF_PRCLONING */ - rtalloc_ign((struct route *)&ro6, 0); -#endif + in6_rtalloc_ign(&ro6, 0, RT_DEFAULT_FIB); #else /* ! __FreeBSD__ */ rtalloc_noclone((struct route *)&ro6, NO_CLONING); #endif @@ -6134,9 +6125,11 @@ pf_routable(struct pf_addr *addr, sa_fam #ifdef __FreeBSD__ /* XXX MRT not always INET */ /* stick with table 0 though */ if (af == AF_INET) - in_rtalloc_ign((struct route *)&ro, 0, 0); + in_rtalloc_ign((struct route *)&ro, 0, RT_DEFAULT_FIB); +#ifdef INET6 else - rtalloc_ign((struct route *)&ro, 0); + in6_rtalloc_ign(&ro, 0, RT_DEFAULT_FIB); +#endif #else /* ! __FreeBSD__ */ rtalloc_noclone((struct route *)&ro, NO_CLONING); #endif @@ -6212,14 +6205,12 @@ pf_rtlabel_match(struct pf_addr *addr, s } #ifdef __FreeBSD__ -# ifdef RTF_PRCLONING - rtalloc_ign((struct route *)&ro, (RTF_CLONING|RTF_PRCLONING)); -# else /* !RTF_PRCLONING */ if (af == AF_INET) - in_rtalloc_ign((struct route *)&ro, 0, 0); + in_rtalloc_ign((struct route *)&ro, 0, RT_DEFAULT_FIB); +#ifdef INET6 else - rtalloc_ign((struct route *)&ro, 0); -# endif + in6_rtalloc_ign(&ro, 0, RT_DEFAULT_FIB); +#endif #else /* ! __FreeBSD__ */ rtalloc_noclone((struct route *)&ro, NO_CLONING); #endif Modified: stable/8/sys/contrib/pf/net/pf_ioctl.c ============================================================================== --- stable/8/sys/contrib/pf/net/pf_ioctl.c Mon Mar 5 17:09:16 2012 (r232551) +++ stable/8/sys/contrib/pf/net/pf_ioctl.c Mon Mar 5 17:33:01 2012 (r232552) @@ -1531,7 +1531,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t a } #ifdef __FreeBSD__ /* ROUTING */ - if (rule->rtableid > 0 && rule->rtableid > rt_numfibs) + if (rule->rtableid > 0 && rule->rtableid >= rt_numfibs) #else if (rule->rtableid > 0 && !rtable_exists(rule->rtableid)) #endif @@ -1794,7 +1794,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t a if (newrule->rtableid > 0 && #ifdef __FreeBSD__ /* ROUTING */ - newrule->rtableid > rt_numfibs) + newrule->rtableid >= rt_numfibs) #else !rtable_exists(newrule->rtableid)) #endif Modified: stable/8/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clport.c Mon Mar 5 17:09:16 2012 (r232551) +++ stable/8/sys/fs/nfsclient/nfs_clport.c Mon Mar 5 17:33:01 2012 (r232552) @@ -946,7 +946,8 @@ nfscl_getmyip(struct nfsmount *nmp, int sad.sin_len = sizeof (struct sockaddr_in); sad.sin_addr.s_addr = sin->sin_addr.s_addr; CURVNET_SET(CRED_TO_VNET(nmp->nm_sockreq.nr_cred)); - rt = rtalloc1((struct sockaddr *)&sad, 0, 0UL); + rt = rtalloc1_fib((struct sockaddr *)&sad, 0, 0UL, + curthread->td_proc->p_fibnum); if (rt != NULL) { if (rt->rt_ifp != NULL && rt->rt_ifa != NULL && @@ -971,7 +972,8 @@ nfscl_getmyip(struct nfsmount *nmp, int sad6.sin6_len = sizeof (struct sockaddr_in6); sad6.sin6_addr = sin6->sin6_addr; CURVNET_SET(CRED_TO_VNET(nmp->nm_sockreq.nr_cred)); - rt = rtalloc1((struct sockaddr *)&sad6, 0, 0UL); + rt = rtalloc1_fib((struct sockaddr *)&sad6, 0, 0UL, + curthread->td_proc->p_fibnum); if (rt != NULL) { if (rt->rt_ifp != NULL && rt->rt_ifa != NULL && Modified: stable/8/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clvfsops.c Mon Mar 5 17:09:16 2012 (r232551) +++ stable/8/sys/fs/nfsclient/nfs_clvfsops.c Mon Mar 5 17:33:01 2012 (r232552) @@ -455,10 +455,10 @@ nfs_mountroot(struct mount *mp) sin.sin_len = sizeof(sin); /* XXX MRT use table 0 for this sort of thing */ CURVNET_SET(TD_TO_VNET(td)); - error = rtrequest(RTM_ADD, (struct sockaddr *)&sin, + error = rtrequest_fib(RTM_ADD, (struct sockaddr *)&sin, (struct sockaddr *)&nd->mygateway, (struct sockaddr *)&mask, - RTF_UP | RTF_GATEWAY, NULL); + RTF_UP | RTF_GATEWAY, NULL, RT_DEFAULT_FIB); CURVNET_RESTORE(); if (error) panic("nfs_mountroot: RTM_ADD: %d", error); Modified: stable/8/sys/kern/uipc_socket.c ============================================================================== --- stable/8/sys/kern/uipc_socket.c Mon Mar 5 17:09:16 2012 (r232551) +++ stable/8/sys/kern/uipc_socket.c Mon Mar 5 17:33:01 2012 (r232552) @@ -383,6 +383,7 @@ socreate(int dom, struct socket **aso, i so->so_type = type; so->so_cred = crhold(cred); if ((prp->pr_domain->dom_family == PF_INET) || + (prp->pr_domain->dom_family == PF_INET6) || (prp->pr_domain->dom_family == PF_ROUTE)) so->so_fibnum = td->td_proc->p_fibnum; else @@ -2498,6 +2499,7 @@ sosetopt(struct socket *so, struct socko } if (so->so_proto != NULL && ((so->so_proto->pr_domain->dom_family == PF_INET) || + (so->so_proto->pr_domain->dom_family == PF_INET6) || (so->so_proto->pr_domain->dom_family == PF_ROUTE))) { so->so_fibnum = optval; /* Note: ignore error */ Modified: stable/8/sys/net/flowtable.c ============================================================================== --- stable/8/sys/net/flowtable.c Mon Mar 5 17:09:16 2012 (r232551) +++ stable/8/sys/net/flowtable.c Mon Mar 5 17:33:01 2012 (r232552) @@ -373,7 +373,7 @@ SYSCTL_VNET_PROC(_net_inet_flowtable, OI #ifndef RADIX_MPATH static void -in_rtalloc_ign_wrapper(struct route *ro, uint32_t hash, u_int fibnum) +rtalloc_ign_wrapper(struct route *ro, uint32_t hash, u_int fibnum) { rtalloc_ign_fib(ro, 0, fibnum); @@ -1315,7 +1315,7 @@ flowtable_alloc(char *name, int nentry, #ifdef RADIX_MPATH ft->ft_rtalloc = rtalloc_mpath_fib; #else - ft->ft_rtalloc = in_rtalloc_ign_wrapper; + ft->ft_rtalloc = rtalloc_ign_wrapper; #endif if (flags & FL_PCPU) { ft->ft_lock = flowtable_pcpu_lock; Modified: stable/8/sys/net/if_faith.c ============================================================================== --- stable/8/sys/net/if_faith.c Mon Mar 5 17:09:16 2012 (r232551) +++ stable/8/sys/net/if_faith.c Mon Mar 5 17:33:01 2012 (r232552) @@ -338,7 +338,7 @@ faithprefix(in6) sin6.sin6_family = AF_INET6; sin6.sin6_len = sizeof(struct sockaddr_in6); sin6.sin6_addr = *in6; - rt = rtalloc1((struct sockaddr *)&sin6, 0, 0UL); + rt = in6_rtalloc1((struct sockaddr *)&sin6, 0, 0UL, RT_DEFAULT_FIB); if (rt && rt->rt_ifp && rt->rt_ifp->if_type == IFT_FAITH && (rt->rt_ifp->if_flags & IFF_UP) != 0) ret = 1; Modified: stable/8/sys/net/route.c ============================================================================== --- stable/8/sys/net/route.c Mon Mar 5 17:09:16 2012 (r232551) +++ stable/8/sys/net/route.c Mon Mar 5 17:33:01 2012 (r232552) @@ -35,6 +35,7 @@ ***********************************************************************/ #include "opt_inet.h" +#include "opt_inet6.h" #include "opt_route.h" #include "opt_mrouting.h" #include "opt_mpath.h" @@ -72,7 +73,11 @@ SYSCTL_INT(_net, OID_AUTO, fibs, CTLFLAG /* * Allow the boot code to allow LESS than RT_MAXFIBS to be used. * We can't do more because storage is statically allocated for now. - * (for compatibility reasons.. this will change). + * (for compatibility reasons.. this will change. When this changes, code should + * be refactored to protocol independent parts and protocol dependent parts, + * probably hanging of domain(9) specific storage to not need the full + * fib * af RNH allocation etc. but allow tuning the number of tables per + * address family). */ TUNABLE_INT("net.fibs", &rt_numfibs); @@ -82,6 +87,9 @@ TUNABLE_INT("net.fibs", &rt_numfibs); * changes for the FIB of the caller when adding a new set of addresses * to an interface. XXX this is a shotgun aproach to a problem that needs * a more fine grained solution.. that will come. + * XXX also has the problems getting the FIB from curthread which will not + * always work given the fib can be overridden and prefixes can be added + * from the network stack context. */ u_int rt_add_addr_allfibs = 1; SYSCTL_INT(_net, OID_AUTO, add_addr_allfibs, CTLFLAG_RW, @@ -196,27 +204,23 @@ vnet_route_init(const void *unused __unu V_rtzone = uma_zcreate("rtentry", sizeof(struct rtentry), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); for (dom = domains; dom; dom = dom->dom_next) { - if (dom->dom_rtattach) { - for (table = 0; table < rt_numfibs; table++) { - if ( (fam = dom->dom_family) == AF_INET || - table == 0) { - /* for now only AF_INET has > 1 table */ - /* XXX MRT - * rtattach will be also called - * from vfs_export.c but the - * offset will be 0 - * (only for AF_INET and AF_INET6 - * which don't need it anyhow) - */ - rnh = rt_tables_get_rnh_ptr(table, fam); - if (rnh == NULL) - panic("%s: rnh NULL", __func__); - dom->dom_rtattach((void **)rnh, - dom->dom_rtoffset); - } else { - break; - } - } + if (dom->dom_rtattach == NULL) + continue; + + for (table = 0; table < rt_numfibs; table++) { + fam = dom->dom_family; + if (table != 0 && fam != AF_INET6 && fam != AF_INET) + break; + + /* + * XXX MRT rtattach will be also called from + * vfs_export.c but the offset will be 0 (only for + * AF_INET and AF_INET6 which don't need it anyhow). + */ + rnh = rt_tables_get_rnh_ptr(table, fam); + if (rnh == NULL) + panic("%s: rnh NULL", __func__); + dom->dom_rtattach((void **)rnh, dom->dom_rtoffset); } } } @@ -233,20 +237,19 @@ vnet_route_uninit(const void *unused __u struct radix_node_head **rnh; for (dom = domains; dom; dom = dom->dom_next) { - if (dom->dom_rtdetach) { - for (table = 0; table < rt_numfibs; table++) { - if ( (fam = dom->dom_family) == AF_INET || - table == 0) { - /* For now only AF_INET has > 1 tbl. */ - rnh = rt_tables_get_rnh_ptr(table, fam); - if (rnh == NULL) - panic("%s: rnh NULL", __func__); - dom->dom_rtdetach((void **)rnh, - dom->dom_rtoffset); - } else { - break; - } - } + if (dom->dom_rtdetach == NULL) + continue; + + for (table = 0; table < rt_numfibs; table++) { + fam = dom->dom_family; + + if (table != 0 && fam != AF_INET6 && fam != AF_INET) + break; + + rnh = rt_tables_get_rnh_ptr(table, fam); + if (rnh == NULL) + panic("%s: rnh NULL", __func__); + dom->dom_rtdetach((void **)rnh, dom->dom_rtoffset); } } } @@ -274,7 +277,8 @@ setfib(struct thread *td, struct setfib_ void rtalloc(struct route *ro) { - rtalloc_ign_fib(ro, 0UL, 0); + + rtalloc_ign_fib(ro, 0UL, RT_DEFAULT_FIB); } void @@ -294,7 +298,7 @@ rtalloc_ign(struct route *ro, u_long ign RTFREE(rt); ro->ro_rt = NULL; } - ro->ro_rt = rtalloc1_fib(&ro->ro_dst, 1, ignore, 0); + ro->ro_rt = rtalloc1_fib(&ro->ro_dst, 1, ignore, RT_DEFAULT_FIB); if (ro->ro_rt) RT_UNLOCK(ro->ro_rt); } @@ -324,7 +328,8 @@ rtalloc_ign_fib(struct route *ro, u_long struct rtentry * rtalloc1(struct sockaddr *dst, int report, u_long ignflags) { - return (rtalloc1_fib(dst, report, ignflags, 0)); + + return (rtalloc1_fib(dst, report, ignflags, RT_DEFAULT_FIB)); } struct rtentry * @@ -339,8 +344,15 @@ rtalloc1_fib(struct sockaddr *dst, int r int needlock; KASSERT((fibnum < rt_numfibs), ("rtalloc1_fib: bad fibnum")); - if (dst->sa_family != AF_INET) /* Only INET supports > 1 fib now */ - fibnum = 0; + switch (dst->sa_family) { + case AF_INET6: + case AF_INET: + /* We support multiple FIBs. */ + break; + default: + fibnum = RT_DEFAULT_FIB; + break; + } rnh = rt_tables_get_rnh(fibnum, dst->sa_family); newrt = NULL; if (rnh == NULL) @@ -486,7 +498,8 @@ rtredirect(struct sockaddr *dst, int flags, struct sockaddr *src) { - rtredirect_fib(dst, gateway, netmask, flags, src, 0); + + rtredirect_fib(dst, gateway, netmask, flags, src, RT_DEFAULT_FIB); } void @@ -617,7 +630,8 @@ out: int rtioctl(u_long req, caddr_t data) { - return (rtioctl_fib(req, data, 0)); + + return (rtioctl_fib(req, data, RT_DEFAULT_FIB)); } /* @@ -647,7 +661,8 @@ rtioctl_fib(u_long req, caddr_t data, u_ struct ifaddr * ifa_ifwithroute(int flags, struct sockaddr *dst, struct sockaddr *gateway) { - return (ifa_ifwithroute_fib(flags, dst, gateway, 0)); + + return (ifa_ifwithroute_fib(flags, dst, gateway, RT_DEFAULT_FIB)); } struct ifaddr * @@ -732,7 +747,9 @@ rtrequest(int req, int flags, struct rtentry **ret_nrt) { - return (rtrequest_fib(req, dst, gateway, netmask, flags, ret_nrt, 0)); + + return (rtrequest_fib(req, dst, gateway, netmask, flags, ret_nrt, + RT_DEFAULT_FIB)); } int @@ -771,7 +788,8 @@ rtrequest_fib(int req, int rt_getifa(struct rt_addrinfo *info) { - return (rt_getifa_fib(info, 0)); + + return (rt_getifa_fib(info, RT_DEFAULT_FIB)); } /* @@ -1029,8 +1047,16 @@ rtrequest1_fib(int req, struct rt_addrin #define senderr(x) { error = x ; goto bad; } KASSERT((fibnum < rt_numfibs), ("rtrequest1_fib: bad fibnum")); - if (dst->sa_family != AF_INET) /* Only INET supports > 1 fib now */ - fibnum = 0; + switch (dst->sa_family) { + case AF_INET6: + case AF_INET: + /* We support multiple FIBs. */ + break; + default: + fibnum = RT_DEFAULT_FIB; + break; + } + /* * Find the correct routing tree to use for this Address Family */ @@ -1136,8 +1162,7 @@ rtrequest1_fib(int req, struct rt_addrin rt->rt_flags = RTF_UP | flags; rt->rt_fibnum = fibnum; /* - * Add the gateway. Possibly re-malloc-ing the storage for it - * + * Add the gateway. Possibly re-malloc-ing the storage for it. */ RT_LOCK(rt); if ((error = rt_setgate(rt, dst, gateway)) != 0) { @@ -1186,12 +1211,17 @@ rtrequest1_fib(int req, struct rt_addrin #ifdef FLOWTABLE rt0 = NULL; - /* XXX - * "flow-table" only support IPv4 at the moment. - * XXX-BZ as of r205066 it would support IPv6. - */ + /* "flow-table" only supports IPv6 and IPv4 at the moment. */ + switch (dst->sa_family) { +#ifdef notyet +#ifdef INET6 + case AF_INET6: +#endif +#endif #ifdef INET - if (dst->sa_family == AF_INET) { + case AF_INET: +#endif +#if defined(INET6) || defined(INET) rn = rnh->rnh_matchaddr(dst, rnh); if (rn && ((rn->rn_flags & RNF_ROOT) == 0)) { struct sockaddr *mask; @@ -1230,9 +1260,9 @@ rtrequest1_fib(int req, struct rt_addrin } } } +#endif/* INET6 || INET */ } -#endif -#endif +#endif /* FLOWTABLE */ /* XXX mtu manipulation will be done in rnh_addaddr -- itojun */ rn = rnh->rnh_addaddr(ndst, netmask, rnh, rt->rt_nodes); @@ -1254,9 +1284,20 @@ rtrequest1_fib(int req, struct rt_addrin } #ifdef FLOWTABLE else if (rt0 != NULL) { + switch (dst->sa_family) { +#ifdef notyet +#ifdef INET6 + case AF_INET6: + flowtable_route_flush(V_ip6_ft, rt0); + break; +#endif +#endif #ifdef INET - flowtable_route_flush(V_ip_ft, rt0); + case AF_INET: + flowtable_route_flush(V_ip_ft, rt0); + break; #endif + } RTFREE(rt0); } #endif @@ -1388,8 +1429,17 @@ rtinit1(struct ifaddr *ifa, int cmd, int dst = ifa->ifa_addr; netmask = ifa->ifa_netmask; } - if ( dst->sa_family != AF_INET) - fibnum = 0; + if (dst->sa_len == 0) + return(EINVAL); + switch (dst->sa_family) { + case AF_INET6: + case AF_INET: + /* We support multiple FIBs. */ + break; + default: + fibnum = RT_DEFAULT_FIB; + break; + } if (fibnum == -1) { if (rt_add_addr_allfibs == 0 && cmd == (int)RTM_ADD) { startfib = endfib = curthread->td_proc->p_fibnum; @@ -1402,8 +1452,6 @@ rtinit1(struct ifaddr *ifa, int cmd, int startfib = fibnum; endfib = fibnum; } - if (dst->sa_len == 0) - return(EINVAL); /* * If it's a delete, check that if it exists, @@ -1427,9 +1475,7 @@ rtinit1(struct ifaddr *ifa, int cmd, int * Now go through all the requested tables (fibs) and do the * requested action. Realistically, this will either be fib 0 * for protocols that don't do multiple tables or all the - * tables for those that do. XXX For this version only AF_INET. - * When that changes code should be refactored to protocol - * independent parts and protocol dependent parts. + * tables for those that do. */ for ( fibnum = startfib; fibnum <= endfib; fibnum++) { if (cmd == RTM_DELETE) { @@ -1569,12 +1615,14 @@ rtinit1(struct ifaddr *ifa, int cmd, int return (error); } +#ifndef BURN_BRIDGES /* special one for inet internal use. may not use. */ int rtinit_fib(struct ifaddr *ifa, int cmd, int flags) { return (rtinit1(ifa, cmd, flags, -1)); } +#endif /* * Set up a routing table entry, normally @@ -1584,7 +1632,7 @@ int rtinit(struct ifaddr *ifa, int cmd, int flags) { struct sockaddr *dst; - int fib = 0; + int fib = RT_DEFAULT_FIB; if (flags & RTF_HOST) { dst = ifa->ifa_dstaddr; @@ -1592,7 +1640,12 @@ rtinit(struct ifaddr *ifa, int cmd, int dst = ifa->ifa_addr; } - if (dst->sa_family == AF_INET) + switch (dst->sa_family) { + case AF_INET6: + case AF_INET: + /* We do support multiple FIBs. */ fib = -1; + break; + } return (rtinit1(ifa, cmd, flags, fib)); } Modified: stable/8/sys/net/route.h ============================================================================== --- stable/8/sys/net/route.h Mon Mar 5 17:09:16 2012 (r232551) +++ stable/8/sys/net/route.h Mon Mar 5 17:33:01 2012 (r232552) @@ -107,6 +107,7 @@ struct rt_metrics { #endif #endif +#define RT_DEFAULT_FIB 0 /* Explicitly mark fib=0 restricted cases */ extern u_int rt_numfibs; /* number fo usable routing tables */ /* * XXX kernel function pointer `rt_output' is visible to applications. @@ -401,8 +402,10 @@ void rtredirect(struct sockaddr *, stru int rtrequest(int, struct sockaddr *, struct sockaddr *, struct sockaddr *, int, struct rtentry **); +#ifndef BURN_BRIDGES /* defaults to "all" FIBs */ int rtinit_fib(struct ifaddr *, int, int); +#endif /* XXX MRT NEW VERSIONS THAT USE FIBs * For now the protocol indepedent versions are the same as the AF_INET ones Modified: stable/8/sys/netinet/in.c ============================================================================== --- stable/8/sys/netinet/in.c Mon Mar 5 17:09:16 2012 (r232551) +++ stable/8/sys/netinet/in.c Mon Mar 5 17:33:01 2012 (r232552) @@ -957,7 +957,7 @@ in_ifinit(struct ifnet *ifp, struct in_i bzero(&ia_ro, sizeof(ia_ro)); *((struct sockaddr_in *)(&ia_ro.ro_dst)) = ia->ia_addr; - rtalloc_ign_fib(&ia_ro, 0, 0); + rtalloc_ign_fib(&ia_ro, 0, RT_DEFAULT_FIB); if ((ia_ro.ro_rt != NULL) && (ia_ro.ro_rt->rt_ifp != NULL) && (ia_ro.ro_rt->rt_ifp == V_loif)) { RT_LOCK(ia_ro.ro_rt); Modified: stable/8/sys/netinet/ipfw/ip_fw2.c ============================================================================== --- stable/8/sys/netinet/ipfw/ip_fw2.c Mon Mar 5 17:09:16 2012 (r232551) +++ stable/8/sys/netinet/ipfw/ip_fw2.c Mon Mar 5 17:33:01 2012 (r232552) @@ -494,7 +494,7 @@ search_ip6_addr_net (struct in6_addr * i } static int -verify_path6(struct in6_addr *src, struct ifnet *ifp) +verify_path6(struct in6_addr *src, struct ifnet *ifp, u_int fib) { struct route_in6 ro; struct sockaddr_in6 *dst; @@ -505,9 +505,8 @@ verify_path6(struct in6_addr *src, struc dst->sin6_family = AF_INET6; dst->sin6_len = sizeof(*dst); dst->sin6_addr = *src; - /* XXX MRT 0 for ipv6 at this time */ - rtalloc_ign((struct route *)&ro, 0); + in6_rtalloc_ign(&ro, 0, fib); if (ro.ro_rt == NULL) return 0; @@ -1682,7 +1681,7 @@ do { \ #ifdef INET6 is_ipv6 ? verify_path6(&(args->f_id.src_ip6), - m->m_pkthdr.rcvif) : + m->m_pkthdr.rcvif, args->f_id.fib) : #endif verify_path(src_ip, m->m_pkthdr.rcvif, args->f_id.fib))); @@ -1694,7 +1693,7 @@ do { \ #ifdef INET6 is_ipv6 ? verify_path6(&(args->f_id.src_ip6), - NULL) : + NULL, args->f_id.fib) : #endif verify_path(src_ip, NULL, args->f_id.fib))); break; @@ -1712,7 +1711,8 @@ do { \ #ifdef INET6 is_ipv6 ? verify_path6( &(args->f_id.src_ip6), - m->m_pkthdr.rcvif) : + m->m_pkthdr.rcvif, + args->f_id.fib) : #endif verify_path(src_ip, m->m_pkthdr.rcvif, Modified: stable/8/sys/netinet/sctp_os_bsd.h ============================================================================== --- stable/8/sys/netinet/sctp_os_bsd.h Mon Mar 5 17:09:16 2012 (r232551) +++ stable/8/sys/netinet/sctp_os_bsd.h Mon Mar 5 17:33:01 2012 (r232552) @@ -424,6 +424,12 @@ typedef struct callout sctp_os_timer_t; typedef struct route sctp_route_t; typedef struct rtentry sctp_rtentry_t; +/* + * XXX multi-FIB support was backed out in r179783 and it seems clear that the + * VRF support as currently in FreeBSD is not ready to support multi-FIB. + * It might be best to implement multi-FIB support for both v4 and v6 indepedent + * of VRFs and leave those to a real MPLS stack. + */ #define SCTP_RTALLOC(ro, vrf_id) rtalloc_ign((struct route *)ro, 0UL) /* Future zero copy wakeup/send function */ Modified: stable/8/sys/netinet/tcp_subr.c ============================================================================== --- stable/8/sys/netinet/tcp_subr.c Mon Mar 5 17:09:16 2012 (r232551) +++ stable/8/sys/netinet/tcp_subr.c Mon Mar 5 17:33:01 2012 (r232552) @@ -1801,7 +1801,7 @@ tcp_maxmtu6(struct in_conninfo *inc, int sro6.ro_dst.sin6_family = AF_INET6; sro6.ro_dst.sin6_len = sizeof(struct sockaddr_in6); sro6.ro_dst.sin6_addr = inc->inc6_faddr; - rtalloc_ign((struct route *)&sro6, 0); + in6_rtalloc_ign(&sro6, 0, inc->inc_fibnum); } if (sro6.ro_rt != NULL) { ifp = sro6.ro_rt->rt_ifp; Modified: stable/8/sys/netinet6/icmp6.c ============================================================================== --- stable/8/sys/netinet6/icmp6.c Mon Mar 5 17:09:16 2012 (r232551) +++ stable/8/sys/netinet6/icmp6.c Mon Mar 5 17:33:01 2012 (r232552) @@ -359,7 +359,7 @@ icmp6_error(struct mbuf *m, int type, in m_adj(m, ICMPV6_PLD_MAXLEN - m->m_pkthdr.len); preplen = sizeof(struct ip6_hdr) + sizeof(struct icmp6_hdr); - M_PREPEND(m, preplen, M_DONTWAIT); + M_PREPEND(m, preplen, M_DONTWAIT); /* FIB is also copied over. */ if (m && m->m_len < preplen) m = m_pullup(m, preplen); if (m == NULL) { @@ -581,7 +581,7 @@ icmp6_input(struct mbuf **mp, int *offp, MGETHDR(n, M_DONTWAIT, n0->m_type); n0len = n0->m_pkthdr.len; /* save for use below */ if (n) - M_MOVE_PKTHDR(n, n0); + M_MOVE_PKTHDR(n, n0); /* FIB copied. */ if (n && maxlen >= MHLEN) { MCLGET(n, M_DONTWAIT); if ((n->m_flags & M_EXT) == 0) { @@ -1419,7 +1419,7 @@ ni6_input(struct mbuf *m, int off) m_freem(m); return (NULL); } - M_MOVE_PKTHDR(n, m); /* just for recvif */ + M_MOVE_PKTHDR(n, m); /* just for recvif and FIB */ if (replylen > MHLEN) { if (replylen > MCLBYTES) { /* @@ -2332,7 +2332,7 @@ icmp6_redirect_input(struct mbuf *m, int sin6.sin6_family = AF_INET6; sin6.sin6_len = sizeof(struct sockaddr_in6); bcopy(&reddst6, &sin6.sin6_addr, sizeof(reddst6)); - rt = rtalloc1((struct sockaddr *)&sin6, 0, 0UL); + rt = in6_rtalloc1((struct sockaddr *)&sin6, 0, 0UL, RT_DEFAULT_FIB); if (rt) { if (rt->rt_gateway == NULL || rt->rt_gateway->sa_family != AF_INET6) { @@ -2421,6 +2421,7 @@ icmp6_redirect_input(struct mbuf *m, int struct sockaddr_in6 sdst; struct sockaddr_in6 sgw; struct sockaddr_in6 ssrc; + u_int fibnum; bzero(&sdst, sizeof(sdst)); bzero(&sgw, sizeof(sgw)); @@ -2431,9 +2432,11 @@ icmp6_redirect_input(struct mbuf *m, int bcopy(&redtgt6, &sgw.sin6_addr, sizeof(struct in6_addr)); bcopy(&reddst6, &sdst.sin6_addr, sizeof(struct in6_addr)); bcopy(&src6, &ssrc.sin6_addr, sizeof(struct in6_addr)); - rtredirect((struct sockaddr *)&sdst, (struct sockaddr *)&sgw, - (struct sockaddr *)NULL, RTF_GATEWAY | RTF_HOST, - (struct sockaddr *)&ssrc); + for (fibnum = 0; fibnum < rt_numfibs; fibnum++) + in6_rtredirect((struct sockaddr *)&sdst, + (struct sockaddr *)&sgw, (struct sockaddr *)NULL, + RTF_GATEWAY | RTF_HOST, (struct sockaddr *)&ssrc, + fibnum); } /* finally update cached route in each socket via pfctlinput */ { @@ -2517,6 +2520,7 @@ icmp6_redirect_output(struct mbuf *m0, s MCLGET(m, M_DONTWAIT); if (!m) goto fail; + M_SETFIB(m, rt->rt_fibnum); m->m_pkthdr.rcvif = NULL; m->m_len = 0; maxlen = M_TRAILINGSPACE(m); Modified: stable/8/sys/netinet6/in6.c ============================================================================== --- stable/8/sys/netinet6/in6.c Mon Mar 5 17:09:16 2012 (r232551) +++ stable/8/sys/netinet6/in6.c Mon Mar 5 17:33:01 2012 (r232552) @@ -198,6 +198,11 @@ in6_control(struct socket *so, u_long cm switch (cmd) { case SIOCGETSGCNT_IN6: case SIOCGETMIFCNT_IN6: + /* + * XXX mrt_ioctl has a 3rd, unused, FIB argument in route.c. + * We cannot see how that would be needed, so do not adjust the + * KPI blindly; more likely should clean up the IPv4 variant. + */ return (mrt6_ioctl ? mrt6_ioctl(cmd, data) : EOPNOTSUPP); } @@ -696,6 +701,169 @@ out: } /* + * Join necessary multicast groups. Factored out from in6_update_ifa(). + * This entire work should only be done once, for the default FIB. + */ +static int +in6_update_ifa_join_mc(struct ifnet *ifp, struct in6_aliasreq *ifra, + struct in6_ifaddr *ia, int flags, struct in6_multi **in6m_sol) +{ + char ip6buf[INET6_ADDRSTRLEN]; + struct sockaddr_in6 mltaddr, mltmask; + struct in6_addr llsol; + struct in6_multi_mship *imm; + struct rtentry *rt; + int delay, error; + + KASSERT(in6m_sol != NULL, ("%s: in6m_sol is NULL", __func__)); + + /* Join solicited multicast addr for new host id. */ + bzero(&llsol, sizeof(struct in6_addr)); + llsol.s6_addr32[0] = IPV6_ADDR_INT32_MLL; + llsol.s6_addr32[1] = 0; + llsol.s6_addr32[2] = htonl(1); + llsol.s6_addr32[3] = ifra->ifra_addr.sin6_addr.s6_addr32[3]; + llsol.s6_addr8[12] = 0xff; + if ((error = in6_setscope(&llsol, ifp, NULL)) != 0) { + /* XXX: should not happen */ + log(LOG_ERR, "%s: in6_setscope failed\n", __func__); + goto cleanup; + } + delay = 0; + if ((flags & IN6_IFAUPDATE_DADDELAY)) { + /* + * We need a random delay for DAD on the address being + * configured. It also means delaying transmission of the + * corresponding MLD report to avoid report collision. + * [RFC 4861, Section 6.3.7] + */ + delay = arc4random() % (MAX_RTR_SOLICITATION_DELAY * hz); + } + imm = in6_joingroup(ifp, &llsol, &error, delay); + if (imm == NULL) { + nd6log((LOG_WARNING, "%s: addmulti failed for %s on %s " + "(errno=%d)\n", __func__, ip6_sprintf(ip6buf, &llsol), + if_name(ifp), error)); + goto cleanup; + } + LIST_INSERT_HEAD(&ia->ia6_memberships, imm, i6mm_chain); + *in6m_sol = imm->i6mm_maddr; + + bzero(&mltmask, sizeof(mltmask)); + mltmask.sin6_len = sizeof(struct sockaddr_in6); + mltmask.sin6_family = AF_INET6; + mltmask.sin6_addr = in6mask32; +#define MLTMASK_LEN 4 /* mltmask's masklen (=32bit=4octet) */ + + /* + * Join link-local all-nodes address. + */ + bzero(&mltaddr, sizeof(mltaddr)); + mltaddr.sin6_len = sizeof(struct sockaddr_in6); + mltaddr.sin6_family = AF_INET6; + mltaddr.sin6_addr = in6addr_linklocal_allnodes; + if ((error = in6_setscope(&mltaddr.sin6_addr, ifp, NULL)) != 0) + goto cleanup; /* XXX: should not fail */ + + /* + * XXX: do we really need this automatic routes? We should probably + * reconsider this stuff. Most applications actually do not need the + * routes, since they usually specify the outgoing interface. + */ + rt = in6_rtalloc1((struct sockaddr *)&mltaddr, 0, 0UL, RT_DEFAULT_FIB); + if (rt != NULL) { + /* XXX: only works in !SCOPEDROUTING case. */ + if (memcmp(&mltaddr.sin6_addr, + &((struct sockaddr_in6 *)rt_key(rt))->sin6_addr, + MLTMASK_LEN)) { + RTFREE_LOCKED(rt); + rt = NULL; + } + } + if (rt == NULL) { + error = in6_rtrequest(RTM_ADD, (struct sockaddr *)&mltaddr, + (struct sockaddr *)&ia->ia_addr, + (struct sockaddr *)&mltmask, RTF_UP, + (struct rtentry **)0, RT_DEFAULT_FIB); + if (error) + goto cleanup; + } else + RTFREE_LOCKED(rt); + + imm = in6_joingroup(ifp, &mltaddr.sin6_addr, &error, 0); + if (imm == NULL) { + nd6log((LOG_WARNING, "%s: addmulti failed for %s on %s " + "(errno=%d)\n", __func__, ip6_sprintf(ip6buf, + &mltaddr.sin6_addr), if_name(ifp), error)); + goto cleanup; + } + LIST_INSERT_HEAD(&ia->ia6_memberships, imm, i6mm_chain); + + /* + * Join node information group address. + */ + delay = 0; + if ((flags & IN6_IFAUPDATE_DADDELAY)) { + /* + * The spec does not say anything about delay for this group, + * but the same logic should apply. + */ + delay = arc4random() % (MAX_RTR_SOLICITATION_DELAY * hz); + } + if (in6_nigroup(ifp, NULL, -1, &mltaddr.sin6_addr) == 0) { + /* XXX jinmei */ + imm = in6_joingroup(ifp, &mltaddr.sin6_addr, &error, delay); + if (imm == NULL) + nd6log((LOG_WARNING, "%s: addmulti failed for %s on %s " + "(errno=%d)\n", __func__, ip6_sprintf(ip6buf, + &mltaddr.sin6_addr), if_name(ifp), error)); + /* XXX not very fatal, go on... */ + else + LIST_INSERT_HEAD(&ia->ia6_memberships, imm, i6mm_chain); + } + + /* + * Join interface-local all-nodes address. + * (ff01::1%ifN, and ff01::%ifN/32) + */ + mltaddr.sin6_addr = in6addr_nodelocal_allnodes; + if ((error = in6_setscope(&mltaddr.sin6_addr, ifp, NULL)) != 0) + goto cleanup; /* XXX: should not fail */ + /* XXX: again, do we really need the route? */ + rt = in6_rtalloc1((struct sockaddr *)&mltaddr, 0, 0UL, RT_DEFAULT_FIB); + if (rt != NULL) { + if (memcmp(&mltaddr.sin6_addr, + &((struct sockaddr_in6 *)rt_key(rt))->sin6_addr, + MLTMASK_LEN)) { + RTFREE_LOCKED(rt); + rt = NULL; + } + } + if (rt == NULL) { + error = in6_rtrequest(RTM_ADD, (struct sockaddr *)&mltaddr, + (struct sockaddr *)&ia->ia_addr, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 17:35:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A5DE1065672; Mon, 5 Mar 2012 17:35:23 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 71F738FC23; Mon, 5 Mar 2012 17:35:22 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 3A23025D37D1; Mon, 5 Mar 2012 17:35:21 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 63828BDCC1F; Mon, 5 Mar 2012 17:35:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id ReghrMcUNm-o; Mon, 5 Mar 2012 17:35:18 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id BAD5DBDCC1E; Mon, 5 Mar 2012 17:35:17 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201202110115.q1B1F2GZ006478@svn.freebsd.org> Date: Mon, 5 Mar 2012 17:35:16 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201202110115.q1B1F2GZ006478@svn.freebsd.org> To: Michael Tuexen X-Mailer: Apple Mail (2.1084) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r231501 - in stable/8/usr.bin: chpass netstat su X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 17:35:23 -0000 On 11. Feb 2012, at 01:15 , Michael Tuexen wrote: > Author: tuexen > Date: Sat Feb 11 01:15:02 2012 > New Revision: 231501 > URL: http://svn.freebsd.org/changeset/base/231501 >=20 > Log: > MFC r230555: > Don't print a warning when using netstat to print > SCTP statistics when there is not SCTP in the kernel. > This problem was reported by Sean Mahood. >=20 > Modified: > stable/8/usr.bin/netstat/sctp.c (contents, props changed) > Directory Properties: > stable/8/usr.bin/ (props changed) > stable/8/usr.bin/apply/ (props changed) > stable/8/usr.bin/ar/ (props changed) > stable/8/usr.bin/awk/ (props changed) > stable/8/usr.bin/biff/ (props changed) > stable/8/usr.bin/c89/ (props changed) > stable/8/usr.bin/c99/ (props changed) > stable/8/usr.bin/calendar/ (props changed) > stable/8/usr.bin/catman/ (props changed) > stable/8/usr.bin/checknr/ (props changed) > stable/8/usr.bin/chpass/Makefile (props changed) > stable/8/usr.bin/column/ (props changed) > stable/8/usr.bin/comm/ (props changed) > stable/8/usr.bin/compress/ (props changed) > stable/8/usr.bin/cpio/ (props changed) > stable/8/usr.bin/cpuset/ (props changed) > stable/8/usr.bin/csup/ (props changed) > stable/8/usr.bin/du/ (props changed) > stable/8/usr.bin/ee/ (props changed) > stable/8/usr.bin/enigma/ (props changed) > stable/8/usr.bin/fetch/ (props changed) > stable/8/usr.bin/find/ (props changed) > stable/8/usr.bin/finger/ (props changed) > stable/8/usr.bin/fold/ (props changed) > stable/8/usr.bin/fstat/ (props changed) > stable/8/usr.bin/gcore/ (props changed) > stable/8/usr.bin/getopt/ (props changed) > stable/8/usr.bin/gzip/ (props changed) > stable/8/usr.bin/hexdump/ (props changed) > stable/8/usr.bin/indent/ (props changed) > stable/8/usr.bin/ipcs/ (props changed) > stable/8/usr.bin/jot/ (props changed) > stable/8/usr.bin/kdump/ (props changed) > stable/8/usr.bin/killall/ (props changed) > stable/8/usr.bin/ktrace/ (props changed) > stable/8/usr.bin/lastcomm/ (props changed) > stable/8/usr.bin/ldd/ (props changed) > stable/8/usr.bin/less/ (props changed) > stable/8/usr.bin/lex/ (props changed) > stable/8/usr.bin/limits/ (props changed) > stable/8/usr.bin/locale/ (props changed) > stable/8/usr.bin/locate/ (props changed) > stable/8/usr.bin/lock/ (props changed) > stable/8/usr.bin/lockf/ (props changed) > stable/8/usr.bin/logger/ (props changed) > stable/8/usr.bin/look/ (props changed) > stable/8/usr.bin/m4/ (props changed) > stable/8/usr.bin/mail/ (props changed) > stable/8/usr.bin/make/ (props changed) > stable/8/usr.bin/makewhatis/ (props changed) > stable/8/usr.bin/minigzip/ (props changed) > stable/8/usr.bin/ncal/ (props changed) > stable/8/usr.bin/netstat/ (props changed) > stable/8/usr.bin/netstat/Makefile (props changed) > stable/8/usr.bin/netstat/atalk.c (props changed) > stable/8/usr.bin/netstat/bpf.c (props changed) > stable/8/usr.bin/netstat/if.c (props changed) > stable/8/usr.bin/netstat/inet.c (props changed) > stable/8/usr.bin/netstat/inet6.c (props changed) > stable/8/usr.bin/netstat/ipsec.c (props changed) > stable/8/usr.bin/netstat/ipx.c (props changed) > stable/8/usr.bin/netstat/main.c (props changed) > stable/8/usr.bin/netstat/mbuf.c (props changed) > stable/8/usr.bin/netstat/mroute.c (props changed) > stable/8/usr.bin/netstat/mroute6.c (props changed) > stable/8/usr.bin/netstat/netgraph.c (props changed) > stable/8/usr.bin/netstat/netisr.c (props changed) > stable/8/usr.bin/netstat/netstat.1 (props changed) > stable/8/usr.bin/netstat/netstat.h (props changed) > stable/8/usr.bin/netstat/pfkey.c (props changed) > stable/8/usr.bin/netstat/route.c (props changed) > stable/8/usr.bin/netstat/unix.c (props changed) This really splattered a lot of merge-info of stuff. I noticed doing my = own MFC and was quite doh! Please be more careful in the future. > stable/8/usr.bin/newgrp/ (props changed) > stable/8/usr.bin/nfsstat/ (props changed) > stable/8/usr.bin/pathchk/ (props changed) > stable/8/usr.bin/perror/ (props changed) > stable/8/usr.bin/printf/ (props changed) > stable/8/usr.bin/procstat/ (props changed) > stable/8/usr.bin/rlogin/ (props changed) > stable/8/usr.bin/rpcgen/ (props changed) > stable/8/usr.bin/rpcinfo/ (props changed) > stable/8/usr.bin/rs/ (props changed) > stable/8/usr.bin/ruptime/ (props changed) > stable/8/usr.bin/script/ (props changed) > stable/8/usr.bin/sed/ (props changed) > stable/8/usr.bin/showmount/ (props changed) > stable/8/usr.bin/sockstat/ (props changed) > stable/8/usr.bin/split/ (props changed) > stable/8/usr.bin/stat/ (props changed) > stable/8/usr.bin/su/ (props changed) > stable/8/usr.bin/su/Makefile (props changed) > stable/8/usr.bin/su/su.1 (props changed) > stable/8/usr.bin/su/su.c (props changed) > stable/8/usr.bin/systat/ (props changed) > stable/8/usr.bin/tail/ (props changed) > stable/8/usr.bin/tar/ (props changed) > stable/8/usr.bin/tftp/ (props changed) > stable/8/usr.bin/tip/ (props changed) > stable/8/usr.bin/top/ (props changed) > stable/8/usr.bin/touch/ (props changed) > stable/8/usr.bin/tr/ (props changed) > stable/8/usr.bin/truss/ (props changed) > stable/8/usr.bin/uname/ (props changed) > stable/8/usr.bin/unifdef/ (props changed) > stable/8/usr.bin/uniq/ (props changed) > stable/8/usr.bin/unzip/ (props changed) > stable/8/usr.bin/usbhidaction/ (props changed) > stable/8/usr.bin/usbhidctl/ (props changed) > stable/8/usr.bin/uudecode/ (props changed) > stable/8/usr.bin/vmstat/ (props changed) > stable/8/usr.bin/w/ (props changed) > stable/8/usr.bin/wall/ (props changed) > stable/8/usr.bin/whois/ (props changed) > stable/8/usr.bin/xargs/ (props changed) > stable/8/usr.bin/xinstall/ (props changed) > stable/8/usr.bin/xlint/ (props changed) > stable/8/usr.bin/xz/ (props changed) > stable/8/usr.bin/yacc/ (props changed) >=20 > Modified: stable/8/usr.bin/netstat/sctp.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- stable/8/usr.bin/netstat/sctp.c Sat Feb 11 01:13:35 2012 = (r231500) > +++ stable/8/usr.bin/netstat/sctp.c Sat Feb 11 01:15:02 2012 = (r231501) > @@ -611,7 +611,8 @@ sctp_stats(u_long off, const char *name, > memset(&zerostat, 0, len); > if (sysctlbyname("net.inet.sctp.stats", &sctpstat, &len, > zflag ? &zerostat : NULL, zflag ? len : 0) < 0) { > - warn("sysctl: net.inet.sctp.stats"); > + if (errno !=3D ENOENT) > + warn("sysctl: net.inet.sctp.stats"); > return; > } > } else --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 17:38:45 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9266D106564A; Mon, 5 Mar 2012 17:38:45 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 374648FC08; Mon, 5 Mar 2012 17:38:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25Hcjpa096414; Mon, 5 Mar 2012 17:38:45 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25Hcix2096412; Mon, 5 Mar 2012 17:38:44 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201203051738.q25Hcix2096412@svn.freebsd.org> From: Sergey Kandaurov Date: Mon, 5 Mar 2012 17:38:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232553 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 17:38:45 -0000 Author: pluknet Date: Mon Mar 5 17:38:44 2012 New Revision: 232553 URL: http://svn.freebsd.org/changeset/base/232553 Log: Fix typo. Bump .Dd for the previous change. Modified: head/share/man/man9/pci.9 Modified: head/share/man/man9/pci.9 ============================================================================== --- head/share/man/man9/pci.9 Mon Mar 5 17:33:01 2012 (r232552) +++ head/share/man/man9/pci.9 Mon Mar 5 17:38:44 2012 (r232553) @@ -537,7 +537,7 @@ The .Fn pci_release_msi function returns zero on success and an error on failure. .Pp -.The +The .Fn pci_count_msix function returns the maximum number of MSI-X messages supported by the device From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 17:39:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31193106564A; Mon, 5 Mar 2012 17:39:14 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F3648FC08; Mon, 5 Mar 2012 17:39:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25HdDel096466; Mon, 5 Mar 2012 17:39:13 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25HdDVD096464; Mon, 5 Mar 2012 17:39:13 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201203051739.q25HdDVD096464@svn.freebsd.org> From: Jim Harris Date: Mon, 5 Mar 2012 17:39:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232554 - stable/8/sys/dev/isci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 17:39:14 -0000 Author: jimharris Date: Mon Mar 5 17:39:13 2012 New Revision: 232554 URL: http://svn.freebsd.org/changeset/base/232554 Log: MFC r232225 Update PCI-IDs with devices found on Intel SDP Return BUS_PROBE_DEFAULT so that non-default drivers may be loaded Approved by: sbruno Modified: stable/8/sys/dev/isci/isci.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/isci/isci.c ============================================================================== --- stable/8/sys/dev/isci/isci.c Mon Mar 5 17:38:44 2012 (r232553) +++ stable/8/sys/dev/isci/isci.c Mon Mar 5 17:39:13 2012 (r232554) @@ -98,7 +98,11 @@ static struct _pcsid { 0x1d688086, "Intel(R) C600 Series Chipset SAS Controller" }, { 0x1d698086, "Intel(R) C600 Series Chipset SAS Controller" }, { 0x1d6a8086, "Intel(R) C600 Series Chipset SAS Controller (SATA mode)" }, - { 0x1d6b8086, "Intel(R) C600 Series Chipset SAS Controller (SATA mode)" }, + { 0x1d6b8086, "Intel(R) C600 Series Chipset SAS Controller (SATA mode)" }, + { 0x1d6c8086, "Intel(R) C600 Series Chipset SAS Controller" }, + { 0x1d6d8086, "Intel(R) C600 Series Chipset SAS Controller" }, + { 0x1d6e8086, "Intel(R) C600 Series Chipset SAS Controller" }, + { 0x1d6f8086, "Intel(R) C600 Series Chipset SAS Controller (SATA mode)" }, { 0x00000000, NULL } }; @@ -114,7 +118,7 @@ isci_probe (device_t device) if (ep->desc) { device_set_desc(device, ep->desc); - return (0); + return (BUS_PROBE_DEFAULT); } else return (ENXIO); From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 17:44:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E987D1065673; Mon, 5 Mar 2012 17:44:53 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id C131F8FC0C; Mon, 5 Mar 2012 17:44:53 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 77FB646B0C; Mon, 5 Mar 2012 12:44:53 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E66BCB924; Mon, 5 Mar 2012 12:44:52 -0500 (EST) From: John Baldwin To: Tijl Coosemans Date: Mon, 5 Mar 2012 12:11:30 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <201203042002.q24K2KWF050460@svn.freebsd.org> In-Reply-To: <201203042002.q24K2KWF050460@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201203051211.30493.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 05 Mar 2012 12:44:53 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232519 - head/sys/x86/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 17:44:54 -0000 On Sunday, March 04, 2012 3:02:20 pm Tijl Coosemans wrote: > Author: tijl > Date: Sun Mar 4 20:02:20 2012 > New Revision: 232519 > URL: http://svn.freebsd.org/changeset/base/232519 > > Log: > Do not use INT64_C and UINT64_C to define 64 bit integer limits. They > aren't defined for C++ code unless __STDC_CONSTANT_MACROS is defined. > > Reported by: jhb Thanks! -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 17:44:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7F3F41065670; Mon, 5 Mar 2012 17:44:57 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 3D6908FC1B; Mon, 5 Mar 2012 17:44:57 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id E667446B0C; Mon, 5 Mar 2012 12:44:56 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 49848B924; Mon, 5 Mar 2012 12:44:56 -0500 (EST) From: John Baldwin To: Peter Holm Date: Mon, 5 Mar 2012 12:38:57 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <201203021153.06614.jhb@freebsd.org> <1978600220.298005.1330754492306.JavaMail.root@erie.cs.uoguelph.ca> <20120303163843.GA72020@x2.osted.lan> In-Reply-To: <20120303163843.GA72020@x2.osted.lan> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201203051238.57501.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 05 Mar 2012 12:44:56 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Rick Macklem , src-committers@freebsd.org Subject: Re: svn commit: r226967 - head/sys/ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 17:44:57 -0000 On Saturday, March 03, 2012 11:38:43 am Peter Holm wrote: > On Sat, Mar 03, 2012 at 01:01:32AM -0500, Rick Macklem wrote: > > John Baldwin wrote: > > > On Friday, March 02, 2012 8:29:21 am Peter Holm wrote: > > > > On Thu, Mar 01, 2012 at 04:47:41PM -0500, John Baldwin wrote: > > > > > On Monday, October 31, 2011 11:01:47 am Peter Holm wrote: > > > > > > Author: pho > > > > > > Date: Mon Oct 31 15:01:47 2011 > > > > > > New Revision: 226967 > > > > > > URL: http://svn.freebsd.org/changeset/base/226967 > > > > > > > > > > > > Log: > > > > > > The kern_renameat() looks up the fvp using the DELETE flag, > > > > > > which causes > > > > > > the removal of the name cache entry for fvp. > > > > > > > > > > > > Reported by: Anton Yuzhaninov > > > > > > In collaboration with: kib > > > > > > MFC after: 1 week > > > > > > > > > > > > Modified: > > > > > > head/sys/ufs/ufs/ufs_vnops.c > > > > > > > > > > So I ran into this at work recently, and even this fix applied I > > > > > was still > > > > > seeing rename()'s that were seemingly not taking effect. After > > > > > getting some > > > > > extra KTR traces, I figured out that the same purge needs to be > > > > > applied to the > > > > > destination vnode. Specifically, the issue I ran into was that was > > > > > renaming > > > > > 'foo' to 'bar', but lookups for 'bar' were still returning the old > > > > > file. The > > > > > reason was that a lookup after the namei(RENAME) of the > > > > > destination while > > > > > ufs_rename() had its locks dropped was readding the name cache > > > > > entry for > > > > > 'bar', and then a cache_lookup() of 'bar' would return the old > > > > > vnode as long > > > > > as that vnode was valid (e.g. if it had a link in another > > > > > location, or other > > > > > processes had an open file descriptor for it). I'm currently > > > > > testing the > > > > > patch below: > > > > > > > > > > > > > I now have a scenario that fails, but not quite the same way you > > > > describe. > > > > > > > > It looks like this: > > > > > > > > touch file1 > > > > echo xxx > file2 > > > > rename(file1, file2) > > > > > > > > A different process performs stat() on both files in a tight loop. > > > > > > > > Once in a while I observe that a stat() of file2, after the rename, > > > > returns a link count of zero. Size is zero as expected, but the > > > > inode > > > > number of file2 is unchanged. > > > > > Peter, were you doing a stat() using the file name, or an fstat()? > > (Using stat() with afile name might explain it, maybe??) > > > > Yes. Switching to open()/fstat() of the "from" file in the loop, makes > the cache problem go away. Using fstat avoids the changes of getting a stale name cache, so it just avoids the race altogether. However, there is no reason I can think of why stat() should ever give you can inconsistent view of attributes. You should always get a consistent snapshot of attributes. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 17:51:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 943D8106568F; Mon, 5 Mar 2012 17:51:58 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 833538FC34; Mon, 5 Mar 2012 17:51:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25Hpwfa097133; Mon, 5 Mar 2012 17:51:58 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25HpwTP097131; Mon, 5 Mar 2012 17:51:58 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201203051751.q25HpwTP097131@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 5 Mar 2012 17:51:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232556 - stable/8/sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 17:51:58 -0000 Author: glebius Date: Mon Mar 5 17:51:57 2012 New Revision: 232556 URL: http://svn.freebsd.org/changeset/base/232556 Log: Merge r231761 from head: In ng_bypass() add more protection against potential race with ng_rmnode() and its followers. Modified: stable/8/sys/netgraph/ng_base.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/netgraph/ng_base.c ============================================================================== --- stable/8/sys/netgraph/ng_base.c Mon Mar 5 17:51:15 2012 (r232555) +++ stable/8/sys/netgraph/ng_base.c Mon Mar 5 17:51:57 2012 (r232556) @@ -1169,6 +1169,10 @@ ng_bypass(hook_p hook1, hook_p hook2) return (EINVAL); } mtx_lock(&ng_topo_mtx); + if (NG_HOOK_NOT_VALID(hook1) || NG_HOOK_NOT_VALID(hook2)) { + mtx_unlock(&ng_topo_mtx); + return (EINVAL); + } hook1->hk_peer->hk_peer = hook2->hk_peer; hook2->hk_peer->hk_peer = hook1->hk_peer; From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 18:15:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 560091065670; Mon, 5 Mar 2012 18:15:55 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 44E528FC14; Mon, 5 Mar 2012 18:15:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25IFtM7098108; Mon, 5 Mar 2012 18:15:55 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25IFtlC098106; Mon, 5 Mar 2012 18:15:55 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201203051815.q25IFtlC098106@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 5 Mar 2012 18:15:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232558 - in releng/8.3/sys: i386/conf netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 18:15:55 -0000 Author: glebius Date: Mon Mar 5 18:15:54 2012 New Revision: 232558 URL: http://svn.freebsd.org/changeset/base/232558 Log: Merge r232556 from stable/8 (r231761 from head): In ng_bypass() add more protection against potential race with ng_rmnode() and its followers. Approved by: re (kib) Modified: releng/8.3/sys/netgraph/ng_base.c Directory Properties: releng/8.3/sys/ (props changed) releng/8.3/sys/amd64/include/xen/ (props changed) releng/8.3/sys/boot/ (props changed) releng/8.3/sys/cddl/contrib/opensolaris/ (props changed) releng/8.3/sys/contrib/dev/acpica/ (props changed) releng/8.3/sys/contrib/pf/ (props changed) releng/8.3/sys/dev/e1000/ (props changed) releng/8.3/sys/i386/conf/XENHVM (props changed) Modified: releng/8.3/sys/netgraph/ng_base.c ============================================================================== --- releng/8.3/sys/netgraph/ng_base.c Mon Mar 5 17:58:58 2012 (r232557) +++ releng/8.3/sys/netgraph/ng_base.c Mon Mar 5 18:15:54 2012 (r232558) @@ -1169,6 +1169,10 @@ ng_bypass(hook_p hook1, hook_p hook2) return (EINVAL); } mtx_lock(&ng_topo_mtx); + if (NG_HOOK_NOT_VALID(hook1) || NG_HOOK_NOT_VALID(hook2)) { + mtx_unlock(&ng_topo_mtx); + return (EINVAL); + } hook1->hk_peer->hk_peer = hook2->hk_peer; hook2->hk_peer->hk_peer = hook1->hk_peer; From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 18:20:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 16B0F106564A; Mon, 5 Mar 2012 18:20:32 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 05AF68FC0A; Mon, 5 Mar 2012 18:20:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25IKVYc098302; Mon, 5 Mar 2012 18:20:31 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25IKVxF098300; Mon, 5 Mar 2012 18:20:31 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201203051820.q25IKVxF098300@svn.freebsd.org> From: Jim Harris Date: Mon, 5 Mar 2012 18:20:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232559 - releng/8.3/sys/dev/isci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 18:20:32 -0000 Author: jimharris Date: Mon Mar 5 18:20:31 2012 New Revision: 232559 URL: http://svn.freebsd.org/changeset/base/232559 Log: Merge r232554 from stable/8 (r232225 from head): Include missing device IDs for isci(4) driver. The C600 chipset will surface one of device IDs 0x1D6C-0x1D6F for the integrated SAS controller on systems that are shipped with a 3rd party (i.e. non-Intel) device driver. These changes add the 0x1D6C-0x1D6F device IDs, as well as change isci_probe() to return a value that would allow a 3rd-party FreeBSD driver to load against this device, should such a driver ever come to fruition. Approved by: re (kib), sbruno Modified: releng/8.3/sys/dev/isci/isci.c Directory Properties: releng/8.3/sys/ (props changed) Modified: releng/8.3/sys/dev/isci/isci.c ============================================================================== --- releng/8.3/sys/dev/isci/isci.c Mon Mar 5 18:15:54 2012 (r232558) +++ releng/8.3/sys/dev/isci/isci.c Mon Mar 5 18:20:31 2012 (r232559) @@ -98,7 +98,11 @@ static struct _pcsid { 0x1d688086, "Intel(R) C600 Series Chipset SAS Controller" }, { 0x1d698086, "Intel(R) C600 Series Chipset SAS Controller" }, { 0x1d6a8086, "Intel(R) C600 Series Chipset SAS Controller (SATA mode)" }, - { 0x1d6b8086, "Intel(R) C600 Series Chipset SAS Controller (SATA mode)" }, + { 0x1d6b8086, "Intel(R) C600 Series Chipset SAS Controller (SATA mode)" }, + { 0x1d6c8086, "Intel(R) C600 Series Chipset SAS Controller" }, + { 0x1d6d8086, "Intel(R) C600 Series Chipset SAS Controller" }, + { 0x1d6e8086, "Intel(R) C600 Series Chipset SAS Controller" }, + { 0x1d6f8086, "Intel(R) C600 Series Chipset SAS Controller (SATA mode)" }, { 0x00000000, NULL } }; @@ -114,7 +118,7 @@ isci_probe (device_t device) if (ep->desc) { device_set_desc(device, ep->desc); - return (0); + return (BUS_PROBE_DEFAULT); } else return (ENXIO); From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 18:28:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 12168106566C; Mon, 5 Mar 2012 18:28:39 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 127CE8FC16; Mon, 5 Mar 2012 18:28:37 +0000 (UTC) Received: by lagv3 with SMTP id v3so7048034lag.13 for ; Mon, 05 Mar 2012 10:28:36 -0800 (PST) Received-SPF: pass (google.com: domain of pluknet@gmail.com designates 10.112.44.232 as permitted sender) client-ip=10.112.44.232; Authentication-Results: mr.google.com; spf=pass (google.com: domain of pluknet@gmail.com designates 10.112.44.232 as permitted sender) smtp.mail=pluknet@gmail.com; dkim=pass header.i=pluknet@gmail.com Received: from mr.google.com ([10.112.44.232]) by 10.112.44.232 with SMTP id h8mr9643843lbm.85.1330972116321 (num_hops = 1); Mon, 05 Mar 2012 10:28:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=/5LwckiD7nObzhJQH+SvLOBRv2bCpev1jYpcQJdR2xs=; b=vclM3TZVJpDZ4YN0gvnAvgmueacEN8oB0uPS3t6KJd75kWkRXnG3Ig+6JhJPpHRyN2 oc53JPxk+AFmXY4IbQziRSyIVzrH8Qyd5GUJnbuGynmeIVSHkl+/Cy9LJ+DtoR35yXnU wOZuYtp8G9D22EcntSjkMATuLbnrzExm1zVCh3iEnFKVgUQPK92Np5RAWz7qHD5jcruO ZX5kl7l2Mzha3MfHZVAKiKmIy3b6atNJd6zlAhurwF/Yo4Ku7Rz/YzbY1TwZZK8MOnOX ftwZVlr3AS9t126NV5IIERI2jyZ21yg6Owp6o2CMNV+W26Il0jK5+uPl3UU+F+6qwOPC ehGA== MIME-Version: 1.0 Received: by 10.112.44.232 with SMTP id h8mr7903578lbm.85.1330972116191; Mon, 05 Mar 2012 10:28:36 -0800 (PST) Sender: pluknet@gmail.com Received: by 10.152.21.73 with HTTP; Mon, 5 Mar 2012 10:28:36 -0800 (PST) In-Reply-To: <201203041037.q24AbQhv026104@svn.freebsd.org> References: <201203041037.q24AbQhv026104@svn.freebsd.org> Date: Mon, 5 Mar 2012 21:28:36 +0300 X-Google-Sender-Auth: 5ucdC8k3vwNUzM9nhm9ieUFFIbo Message-ID: From: Sergey Kandaurov To: Remko Lodder Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r232486 - stable/9/sbin/ifconfig X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 18:28:39 -0000 On 4 March 2012 14:37, Remko Lodder wrote: > Author: remko > Date: Sun Mar =A04 10:37:26 2012 > New Revision: 232486 > URL: http://svn.freebsd.org/changeset/base/232486 > > Log: > =A0Add an ifconfig carp option that enables users to set > =A0the state of the carp cluster. > > =A0This is a direct commit to stable/9 because -HEAD's > =A0code is very different. I discussed this with Gleb > =A0and the reason for this is that since we do not > =A0touch the kernel itself and are not adding very > =A0weird or confusing things, we can commit this to the > =A0stable branch directly. > > =A0The options 'master' and 'backup' are now available, > =A0which enables the administrator to force a node into > =A0the backup or master state on the cluster. Ofcourse > =A0preempt has to be disabled otherwise the master node > =A0will become master again. > > =A0One can do that with: > > =A0sysctl net.inet.carp.preempt=3D0 > > =A0After that one can schedule maintenance on the node > =A0normally running as the master and such. > > =A0PR: =A0 =A0 =A0 =A0 =A0 100956 > =A0Discussed with: =A0 =A0 =A0 glebius > =A0MFC after: =A0 =A01 weeks What are the chances this will appear in 8.3-RELEASE? --=20 wbr, pluknet From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 18:40:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 069221065676; Mon, 5 Mar 2012 18:40:54 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E98C18FC26; Mon, 5 Mar 2012 18:40:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25IerGV099048; Mon, 5 Mar 2012 18:40:53 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25IereZ099046; Mon, 5 Mar 2012 18:40:53 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201203051840.q25IereZ099046@svn.freebsd.org> From: Hiroki Sato Date: Mon, 5 Mar 2012 18:40:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232560 - stable/8/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 18:40:54 -0000 Author: hrs Date: Mon Mar 5 18:40:53 2012 New Revision: 232560 URL: http://svn.freebsd.org/changeset/base/232560 Log: MFC r225682: Copy ip6po_minmtu and ip6po_prefer_tempaddr in ip6_copypktopts(). This fixes inconsistency when options are specified by both setsockopt() and ancillary data types. PR: kern/158307 Modified: stable/8/sys/netinet6/ip6_output.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/netinet6/ip6_output.c ============================================================================== --- stable/8/sys/netinet6/ip6_output.c Mon Mar 5 18:20:31 2012 (r232559) +++ stable/8/sys/netinet6/ip6_output.c Mon Mar 5 18:40:53 2012 (r232560) @@ -2328,6 +2328,8 @@ copypktopts(struct ip6_pktopts *dst, str dst->ip6po_hlim = src->ip6po_hlim; dst->ip6po_tclass = src->ip6po_tclass; dst->ip6po_flags = src->ip6po_flags; + dst->ip6po_minmtu = src->ip6po_minmtu; + dst->ip6po_prefer_tempaddr = src->ip6po_prefer_tempaddr; if (src->ip6po_pktinfo) { dst->ip6po_pktinfo = malloc(sizeof(*dst->ip6po_pktinfo), M_IP6OPT, canwait); From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 18:47:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9AF8B1065670; Mon, 5 Mar 2012 18:47:43 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A4488FC19; Mon, 5 Mar 2012 18:47:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25Ilhlw099370; Mon, 5 Mar 2012 18:47:43 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25IlhrW099367; Mon, 5 Mar 2012 18:47:43 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201203051847.q25IlhrW099367@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 5 Mar 2012 18:47:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232561 - in head/sys: amd64/conf i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 18:47:43 -0000 Author: jkim Date: Mon Mar 5 18:47:42 2012 New Revision: 232561 URL: http://svn.freebsd.org/changeset/base/232561 Log: Fix few style nits. Modified: head/sys/amd64/conf/GENERIC head/sys/i386/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Mon Mar 5 18:40:53 2012 (r232560) +++ head/sys/amd64/conf/GENERIC Mon Mar 5 18:47:42 2012 (r232561) @@ -168,7 +168,7 @@ device psm # PS/2 mouse device kbdmux # keyboard multiplexer device vga # VGA video card driver -options VESA # add support for VESA BIOS Extensions +options VESA # Add support for VESA BIOS Extensions (VBE) device splash # Splash screen and screen saver support Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Mon Mar 5 18:40:53 2012 (r232560) +++ head/sys/i386/conf/GENERIC Mon Mar 5 18:47:42 2012 (r232561) @@ -173,7 +173,7 @@ device psm # PS/2 mouse device kbdmux # keyboard multiplexer device vga # VGA video card driver -options VESA # add support for VESA BIOS Extensions +options VESA # Add support for VESA BIOS Extensions (VBE) device splash # Splash screen and screen saver support From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 18:54:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8CE331065690; Mon, 5 Mar 2012 18:54:28 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B0CC8FC13; Mon, 5 Mar 2012 18:54:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25IsSZv099642; Mon, 5 Mar 2012 18:54:28 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25IsS8n099640; Mon, 5 Mar 2012 18:54:28 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201203051854.q25IsS8n099640@svn.freebsd.org> From: "Kenneth D. Merry" Date: Mon, 5 Mar 2012 18:54:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232562 - stable/9/sys/dev/mpt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 18:54:28 -0000 Author: ken Date: Mon Mar 5 18:54:28 2012 New Revision: 232562 URL: http://svn.freebsd.org/changeset/base/232562 Log: MFC 232411: Fix a problem that was causing the mpt(4) driver to attach to MegaRAID cards that should be handled by the mfi(4) driver. The root of the problem is that the mpt(4) driver was masking off the bottom bit of the PCI device ID when deciding which cards to attach to. It appears that a number of the mpt(4) Fibre Channel cards had a LAN variant whose PCI device ID was just one bit off from the FC card's device ID. The FC cards were even and the LAN cards were odd. The problem was that this pattern wasn't carried over on the SAS and parallel SCSI mpt(4) cards. Luckily the SAS and parallel SCSI PCI device IDs were either even numbers, or they would get masked to a supported adjacent PCI device ID, and everything worked well. Now LSI is using some of the odd-numbered PCI device IDs between the 3Gb SAS device IDs for their new MegaRAID cards. This is causing the mpt(4) driver to attach to the RAID cards instead of the mfi(4) driver. The solution is to stop masking off the bottom bit of the device ID, and explicitly list the PCI device IDs of all supported cards. This change should be a no-op for mpt(4) hardware. The only intended functional change is that for the 929X, the is_fc variable gets set. It wasn't being set previously, but needs to be because the 929X is a Fibre Channel card. Reported by: Kashyap Desai Modified: stable/9/sys/dev/mpt/mpt_pci.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/mpt/mpt_pci.c ============================================================================== --- stable/9/sys/dev/mpt/mpt_pci.c Mon Mar 5 18:47:42 2012 (r232561) +++ stable/9/sys/dev/mpt/mpt_pci.c Mon Mar 5 18:54:28 2012 (r232562) @@ -129,18 +129,34 @@ __FBSDID("$FreeBSD$"); #define PCI_PRODUCT_LSI_FC919 0x0624 #endif +#ifndef PCI_PRODUCT_LSI_FC919_LAN +#define PCI_PRODUCT_LSI_FC919_LAN 0x0625 +#endif + #ifndef PCI_PRODUCT_LSI_FC929 #define PCI_PRODUCT_LSI_FC929 0x0622 #endif +#ifndef PCI_PRODUCT_LSI_FC929_LAN +#define PCI_PRODUCT_LSI_FC929_LAN 0x0623 +#endif + #ifndef PCI_PRODUCT_LSI_FC929X #define PCI_PRODUCT_LSI_FC929X 0x0626 #endif +#ifndef PCI_PRODUCT_LSI_FC929X_LAN +#define PCI_PRODUCT_LSI_FC929X_LAN 0x0627 +#endif + #ifndef PCI_PRODUCT_LSI_FC919X #define PCI_PRODUCT_LSI_FC919X 0x0628 #endif +#ifndef PCI_PRODUCT_LSI_FC919X_LAN +#define PCI_PRODUCT_LSI_FC919X_LAN 0x0629 +#endif + #ifndef PCI_PRODUCT_LSI_FC7X04X #define PCI_PRODUCT_LSI_FC7X04X 0x0640 #endif @@ -153,6 +169,10 @@ __FBSDID("$FreeBSD$"); #define PCI_PRODUCT_LSI_1030 0x0030 #endif +#ifndef PCI_PRODUCT_LSI_1030ZC +#define PCI_PRODUCT_LSI_1030ZC 0x0031 +#endif + #ifndef PCI_PRODUCT_LSI_SAS1064 #define PCI_PRODUCT_LSI_SAS1064 0x0050 #endif @@ -177,6 +197,10 @@ __FBSDID("$FreeBSD$"); #define PCI_PRODUCT_LSI_SAS1068 0x0054 #endif +#ifndef PCI_PRODUCT_LSI_SAS1068A +#define PCI_PRODUCT_LSI_SAS1068A 0x0055 +#endif + #ifndef PCI_PRODUCT_LSI_SAS1068E #define PCI_PRODUCT_LSI_SAS1068E 0x0058 #endif @@ -232,7 +256,7 @@ mpt_pci_probe(device_t dev) return (ENXIO); } - switch ((pci_get_device(dev) & ~1)) { + switch (pci_get_device(dev)) { case PCI_PRODUCT_LSI_FC909: desc = "LSILogic FC909 FC Adapter"; break; @@ -242,15 +266,27 @@ mpt_pci_probe(device_t dev) case PCI_PRODUCT_LSI_FC919: desc = "LSILogic FC919 FC Adapter"; break; + case PCI_PRODUCT_LSI_FC919_LAN: + desc = "LSILogic FC919 LAN Adapter"; + break; case PCI_PRODUCT_LSI_FC929: desc = "Dual LSILogic FC929 FC Adapter"; break; + case PCI_PRODUCT_LSI_FC929_LAN: + desc = "Dual LSILogic FC929 LAN Adapter"; + break; case PCI_PRODUCT_LSI_FC919X: desc = "LSILogic FC919 FC PCI-X Adapter"; break; + case PCI_PRODUCT_LSI_FC919X_LAN: + desc = "LSILogic FC919 LAN PCI-X Adapter"; + break; case PCI_PRODUCT_LSI_FC929X: desc = "Dual LSILogic FC929X 2Gb/s FC PCI-X Adapter"; break; + case PCI_PRODUCT_LSI_FC929X_LAN: + desc = "Dual LSILogic FC929X LAN PCI-X Adapter"; + break; case PCI_PRODUCT_LSI_FC646: desc = "Dual LSILogic FC7X04X 4Gb/s FC PCI-Express Adapter"; break; @@ -258,6 +294,7 @@ mpt_pci_probe(device_t dev) desc = "Dual LSILogic FC7X04X 4Gb/s FC PCI-X Adapter"; break; case PCI_PRODUCT_LSI_1030: + case PCI_PRODUCT_LSI_1030ZC: desc = "LSILogic 1030 Ultra4 Adapter"; break; case PCI_PRODUCT_LSI_SAS1064: @@ -266,6 +303,7 @@ mpt_pci_probe(device_t dev) case PCI_PRODUCT_LSI_SAS1066: case PCI_PRODUCT_LSI_SAS1066E: case PCI_PRODUCT_LSI_SAS1068: + case PCI_PRODUCT_LSI_SAS1068A: case PCI_PRODUCT_LSI_SAS1068E: case PCI_PRODUCT_LSI_SAS1078: case PCI_PRODUCT_LSI_SAS1078DE: @@ -428,12 +466,17 @@ mpt_pci_attach(device_t dev) return (ENOMEM); } memset(mpt, 0, sizeof(struct mpt_softc)); - switch ((pci_get_device(dev) & ~1)) { + switch (pci_get_device(dev)) { case PCI_PRODUCT_LSI_FC909: case PCI_PRODUCT_LSI_FC909A: case PCI_PRODUCT_LSI_FC919: + case PCI_PRODUCT_LSI_FC919_LAN: case PCI_PRODUCT_LSI_FC929: + case PCI_PRODUCT_LSI_FC929_LAN: + case PCI_PRODUCT_LSI_FC929X: + case PCI_PRODUCT_LSI_FC929X_LAN: case PCI_PRODUCT_LSI_FC919X: + case PCI_PRODUCT_LSI_FC919X_LAN: case PCI_PRODUCT_LSI_FC646: case PCI_PRODUCT_LSI_FC7X04X: mpt->is_fc = 1; @@ -448,6 +491,7 @@ mpt_pci_attach(device_t dev) case PCI_PRODUCT_LSI_SAS1066: case PCI_PRODUCT_LSI_SAS1066E: case PCI_PRODUCT_LSI_SAS1068: + case PCI_PRODUCT_LSI_SAS1068A: case PCI_PRODUCT_LSI_SAS1068E: mpt->is_sas = 1; break; @@ -499,11 +543,17 @@ mpt_pci_attach(device_t dev) * Is this part a dual? * If so, link with our partner (around yet) */ - if ((pci_get_device(dev) & ~1) == PCI_PRODUCT_LSI_FC929 || - (pci_get_device(dev) & ~1) == PCI_PRODUCT_LSI_FC646 || - (pci_get_device(dev) & ~1) == PCI_PRODUCT_LSI_FC7X04X || - (pci_get_device(dev) & ~1) == PCI_PRODUCT_LSI_1030) { + switch (pci_get_device(dev)) { + case PCI_PRODUCT_LSI_FC929: + case PCI_PRODUCT_LSI_FC929_LAN: + case PCI_PRODUCT_LSI_FC646: + case PCI_PRODUCT_LSI_FC7X04X: + case PCI_PRODUCT_LSI_1030: + case PCI_PRODUCT_LSI_1030ZC: mpt_link_peer(mpt); + break; + default: + break; } /* From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 19:01:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD53A106564A; Mon, 5 Mar 2012 19:01:23 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9BC318FC16; Mon, 5 Mar 2012 19:01:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25J1Nqt099941; Mon, 5 Mar 2012 19:01:23 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25J1NUH099939; Mon, 5 Mar 2012 19:01:23 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201203051901.q25J1NUH099939@svn.freebsd.org> From: "Kenneth D. Merry" Date: Mon, 5 Mar 2012 19:01:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232563 - stable/8/sys/dev/mpt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 19:01:23 -0000 Author: ken Date: Mon Mar 5 19:01:23 2012 New Revision: 232563 URL: http://svn.freebsd.org/changeset/base/232563 Log: MFC 232411: Fix a problem that was causing the mpt(4) driver to attach to MegaRAID cards that should be handled by the mfi(4) driver. The root of the problem is that the mpt(4) driver was masking off the bottom bit of the PCI device ID when deciding which cards to attach to. It appears that a number of the mpt(4) Fibre Channel cards had a LAN variant whose PCI device ID was just one bit off from the FC card's device ID. The FC cards were even and the LAN cards were odd. The problem was that this pattern wasn't carried over on the SAS and parallel SCSI mpt(4) cards. Luckily the SAS and parallel SCSI PCI device IDs were either even numbers, or they would get masked to a supported adjacent PCI device ID, and everything worked well. Now LSI is using some of the odd-numbered PCI device IDs between the 3Gb SAS device IDs for their new MegaRAID cards. This is causing the mpt(4) driver to attach to the RAID cards instead of the mfi(4) driver. The solution is to stop masking off the bottom bit of the device ID, and explicitly list the PCI device IDs of all supported cards. This change should be a no-op for mpt(4) hardware. The only intended functional change is that for the 929X, the is_fc variable gets set. It wasn't being set previously, but needs to be because the 929X is a Fibre Channel card. Reported by: Kashyap Desai Modified: stable/8/sys/dev/mpt/mpt_pci.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/mpt/mpt_pci.c ============================================================================== --- stable/8/sys/dev/mpt/mpt_pci.c Mon Mar 5 18:54:28 2012 (r232562) +++ stable/8/sys/dev/mpt/mpt_pci.c Mon Mar 5 19:01:23 2012 (r232563) @@ -129,18 +129,34 @@ __FBSDID("$FreeBSD$"); #define PCI_PRODUCT_LSI_FC919 0x0624 #endif +#ifndef PCI_PRODUCT_LSI_FC919_LAN +#define PCI_PRODUCT_LSI_FC919_LAN 0x0625 +#endif + #ifndef PCI_PRODUCT_LSI_FC929 #define PCI_PRODUCT_LSI_FC929 0x0622 #endif +#ifndef PCI_PRODUCT_LSI_FC929_LAN +#define PCI_PRODUCT_LSI_FC929_LAN 0x0623 +#endif + #ifndef PCI_PRODUCT_LSI_FC929X #define PCI_PRODUCT_LSI_FC929X 0x0626 #endif +#ifndef PCI_PRODUCT_LSI_FC929X_LAN +#define PCI_PRODUCT_LSI_FC929X_LAN 0x0627 +#endif + #ifndef PCI_PRODUCT_LSI_FC919X #define PCI_PRODUCT_LSI_FC919X 0x0628 #endif +#ifndef PCI_PRODUCT_LSI_FC919X_LAN +#define PCI_PRODUCT_LSI_FC919X_LAN 0x0629 +#endif + #ifndef PCI_PRODUCT_LSI_FC7X04X #define PCI_PRODUCT_LSI_FC7X04X 0x0640 #endif @@ -153,6 +169,10 @@ __FBSDID("$FreeBSD$"); #define PCI_PRODUCT_LSI_1030 0x0030 #endif +#ifndef PCI_PRODUCT_LSI_1030ZC +#define PCI_PRODUCT_LSI_1030ZC 0x0031 +#endif + #ifndef PCI_PRODUCT_LSI_SAS1064 #define PCI_PRODUCT_LSI_SAS1064 0x0050 #endif @@ -177,6 +197,10 @@ __FBSDID("$FreeBSD$"); #define PCI_PRODUCT_LSI_SAS1068 0x0054 #endif +#ifndef PCI_PRODUCT_LSI_SAS1068A +#define PCI_PRODUCT_LSI_SAS1068A 0x0055 +#endif + #ifndef PCI_PRODUCT_LSI_SAS1068E #define PCI_PRODUCT_LSI_SAS1068E 0x0058 #endif @@ -232,7 +256,7 @@ mpt_pci_probe(device_t dev) return (ENXIO); } - switch ((pci_get_device(dev) & ~1)) { + switch (pci_get_device(dev)) { case PCI_PRODUCT_LSI_FC909: desc = "LSILogic FC909 FC Adapter"; break; @@ -242,15 +266,27 @@ mpt_pci_probe(device_t dev) case PCI_PRODUCT_LSI_FC919: desc = "LSILogic FC919 FC Adapter"; break; + case PCI_PRODUCT_LSI_FC919_LAN: + desc = "LSILogic FC919 LAN Adapter"; + break; case PCI_PRODUCT_LSI_FC929: desc = "Dual LSILogic FC929 FC Adapter"; break; + case PCI_PRODUCT_LSI_FC929_LAN: + desc = "Dual LSILogic FC929 LAN Adapter"; + break; case PCI_PRODUCT_LSI_FC919X: desc = "LSILogic FC919 FC PCI-X Adapter"; break; + case PCI_PRODUCT_LSI_FC919X_LAN: + desc = "LSILogic FC919 LAN PCI-X Adapter"; + break; case PCI_PRODUCT_LSI_FC929X: desc = "Dual LSILogic FC929X 2Gb/s FC PCI-X Adapter"; break; + case PCI_PRODUCT_LSI_FC929X_LAN: + desc = "Dual LSILogic FC929X LAN PCI-X Adapter"; + break; case PCI_PRODUCT_LSI_FC646: desc = "Dual LSILogic FC7X04X 4Gb/s FC PCI-Express Adapter"; break; @@ -258,6 +294,7 @@ mpt_pci_probe(device_t dev) desc = "Dual LSILogic FC7X04X 4Gb/s FC PCI-X Adapter"; break; case PCI_PRODUCT_LSI_1030: + case PCI_PRODUCT_LSI_1030ZC: desc = "LSILogic 1030 Ultra4 Adapter"; break; case PCI_PRODUCT_LSI_SAS1064: @@ -266,6 +303,7 @@ mpt_pci_probe(device_t dev) case PCI_PRODUCT_LSI_SAS1066: case PCI_PRODUCT_LSI_SAS1066E: case PCI_PRODUCT_LSI_SAS1068: + case PCI_PRODUCT_LSI_SAS1068A: case PCI_PRODUCT_LSI_SAS1068E: case PCI_PRODUCT_LSI_SAS1078: case PCI_PRODUCT_LSI_SAS1078DE: @@ -428,12 +466,17 @@ mpt_pci_attach(device_t dev) return (ENOMEM); } memset(mpt, 0, sizeof(struct mpt_softc)); - switch ((pci_get_device(dev) & ~1)) { + switch (pci_get_device(dev)) { case PCI_PRODUCT_LSI_FC909: case PCI_PRODUCT_LSI_FC909A: case PCI_PRODUCT_LSI_FC919: + case PCI_PRODUCT_LSI_FC919_LAN: case PCI_PRODUCT_LSI_FC929: + case PCI_PRODUCT_LSI_FC929_LAN: + case PCI_PRODUCT_LSI_FC929X: + case PCI_PRODUCT_LSI_FC929X_LAN: case PCI_PRODUCT_LSI_FC919X: + case PCI_PRODUCT_LSI_FC919X_LAN: case PCI_PRODUCT_LSI_FC646: case PCI_PRODUCT_LSI_FC7X04X: mpt->is_fc = 1; @@ -448,6 +491,7 @@ mpt_pci_attach(device_t dev) case PCI_PRODUCT_LSI_SAS1066: case PCI_PRODUCT_LSI_SAS1066E: case PCI_PRODUCT_LSI_SAS1068: + case PCI_PRODUCT_LSI_SAS1068A: case PCI_PRODUCT_LSI_SAS1068E: mpt->is_sas = 1; break; @@ -499,11 +543,17 @@ mpt_pci_attach(device_t dev) * Is this part a dual? * If so, link with our partner (around yet) */ - if ((pci_get_device(dev) & ~1) == PCI_PRODUCT_LSI_FC929 || - (pci_get_device(dev) & ~1) == PCI_PRODUCT_LSI_FC646 || - (pci_get_device(dev) & ~1) == PCI_PRODUCT_LSI_FC7X04X || - (pci_get_device(dev) & ~1) == PCI_PRODUCT_LSI_1030) { + switch (pci_get_device(dev)) { + case PCI_PRODUCT_LSI_FC929: + case PCI_PRODUCT_LSI_FC929_LAN: + case PCI_PRODUCT_LSI_FC646: + case PCI_PRODUCT_LSI_FC7X04X: + case PCI_PRODUCT_LSI_1030: + case PCI_PRODUCT_LSI_1030ZC: mpt_link_peer(mpt); + break; + default: + break; } /* From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 19:10:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 58947106566C; Mon, 5 Mar 2012 19:10:56 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 474188FC19; Mon, 5 Mar 2012 19:10:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25JAuuF000427; Mon, 5 Mar 2012 19:10:56 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25JAuc4000426; Mon, 5 Mar 2012 19:10:56 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201203051910.q25JAuc4000426@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 5 Mar 2012 19:10:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232564 - stable/9/tools/regression/sockets/so_setfib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 19:10:56 -0000 Author: bz Date: Mon Mar 5 19:10:55 2012 New Revision: 232564 URL: http://svn.freebsd.org/changeset/base/232564 Log: MFC r231855: Add regression tests for the setsockopt(2) SO_SETFIB socket option. Check that the expected domain(9) families all handle the socket option correctly and do proper bounds checks. This would catch bugs as fixed in (r230938,)r230981. Sponsored by: Cisco Systems, Inc. Added: stable/9/tools/regression/sockets/so_setfib/ - copied from r231855, head/tools/regression/sockets/so_setfib/ Modified: Directory Properties: stable/9/tools/regression/sockets/ (props changed) From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 19:10:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 672A1106564A; Mon, 5 Mar 2012 19:10:59 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 55D148FC08; Mon, 5 Mar 2012 19:10:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25JAxUF000468; Mon, 5 Mar 2012 19:10:59 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25JAx2s000467; Mon, 5 Mar 2012 19:10:59 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201203051910.q25JAx2s000467@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 5 Mar 2012 19:10:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232565 - stable/8/tools/regression/sockets/so_setfib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 19:10:59 -0000 Author: bz Date: Mon Mar 5 19:10:58 2012 New Revision: 232565 URL: http://svn.freebsd.org/changeset/base/232565 Log: MFC r231855: Add regression tests for the setsockopt(2) SO_SETFIB socket option. Check that the expected domain(9) families all handle the socket option correctly and do proper bounds checks. This would catch bugs as fixed in (r230938,)r230981. Sponsored by: Cisco Systems, Inc. Added: stable/8/tools/regression/sockets/so_setfib/ - copied from r231855, head/tools/regression/sockets/so_setfib/ Modified: Directory Properties: stable/8/tools/regression/sockets/ (props changed) From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 19:13:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 059EC1065672; Mon, 5 Mar 2012 19:13:19 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E797E8FC17; Mon, 5 Mar 2012 19:13:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25JDISv000604; Mon, 5 Mar 2012 19:13:18 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25JDI8j000595; Mon, 5 Mar 2012 19:13:18 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201203051913.q25JDI8j000595@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 5 Mar 2012 19:13:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232566 - in stable/9/tools/test: . netfibs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 19:13:19 -0000 Author: bz Date: Mon Mar 5 19:13:18 2012 New Revision: 232566 URL: http://svn.freebsd.org/changeset/base/232566 Log: MFC r231858: Add regression tests scripts for multi-IP FIBs exercising the send, receive and forward path tagging packets with both the ifconfig fib option or using ipfw, running ICMP6, TCP/v6 and UDP/v6 tests and testing both setfib(2) as well as the SO_SETFIB socket option. At 16 FIBs a total of over 64k return codes/replies/stati are checked, sometimes multiple times (in different ways, e.g. the reflected request as well as ipfw counter values). The scripts need two or three machines to run and are thus not added to the tools/regression framework but only to tools/test. MFC r232114: Update scripts to work around two sh(1) bugs found in stable/8: 1) _x=$((_x + 1)) does not work while x=$((x + 1)) does. 2) Parameter Expansion, esp. "${x%%bar}" does not work if quoted. Correct typos and improve some details forwarding.sh already had in initiator, esp. related to ipfw accepting if the default is deny. Add an extra stat call to the "delay" function in addition to the touch which together is still a lot faster than sleep 1 but seems to help a lot more to mitigate the unrelated kernel race seen. Sponsored by: Cisco Systems, Inc. Added: stable/9/tools/test/netfibs/ - copied from r231858, head/tools/test/netfibs/ Modified: stable/9/tools/test/README stable/9/tools/test/netfibs/README stable/9/tools/test/netfibs/forwarding.sh stable/9/tools/test/netfibs/initiator.sh stable/9/tools/test/netfibs/reflector.sh Directory Properties: stable/9/tools/test/ (props changed) Modified: stable/9/tools/test/README ============================================================================== --- stable/9/tools/test/README Mon Mar 5 19:10:58 2012 (r232565) +++ stable/9/tools/test/README Mon Mar 5 19:13:18 2012 (r232566) @@ -10,5 +10,6 @@ Please make a subdir per program, and ad devrandom Programs to test /dev/*random. dtrace DTrace test suite malloc A program to test and benchmark malloc(). +netfibs Programs to test multi-FIB network stacks. posixshm A program to test POSIX shared memory. testfloat Programs to test floating-point implementations Modified: stable/9/tools/test/netfibs/README ============================================================================== --- head/tools/test/netfibs/README Fri Feb 17 04:26:24 2012 (r231858) +++ stable/9/tools/test/netfibs/README Mon Mar 5 19:13:18 2012 (r232566) @@ -35,7 +35,7 @@ initiator.sh and reflector.sh output. A special value of 42 will enable sh(1) xtrace printing. The output format is modeled after Test::Harness Perl as used in - tools/regression/ but not always complaint following the test case name. + tools/regression/ but not always compliant following the test case name. NOTE: at the time of writing reflector.sh can trigger kernel races unrelated to multi-FIB test leading to a panic(9). "delay" calls Modified: stable/9/tools/test/netfibs/forwarding.sh ============================================================================== --- head/tools/test/netfibs/forwarding.sh Fri Feb 17 04:26:24 2012 (r231858) +++ stable/9/tools/test/netfibs/forwarding.sh Mon Mar 5 19:13:18 2012 (r232566) @@ -222,36 +222,36 @@ _reachability_check() reachability_check() { - local _i _rc + local _i rc # Try to reach all control addresses on other nodes. # We need to loop for a while as we cannot expect all to be up # the very same moment. i=1 - _rc=42 - while test ${_rc} -ne 0 -a ${i} -le ${WAITS}; do + rc=42 + while test ${rc} -ne 0 -a ${i} -le ${WAITS}; do print_debug "${i}/${WAITS} trying to ping6 control addresses." - _rc=0 + rc=0 set +e case ${node} in left) _reachability_check ${MIDDLELEFTADDR} - _rc=$((_rc + $?)) + rc=$((rc + $?)) _reachability_check ${MIDDLERIGHTADDR} - _rc=$((_rc + $?)) + rc=$((rc + $?)) _reachability_check ${RIGHTADDR} - _rc=$((_rc + $?)) + rc=$((rc + $?)) ;; middle) _reachability_check ${LEFTADDR} - _rc=$((_rc + $?)) + rc=$((rc + $?)) _reachability_check ${RIGHTADDR} - _rc=$((_rc + $?)) + rc=$((rc + $?)) ;; right) _reachability_check ${MIDDLERIGHTADDR} - _rc=$((_rc + $?)) + rc=$((rc + $?)) _reachability_check ${MIDDLELEFTADDR} - _rc=$((_rc + $?)) + rc=$((rc + $?)) _reachability_check ${LEFTADDR} - _rc=$((_rc + $?)) + rc=$((rc + $?)) ;; esac set -e @@ -390,14 +390,14 @@ test_icmp6() test_ulp_reflect_one() { - local _txt _opts _port _fib + local _txt _opts port fib _txt="$1" _opts="$2" - _port=$3 - _fib=$4 + port=$3 + fib=$4 - print_debug "./reflect -p $((_port + 1 + _fib)) -t ${_txt}" "${_opts}" - ./reflect -p $((_port + 1 + _fib)) -t ${_txt} ${_opts} + print_debug "./reflect -p $((port + 1 + fib)) -t ${_txt}" "${_opts}" + ./reflect -p $((port + 1 + fib)) -t ${_txt} ${_opts} print_debug "reflect '${_txt}' terminated without error." } @@ -463,19 +463,19 @@ nc_send_recv() test_ulp() { - local _maxfibs _msg _addr _port _fib i _txt testno _rc _reply - _maxfibs=$1 + local maxfibs _msg _addr port fib i _txt testno _rc _reply + maxfibs=$1 _msg="$2" _addr=$3 - _port=$4 - _fib=$5 + port=$4 + fib=$5 - printf "1..%d\n" $((${_maxfibs} * 2)) + printf "1..%d\n" $((${maxfibs} * 2)) testno=1 i=0 - while test ${i} -lt ${_maxfibs}; do + while test ${i} -lt ${maxfibs}; do - if test ${i} -eq $((${_maxfibs} - 1)); then + if test ${i} -eq $((${maxfibs} - 1)); then # Last one; signal DONE. _txt="DONE ${_msg}_${i}" else @@ -485,18 +485,18 @@ test_ulp() eval _rc="\${rc_${i}}" # Test TCP. - nc_send_recv ${_maxfibs} "${_txt}" "${_txt}" ${_addr} \ - $((${_port} + 1 + _fib)) "" + nc_send_recv ${maxfibs} "${_txt}" "${_txt}" ${_addr} \ + $((${port} + 1 + fib)) "" check_rc $? ${_rc} ${testno} "${_msg}_${i}_tcp" \ - "[${_addr}]:$((${_port} + 1 + _fib)) ${_reply}" + "[${_addr}]:$((${port} + 1 + fib)) ${_reply}" testno=$((testno + 1)) sleep 1 # Test UDP. - nc_send_recv ${_maxfibs} "${_txt}" "${_txt}" ${_addr} \ - $((${_port} + 1 + _fib)) "-u" + nc_send_recv ${maxfibs} "${_txt}" "${_txt}" ${_addr} \ + $((${port} + 1 + fib)) "-u" check_rc $? ${_rc} ${testno} "${_msg}_${i}_udp" \ - "[${_addr}]:$((${_port} + 1 + _fib)) ${_reply}" + "[${_addr}]:$((${port} + 1 + fib)) ${_reply}" sleep 1 i=$((i + 1)) @@ -506,18 +506,18 @@ test_ulp() setup_ipfw_count() { - local i _port _maxfib _p _fib _ofib - _port=$1 - _maxfib=$2 + local i port maxfib _p _fib _ofib + port=$1 + maxfib=$2 _fib=$3 _ofib=$4 i=0 - while test ${i} -lt ${_maxfib}; do + while test ${i} -lt ${maxfib}; do case ${_ofib} in - -1) _p=$((_port + 1 + i)) ;; - *) _p=$((_port + 1 + _maxfib - 1 - i)) ;; + -1) _p=$((port + 1 + i)) ;; + *) _p=$((port + 1 + maxfib - 1 - i)) ;; esac # Only count ICMP6 echo replies. @@ -532,10 +532,10 @@ setup_ipfw_count() ipfw add $((20000 + i)) count ipv6-icmp from any to any \ icmp6types 128 fib ${i} via ${IFACEFAR} out > /dev/null ipfw add $((20000 + i)) count tcp from any to any \ - dst-port $((${_port} + 1 + i)) fib ${i} \ + dst-port $((${port} + 1 + i)) fib ${i} \ via ${IFACEFAR} out > /dev/null ipfw add $((20000 + i)) count udp from any to any \ - dst-port $((${_port} + 1 + i)) fib ${i} \ + dst-port $((${port} + 1 + i)) fib ${i} \ via ${IFACEFAR} out > /dev/null i=$((i + 1)) @@ -544,7 +544,7 @@ setup_ipfw_count() report_ipfw_count() { - local _fib _o i _rstr _c _req _p _opts + local _fib _o i _rstr _c _req _p _opts base _o="$2" case ${DEBUG} in @@ -553,9 +553,9 @@ report_ipfw_count() esac _rstr="RESULTS " - for _base in 10000 20000; do + for base in 10000 20000; do for _o in i t u; do - case ${_base} in + case ${base} in 10000) _rstr="${_rstr}\nLEFT " ;; 20000) _rstr="${_rstr}\nRIGHT " ;; esac @@ -568,11 +568,11 @@ report_ipfw_count() while test ${i} -lt ${RT_NUMFIBS}; do case "${_o}" in - i) _c=`ipfw show $((${_base} + i)) | \ + i) _c=`ipfw show $((${base} + i)) | \ awk '/ ipv6-icmp / { print $2 }'` ;; - t) _c=`ipfw show $((${_base} + i)) | \ + t) _c=`ipfw show $((${base} + i)) | \ awk '/ tcp / { print $2 }'` ;; - u) _c=`ipfw show $((${_base} + i)) | \ + u) _c=`ipfw show $((${base} + i)) | \ awk '/ udp / { print $2 }'` ;; esac _rstr="${_rstr}${i} ${_c}," @@ -582,7 +582,7 @@ report_ipfw_count() done i=0 while test ${i} -lt ${RT_NUMFIBS}; do - ipfw delete $((${_base} + i)) > /dev/null 2>&1 || true + ipfw delete $((${base} + i)) > /dev/null 2>&1 || true i=$((i + 1)) done done @@ -994,18 +994,18 @@ fwd_fib_symmetric_ipfw() _fwd_fib_asymmetric_results() { - local _n _fib _maxfib i _edge _type _rc + local _n fib maxfib i _edge _type _rc _n="$1" - _fib=$2 - _maxfib=$3 + fib=$2 + maxfib=$3 i=0 - while test ${i} -lt ${_maxfib}; do + while test ${i} -lt ${maxfib}; do _edge="RIGHT" for _type in "ICMP6" "TCP" "UDP"; do case ${i} in - ${_fib}) eval rc_${_n}_${_edge}_${_type}_${i}=1 + ${fib}) eval rc_${_n}_${_edge}_${_type}_${i}=1 #print_debug \ # "rc_${_n}_${_edge}_${_type}_${i}=1" ;; @@ -1018,14 +1018,14 @@ _fwd_fib_asymmetric_results() done i=$((i + 1)) done - _fib=$((_maxfib - 1 - _fib)) + fib=$((maxfib - 1 - fib)) i=0 - while test ${i} -lt ${_maxfib}; do + while test ${i} -lt ${maxfib}; do _edge="LEFT" for _type in "ICMP6" "TCP" "UDP"; do case ${i} in - ${_fib}) eval rc_${_n}_${_edge}_${_type}_${i}=1 + ${fib}) eval rc_${_n}_${_edge}_${_type}_${i}=1 #print_debug \ # "rc_${_n}_${_edge}_${_type}_${i}=1" ;; @@ -1073,16 +1073,16 @@ _fwd_fib_asymmetric_left() _fwd_fib_asymmetric_middle_ifconfig() { - local _n _maxfib i + local _n maxfib i _n="$1" - _maxfib=$2 + maxfib=$2 i=0 - while test ${i} -lt ${_maxfib}; do + while test ${i} -lt ${maxfib}; do ifconfig ${IFACE} fib ${i} - ifconfig ${IFACEFAR} fib $((${_maxfib} - 1 - ${i})) - setup_ipfw_count ${CTRLPORT} ${_maxfib} ${i} \ - $((${_maxfib} - 1 - ${i})) + ifconfig ${IFACEFAR} fib $((${maxfib} - 1 - ${i})) + setup_ipfw_count ${CTRLPORT} ${maxfib} ${i} \ + $((${maxfib} - 1 - ${i})) wait_remote_ready "START_${_n}_${i}" ipfw -q zero > /dev/null # Nothing to do for the middle node testing the default. @@ -1095,12 +1095,12 @@ _fwd_fib_asymmetric_middle_ifconfig() _fwd_fib_asymmetric_middle_ipfw() { - local _n _maxfib i j _port + local _n maxfib i j _port _n="$1" - _maxfib=$2 + maxfib=$2 i=0 - while test ${i} -lt ${_maxfib}; do + while test ${i} -lt ${maxfib}; do _port=$((CTRLPORT + 1 + i)) ipfw add 100 setfib ${i} ipv6-icmp from any to any \ @@ -1110,7 +1110,7 @@ _fwd_fib_asymmetric_middle_ipfw() ipfw add 100 setfib ${i} udp from any to any \ dst-port ${_port} via ${IFACE} in > /dev/null - j=$((${_maxfib} - 1 - ${i})) + j=$((${maxfib} - 1 - ${i})) ipfw add 100 setfib ${j} ipv6-icmp from any to any \ icmp6types 129 via ${IFACEFAR} in > /dev/null ipfw add 100 setfib ${j} tcp from any to any \ @@ -1118,7 +1118,7 @@ _fwd_fib_asymmetric_middle_ipfw() ipfw add 100 setfib ${j} udp from any to any \ src-port ${_port} via ${IFACEFAR} in > /dev/null - setup_ipfw_count ${CTRLPORT} ${_maxfib} ${i} ${j} + setup_ipfw_count ${CTRLPORT} ${maxfib} ${i} ${j} wait_remote_ready "START_${_n}_${i}" ipfw -q zero > /dev/null # Nothing to do for the middle node testing the default. Modified: stable/9/tools/test/netfibs/initiator.sh ============================================================================== --- head/tools/test/netfibs/initiator.sh Fri Feb 17 04:26:24 2012 (r231858) +++ stable/9/tools/test/netfibs/initiator.sh Mon Mar 5 19:13:18 2012 (r232566) @@ -219,6 +219,7 @@ send_greeting() # The latter is needed to allow indvidiual less specific later rules # from test cases to just disallow any IPv6 traffic on a matching FIB. ipfw -f flush > /dev/null 2>&1 + ipfw add 65000 permit ip from any to any > /dev/null 2>&1 ipfw add 5 permit ipv6-icmp from any to any icmp6types 135,136 fib 0 \ via ${IFACE} out > /dev/null 2>&1 @@ -255,7 +256,7 @@ EOI PEERLINKLOCAL=${_linklocal} # Swap the zoneid to the local interface scope. - PEERLINKLOCAL="${PEERLINKLOCAL%%\%*}%${IFACE}" + PEERLINKLOCAL=${PEERLINKLOCAL%%\%*}"%${IFACE}" print_debug "Successfully exchanged greeting. Peer at ${PEERLINKLOCAL}" } @@ -510,21 +511,21 @@ testtx_udp6_connected() # testtx_ulp6_connected_blackhole() { - local _fib i _n _o + local fib i _n _o _n="$1" _o="$2" - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do - print_debug "${_n} ${_fib}" + print_debug "${_n} ${fib}" # Setup expected return values. i=0 while test ${i} -lt ${RT_NUMFIBS}; do ipfw delete $((100 + i)) > /dev/null 2>&1 || true case ${i} in - ${_fib}) + ${fib}) eval rc_${i}_l=0 eval rc_${i}_a=0 ;; @@ -538,17 +539,17 @@ testtx_ulp6_connected_blackhole() i=$((i + 1)) done - testtx_ulp6_connected "${_n}${_fib}" "${_o}" ${_fib} + testtx_ulp6_connected "${_n}${fib}" "${_o}" ${fib} case ${DEBUG} in ''|0) ;; *) ipfw show ;; esac - _fib=$((_fib + 1)) + fib=$((fib + 1)) done - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - ipfw delete $((100 + _fib)) > /dev/null 2>&1 || true - _fib=$((_fib + 1)) + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + ipfw delete $((100 + fib)) > /dev/null 2>&1 || true + fib=$((fib + 1)) done } @@ -584,50 +585,50 @@ testtx_udp6_connected_blackhole() # testtx_ulp6_connected_transfernets() { - local _fib i _n _o _p + local fib i _n _o _p _n="$1" _o="$2" # Setup transfer networks and firewall. ipfw delete 10 > /dev/null 2>&1 || true - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias \ + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias \ > /dev/null 2>&1 || true - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 alias - ipfw add 10 setfib ${_fib} ipv6-icmp from 2001:2:${_fib}::/64 \ + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 alias + ipfw add 10 setfib ${fib} ipv6-icmp from 2001:2:${fib}::/64 \ to any ip6 icmp6types 135,136 via ${IFACE} in \ > /dev/null 2>&1 # Remove connected routes from all but matching FIB. i=0 while test ${i} -lt ${RT_NUMFIBS}; do case ${i} in - ${_fib});; + ${fib});; *) setfib -F${i} route delete -inet6 \ - -net 2001:2:${_fib}:: > /dev/null 2>&1 + -net 2001:2:${fib}:: > /dev/null 2>&1 ;; esac i=$((i + 1)) done - _fib=$((_fib + 1)) + fib=$((fib + 1)) done # Save PEERADDR _p=${PEERADDR} # Run tests. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - PEERADDR=2001:2:${_fib}::2 + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + PEERADDR=2001:2:${fib}::2 - print_debug "${_n} ${_fib}" + print_debug "${_n} ${fib}" # Setup expected return values. i=0 while test ${i} -lt ${RT_NUMFIBS}; do eval rc_${i}_l=0 case ${i} in - ${_fib}) + ${fib}) eval rc_${i}_a=0 ;; *) eval rc_${i}_a=1 @@ -636,18 +637,18 @@ testtx_ulp6_connected_transfernets() i=$((i + 1)) done - testtx_ulp6_connected "${_n}${_fib}" "${_o}" ${_fib} - _fib=$((_fib + 1)) + testtx_ulp6_connected "${_n}${fib}" "${_o}" ${fib} + fib=$((fib + 1)) done # Restore PEERADDR PEERADDR=${_p} # Cleanup transfer networks and firewall. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias - _fib=$((_fib + 1)) + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias + fib=$((fib + 1)) done ipfw delete 10 > /dev/null 2>&1 } @@ -684,46 +685,46 @@ testtx_udp6_connected_transfernets() # testtx_ulp6_connected_ifconfig_transfernets() { - local _fib i _n _o _p + local fib i _n _o _p _n="$1" _o="$2" # Setup transfer networks. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias \ + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias \ > /dev/null 2>&1 || true - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 alias + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 alias # Remove connected routes from all but matching FIB. i=0 while test ${i} -lt ${RT_NUMFIBS}; do case ${i} in - ${_fib});; + ${fib});; *) setfib -F${i} route delete -inet6 \ - -net 2001:2:${_fib}:: > /dev/null 2>&1 + -net 2001:2:${fib}:: > /dev/null 2>&1 ;; esac i=$((i + 1)) done - _fib=$((_fib + 1)) + fib=$((fib + 1)) done # Save PEERADDR _p=${PEERADDR} # Run tests. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - PEERADDR=2001:2:${_fib}::2 + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + PEERADDR=2001:2:${fib}::2 - print_debug "${_n} ${_fib}" + print_debug "${_n} ${fib}" # Setup expected return values. i=0 while test ${i} -lt ${RT_NUMFIBS}; do eval rc_${i}_l=0 case ${i} in - ${_fib}) + ${fib}) eval rc_${i}_a=0 ;; *) eval rc_${i}_a=1 @@ -732,20 +733,20 @@ testtx_ulp6_connected_ifconfig_transfern i=$((i + 1)) done - ifconfig ${IFACE} fib ${_fib} + ifconfig ${IFACE} fib ${fib} - testtx_ulp6_connected "${_n}${_fib}" "${_o}" ${_fib} - _fib=$((_fib + 1)) + testtx_ulp6_connected "${_n}${fib}" "${_o}" ${fib} + fib=$((fib + 1)) done # Restore PEERADDR PEERADDR=${_p} # Cleanup transfer networks. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias - _fib=$((_fib + 1)) + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias + fib=$((fib + 1)) done ifconfig ${IFACE} fib 0 } @@ -779,23 +780,23 @@ testtx_udp6_connected_ifconfig_transfern # testtx_ulp6_gateway() { - local _fib i _n _o _p + local fib i _n _o _p _n="$1" _o="$2" # Setup default gateway and expected error codes. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - setfib -F${_fib} route delete -inet6 -net default \ + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + setfib -F${fib} route delete -inet6 -net default \ > /dev/null 2>&1 || true - setfib -F${_fib} route add -inet6 -net default ${PEERADDR} \ + setfib -F${fib} route add -inet6 -net default ${PEERADDR} \ > /dev/null 2>&1 case "${_o}" in - -i) eval rc_${_fib}_l=0 ;; # ICMPv6 will succeed - *) eval rc_${_fib}_l=1 ;; + -i) eval rc_${fib}_l=0 ;; # ICMPv6 will succeed + *) eval rc_${fib}_l=1 ;; esac - eval rc_${_fib}_a=0 - _fib=$((_fib + 1)) + eval rc_${fib}_a=0 + fib=$((fib + 1)) done # Save PEERADDR @@ -810,11 +811,11 @@ testtx_ulp6_gateway() PEERADDR=${_p} # Cleanup transfer networks. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - setfib -F${_fib} route delete -inet6 -net default \ + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + setfib -F${fib} route delete -inet6 -net default \ > /dev/null 2>&1 - _fib=$((_fib + 1)) + fib=$((fib + 1)) done } @@ -851,38 +852,38 @@ testtx_udp6_gateway() # testtx_ulp6_transfernets_gateways() { - local _fib i _n _o _p + local fib i _n _o _p _n="$1" _o="$2" # Setup transfer networks, default routes, and firewall. - _fib=0 + fib=0 ipfw delete 10 > /dev/null 2>&1 || true - while test ${_fib} -lt ${RT_NUMFIBS}; do - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias \ + while test ${fib} -lt ${RT_NUMFIBS}; do + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias \ > /dev/null 2>&1 || true - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 alias \ + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 alias \ > /dev/null 2>&1 - ipfw add 10 setfib ${_fib} ipv6-icmp \ - from 2001:2:${_fib}::/64 to any ip6 icmp6types 135,136 \ + ipfw add 10 setfib ${fib} ipv6-icmp \ + from 2001:2:${fib}::/64 to any ip6 icmp6types 135,136 \ via ${IFACE} in > /dev/null 2>&1 # Remove connected routes from all but matching FIB. i=0 while test ${i} -lt ${RT_NUMFIBS}; do case ${i} in - ${_fib});; + ${fib});; *) setfib -F${i} route delete -inet6 \ - -net 2001:2:${_fib}:: > /dev/null 2>&1 + -net 2001:2:${fib}:: > /dev/null 2>&1 ;; esac i=$((i + 1)) done # Add default route. - setfib -F${_fib} route delete -inet6 -net default \ + setfib -F${fib} route delete -inet6 -net default \ > /dev/null 2>&1 || true - setfib -F${_fib} route add -inet6 -net default \ - 2001:2:${_fib}::2 > /dev/null 2>&1 - _fib=$((_fib + 1)) + setfib -F${fib} route add -inet6 -net default \ + 2001:2:${fib}::2 > /dev/null 2>&1 + fib=$((fib + 1)) done # Save PEERADDR @@ -908,13 +909,13 @@ testtx_ulp6_transfernets_gateways() PEERADDR=${_p} # Cleanup default routes, transfer networks, and firewall. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - setfib -F${_fib} route delete -inet6 -net default \ + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + setfib -F${fib} route delete -inet6 -net default \ > /dev/null 2>&1 - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias \ + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias \ > /dev/null 2>&1 - _fib=$((_fib + 1)) + fib=$((fib + 1)) done ipfw delete 10 > /dev/null 2>&1 } @@ -954,33 +955,33 @@ testtx_udp6_transfernets_gateways() # testtx_ulp6_transfernets_gateway() { - local _fib i _n _o _p + local fib i _n _o _p _n="$1" _o="$2" # Setup transfer networks, default routes, and firewall. - _fib=0 + fib=0 ipfw delete 10 > /dev/null 2>&1 || true - while test ${_fib} -lt ${RT_NUMFIBS}; do - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias \ + while test ${fib} -lt ${RT_NUMFIBS}; do + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias \ > /dev/null 2>&1 || true - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 alias \ + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 alias \ > /dev/null 2>&1 - ipfw add 10 setfib ${_fib} ipv6-icmp \ - from 2001:2:${_fib}::/64 to any ip6 icmp6types 135,136 \ + ipfw add 10 setfib ${fib} ipv6-icmp \ + from 2001:2:${fib}::/64 to any ip6 icmp6types 135,136 \ via ${IFACE} in > /dev/null 2>&1 # Remove connected routes from all but matching FIB. i=0 while test ${i} -lt ${RT_NUMFIBS}; do case ${i} in - ${_fib});; + ${fib});; *) setfib -F${i} route delete -inet6 \ - -net 2001:2:${_fib}:: > /dev/null 2>&1 + -net 2001:2:${fib}:: > /dev/null 2>&1 ;; esac i=$((i + 1)) done - _fib=$((_fib + 1)) + fib=$((fib + 1)) done # Save PEERADDR @@ -988,10 +989,10 @@ testtx_ulp6_transfernets_gateway() PEERADDR="2001:2:ff01::2" # Run tests. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do - print_debug "${_n} ${_fib}" + print_debug "${_n} ${fib}" # Setup expected return values. i=0 @@ -1001,7 +1002,7 @@ testtx_ulp6_transfernets_gateway() *) eval rc_${i}_l=1 ;; esac case ${i} in - ${_fib}) + ${fib}) eval rc_${i}_a=0 ;; *) eval rc_${i}_a=1 @@ -1011,30 +1012,30 @@ testtx_ulp6_transfernets_gateway() done # Add default route. - setfib -F${_fib} route delete -inet6 -net default \ + setfib -F${fib} route delete -inet6 -net default \ > /dev/null 2>&1 || true - setfib -F${_fib} route add -inet6 -net default \ - 2001:2:${_fib}::2 > /dev/null 2>&1 + setfib -F${fib} route add -inet6 -net default \ + 2001:2:${fib}::2 > /dev/null 2>&1 - testtx_ulp6_connected "${_n}${_fib}" "${_o}" ${_fib} + testtx_ulp6_connected "${_n}${fib}" "${_o}" ${fib} # Delete default route again. - setfib -F${_fib} route delete -inet6 -net default \ + setfib -F${fib} route delete -inet6 -net default \ > /dev/null 2>&1 - _fib=$((_fib + 1)) + fib=$((fib + 1)) done # Restore PEERADDR PEERADDR=${_p} # Cleanup default routes, transfer networks, and firewall. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - setfib -F${_fib} route delete -inet6 -net default \ + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + setfib -F${fib} route delete -inet6 -net default \ > /dev/null 2>&1 - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias \ + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias \ > /dev/null 2>&1 - _fib=$((_fib + 1)) + fib=$((fib + 1)) done ipfw delete 10 > /dev/null 2>&1 } @@ -1356,7 +1357,7 @@ testrx_main_setup_rc() testrx_main() { - local _n _o s t _fib _instances _destructive _transfer + local _n _o s t fib _instances _destructive _transfer _n="$1" _o="$2" _instances=$3 @@ -1369,14 +1370,14 @@ testrx_main() for t in ipfw ifconfig; do print_debug "${_n}_${t}" - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do testrx_main_setup_rc "${_n}" "${t}" \ - ${_fib} "${_o}" ${_instances} \ + ${fib} "${_o}" ${_instances} \ ${_destructive} ${_transfer} - _fib=$((_fib + 1)) + fib=$((fib + 1)) done done done @@ -1432,10 +1433,14 @@ testrx_udp6_same_addr_all_fibs_a_time() # # Prereqs. # -kldload ipfw > /dev/null 2>&1 || kldstat -v | grep -q ipfw +if test `sysctl -n security.jail.jailed` -eq 0; then + kldload ipfw > /dev/null 2>&1 || kldstat -v | grep -q ipfw -# Reduce the time we wait in case of no reply to 2s. -sysctl net.inet.tcp.keepinit=2000 > /dev/null 2>&1 + # Reduce the time we wait in case of no reply to 2s. + sysctl net.inet.tcp.keepinit=2000 > /dev/null 2>&1 +fi +ipfw -f flush > /dev/null 2>&1 || die "please load ipfw in base system" +ipfw add 65000 permit ip from any to any > /dev/null 2>&1 ################################################################################ # @@ -1491,7 +1496,7 @@ for uso in 0 1; do testtx_udp6_transfernets_gateway && sleep 1 done -# Receiver testering. +# Receiver testing. for uso in 0 1; do USE_SOSETFIB=${uso} Modified: stable/9/tools/test/netfibs/reflector.sh ============================================================================== --- head/tools/test/netfibs/reflector.sh Fri Feb 17 04:26:24 2012 (r231858) +++ stable/9/tools/test/netfibs/reflector.sh Mon Mar 5 19:13:18 2012 (r232566) @@ -70,6 +70,7 @@ delay() # sleep 1 is too long. touch /tmp/foo || true + stat /tmp/foo > /dev/null 2>&1 || true } check_rc() @@ -222,7 +223,7 @@ testtx_udp6_connected() # testtx_icmp6_connected_blackhole() { - local _opts _fib + local _opts fib _opts="" case ${DEBUG} in @@ -231,20 +232,20 @@ testtx_icmp6_connected_blackhole() *) _opts="-d" ;; esac - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do print_debug "./reflect -p ${CTRLPORT} -T TCP6 " \ - "-t testtx_icmp6_connected_blackhole${_fib} ${_opts}" + "-t testtx_icmp6_connected_blackhole${fib} ${_opts}" ./reflect -p ${CTRLPORT} -T TCP6 \ - -t testtx_icmp6_connected_blackhole${_fib} ${_opts} + -t testtx_icmp6_connected_blackhole${fib} ${_opts} print_debug "reflect terminated without error." - _fib=$((_fib + 1)) + fib=$((fib + 1)) done } testtx_tcp6_connected_blackhole() { - local _opts _fib + local _opts fib _opts="" case ${DEBUG} in @@ -253,20 +254,20 @@ testtx_tcp6_connected_blackhole() *) _opts="-d" ;; esac - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do print_debug "./reflect -p ${CTRLPORT} -T TCP6 " \ - "-t testtx_tcp6_connected_blackhole${_fib} ${_opts}" + "-t testtx_tcp6_connected_blackhole${fib} ${_opts}" ./reflect -p ${CTRLPORT} -T TCP6 \ - -t testtx_tcp6_connected_blackhole${_fib} ${_opts} + -t testtx_tcp6_connected_blackhole${fib} ${_opts} print_debug "reflect terminated without error." - _fib=$((_fib + 1)) + fib=$((fib + 1)) done } testtx_udp6_connected_blackhole() { - local _opts _fib + local _opts fib _opts="" case ${DEBUG} in @@ -275,14 +276,14 @@ testtx_udp6_connected_blackhole() *) _opts="-d" ;; esac - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do print_debug "./reflect -p ${CTRLPORT} -T UDP6 " \ - "-t testtx_udp6_connected_blackhole${_fib} ${_opts}" + "-t testtx_udp6_connected_blackhole${fib} ${_opts}" ./reflect -p ${CTRLPORT} -T UDP6 \ - -t testtx_udp6_connected_blackhole${_fib} ${_opts} + -t testtx_udp6_connected_blackhole${fib} ${_opts} print_debug "reflect terminated without error." - _fib=$((_fib + 1)) + fib=$((fib + 1)) done } @@ -290,7 +291,7 @@ testtx_udp6_connected_blackhole() # testtx_ulp6_connected_transfernets() { - local _opts _fib _n _o + local _opts fib _n _o _n="$1" _o="$2" @@ -302,28 +303,28 @@ testtx_ulp6_connected_transfernets() esac # Setup transfer networks. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - setfib -F${_fib} \ - ifconfig ${IFACE} inet6 2001:2:${_fib}::2/64 alias - _fib=$((_fib + 1)) + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + setfib -F${fib} \ + ifconfig ${IFACE} inet6 2001:2:${fib}::2/64 alias + fib=$((fib + 1)) done - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - print_debug "./reflect -p ${CTRLPORT} -T ${_o} -t ${_n}${_fib} ${_opts}" - ./reflect -p ${CTRLPORT} -T ${_o} -t ${_n}${_fib} ${_opts} + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + print_debug "./reflect -p ${CTRLPORT} -T ${_o} -t ${_n}${fib} ${_opts}" + ./reflect -p ${CTRLPORT} -T ${_o} -t ${_n}${fib} ${_opts} print_debug "reflect terminated without error." - _fib=$((_fib + 1)) + fib=$((fib + 1)) done # Cleanup transfer networks. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - setfib -F${_fib} \ - ifconfig ${IFACE} inet6 2001:2:${_fib}::2/64 -alias + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + setfib -F${fib} \ + ifconfig ${IFACE} inet6 2001:2:${fib}::2/64 -alias delay - _fib=$((_fib + 1)) + fib=$((fib + 1)) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 19:13:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0C1991065677; Mon, 5 Mar 2012 19:13:20 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ED82A8FC1B; Mon, 5 Mar 2012 19:13:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25JDJNB000636; Mon, 5 Mar 2012 19:13:19 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25JDJec000630; Mon, 5 Mar 2012 19:13:19 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201203051913.q25JDJec000630@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 5 Mar 2012 19:13:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232567 - in stable/8/tools/test: . netfibs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 19:13:20 -0000 Author: bz Date: Mon Mar 5 19:13:19 2012 New Revision: 232567 URL: http://svn.freebsd.org/changeset/base/232567 Log: MFC r231858: Add regression tests scripts for multi-IP FIBs exercising the send, receive and forward path tagging packets with both the ifconfig fib option or using ipfw, running ICMP6, TCP/v6 and UDP/v6 tests and testing both setfib(2) as well as the SO_SETFIB socket option. At 16 FIBs a total of over 64k return codes/replies/stati are checked, sometimes multiple times (in different ways, e.g. the reflected request as well as ipfw counter values). The scripts need two or three machines to run and are thus not added to the tools/regression framework but only to tools/test. MFC r232114: Update scripts to work around two sh(1) bugs found in stable/8: 1) _x=$((_x + 1)) does not work while x=$((x + 1)) does. 2) Parameter Expansion, esp. "${x%%bar}" does not work if quoted. Correct typos and improve some details forwarding.sh already had in initiator, esp. related to ipfw accepting if the default is deny. Add an extra stat call to the "delay" function in addition to the touch which together is still a lot faster than sleep 1 but seems to help a lot more to mitigate the unrelated kernel race seen. Sponsored by: Cisco Systems, Inc. Added: stable/8/tools/test/netfibs/ - copied from r231858, head/tools/test/netfibs/ Modified: stable/8/tools/test/README stable/8/tools/test/netfibs/README stable/8/tools/test/netfibs/forwarding.sh stable/8/tools/test/netfibs/initiator.sh stable/8/tools/test/netfibs/reflector.sh Directory Properties: stable/8/tools/test/ (props changed) Modified: stable/8/tools/test/README ============================================================================== --- stable/8/tools/test/README Mon Mar 5 19:13:18 2012 (r232566) +++ stable/8/tools/test/README Mon Mar 5 19:13:19 2012 (r232567) @@ -10,5 +10,6 @@ Please make a subdir per program, and ad devrandom Programs to test /dev/*random. dtrace DTrace test suite malloc A program to test and benchmark malloc(). +netfibs Programs to test multi-FIB network stacks. posixshm A program to test POSIX shared memory. testfloat Programs to test floating-point implementations Modified: stable/8/tools/test/netfibs/README ============================================================================== --- head/tools/test/netfibs/README Fri Feb 17 04:26:24 2012 (r231858) +++ stable/8/tools/test/netfibs/README Mon Mar 5 19:13:19 2012 (r232567) @@ -35,7 +35,7 @@ initiator.sh and reflector.sh output. A special value of 42 will enable sh(1) xtrace printing. The output format is modeled after Test::Harness Perl as used in - tools/regression/ but not always complaint following the test case name. + tools/regression/ but not always compliant following the test case name. NOTE: at the time of writing reflector.sh can trigger kernel races unrelated to multi-FIB test leading to a panic(9). "delay" calls Modified: stable/8/tools/test/netfibs/forwarding.sh ============================================================================== --- head/tools/test/netfibs/forwarding.sh Fri Feb 17 04:26:24 2012 (r231858) +++ stable/8/tools/test/netfibs/forwarding.sh Mon Mar 5 19:13:19 2012 (r232567) @@ -222,36 +222,36 @@ _reachability_check() reachability_check() { - local _i _rc + local _i rc # Try to reach all control addresses on other nodes. # We need to loop for a while as we cannot expect all to be up # the very same moment. i=1 - _rc=42 - while test ${_rc} -ne 0 -a ${i} -le ${WAITS}; do + rc=42 + while test ${rc} -ne 0 -a ${i} -le ${WAITS}; do print_debug "${i}/${WAITS} trying to ping6 control addresses." - _rc=0 + rc=0 set +e case ${node} in left) _reachability_check ${MIDDLELEFTADDR} - _rc=$((_rc + $?)) + rc=$((rc + $?)) _reachability_check ${MIDDLERIGHTADDR} - _rc=$((_rc + $?)) + rc=$((rc + $?)) _reachability_check ${RIGHTADDR} - _rc=$((_rc + $?)) + rc=$((rc + $?)) ;; middle) _reachability_check ${LEFTADDR} - _rc=$((_rc + $?)) + rc=$((rc + $?)) _reachability_check ${RIGHTADDR} - _rc=$((_rc + $?)) + rc=$((rc + $?)) ;; right) _reachability_check ${MIDDLERIGHTADDR} - _rc=$((_rc + $?)) + rc=$((rc + $?)) _reachability_check ${MIDDLELEFTADDR} - _rc=$((_rc + $?)) + rc=$((rc + $?)) _reachability_check ${LEFTADDR} - _rc=$((_rc + $?)) + rc=$((rc + $?)) ;; esac set -e @@ -390,14 +390,14 @@ test_icmp6() test_ulp_reflect_one() { - local _txt _opts _port _fib + local _txt _opts port fib _txt="$1" _opts="$2" - _port=$3 - _fib=$4 + port=$3 + fib=$4 - print_debug "./reflect -p $((_port + 1 + _fib)) -t ${_txt}" "${_opts}" - ./reflect -p $((_port + 1 + _fib)) -t ${_txt} ${_opts} + print_debug "./reflect -p $((port + 1 + fib)) -t ${_txt}" "${_opts}" + ./reflect -p $((port + 1 + fib)) -t ${_txt} ${_opts} print_debug "reflect '${_txt}' terminated without error." } @@ -463,19 +463,19 @@ nc_send_recv() test_ulp() { - local _maxfibs _msg _addr _port _fib i _txt testno _rc _reply - _maxfibs=$1 + local maxfibs _msg _addr port fib i _txt testno _rc _reply + maxfibs=$1 _msg="$2" _addr=$3 - _port=$4 - _fib=$5 + port=$4 + fib=$5 - printf "1..%d\n" $((${_maxfibs} * 2)) + printf "1..%d\n" $((${maxfibs} * 2)) testno=1 i=0 - while test ${i} -lt ${_maxfibs}; do + while test ${i} -lt ${maxfibs}; do - if test ${i} -eq $((${_maxfibs} - 1)); then + if test ${i} -eq $((${maxfibs} - 1)); then # Last one; signal DONE. _txt="DONE ${_msg}_${i}" else @@ -485,18 +485,18 @@ test_ulp() eval _rc="\${rc_${i}}" # Test TCP. - nc_send_recv ${_maxfibs} "${_txt}" "${_txt}" ${_addr} \ - $((${_port} + 1 + _fib)) "" + nc_send_recv ${maxfibs} "${_txt}" "${_txt}" ${_addr} \ + $((${port} + 1 + fib)) "" check_rc $? ${_rc} ${testno} "${_msg}_${i}_tcp" \ - "[${_addr}]:$((${_port} + 1 + _fib)) ${_reply}" + "[${_addr}]:$((${port} + 1 + fib)) ${_reply}" testno=$((testno + 1)) sleep 1 # Test UDP. - nc_send_recv ${_maxfibs} "${_txt}" "${_txt}" ${_addr} \ - $((${_port} + 1 + _fib)) "-u" + nc_send_recv ${maxfibs} "${_txt}" "${_txt}" ${_addr} \ + $((${port} + 1 + fib)) "-u" check_rc $? ${_rc} ${testno} "${_msg}_${i}_udp" \ - "[${_addr}]:$((${_port} + 1 + _fib)) ${_reply}" + "[${_addr}]:$((${port} + 1 + fib)) ${_reply}" sleep 1 i=$((i + 1)) @@ -506,18 +506,18 @@ test_ulp() setup_ipfw_count() { - local i _port _maxfib _p _fib _ofib - _port=$1 - _maxfib=$2 + local i port maxfib _p _fib _ofib + port=$1 + maxfib=$2 _fib=$3 _ofib=$4 i=0 - while test ${i} -lt ${_maxfib}; do + while test ${i} -lt ${maxfib}; do case ${_ofib} in - -1) _p=$((_port + 1 + i)) ;; - *) _p=$((_port + 1 + _maxfib - 1 - i)) ;; + -1) _p=$((port + 1 + i)) ;; + *) _p=$((port + 1 + maxfib - 1 - i)) ;; esac # Only count ICMP6 echo replies. @@ -532,10 +532,10 @@ setup_ipfw_count() ipfw add $((20000 + i)) count ipv6-icmp from any to any \ icmp6types 128 fib ${i} via ${IFACEFAR} out > /dev/null ipfw add $((20000 + i)) count tcp from any to any \ - dst-port $((${_port} + 1 + i)) fib ${i} \ + dst-port $((${port} + 1 + i)) fib ${i} \ via ${IFACEFAR} out > /dev/null ipfw add $((20000 + i)) count udp from any to any \ - dst-port $((${_port} + 1 + i)) fib ${i} \ + dst-port $((${port} + 1 + i)) fib ${i} \ via ${IFACEFAR} out > /dev/null i=$((i + 1)) @@ -544,7 +544,7 @@ setup_ipfw_count() report_ipfw_count() { - local _fib _o i _rstr _c _req _p _opts + local _fib _o i _rstr _c _req _p _opts base _o="$2" case ${DEBUG} in @@ -553,9 +553,9 @@ report_ipfw_count() esac _rstr="RESULTS " - for _base in 10000 20000; do + for base in 10000 20000; do for _o in i t u; do - case ${_base} in + case ${base} in 10000) _rstr="${_rstr}\nLEFT " ;; 20000) _rstr="${_rstr}\nRIGHT " ;; esac @@ -568,11 +568,11 @@ report_ipfw_count() while test ${i} -lt ${RT_NUMFIBS}; do case "${_o}" in - i) _c=`ipfw show $((${_base} + i)) | \ + i) _c=`ipfw show $((${base} + i)) | \ awk '/ ipv6-icmp / { print $2 }'` ;; - t) _c=`ipfw show $((${_base} + i)) | \ + t) _c=`ipfw show $((${base} + i)) | \ awk '/ tcp / { print $2 }'` ;; - u) _c=`ipfw show $((${_base} + i)) | \ + u) _c=`ipfw show $((${base} + i)) | \ awk '/ udp / { print $2 }'` ;; esac _rstr="${_rstr}${i} ${_c}," @@ -582,7 +582,7 @@ report_ipfw_count() done i=0 while test ${i} -lt ${RT_NUMFIBS}; do - ipfw delete $((${_base} + i)) > /dev/null 2>&1 || true + ipfw delete $((${base} + i)) > /dev/null 2>&1 || true i=$((i + 1)) done done @@ -994,18 +994,18 @@ fwd_fib_symmetric_ipfw() _fwd_fib_asymmetric_results() { - local _n _fib _maxfib i _edge _type _rc + local _n fib maxfib i _edge _type _rc _n="$1" - _fib=$2 - _maxfib=$3 + fib=$2 + maxfib=$3 i=0 - while test ${i} -lt ${_maxfib}; do + while test ${i} -lt ${maxfib}; do _edge="RIGHT" for _type in "ICMP6" "TCP" "UDP"; do case ${i} in - ${_fib}) eval rc_${_n}_${_edge}_${_type}_${i}=1 + ${fib}) eval rc_${_n}_${_edge}_${_type}_${i}=1 #print_debug \ # "rc_${_n}_${_edge}_${_type}_${i}=1" ;; @@ -1018,14 +1018,14 @@ _fwd_fib_asymmetric_results() done i=$((i + 1)) done - _fib=$((_maxfib - 1 - _fib)) + fib=$((maxfib - 1 - fib)) i=0 - while test ${i} -lt ${_maxfib}; do + while test ${i} -lt ${maxfib}; do _edge="LEFT" for _type in "ICMP6" "TCP" "UDP"; do case ${i} in - ${_fib}) eval rc_${_n}_${_edge}_${_type}_${i}=1 + ${fib}) eval rc_${_n}_${_edge}_${_type}_${i}=1 #print_debug \ # "rc_${_n}_${_edge}_${_type}_${i}=1" ;; @@ -1073,16 +1073,16 @@ _fwd_fib_asymmetric_left() _fwd_fib_asymmetric_middle_ifconfig() { - local _n _maxfib i + local _n maxfib i _n="$1" - _maxfib=$2 + maxfib=$2 i=0 - while test ${i} -lt ${_maxfib}; do + while test ${i} -lt ${maxfib}; do ifconfig ${IFACE} fib ${i} - ifconfig ${IFACEFAR} fib $((${_maxfib} - 1 - ${i})) - setup_ipfw_count ${CTRLPORT} ${_maxfib} ${i} \ - $((${_maxfib} - 1 - ${i})) + ifconfig ${IFACEFAR} fib $((${maxfib} - 1 - ${i})) + setup_ipfw_count ${CTRLPORT} ${maxfib} ${i} \ + $((${maxfib} - 1 - ${i})) wait_remote_ready "START_${_n}_${i}" ipfw -q zero > /dev/null # Nothing to do for the middle node testing the default. @@ -1095,12 +1095,12 @@ _fwd_fib_asymmetric_middle_ifconfig() _fwd_fib_asymmetric_middle_ipfw() { - local _n _maxfib i j _port + local _n maxfib i j _port _n="$1" - _maxfib=$2 + maxfib=$2 i=0 - while test ${i} -lt ${_maxfib}; do + while test ${i} -lt ${maxfib}; do _port=$((CTRLPORT + 1 + i)) ipfw add 100 setfib ${i} ipv6-icmp from any to any \ @@ -1110,7 +1110,7 @@ _fwd_fib_asymmetric_middle_ipfw() ipfw add 100 setfib ${i} udp from any to any \ dst-port ${_port} via ${IFACE} in > /dev/null - j=$((${_maxfib} - 1 - ${i})) + j=$((${maxfib} - 1 - ${i})) ipfw add 100 setfib ${j} ipv6-icmp from any to any \ icmp6types 129 via ${IFACEFAR} in > /dev/null ipfw add 100 setfib ${j} tcp from any to any \ @@ -1118,7 +1118,7 @@ _fwd_fib_asymmetric_middle_ipfw() ipfw add 100 setfib ${j} udp from any to any \ src-port ${_port} via ${IFACEFAR} in > /dev/null - setup_ipfw_count ${CTRLPORT} ${_maxfib} ${i} ${j} + setup_ipfw_count ${CTRLPORT} ${maxfib} ${i} ${j} wait_remote_ready "START_${_n}_${i}" ipfw -q zero > /dev/null # Nothing to do for the middle node testing the default. Modified: stable/8/tools/test/netfibs/initiator.sh ============================================================================== --- head/tools/test/netfibs/initiator.sh Fri Feb 17 04:26:24 2012 (r231858) +++ stable/8/tools/test/netfibs/initiator.sh Mon Mar 5 19:13:19 2012 (r232567) @@ -219,6 +219,7 @@ send_greeting() # The latter is needed to allow indvidiual less specific later rules # from test cases to just disallow any IPv6 traffic on a matching FIB. ipfw -f flush > /dev/null 2>&1 + ipfw add 65000 permit ip from any to any > /dev/null 2>&1 ipfw add 5 permit ipv6-icmp from any to any icmp6types 135,136 fib 0 \ via ${IFACE} out > /dev/null 2>&1 @@ -255,7 +256,7 @@ EOI PEERLINKLOCAL=${_linklocal} # Swap the zoneid to the local interface scope. - PEERLINKLOCAL="${PEERLINKLOCAL%%\%*}%${IFACE}" + PEERLINKLOCAL=${PEERLINKLOCAL%%\%*}"%${IFACE}" print_debug "Successfully exchanged greeting. Peer at ${PEERLINKLOCAL}" } @@ -510,21 +511,21 @@ testtx_udp6_connected() # testtx_ulp6_connected_blackhole() { - local _fib i _n _o + local fib i _n _o _n="$1" _o="$2" - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do - print_debug "${_n} ${_fib}" + print_debug "${_n} ${fib}" # Setup expected return values. i=0 while test ${i} -lt ${RT_NUMFIBS}; do ipfw delete $((100 + i)) > /dev/null 2>&1 || true case ${i} in - ${_fib}) + ${fib}) eval rc_${i}_l=0 eval rc_${i}_a=0 ;; @@ -538,17 +539,17 @@ testtx_ulp6_connected_blackhole() i=$((i + 1)) done - testtx_ulp6_connected "${_n}${_fib}" "${_o}" ${_fib} + testtx_ulp6_connected "${_n}${fib}" "${_o}" ${fib} case ${DEBUG} in ''|0) ;; *) ipfw show ;; esac - _fib=$((_fib + 1)) + fib=$((fib + 1)) done - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - ipfw delete $((100 + _fib)) > /dev/null 2>&1 || true - _fib=$((_fib + 1)) + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + ipfw delete $((100 + fib)) > /dev/null 2>&1 || true + fib=$((fib + 1)) done } @@ -584,50 +585,50 @@ testtx_udp6_connected_blackhole() # testtx_ulp6_connected_transfernets() { - local _fib i _n _o _p + local fib i _n _o _p _n="$1" _o="$2" # Setup transfer networks and firewall. ipfw delete 10 > /dev/null 2>&1 || true - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias \ + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias \ > /dev/null 2>&1 || true - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 alias - ipfw add 10 setfib ${_fib} ipv6-icmp from 2001:2:${_fib}::/64 \ + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 alias + ipfw add 10 setfib ${fib} ipv6-icmp from 2001:2:${fib}::/64 \ to any ip6 icmp6types 135,136 via ${IFACE} in \ > /dev/null 2>&1 # Remove connected routes from all but matching FIB. i=0 while test ${i} -lt ${RT_NUMFIBS}; do case ${i} in - ${_fib});; + ${fib});; *) setfib -F${i} route delete -inet6 \ - -net 2001:2:${_fib}:: > /dev/null 2>&1 + -net 2001:2:${fib}:: > /dev/null 2>&1 ;; esac i=$((i + 1)) done - _fib=$((_fib + 1)) + fib=$((fib + 1)) done # Save PEERADDR _p=${PEERADDR} # Run tests. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - PEERADDR=2001:2:${_fib}::2 + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + PEERADDR=2001:2:${fib}::2 - print_debug "${_n} ${_fib}" + print_debug "${_n} ${fib}" # Setup expected return values. i=0 while test ${i} -lt ${RT_NUMFIBS}; do eval rc_${i}_l=0 case ${i} in - ${_fib}) + ${fib}) eval rc_${i}_a=0 ;; *) eval rc_${i}_a=1 @@ -636,18 +637,18 @@ testtx_ulp6_connected_transfernets() i=$((i + 1)) done - testtx_ulp6_connected "${_n}${_fib}" "${_o}" ${_fib} - _fib=$((_fib + 1)) + testtx_ulp6_connected "${_n}${fib}" "${_o}" ${fib} + fib=$((fib + 1)) done # Restore PEERADDR PEERADDR=${_p} # Cleanup transfer networks and firewall. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias - _fib=$((_fib + 1)) + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias + fib=$((fib + 1)) done ipfw delete 10 > /dev/null 2>&1 } @@ -684,46 +685,46 @@ testtx_udp6_connected_transfernets() # testtx_ulp6_connected_ifconfig_transfernets() { - local _fib i _n _o _p + local fib i _n _o _p _n="$1" _o="$2" # Setup transfer networks. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias \ + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias \ > /dev/null 2>&1 || true - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 alias + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 alias # Remove connected routes from all but matching FIB. i=0 while test ${i} -lt ${RT_NUMFIBS}; do case ${i} in - ${_fib});; + ${fib});; *) setfib -F${i} route delete -inet6 \ - -net 2001:2:${_fib}:: > /dev/null 2>&1 + -net 2001:2:${fib}:: > /dev/null 2>&1 ;; esac i=$((i + 1)) done - _fib=$((_fib + 1)) + fib=$((fib + 1)) done # Save PEERADDR _p=${PEERADDR} # Run tests. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - PEERADDR=2001:2:${_fib}::2 + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + PEERADDR=2001:2:${fib}::2 - print_debug "${_n} ${_fib}" + print_debug "${_n} ${fib}" # Setup expected return values. i=0 while test ${i} -lt ${RT_NUMFIBS}; do eval rc_${i}_l=0 case ${i} in - ${_fib}) + ${fib}) eval rc_${i}_a=0 ;; *) eval rc_${i}_a=1 @@ -732,20 +733,20 @@ testtx_ulp6_connected_ifconfig_transfern i=$((i + 1)) done - ifconfig ${IFACE} fib ${_fib} + ifconfig ${IFACE} fib ${fib} - testtx_ulp6_connected "${_n}${_fib}" "${_o}" ${_fib} - _fib=$((_fib + 1)) + testtx_ulp6_connected "${_n}${fib}" "${_o}" ${fib} + fib=$((fib + 1)) done # Restore PEERADDR PEERADDR=${_p} # Cleanup transfer networks. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias - _fib=$((_fib + 1)) + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias + fib=$((fib + 1)) done ifconfig ${IFACE} fib 0 } @@ -779,23 +780,23 @@ testtx_udp6_connected_ifconfig_transfern # testtx_ulp6_gateway() { - local _fib i _n _o _p + local fib i _n _o _p _n="$1" _o="$2" # Setup default gateway and expected error codes. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - setfib -F${_fib} route delete -inet6 -net default \ + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + setfib -F${fib} route delete -inet6 -net default \ > /dev/null 2>&1 || true - setfib -F${_fib} route add -inet6 -net default ${PEERADDR} \ + setfib -F${fib} route add -inet6 -net default ${PEERADDR} \ > /dev/null 2>&1 case "${_o}" in - -i) eval rc_${_fib}_l=0 ;; # ICMPv6 will succeed - *) eval rc_${_fib}_l=1 ;; + -i) eval rc_${fib}_l=0 ;; # ICMPv6 will succeed + *) eval rc_${fib}_l=1 ;; esac - eval rc_${_fib}_a=0 - _fib=$((_fib + 1)) + eval rc_${fib}_a=0 + fib=$((fib + 1)) done # Save PEERADDR @@ -810,11 +811,11 @@ testtx_ulp6_gateway() PEERADDR=${_p} # Cleanup transfer networks. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - setfib -F${_fib} route delete -inet6 -net default \ + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + setfib -F${fib} route delete -inet6 -net default \ > /dev/null 2>&1 - _fib=$((_fib + 1)) + fib=$((fib + 1)) done } @@ -851,38 +852,38 @@ testtx_udp6_gateway() # testtx_ulp6_transfernets_gateways() { - local _fib i _n _o _p + local fib i _n _o _p _n="$1" _o="$2" # Setup transfer networks, default routes, and firewall. - _fib=0 + fib=0 ipfw delete 10 > /dev/null 2>&1 || true - while test ${_fib} -lt ${RT_NUMFIBS}; do - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias \ + while test ${fib} -lt ${RT_NUMFIBS}; do + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias \ > /dev/null 2>&1 || true - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 alias \ + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 alias \ > /dev/null 2>&1 - ipfw add 10 setfib ${_fib} ipv6-icmp \ - from 2001:2:${_fib}::/64 to any ip6 icmp6types 135,136 \ + ipfw add 10 setfib ${fib} ipv6-icmp \ + from 2001:2:${fib}::/64 to any ip6 icmp6types 135,136 \ via ${IFACE} in > /dev/null 2>&1 # Remove connected routes from all but matching FIB. i=0 while test ${i} -lt ${RT_NUMFIBS}; do case ${i} in - ${_fib});; + ${fib});; *) setfib -F${i} route delete -inet6 \ - -net 2001:2:${_fib}:: > /dev/null 2>&1 + -net 2001:2:${fib}:: > /dev/null 2>&1 ;; esac i=$((i + 1)) done # Add default route. - setfib -F${_fib} route delete -inet6 -net default \ + setfib -F${fib} route delete -inet6 -net default \ > /dev/null 2>&1 || true - setfib -F${_fib} route add -inet6 -net default \ - 2001:2:${_fib}::2 > /dev/null 2>&1 - _fib=$((_fib + 1)) + setfib -F${fib} route add -inet6 -net default \ + 2001:2:${fib}::2 > /dev/null 2>&1 + fib=$((fib + 1)) done # Save PEERADDR @@ -908,13 +909,13 @@ testtx_ulp6_transfernets_gateways() PEERADDR=${_p} # Cleanup default routes, transfer networks, and firewall. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - setfib -F${_fib} route delete -inet6 -net default \ + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + setfib -F${fib} route delete -inet6 -net default \ > /dev/null 2>&1 - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias \ + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias \ > /dev/null 2>&1 - _fib=$((_fib + 1)) + fib=$((fib + 1)) done ipfw delete 10 > /dev/null 2>&1 } @@ -954,33 +955,33 @@ testtx_udp6_transfernets_gateways() # testtx_ulp6_transfernets_gateway() { - local _fib i _n _o _p + local fib i _n _o _p _n="$1" _o="$2" # Setup transfer networks, default routes, and firewall. - _fib=0 + fib=0 ipfw delete 10 > /dev/null 2>&1 || true - while test ${_fib} -lt ${RT_NUMFIBS}; do - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias \ + while test ${fib} -lt ${RT_NUMFIBS}; do + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias \ > /dev/null 2>&1 || true - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 alias \ + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 alias \ > /dev/null 2>&1 - ipfw add 10 setfib ${_fib} ipv6-icmp \ - from 2001:2:${_fib}::/64 to any ip6 icmp6types 135,136 \ + ipfw add 10 setfib ${fib} ipv6-icmp \ + from 2001:2:${fib}::/64 to any ip6 icmp6types 135,136 \ via ${IFACE} in > /dev/null 2>&1 # Remove connected routes from all but matching FIB. i=0 while test ${i} -lt ${RT_NUMFIBS}; do case ${i} in - ${_fib});; + ${fib});; *) setfib -F${i} route delete -inet6 \ - -net 2001:2:${_fib}:: > /dev/null 2>&1 + -net 2001:2:${fib}:: > /dev/null 2>&1 ;; esac i=$((i + 1)) done - _fib=$((_fib + 1)) + fib=$((fib + 1)) done # Save PEERADDR @@ -988,10 +989,10 @@ testtx_ulp6_transfernets_gateway() PEERADDR="2001:2:ff01::2" # Run tests. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do - print_debug "${_n} ${_fib}" + print_debug "${_n} ${fib}" # Setup expected return values. i=0 @@ -1001,7 +1002,7 @@ testtx_ulp6_transfernets_gateway() *) eval rc_${i}_l=1 ;; esac case ${i} in - ${_fib}) + ${fib}) eval rc_${i}_a=0 ;; *) eval rc_${i}_a=1 @@ -1011,30 +1012,30 @@ testtx_ulp6_transfernets_gateway() done # Add default route. - setfib -F${_fib} route delete -inet6 -net default \ + setfib -F${fib} route delete -inet6 -net default \ > /dev/null 2>&1 || true - setfib -F${_fib} route add -inet6 -net default \ - 2001:2:${_fib}::2 > /dev/null 2>&1 + setfib -F${fib} route add -inet6 -net default \ + 2001:2:${fib}::2 > /dev/null 2>&1 - testtx_ulp6_connected "${_n}${_fib}" "${_o}" ${_fib} + testtx_ulp6_connected "${_n}${fib}" "${_o}" ${fib} # Delete default route again. - setfib -F${_fib} route delete -inet6 -net default \ + setfib -F${fib} route delete -inet6 -net default \ > /dev/null 2>&1 - _fib=$((_fib + 1)) + fib=$((fib + 1)) done # Restore PEERADDR PEERADDR=${_p} # Cleanup default routes, transfer networks, and firewall. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - setfib -F${_fib} route delete -inet6 -net default \ + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + setfib -F${fib} route delete -inet6 -net default \ > /dev/null 2>&1 - ifconfig ${IFACE} inet6 2001:2:${_fib}::1/64 -alias \ + ifconfig ${IFACE} inet6 2001:2:${fib}::1/64 -alias \ > /dev/null 2>&1 - _fib=$((_fib + 1)) + fib=$((fib + 1)) done ipfw delete 10 > /dev/null 2>&1 } @@ -1356,7 +1357,7 @@ testrx_main_setup_rc() testrx_main() { - local _n _o s t _fib _instances _destructive _transfer + local _n _o s t fib _instances _destructive _transfer _n="$1" _o="$2" _instances=$3 @@ -1369,14 +1370,14 @@ testrx_main() for t in ipfw ifconfig; do print_debug "${_n}_${t}" - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do testrx_main_setup_rc "${_n}" "${t}" \ - ${_fib} "${_o}" ${_instances} \ + ${fib} "${_o}" ${_instances} \ ${_destructive} ${_transfer} - _fib=$((_fib + 1)) + fib=$((fib + 1)) done done done @@ -1432,10 +1433,14 @@ testrx_udp6_same_addr_all_fibs_a_time() # # Prereqs. # -kldload ipfw > /dev/null 2>&1 || kldstat -v | grep -q ipfw +if test `sysctl -n security.jail.jailed` -eq 0; then + kldload ipfw > /dev/null 2>&1 || kldstat -v | grep -q ipfw -# Reduce the time we wait in case of no reply to 2s. -sysctl net.inet.tcp.keepinit=2000 > /dev/null 2>&1 + # Reduce the time we wait in case of no reply to 2s. + sysctl net.inet.tcp.keepinit=2000 > /dev/null 2>&1 +fi +ipfw -f flush > /dev/null 2>&1 || die "please load ipfw in base system" +ipfw add 65000 permit ip from any to any > /dev/null 2>&1 ################################################################################ # @@ -1491,7 +1496,7 @@ for uso in 0 1; do testtx_udp6_transfernets_gateway && sleep 1 done -# Receiver testering. +# Receiver testing. for uso in 0 1; do USE_SOSETFIB=${uso} Modified: stable/8/tools/test/netfibs/reflector.sh ============================================================================== --- head/tools/test/netfibs/reflector.sh Fri Feb 17 04:26:24 2012 (r231858) +++ stable/8/tools/test/netfibs/reflector.sh Mon Mar 5 19:13:19 2012 (r232567) @@ -70,6 +70,7 @@ delay() # sleep 1 is too long. touch /tmp/foo || true + stat /tmp/foo > /dev/null 2>&1 || true } check_rc() @@ -222,7 +223,7 @@ testtx_udp6_connected() # testtx_icmp6_connected_blackhole() { - local _opts _fib + local _opts fib _opts="" case ${DEBUG} in @@ -231,20 +232,20 @@ testtx_icmp6_connected_blackhole() *) _opts="-d" ;; esac - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do print_debug "./reflect -p ${CTRLPORT} -T TCP6 " \ - "-t testtx_icmp6_connected_blackhole${_fib} ${_opts}" + "-t testtx_icmp6_connected_blackhole${fib} ${_opts}" ./reflect -p ${CTRLPORT} -T TCP6 \ - -t testtx_icmp6_connected_blackhole${_fib} ${_opts} + -t testtx_icmp6_connected_blackhole${fib} ${_opts} print_debug "reflect terminated without error." - _fib=$((_fib + 1)) + fib=$((fib + 1)) done } testtx_tcp6_connected_blackhole() { - local _opts _fib + local _opts fib _opts="" case ${DEBUG} in @@ -253,20 +254,20 @@ testtx_tcp6_connected_blackhole() *) _opts="-d" ;; esac - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do print_debug "./reflect -p ${CTRLPORT} -T TCP6 " \ - "-t testtx_tcp6_connected_blackhole${_fib} ${_opts}" + "-t testtx_tcp6_connected_blackhole${fib} ${_opts}" ./reflect -p ${CTRLPORT} -T TCP6 \ - -t testtx_tcp6_connected_blackhole${_fib} ${_opts} + -t testtx_tcp6_connected_blackhole${fib} ${_opts} print_debug "reflect terminated without error." - _fib=$((_fib + 1)) + fib=$((fib + 1)) done } testtx_udp6_connected_blackhole() { - local _opts _fib + local _opts fib _opts="" case ${DEBUG} in @@ -275,14 +276,14 @@ testtx_udp6_connected_blackhole() *) _opts="-d" ;; esac - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do print_debug "./reflect -p ${CTRLPORT} -T UDP6 " \ - "-t testtx_udp6_connected_blackhole${_fib} ${_opts}" + "-t testtx_udp6_connected_blackhole${fib} ${_opts}" ./reflect -p ${CTRLPORT} -T UDP6 \ - -t testtx_udp6_connected_blackhole${_fib} ${_opts} + -t testtx_udp6_connected_blackhole${fib} ${_opts} print_debug "reflect terminated without error." - _fib=$((_fib + 1)) + fib=$((fib + 1)) done } @@ -290,7 +291,7 @@ testtx_udp6_connected_blackhole() # testtx_ulp6_connected_transfernets() { - local _opts _fib _n _o + local _opts fib _n _o _n="$1" _o="$2" @@ -302,28 +303,28 @@ testtx_ulp6_connected_transfernets() esac # Setup transfer networks. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - setfib -F${_fib} \ - ifconfig ${IFACE} inet6 2001:2:${_fib}::2/64 alias - _fib=$((_fib + 1)) + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + setfib -F${fib} \ + ifconfig ${IFACE} inet6 2001:2:${fib}::2/64 alias + fib=$((fib + 1)) done - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - print_debug "./reflect -p ${CTRLPORT} -T ${_o} -t ${_n}${_fib} ${_opts}" - ./reflect -p ${CTRLPORT} -T ${_o} -t ${_n}${_fib} ${_opts} + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + print_debug "./reflect -p ${CTRLPORT} -T ${_o} -t ${_n}${fib} ${_opts}" + ./reflect -p ${CTRLPORT} -T ${_o} -t ${_n}${fib} ${_opts} print_debug "reflect terminated without error." - _fib=$((_fib + 1)) + fib=$((fib + 1)) done # Cleanup transfer networks. - _fib=0 - while test ${_fib} -lt ${RT_NUMFIBS}; do - setfib -F${_fib} \ - ifconfig ${IFACE} inet6 2001:2:${_fib}::2/64 -alias + fib=0 + while test ${fib} -lt ${RT_NUMFIBS}; do + setfib -F${fib} \ + ifconfig ${IFACE} inet6 2001:2:${fib}::2/64 -alias delay - _fib=$((_fib + 1)) + fib=$((fib + 1)) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 19:25:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C3FAE106566B; Mon, 5 Mar 2012 19:25:51 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 834A88FC15; Mon, 5 Mar 2012 19:25:51 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 1A25F46B52; Mon, 5 Mar 2012 14:25:51 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 756DAB955; Mon, 5 Mar 2012 14:25:50 -0500 (EST) From: John Baldwin To: Marius Strobl Date: Mon, 5 Mar 2012 14:17:38 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <201203022038.q22Kc5vd046376@svn.freebsd.org> <201203021718.38092.jhb@freebsd.org> <20120302223807.GI55090@alchemy.franken.de> In-Reply-To: <20120302223807.GI55090@alchemy.franken.de> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201203051417.38470.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 05 Mar 2012 14:25:50 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232403 - in head/sys: dev/acpica dev/cardbus dev/pci powerpc/ofw sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 19:25:52 -0000 On Friday, March 02, 2012 5:38:07 pm Marius Strobl wrote: > On Fri, Mar 02, 2012 at 05:18:37PM -0500, John Baldwin wrote: > > On Friday, March 02, 2012 4:45:52 pm Marius Strobl wrote: > > > On Fri, Mar 02, 2012 at 08:38:05PM +0000, John Baldwin wrote: > > > > Author: jhb > > > > Date: Fri Mar 2 20:38:04 2012 > > > > New Revision: 232403 > > > > URL: http://svn.freebsd.org/changeset/base/232403 > > > > > > > > Log: > > > > - Add a bus_dma tag to each PCI bus that is a child of a Host-PCI bridge. > > > > The tag enforces a single restriction that all DMA transactions must not > > > > cross a 4GB boundary. Note that while this restriction technically only > > > > applies to PCI-express, this change applies it to all PCI devices as it > > > > is simpler to implement that way and errs on the side of caution. > > > > > > Hrm, wouldn't it have been more appropriate to implement this in the > > > Host-PCI bridges instead? Probably for anything but x86 this would > > > allow to easily distinguish at least between PCI and PCI-Express capable > > > bus hierarchies and would move the PAE workaround to the MD bits to > > > where it belongs. > > > > The PAE workaround is dying as I've already fixed HEAD to make boundary arguments > > use a bus_addr_t. However, I committed it in this fashion so it can be MFC'd > > since I can't merge the boundary KBI change. > > > > The reason I did not do this in the Host-PCI bridge drivers is that we would have > > to do this in umpteen different drivers, and all for a change that is mandated by > > the PCI spec and not specific to the various specs the Host-PCI bridge drivers > > all cater to (OFW, ACPI, MPTable, various and sundry embedded platforms, etc.). > > > > Well, on !x86 we don't have generic Host-PCI bridge drivers based on > what you call specs here, but rather specific drivers for individual > Host-PCI, Host-PCI-X and Host-PCI-Express chips. Whether the PCI* > buses beneath these are enumerated using FDT, OFW etc. doesn't really > matter in this context. Yes, but the 4GB limit is also not specific to the things that make psycho(4) differ from schizo(4). We could at least have a common helper routine to create the tag, but we'd still have a lot of duplicated code to implement N bus_get_dma_tag methods, etc. That type of setup is just begging to have some random Host-PCI bridge driver forget to include the right logic. It seems simpler and safer to do it in one central place, so it is always correct. Also, while PCI-express is the only type of PCI whose specification enforces a 4GB boundary, we have seen non-PCI-e PCI devices also need a 4GB boundary (e.g. bge(4) devices behind an AMD HyperTransport PCI-X bridge). Given all that, I think having older, non-PCI-e devices possibly use an extra S/G element in the rare case that a transaction crosses a 4GB boundary (which won't even happen with the 32-bit DVMA on sparc64 IIUC), is an ok tradeoff to ensure this constraint is correctly defined for all platforms, including future chipsets. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 19:32:45 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 50C5E106566B; Mon, 5 Mar 2012 19:32:45 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3DBAC8FC1D; Mon, 5 Mar 2012 19:32:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25JWjv9001545; Mon, 5 Mar 2012 19:32:45 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25JWiB6001530; Mon, 5 Mar 2012 19:32:44 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201203051932.q25JWiB6001530@svn.freebsd.org> From: Xin LI Date: Mon, 5 Mar 2012 19:32:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232568 - in stable/7/usr.sbin/cron: cron crontab doc lib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 19:32:45 -0000 Author: delphij Date: Mon Mar 5 19:32:44 2012 New Revision: 232568 URL: http://svn.freebsd.org/changeset/base/232568 Log: Merge all revisions except r199804 back to stable/7. Modified: stable/7/usr.sbin/cron/cron/Makefile stable/7/usr.sbin/cron/cron/cron.c stable/7/usr.sbin/cron/cron/cron.h stable/7/usr.sbin/cron/cron/database.c stable/7/usr.sbin/cron/cron/do_command.c stable/7/usr.sbin/cron/cron/externs.h stable/7/usr.sbin/cron/crontab/Makefile stable/7/usr.sbin/cron/crontab/crontab.5 stable/7/usr.sbin/cron/crontab/crontab.c stable/7/usr.sbin/cron/doc/CHANGES stable/7/usr.sbin/cron/doc/MAIL stable/7/usr.sbin/cron/lib/Makefile stable/7/usr.sbin/cron/lib/entry.c stable/7/usr.sbin/cron/lib/misc.c Directory Properties: stable/7/usr.sbin/cron/ (props changed) stable/7/usr.sbin/cron/cron/ (props changed) stable/7/usr.sbin/cron/crontab/ (props changed) Modified: stable/7/usr.sbin/cron/cron/Makefile ============================================================================== --- stable/7/usr.sbin/cron/cron/Makefile Mon Mar 5 19:13:19 2012 (r232567) +++ stable/7/usr.sbin/cron/cron/Makefile Mon Mar 5 19:32:44 2012 (r232568) @@ -9,4 +9,6 @@ CFLAGS+= -DLOGIN_CAP -DPAM DPADD= ${LIBCRON} ${LIBPAM} ${LIBUTIL} LDADD= ${LIBCRON} ${MINUSLPAM} -lutil +WARNS?= 2 + .include Modified: stable/7/usr.sbin/cron/cron/cron.c ============================================================================== --- stable/7/usr.sbin/cron/cron/cron.c Mon Mar 5 19:13:19 2012 (r232567) +++ stable/7/usr.sbin/cron/cron/cron.c Mon Mar 5 19:32:44 2012 (r232568) @@ -32,17 +32,17 @@ static const char rcsid[] = #endif -static void usage __P((void)), - run_reboot_jobs __P((cron_db *)), - cron_tick __P((cron_db *)), - cron_sync __P((void)), - cron_sleep __P((cron_db *)), - cron_clean __P((cron_db *)), +static void usage(void), + run_reboot_jobs(cron_db *), + cron_tick(cron_db *), + cron_sync(void), + cron_sleep(cron_db *), + cron_clean(cron_db *), #ifdef USE_SIGCHLD - sigchld_handler __P((int)), + sigchld_handler(int), #endif - sighup_handler __P((int)), - parse_args __P((int c, char *v[])); + sighup_handler(int), + parse_args(int c, char *v[]); static time_t last_time = 0; static int dst_enabled = 0; Modified: stable/7/usr.sbin/cron/cron/cron.h ============================================================================== --- stable/7/usr.sbin/cron/cron/cron.h Mon Mar 5 19:13:19 2012 (r232567) +++ stable/7/usr.sbin/cron/cron/cron.h Mon Mar 5 19:32:44 2012 (r232568) @@ -199,49 +199,50 @@ typedef struct _cron_db { } cron_db; -void set_cron_uid __P((void)), - set_cron_cwd __P((void)), - load_database __P((cron_db *)), - open_logfile __P((void)), - sigpipe_func __P((void)), - job_add __P((entry *, user *)), - do_command __P((entry *, user *)), - link_user __P((cron_db *, user *)), - unlink_user __P((cron_db *, user *)), - free_user __P((user *)), - env_free __P((char **)), - unget_char __P((int, FILE *)), - free_entry __P((entry *)), - skip_comments __P((FILE *)), - log_it __P((char *, int, char *, char *)), - log_close __P((void)); - -int job_runqueue __P((void)), - set_debug_flags __P((char *)), - get_char __P((FILE *)), - get_string __P((char *, int, FILE *, char *)), - swap_uids __P((void)), - load_env __P((char *, FILE *)), - cron_pclose __P((FILE *)), - strcmp_until __P((char *, char *, int)), - allowed __P((char *)), - strdtb __P((char *)); - -char *env_get __P((char *, char **)), - *arpadate __P((time_t *)), - *mkprints __P((unsigned char *, unsigned int)), - *first_word __P((char *, char *)), - **env_init __P((void)), - **env_copy __P((char **)), - **env_set __P((char **, char *)); +void set_cron_uid(void), + set_cron_cwd(void), + load_database(cron_db *), + open_logfile(void), + sigpipe_func(void), + job_add(entry *, user *), + do_command(entry *, user *), + link_user(cron_db *, user *), + unlink_user(cron_db *, user *), + free_user(user *), + env_free(char **), + unget_char(int, FILE *), + free_entry(entry *), + skip_comments(FILE *), + log_it(char *, int, char *, char *), + log_close(void); + +int job_runqueue(void), + set_debug_flags(char *), + get_char(FILE *), + get_string(char *, int, FILE *, char *), + swap_uids(void), + swap_uids_back(void), + load_env(char *, FILE *), + cron_pclose(FILE *), + strcmp_until(char *, char *, int), + allowed(char *), + strdtb(char *); + +char *env_get(char *, char **), + *arpadate(time_t *), + *mkprints(unsigned char *, unsigned int), + *first_word(char *, char *), + **env_init(void), + **env_copy(char **), + **env_set(char **, char *); -user *load_user __P((int, struct passwd *, char *)), - *find_user __P((cron_db *, char *)); +user *load_user(int, struct passwd *, char *), + *find_user(cron_db *, char *); -entry *load_entry __P((FILE *, void (*)(), - struct passwd *, char **)); +entry *load_entry(FILE *, void (*)(char *), + struct passwd *, char **); -FILE *cron_popen __P((char *, char *, entry *)); +FILE *cron_popen(char *, char *, entry *); /* in the C tradition, we only create Modified: stable/7/usr.sbin/cron/cron/database.c ============================================================================== --- stable/7/usr.sbin/cron/cron/database.c Mon Mar 5 19:13:19 2012 (r232567) +++ stable/7/usr.sbin/cron/cron/database.c Mon Mar 5 19:32:44 2012 (r232568) @@ -33,9 +33,9 @@ static const char rcsid[] = #define TMAX(a,b) ((a)>(b)?(a):(b)) -static void process_crontab __P((char *, char *, char *, +static void process_crontab(char *, char *, char *, struct stat *, - cron_db *, cron_db *)); + cron_db *, cron_db *); void Modified: stable/7/usr.sbin/cron/cron/do_command.c ============================================================================== --- stable/7/usr.sbin/cron/cron/do_command.c Mon Mar 5 19:13:19 2012 (r232567) +++ stable/7/usr.sbin/cron/cron/do_command.c Mon Mar 5 19:32:44 2012 (r232568) @@ -38,8 +38,8 @@ static const char rcsid[] = #endif -static void child_process __P((entry *, user *)), - do_univ __P((user *)); +static void child_process(entry *, user *), + do_univ(user *); void @@ -147,7 +147,7 @@ child_process(e, u) #ifdef USE_SIGCHLD /* our parent is watching for our death by catching SIGCHLD. we * do not care to watch for our children's deaths this way -- we - * use wait() explictly. so we have to disable the signal (which + * use wait() explicitly. so we have to disable the signal (which * was inherited from the parent). */ (void) signal(SIGCHLD, SIG_DFL); Modified: stable/7/usr.sbin/cron/cron/externs.h ============================================================================== --- stable/7/usr.sbin/cron/cron/externs.h Mon Mar 5 19:13:19 2012 (r232567) +++ stable/7/usr.sbin/cron/cron/externs.h Mon Mar 5 19:32:44 2012 (r232568) @@ -1,3 +1,5 @@ +/* $FreeBSD$ */ + /* Copyright 1993,1994 by Paul Vixie * All rights reserved * @@ -71,7 +73,7 @@ extern void *malloc(), *realloc(); * external variables needed for the interface. */ #if (!defined(BSD) || (BSD < 198911)) && !defined(ATT) && !defined(UNICOS) -int getopt __P((int, char * const *, const char *)); +int getopt(int, char * const *, const char *); #endif #if (!defined(BSD) || (BSD < 199103)) @@ -109,19 +111,19 @@ extern int optind, opterr, optopt; #endif #ifdef NEED_STRCASECMP -extern int strcasecmp __P((char *, char *)); +extern int strcasecmp(char *, char *); #endif #ifdef NEED_STRDUP -extern char *strdup __P((char *)); +extern char *strdup(char *); #endif #ifdef NEED_STRERROR -extern char *strerror __P((int)); +extern char *strerror(int); #endif #ifdef NEED_FLOCK -extern int flock __P((int, int)); +extern int flock(int, int); # define LOCK_SH 1 # define LOCK_EX 2 # define LOCK_NB 4 @@ -129,17 +131,17 @@ extern int flock __P((int, int)); #endif #ifdef NEED_SETSID -extern int setsid __P((void)); +extern int setsid(void); #endif #ifdef NEED_GETDTABLESIZE -extern int getdtablesize __P((void)); +extern int getdtablesize(void); #endif #ifdef NEED_SETENV -extern int setenv __P((char *, char *, int)); +extern int setenv(char *, char *, int); #endif #ifdef NEED_VFORK -extern PID_T vfork __P((void)); +extern PID_T vfork(void); #endif Modified: stable/7/usr.sbin/cron/crontab/Makefile ============================================================================== --- stable/7/usr.sbin/cron/crontab/Makefile Mon Mar 5 19:13:19 2012 (r232567) +++ stable/7/usr.sbin/cron/crontab/Makefile Mon Mar 5 19:32:44 2012 (r232568) @@ -8,6 +8,8 @@ BINOWN= root BINMODE=4555 PRECIOUSPROG= +WARNS?= 3 + CFLAGS+= -I${.CURDIR}/../cron DPADD= ${LIBCRON} ${LIBMD} ${LIBUTIL} Modified: stable/7/usr.sbin/cron/crontab/crontab.5 ============================================================================== --- stable/7/usr.sbin/cron/crontab/crontab.5 Mon Mar 5 19:13:19 2012 (r232567) +++ stable/7/usr.sbin/cron/crontab/crontab.5 Mon Mar 5 19:32:44 2012 (r232568) @@ -118,7 +118,7 @@ is defined (and non-empty), mail is sent to the user so named. .Ev MAILTO may also be used to direct mail to multiple recipients -by seperating recipient users with a comma. +by separating recipient users with a comma. If .Ev MAILTO is defined but empty (MAILTO=""), no Modified: stable/7/usr.sbin/cron/crontab/crontab.c ============================================================================== --- stable/7/usr.sbin/cron/crontab/crontab.c Mon Mar 5 19:13:19 2012 (r232567) +++ stable/7/usr.sbin/cron/crontab/crontab.c Mon Mar 5 19:32:44 2012 (r232568) @@ -63,18 +63,17 @@ static FILE *NewCrontab; static int CheckErrorCount; static enum opt_t Option; static struct passwd *pw; -static void list_cmd __P((void)), - delete_cmd __P((void)), - edit_cmd __P((void)), - poke_daemon __P((void)), - check_error __P((char *)), - parse_args __P((int c, char *v[])); -static int replace_cmd __P((void)); +static void list_cmd(void), + delete_cmd(void), + edit_cmd(void), + poke_daemon(void), + check_error(char *), + parse_args(int c, char *v[]); +static int replace_cmd(void); static void -usage(msg) - char *msg; +usage(char *msg) { fprintf(stderr, "crontab: usage error: %s\n", msg); fprintf(stderr, "%s\n%s\n", @@ -85,9 +84,7 @@ usage(msg) int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { int exitstatus; @@ -138,6 +135,7 @@ parse_args(argc, argv) if (!(pw = getpwuid(getuid()))) errx(ERROR_EXIT, "your UID isn't in the passwd file, bailing out"); + bzero(pw->pw_passwd, strlen(pw->pw_passwd)); (void) strncpy(User, pw->pw_name, (sizeof User)-1); User[(sizeof User)-1] = '\0'; strcpy(RealUser, User); @@ -154,6 +152,7 @@ parse_args(argc, argv) errx(ERROR_EXIT, "must be privileged to use -u"); if (!(pw = getpwnam(optarg))) errx(ERROR_EXIT, "user `%s' unknown", optarg); + bzero(pw->pw_passwd, strlen(pw->pw_passwd)); (void) strncpy(User, pw->pw_name, (sizeof User)-1); User[(sizeof User)-1] = '\0'; break; @@ -195,6 +194,17 @@ parse_args(argc, argv) } if (Option == opt_replace) { + /* relinquish the setuid status of the binary during + * the open, lest nonroot users read files they should + * not be able to read. we can't use access() here + * since there's a race condition. thanks go out to + * Arnt Gulbrandsen for spotting + * the race. + */ + + if (swap_uids() < OK) + err(ERROR_EXIT, "swapping uids"); + /* we have to open the file here because we're going to * chdir(2) into /var/cron before we get around to * reading the file. @@ -205,21 +215,11 @@ parse_args(argc, argv) !strcmp(resolved_path, SYSCRONTAB)) { err(ERROR_EXIT, SYSCRONTAB " must be edited manually"); } else { - /* relinquish the setuid status of the binary during - * the open, lest nonroot users read files they should - * not be able to read. we can't use access() here - * since there's a race condition. thanks go out to - * Arnt Gulbrandsen for spotting - * the race. - */ - - if (swap_uids() < OK) - err(ERROR_EXIT, "swapping uids"); if (!(NewCrontab = fopen(Filename, "r"))) err(ERROR_EXIT, "%s", Filename); - if (swap_uids() < OK) - err(ERROR_EXIT, "swapping uids back"); } + if (swap_uids_back() < OK) + err(ERROR_EXIT, "swapping uids back"); } Debug(DMISC, ("user=%s, file=%s, option=%s\n", @@ -261,7 +261,7 @@ list_cmd() { FILE *f; log_it(RealUser, Pid, "LIST", User); - (void) sprintf(n, CRON_TAB(User)); + (void) snprintf(n, sizeof(n), CRON_TAB(User)); if (!(f = fopen(n, "r"))) { if (errno == ENOENT) errx(ERROR_EXIT, "no crontab for %s", User); @@ -291,7 +291,7 @@ delete_cmd() { } log_it(RealUser, Pid, "DELETE", User); - (void) sprintf(n, CRON_TAB(User)); + (void) snprintf(n, sizeof(n), CRON_TAB(User)); if (unlink(n)) { if (errno == ENOENT) errx(ERROR_EXIT, "no crontab for %s", User); @@ -325,7 +325,7 @@ edit_cmd() { char new_md5[MD5_SIZE]; log_it(RealUser, Pid, "BEGIN EDIT", User); - (void) sprintf(n, CRON_TAB(User)); + (void) snprintf(n, sizeof(n), CRON_TAB(User)); if (!(f = fopen(n, "r"))) { if (errno != ENOENT) err(ERROR_EXIT, "%s", n); @@ -335,7 +335,7 @@ edit_cmd() { } um = umask(077); - (void) sprintf(Filename, "/tmp/crontab.XXXXXXXXXX"); + (void) snprintf(Filename, sizeof(Filename), "/tmp/crontab.XXXXXXXXXX"); if ((t = mkstemp(Filename)) == -1) { warn("%s", Filename); (void) umask(um); @@ -364,11 +364,15 @@ edit_cmd() { goto fatal; } again: + if (swap_uids() < OK) + err(ERROR_EXIT, "swapping uids"); if (stat(Filename, &statbuf) < 0) { warn("stat"); fatal: unlink(Filename); exit(ERROR_EXIT); } + if (swap_uids_back() < OK) + err(ERROR_EXIT, "swapping uids back"); if (statbuf.st_dev != fsbuf.st_dev || statbuf.st_ino != fsbuf.st_ino) errx(ERROR_EXIT, "temp file must be edited in place"); if (MD5File(Filename, orig_md5) == NULL) { @@ -412,14 +416,14 @@ edit_cmd() { /* parent */ { - void (*f[4])(); - f[0] = signal(SIGHUP, SIG_IGN); - f[1] = signal(SIGINT, SIG_IGN); - f[2] = signal(SIGTERM, SIG_IGN); + void (*sig[3])(int signal); + sig[0] = signal(SIGHUP, SIG_IGN); + sig[1] = signal(SIGINT, SIG_IGN); + sig[2] = signal(SIGTERM, SIG_IGN); xpid = wait(&waiter); - signal(SIGHUP, f[0]); - signal(SIGINT, f[1]); - signal(SIGTERM, f[2]); + signal(SIGHUP, sig[0]); + signal(SIGINT, sig[1]); + signal(SIGTERM, sig[2]); } if (xpid != pid) { warnx("wrong PID (%d != %d) from \"%s\"", xpid, pid, editor); @@ -434,6 +438,8 @@ edit_cmd() { editor, WTERMSIG(waiter), WCOREDUMP(waiter) ?"" :"no "); goto fatal; } + if (swap_uids() < OK) + err(ERROR_EXIT, "swapping uids"); if (stat(Filename, &statbuf) < 0) { warn("stat"); goto fatal; @@ -444,6 +450,8 @@ edit_cmd() { warn("MD5"); goto fatal; } + if (swap_uids_back() < OK) + err(ERROR_EXIT, "swapping uids back"); if (strcmp(orig_md5, new_md5) == 0 && !syntax_error) { warnx("no changes made to crontab"); goto remove; @@ -502,8 +510,9 @@ replace_cmd() { return (-2); } - (void) sprintf(n, "tmp.%d", Pid); - (void) sprintf(tn, CRON_TAB(n)); + (void) snprintf(n, sizeof(n), "tmp.%d", Pid); + (void) snprintf(tn, sizeof(tn), CRON_TAB(n)); + if (!(tmp = fopen(tn, "w+"))) { warn("%s", tn); return (-2); @@ -590,12 +599,13 @@ replace_cmd() { return (-2); } - (void) sprintf(n, CRON_TAB(User)); + (void) snprintf(n, sizeof(n), CRON_TAB(User)); if (rename(tn, n)) { warn("error renaming %s to %s", tn, n); unlink(tn); return (-2); } + log_it(RealUser, Pid, "REPLACE", User); poke_daemon(); Modified: stable/7/usr.sbin/cron/doc/CHANGES ============================================================================== --- stable/7/usr.sbin/cron/doc/CHANGES Mon Mar 5 19:13:19 2012 (r232567) +++ stable/7/usr.sbin/cron/doc/CHANGES Mon Mar 5 19:32:44 2012 (r232568) @@ -1,3 +1,6 @@ +$FreeBSD$ +-------- + Vixie Cron Changes from V2 to V3 Paul Vixie 29-Dec-1993 @@ -20,7 +23,7 @@ be reread whenever it changes. I also added a "-e" option to crontab(1). Nine people also sent me diffs to add this option, but I had already implemented it on my own. I actually -released an interrim version (V2.2, I think) for limited testing, and got a +released an interim version (V2.2, I think) for limited testing, and got a chance to fix a bad security bug in the "-e" option thanks to XXX. The daemon used to be extraordinarily sloppy in its use of file descriptors. @@ -57,7 +60,7 @@ which explains why a lot of other people syslog even when they configured it that way :-). Steve Simmons told me first, though, so he gets the point. -An interrim version of the daemon tried to "stat" every file before +An interim version of the daemon tried to "stat" every file before executing it; this turned out to be a horribly bad idea since finding the name of a file from a shell command is a hard job (that's why we have shells, right?) I removed this bogus code. Dave Burgess gets the point. Modified: stable/7/usr.sbin/cron/doc/MAIL ============================================================================== --- stable/7/usr.sbin/cron/doc/MAIL Mon Mar 5 19:13:19 2012 (r232567) +++ stable/7/usr.sbin/cron/doc/MAIL Mon Mar 5 19:32:44 2012 (r232568) @@ -186,7 +186,7 @@ five fields. Examples: (run command if day-of-month AND day-of-week are true) -Get the picture? This would be compatable with existing versions of +Get the picture? This would be compatible with existing versions of cron (which wouldn't currently be using any special characters, so that old crontabs would be handled correctly). Modified: stable/7/usr.sbin/cron/lib/Makefile ============================================================================== --- stable/7/usr.sbin/cron/lib/Makefile Mon Mar 5 19:13:19 2012 (r232567) +++ stable/7/usr.sbin/cron/lib/Makefile Mon Mar 5 19:32:44 2012 (r232568) @@ -4,6 +4,8 @@ LIB= cron INTERNALLIB= SRCS= entry.c env.c misc.c +WARNS?= 3 + CFLAGS+= -I${.CURDIR}/../cron CFLAGS+= -DLOGIN_CAP -DPAM Modified: stable/7/usr.sbin/cron/lib/entry.c ============================================================================== --- stable/7/usr.sbin/cron/lib/entry.c Mon Mar 5 19:13:19 2012 (r232567) +++ stable/7/usr.sbin/cron/lib/entry.c Mon Mar 5 19:32:44 2012 (r232568) @@ -41,10 +41,10 @@ typedef enum ecode { #endif } ecode_e; -static char get_list __P((bitstr_t *, int, int, char *[], int, FILE *)), - get_range __P((bitstr_t *, int, int, char *[], int, FILE *)), - get_number __P((int *, int, char *[], int, FILE *)); -static int set_element __P((bitstr_t *, int, int, int)); +static char get_list(bitstr_t *, int, int, char *[], int, FILE *), + get_range(bitstr_t *, int, int, char *[], int, FILE *), + get_number(int *, int, char *[], int, FILE *); +static int set_element(bitstr_t *, int, int, int); static char *ecodes[] = { @@ -87,7 +87,7 @@ free_entry(e) entry * load_entry(file, error_func, pw, envp) FILE *file; - void (*error_func)(); + void (*error_func)(char *); struct passwd *pw; char **envp; { @@ -254,7 +254,7 @@ load_entry(file, error_func, pw, envp) } } - /* make sundays equivilent */ + /* make sundays equivalent */ if (bit_test(e->dow, 0) || bit_test(e->dow, 7)) { bit_set(e->dow, 0); bit_set(e->dow, 7); Modified: stable/7/usr.sbin/cron/lib/misc.c ============================================================================== --- stable/7/usr.sbin/cron/lib/misc.c Mon Mar 5 19:13:19 2012 (r232567) +++ stable/7/usr.sbin/cron/lib/misc.c Mon Mar 5 19:32:44 2012 (r232568) @@ -324,9 +324,7 @@ skip_comments(file) * FALSE otherwise. */ static int -in_file(string, file) - char *string; - FILE *file; +in_file(char *string, FILE *file) { char line[MAX_TEMPSTR]; @@ -520,11 +518,8 @@ first_word(s, t) /* warning: * heavily ascii-dependent. */ -void -mkprint(dst, src, len) - register char *dst; - register unsigned char *src; - register int len; +static void +mkprint(register char *dst, register unsigned char *src, register int len) { while (len-- > 0) { From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 19:39:00 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5D57D106564A; Mon, 5 Mar 2012 19:39:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4CDB98FC13; Mon, 5 Mar 2012 19:39:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25Jd0QQ001777; Mon, 5 Mar 2012 19:39:00 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25Jd0k7001775; Mon, 5 Mar 2012 19:39:00 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201203051939.q25Jd0k7001775@svn.freebsd.org> From: John Baldwin Date: Mon, 5 Mar 2012 19:39:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232569 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 19:39:00 -0000 Author: jhb Date: Mon Mar 5 19:38:59 2012 New Revision: 232569 URL: http://svn.freebsd.org/changeset/base/232569 Log: Fix three instances of a missing word. Submitted by: bjk Modified: head/share/man/man9/pci.9 Modified: head/share/man/man9/pci.9 ============================================================================== --- head/share/man/man9/pci.9 Mon Mar 5 19:32:44 2012 (r232568) +++ head/share/man/man9/pci.9 Mon Mar 5 19:38:59 2012 (r232569) @@ -222,7 +222,7 @@ for standard capability IDs are defined .In dev/pci/pcireg.h . If the capability is found, then .Fa *capreg -is set the offset in configuration space of the capability register set, +is set to the offset in configuration space of the capability register set, and .Fn pci_find_cap returns zero. @@ -243,7 +243,7 @@ for standard extended capability IDs are .In dev/pci/pcireg.h . If the extended capability is found, then .Fa *capreg -is set the offset in configuration space of the extended capability +is set to the offset in configuration space of the extended capability register set, and .Fn pci_find_extcap returns zero. @@ -265,7 +265,7 @@ for standard HyperTransport capability t .In dev/pci/pcireg.h . If the capability is found, then .Fa *capreg -is set the offset in configuration space of the capability register set, +is set to the offset in configuration space of the capability register set, and .Fn pci_find_htcap returns zero. From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 19:53:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 733281065672; Mon, 5 Mar 2012 19:53:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 496018FC1D; Mon, 5 Mar 2012 19:53:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25JrIeY002271; Mon, 5 Mar 2012 19:53:18 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25JrIS1002269; Mon, 5 Mar 2012 19:53:18 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201203051953.q25JrIS1002269@svn.freebsd.org> From: John Baldwin Date: Mon, 5 Mar 2012 19:53:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232570 - head/sys/boot/i386/boot2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 19:53:18 -0000 Author: jhb Date: Mon Mar 5 19:53:17 2012 New Revision: 232570 URL: http://svn.freebsd.org/changeset/base/232570 Log: Fix boot2 to handle boot config files that only contain a custom path to a loader or kernel. Specifically, kname cannot be pointed at cmd[] since it's value is change to be an empty string after the initial call to parse, and cmd[]'s value can be changed (thus losing a prior setting for kname) due to user input at the boot prompt. While here, ensure that that initial boot config file text is nul-terminated, that ops is initialized to zero, and that kname is always initialized to a valid string. Tested by: Domagoj Smolcic rank1seeker of gmail MFC after: 1 week Modified: head/sys/boot/i386/boot2/boot2.c Modified: head/sys/boot/i386/boot2/boot2.c ============================================================================== --- head/sys/boot/i386/boot2/boot2.c Mon Mar 5 19:38:59 2012 (r232569) +++ head/sys/boot/i386/boot2/boot2.c Mon Mar 5 19:53:17 2012 (r232570) @@ -128,7 +128,7 @@ static struct dsk { unsigned start; int init; } dsk; -static char cmd[512], cmddup[512]; +static char cmd[512], cmddup[512], knamebuf[1024]; static const char *kname; static uint32_t opts; static int comspeed = SIOSPD; @@ -223,7 +223,9 @@ main(void) { uint8_t autoboot; ino_t ino; + size_t nbyte; + opts = 0; kname = NULL; dmadat = (void *)(roundup2(__base + (int32_t)&_end, 0x10000) - __base); v86.ctl = V86_FLAGS; @@ -240,8 +242,10 @@ main(void) autoboot = 1; if ((ino = lookup(PATH_CONFIG)) || - (ino = lookup(PATH_DOTCONFIG))) - fsread(ino, cmd, sizeof(cmd)); + (ino = lookup(PATH_DOTCONFIG))) { + nbyte = fsread(ino, cmd, sizeof(cmd) - 1); + cmd[nbyte] = '\0'; + } if (*cmd) { memcpy(cmddup, cmd, sizeof(cmd)); @@ -258,9 +262,9 @@ main(void) * or in case of failure, try to load a kernel directly instead. */ - if (autoboot && !kname) { + if (!kname) { kname = PATH_BOOT3; - if (!keyhit(3*SECOND)) { + if (autoboot && !keyhit(3*SECOND)) { load(); kname = PATH_KERNEL; } @@ -457,7 +461,12 @@ parse() ? DRV_HARD : 0) + drv; dsk_meta = 0; } - kname = arg; + if ((i = ep - arg)) { + if ((size_t)i >= sizeof(knamebuf)) + return -1; + memcpy(knamebuf, arg, i + 1); + kname = knamebuf; + } } arg = p; } From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 20:04:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 102C21065673; Mon, 5 Mar 2012 20:04:29 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA5958FC15; Mon, 5 Mar 2012 20:04:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25K4SA1002718; Mon, 5 Mar 2012 20:04:28 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25K4Ssa002716; Mon, 5 Mar 2012 20:04:28 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201203052004.q25K4Ssa002716@svn.freebsd.org> From: Sergey Kandaurov Date: Mon, 5 Mar 2012 20:04:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232571 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 20:04:29 -0000 Author: pluknet Date: Mon Mar 5 20:04:28 2012 New Revision: 232571 URL: http://svn.freebsd.org/changeset/base/232571 Log: Actually bump date, sigh. Modified: head/share/man/man9/pci.9 Modified: head/share/man/man9/pci.9 ============================================================================== --- head/share/man/man9/pci.9 Mon Mar 5 19:53:17 2012 (r232570) +++ head/share/man/man9/pci.9 Mon Mar 5 20:04:28 2012 (r232571) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 30, 2007 +.Dd March 5, 2012 .Dt PCI 9 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 20:43:07 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4F5421065677; Mon, 5 Mar 2012 20:43:07 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3571F8FC1F; Mon, 5 Mar 2012 20:43:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25Kh7Dm004044; Mon, 5 Mar 2012 20:43:07 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25Kh7Pq004042; Mon, 5 Mar 2012 20:43:07 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203052043.q25Kh7Pq004042@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 5 Mar 2012 20:43:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232572 - head/libexec/rtld-elf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 20:43:07 -0000 Author: kib Date: Mon Mar 5 20:43:06 2012 New Revision: 232572 URL: http://svn.freebsd.org/changeset/base/232572 Log: The libmap.conf initialization is performed before TLS is functional. Since after r232498 the ctype macros require working access to thread-local variables, rtld crashes when libmap.conf is present. Use hand-made isspace1() macro which is enough to detect spaces in libmap.conf. Reported by: alc, lme, many on current@ Tested by: lme Reviewed by: dim, kan MFC after: 1 week Modified: head/libexec/rtld-elf/libmap.c Modified: head/libexec/rtld-elf/libmap.c ============================================================================== --- head/libexec/rtld-elf/libmap.c Mon Mar 5 20:04:28 2012 (r232571) +++ head/libexec/rtld-elf/libmap.c Mon Mar 5 20:43:06 2012 (r232572) @@ -3,7 +3,6 @@ */ #include -#include #include #include #include @@ -53,6 +52,12 @@ static int closestrfn (void * cookie); #define iseol(c) (((c) == '#') || ((c) == '\0') || \ ((c) == '\n') || ((c) == '\r')) +/* + * Do not use ctype.h macros, which rely on working TLS. It is + * too early to have thread-local variables functional. + */ +#define isspace1(c) ((c) == ' ' || (c) == '\t') + int lm_init (char *libmap_override) { @@ -107,7 +112,7 @@ lmc_parse (FILE *fp) t = f = c = NULL; /* Skip over leading space */ - while (isspace(*cp)) cp++; + while (isspace1(*cp)) cp++; /* Found a comment or EOL */ if (iseol(*cp)) continue; @@ -117,7 +122,7 @@ lmc_parse (FILE *fp) cp++; /* Skip leading space */ - while (isspace(*cp)) cp++; + while (isspace1(*cp)) cp++; /* Found comment, EOL or end of selector */ if (iseol(*cp) || *cp == ']') @@ -125,11 +130,11 @@ lmc_parse (FILE *fp) c = cp++; /* Skip to end of word */ - while (!isspace(*cp) && !iseol(*cp) && *cp != ']') + while (!isspace1(*cp) && !iseol(*cp) && *cp != ']') cp++; /* Skip and zero out trailing space */ - while (isspace(*cp)) *cp++ = '\0'; + while (isspace1(*cp)) *cp++ = '\0'; /* Check if there is a closing brace */ if (*cp != ']') continue; @@ -141,7 +146,7 @@ lmc_parse (FILE *fp) * There should be nothing except whitespace or comment from this point to the end of the line. */ - while(isspace(*cp)) cp++; + while(isspace1(*cp)) cp++; if (!iseol(*cp)) continue; strcpy(prog, c); @@ -151,20 +156,20 @@ lmc_parse (FILE *fp) /* Parse the 'from' candidate. */ f = cp++; - while (!isspace(*cp) && !iseol(*cp)) cp++; + while (!isspace1(*cp) && !iseol(*cp)) cp++; /* Skip and zero out the trailing whitespace */ - while (isspace(*cp)) *cp++ = '\0'; + while (isspace1(*cp)) *cp++ = '\0'; /* Found a comment or EOL */ if (iseol(*cp)) continue; /* Parse 'to' mapping */ t = cp++; - while (!isspace(*cp) && !iseol(*cp)) cp++; + while (!isspace1(*cp) && !iseol(*cp)) cp++; /* Skip and zero out the trailing whitespace */ - while (isspace(*cp)) *cp++ = '\0'; + while (isspace1(*cp)) *cp++ = '\0'; /* Should be no extra tokens at this point */ if (!iseol(*cp)) continue; From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 20:59:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4172F106566C; Mon, 5 Mar 2012 20:59:35 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2C3BC8FC08; Mon, 5 Mar 2012 20:59:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q25KxZ3f004666; Mon, 5 Mar 2012 20:59:35 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q25KxY8h004664; Mon, 5 Mar 2012 20:59:34 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201203052059.q25KxY8h004664@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 5 Mar 2012 20:59:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232574 - head/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 20:59:35 -0000 Author: pjd Date: Mon Mar 5 20:59:34 2012 New Revision: 232574 URL: http://svn.freebsd.org/changeset/base/232574 Log: Link EV_SET(3) to kqueue(2). MFC after: 3 days Modified: head/lib/libc/sys/Makefile.inc Modified: head/lib/libc/sys/Makefile.inc ============================================================================== --- head/lib/libc/sys/Makefile.inc Mon Mar 5 20:44:54 2012 (r232573) +++ head/lib/libc/sys/Makefile.inc Mon Mar 5 20:59:34 2012 (r232574) @@ -165,7 +165,7 @@ MLINKS+=jail.2 jail_attach.2 \ jail.2 jail_remove.2 \ jail.2 jail_set.2 MLINKS+=kldunload.2 kldunloadf.2 -MLINKS+=kqueue.2 kevent.2 +MLINKS+=kqueue.2 kevent.2 kqueue.2 EV_SET.3 MLINKS+=link.2 linkat.2 MLINKS+=madvise.2 posix_madvise.2 MLINKS+=mkdir.2 mkdirat.2 From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 21:44:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E1D0D1065673 for ; Mon, 5 Mar 2012 21:44:04 +0000 (UTC) (envelope-from pho@holm.cc) Received: from relay02.pair.com (relay02.pair.com [209.68.5.16]) by mx1.freebsd.org (Postfix) with SMTP id 863B98FC1B for ; Mon, 5 Mar 2012 21:44:04 +0000 (UTC) Received: (qmail 44020 invoked from network); 5 Mar 2012 21:43:57 -0000 Received: from 87.58.144.241 (HELO x2.osted.lan) (87.58.144.241) by relay02.pair.com with SMTP; 5 Mar 2012 21:43:57 -0000 X-pair-Authenticated: 87.58.144.241 Received: from x2.osted.lan (localhost [127.0.0.1]) by x2.osted.lan (8.14.4/8.14.4) with ESMTP id q25Lht2W041441; Mon, 5 Mar 2012 22:43:55 +0100 (CET) (envelope-from pho@x2.osted.lan) Received: (from pho@localhost) by x2.osted.lan (8.14.4/8.14.4/Submit) id q25Lhs9S041438; Mon, 5 Mar 2012 22:43:54 +0100 (CET) (envelope-from pho) Date: Mon, 5 Mar 2012 22:43:54 +0100 From: Peter Holm To: John Baldwin Message-ID: <20120305214354.GA41216@x2.osted.lan> References: <201203021153.06614.jhb@freebsd.org> <1978600220.298005.1330754492306.JavaMail.root@erie.cs.uoguelph.ca> <20120303163843.GA72020@x2.osted.lan> <201203051238.57501.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201203051238.57501.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Rick Macklem , src-committers@freebsd.org Subject: Re: svn commit: r226967 - head/sys/ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 21:44:05 -0000 On Mon, Mar 05, 2012 at 12:38:57PM -0500, John Baldwin wrote: > On Saturday, March 03, 2012 11:38:43 am Peter Holm wrote: > > On Sat, Mar 03, 2012 at 01:01:32AM -0500, Rick Macklem wrote: > > > John Baldwin wrote: > > > > On Friday, March 02, 2012 8:29:21 am Peter Holm wrote: > > > > > On Thu, Mar 01, 2012 at 04:47:41PM -0500, John Baldwin wrote: > > > > > > On Monday, October 31, 2011 11:01:47 am Peter Holm wrote: > > > > > > > Author: pho > > > > > > > Date: Mon Oct 31 15:01:47 2011 > > > > > > > New Revision: 226967 > > > > > > > URL: http://svn.freebsd.org/changeset/base/226967 > > > > > > > > > > > > > > Log: > > > > > > > The kern_renameat() looks up the fvp using the DELETE flag, > > > > > > > which causes > > > > > > > the removal of the name cache entry for fvp. > > > > > > > > > > > > > > Reported by: Anton Yuzhaninov > > > > > > > In collaboration with: kib > > > > > > > MFC after: 1 week > > > > > > > > > > > > > > Modified: > > > > > > > head/sys/ufs/ufs/ufs_vnops.c > > > > > > > > > > > > So I ran into this at work recently, and even this fix applied I > > > > > > was still > > > > > > seeing rename()'s that were seemingly not taking effect. After > > > > > > getting some > > > > > > extra KTR traces, I figured out that the same purge needs to be > > > > > > applied to the > > > > > > destination vnode. Specifically, the issue I ran into was that was > > > > > > renaming > > > > > > 'foo' to 'bar', but lookups for 'bar' were still returning the old > > > > > > file. The > > > > > > reason was that a lookup after the namei(RENAME) of the > > > > > > destination while > > > > > > ufs_rename() had its locks dropped was readding the name cache > > > > > > entry for > > > > > > 'bar', and then a cache_lookup() of 'bar' would return the old > > > > > > vnode as long > > > > > > as that vnode was valid (e.g. if it had a link in another > > > > > > location, or other > > > > > > processes had an open file descriptor for it). I'm currently > > > > > > testing the > > > > > > patch below: > > > > > > > > > > > > > > > > I now have a scenario that fails, but not quite the same way you > > > > > describe. > > > > > > > > > > It looks like this: > > > > > > > > > > touch file1 > > > > > echo xxx > file2 > > > > > rename(file1, file2) > > > > > > > > > > A different process performs stat() on both files in a tight loop. > > > > > > > > > > Once in a while I observe that a stat() of file2, after the rename, > > > > > returns a link count of zero. Size is zero as expected, but the > > > > > inode > > > > > number of file2 is unchanged. > > > > > > > Peter, were you doing a stat() using the file name, or an fstat()? > > > (Using stat() with afile name might explain it, maybe??) > > > > > > > Yes. Switching to open()/fstat() of the "from" file in the loop, makes > > the cache problem go away. > > Using fstat avoids the changes of getting a stale name cache, so it just > avoids the race altogether. However, there is no reason I can think of why > stat() should ever give you can inconsistent view of attributes. You should > always get a consistent snapshot of attributes. > Maybe my test scenario is broken, but it sure looks like the link count is zero, after the rename. $ ./r9.sh FAIL: old and new "To" inode number is identical stat() before the rename(): fromFile.log : ino = 4, nlink = 1, size = 0 toFile.log.00065: ino = 70, nlink = 1, size = 8 stat() after the rename(): toFile.log.00065: ino = 70, nlink = 0, size = 0 $ This on r232558 with r232401 reverted. No problem on a pristine HEAD of cause. http://people.freebsd.org/~pho/r9.sh - Peter From owner-svn-src-all@FreeBSD.ORG Mon Mar 5 22:03:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C4C2B1065670; Mon, 5 Mar 2012 22:03:13 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 85F798FC25; Mon, 5 Mar 2012 22:03:13 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 3AB4746B09; Mon, 5 Mar 2012 17:03:13 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 982AEB98F; Mon, 5 Mar 2012 17:03:12 -0500 (EST) From: John Baldwin To: Peter Holm Date: Mon, 5 Mar 2012 17:02:49 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <201203021153.06614.jhb@freebsd.org> <201203051238.57501.jhb@freebsd.org> <20120305214354.GA41216@x2.osted.lan> In-Reply-To: <20120305214354.GA41216@x2.osted.lan> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201203051702.50005.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 05 Mar 2012 17:03:12 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Rick Macklem , src-committers@freebsd.org Subject: Re: svn commit: r226967 - head/sys/ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 22:03:13 -0000 On Monday, March 05, 2012 4:43:54 pm Peter Holm wrote: > On Mon, Mar 05, 2012 at 12:38:57PM -0500, John Baldwin wrote: > > On Saturday, March 03, 2012 11:38:43 am Peter Holm wrote: > > > On Sat, Mar 03, 2012 at 01:01:32AM -0500, Rick Macklem wrote: > > > > John Baldwin wrote: > > > > > On Friday, March 02, 2012 8:29:21 am Peter Holm wrote: > > > > > > On Thu, Mar 01, 2012 at 04:47:41PM -0500, John Baldwin wrote: > > > > > > > On Monday, October 31, 2011 11:01:47 am Peter Holm wrote: > > > > > > > > Author: pho > > > > > > > > Date: Mon Oct 31 15:01:47 2011 > > > > > > > > New Revision: 226967 > > > > > > > > URL: http://svn.freebsd.org/changeset/base/226967 > > > > > > > > > > > > > > > > Log: > > > > > > > > The kern_renameat() looks up the fvp using the DELETE flag, > > > > > > > > which causes > > > > > > > > the removal of the name cache entry for fvp. > > > > > > > > > > > > > > > > Reported by: Anton Yuzhaninov > > > > > > > > In collaboration with: kib > > > > > > > > MFC after: 1 week > > > > > > > > > > > > > > > > Modified: > > > > > > > > head/sys/ufs/ufs/ufs_vnops.c > > > > > > > > > > > > > > So I ran into this at work recently, and even this fix applied I > > > > > > > was still > > > > > > > seeing rename()'s that were seemingly not taking effect. After > > > > > > > getting some > > > > > > > extra KTR traces, I figured out that the same purge needs to be > > > > > > > applied to the > > > > > > > destination vnode. Specifically, the issue I ran into was that was > > > > > > > renaming > > > > > > > 'foo' to 'bar', but lookups for 'bar' were still returning the old > > > > > > > file. The > > > > > > > reason was that a lookup after the namei(RENAME) of the > > > > > > > destination while > > > > > > > ufs_rename() had its locks dropped was readding the name cache > > > > > > > entry for > > > > > > > 'bar', and then a cache_lookup() of 'bar' would return the old > > > > > > > vnode as long > > > > > > > as that vnode was valid (e.g. if it had a link in another > > > > > > > location, or other > > > > > > > processes had an open file descriptor for it). I'm currently > > > > > > > testing the > > > > > > > patch below: > > > > > > > > > > > > > > > > > > > I now have a scenario that fails, but not quite the same way you > > > > > > describe. > > > > > > > > > > > > It looks like this: > > > > > > > > > > > > touch file1 > > > > > > echo xxx > file2 > > > > > > rename(file1, file2) > > > > > > > > > > > > A different process performs stat() on both files in a tight loop. > > > > > > > > > > > > Once in a while I observe that a stat() of file2, after the rename, > > > > > > returns a link count of zero. Size is zero as expected, but the > > > > > > inode > > > > > > number of file2 is unchanged. > > > > > > > > > Peter, were you doing a stat() using the file name, or an fstat()? > > > > (Using stat() with afile name might explain it, maybe??) > > > > > > > > > > Yes. Switching to open()/fstat() of the "from" file in the loop, makes > > > the cache problem go away. > > > > Using fstat avoids the changes of getting a stale name cache, so it just > > avoids the race altogether. However, there is no reason I can think of why > > stat() should ever give you can inconsistent view of attributes. You should > > always get a consistent snapshot of attributes. > > > > Maybe my test scenario is broken, but it sure looks like the link > count is zero, after the rename. Hmmm, I think it is more the size of zero I'm surprised at. Presumably a vnode whose only references are open file descriptors would have a link count of zero, and so if this race were to occur, I would expect to see that. However, I would expect the file to have the 'xxx' contents, so a non-zero file. Hmm, I wonder what happens if the only link to a file are hold counts (e.g. name cache entries), but the usecount drops to zero. Will UFS recycle the i-node in that case? If so, perhaps that could explain it? Or even better, perhaps because the usecount is zero, when the rename happens, UFS goes ahead and zeros out the file. That probably explains it then. (Clearly we need to add a 4th reference count to vnodes as it is far too simple as-is..) > > $ ./r9.sh > FAIL: old and new "To" inode number is identical > stat() before the rename(): > fromFile.log : ino = 4, nlink = 1, size = 0 > toFile.log.00065: ino = 70, nlink = 1, size = 8 > > stat() after the rename(): > toFile.log.00065: ino = 70, nlink = 0, size = 0 > $ > > This on r232558 with r232401 reverted. No problem on a pristine > HEAD of cause. > > http://people.freebsd.org/~pho/r9.sh > > - Peter > -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 02:23:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 814991065673; Tue, 6 Mar 2012 02:23:16 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 194418FC1D; Tue, 6 Mar 2012 02:23:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q262NFHd015019; Tue, 6 Mar 2012 02:23:15 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q262NFEk015017; Tue, 6 Mar 2012 02:23:15 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203060223.q262NFEk015017@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Mar 2012 02:23:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232576 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 02:23:16 -0000 Author: jmallett Date: Tue Mar 6 02:23:15 2012 New Revision: 232576 URL: http://svn.freebsd.org/changeset/base/232576 Log: In the trap messages that aid the primitive debugging environment of MIPS, include the tid as well, so it's easier to tell which thread of a process with multiple is responsible for a crash. Modified: head/sys/mips/mips/trap.c Modified: head/sys/mips/mips/trap.c ============================================================================== --- head/sys/mips/mips/trap.c Mon Mar 5 22:36:50 2012 (r232575) +++ head/sys/mips/mips/trap.c Tue Mar 6 02:23:15 2012 (r232576) @@ -1312,15 +1312,19 @@ log_illegal_instruction(const char *msg, pt_entry_t *ptep; pd_entry_t *pdep; unsigned int *addr; - struct proc *p = curproc; + struct thread *td; + struct proc *p; register_t pc; + td = curthread; + p = td->td_proc; + #ifdef SMP printf("cpuid = %d\n", PCPU_GET(cpuid)); #endif pc = frame->pc + (DELAYBRANCH(frame->cause) ? 4 : 0); - log(LOG_ERR, "%s: pid %d (%s), uid %d: pc %#jx ra %#jx\n", - msg, p->p_pid, p->p_comm, + log(LOG_ERR, "%s: pid %d tid %ld (%s), uid %d: pc %#jx ra %#jx\n", + msg, p->p_pid, (long)td->td_tid, p->p_comm, p->p_ucred ? p->p_ucred->cr_uid : -1, (intmax_t)pc, (intmax_t)frame->ra); @@ -1357,12 +1361,16 @@ log_bad_page_fault(char *msg, struct tra pt_entry_t *ptep; pd_entry_t *pdep; unsigned int *addr; - struct proc *p = curproc; + struct thread *td; + struct proc *p; char *read_or_write; register_t pc; trap_type &= ~T_USER; + td = curthread; + p = td->td_proc; + #ifdef SMP printf("cpuid = %d\n", PCPU_GET(cpuid)); #endif @@ -1381,8 +1389,8 @@ log_bad_page_fault(char *msg, struct tra } pc = frame->pc + (DELAYBRANCH(frame->cause) ? 4 : 0); - log(LOG_ERR, "%s: pid %d (%s), uid %d: pc %#jx got a %s fault at %#jx\n", - msg, p->p_pid, p->p_comm, + log(LOG_ERR, "%s: pid %d tid %ld (%s), uid %d: pc %#jx got a %s fault at %#jx\n", + msg, p->p_pid, (long)td->td_tid, p->p_comm, p->p_ucred ? p->p_ucred->cr_uid : -1, (intmax_t)pc, read_or_write, From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 03:25:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1CA3106566B; Tue, 6 Mar 2012 03:25:51 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9CBD18FC12; Tue, 6 Mar 2012 03:25:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q263PpoS017369; Tue, 6 Mar 2012 03:25:51 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q263PpkV017366; Tue, 6 Mar 2012 03:25:51 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201203060325.q263PpkV017366@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Tue, 6 Mar 2012 03:25:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232577 - in head/sys/mips: include mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 03:25:51 -0000 Author: gonzo Date: Tue Mar 6 03:25:50 2012 New Revision: 232577 URL: http://svn.freebsd.org/changeset/base/232577 Log: Prepare for large TLS redo. Save pointer to the beginning of TLS area, and offset it only if requested by RDHWR handler. Otherwise things get overly complicated - we need to track whether address passsed in request for setting td_md.md_tls is already offseted or not. Added: head/sys/mips/include/tls.h (contents, props changed) Modified: head/sys/mips/mips/trap.c head/sys/mips/mips/vm_machdep.c Added: head/sys/mips/include/tls.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/include/tls.h Tue Mar 6 03:25:50 2012 (r232577) @@ -0,0 +1,48 @@ +/*- + * Copyright (c) 2012 Oleksandr Tymoshenko + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification, immediately at the beginning of the file. + * 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 LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + * + */ + +#ifndef __MIPS_TLS_H__ +#define __MIPS_TLS_H__ + +/* + * TLS parameters + */ + +#define TLS_TP_OFFSET 0x7000 +#define TLS_DTP_OFFSET 0x8000 + +#ifdef __mips_n64 +#define TLS_TCB_SIZE 16 +#else +#define TLS_TCB_SIZE 8 +#endif + +#endif /* __MIPS_TLS_H__ */ Modified: head/sys/mips/mips/trap.c ============================================================================== --- head/sys/mips/mips/trap.c Tue Mar 6 02:23:15 2012 (r232576) +++ head/sys/mips/mips/trap.c Tue Mar 6 03:25:50 2012 (r232577) @@ -83,6 +83,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #ifdef DDB @@ -813,6 +814,7 @@ dofault: if (inst.RType.rd == 29) { frame_regs = &(trapframe->zero); frame_regs[inst.RType.rt] = (register_t)(intptr_t)td->td_md.md_tls; + frame_regs[inst.RType.rt] += TLS_TP_OFFSET + TLS_TCB_SIZE; trapframe->pc += sizeof(int); goto out; } Modified: head/sys/mips/mips/vm_machdep.c ============================================================================== --- head/sys/mips/mips/vm_machdep.c Tue Mar 6 02:23:15 2012 (r232576) +++ head/sys/mips/mips/vm_machdep.c Tue Mar 6 03:25:50 2012 (r232577) @@ -608,28 +608,9 @@ int cpu_set_user_tls(struct thread *td, void *tls_base) { - /* - * tls_base passed to this function - * from thr_new call and points to actual TCB struct, - * so we should add TP_OFFSET + sizeof(struct tcb) - * to make it the same way TLS base is passed to - * MIPS_SET_TLS/MIPS_GET_TLS API - */ - -#ifdef __mips_n64 -#ifdef COMPAT_FREEBSD32 - if (!SV_PROC_FLAG(td->td_proc, SV_ILP32)) { -#endif - td->td_md.md_tls = (char*)tls_base + 0x7010; - return (0); -#ifdef COMPAT_FREEBSD32 - } -#endif -#endif -#if !defined(__mips_n64) || defined(COMPAT_FREEBSD32) - td->td_md.md_tls = (char*)tls_base + 0x7008; + td->td_md.md_tls = (char*)tls_base; + return (0); -#endif } #ifdef DDB From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 03:27:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE656106564A; Tue, 6 Mar 2012 03:27:09 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 808AF8FC15; Tue, 6 Mar 2012 03:27:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q263R9dR017452; Tue, 6 Mar 2012 03:27:09 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q263R9HD017449; Tue, 6 Mar 2012 03:27:09 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201203060327.q263R9HD017449@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Tue, 6 Mar 2012 03:27:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232578 - head/libexec/rtld-elf/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 03:27:09 -0000 Author: gonzo Date: Tue Mar 6 03:27:08 2012 New Revision: 232578 URL: http://svn.freebsd.org/changeset/base/232578 Log: - Switch to saving non-offseted pointer to TLS block in order too keep things simple Modified: head/libexec/rtld-elf/mips/reloc.c head/libexec/rtld-elf/mips/rtld_machdep.h Modified: head/libexec/rtld-elf/mips/reloc.c ============================================================================== --- head/libexec/rtld-elf/mips/reloc.c Tue Mar 6 03:25:50 2012 (r232577) +++ head/libexec/rtld-elf/mips/reloc.c Tue Mar 6 03:27:08 2012 (r232578) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include "debug.h" #include "rtld.h" @@ -622,8 +623,7 @@ allocate_initial_tls(Obj_Entry *objs) */ tls_static_space = tls_last_offset + tls_last_size + RTLD_STATIC_TLS_EXTRA; - tls = ((char *) allocate_tls(objs, NULL, TLS_TCB_SIZE, 8) - + TLS_TP_OFFSET + TLS_TCB_SIZE); + tls = (char *) allocate_tls(objs, NULL, TLS_TCB_SIZE, 8); sysarch(MIPS_SET_TLS, tls); } @@ -636,8 +636,7 @@ __tls_get_addr(tls_index* ti) sysarch(MIPS_GET_TLS, &tls); - p = tls_get_addr_common((Elf_Addr**)((Elf_Addr)tls - TLS_TP_OFFSET - - TLS_TCB_SIZE), ti->ti_module, ti->ti_offset + TLS_DTP_OFFSET); + p = tls_get_addr_common(tls, ti->ti_module, ti->ti_offset + TLS_DTP_OFFSET); return (p); } Modified: head/libexec/rtld-elf/mips/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/mips/rtld_machdep.h Tue Mar 6 03:25:50 2012 (r232577) +++ head/libexec/rtld-elf/mips/rtld_machdep.h Tue Mar 6 03:27:08 2012 (r232578) @@ -31,6 +31,7 @@ #include #include +#include struct Struct_Obj_Entry; @@ -48,19 +49,6 @@ Elf_Addr reloc_jmpslot(Elf_Addr *where, #define call_initfini_pointer(obj, target) \ (((InitFunc)(target))()) -/* - * TLS - */ - -#define TLS_TP_OFFSET 0x7000 -#define TLS_DTP_OFFSET 0x8000 - -#ifdef __mips_n64 -#define TLS_TCB_SIZE 16 -#else -#define TLS_TCB_SIZE 8 -#endif - typedef struct { unsigned long ti_module; unsigned long ti_offset; From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 03:27:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2D81106566C; Tue, 6 Mar 2012 03:27:58 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8E74A8FC19; Tue, 6 Mar 2012 03:27:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q263RwiR017507; Tue, 6 Mar 2012 03:27:58 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q263RwIu017505; Tue, 6 Mar 2012 03:27:58 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201203060327.q263RwIu017505@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Tue, 6 Mar 2012 03:27:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232579 - head/lib/libthr/arch/mips/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 03:27:58 -0000 Author: gonzo Date: Tue Mar 6 03:27:58 2012 New Revision: 232579 URL: http://svn.freebsd.org/changeset/base/232579 Log: - Switch to saving non-offseted pointer to TLS block in order too keep things simple Modified: head/lib/libthr/arch/mips/include/pthread_md.h Modified: head/lib/libthr/arch/mips/include/pthread_md.h ============================================================================== --- head/lib/libthr/arch/mips/include/pthread_md.h Tue Mar 6 03:27:08 2012 (r232578) +++ head/lib/libthr/arch/mips/include/pthread_md.h Tue Mar 6 03:27:58 2012 (r232579) @@ -35,15 +35,11 @@ #include #include +#include #include #define CPU_SPINWAIT #define DTV_OFFSET offsetof(struct tcb, tcb_dtv) -#ifdef __mips_n64 -#define TP_OFFSET 0x7010 -#else -#define TP_OFFSET 0x7008 -#endif /* * Variant I tcb. The structure layout is fixed, don't blindly @@ -65,7 +61,7 @@ static __inline void _tcb_set(struct tcb *tcb) { - sysarch(MIPS_SET_TLS, ((uint8_t*)tcb + TP_OFFSET)); + sysarch(MIPS_SET_TLS, tcb); } /* @@ -74,10 +70,10 @@ _tcb_set(struct tcb *tcb) static __inline struct tcb * _tcb_get(void) { - uint8_t *tcb; + struct tcb *tcb; sysarch(MIPS_GET_TLS, &tcb); - return ((struct tcb *)(tcb - TP_OFFSET)); + return tcb; } extern struct pthread *_thr_initial; From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 03:29:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7A76E1065673; Tue, 6 Mar 2012 03:29:47 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 648918FC17; Tue, 6 Mar 2012 03:29:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q263TlQI017596; Tue, 6 Mar 2012 03:29:47 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q263TlLn017594; Tue, 6 Mar 2012 03:29:47 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201203060329.q263TlLn017594@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Tue, 6 Mar 2012 03:29:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232580 - head/lib/csu/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 03:29:47 -0000 Author: gonzo Date: Tue Mar 6 03:29:46 2012 New Revision: 232580 URL: http://svn.freebsd.org/changeset/base/232580 Log: - Remove NOSHARED parts since it seems to be no-op - Call _init_tls for statically linked binaries Modified: head/lib/csu/mips/crt1.c Modified: head/lib/csu/mips/crt1.c ============================================================================== --- head/lib/csu/mips/crt1.c Tue Mar 6 03:27:58 2012 (r232579) +++ head/lib/csu/mips/crt1.c Tue Mar 6 03:29:46 2012 (r232580) @@ -47,10 +47,8 @@ __FBSDID("$FreeBSD$"); struct Struct_Obj_Entry; struct ps_strings; -#ifndef NOSHARED extern int _DYNAMIC; #pragma weak _DYNAMIC -#endif extern void _init(void); extern void _fini(void); @@ -91,10 +89,11 @@ __start(char **ap, __progname = s + 1; } -#ifndef NOSHARED if (&_DYNAMIC != NULL) atexit(cleanup); -#endif + else + _init_tls(); + #ifdef GCRT atexit(_mcleanup); #endif From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 03:30:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 054F1106564A; Tue, 6 Mar 2012 03:30:10 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC0E48FC14; Tue, 6 Mar 2012 03:30:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q263U96Y017656; Tue, 6 Mar 2012 03:30:09 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q263U959017654; Tue, 6 Mar 2012 03:30:09 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201203060330.q263U959017654@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Tue, 6 Mar 2012 03:30:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232581 - head/lib/libc/mips/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 03:30:10 -0000 Author: gonzo Date: Tue Mar 6 03:30:09 2012 New Revision: 232581 URL: http://svn.freebsd.org/changeset/base/232581 Log: Implement _set_tp Modified: head/lib/libc/mips/gen/_set_tp.c Modified: head/lib/libc/mips/gen/_set_tp.c ============================================================================== --- head/lib/libc/mips/gen/_set_tp.c Tue Mar 6 03:29:46 2012 (r232580) +++ head/lib/libc/mips/gen/_set_tp.c Tue Mar 6 03:30:09 2012 (r232581) @@ -29,7 +29,11 @@ #include #include +#include + void _set_tp(void *tp) { + + sysarch(MIPS_SET_TLS, tp); } From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 03:42:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D36A1106566B; Tue, 6 Mar 2012 03:42:54 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE2828FC08; Tue, 6 Mar 2012 03:42:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q263gsLt018069; Tue, 6 Mar 2012 03:42:54 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q263gs7g018067; Tue, 6 Mar 2012 03:42:54 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201203060342.q263gs7g018067@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Tue, 6 Mar 2012 03:42:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232582 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 03:42:54 -0000 Author: gonzo Date: Tue Mar 6 03:42:54 2012 New Revision: 232582 URL: http://svn.freebsd.org/changeset/base/232582 Log: - Switch ARM and MIPS to TLS Variant I - Fix TLS allocation for Variant I: both rtld and libc allocators assume that tls_static_space includes space for TLS structure. So increment calculated static size by the size of it. Modified: head/lib/libc/gen/tls.c Modified: head/lib/libc/gen/tls.c ============================================================================== --- head/lib/libc/gen/tls.c Tue Mar 6 03:30:09 2012 (r232581) +++ head/lib/libc/gen/tls.c Tue Mar 6 03:42:54 2012 (r232582) @@ -66,11 +66,11 @@ void __libc_free_tls(void *tls, size_t t #error TLS_TCB_ALIGN undefined for target architecture #endif -#if defined(__ia64__) || defined(__powerpc__) +#if defined(__arm__) || defined(__ia64__) || defined(__mips__) || \ + defined(__powerpc__) #define TLS_VARIANT_I #endif -#if defined(__i386__) || defined(__amd64__) || defined(__sparc64__) || \ - defined(__arm__) || defined(__mips__) +#if defined(__i386__) || defined(__amd64__) || defined(__sparc64__) #define TLS_VARIANT_II #endif @@ -308,6 +308,13 @@ _init_tls() } } +#ifdef TLS_VARIANT_I + /* + * tls_static_space should include space for TLS structure + */ + tls_static_space += TLS_TCB_SIZE; +#endif + tls = _rtld_allocate_tls(NULL, TLS_TCB_SIZE, TLS_TCB_ALIGN); _set_tp(tls); From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 07:47:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50626106567A; Tue, 6 Mar 2012 07:47:29 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3BAB28FC18; Tue, 6 Mar 2012 07:47:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q267lT75026198; Tue, 6 Mar 2012 07:47:29 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q267lTm1026195; Tue, 6 Mar 2012 07:47:29 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203060747.q267lTm1026195@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Mar 2012 07:47:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232583 - in head/sys/mips: include mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 07:47:29 -0000 Author: jmallett Date: Tue Mar 6 07:47:28 2012 New Revision: 232583 URL: http://svn.freebsd.org/changeset/base/232583 Log: When emulating rdhwr for TLS, use the 32-bit offset under COMPAT_FREEBSD32. Modified: head/sys/mips/include/tls.h head/sys/mips/mips/trap.c Modified: head/sys/mips/include/tls.h ============================================================================== --- head/sys/mips/include/tls.h Tue Mar 6 03:42:54 2012 (r232582) +++ head/sys/mips/include/tls.h Tue Mar 6 07:47:28 2012 (r232583) @@ -32,6 +32,10 @@ #ifndef __MIPS_TLS_H__ #define __MIPS_TLS_H__ +#if defined(_KERNEL) && !defined(KLD_MODULE) && !defined(_STANDALONE) +#include "opt_compat.h" +#endif + /* * TLS parameters */ @@ -41,6 +45,9 @@ #ifdef __mips_n64 #define TLS_TCB_SIZE 16 +#ifdef COMPAT_FREEBSD32 +#define TLS_TCB_SIZE32 8 +#endif #else #define TLS_TCB_SIZE 8 #endif Modified: head/sys/mips/mips/trap.c ============================================================================== --- head/sys/mips/mips/trap.c Tue Mar 6 03:42:54 2012 (r232582) +++ head/sys/mips/mips/trap.c Tue Mar 6 07:47:28 2012 (r232583) @@ -814,6 +814,11 @@ dofault: if (inst.RType.rd == 29) { frame_regs = &(trapframe->zero); frame_regs[inst.RType.rt] = (register_t)(intptr_t)td->td_md.md_tls; +#if defined(__mips_n64) && defined(COMPAT_FREEBSD32) + if (SV_PROC_FLAG(td->td_proc, SV_ILP32)) + frame_regs[inst.RType.rt] += TLS_TP_OFFSET + TLS_TCB_SIZE32; + else +#endif frame_regs[inst.RType.rt] += TLS_TP_OFFSET + TLS_TCB_SIZE; trapframe->pc += sizeof(int); goto out; From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 07:50:45 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9C9951065673; Tue, 6 Mar 2012 07:50:45 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6DD858FC0C; Tue, 6 Mar 2012 07:50:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q267oj0O026361; Tue, 6 Mar 2012 07:50:45 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q267ojMZ026358; Tue, 6 Mar 2012 07:50:45 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203060750.q267ojMZ026358@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Mar 2012 07:50:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232584 - in head/sys/mips: include mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 07:50:45 -0000 Author: jmallett Date: Tue Mar 6 07:50:45 2012 New Revision: 232584 URL: http://svn.freebsd.org/changeset/base/232584 Log: Fix two and a half oversights in COMPAT_FREEBSD32 related to contexts and TLS: o) The mc_tls field used to store the TLS base when doing context gets and restores was left a pointer and not converted to a 32-bit integer. This had the bug of not correctly capturing the TLS value desired by the user, and the extra nastiness of making the structure the wrong size. o) The mc_tls field was not being saved by sendsig. As a result, the TLS base would always be set to NULL when restoring from a signal handler. Thanks to gonzo for helping track down a bunch of other TLS bugs that came out of tracking these down. Modified: head/sys/mips/include/ucontext.h head/sys/mips/mips/freebsd32_machdep.c Modified: head/sys/mips/include/ucontext.h ============================================================================== --- head/sys/mips/include/ucontext.h Tue Mar 6 07:47:28 2012 (r232583) +++ head/sys/mips/include/ucontext.h Tue Mar 6 07:50:45 2012 (r232584) @@ -73,7 +73,7 @@ typedef struct __mcontext32 { int mc_fpused; int32_t mc_fpregs[33]; int32_t mc_fpc_eir; - void *mc_tls; + int32_t mc_tls; int __spare__[8]; } mcontext32_t; Modified: head/sys/mips/mips/freebsd32_machdep.c ============================================================================== --- head/sys/mips/mips/freebsd32_machdep.c Tue Mar 6 07:47:28 2012 (r232583) +++ head/sys/mips/mips/freebsd32_machdep.c Tue Mar 6 07:50:45 2012 (r232584) @@ -222,7 +222,7 @@ get_mcontext32(struct thread *td, mconte for (i = 0; i < 33; i++) mcp->mc_fpregs[i] = mcp64.mc_fpregs[i]; mcp->mc_fpc_eir = mcp64.mc_fpc_eir; - mcp->mc_tls = mcp64.mc_tls; + mcp->mc_tls = (int32_t)(intptr_t)mcp64.mc_tls; return (0); } @@ -244,7 +244,7 @@ set_mcontext32(struct thread *td, const for (i = 0; i < 33; i++) mcp64.mc_fpregs[i] = mcp->mc_fpregs[i]; mcp64.mc_fpc_eir = mcp->mc_fpc_eir; - mcp64.mc_tls = mcp->mc_tls; + mcp64.mc_tls = (void *)(intptr_t)mcp->mc_tls; return (set_mcontext(td, &mcp64)); } @@ -395,6 +395,7 @@ freebsd32_sendsig(sig_t catcher, ksiginf sf.sf_uc.uc_mcontext.mc_pc = regs.r_regs[PC]; sf.sf_uc.uc_mcontext.mullo = regs.r_regs[MULLO]; sf.sf_uc.uc_mcontext.mulhi = regs.r_regs[MULHI]; + sf.sf_uc.uc_mcontext.mc_tls = (int32_t)(intptr_t)td->td_md.md_tls; sf.sf_uc.uc_mcontext.mc_regs[0] = UCONTEXT_MAGIC; /* magic number */ for (i = 1; i < 32; i++) sf.sf_uc.uc_mcontext.mc_regs[i] = regs.r_regs[i]; From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 08:02:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5C551065679; Tue, 6 Mar 2012 08:02:10 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 91C628FC23; Tue, 6 Mar 2012 08:02:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2682A3V026780; Tue, 6 Mar 2012 08:02:10 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2682Ark026778; Tue, 6 Mar 2012 08:02:10 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203060802.q2682Ark026778@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Mar 2012 08:02:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232585 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 08:02:10 -0000 Author: jmallett Date: Tue Mar 6 08:02:10 2012 New Revision: 232585 URL: http://svn.freebsd.org/changeset/base/232585 Log: Store TLS base in the sigframe just as is done in freebsd32_sendsig. Because the native sigreturn doesn't use set_mcontext like the COMPAT_FREEBSD32 version does, this wouldn't actually result in overwriting the TLS base. Probably it makes sense to restructure the native sigreturn to use set_mcontext for consistency, and to allow sigreturn to change the TLS base. Modified: head/sys/mips/mips/pm_machdep.c Modified: head/sys/mips/mips/pm_machdep.c ============================================================================== --- head/sys/mips/mips/pm_machdep.c Tue Mar 6 07:50:45 2012 (r232584) +++ head/sys/mips/mips/pm_machdep.c Tue Mar 6 08:02:10 2012 (r232585) @@ -110,6 +110,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sf.sf_uc.uc_mcontext.mc_pc = regs->pc; sf.sf_uc.uc_mcontext.mullo = regs->mullo; sf.sf_uc.uc_mcontext.mulhi = regs->mulhi; + sf.sf_uc.uc_mcontext.mc_tls = td->td_md.md_tls; sf.sf_uc.uc_mcontext.mc_regs[0] = UCONTEXT_MAGIC; /* magic number */ bcopy((void *)®s->ast, (void *)&sf.sf_uc.uc_mcontext.mc_regs[1], sizeof(sf.sf_uc.uc_mcontext.mc_regs) - sizeof(register_t)); From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 08:10:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 460A7106566B; Tue, 6 Mar 2012 08:10:49 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 189518FC1A; Tue, 6 Mar 2012 08:10:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q268AmII027066; Tue, 6 Mar 2012 08:10:48 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q268Amin027064; Tue, 6 Mar 2012 08:10:48 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203060810.q268Amin027064@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Mar 2012 08:10:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232586 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 08:10:49 -0000 Author: jmallett Date: Tue Mar 6 08:10:48 2012 New Revision: 232586 URL: http://svn.freebsd.org/changeset/base/232586 Log: Make the native sigreturn just wrap set_mcontext, much as freebsd32_sigreturn does. Modified: head/sys/mips/mips/pm_machdep.c Modified: head/sys/mips/mips/pm_machdep.c ============================================================================== --- head/sys/mips/mips/pm_machdep.c Tue Mar 6 08:02:10 2012 (r232585) +++ head/sys/mips/mips/pm_machdep.c Tue Mar 6 08:10:48 2012 (r232586) @@ -216,51 +216,22 @@ cpu_thread_siginfo(int sig, u_long code, int sys_sigreturn(struct thread *td, struct sigreturn_args *uap) { - struct trapframe *regs; - ucontext_t *ucp; ucontext_t uc; int error; - ucp = &uc; - error = copyin(uap->sigcntxp, &uc, sizeof(uc)); if (error != 0) return (error); - regs = td->td_frame; - -/* #ifdef DEBUG */ - if (ucp->uc_mcontext.mc_regs[ZERO] != UCONTEXT_MAGIC) { - printf("sigreturn: pid %d, ucp %p\n", td->td_proc->p_pid, ucp); - printf(" old sp %p ra %p pc %p\n", - (void *)(intptr_t)regs->sp, (void *)(intptr_t)regs->ra, (void *)(intptr_t)regs->pc); - printf(" new sp %p ra %p pc %p z %p\n", - (void *)(intptr_t)ucp->uc_mcontext.mc_regs[SP], - (void *)(intptr_t)ucp->uc_mcontext.mc_regs[RA], - (void *)(intptr_t)ucp->uc_mcontext.mc_regs[PC], - (void *)(intptr_t)ucp->uc_mcontext.mc_regs[ZERO]); - return EINVAL; - } -/* #endif */ - - bcopy((const void *)&ucp->uc_mcontext.mc_regs[1], (void *)®s->ast, - sizeof(ucp->uc_mcontext.mc_regs) - sizeof(register_t)); - - if (ucp->uc_mcontext.mc_fpused) - bcopy((const void *)ucp->uc_mcontext.mc_fpregs, - (void *)&td->td_frame->f0, - sizeof(ucp->uc_mcontext.mc_fpregs)); - - regs->pc = ucp->uc_mcontext.mc_pc; - regs->mullo = ucp->uc_mcontext.mullo; - regs->mulhi = ucp->uc_mcontext.mulhi; + error = set_mcontext(td, &uc.uc_mcontext); + if (error != 0) + return (error); - kern_sigprocmask(td, SIG_SETMASK, &ucp->uc_sigmask, NULL, 0); + kern_sigprocmask(td, SIG_SETMASK, &uc.uc_sigmask, NULL, 0); - return(EJUSTRETURN); + return (EJUSTRETURN); } - int ptrace_set_pc(struct thread *td, unsigned long addr) { From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 08:40:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCDC1106566B; Tue, 6 Mar 2012 08:40:21 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A6B1B8FC12; Tue, 6 Mar 2012 08:40:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q268eLMW028077; Tue, 6 Mar 2012 08:40:21 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q268eLR7028075; Tue, 6 Mar 2012 08:40:21 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203060840.q268eLR7028075@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Mar 2012 08:40:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232587 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 08:40:21 -0000 Author: jmallett Date: Tue Mar 6 08:40:21 2012 New Revision: 232587 URL: http://svn.freebsd.org/changeset/base/232587 Log: Garbage collect some unused symbols. Modified: head/sys/mips/mips/genassym.c Modified: head/sys/mips/mips/genassym.c ============================================================================== --- head/sys/mips/mips/genassym.c Tue Mar 6 08:10:48 2012 (r232586) +++ head/sys/mips/mips/genassym.c Tue Mar 6 08:40:21 2012 (r232587) @@ -71,12 +71,8 @@ ASSYM(TD_UPTE, offsetof(struct thread, t ASSYM(TD_KSTACK, offsetof(struct thread, td_kstack)); ASSYM(TD_FLAGS, offsetof(struct thread, td_flags)); ASSYM(TD_LOCK, offsetof(struct thread, td_lock)); -ASSYM(TD_FRAME, offsetof(struct thread, td_frame)); -ASSYM(TD_TLS, offsetof(struct thread, td_md.md_tls)); ASSYM(TD_MDFLAGS, offsetof(struct thread, td_md.md_flags)); -ASSYM(TF_REG_SR, offsetof(struct trapframe, sr)); - ASSYM(U_PCB_REGS, offsetof(struct pcb, pcb_regs.zero)); ASSYM(U_PCB_CONTEXT, offsetof(struct pcb, pcb_context)); ASSYM(U_PCB_ONFAULT, offsetof(struct pcb, pcb_onfault)); @@ -87,7 +83,6 @@ ASSYM(PC_SEGBASE, offsetof(struct pcpu, ASSYM(PC_CURTHREAD, offsetof(struct pcpu, pc_curthread)); ASSYM(PC_FPCURTHREAD, offsetof(struct pcpu, pc_fpcurthread)); ASSYM(PC_CPUID, offsetof(struct pcpu, pc_cpuid)); -ASSYM(PC_CURPMAP, offsetof(struct pcpu, pc_curpmap)); ASSYM(VM_MAX_KERNEL_ADDRESS, VM_MAX_KERNEL_ADDRESS); ASSYM(VM_MAXUSER_ADDRESS, VM_MAXUSER_ADDRESS); @@ -98,13 +93,10 @@ ASSYM(SIGF32_UC, offsetof(struct sigfram ASSYM(SIGFPE, SIGFPE); ASSYM(PAGE_SHIFT, PAGE_SHIFT); ASSYM(PAGE_SIZE, PAGE_SIZE); -ASSYM(PAGE_MASK, PAGE_MASK); ASSYM(PDRSHIFT, PDRSHIFT); ASSYM(SEGSHIFT, SEGSHIFT); -ASSYM(NPTEPG, NPTEPG); ASSYM(TDF_NEEDRESCHED, TDF_NEEDRESCHED); ASSYM(TDF_ASTPENDING, TDF_ASTPENDING); -ASSYM(PCPU_SIZE, sizeof(struct pcpu)); ASSYM(MAXCOMLEN, MAXCOMLEN); ASSYM(MDTD_COP2USED, MDTD_COP2USED); From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 08:57:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0319106567D; Tue, 6 Mar 2012 08:57:30 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 30E5D8FC14; Tue, 6 Mar 2012 08:57:29 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q268vNDB066742; Tue, 6 Mar 2012 10:57:23 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q268vNXg094911; Tue, 6 Mar 2012 10:57:23 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q268vNdJ094910; Tue, 6 Mar 2012 10:57:23 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 6 Mar 2012 10:57:23 +0200 From: Konstantin Belousov To: Oleksandr Tymoshenko Message-ID: <20120306085723.GY75778@deviant.kiev.zoral.com.ua> References: <201203060329.q263TlLn017594@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+sXEj1HC0AeGgRD2" Content-Disposition: inline In-Reply-To: <201203060329.q263TlLn017594@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232580 - head/lib/csu/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 08:57:31 -0000 --+sXEj1HC0AeGgRD2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 06, 2012 at 03:29:47AM +0000, Oleksandr Tymoshenko wrote: > Author: gonzo > Date: Tue Mar 6 03:29:46 2012 > New Revision: 232580 > URL: http://svn.freebsd.org/changeset/base/232580 >=20 > Log: > - Remove NOSHARED parts since it seems to be no-op > - Call _init_tls for statically linked binaries >=20 > Modified: > head/lib/csu/mips/crt1.c >=20 > Modified: head/lib/csu/mips/crt1.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/csu/mips/crt1.c Tue Mar 6 03:27:58 2012 (r232579) > +++ head/lib/csu/mips/crt1.c Tue Mar 6 03:29:46 2012 (r232580) > @@ -47,10 +47,8 @@ __FBSDID("$FreeBSD$"); > struct Struct_Obj_Entry; > struct ps_strings; > =20 > -#ifndef NOSHARED > extern int _DYNAMIC; > #pragma weak _DYNAMIC > -#endif > =20 > extern void _init(void); > extern void _fini(void); > @@ -91,10 +89,11 @@ __start(char **ap, > __progname =3D s + 1; > } > =20 > -#ifndef NOSHARED > if (&_DYNAMIC !=3D NULL) > atexit(cleanup); > -#endif > + else > + _init_tls(); > + > #ifdef GCRT > atexit(_mcleanup); > #endif Oh great. I tried to understand this bits for some time, due to init_array work, and was unable to make any sense of it. I will update the patchset to include MIPS now. --+sXEj1HC0AeGgRD2 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk9V0XIACgkQC3+MBN1Mb4gwkwCeLasAfaEpAQrVLAUhRKpBgqeL d7sAoKQNHipqeV+Ffb5YnPwOFfXlqs1Y =s7h0 -----END PGP SIGNATURE----- --+sXEj1HC0AeGgRD2-- From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 08:59:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DC07B1065672; Tue, 6 Mar 2012 08:59:42 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ADBDF8FC0A; Tue, 6 Mar 2012 08:59:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q268xgc9028712; Tue, 6 Mar 2012 08:59:42 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q268xgWq028710; Tue, 6 Mar 2012 08:59:42 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201203060859.q268xgWq028710@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 6 Mar 2012 08:59:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232588 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 08:59:43 -0000 Author: pluknet Date: Tue Mar 6 08:59:42 2012 New Revision: 232588 URL: http://svn.freebsd.org/changeset/base/232588 Log: - ifnet_addrs has gone and replaced by ifaddr_byindex(), as per r83130 - access to the AF_LINK address through if_addrhead is deprecated (r128315) MFC after: 1 week Modified: head/share/man/man9/ifnet.9 Modified: head/share/man/man9/ifnet.9 ============================================================================== --- head/share/man/man9/ifnet.9 Tue Mar 6 08:40:21 2012 (r232587) +++ head/share/man/man9/ifnet.9 Tue Mar 6 08:59:42 2012 (r232588) @@ -73,6 +73,8 @@ .\" .Ss "Interface Address Functions" .Ft "struct ifaddr *" +.Fn ifaddr_byindex "u_short idx" +.Ft "struct ifaddr *" .Fn ifa_ifwithaddr "struct sockaddr *addr" .Ft "struct ifaddr *" .Fn ifa_ifwithdstaddr "struct sockaddr *addr" @@ -127,7 +129,7 @@ .\" .Ss "Global Variables" .Vt extern struct ifnethead ifnet ; -.Vt extern struct ifaddr **ifnet_addrs ; +.\" extern struct ifindex_entry *ifindex_table ; .Vt extern int if_index ; .Vt extern int ifqmaxlen ; .Sh DATA STRUCTURES @@ -192,12 +194,18 @@ Each interface also has a .Li TAILQ of interface addresses, described by .Vt ifaddr -structures; the head of the queue is always an +structures. +An .Dv AF_LINK address (see .Xr link_addr 3 ) -describing the link layer implemented by the interface (if any). +describing the link layer implemented by the interface (if any) +is accessed by the +.Fn ifaddr_byindex +function or +.Va if_addr +structure. (Some trivial interfaces do not provide any link layer addresses; this structure, while still present, serves only to identify the interface name and index.) @@ -1085,8 +1093,11 @@ addresses on that interface, and create .Vt ifaddr structure to be the first element in that list. (A pointer to -this address structure is saved in the global array -.Va ifnet_addrs . ) +this address structure is saved in the +.Vt ifnet +structure and shall be accessed by the +.Fn ifaddr_byindex +function.) The .Fa ifp must have been allocated by From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 09:04:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7C85E106564A; Tue, 6 Mar 2012 09:04:53 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 67A808FC18; Tue, 6 Mar 2012 09:04:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2694rYn028922; Tue, 6 Mar 2012 09:04:53 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2694rAY028920; Tue, 6 Mar 2012 09:04:53 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201203060904.q2694rAY028920@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 6 Mar 2012 09:04:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232589 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 09:04:53 -0000 Author: pluknet Date: Tue Mar 6 09:04:53 2012 New Revision: 232589 URL: http://svn.freebsd.org/changeset/base/232589 Log: The missing part of r232588 that documents ifaddr_byindex() itself. MFC after: 1 week Modified: head/share/man/man9/ifnet.9 Modified: head/share/man/man9/ifnet.9 ============================================================================== --- head/share/man/man9/ifnet.9 Tue Mar 6 08:59:42 2012 (r232588) +++ head/share/man/man9/ifnet.9 Tue Mar 6 09:04:53 2012 (r232589) @@ -1351,6 +1351,10 @@ precisely .Fa addr will be returned. .Pp +.Fn ifaddr_byindex +returns the link-level address of the interface with the given index +.Fa idx . +.Pp All of these functions return a null pointer if no such address can be found. .Ss "Interface Multicast Address Functions" From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 09:34:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FA861065674; Tue, 6 Mar 2012 09:34:31 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D5C308FC12; Tue, 6 Mar 2012 09:34:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q269YUuM029843; Tue, 6 Mar 2012 09:34:30 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q269YUIp029840; Tue, 6 Mar 2012 09:34:30 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201203060934.q269YUIp029840@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 6 Mar 2012 09:34:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232590 - head/libexec/rtld-elf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 09:34:31 -0000 Author: pluknet Date: Tue Mar 6 09:34:30 2012 New Revision: 232590 URL: http://svn.freebsd.org/changeset/base/232590 Log: Cosmetic nit: - rename isspace1() macro to the more appropriate rtld_isspace(). Discussed with: kib Modified: head/libexec/rtld-elf/libmap.c Modified: head/libexec/rtld-elf/libmap.c ============================================================================== --- head/libexec/rtld-elf/libmap.c Tue Mar 6 09:04:53 2012 (r232589) +++ head/libexec/rtld-elf/libmap.c Tue Mar 6 09:34:30 2012 (r232590) @@ -56,7 +56,7 @@ static int closestrfn (void * cookie); * Do not use ctype.h macros, which rely on working TLS. It is * too early to have thread-local variables functional. */ -#define isspace1(c) ((c) == ' ' || (c) == '\t') +#define rtld_isspace(c) ((c) == ' ' || (c) == '\t') int lm_init (char *libmap_override) @@ -112,7 +112,7 @@ lmc_parse (FILE *fp) t = f = c = NULL; /* Skip over leading space */ - while (isspace1(*cp)) cp++; + while (rtld_isspace(*cp)) cp++; /* Found a comment or EOL */ if (iseol(*cp)) continue; @@ -122,7 +122,7 @@ lmc_parse (FILE *fp) cp++; /* Skip leading space */ - while (isspace1(*cp)) cp++; + while (rtld_isspace(*cp)) cp++; /* Found comment, EOL or end of selector */ if (iseol(*cp) || *cp == ']') @@ -130,11 +130,11 @@ lmc_parse (FILE *fp) c = cp++; /* Skip to end of word */ - while (!isspace1(*cp) && !iseol(*cp) && *cp != ']') + while (!rtld_isspace(*cp) && !iseol(*cp) && *cp != ']') cp++; /* Skip and zero out trailing space */ - while (isspace1(*cp)) *cp++ = '\0'; + while (rtld_isspace(*cp)) *cp++ = '\0'; /* Check if there is a closing brace */ if (*cp != ']') continue; @@ -146,7 +146,7 @@ lmc_parse (FILE *fp) * There should be nothing except whitespace or comment from this point to the end of the line. */ - while(isspace1(*cp)) cp++; + while(rtld_isspace(*cp)) cp++; if (!iseol(*cp)) continue; strcpy(prog, c); @@ -156,20 +156,20 @@ lmc_parse (FILE *fp) /* Parse the 'from' candidate. */ f = cp++; - while (!isspace1(*cp) && !iseol(*cp)) cp++; + while (!rtld_isspace(*cp) && !iseol(*cp)) cp++; /* Skip and zero out the trailing whitespace */ - while (isspace1(*cp)) *cp++ = '\0'; + while (rtld_isspace(*cp)) *cp++ = '\0'; /* Found a comment or EOL */ if (iseol(*cp)) continue; /* Parse 'to' mapping */ t = cp++; - while (!isspace1(*cp) && !iseol(*cp)) cp++; + while (!rtld_isspace(*cp) && !iseol(*cp)) cp++; /* Skip and zero out the trailing whitespace */ - while (isspace1(*cp)) *cp++ = '\0'; + while (rtld_isspace(*cp)) *cp++ = '\0'; /* Should be no extra tokens at this point */ if (!iseol(*cp)) continue; From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 09:40:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E749106566C; Tue, 6 Mar 2012 09:40:34 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 897B28FC0C; Tue, 6 Mar 2012 09:40:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q269eYxw030055; Tue, 6 Mar 2012 09:40:34 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q269eYJM030053; Tue, 6 Mar 2012 09:40:34 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201203060940.q269eYJM030053@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 6 Mar 2012 09:40:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232591 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 09:40:34 -0000 Author: pluknet Date: Tue Mar 6 09:40:34 2012 New Revision: 232591 URL: http://svn.freebsd.org/changeset/base/232591 Log: Kill EoL whitespaces. Modified: head/share/man/man9/ifnet.9 Modified: head/share/man/man9/ifnet.9 ============================================================================== --- head/share/man/man9/ifnet.9 Tue Mar 6 09:34:30 2012 (r232590) +++ head/share/man/man9/ifnet.9 Tue Mar 6 09:40:34 2012 (r232591) @@ -394,7 +394,7 @@ This function will return .Dv ENOBUFS if the devices software and hardware queues are both full. This function must be installed after -.Fn if_attach +.Fn if_attach to override the default implementation. This function is exposed in order to allow drivers to manage their own queues and to reduce the latency caused by a frequently gratuitous enqueue / dequeue @@ -402,8 +402,8 @@ pair to ifq. The suggested internal software queueing mechanism is buf_ring. .It Fn if_qflush Free mbufs in internally managed queues when the interface is marked down. -This function must be installed after -.Fn if_attach +This function must be installed after +.Fn if_attach to override the default implementation. This function is exposed in order to allow drivers to manage their own queues and to reduce the latency caused by a frequently gratuitous enqueue / dequeue @@ -623,14 +623,14 @@ This Ethernet interface supports TCP Seg .It Dv IFCAP_TSO6 This Ethernet interface supports TCP6 Segmentation offloading. .It Dv IFCAP_TSO -A shorthand for +A shorthand for .Pq Dv IFCAP_TSO4 | IFCAP_TSO6 . .It Dv IFCAP_TOE4 This Ethernet interface supports TCP offloading. .It Dv IFCAP_TOE6 This Ethernet interface supports TCP6 offloading. .It Dv ICAP_TOE -A Shorthand for +A Shorthand for .Pq Dv IFCAP_TOE4 | IFCAP_TOE6 . .It Dv IFCAP_WOL_UCAST This Ethernet interface supports waking up on any Unicast packet. From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 09:57:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8944D106566B; Tue, 6 Mar 2012 09:57:51 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3A6C58FC16; Tue, 6 Mar 2012 09:57:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q269vpRi030612; Tue, 6 Mar 2012 09:57:51 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q269vp2v030610; Tue, 6 Mar 2012 09:57:51 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201203060957.q269vp2v030610@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 6 Mar 2012 09:57:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232592 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 09:57:51 -0000 Author: pluknet Date: Tue Mar 6 09:57:50 2012 New Revision: 232592 URL: http://svn.freebsd.org/changeset/base/232592 Log: Fix a typo: use lower case in "A Shorthand". Noted by: maxim Modified: head/share/man/man9/ifnet.9 Modified: head/share/man/man9/ifnet.9 ============================================================================== --- head/share/man/man9/ifnet.9 Tue Mar 6 09:40:34 2012 (r232591) +++ head/share/man/man9/ifnet.9 Tue Mar 6 09:57:50 2012 (r232592) @@ -630,7 +630,7 @@ This Ethernet interface supports TCP off .It Dv IFCAP_TOE6 This Ethernet interface supports TCP6 offloading. .It Dv ICAP_TOE -A Shorthand for +A shorthand for .Pq Dv IFCAP_TOE4 | IFCAP_TOE6 . .It Dv IFCAP_WOL_UCAST This Ethernet interface supports waking up on any Unicast packet. From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 10:20:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1837D1065673; Tue, 6 Mar 2012 10:20:16 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ECB248FC0C; Tue, 6 Mar 2012 10:20:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26AKFqb031412; Tue, 6 Mar 2012 10:20:15 GMT (envelope-from remko@svn.freebsd.org) Received: (from remko@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26AKFR0031408; Tue, 6 Mar 2012 10:20:15 GMT (envelope-from remko@svn.freebsd.org) Message-Id: <201203061020.q26AKFR0031408@svn.freebsd.org> From: Remko Lodder Date: Tue, 6 Mar 2012 10:20:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232593 - in stable/8/share/man: man7 man8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 10:20:16 -0000 Author: remko Date: Tue Mar 6 10:20:15 2012 New Revision: 232593 URL: http://svn.freebsd.org/changeset/base/232593 Log: Merge r218998 Move the sticky manual from section 8 to section 7 like NetBSD has, since this is not a command on itself. PR: 124468 Added: stable/8/share/man/man7/sticky.7 - copied unchanged from r218998, head/share/man/man7/sticky.7 Deleted: stable/8/share/man/man8/sticky.8 Modified: stable/8/share/man/man7/Makefile stable/8/share/man/man8/Makefile Directory Properties: stable/8/share/man/ (props changed) stable/8/share/man/man7/ (props changed) stable/8/share/man/man8/ (props changed) Modified: stable/8/share/man/man7/Makefile ============================================================================== --- stable/8/share/man/man7/Makefile Tue Mar 6 09:57:50 2012 (r232592) +++ stable/8/share/man/man7/Makefile Tue Mar 6 10:20:15 2012 (r232593) @@ -23,6 +23,7 @@ MAN= adding_user.7 \ security.7 \ sprog.7 \ stdint.7 \ + sticky.7 \ tuning.7 MLINKS= intro.7 miscellaneous.7 Copied: stable/8/share/man/man7/sticky.7 (from r218998, head/share/man/man7/sticky.7) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/share/man/man7/sticky.7 Tue Mar 6 10:20:15 2012 (r232593, copy of r218998, head/share/man/man7/sticky.7) @@ -0,0 +1,82 @@ +.\" Copyright (c) 1980, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)sticky.8 8.1 (Berkeley) 6/5/93 +.\" $FreeBSD$ +.\" +.Dd June 5, 1993 +.Dt STICKY 7 +.Os +.Sh NAME +.Nm sticky +.Nd sticky text and append-only directories +.Sh DESCRIPTION +A special file mode, called the +.Em sticky bit +(mode S_ISTXT), +is used to indicate special treatment +for directories. +It is ignored for regular files. +See +.Xr chmod 2 +or +the file +.In sys/stat.h +for an explanation of file modes. +.Sh STICKY DIRECTORIES +A directory whose `sticky bit' is set +becomes an append-only directory, or, more accurately, +a directory in which the deletion of files is restricted. +A file in a sticky directory may only be removed or renamed +by a user if the user has write permission for the directory and +the user is the owner of the file, the owner of the directory, +or the super-user. +This feature is usefully applied to directories such as +.Pa /tmp +which must be publicly writable but +should deny users the license to arbitrarily +delete or rename each others' files. +.Pp +Any user may create a sticky directory. +See +.Xr chmod 1 +for details about modifying file modes. +.Sh HISTORY +A +.Nm +command appeared in +.At 32v . +.Sh BUGS +Neither +.Xr open 2 +nor +.Xr mkdir 2 +will create a file with the sticky bit set. Modified: stable/8/share/man/man8/Makefile ============================================================================== --- stable/8/share/man/man8/Makefile Tue Mar 6 09:57:50 2012 (r232592) +++ stable/8/share/man/man8/Makefile Tue Mar 6 10:20:15 2012 (r232593) @@ -10,7 +10,6 @@ MAN= crash.8 \ rc.sendmail.8 \ rc.subr.8 \ rescue.8 \ - sticky.8 \ yp.8 MLINKS= rc.8 rc.atm.8 \ From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 10:24:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1537B106564A; Tue, 6 Mar 2012 10:24:32 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F39BC8FC12; Tue, 6 Mar 2012 10:24:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26AOVUD031599; Tue, 6 Mar 2012 10:24:31 GMT (envelope-from remko@svn.freebsd.org) Received: (from remko@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26AOV8g031596; Tue, 6 Mar 2012 10:24:31 GMT (envelope-from remko@svn.freebsd.org) Message-Id: <201203061024.q26AOV8g031596@svn.freebsd.org> From: Remko Lodder Date: Tue, 6 Mar 2012 10:24:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232594 - in stable/8/sys/dev/usb: . wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 10:24:32 -0000 Author: remko Date: Tue Mar 6 10:24:31 2012 New Revision: 232594 URL: http://svn.freebsd.org/changeset/base/232594 Log: MFC r230333 Add support for new if_run(4) Logitech device. Original commit message: Add support for new USB device. PR: usb/164275 MFC after: 3 days PR: usb/164275 Modified: stable/8/sys/dev/usb/usbdevs stable/8/sys/dev/usb/wlan/if_run.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Tue Mar 6 10:20:15 2012 (r232593) +++ stable/8/sys/dev/usb/usbdevs Tue Mar 6 10:24:31 2012 (r232594) @@ -2084,7 +2084,6 @@ product LINKSYS4 RT3070 0x0078 RT3070 product LINKSYS4 WUSB600NV2 0x0079 WUSB600N v2 /* Logitech products */ -product LOGITECH LANW300NU2 0x0166 LAN-W300N/U2 product LOGITECH M2452 0x0203 M2452 keyboard product LOGITECH M4848 0x0301 M4848 mouse product LOGITECH PAGESCAN 0x040f PageScan @@ -2116,6 +2115,7 @@ product LOGITEC LAN_GTJU2A 0x0160 LAN-GT product LOGITEC RT2870_1 0x0162 RT2870 product LOGITEC RT2870_2 0x0163 RT2870 product LOGITEC RT2870_3 0x0164 RT2870 +product LOGITEC LANW300NU2 0x0166 LAN-W300N/U2 /* Longcheer Holdings, Ltd. products */ product LONGCHEER WM66 0x6061 Longcheer WM66 HSDPA Modified: stable/8/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_run.c Tue Mar 6 10:20:15 2012 (r232593) +++ stable/8/sys/dev/usb/wlan/if_run.c Tue Mar 6 10:24:31 2012 (r232594) @@ -208,7 +208,7 @@ 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(LOGITEC, LANW300NU2), RUN_DEV(MELCO, RT2870_1), RUN_DEV(MELCO, RT2870_2), RUN_DEV(MELCO, WLIUCAG300N), From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 10:26:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E513106566B; Tue, 6 Mar 2012 10:26:10 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 582458FC1A; Tue, 6 Mar 2012 10:26:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26AQAgX031710; Tue, 6 Mar 2012 10:26:10 GMT (envelope-from remko@svn.freebsd.org) Received: (from remko@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26AQAIG031707; Tue, 6 Mar 2012 10:26:10 GMT (envelope-from remko@svn.freebsd.org) Message-Id: <201203061026.q26AQAIG031707@svn.freebsd.org> From: Remko Lodder Date: Tue, 6 Mar 2012 10:26:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232595 - in stable/9/sys/dev/usb: . wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 10:26:10 -0000 Author: remko Date: Tue Mar 6 10:26:10 2012 New Revision: 232595 URL: http://svn.freebsd.org/changeset/base/232595 Log: MFC r230333 Add new Logitech device to if_run(4). Original commit message: Add support for new USB device. PR: usb/164275 MFC after: 3 days PR: usb/164275 Modified: stable/9/sys/dev/usb/usbdevs stable/9/sys/dev/usb/wlan/if_run.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/usb/usbdevs ============================================================================== --- stable/9/sys/dev/usb/usbdevs Tue Mar 6 10:24:31 2012 (r232594) +++ stable/9/sys/dev/usb/usbdevs Tue Mar 6 10:26:10 2012 (r232595) @@ -2088,7 +2088,6 @@ product LINKSYS4 RT3070 0x0078 RT3070 product LINKSYS4 WUSB600NV2 0x0079 WUSB600N v2 /* Logitech products */ -product LOGITECH LANW300NU2 0x0166 LAN-W300N/U2 product LOGITECH M2452 0x0203 M2452 keyboard product LOGITECH M4848 0x0301 M4848 mouse product LOGITECH PAGESCAN 0x040f PageScan @@ -2120,6 +2119,7 @@ product LOGITEC LAN_GTJU2A 0x0160 LAN-GT product LOGITEC RT2870_1 0x0162 RT2870 product LOGITEC RT2870_2 0x0163 RT2870 product LOGITEC RT2870_3 0x0164 RT2870 +product LOGITEC LANW300NU2 0x0166 LAN-W300N/U2 /* Longcheer Holdings, Ltd. products */ product LONGCHEER WM66 0x6061 Longcheer WM66 HSDPA Modified: stable/9/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_run.c Tue Mar 6 10:24:31 2012 (r232594) +++ stable/9/sys/dev/usb/wlan/if_run.c Tue Mar 6 10:26:10 2012 (r232595) @@ -208,7 +208,7 @@ 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(LOGITEC, LANW300NU2), RUN_DEV(MELCO, RT2870_1), RUN_DEV(MELCO, RT2870_2), RUN_DEV(MELCO, WLIUCAG300N), From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 10:45:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C9D251065672; Tue, 6 Mar 2012 10:45:23 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B4F378FC19; Tue, 6 Mar 2012 10:45:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26AjNDF035828; Tue, 6 Mar 2012 10:45:23 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26AjN5o035826; Tue, 6 Mar 2012 10:45:23 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203061045.q26AjN5o035826@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 6 Mar 2012 10:45:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232596 - stable/8/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 10:45:23 -0000 Author: kib Date: Tue Mar 6 10:45:23 2012 New Revision: 232596 URL: http://svn.freebsd.org/changeset/base/232596 Log: MFC r232002: Remove wrong comment. Modified: stable/8/sys/vm/vnode_pager.h Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/vm/vnode_pager.h ============================================================================== --- stable/8/sys/vm/vnode_pager.h Tue Mar 6 10:26:10 2012 (r232595) +++ stable/8/sys/vm/vnode_pager.h Tue Mar 6 10:45:23 2012 (r232596) @@ -40,10 +40,6 @@ #ifdef _KERNEL -/* - * XXX Generic routines; currently called by badly written FS code; these - * XXX should go away soon. - */ int vnode_pager_generic_getpages(struct vnode *vp, vm_page_t *m, int count, int reqpage); int vnode_pager_generic_putpages(struct vnode *vp, vm_page_t *m, From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 10:51:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C2608106566C; Tue, 6 Mar 2012 10:51:53 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC7D88FC13; Tue, 6 Mar 2012 10:51:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26Apr8x036074; Tue, 6 Mar 2012 10:51:53 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26AprFh036072; Tue, 6 Mar 2012 10:51:53 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203061051.q26AprFh036072@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 6 Mar 2012 10:51:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232597 - stable/8/sys/i386/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 10:51:53 -0000 Author: kib Date: Tue Mar 6 10:51:53 2012 New Revision: 232597 URL: http://svn.freebsd.org/changeset/base/232597 Log: MFC r232143: Do not write to the user address directly, use suword(). Modified: stable/8/sys/i386/linux/linux_sysvec.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/i386/linux/linux_sysvec.c ============================================================================== --- stable/8/sys/i386/linux/linux_sysvec.c Tue Mar 6 10:45:23 2012 (r232596) +++ stable/8/sys/i386/linux/linux_sysvec.c Tue Mar 6 10:51:53 2012 (r232597) @@ -225,11 +225,11 @@ linux_fixup(register_t **stack_base, str argv = *stack_base; envp = *stack_base + (imgp->args->argc + 1); (*stack_base)--; - **stack_base = (intptr_t)(void *)envp; + suword(*stack_base, (intptr_t)(void *)envp); (*stack_base)--; - **stack_base = (intptr_t)(void *)argv; + suword(*stack_base, (intptr_t)(void *)argv); (*stack_base)--; - **stack_base = imgp->args->argc; + suword(*stack_base, imgp->args->argc); return (0); } @@ -285,7 +285,7 @@ elf_linux_fixup(register_t **stack_base, imgp->auxargs = NULL; (*stack_base)--; - **stack_base = (register_t)imgp->args->argc; + suword(*stack_base, (register_t)imgp->args->argc); return (0); } From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 11:05:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE398106566C; Tue, 6 Mar 2012 11:05:50 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A89E38FC16; Tue, 6 Mar 2012 11:05:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26B5ogE036594; Tue, 6 Mar 2012 11:05:50 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26B5oq8036590; Tue, 6 Mar 2012 11:05:50 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201203061105.q26B5oq8036590@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 6 Mar 2012 11:05:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232598 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 11:05:50 -0000 Author: trasz Date: Tue Mar 6 11:05:50 2012 New Revision: 232598 URL: http://svn.freebsd.org/changeset/base/232598 Log: Make racct and rctl correctly handle jail renaming. Previously they would continue using old name, the one jail was created with. PR: bin/165207 Modified: head/sys/kern/kern_jail.c head/sys/kern/kern_racct.c head/sys/sys/racct.h Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Tue Mar 6 10:51:53 2012 (r232597) +++ head/sys/kern/kern_jail.c Tue Mar 6 11:05:50 2012 (r232598) @@ -130,6 +130,7 @@ static char *prison_path(struct prison * static void prison_remove_one(struct prison *pr); #ifdef RACCT static void prison_racct_attach(struct prison *pr); +static void prison_racct_modify(struct prison *pr); static void prison_racct_detach(struct prison *pr); #endif #ifdef INET @@ -1830,6 +1831,12 @@ kern_jail_set(struct thread *td, struct if (!(flags & JAIL_ATTACH)) sx_sunlock(&allprison_lock); } + +#ifdef RACCT + if (!created) + prison_racct_modify(pr); +#endif + td->td_retval[0] = pr->pr_id; goto done_errmsg; @@ -4427,24 +4434,32 @@ prison_racct_hold(struct prison_racct *p refcount_acquire(&prr->prr_refcount); } +static void +prison_racct_free_locked(struct prison_racct *prr) +{ + + sx_assert(&allprison_lock, SA_XLOCKED); + + if (refcount_release(&prr->prr_refcount)) { + racct_destroy(&prr->prr_racct); + LIST_REMOVE(prr, prr_next); + free(prr, M_PRISON_RACCT); + } +} + void prison_racct_free(struct prison_racct *prr) { int old; + sx_assert(&allprison_lock, SA_UNLOCKED); + old = prr->prr_refcount; if (old > 1 && atomic_cmpset_int(&prr->prr_refcount, old, old - 1)) return; sx_xlock(&allprison_lock); - if (refcount_release(&prr->prr_refcount)) { - racct_destroy(&prr->prr_racct); - LIST_REMOVE(prr, prr_next); - sx_xunlock(&allprison_lock); - free(prr, M_PRISON_RACCT); - - return; - } + prison_racct_free_locked(prr); sx_xunlock(&allprison_lock); } @@ -4454,15 +4469,63 @@ prison_racct_attach(struct prison *pr) { struct prison_racct *prr; + sx_assert(&allprison_lock, SA_XLOCKED); + prr = prison_racct_find_locked(pr->pr_name); KASSERT(prr != NULL, ("cannot find prison_racct")); pr->pr_prison_racct = prr; } +/* + * Handle jail renaming. From the racct point of view, renaming means + * moving from one prison_racct to another. + */ +static void +prison_racct_modify(struct prison *pr) +{ + struct proc *p; + struct ucred *cred; + struct prison_racct *oldprr; + + sx_slock(&allproc_lock); + sx_xlock(&allprison_lock); + + if (strcmp(pr->pr_name, pr->pr_prison_racct->prr_name) == 0) + return; + + oldprr = pr->pr_prison_racct; + pr->pr_prison_racct = NULL; + + prison_racct_attach(pr); + + /* + * Move resource utilisation records. + */ + racct_move(pr->pr_prison_racct->prr_racct, oldprr->prr_racct); + + /* + * Force rctl to reattach rules to processes. + */ + FOREACH_PROC_IN_SYSTEM(p) { + PROC_LOCK(p); + cred = crhold(p->p_ucred); + PROC_UNLOCK(p); + racct_proc_ucred_changed(p, cred, cred); + crfree(cred); + } + + sx_sunlock(&allproc_lock); + prison_racct_free_locked(oldprr); + sx_xunlock(&allprison_lock); +} + static void prison_racct_detach(struct prison *pr) { + + sx_assert(&allprison_lock, SA_UNLOCKED); + prison_racct_free(pr->pr_prison_racct); pr->pr_prison_racct = NULL; } Modified: head/sys/kern/kern_racct.c ============================================================================== --- head/sys/kern/kern_racct.c Tue Mar 6 10:51:53 2012 (r232597) +++ head/sys/kern/kern_racct.c Tue Mar 6 11:05:50 2012 (r232598) @@ -697,6 +697,18 @@ racct_proc_ucred_changed(struct proc *p, #endif } +void +racct_move(struct racct *dest, struct racct *src) +{ + + mtx_lock(&racct_lock); + + racct_add_racct(dest, src); + racct_sub_racct(src, src); + + mtx_unlock(&racct_lock); +} + static void racctd(void) { Modified: head/sys/sys/racct.h ============================================================================== --- head/sys/sys/racct.h Tue Mar 6 10:51:53 2012 (r232597) +++ head/sys/sys/racct.h Tue Mar 6 11:05:50 2012 (r232598) @@ -142,5 +142,6 @@ void racct_proc_exit(struct proc *p); void racct_proc_ucred_changed(struct proc *p, struct ucred *oldcred, struct ucred *newcred); +void racct_move(struct racct *dest, struct racct *src); #endif /* !_RACCT_H_ */ From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 11:16:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B07991065673; Tue, 6 Mar 2012 11:16:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9AF9F8FC21; Tue, 6 Mar 2012 11:16:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26BGE98037001; Tue, 6 Mar 2012 11:16:14 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26BGE8n036999; Tue, 6 Mar 2012 11:16:14 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203061116.q26BGE8n036999@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 6 Mar 2012 11:16:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232599 - stable/8/contrib/top X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 11:16:14 -0000 Author: kib Date: Tue Mar 6 11:16:14 2012 New Revision: 232599 URL: http://svn.freebsd.org/changeset/base/232599 Log: MFC r232239: Fix a race in top non-interactive mode. Use plain sleep(3) call instead of arming timer and then pausing. If SIGALRM is delivered before pause(3) is entered, top hangs. Modified: stable/8/contrib/top/top.c Directory Properties: stable/8/contrib/top/ (props changed) Modified: stable/8/contrib/top/top.c ============================================================================== --- stable/8/contrib/top/top.c Tue Mar 6 11:05:50 2012 (r232598) +++ stable/8/contrib/top/top.c Tue Mar 6 11:16:14 2012 (r232599) @@ -70,7 +70,6 @@ int pcpu_stats = No; /* signal handling routines */ sigret_t leave(); -sigret_t onalrm(); sigret_t tstop(); #ifdef SIGWINCH sigret_t winch(); @@ -723,12 +722,7 @@ restart: no_command = Yes; if (!interactive) { - /* set up alarm */ - (void) signal(SIGALRM, onalrm); - (void) alarm((unsigned)delay); - - /* wait for the rest of it .... */ - pause(); + sleep(delay); } else while (no_command) { @@ -1174,11 +1168,3 @@ int status; exit(status); /*NOTREACHED*/ } - -sigret_t onalrm() /* SIGALRM handler */ - -{ - /* this is only used in batch mode to break out of the pause() */ - /* return; */ -} - From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 11:34:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9F161065676; Tue, 6 Mar 2012 11:34:43 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 961E68FC18; Tue, 6 Mar 2012 11:34:43 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:c159:bac:b18f:a901] (unknown [IPv6:2001:7b8:3a7:0:c159:bac:b18f:a901]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id CBEBD5C37; Tue, 6 Mar 2012 12:34:42 +0100 (CET) Message-ID: <4F55F652.2040908@FreeBSD.org> Date: Tue, 06 Mar 2012 12:34:42 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120229 Thunderbird/11.0 MIME-Version: 1.0 To: John Baldwin References: <201203051953.q25JrIS1002269@svn.freebsd.org> In-Reply-To: <201203051953.q25JrIS1002269@svn.freebsd.org> X-Enigmail-Version: 1.4a1pre Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232570 - head/sys/boot/i386/boot2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 11:34:43 -0000 On 2012-03-05 20:53, John Baldwin wrote: > Author: jhb > Date: Mon Mar 5 19:53:17 2012 > New Revision: 232570 > URL: http://svn.freebsd.org/changeset/base/232570 > > Log: > Fix boot2 to handle boot config files that only contain a custom path to > a loader or kernel. Specifically, kname cannot be pointed at cmd[] since > it's value is change to be an empty string after the initial call to > parse, and cmd[]'s value can be changed (thus losing a prior setting for > kname) due to user input at the boot prompt. While here, ensure that that > initial boot config file text is nul-terminated, that ops is initialized > to zero, and that kname is always initialized to a valid string. Sigh, this broke building boot2 with clang again... :( From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 12:20:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 098831065677; Tue, 6 Mar 2012 12:20:38 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ECE888FC13; Tue, 6 Mar 2012 12:20:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26CKbMm039773; Tue, 6 Mar 2012 12:20:37 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26CKbTs039771; Tue, 6 Mar 2012 12:20:37 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201203061220.q26CKbTs039771@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 6 Mar 2012 12:20:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232600 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 12:20:38 -0000 Author: pluknet Date: Tue Mar 6 12:20:37 2012 New Revision: 232600 URL: http://svn.freebsd.org/changeset/base/232600 Log: Remove if_watchdog remnants after if_timer/if_watchdog removal in r199975. This part was missed in r199992. MFC after: 1 week Modified: head/share/man/man9/ifnet.9 Modified: head/share/man/man9/ifnet.9 ============================================================================== --- head/share/man/man9/ifnet.9 Tue Mar 6 11:16:14 2012 (r232599) +++ head/share/man/man9/ifnet.9 Tue Mar 6 12:20:37 2012 (r232600) @@ -114,8 +114,6 @@ .Ft int .Fn \*(lp*if_ioctl\*(rp "struct ifnet *ifp" "u_long cmd" "caddr_t data" .Ft void -.Fn \*(lp*if_watchdog\*(rp "struct ifnet *ifp" -.Ft void .Fn \*(lp*if_init\*(rp "void *if_softc" .Ft int .Fo \*(lp*if_resolvemulti\*(rp From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 12:53:45 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0EAD3106566B; Tue, 6 Mar 2012 12:53:45 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F1FE88FC27; Tue, 6 Mar 2012 12:53:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26CriYu040892; Tue, 6 Mar 2012 12:53:44 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26CrivP040889; Tue, 6 Mar 2012 12:53:44 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201203061253.q26CrivP040889@svn.freebsd.org> From: David Chisnall Date: Tue, 6 Mar 2012 12:53:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232601 - in head/lib/libc: locale regex X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 12:53:45 -0000 Author: theraven Date: Tue Mar 6 12:53:44 2012 New Revision: 232601 URL: http://svn.freebsd.org/changeset/base/232601 Log: Remove some duplicated copyright notices. Approved by: dim (mentor) Modified: head/lib/libc/locale/collate.c head/lib/libc/regex/regcomp.c Modified: head/lib/libc/locale/collate.c ============================================================================== --- head/lib/libc/locale/collate.c Tue Mar 6 12:20:37 2012 (r232600) +++ head/lib/libc/locale/collate.c Tue Mar 6 12:53:44 2012 (r232601) @@ -8,11 +8,6 @@ * Portions of this software were developed by David Chisnall * under sponsorship from the FreeBSD Foundation. * - * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. - * Portions of this software were developed by David Chisnall - * 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: Modified: head/lib/libc/regex/regcomp.c ============================================================================== --- head/lib/libc/regex/regcomp.c Tue Mar 6 12:20:37 2012 (r232600) +++ head/lib/libc/regex/regcomp.c Tue Mar 6 12:53:44 2012 (r232601) @@ -11,11 +11,6 @@ * This code is derived from software contributed to Berkeley by * Henry Spencer. * - * Copyright (c) 2011 The FreeBSD Foundation - * All rights reserved. - * Portions of this software were developed by David Chisnall - * 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: From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 12:54:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20BCA106567B; Tue, 6 Mar 2012 12:54:14 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E9F008FC13; Tue, 6 Mar 2012 12:54:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26CsDCo040949; Tue, 6 Mar 2012 12:54:13 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26CsDC1040946; Tue, 6 Mar 2012 12:54:13 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <201203061254.q26CsDC1040946@svn.freebsd.org> From: Takahashi Yoshihiro Date: Tue, 6 Mar 2012 12:54:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232602 - stable/9/sys/boot/pc98/loader X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 12:54:14 -0000 Author: nyan Date: Tue Mar 6 12:54:13 2012 New Revision: 232602 URL: http://svn.freebsd.org/changeset/base/232602 Log: MFC: r231387 Reduce diffs against i386. Modified: stable/9/sys/boot/pc98/loader/Makefile Directory Properties: stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) Modified: stable/9/sys/boot/pc98/loader/Makefile ============================================================================== --- stable/9/sys/boot/pc98/loader/Makefile Tue Mar 6 12:53:44 2012 (r232601) +++ stable/9/sys/boot/pc98/loader/Makefile Tue Mar 6 12:54:13 2012 (r232602) @@ -3,7 +3,8 @@ .include MK_SSP= no -PROG= loader.sym +LOADER?= loader +PROG= ${LOADER}.sym INTERNALPROG= NEWVERSWHAT= "bootstrap loader" pc98 @@ -39,14 +40,14 @@ CFLAGS+= -DLOADER_BZIP2_SUPPORT CFLAGS+= -DLOADER_GZIP_SUPPORT .endif -# Always add MI sources +# Always add MI sources .PATH: ${.CURDIR}/../../common .include "${.CURDIR}/../../common/Makefile.inc" CFLAGS+= -I${.CURDIR}/../../common CFLAGS+= -I${.CURDIR}/../../i386 CFLAGS+= -I. -CLEANFILES= vers.c loader loader.bin loader.help +CLEANFILES= vers.c ${LOADER} ${LOADER}.bin loader.help CFLAGS+= -Wall LDFLAGS= -static -Ttext 0x0 @@ -68,36 +69,37 @@ CFLAGS+= -I${.CURDIR}/../btx/lib vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../../i386/loader/version sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../../i386/loader/version ${NEWVERSWHAT} -loader: loader.bin ${BTXLDR} ${BTXKERN} +${LOADER}: ${LOADER}.bin ${BTXLDR} ${BTXKERN} btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \ - -b ${BTXKERN} loader.bin + -b ${BTXKERN} ${LOADER}.bin -loader.bin: loader.sym +${LOADER}.bin: ${LOADER}.sym cp ${.ALLSRC} ${.TARGET} strip -R .comment -R .note ${.TARGET} loader.help: help.common help.pc98 cat ${.ALLSRC} | awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} -.PATH: ${.CURDIR}/../../forth -FILES= loader loader.help loader.4th support.4th loader.conf +FILES= ${LOADER} +# XXX INSTALLFLAGS_loader= -b +FILESMODE_${LOADER}= ${BINMODE} -b + +.PATH: ${.CURDIR}/../../forth +FILES+= loader.help loader.4th support.4th loader.conf FILES+= screen.4th frames.4th beastie.4th FILES+= brand.4th check-password.4th color.4th delay.4th FILES+= menu.4th menu-commands.4th shortcuts.4th version.4th -# XXX INSTALLFLAGS_loader= -b -FILESMODE_loader= ${BINMODE} -b FILESDIR_loader.conf= /boot/defaults .if !exists(${DESTDIR}/boot/loader.rc) FILES+= ${.CURDIR}/../../i386/loader/loader.rc .endif - .if !exists(${DESTDIR}/boot/menu.rc) FILES+= menu.rc .endif # XXX crt0.o needs to be first for pxeboot(8) to work -OBJS= ${BTXCRT} +OBJS= ${BTXCRT} DPADD= ${LIBFICL} ${LIBPC98} ${LIBSTAND} LDADD= ${LIBFICL} ${LIBPC98} ${LIBSTAND} From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 12:58:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 883D8106566C; Tue, 6 Mar 2012 12:58:19 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5D6258FC0C; Tue, 6 Mar 2012 12:58:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26CwJmE041131; Tue, 6 Mar 2012 12:58:19 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26CwJTn041129; Tue, 6 Mar 2012 12:58:19 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <201203061258.q26CwJTn041129@svn.freebsd.org> From: Takahashi Yoshihiro Date: Tue, 6 Mar 2012 12:58:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232603 - stable/8/sys/boot/pc98/loader X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 12:58:19 -0000 Author: nyan Date: Tue Mar 6 12:58:19 2012 New Revision: 232603 URL: http://svn.freebsd.org/changeset/base/232603 Log: MFC: r231387 Reduce diffs against i386. Modified: stable/8/sys/boot/pc98/loader/Makefile Directory Properties: stable/8/sys/ (props changed) stable/8/sys/boot/ (props changed) Modified: stable/8/sys/boot/pc98/loader/Makefile ============================================================================== --- stable/8/sys/boot/pc98/loader/Makefile Tue Mar 6 12:54:13 2012 (r232602) +++ stable/8/sys/boot/pc98/loader/Makefile Tue Mar 6 12:58:19 2012 (r232603) @@ -3,7 +3,8 @@ .include MK_SSP= no -PROG= loader.sym +LOADER?= loader +PROG= ${LOADER}.sym INTERNALPROG= NEWVERSWHAT= "bootstrap loader" pc98 @@ -39,14 +40,14 @@ CFLAGS+= -DLOADER_BZIP2_SUPPORT CFLAGS+= -DLOADER_GZIP_SUPPORT .endif -# Always add MI sources +# Always add MI sources .PATH: ${.CURDIR}/../../common .include "${.CURDIR}/../../common/Makefile.inc" CFLAGS+= -I${.CURDIR}/../../common CFLAGS+= -I${.CURDIR}/../../i386 CFLAGS+= -I. -CLEANFILES= vers.c loader loader.bin loader.help +CLEANFILES= vers.c ${LOADER} ${LOADER}.bin loader.help CFLAGS+= -Wall LDFLAGS= -static -Ttext 0x0 @@ -68,30 +69,31 @@ CFLAGS+= -I${.CURDIR}/../btx/lib vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../../i386/loader/version sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../../i386/loader/version ${NEWVERSWHAT} -loader: loader.bin ${BTXLDR} ${BTXKERN} +${LOADER}: ${LOADER}.bin ${BTXLDR} ${BTXKERN} btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \ - -b ${BTXKERN} loader.bin + -b ${BTXKERN} ${LOADER}.bin -loader.bin: loader.sym +${LOADER}.bin: ${LOADER}.sym cp ${.ALLSRC} ${.TARGET} strip -R .comment -R .note ${.TARGET} loader.help: help.common help.pc98 cat ${.ALLSRC} | awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET} -.PATH: ${.CURDIR}/../../forth -FILES= loader loader.help loader.4th support.4th loader.conf -FILES+= screen.4th frames.4th beastie.4th +FILES= ${LOADER} # XXX INSTALLFLAGS_loader= -b -FILESMODE_loader= ${BINMODE} -b +FILESMODE_${LOADER}= ${BINMODE} -b + +.PATH: ${.CURDIR}/../../forth +FILES+= loader.help loader.4th support.4th loader.conf +FILES+= screen.4th frames.4th beastie.4th FILESDIR_loader.conf= /boot/defaults .if !exists(${DESTDIR}/boot/loader.rc) FILES+= ${.CURDIR}/../../i386/loader/loader.rc .endif - # XXX crt0.o needs to be first for pxeboot(8) to work -OBJS= ${BTXCRT} +OBJS= ${BTXCRT} DPADD= ${LIBFICL} ${LIBPC98} ${LIBSTAND} LDADD= ${LIBFICL} ${LIBPC98} -lstand From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 13:43:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 304491065673; Tue, 6 Mar 2012 13:43:58 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E3B58FC15; Tue, 6 Mar 2012 13:43:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26DhvqZ042585; Tue, 6 Mar 2012 13:43:57 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26Dhvqp042574; Tue, 6 Mar 2012 13:43:57 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201203061343.q26Dhvqp042574@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 6 Mar 2012 13:43:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232604 - in head: sys/cam/ctl usr.sbin/ctladm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 13:43:58 -0000 Author: trasz Date: Tue Mar 6 13:43:57 2012 New Revision: 232604 URL: http://svn.freebsd.org/changeset/base/232604 Log: Add LUN resizing to CTL. Also make it possible to explicitly set size when creating file-backed or device-backed LUN. Reviewed by: ken (earlier version) Sponsored by: The FreeBSD Foundation Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl.h head/sys/cam/ctl/ctl_backend.h head/sys/cam/ctl/ctl_backend_block.c head/sys/cam/ctl/ctl_backend_ramdisk.c head/sys/cam/ctl/ctl_error.c head/sys/cam/ctl/ctl_ioctl.h head/usr.sbin/ctladm/Makefile head/usr.sbin/ctladm/ctladm.8 head/usr.sbin/ctladm/ctladm.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Tue Mar 6 12:58:19 2012 (r232603) +++ head/sys/cam/ctl/ctl.c Tue Mar 6 13:43:57 2012 (r232604) @@ -1,7 +1,11 @@ /*- * Copyright (c) 2003-2009 Silicon Graphics International Corp. + * Copyright (c) 2012 The FreeBSD Foundation * All rights reserved. * + * Portions of this software were developed by Edward Tomasz Napierala + * 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: @@ -4797,6 +4801,25 @@ ctl_lun_power_lock(struct ctl_be_lun *be return (0); } +void +ctl_lun_capacity_changed(struct ctl_be_lun *be_lun) +{ + struct ctl_lun *lun; + struct ctl_softc *softc; + int i; + + softc = control_softc; + + mtx_lock(&softc->ctl_lock); + + lun = (struct ctl_lun *)be_lun->ctl_lun; + + for (i = 0; i < CTL_MAX_INITIATORS; i++) + lun->pending_sense[i].ua_pending |= CTL_UA_CAPACITY_CHANGED; + + mtx_unlock(&softc->ctl_lock); +} + /* * Backend "memory move is complete" callback for requests that never * make it down to say RAIDCore's configuration code. Modified: head/sys/cam/ctl/ctl.h ============================================================================== --- head/sys/cam/ctl/ctl.h Tue Mar 6 12:58:19 2012 (r232603) +++ head/sys/cam/ctl/ctl.h Tue Mar 6 13:43:57 2012 (r232604) @@ -120,7 +120,8 @@ typedef enum { CTL_UA_RES_PREEMPT = 0x0200, CTL_UA_RES_RELEASE = 0x0400, CTL_UA_REG_PREEMPT = 0x0800, - CTL_UA_ASYM_ACC_CHANGE = 0x1000 + CTL_UA_ASYM_ACC_CHANGE = 0x1000, + CTL_UA_CAPACITY_CHANGED = 0x2000 } ctl_ua_type; #ifdef _KERNEL Modified: head/sys/cam/ctl/ctl_backend.h ============================================================================== --- head/sys/cam/ctl/ctl_backend.h Tue Mar 6 12:58:19 2012 (r232603) +++ head/sys/cam/ctl/ctl_backend.h Tue Mar 6 13:43:57 2012 (r232604) @@ -280,6 +280,11 @@ int ctl_lun_power_lock(struct ctl_be_lun int ctl_lun_offline(struct ctl_be_lun *be_lun); int ctl_lun_online(struct ctl_be_lun *be_lun); +/* + * Let the backend notify the initiator about changed capacity. + */ +void ctl_lun_capacity_changed(struct ctl_be_lun *be_lun); + #endif /* _KERNEL */ #endif /* _CTL_BACKEND_H_ */ Modified: head/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_block.c Tue Mar 6 12:58:19 2012 (r232603) +++ head/sys/cam/ctl/ctl_backend_block.c Tue Mar 6 13:43:57 2012 (r232604) @@ -1,8 +1,12 @@ /*- * Copyright (c) 2003 Silicon Graphics International Corp. * Copyright (c) 2009-2011 Spectra Logic Corporation + * Copyright (c) 2012 The FreeBSD Foundation * All rights reserved. * + * Portions of this software were developed by Edward Tomasz Napierala + * 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: @@ -250,6 +254,12 @@ static int ctl_be_block_create(struct ct struct ctl_lun_req *req); static int ctl_be_block_rm(struct ctl_be_block_softc *softc, struct ctl_lun_req *req); +static int ctl_be_block_modify_file(struct ctl_be_block_lun *be_lun, + struct ctl_lun_req *req); +static int ctl_be_block_modify_dev(struct ctl_be_block_lun *be_lun, + struct ctl_lun_req *req); +static int ctl_be_block_modify(struct ctl_be_block_softc *softc, + struct ctl_lun_req *req); static void ctl_be_block_lun_shutdown(void *be_lun); static void ctl_be_block_lun_config_status(void *be_lun, ctl_lun_config_status status); @@ -1263,6 +1273,9 @@ ctl_be_block_ioctl(struct cdev *dev, u_l case CTL_LUNREQ_RM: error = ctl_be_block_rm(softc, lun_req); break; + case CTL_LUNREQ_MODIFY: + error = ctl_be_block_modify(softc, lun_req); + break; default: lun_req->status = CTL_LUN_ERROR; snprintf(lun_req->error_str, sizeof(lun_req->error_str), @@ -1321,7 +1334,10 @@ ctl_be_block_open_file(struct ctl_be_blo file_data->cred = crhold(curthread->td_ucred); - be_lun->size_bytes = vattr.va_size; + if (params->lun_size_bytes != 0) + be_lun->size_bytes = params->lun_size_bytes; + else + be_lun->size_bytes = vattr.va_size; /* * We set the multi thread flag for file operations because all * filesystems (in theory) are capable of allowing multiple readers @@ -1446,15 +1462,27 @@ ctl_be_block_open_dev(struct ctl_be_bloc curthread); if (error) { snprintf(req->error_str, sizeof(req->error_str), - "%s: error %d returned for DIOCGMEDIASIZE ioctl " - "on %s!", __func__, error, be_lun->dev_path); + "%s: error %d returned for DIOCGMEDIASIZE " + " ioctl on %s!", __func__, error, + be_lun->dev_path); return (error); } - return (0); + if (params->lun_size_bytes != 0) { + if (params->lun_size_bytes > be_lun->size_bytes) { + snprintf(req->error_str, sizeof(req->error_str), + "%s: requested LUN size %ju > backing device " + "size %ju", __func__, + (uintmax_t)params->lun_size_bytes, + (uintmax_t)be_lun->size_bytes); + return (EINVAL); + } -} + be_lun->size_bytes = params->lun_size_bytes; + } + return (0); +} static int ctl_be_block_close(struct ctl_be_block_lun *be_lun) @@ -1599,7 +1627,6 @@ ctl_be_block_open(struct ctl_be_block_so be_lun->size_blocks = be_lun->size_bytes >> be_lun->blocksize_shift; return (0); - } static int @@ -2007,6 +2034,155 @@ bailout_error: return (0); } +static int +ctl_be_block_modify_file(struct ctl_be_block_lun *be_lun, + struct ctl_lun_req *req) +{ + struct vattr vattr; + int error; + struct ctl_lun_modify_params *params; + + params = &req->reqdata.modify; + + if (params->lun_size_bytes != 0) { + be_lun->size_bytes = params->lun_size_bytes; + } else { + error = VOP_GETATTR(be_lun->vn, &vattr, curthread->td_ucred); + if (error != 0) { + snprintf(req->error_str, sizeof(req->error_str), + "error calling VOP_GETATTR() for file %s", + be_lun->dev_path); + return (error); + } + + be_lun->size_bytes = vattr.va_size; + } + + return (0); +} + +static int +ctl_be_block_modify_dev(struct ctl_be_block_lun *be_lun, + struct ctl_lun_req *req) +{ + struct cdev *dev; + struct cdevsw *devsw; + int error; + struct ctl_lun_modify_params *params; + uint64_t size_bytes; + + params = &req->reqdata.modify; + + dev = be_lun->vn->v_rdev; + devsw = dev->si_devsw; + if (!devsw->d_ioctl) { + snprintf(req->error_str, sizeof(req->error_str), + "%s: no d_ioctl for device %s!", __func__, + be_lun->dev_path); + return (ENODEV); + } + + error = devsw->d_ioctl(dev, DIOCGMEDIASIZE, + (caddr_t)&size_bytes, FREAD, + curthread); + if (error) { + snprintf(req->error_str, sizeof(req->error_str), + "%s: error %d returned for DIOCGMEDIASIZE ioctl " + "on %s!", __func__, error, be_lun->dev_path); + return (error); + } + + if (params->lun_size_bytes != 0) { + if (params->lun_size_bytes > size_bytes) { + snprintf(req->error_str, sizeof(req->error_str), + "%s: requested LUN size %ju > backing device " + "size %ju", __func__, + (uintmax_t)params->lun_size_bytes, + (uintmax_t)size_bytes); + return (EINVAL); + } + + be_lun->size_bytes = params->lun_size_bytes; + } else { + be_lun->size_bytes = size_bytes; + } + + return (0); +} + +static int +ctl_be_block_modify(struct ctl_be_block_softc *softc, struct ctl_lun_req *req) +{ + struct ctl_lun_modify_params *params; + struct ctl_be_block_lun *be_lun; + int vfs_is_locked, error; + + params = &req->reqdata.modify; + + mtx_lock(&softc->lock); + + be_lun = NULL; + + STAILQ_FOREACH(be_lun, &softc->lun_list, links) { + if (be_lun->ctl_be_lun.lun_id == params->lun_id) + break; + } + mtx_unlock(&softc->lock); + + if (be_lun == NULL) { + snprintf(req->error_str, sizeof(req->error_str), + "%s: LUN %u is not managed by the block backend", + __func__, params->lun_id); + goto bailout_error; + } + + if (params->lun_size_bytes != 0) { + if (params->lun_size_bytes < be_lun->blocksize) { + snprintf(req->error_str, sizeof(req->error_str), + "%s: LUN size %ju < blocksize %u", __func__, + params->lun_size_bytes, be_lun->blocksize); + goto bailout_error; + } + } + + vfs_is_locked = VFS_LOCK_GIANT(be_lun->vn->v_mount); + vn_lock(be_lun->vn, LK_SHARED | LK_RETRY); + + if (be_lun->vn->v_type == VREG) + error = ctl_be_block_modify_file(be_lun, req); + else + error = ctl_be_block_modify_dev(be_lun, req); + + VOP_UNLOCK(be_lun->vn, 0); + VFS_UNLOCK_GIANT(vfs_is_locked); + + if (error != 0) + goto bailout_error; + + be_lun->size_blocks = be_lun->size_bytes >> be_lun->blocksize_shift; + + /* + * The maximum LBA is the size - 1. + * + * XXX: Note that this field is being updated without locking, + * which might cause problems on 32-bit architectures. + */ + be_lun->ctl_be_lun.maxlba = be_lun->size_blocks - 1; + ctl_lun_capacity_changed(&be_lun->ctl_be_lun); + + /* Tell the user the exact size we ended up using */ + params->lun_size_bytes = be_lun->size_bytes; + + req->status = CTL_LUN_OK; + + return (0); + +bailout_error: + req->status = CTL_LUN_ERROR; + + return (0); +} + static void ctl_be_block_lun_shutdown(void *be_lun) { Modified: head/sys/cam/ctl/ctl_backend_ramdisk.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_ramdisk.c Tue Mar 6 12:58:19 2012 (r232603) +++ head/sys/cam/ctl/ctl_backend_ramdisk.c Tue Mar 6 13:43:57 2012 (r232604) @@ -1,7 +1,11 @@ /*- * Copyright (c) 2003, 2008 Silicon Graphics International Corp. + * Copyright (c) 2012 The FreeBSD Foundation * All rights reserved. * + * Portions of this software were developed by Edward Tomasz Napierala + * 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: @@ -102,6 +106,8 @@ static int ctl_backend_ramdisk_rm(struct struct ctl_lun_req *req); static int ctl_backend_ramdisk_create(struct ctl_be_ramdisk_softc *softc, struct ctl_lun_req *req, int do_wait); +static int ctl_backend_ramdisk_modify(struct ctl_be_ramdisk_softc *softc, + struct ctl_lun_req *req); static void ctl_backend_ramdisk_lun_shutdown(void *be_lun); static void ctl_backend_ramdisk_lun_config_status(void *be_lun, ctl_lun_config_status status); @@ -376,6 +382,9 @@ ctl_backend_ramdisk_ioctl(struct cdev *d case CTL_LUNREQ_RM: retval = ctl_backend_ramdisk_rm(softc, lun_req); break; + case CTL_LUNREQ_MODIFY: + retval = ctl_backend_ramdisk_modify(softc, lun_req); + break; default: lun_req->status = CTL_LUN_ERROR; snprintf(lun_req->error_str, sizeof(lun_req->error_str), @@ -666,6 +675,73 @@ bailout_error: return (retval); } +static int +ctl_backend_ramdisk_modify(struct ctl_be_ramdisk_softc *softc, + struct ctl_lun_req *req) +{ + struct ctl_be_ramdisk_lun *be_lun; + struct ctl_lun_modify_params *params; + uint32_t blocksize; + + params = &req->reqdata.modify; + + be_lun = NULL; + + mtx_lock(&softc->lock); + STAILQ_FOREACH(be_lun, &softc->lun_list, links) { + if (be_lun->ctl_be_lun.lun_id == params->lun_id) + break; + } + mtx_unlock(&softc->lock); + + if (be_lun == NULL) { + snprintf(req->error_str, sizeof(req->error_str), + "%s: LUN %u is not managed by the ramdisk backend", + __func__, params->lun_id); + goto bailout_error; + } + + if (params->lun_size_bytes == 0) { + snprintf(req->error_str, sizeof(req->error_str), + "%s: LUN size \"auto\" not supported " + "by the ramdisk backend", __func__); + goto bailout_error; + } + + blocksize = be_lun->ctl_be_lun.blocksize; + + if (params->lun_size_bytes < blocksize) { + snprintf(req->error_str, sizeof(req->error_str), + "%s: LUN size %ju < blocksize %u", __func__, + params->lun_size_bytes, blocksize); + goto bailout_error; + } + + be_lun->size_blocks = params->lun_size_bytes / blocksize; + be_lun->size_bytes = be_lun->size_blocks * blocksize; + + /* + * The maximum LBA is the size - 1. + * + * XXX: Note that this field is being updated without locking, + * which might cause problems on 32-bit architectures. + */ + be_lun->ctl_be_lun.maxlba = be_lun->size_blocks - 1; + ctl_lun_capacity_changed(&be_lun->ctl_be_lun); + + /* Tell the user the exact size we ended up using */ + params->lun_size_bytes = be_lun->size_bytes; + + req->status = CTL_LUN_OK; + + return (0); + +bailout_error: + req->status = CTL_LUN_ERROR; + + return (0); +} + static void ctl_backend_ramdisk_lun_shutdown(void *be_lun) { Modified: head/sys/cam/ctl/ctl_error.c ============================================================================== --- head/sys/cam/ctl/ctl_error.c Tue Mar 6 12:58:19 2012 (r232603) +++ head/sys/cam/ctl/ctl_error.c Tue Mar 6 13:43:57 2012 (r232604) @@ -454,6 +454,11 @@ ctl_build_ua(ctl_ua_type ua_type, struct asc = 0x2A; ascq = 0x06; break; + case CTL_UA_CAPACITY_CHANGED: + /* 2Ah/09n CAPACITY DATA HAS CHANGED */ + asc = 0x2A; + ascq = 0x09; + break; default: ua_to_build = CTL_UA_NONE; return (ua_to_build); Modified: head/sys/cam/ctl/ctl_ioctl.h ============================================================================== --- head/sys/cam/ctl/ctl_ioctl.h Tue Mar 6 12:58:19 2012 (r232603) +++ head/sys/cam/ctl/ctl_ioctl.h Tue Mar 6 13:43:57 2012 (r232604) @@ -397,7 +397,8 @@ struct ctl_be_arg { typedef enum { CTL_LUNREQ_CREATE, - CTL_LUNREQ_RM + CTL_LUNREQ_RM, + CTL_LUNREQ_MODIFY, } ctl_lunreq_type; @@ -471,12 +472,27 @@ struct ctl_lun_rm_params { }; /* + * LUN modification parameters: + * + * lun_id: The number of the LUN to modify. This must be set. + * The LUN must be backed by the given backend. + * + * lun_size_bytes: The size of the LUN in bytes. If zero, update + * the size using the backing file size, if possible. + */ +struct ctl_lun_modify_params { + uint32_t lun_id; + uint64_t lun_size_bytes; +}; + +/* * Union of request type data. Fill in the appropriate union member for * the request type. */ union ctl_lunreq_data { struct ctl_lun_create_params create; struct ctl_lun_rm_params rm; + struct ctl_lun_modify_params modify; }; /* Modified: head/usr.sbin/ctladm/Makefile ============================================================================== --- head/usr.sbin/ctladm/Makefile Tue Mar 6 12:58:19 2012 (r232603) +++ head/usr.sbin/ctladm/Makefile Tue Mar 6 13:43:57 2012 (r232604) @@ -14,8 +14,8 @@ CFLAGS+= -I${SDIR} WARNS?= 3 .endif -DPADD= ${LIBCAM} ${LIBSBUF} -LDADD= -lcam -lsbuf -lbsdxml +DPADD= ${LIBCAM} ${LIBSBUF} ${LIBBSDXML} ${LIBUTIL} +LDADD= -lcam -lsbuf -lbsdxml -lutil MAN= ctladm.8 .include Modified: head/usr.sbin/ctladm/ctladm.8 ============================================================================== --- head/usr.sbin/ctladm/ctladm.8 Tue Mar 6 12:58:19 2012 (r232603) +++ head/usr.sbin/ctladm/ctladm.8 Tue Mar 6 13:43:57 2012 (r232604) @@ -34,7 +34,7 @@ .\" $Id: //depot/users/kenm/FreeBSD-test2/usr.sbin/ctladm/ctladm.8#3 $ .\" $FreeBSD$ .\" -.Dd July 8, 2011 +.Dd March 6, 2012 .Dt CTLADM 8 .Os .Sh NAME @@ -173,6 +173,11 @@ .Aq Fl l Ar lun_id .Op Fl o Ar name=value .Nm +.Ic modify +.Aq Fl b Ar backend +.Aq Fl l Ar lun_id +.Aq Fl s Ar size_bytes +.Nm .Ic devlist .Op Fl b Ar backend .Op Fl v @@ -830,6 +835,27 @@ Multiple arguments may be specified. Refer to the backend documentation for arguments that may be used. .El +.It Ic modify +Modify a LUN size. +The backend, the LUN number, and the size must be specified. +.Bl -tag -width 14n +.It Fl b Ar backend +Specify the backend that owns the LUN to be removed. +Examples are +.Dq ramdisk +and +.Dq block . +.It Fl l Ar lun_id +Specify the LUN number to remove. +.It Fl s Ar size_bytes +Specify the size of the LUN in bytes. +For the +.Dq block +backend, an +.Dq auto +keyword may be passed instead; this will make CTL use the size of backing +file or device. +.El .It Ic devlist Get a list of all configured LUNs. This also includes the LUN size and blocksize, serial number and device ID. Modified: head/usr.sbin/ctladm/ctladm.c ============================================================================== --- head/usr.sbin/ctladm/ctladm.c Tue Mar 6 12:58:19 2012 (r232603) +++ head/usr.sbin/ctladm/ctladm.c Tue Mar 6 13:43:57 2012 (r232604) @@ -1,8 +1,12 @@ /*- * Copyright (c) 2003, 2004 Silicon Graphics International Corp. * Copyright (c) 1997-2007 Kenneth D. Merry + * Copyright (c) 2012 The FreeBSD Foundation * All rights reserved. * + * Portions of this software were developed by Edward Tomasz Napierala + * 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: @@ -68,6 +72,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "ctladm.h" #ifdef min @@ -110,7 +115,8 @@ typedef enum { CTLADM_CMD_PRES_IN, CTLADM_CMD_PRES_OUT, CTLADM_CMD_INQ_VPD_DEVID, - CTLADM_CMD_RTPG + CTLADM_CMD_RTPG, + CTLADM_CMD_MODIFY } ctladm_cmdfunction; typedef enum { @@ -175,6 +181,7 @@ struct ctladm_opts option_table[] = { {"inquiry", CTLADM_CMD_INQUIRY, CTLADM_ARG_NEED_TL, NULL}, {"lunlist", CTLADM_CMD_LUNLIST, CTLADM_ARG_NONE, NULL}, {"modesense", CTLADM_CMD_MODESENSE, CTLADM_ARG_NEED_TL, "P:S:dlm:c:"}, + {"modify", CTLADM_CMD_MODIFY, CTLADM_ARG_NONE, "b:l:s:"}, {"port", CTLADM_CMD_PORT, CTLADM_ARG_NONE, "lo:p:qt:w:W:x"}, {"prin", CTLADM_CMD_PRES_IN, CTLADM_ARG_NEED_TL, "a:"}, {"prout", CTLADM_CMD_PRES_OUT, CTLADM_ARG_NEED_TL, "a:k:r:s:"}, @@ -249,6 +256,7 @@ static int cctl_create_lun(int fd, int a static int cctl_inquiry_vpd_devid(int fd, int target, int lun, int initiator); static int cctl_report_target_port_group(int fd, int target, int lun, int initiator); +static int cctl_modify_lun(int fd, int argc, char **argv, char *combinedopt); ctladm_optret getoption(struct ctladm_opts *table, char *arg, uint32_t *cmdnum, @@ -3045,7 +3053,15 @@ cctl_create_lun(int fd, int argc, char * break; } case 's': - lun_size = strtoull(optarg, NULL, 0); + if (strcasecmp(optarg, "auto") != 0) { + retval = expand_number(optarg, &lun_size); + if (retval != 0) { + warn("%s: invalid -s argument", + __func__); + retval = 1; + goto bailout; + } + } lun_size_set = 1; break; case 'S': @@ -3289,12 +3305,12 @@ cctl_rm_lun(int fd, int argc, char **arg } if (req.status == CTL_LUN_ERROR) { - warnx("%s: error returned from LUN creation request:\n%s", + warnx("%s: error returned from LUN removal request:\n%s", __func__, req.error_str); retval = 1; goto bailout; } else if (req.status != CTL_LUN_OK) { - warnx("%s: unknown LUN creation request status %d", + warnx("%s: unknown LUN removal request status %d", __func__, req.status); retval = 1; goto bailout; @@ -3306,6 +3322,84 @@ bailout: return (retval); } +static int +cctl_modify_lun(int fd, int argc, char **argv, char *combinedopt) +{ + struct ctl_lun_req req; + uint64_t lun_size = 0; + uint32_t lun_id = 0; + int lun_id_set = 0, lun_size_set = 0; + char *backend_name = NULL; + int retval = 0, c; + + while ((c = getopt(argc, argv, combinedopt)) != -1) { + switch (c) { + case 'b': + backend_name = strdup(optarg); + break; + case 'l': + lun_id = strtoul(optarg, NULL, 0); + lun_id_set = 1; + break; + case 's': + if (strcasecmp(optarg, "auto") != 0) { + retval = expand_number(optarg, &lun_size); + if (retval != 0) { + warn("%s: invalid -s argument", + __func__); + retval = 1; + goto bailout; + } + } + lun_size_set = 1; + break; + default: + break; + } + } + + if (backend_name == NULL) + errx(1, "%s: backend name (-b) must be specified", __func__); + + if (lun_id_set == 0) + errx(1, "%s: LUN id (-l) must be specified", __func__); + + if (lun_size_set == 0) + errx(1, "%s: size (-s) must be specified", __func__); + + bzero(&req, sizeof(req)); + + strlcpy(req.backend, backend_name, sizeof(req.backend)); + req.reqtype = CTL_LUNREQ_MODIFY; + + req.reqdata.modify.lun_id = lun_id; + req.reqdata.modify.lun_size_bytes = lun_size; + + if (ioctl(fd, CTL_LUN_REQ, &req) == -1) { + warn("%s: error issuing CTL_LUN_REQ ioctl", __func__); + retval = 1; + goto bailout; + } + + if (req.status == CTL_LUN_ERROR) { + warnx("%s: error returned from LUN modification request:\n%s", + __func__, req.error_str); + retval = 1; + goto bailout; + } else if (req.status != CTL_LUN_OK) { + warnx("%s: unknown LUN modification request status %d", + __func__, req.status); + retval = 1; + goto bailout; + } + + printf("LUN %d modified successfully\n", lun_id); + +bailout: + return (retval); +} + + /* * Name/value pair used for per-LUN attributes. */ @@ -3601,6 +3695,7 @@ usage(int error) " [-l lun_id] [-o name=value] [-s size_bytes]\n" " [-S serial_num] [-t dev_type]\n" " ctladm remove <-b backend> <-l lun_id> [-o name=value]\n" +" ctladm modify <-b backend> <-l lun_id> <-s size_bytes>\n" " ctladm devlist [-b][-v][-x]\n" " ctladm shutdown\n" " ctladm startup\n" @@ -3987,6 +4082,9 @@ main(int argc, char **argv) case CTLADM_CMD_RTPG: retval = cctl_report_target_port_group(fd, target, lun, initid); break; + case CTLADM_CMD_MODIFY: + retval = cctl_modify_lun(fd, argc, argv, combinedopt); + break; case CTLADM_CMD_HELP: default: usage(retval); From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 14:10:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 44FCC1065672; Tue, 6 Mar 2012 14:10:58 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 33F438FC16; Tue, 6 Mar 2012 14:10:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26EAwiX043588; Tue, 6 Mar 2012 14:10:58 GMT (envelope-from remko@svn.freebsd.org) Received: (from remko@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26EAvav043586; Tue, 6 Mar 2012 14:10:57 GMT (envelope-from remko@svn.freebsd.org) Message-Id: <201203061410.q26EAvav043586@svn.freebsd.org> From: Remko Lodder Date: Tue, 6 Mar 2012 14:10:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232606 - stable/8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 14:10:58 -0000 Author: remko Date: Tue Mar 6 14:10:57 2012 New Revision: 232606 URL: http://svn.freebsd.org/changeset/base/232606 Log: Merge r238821 Add sticky.8 to the obsolete files since it had been moved to sticky.7 Submitted by: maxim and pluknet With help from: dim (because of awkward merge conflicts) Modified: stable/8/ObsoleteFiles.inc (contents, props changed) Directory Properties: stable/8/ (props changed) Modified: stable/8/ObsoleteFiles.inc ============================================================================== --- stable/8/ObsoleteFiles.inc Tue Mar 6 13:57:28 2012 (r232605) +++ stable/8/ObsoleteFiles.inc Tue Mar 6 14:10:57 2012 (r232606) @@ -19,6 +19,8 @@ OLD_FILES+=usr/share/man/man4/cc.4.gz OLD_FILES+=usr/share/man/man9/cc.9.gz # 20101123: removed subblock.h from liblzma OLD_FILES+=usr/include/lzma/subblock.h +# 20110224: sticky.8 -> sticky.7 +OLD_FILES+=usr/share/man/man8/sticky.8.gz # 20101114: Remove long-obsolete MAKEDEV.8 OLD_FILES+=usr/share/man/man8/MAKEDEV.8.gz # 20101112: vgonel(9) has gone to private API a while ago From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 14:13:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7EB081065670; Tue, 6 Mar 2012 14:13:24 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6DBE98FC12; Tue, 6 Mar 2012 14:13:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26EDOSt043747; Tue, 6 Mar 2012 14:13:24 GMT (envelope-from remko@svn.freebsd.org) Received: (from remko@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26EDOf9043745; Tue, 6 Mar 2012 14:13:24 GMT (envelope-from remko@svn.freebsd.org) Message-Id: <201203061413.q26EDOf9043745@svn.freebsd.org> From: Remko Lodder Date: Tue, 6 Mar 2012 14:13:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232607 - stable/7 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 14:13:24 -0000 Author: remko Date: Tue Mar 6 14:13:23 2012 New Revision: 232607 URL: http://svn.freebsd.org/changeset/base/232607 Log: Merge r238821 Add sticky.8 to the obsolete files since it had been moved to sticky.7 Submitted by: maxim and pluknet With help from: dim (because of awkward merge conflicts) Modified: stable/7/ObsoleteFiles.inc (contents, props changed) Directory Properties: stable/7/ (props changed) Modified: stable/7/ObsoleteFiles.inc ============================================================================== --- stable/7/ObsoleteFiles.inc Tue Mar 6 14:10:57 2012 (r232606) +++ stable/7/ObsoleteFiles.inc Tue Mar 6 14:13:23 2012 (r232607) @@ -14,6 +14,8 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20110224: sticky.8 -> sticky.7 +OLD_FILES+=usr/share/man/man8/sticky.8.gz # 20101114: Remove long-obsolete MAKEDEV.8 OLD_FILES+=usr/share/man/man8/MAKEDEV.8.gz # 20101112: vgonel(9) has gone to private API a while ago From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 14:16:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 353ED106564A; Tue, 6 Mar 2012 14:16:10 +0000 (UTC) (envelope-from remko@elvandar.org) Received: from mailout.jr-hosting.nl (mailout.jr-hosting.nl [IPv6:2a01:4f8:141:5ffd::1:25]) by mx1.freebsd.org (Postfix) with ESMTP id C2B178FC14; Tue, 6 Mar 2012 14:16:09 +0000 (UTC) Received: from mailgate.jr-hosting.nl (unknown [IPv6:2a01:4f8:141:5061::25]) by mailout.jr-hosting.nl (Postfix) with ESMTP id D9E673902868; Tue, 6 Mar 2012 14:16:07 +0000 (UTC) Received: from www.jr-hosting.nl (mail.jr-hosting.nl [78.47.69.234]) by mailgate.jr-hosting.nl (Postfix) with ESMTPSA id 3B7463F44F; Tue, 6 Mar 2012 15:16:07 +0100 (CET) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 06 Mar 2012 15:16:06 +0100 From: Remko Lodder To: Remko Lodder In-Reply-To: <201203061413.q26EDOf9043745@svn.freebsd.org> References: <201203061413.q26EDOf9043745@svn.freebsd.org> Message-ID: X-Sender: remko@elvandar.org User-Agent: Roundcube Webmail/0.7.1 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r232607 - stable/7 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 14:16:10 -0000 On 06.03.2012 15:13, Remko Lodder wrote: The commit seems to mess up with the time schedule. Normally latest entries are on top, but the merge somehow got a lot of conflicts and now it isn't on top. Anyone has a suggestion on how to properly fix this? (Same goes for stable/8!) Thanks Remko > Author: remko > Date: Tue Mar 6 14:13:23 2012 > New Revision: 232607 > URL: http://svn.freebsd.org/changeset/base/232607 > > Log: > Merge r238821 > > Add sticky.8 to the obsolete files since it had been > moved to sticky.7 > > Submitted by: maxim and pluknet > > With help from: dim (because of awkward merge conflicts) > > Modified: > stable/7/ObsoleteFiles.inc (contents, props changed) > Directory Properties: > stable/7/ (props changed) > > Modified: stable/7/ObsoleteFiles.inc > > ============================================================================== > --- stable/7/ObsoleteFiles.inc Tue Mar 6 14:10:57 2012 (r232606) > +++ stable/7/ObsoleteFiles.inc Tue Mar 6 14:13:23 2012 (r232607) > @@ -14,6 +14,8 @@ > # The file is partitioned: OLD_FILES first, then OLD_LIBS and > OLD_DIRS last. > # > > +# 20110224: sticky.8 -> sticky.7 > +OLD_FILES+=usr/share/man/man8/sticky.8.gz > # 20101114: Remove long-obsolete MAKEDEV.8 > OLD_FILES+=usr/share/man/man8/MAKEDEV.8.gz > # 20101112: vgonel(9) has gone to private API a while ago -- /"\ Best regards, | remko@FreeBSD.org \ / Remko Lodder | remko@EFnet X http://www.evilcoder.org/ | / \ ASCII Ribbon Campaign | Against HTML Mail and News From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 14:18:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 086A1106564A; Tue, 6 Mar 2012 14:18:55 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EB81A8FC15; Tue, 6 Mar 2012 14:18:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26EIsTe043964; Tue, 6 Mar 2012 14:18:54 GMT (envelope-from remko@svn.freebsd.org) Received: (from remko@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26EIsE6043962; Tue, 6 Mar 2012 14:18:54 GMT (envelope-from remko@svn.freebsd.org) Message-Id: <201203061418.q26EIsE6043962@svn.freebsd.org> From: Remko Lodder Date: Tue, 6 Mar 2012 14:18:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232608 - stable/8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 14:18:55 -0000 Author: remko Date: Tue Mar 6 14:18:54 2012 New Revision: 232608 URL: http://svn.freebsd.org/changeset/base/232608 Log: On second thought and look; this only goes for 8-stable where the ordering had gone beserk. Fix this manually. Modified: stable/8/ObsoleteFiles.inc Modified: stable/8/ObsoleteFiles.inc ============================================================================== --- stable/8/ObsoleteFiles.inc Tue Mar 6 14:13:23 2012 (r232607) +++ stable/8/ObsoleteFiles.inc Tue Mar 6 14:18:54 2012 (r232608) @@ -17,10 +17,10 @@ # 20110915: rename congestion control manpages OLD_FILES+=usr/share/man/man4/cc.4.gz OLD_FILES+=usr/share/man/man9/cc.9.gz -# 20101123: removed subblock.h from liblzma -OLD_FILES+=usr/include/lzma/subblock.h # 20110224: sticky.8 -> sticky.7 OLD_FILES+=usr/share/man/man8/sticky.8.gz +# 20101123: removed subblock.h from liblzma +OLD_FILES+=usr/include/lzma/subblock.h # 20101114: Remove long-obsolete MAKEDEV.8 OLD_FILES+=usr/share/man/man8/MAKEDEV.8.gz # 20101112: vgonel(9) has gone to private API a while ago From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 14:19:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 52CFD106568E; Tue, 6 Mar 2012 14:19:37 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4259E8FC2C; Tue, 6 Mar 2012 14:19:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26EJbT0044031; Tue, 6 Mar 2012 14:19:37 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26EJbx3044029; Tue, 6 Mar 2012 14:19:37 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201203061419.q26EJbx3044029@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 6 Mar 2012 14:19:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232609 - head/tools/test/netfibs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 14:19:37 -0000 Author: bz Date: Tue Mar 6 14:19:36 2012 New Revision: 232609 URL: http://svn.freebsd.org/changeset/base/232609 Log: Use = rather than == for expressions to test(1) builtin(1) in sh(1) to comply with standards. On modern branches there is an undocumented alias (see r219084) but on stable/7 this is still an error. Sponsored by: Cisco Systems, Inc. MFC after: 3 days Modified: head/tools/test/netfibs/initiator.sh Modified: head/tools/test/netfibs/initiator.sh ============================================================================== --- head/tools/test/netfibs/initiator.sh Tue Mar 6 14:18:54 2012 (r232608) +++ head/tools/test/netfibs/initiator.sh Tue Mar 6 14:19:36 2012 (r232609) @@ -410,7 +410,7 @@ testtx_ulp6_connected() *) _f="SETFIB" ;; esac - if test "${_o}" == "-i" -a "${_f}" == "SO_SETFIB"; then + if test "${_o}" = "-i" -a "${_f}" = "SO_SETFIB"; then print_debug "Skipping icmp6 tests for SO_SETFIB." return 0 fi From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 14:29:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B02D2106564A; Tue, 6 Mar 2012 14:29:54 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id B30A38FC17; Tue, 6 Mar 2012 14:29:52 +0000 (UTC) Received: by eaaf13 with SMTP id f13so1903966eaa.13 for ; Tue, 06 Mar 2012 06:29:51 -0800 (PST) Received-SPF: pass (google.com: domain of pluknet@gmail.com designates 10.112.49.227 as permitted sender) client-ip=10.112.49.227; Authentication-Results: mr.google.com; spf=pass (google.com: domain of pluknet@gmail.com designates 10.112.49.227 as permitted sender) smtp.mail=pluknet@gmail.com; dkim=pass header.i=pluknet@gmail.com Received: from mr.google.com ([10.112.49.227]) by 10.112.49.227 with SMTP id x3mr2657377lbn.99.1331044191791 (num_hops = 1); Tue, 06 Mar 2012 06:29:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=WJ4mgBiLPbS6mqW/lWYaeK4mpn2Y70H4d1L+S0z7WvA=; b=tSWviebJGEgZPJfn/KZdFAsi+Lvt+uK8DeytdV157TkWzY9Ai2HqPhkyWguNxIER/d Z5Z01kRaRKy1DSejefG3sUnVZq3d5ZNeIfjQ1KKjZvQI4W6EGOZCjbE3B3HaWFV5h+75 anAIV4Wj6ijpEVkvrhQBD2q88S7P/UGZunMoCKL9Zt8LqO1MPX+x4/CrRysqC6D9lp4f lzdNot7/WMe1XeXpIew/V5YLzZ5UWBTjhvtLnFMqtmY3hWOL3XS10u6KOv4U1Lr+KrSk 5wvPE7hlyisWXR22Hbwp47cwIC64pDYnkjaS4h1a30UCovp5yapMGWVttWsKBXHVsvCc 4+Iw== MIME-Version: 1.0 Received: by 10.112.49.227 with SMTP id x3mr2152758lbn.99.1331044191708; Tue, 06 Mar 2012 06:29:51 -0800 (PST) Sender: pluknet@gmail.com Received: by 10.152.21.73 with HTTP; Tue, 6 Mar 2012 06:29:51 -0800 (PST) In-Reply-To: <201203061410.q26EAvav043586@svn.freebsd.org> References: <201203061410.q26EAvav043586@svn.freebsd.org> Date: Tue, 6 Mar 2012 17:29:51 +0300 X-Google-Sender-Auth: W4J-qQPNK9hzoAcz9ISWUNTdxK4 Message-ID: From: Sergey Kandaurov To: Remko Lodder Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r232606 - stable/8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 14:29:54 -0000 On 6 March 2012 18:10, Remko Lodder wrote: > Author: remko > Date: Tue Mar =A06 14:10:57 2012 > New Revision: 232606 > URL: http://svn.freebsd.org/changeset/base/232606 > > Log: > =A0Merge r238821 > > =A0Add sticky.8 to the obsolete files since it had been > =A0moved to sticky.7 > > =A0Submitted by: maxim and pluknet > > =A0With help from: =A0 =A0 =A0 dim (because of awkward merge conflicts) > > Modified: > =A0stable/8/ObsoleteFiles.inc =A0 (contents, props changed) > Directory Properties: > =A0stable/8/ =A0 (props changed) Eh, it seems you merged r238821 to stable/8, and that's wrong. Changes to top-level files should be merged directly to that file rather than to the root of the whole tree (see rule 12). `svn diff -c 232606' gives me: Index: ObsoleteFiles.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- ObsoleteFiles.inc (revision 232605) +++ ObsoleteFiles.inc (revision 232606) @@ -19,6 +19,8 @@ OLD_FILES+=3Dusr/share/man/man9/cc.9.gz # 20101123: removed subblock.h from liblzma OLD_FILES+=3Dusr/include/lzma/subblock.h +# 20110224: sticky.8 -> sticky.7 +OLD_FILES+=3Dusr/share/man/man8/sticky.8.gz # 20101114: Remove long-obsolete MAKEDEV.8 OLD_FILES+=3Dusr/share/man/man8/MAKEDEV.8.gz # 20101112: vgonel(9) has gone to private API a while ago Property changes on: ObsoleteFiles.inc ___________________________________________________________________ Modified: svn:mergeinfo Merged /head/ObsoleteFiles.inc:r219005 Property changes on: . ___________________________________________________________________ Modified: svn:mergeinfo Merged /head:r219005 --=20 wbr, pluknet From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 14:38:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCCBB106564A; Tue, 6 Mar 2012 14:38:49 +0000 (UTC) (envelope-from remko@elvandar.org) Received: from mailout.jr-hosting.nl (mailout.jr-hosting.nl [IPv6:2a01:4f8:141:5ffd::1:25]) by mx1.freebsd.org (Postfix) with ESMTP id 51E588FC12; Tue, 6 Mar 2012 14:38:49 +0000 (UTC) Received: from mailgate.jr-hosting.nl (unknown [IPv6:2a01:4f8:141:5061::25]) by mailout.jr-hosting.nl (Postfix) with ESMTP id B61093902868; Tue, 6 Mar 2012 14:38:48 +0000 (UTC) Received: from www.jr-hosting.nl (mail.jr-hosting.nl [78.47.69.234]) by mailgate.jr-hosting.nl (Postfix) with ESMTPSA id 0E9A43F44F; Tue, 6 Mar 2012 15:38:47 +0100 (CET) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 06 Mar 2012 15:38:47 +0100 From: Remko Lodder To: Sergey Kandaurov In-Reply-To: References: <201203061410.q26EAvav043586@svn.freebsd.org> Message-ID: <56c9876464416184673b0ea9b41f025e@evilcoder.org> X-Sender: remko@elvandar.org User-Agent: Roundcube Webmail/0.7.1 Cc: svn-src-stable@freebsd.org, Remko Lodder , src-committers@freebsd.org, svn-src-stable-8@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r232606 - stable/8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 14:38:49 -0000 On 06.03.2012 15:29, Sergey Kandaurov wrote: > > Eh, it seems you merged r238821 to stable/8, and that's wrong. > Changes to top-level files should be merged directly to that file > rather than to the root of the whole tree (see rule 12). > Point received and taken. I'll look after that the next time. How do I clean this up on the root? -- /"\ Best regards, | remko@FreeBSD.org \ / Remko Lodder | remko@EFnet X http://www.evilcoder.org/ | / \ ASCII Ribbon Campaign | Against HTML Mail and News From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 15:02:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 779691065676; Tue, 6 Mar 2012 15:02:19 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 65D968FC13; Tue, 6 Mar 2012 15:02:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26F2JtD045481; Tue, 6 Mar 2012 15:02:19 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26F2JHM045479; Tue, 6 Mar 2012 15:02:19 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201203061502.q26F2JHM045479@svn.freebsd.org> From: Sean Bruno Date: Tue, 6 Mar 2012 15:02:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232610 - stable/7/sys/dev/mpt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 15:02:19 -0000 Author: sbruno Date: Tue Mar 6 15:02:18 2012 New Revision: 232610 URL: http://svn.freebsd.org/changeset/base/232610 Log: MFC r232411 Fix a problem that was causing the mpt(4) driver to attach to MegaRAID cards that should be handled by the mfi(4) driver. The root of the problem is that the mpt(4) driver was masking off the bottom bit of the PCI device ID when deciding which cards to attach to. It appears that a number of the mpt(4) Fibre Channel cards had a LAN variant whose PCI device ID was just one bit off from the FC card's device ID. The FC cards were even and the LAN cards were odd. The problem was that this pattern wasn't carried over on the SAS and parallel SCSI mpt(4) cards. Luckily the SAS and parallel SCSI PCI device IDs were either even numbers, or they would get masked to a supported adjacent PCI device ID, and everything worked well. Now LSI is using some of the odd-numbered PCI device IDs between the 3Gb SAS device IDs for their new MegaRAID cards. This is causing the mpt(4) driver to attach to the RAID cards instead of the mfi(4) driver. The solution is to stop masking off the bottom bit of the device ID, and explicitly list the PCI device IDs of all supported cards. This change should be a no-op for mpt(4) hardware. The only intended functional change is that for the 929X, the is_fc variable gets set. It wasn't being set previously, but needs to be because the 929X is a Fibre Channel card. Reported by: Kashyap Desai Modified: stable/7/sys/dev/mpt/mpt_pci.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/mpt/mpt_pci.c ============================================================================== --- stable/7/sys/dev/mpt/mpt_pci.c Tue Mar 6 14:19:36 2012 (r232609) +++ stable/7/sys/dev/mpt/mpt_pci.c Tue Mar 6 15:02:18 2012 (r232610) @@ -129,18 +129,34 @@ __FBSDID("$FreeBSD$"); #define PCI_PRODUCT_LSI_FC919 0x0624 #endif +#ifndef PCI_PRODUCT_LSI_FC919_LAN +#define PCI_PRODUCT_LSI_FC919_LAN 0x0625 +#endif + #ifndef PCI_PRODUCT_LSI_FC929 #define PCI_PRODUCT_LSI_FC929 0x0622 #endif +#ifndef PCI_PRODUCT_LSI_FC929_LAN +#define PCI_PRODUCT_LSI_FC929_LAN 0x0623 +#endif + #ifndef PCI_PRODUCT_LSI_FC929X #define PCI_PRODUCT_LSI_FC929X 0x0626 #endif +#ifndef PCI_PRODUCT_LSI_FC929X_LAN +#define PCI_PRODUCT_LSI_FC929X_LAN 0x0627 +#endif + #ifndef PCI_PRODUCT_LSI_FC919X #define PCI_PRODUCT_LSI_FC919X 0x0628 #endif +#ifndef PCI_PRODUCT_LSI_FC919X_LAN +#define PCI_PRODUCT_LSI_FC919X_LAN 0x0629 +#endif + #ifndef PCI_PRODUCT_LSI_FC7X04X #define PCI_PRODUCT_LSI_FC7X04X 0x0640 #endif @@ -153,6 +169,10 @@ __FBSDID("$FreeBSD$"); #define PCI_PRODUCT_LSI_1030 0x0030 #endif +#ifndef PCI_PRODUCT_LSI_1030ZC +#define PCI_PRODUCT_LSI_1030ZC 0x0031 +#endif + #ifndef PCI_PRODUCT_LSI_SAS1064 #define PCI_PRODUCT_LSI_SAS1064 0x0050 #endif @@ -177,6 +197,10 @@ __FBSDID("$FreeBSD$"); #define PCI_PRODUCT_LSI_SAS1068 0x0054 #endif +#ifndef PCI_PRODUCT_LSI_SAS1068A +#define PCI_PRODUCT_LSI_SAS1068A 0x0055 +#endif + #ifndef PCI_PRODUCT_LSI_SAS1068E #define PCI_PRODUCT_LSI_SAS1068E 0x0058 #endif @@ -232,7 +256,7 @@ mpt_pci_probe(device_t dev) return (ENXIO); } - switch ((pci_get_device(dev) & ~1)) { + switch (pci_get_device(dev)) { case PCI_PRODUCT_LSI_FC909: desc = "LSILogic FC909 FC Adapter"; break; @@ -242,15 +266,27 @@ mpt_pci_probe(device_t dev) case PCI_PRODUCT_LSI_FC919: desc = "LSILogic FC919 FC Adapter"; break; + case PCI_PRODUCT_LSI_FC919_LAN: + desc = "LSILogic FC919 LAN Adapter"; + break; case PCI_PRODUCT_LSI_FC929: desc = "Dual LSILogic FC929 FC Adapter"; break; + case PCI_PRODUCT_LSI_FC929_LAN: + desc = "Dual LSILogic FC929 LAN Adapter"; + break; case PCI_PRODUCT_LSI_FC919X: desc = "LSILogic FC919 FC PCI-X Adapter"; break; + case PCI_PRODUCT_LSI_FC919X_LAN: + desc = "LSILogic FC919 LAN PCI-X Adapter"; + break; case PCI_PRODUCT_LSI_FC929X: desc = "Dual LSILogic FC929X 2Gb/s FC PCI-X Adapter"; break; + case PCI_PRODUCT_LSI_FC929X_LAN: + desc = "Dual LSILogic FC929X LAN PCI-X Adapter"; + break; case PCI_PRODUCT_LSI_FC646: desc = "Dual LSILogic FC7X04X 4Gb/s FC PCI-Express Adapter"; break; @@ -258,6 +294,7 @@ mpt_pci_probe(device_t dev) desc = "Dual LSILogic FC7X04X 4Gb/s FC PCI-X Adapter"; break; case PCI_PRODUCT_LSI_1030: + case PCI_PRODUCT_LSI_1030ZC: desc = "LSILogic 1030 Ultra4 Adapter"; break; case PCI_PRODUCT_LSI_SAS1064: @@ -266,6 +303,7 @@ mpt_pci_probe(device_t dev) case PCI_PRODUCT_LSI_SAS1066: case PCI_PRODUCT_LSI_SAS1066E: case PCI_PRODUCT_LSI_SAS1068: + case PCI_PRODUCT_LSI_SAS1068A: case PCI_PRODUCT_LSI_SAS1068E: case PCI_PRODUCT_LSI_SAS1078: case PCI_PRODUCT_LSI_SAS1078DE: @@ -428,12 +466,17 @@ mpt_pci_attach(device_t dev) return (ENOMEM); } memset(mpt, 0, sizeof(struct mpt_softc)); - switch ((pci_get_device(dev) & ~1)) { + switch (pci_get_device(dev)) { case PCI_PRODUCT_LSI_FC909: case PCI_PRODUCT_LSI_FC909A: case PCI_PRODUCT_LSI_FC919: + case PCI_PRODUCT_LSI_FC919_LAN: case PCI_PRODUCT_LSI_FC929: + case PCI_PRODUCT_LSI_FC929_LAN: + case PCI_PRODUCT_LSI_FC929X: + case PCI_PRODUCT_LSI_FC929X_LAN: case PCI_PRODUCT_LSI_FC919X: + case PCI_PRODUCT_LSI_FC919X_LAN: case PCI_PRODUCT_LSI_FC646: case PCI_PRODUCT_LSI_FC7X04X: mpt->is_fc = 1; @@ -448,6 +491,7 @@ mpt_pci_attach(device_t dev) case PCI_PRODUCT_LSI_SAS1066: case PCI_PRODUCT_LSI_SAS1066E: case PCI_PRODUCT_LSI_SAS1068: + case PCI_PRODUCT_LSI_SAS1068A: case PCI_PRODUCT_LSI_SAS1068E: mpt->is_sas = 1; break; @@ -499,11 +543,17 @@ mpt_pci_attach(device_t dev) * Is this part a dual? * If so, link with our partner (around yet) */ - if ((pci_get_device(dev) & ~1) == PCI_PRODUCT_LSI_FC929 || - (pci_get_device(dev) & ~1) == PCI_PRODUCT_LSI_FC646 || - (pci_get_device(dev) & ~1) == PCI_PRODUCT_LSI_FC7X04X || - (pci_get_device(dev) & ~1) == PCI_PRODUCT_LSI_1030) { + switch (pci_get_device(dev)) { + case PCI_PRODUCT_LSI_FC929: + case PCI_PRODUCT_LSI_FC929_LAN: + case PCI_PRODUCT_LSI_FC646: + case PCI_PRODUCT_LSI_FC7X04X: + case PCI_PRODUCT_LSI_1030: + case PCI_PRODUCT_LSI_1030ZC: mpt_link_peer(mpt); + break; + default: + break; } /* From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 15:39:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DFDEB106567E; Tue, 6 Mar 2012 15:39:55 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id B752D8FC16; Tue, 6 Mar 2012 15:39:55 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 707E846B55; Tue, 6 Mar 2012 10:39:55 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id CB8F2B90E; Tue, 6 Mar 2012 10:39:54 -0500 (EST) From: John Baldwin To: Dimitry Andric Date: Tue, 6 Mar 2012 08:35:16 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <201203051953.q25JrIS1002269@svn.freebsd.org> <4F55F652.2040908@FreeBSD.org> In-Reply-To: <4F55F652.2040908@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201203060835.16865.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 06 Mar 2012 10:39:54 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232570 - head/sys/boot/i386/boot2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 15:39:56 -0000 On Tuesday, March 06, 2012 6:34:42 am Dimitry Andric wrote: > On 2012-03-05 20:53, John Baldwin wrote: > > Author: jhb > > Date: Mon Mar 5 19:53:17 2012 > > New Revision: 232570 > > URL: http://svn.freebsd.org/changeset/base/232570 > > > > Log: > > Fix boot2 to handle boot config files that only contain a custom path to > > a loader or kernel. Specifically, kname cannot be pointed at cmd[] since > > it's value is change to be an empty string after the initial call to > > parse, and cmd[]'s value can be changed (thus losing a prior setting for > > kname) due to user input at the boot prompt. While here, ensure that that > > initial boot config file text is nul-terminated, that ops is initialized > > to zero, and that kname is always initialized to a valid string. > > Sigh, this broke building boot2 with clang again... :( I only put back 1 of the memcpy's instead of 3 to try to make it as small as possible. :( The problem is the last round of changes to shrink it broke functionality. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 17:17:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 246C9106566C; Tue, 6 Mar 2012 17:17:04 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1474E8FC22; Tue, 6 Mar 2012 17:17:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26HH3al049799; Tue, 6 Mar 2012 17:17:03 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26HH3SK049797; Tue, 6 Mar 2012 17:17:03 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201203061717.q26HH3SK049797@svn.freebsd.org> From: "George V. Neville-Neil" Date: Tue, 6 Mar 2012 17:17:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232612 - head/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 17:17:04 -0000 Author: gnn Date: Tue Mar 6 17:17:03 2012 New Revision: 232612 URL: http://svn.freebsd.org/changeset/base/232612 Log: Properly mask off bits that are not supported in the IAP counters. This fixes a bug where users would see massively large counts, near to 2**64 -1, due to the bits not being cleared. MFC after: 3 weeks Modified: head/sys/dev/hwpmc/hwpmc_core.c Modified: head/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_core.c Tue Mar 6 15:05:59 2012 (r232611) +++ head/sys/dev/hwpmc/hwpmc_core.c Tue Mar 6 17:17:03 2012 (r232612) @@ -2021,7 +2021,7 @@ iap_read_pmc(int cpu, int ri, pmc_value_ if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) *v = iap_perfctr_value_to_reload_count(tmp); else - *v = tmp; + *v = tmp & ((1ULL << core_iap_width) - 1); PMCDBG(MDP,REA,1, "iap-read cpu=%d ri=%d msr=0x%x -> v=%jx", cpu, ri, ri, *v); From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 18:39:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 63CAD106566C; Tue, 6 Mar 2012 18:39:09 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 543628FC1A; Tue, 6 Mar 2012 18:39:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26Id8mB052424; Tue, 6 Mar 2012 18:39:08 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26Id8ge052422; Tue, 6 Mar 2012 18:39:08 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201203061839.q26Id8ge052422@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 6 Mar 2012 18:39:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232613 - head/usr.sbin/jls X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 18:39:09 -0000 Author: bz Date: Tue Mar 6 18:39:07 2012 New Revision: 232613 URL: http://svn.freebsd.org/changeset/base/232613 Log: Fix building with WITHOUT_INET_SUPPORT set. Reviewed by: jamie (actually provided the real fix) MFC after: 3 days Modified: head/usr.sbin/jls/jls.c Modified: head/usr.sbin/jls/jls.c ============================================================================== --- head/usr.sbin/jls/jls.c Tue Mar 6 17:17:03 2012 (r232612) +++ head/usr.sbin/jls/jls.c Tue Mar 6 18:39:07 2012 (r232613) @@ -403,11 +403,13 @@ print_jail(int pflags, int jflags) #ifdef INET (!ip4_ok || params[1].jp_valuelen == 0) ? "-" : inet_ntoa(*(struct in_addr *)params[1].jp_value), + (char *)params[2-!ip4_ok].jp_value, + (char *)params[3-!ip4_ok].jp_value); #else "-", + (char *)params[1].jp_value, + (char *)params[2].jp_value); #endif - (char *)params[2-!ip4_ok].jp_value, - (char *)params[3-!ip4_ok].jp_value); else { param_values = alloca(nparams * sizeof(*param_values)); for (i = 0; i < nparams; i++) { From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 18:44:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3239F106568A; Tue, 6 Mar 2012 18:44:53 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F0C28FC20; Tue, 6 Mar 2012 18:44:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26IirMV052665; Tue, 6 Mar 2012 18:44:53 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26IiqZL052653; Tue, 6 Mar 2012 18:44:52 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201203061844.q26IiqZL052653@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 6 Mar 2012 18:44:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232614 - in head: share/man/man4 sys/amd64/conf sys/boot/forth sys/conf sys/dev/wbwd sys/i386/conf sys/modules sys/modules/wbwd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 18:44:53 -0000 Author: bz Date: Tue Mar 6 18:44:52 2012 New Revision: 232614 URL: http://svn.freebsd.org/changeset/base/232614 Log: Provide wbwd(4), a driver for the watchdog timer found on various Winbond Super I/O chips. With minor efforts it should be possible the extend the driver to support further chips/revisions available from Winbond. In the simplest case only new IDs need to be added, while different chipsets might require their own function to enter extended function mode, etc. Sponsored by: Sandvine Incorporated ULC (in 2011) Reviewed by: emaste, brueffer MFC after: 2 weeks Added: head/share/man/man4/wbwd.4 (contents, props changed) head/sys/dev/wbwd/ head/sys/dev/wbwd/wbwd.c (contents, props changed) head/sys/modules/wbwd/ head/sys/modules/wbwd/Makefile (contents, props changed) Modified: head/sys/amd64/conf/GENERIC.hints head/sys/amd64/conf/NOTES head/sys/boot/forth/loader.conf head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/i386/conf/GENERIC.hints head/sys/i386/conf/NOTES head/sys/modules/Makefile Added: head/share/man/man4/wbwd.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/wbwd.4 Tue Mar 6 18:44:52 2012 (r232614) @@ -0,0 +1,117 @@ +.\"- +.\" Copyright (c) 2012 Bjoern A. Zeeb +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE 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 LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd March 6, 2012 +.Dt wbwd 4 +.Os +.Sh NAME +.Nm wbwd +.Nd device driver for watchdog timer found on Winbond Super I/O chips +.Sh SYNOPSIS +To compile this driver into the kernel, place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device wbwd" +.Ed +.Pp +Alternatively, to load the driver as a module at boot time, place the following +line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +wbwd_load="YES" +.Ed +.Pp +In +.Pa /boot/device.hints : +.Cd hint.wbwd.0.at="isa" +.Sh DESCRIPTION +The +.Nm +driver provides +.Xr watchdog 4 +support for the watchdog interrupt timer present on at least the following +Winbond Super I/O chips: +.Pp +.Bl -bullet -compact +.It +83627HF/F/HG/G Rev. G +.It +83627HF/F/HG/G Rev. J +.It +83627HF/F/HG/G Rev. UD-A +.It +83627DHG IC ver. 5 +.El +.Sh SYSCTL VARIABLES +The +.Nm +driver provides the following options as +.Xr sysctl 8 +variables. +.Bl -tag -width "xxxxxx" +.It Va dev.wbwd.0.timeout_override +This variable allows to program the timer to a value independent on the one +provided by the +.Xr watchdog 4 +framework while still relying on the regular updates from e.g. +.Xr watchdogd 8 . +This is particularly useful if your system provides multiple watchdogs and +you want them to fire in a special sequence to trigger an NMI after a shorter +period than the reset timeout for example. +The value set must not be lower than the sleep time of +.Xr watchdogd 8 . +A value of 0 disables this feature and the timeout value provided by +.Xr watchdog 4 +will be used. +.It Va dev.wbwd.0.debug_verbose +If set this sysctl will tell the driver to log its current state before and +after the timer reset on each invocation from +.Xr watchdog 9 +to the kernel message buffer for debugging. +.It Va dev.wbwd.0.debug +This read-only value gives the state of some registers on last update. +.El +.Pp +The +.Nm +driver also provides further sysctl options that are hidden by default. +See the source code for more information. +.Sh SEE ALSO +.Xr watchdog 4 , +.Xr device.hints 5 , +.Xr watchdog 8 , +.Xr watchdogd 8 , +.Xr watchdog 9 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 10.0 . +.Sh AUTHORS +.An -nosplit +This manual page was written by +.An Bjoern A. Zeeb Aq bz@FreeBSD.org . Modified: head/sys/amd64/conf/GENERIC.hints ============================================================================== --- head/sys/amd64/conf/GENERIC.hints Tue Mar 6 18:39:07 2012 (r232613) +++ head/sys/amd64/conf/GENERIC.hints Tue Mar 6 18:44:52 2012 (r232614) @@ -30,3 +30,4 @@ hint.atrtc.0.irq="8" hint.attimer.0.at="isa" hint.attimer.0.port="0x40" hint.attimer.0.irq="0" +hint.wbwd.0.at="isa" Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Tue Mar 6 18:39:07 2012 (r232613) +++ head/sys/amd64/conf/NOTES Tue Mar 6 18:44:52 2012 (r232614) @@ -465,10 +465,12 @@ device tpm # ichwd: Intel ICH watchdog timer # amdsbwd: AMD SB7xx watchdog timer # viawd: VIA south bridge watchdog timer +# wbwd: Winbond watchdog timer # device ichwd device amdsbwd device viawd +device wbwd # # Temperature sensors: Modified: head/sys/boot/forth/loader.conf ============================================================================== --- head/sys/boot/forth/loader.conf Tue Mar 6 18:39:07 2012 (r232613) +++ head/sys/boot/forth/loader.conf Tue Mar 6 18:44:52 2012 (r232614) @@ -488,6 +488,7 @@ vpd_load="NO" # Vital Product Data ker vpo_load="NO" # Parallel to SCSI interface driver amdtemp_load="NO" # AMD K8/K10/K11 temperature monitor tpm_load="NO" # Trusted Platform Module +wbwd_load="NO" # Winbond watchdog ############################################################## ### ACPI settings ########################################## Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Tue Mar 6 18:39:07 2012 (r232613) +++ head/sys/conf/files.amd64 Tue Mar 6 18:44:52 2012 (r232614) @@ -270,6 +270,7 @@ dev/tpm/tpm_acpi.c optional tpm acpi dev/tpm/tpm_isa.c optional tpm isa dev/uart/uart_cpu_amd64.c optional uart dev/viawd/viawd.c optional viawd +dev/wbwd/wbwd.c optional wbwd dev/wpi/if_wpi.c optional wpi dev/isci/isci.c optional isci dev/isci/isci_controller.c optional isci Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Tue Mar 6 18:39:07 2012 (r232613) +++ head/sys/conf/files.i386 Tue Mar 6 18:44:52 2012 (r232614) @@ -247,6 +247,7 @@ dev/uart/uart_cpu_i386.c optional uart dev/viawd/viawd.c optional viawd dev/acpica/acpi_if.m standard dev/acpi_support/acpi_wmi_if.m standard +dev/wbwd/wbwd.c optional wbwd dev/wpi/if_wpi.c optional wpi dev/isci/isci.c optional isci dev/isci/isci_controller.c optional isci Added: head/sys/dev/wbwd/wbwd.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/wbwd/wbwd.c Tue Mar 6 18:44:52 2012 (r232614) @@ -0,0 +1,721 @@ +/*- + * Copyright (c) 2011 Sandvine Incorporated ULC. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE 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 LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ +/* + * Support for Winbond watchdog. + * + * With minor abstractions it might be possible to add support for other + * different Winbond Super I/O chips as well. Winbond seems to have four + * different types of chips, four different ways to get into extended config + * mode. + * + * Note: there is no serialization between the debugging sysctl handlers and + * the watchdog functions and possibly others poking the registers at the same + * time. For that at least possibly interfering sysctls are hidden by default. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +/* + * Global registers. + */ +#define WB_DEVICE_ID_REG 0x20 /* Device ID */ +#define WB_DEVICE_REV_REG 0x21 /* Device revision */ +#define WB_CR26 0x26 /* Bit6: HEFRAS (base port selector) */ + +/* LDN selection. */ +#define WB_LDN_REG 0x07 +#define WB_LDN_REG_LDN8 0x08 /* GPIO 2, Watchdog */ + +/* + * LDN8 (GPIO 2, Watchdog) specific registers and options. + */ +/* CR30: LDN8 activation control. */ +#define WB_LDN8_CR30 0x30 +#define WB_LDN8_CR30_ACTIVE 0x01 /* 1: LD active */ + +/* CRF5: Watchdog scale, P20. Mapped to reg_1. */ +#define WB_LDN8_CRF5 0xF5 +#define WB_LDN8_CRF5_SCALE 0x08 /* 0: 1s, 1: 60s */ +#define WB_LDN8_CRF5_KEYB_P20 0x04 /* 1: keyb P20 forces timeout */ + +/* CRF6: Watchdog Timeout (0 == off). Mapped to reg_timeout. */ +#define WB_LDN8_CRF6 0xF6 + +/* CRF7: Watchdog mouse, keyb, force, .. Mapped to reg_2. */ +#define WB_LDN8_CRF7 0xF7 +#define WB_LDN8_CRF7_MOUSE 0x80 /* 1: mouse irq resets wd timer */ +#define WB_LDN8_CRF7_KEYB 0x40 /* 1: keyb irq resets wd timer */ +#define WB_LDN8_CRF7_FORCE 0x20 /* 1: force timeout (self-clear) */ +#define WB_LDN8_CRF7_TS 0x10 /* 0: counting, 1: fired */ +#define WB_LDN8_CRF7_IRQS 0x0f /* irq source for watchdog, 2 == SMI */ +#define WB_LDN8_CRF7_CLEAR_MASK \ + (WB_LDN8_CRF7_MOUSE|WB_LDN8_CRF7_KEYB|WB_LDN8_CRF7_TS|WB_LDN8_CRF7_IRQS) + +#define write_efir_1(sc, value) \ + bus_space_write_1((sc)->bst, (sc)->bsh, 0, (value)) +#define read_efir_1(sc) \ + bus_space_read_1((sc)->bst, (sc)->bsh, 0) +#define write_efdr_1(sc, value) \ + bus_space_write_1((sc)->bst, (sc)->bsh, 1, (value)) +#define read_efdr_1(sc) \ + bus_space_read_1((sc)->bst, (sc)->bsh, 1) + +struct wb_softc { + device_t dev; + struct resource *portres; + bus_space_tag_t bst; + bus_space_handle_t bsh; + int rid; + eventhandler_tag ev_tag; + int (*ext_cfg_enter_f)(struct wb_softc *); + void (*ext_cfg_exit_f)(struct wb_softc *); + int debug_verbose; + + /* + * Special feature to let the watchdog fire at a different + * timeout as set by watchdog(4) but still use that API to + * re-load it periodically. + */ + unsigned int timeout_override; + + /* + * Space to save current state temporary and for sysctls. + * We want to know the timeout value and usually need two + * additional registers for options. Do not name them by + * register as these might be different by chip. + */ + uint8_t reg_timeout; + uint8_t reg_1; + uint8_t reg_2; +}; + +static int ext_cfg_enter_0x87_0x87(struct wb_softc *); +static void ext_cfg_exit_0xaa(struct wb_softc *); + +struct winbond_superio_cfg { + uint8_t efer; /* and efir */ + int (*ext_cfg_enter_f)(struct wb_softc *); + void (*ext_cfg_exit_f)(struct wb_softc *); +} probe_addrs[] = { + { + .efer = 0x2e, + .ext_cfg_enter_f = ext_cfg_enter_0x87_0x87, + .ext_cfg_exit_f = ext_cfg_exit_0xaa, + }, + { + .efer = 0x4e, + .ext_cfg_enter_f = ext_cfg_enter_0x87_0x87, + .ext_cfg_exit_f = ext_cfg_exit_0xaa, + }, +}; + +struct winbond_vendor_device_id { + uint16_t vendor_id; + uint8_t device_id; + uint8_t device_rev; + const char * descr; +} wb_devs[] = { + { + .vendor_id = 0x5ca3, + .device_id = 0x52, + .device_rev = 0x17, + .descr = "Winbond 83627HF/F/HG/G Rev. G", + }, + { + .vendor_id = 0x5ca3, + .device_id = 0x52, + .device_rev = 0x3a, + .descr = "Winbond 83627HF/F/HG/G Rev. J", + }, + { + .vendor_id = 0x5ca3, + .device_id = 0x52, + .device_rev = 0x41, + .descr = "Winbond 83627HF/F/HG/G Rev. UD-A", + }, + { + .vendor_id = 0x5ca3, + .device_id = 0xa0, + .device_rev = 0x25, + .descr = "Winbond 83627DHG IC ver. 5", + }, +}; + +/* + * Return the watchdog related registers as we last read them. This will + * usually not give the current timeout or state on whether the watchdog + * fired. + */ +static int +sysctl_wb_debug(SYSCTL_HANDLER_ARGS) +{ + struct wb_softc *sc; + struct sbuf sb; + int error; + + sc = arg1; + + sbuf_new_for_sysctl(&sb, NULL, 64, req); + + sbuf_printf(&sb, "LDN8 (GPIO2, Watchdog): "); + sbuf_printf(&sb, "CRF5 0x%02x ", sc->reg_1); + sbuf_printf(&sb, "CRF6 0x%02x ", sc->reg_timeout); + sbuf_printf(&sb, "CRF7 0x%02x ", sc->reg_2); + + sbuf_trim(&sb); + error = sbuf_finish(&sb); + sbuf_delete(&sb); + return (error); +} + +/* + * Read the current values before returning them. Given this might poke + * the registers the same time as the watchdog, this sysctl handler should + * be marked CTLFLAG_SKIP to not show up by default. + */ +static int +sysctl_wb_debug_current(SYSCTL_HANDLER_ARGS) +{ + struct wb_softc *sc; + + sc = arg1; + + /* + * Enter extended function mode in case someone else has been + * poking on the registers. We will not leave it though. + */ + if ((*sc->ext_cfg_enter_f)(sc) != 0) + return (ENXIO); + + /* Watchdog is configured as part of LDN 8 (GPIO Port2, Watchdog). */ + write_efir_1(sc, WB_LDN_REG); + write_efdr_1(sc, WB_LDN_REG_LDN8); + + write_efir_1(sc, WB_LDN8_CRF5); + sc->reg_1 = read_efdr_1(sc); + write_efir_1(sc, WB_LDN8_CRF6); + sc->reg_timeout = read_efdr_1(sc); + write_efir_1(sc, WB_LDN8_CRF7); + sc->reg_2 = read_efdr_1(sc); + + return (sysctl_wb_debug(oidp, arg1, arg2, req)); +} + +/* + * Sysctl handlers to force a watchdog timeout or to test the NMI functionality + * works as expetced. + * For testing we could set a test_nmi flag in the softc that, in case of NMI, a + * callback function from trap.c could check whether we fired and not report the + * timeout but clear the flag for the sysctl again. This is interesting given a + * lot of boards have jumpers to change the action on watchdog timeout or + * disable the watchdog completely. + * XXX-BZ notyet: currently no general infrastructure exists to do this. + */ +static int +sysctl_wb_force_test_nmi(SYSCTL_HANDLER_ARGS) +{ + struct wb_softc *sc; + int error, test, val; + + sc = arg1; + test = arg2; + +#ifdef notyet + val = sc->test_nmi; +#else + val = 0; +#endif + error = sysctl_handle_int(oidp, &val, 0, req); + if (error || !req->newptr) + return (error); + +#ifdef notyet + /* Manually clear the test for a value of 0 and do nothing else. */ + if (test && val == 0) { + sc->test_nmi = 0; + return (0); + } +#endif + + /* + * Enter extended function mode in case someone else has been + * poking on the registers. We will not leave it though. + */ + if ((*sc->ext_cfg_enter_f)(sc) != 0) + return (ENXIO); + +#ifdef notyet + /* + * If we are testing the NMI functionality, set the flag before + * forcing the timeout. + */ + if (test) + sc->test_nmi = 1; +#endif + + /* Watchdog is configured as part of LDN 8 (GPIO Port2, Watchdog). */ + write_efir_1(sc, WB_LDN_REG); + write_efdr_1(sc, WB_LDN_REG_LDN8); + + /* Force watchdog to fire. */ + write_efir_1(sc, WB_LDN8_CRF7); + sc->reg_2 = read_efdr_1(sc); + sc->reg_2 |= WB_LDN8_CRF7_FORCE; + + write_efir_1(sc, WB_LDN8_CRF7); + write_efdr_1(sc, sc->reg_2); + + return (0); +} + +/* + * Print current watchdog state. + * + * Note: it is the responsibility of the caller to update the registers + * upfront. + */ +static void +wb_print_state(struct wb_softc *sc, const char *msg) +{ + + device_printf(sc->dev, "%s%sWatchdog %sabled. %s" + "Scaling by %ds, timer at %d (%s=%ds%s). " + "CRF5 0x%02x CRF7 0x%02x\n", + (msg != NULL) ? msg : "", (msg != NULL) ? ": " : "", + (sc->reg_timeout > 0x00) ? "en" : "dis", + (sc->reg_2 & WB_LDN8_CRF7_TS) ? "Watchdog fired. " : "", + (sc->reg_1 & WB_LDN8_CRF5_SCALE) ? 60 : 1, + sc->reg_timeout, + (sc->reg_timeout > 0x00) ? "<" : "", + sc->reg_timeout * ((sc->reg_1 & WB_LDN8_CRF5_SCALE) ? 60 : 1), + (sc->reg_timeout > 0x00) ? " left" : "", + sc->reg_1, sc->reg_2); +} + +/* + * Functions to enter and exit extended function mode. Possibly shared + * between different chips. + */ +static int +ext_cfg_enter_0x87_0x87(struct wb_softc *sc) +{ + + /* + * Enable extended function mode. + * Winbond does not allow us to validate so always return success. + */ + write_efir_1(sc, 0x87); + write_efir_1(sc, 0x87); + + return (0); +} + +static void +ext_cfg_exit_0xaa(struct wb_softc *sc) +{ + + write_efir_1(sc, 0xaa); +} + +/* + * (Re)load the watchdog counter depending on timeout. A timeout of 0 will + * disable the watchdog. + */ +static int +wb_set_watchdog(struct wb_softc *sc, unsigned int timeout) +{ + + if (sc->debug_verbose) + wb_print_state(sc, "Before watchdog counter (re)load"); + + /* + * Enter extended function mode in case someone else has been + * poking on the registers. We will not leave it though. + */ + if ((*sc->ext_cfg_enter_f)(sc) != 0) + return (ENXIO); + + /* Watchdog is configured as part of LDN 8 (GPIO Port2, Watchdog) */ + write_efir_1(sc, WB_LDN_REG); + write_efdr_1(sc, WB_LDN_REG_LDN8); + + /* Disable and validate or arm/reset watchdog. */ + if (timeout == 0) { + /* Disable watchdog. */ + write_efir_1(sc, WB_LDN8_CRF6); + write_efdr_1(sc, 0x00); + + /* Re-check. */ + write_efir_1(sc, WB_LDN8_CRF6); + sc->reg_timeout = read_efdr_1(sc); + + if (sc->reg_timeout != 0x00) { + device_printf(sc->dev, "Failed to disable watchdog: " + "0x%02x.\n", sc->reg_timeout); + return (EIO); + } + + } else { + /* + * In case an override is set, let it override. It may lead + * to strange results as we do not check the input of the sysctl. + */ + if (sc->timeout_override > 0) + timeout = sc->timeout_override; + + /* Make sure we support the requested timeout. */ + if (timeout > 255 * 60) + return (EINVAL); + + /* Read current scaling factor. */ + write_efir_1(sc, WB_LDN8_CRF5); + sc->reg_1 = read_efdr_1(sc); + + if (timeout > 255) { + /* Set scaling factor to 60s. */ + sc->reg_1 |= WB_LDN8_CRF5_SCALE; + sc->reg_timeout = (timeout / 60); + if (timeout % 60) + sc->reg_timeout++; + } else { + /* Set scaling factor to 1s. */ + sc->reg_1 &= ~WB_LDN8_CRF5_SCALE; + sc->reg_timeout = timeout; + } + + /* In case we fired before we need to clear to fire again. */ + write_efir_1(sc, WB_LDN8_CRF7); + sc->reg_2 = read_efdr_1(sc); + if (sc->reg_2 & WB_LDN8_CRF7_TS) { + sc->reg_2 &= ~WB_LDN8_CRF7_TS; + write_efir_1(sc, WB_LDN8_CRF7); + write_efdr_1(sc, sc->reg_2); + } + + /* Write back scaling factor. */ + write_efir_1(sc, WB_LDN8_CRF5); + write_efdr_1(sc, sc->reg_1); + + /* Set timer and arm/reset the watchdog. */ + write_efir_1(sc, WB_LDN8_CRF6); + write_efdr_1(sc, sc->reg_timeout); + } + + if (sc->debug_verbose) + wb_print_state(sc, "After watchdog counter (re)load"); + + return (0); +} + +/* + * watchdog(9) EVENTHANDLER function implementation to (re)load the counter + * with the given timeout or disable the watchdog. + */ +static void +wb_watchdog_fn(void *private, u_int cmd, int *error) +{ + struct wb_softc *sc; + unsigned int timeout; + int e; + + sc = private; + KASSERT(sc != NULL, ("%s: watchdog handler function called without " + "softc.", __func__)); + + cmd &= WD_INTERVAL; + if (cmd > 0 && cmd <= 63) { + /* Reset (and arm) watchdog. */ + timeout = ((uint64_t)1 << cmd) / 1000000000; + if (timeout == 0) + timeout = 1; + e = wb_set_watchdog(sc, timeout); + if (e == 0) { + if (error != NULL) + *error = 0; + } else { + /* On error, try to make sure the WD is disabled. */ + wb_set_watchdog(sc, 0); + } + + } else { + /* Disable watchdog. */ + e = wb_set_watchdog(sc, 0); + if (e != 0 && cmd == 0 && error != NULL) { + /* Failed to disable watchdog. */ + *error = EOPNOTSUPP; + } + } +} + +/* + * Probe/attach the Winbond Super I/O chip. + * + * Initial abstraction to possibly support more chips: + * - Iterate over the well known base ports, try to enable extended function + * mode and read and match the device ID and device revision. Unfortunately + * the Vendor ID is in the hardware monitoring section accessible by different + * base ports only. + * - Also HEFRAS, which would tell use the base port, is only accessible after + * entering extended function mode, for which the base port is needed. + * At least check HEFRAS to match the current base port we are probing. + * - On match set the description, remember functions to enter/exit extended + * function mode as well as the base port. + */ +static int +wb_probe_enable(device_t dev, int probe) +{ + struct wb_softc *sc; + int error, found, i, j; + uint8_t dev_id, dev_rev, cr26; + + sc = device_get_softc(dev); + bzero(sc, sizeof(*sc)); + sc->dev = dev; + + error = ENXIO; + for (i = 0; i < sizeof(probe_addrs) / sizeof(*probe_addrs); i++) { + + /* Allocate bus resources for IO index/data register access. */ + sc->portres = bus_alloc_resource(dev, SYS_RES_IOPORT, &sc->rid, + probe_addrs[i].efer, probe_addrs[i].efer + 1, 2, RF_ACTIVE); + if (sc->portres == NULL) + continue; + sc->bst = rman_get_bustag(sc->portres); + sc->bsh = rman_get_bushandle(sc->portres); + + found = 0; + error = (*probe_addrs[i].ext_cfg_enter_f)(sc); + if (error != 0) + goto cleanup; + + /* Identify the SuperIO chip. */ + write_efir_1(sc, WB_DEVICE_ID_REG); + dev_id = read_efdr_1(sc); + write_efir_1(sc, WB_DEVICE_REV_REG); + dev_rev = read_efdr_1(sc); + write_efir_1(sc, WB_CR26); + cr26 = read_efdr_1(sc); + + /* HEFRAS of 0 means EFER at 0x2e, 1 means EFER at 0x4e. */ + if (((cr26 & 0x40) == 0x00 && probe_addrs[i].efer != 0x2e) || + ((cr26 & 0x40) == 0x40 && probe_addrs[i].efer != 0x4e)) { + device_printf(dev, "HEFRAS and EFER do not align: EFER " + "0x%02x DevID 0x%02x DevRev 0x%02x CR26 0x%02x\n", + probe_addrs[i].efer, dev_id, dev_rev, cr26); + goto cleanup; + } + + for (j = 0; j < sizeof(wb_devs) / sizeof(*wb_devs); j++) { + if (wb_devs[j].device_id == dev_id && + wb_devs[j].device_rev == dev_rev) { + if (probe) + device_set_desc(dev, wb_devs[j].descr); + found++; + break; + } + } + if (probe && found && bootverbose) + device_printf(dev, "%s EFER 0x%02x ID 0x%02x Rev 0x%02x" + " CR26 0x%02x (probing)\n", device_get_desc(dev), + probe_addrs[i].efer, dev_id, dev_rev, cr26); +cleanup: + if (probe || !found) { + (*probe_addrs[i].ext_cfg_exit_f)(sc); + + (void) bus_release_resource(dev, SYS_RES_IOPORT, sc->rid, + sc->portres); + } + + /* + * Stop probing if have successfully identified the SuperIO. + * Remember the extended function mode enter/exit functions + * for operations. + */ + if (found) { + sc->ext_cfg_enter_f = probe_addrs[i].ext_cfg_enter_f; + sc->ext_cfg_exit_f = probe_addrs[i].ext_cfg_exit_f; + error = BUS_PROBE_DEFAULT; + break; + } else + error = ENXIO; + } + + return (error); +} + +static int +wb_probe(device_t dev) +{ + + /* Make sure we do not claim some ISA PNP device. */ + if (isa_get_logicalid(dev) != 0) + return (ENXIO); + + return (wb_probe_enable(dev, 1)); +} + +static int +wb_attach(device_t dev) +{ + struct wb_softc *sc; + struct sysctl_ctx_list *sctx; + struct sysctl_oid *soid; + unsigned long timeout; + int error; + + error = wb_probe_enable(dev, 0); + if (error > 0) + return (ENXIO); + + sc = device_get_softc(dev); + KASSERT(sc->ext_cfg_enter_f != NULL && sc->ext_cfg_exit_f != NULL, + ("%s: successfull probe result but not setup correctly", __func__)); + + /* Watchdog is configured as part of LDN 8 (GPIO Port2, Watchdog). */ + write_efir_1(sc, WB_LDN_REG); + write_efdr_1(sc, WB_LDN_REG_LDN8); + + /* Make sure LDN8 is enabled (Do we need to? Also affects GPIO). */ + write_efir_1(sc, WB_LDN8_CR30); + write_efdr_1(sc, WB_LDN8_CR30_ACTIVE); + + /* Read the current watchdog configuration. */ + write_efir_1(sc, WB_LDN8_CRF5); + sc->reg_1 = read_efdr_1(sc); + write_efir_1(sc, WB_LDN8_CRF6); + sc->reg_timeout = read_efdr_1(sc); + write_efir_1(sc, WB_LDN8_CRF7); + sc->reg_2 = read_efdr_1(sc); + + /* Print current state if bootverbose or watchdog already enabled. */ + if (bootverbose || (sc->reg_timeout > 0x00)) + wb_print_state(sc, "Before watchdog attach"); + + /* + * Clear a previous watchdog timeout event (if (still) set). + * Disable all all interrupt reset sources (defaults). + */ + sc->reg_1 &= ~(WB_LDN8_CRF5_KEYB_P20); + write_efir_1(sc, WB_LDN8_CRF5); + write_efir_1(sc, sc->reg_1); + + sc->reg_2 &= ~WB_LDN8_CRF7_CLEAR_MASK; + write_efir_1(sc, WB_LDN8_CRF7); + write_efdr_1(sc, sc->reg_2); + + /* Read global timeout override tunable, Add per device sysctls. */ + if (TUNABLE_ULONG_FETCH("hw.wbwd.timeout_override", &timeout)) { + if (timeout > 0) + sc->timeout_override = timeout; + } + sctx = device_get_sysctl_ctx(dev); + soid = device_get_sysctl_tree(dev); + SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, + "timeout_override", CTLFLAG_RW, &sc->timeout_override, 0, + "Timeout in seconds overriding default watchdog timeout"); + SYSCTL_ADD_INT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, + "debug_verbose", CTLFLAG_RW, &sc->debug_verbose, 0, + "Enables extra debugging information"); + SYSCTL_ADD_PROC(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "debug", + CTLTYPE_STRING|CTLFLAG_RD, sc, 0, sysctl_wb_debug, "A", + "Selected register information from last change by driver"); + SYSCTL_ADD_PROC(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "debug_current", + CTLTYPE_STRING|CTLFLAG_RD|CTLFLAG_SKIP, sc, 0, + sysctl_wb_debug_current, "A", + "Selected register information (may interfere)"); + SYSCTL_ADD_PROC(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "force_timeout", + CTLTYPE_INT|CTLFLAG_RW|CTLFLAG_SKIP, sc, 0, + sysctl_wb_force_test_nmi, "I", "Enable to force watchdog to fire."); + + /* Register watchdog. */ + sc->ev_tag = EVENTHANDLER_REGISTER(watchdog_list, wb_watchdog_fn, sc, + 0); + + if (bootverbose) + wb_print_state(sc, "After watchdog attach"); + + return (0); +} + +static int +wb_detach(device_t dev) +{ + struct wb_softc *sc; + + sc = device_get_softc(dev); + + /* Unregister and stop the watchdog if running. */ + if (sc->ev_tag) + EVENTHANDLER_DEREGISTER(watchdog_list, sc->ev_tag); + wb_set_watchdog(sc, 0); + + /* Disable extended function mode. */ + (*sc->ext_cfg_exit_f)(sc); + + /* Cleanup resources. */ + (void) bus_release_resource(dev, SYS_RES_IOPORT, sc->rid, sc->portres); + + /* Bus subroutines take care of sysctls already. */ + + return (0); +} + +static device_method_t wb_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, wb_probe), + DEVMETHOD(device_attach, wb_attach), + DEVMETHOD(device_detach, wb_detach), + + { 0, 0 } +}; + +static driver_t wb_isa_driver = { + "wbwd", + wb_methods, + sizeof(struct wb_softc) +}; + +static devclass_t wb_devclass; + +DRIVER_MODULE(wb, isa, wb_isa_driver, wb_devclass, NULL, NULL); Modified: head/sys/i386/conf/GENERIC.hints ============================================================================== --- head/sys/i386/conf/GENERIC.hints Tue Mar 6 18:39:07 2012 (r232613) +++ head/sys/i386/conf/GENERIC.hints Tue Mar 6 18:44:52 2012 (r232614) @@ -38,3 +38,4 @@ hint.atrtc.0.irq="8" hint.attimer.0.at="isa" hint.attimer.0.port="0x40" hint.attimer.0.irq="0" +hint.wbwd.0.at="isa" Modified: head/sys/i386/conf/NOTES ============================================================================== --- head/sys/i386/conf/NOTES Tue Mar 6 18:39:07 2012 (r232613) +++ head/sys/i386/conf/NOTES Tue Mar 6 18:44:52 2012 (r232614) @@ -838,10 +838,12 @@ hint.pcf.0.irq="5" # ichwd: Intel ICH watchdog timer # amdsbwd: AMD SB7xx watchdog timer # viawd: VIA south bridge watchdog timer +# wbwd: Winbond watchdog timer # device ichwd device amdsbwd device viawd +device wbwd # # Temperature sensors: Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Tue Mar 6 18:39:07 2012 (r232613) +++ head/sys/modules/Makefile Tue Mar 6 18:44:52 2012 (r232614) @@ -333,6 +333,7 @@ SUBDIR= ${_3dfx} \ vx \ ${_vxge} \ wb \ + ${_wbwd} \ ${_wi} \ wlan \ wlan_acl \ @@ -510,6 +511,7 @@ _stg= stg _streams= streams _svr4= svr4 _vxge= vxge +_wbwd= wbwd _wi= wi _xe= xe .if ${MK_ZFS} != "no" || defined(ALL_MODULES) @@ -704,6 +706,7 @@ _viawd= viawd _virtio= virtio _vxge= vxge _x86bios= x86bios +_wbwd= wbwd _wi= wi _wpi= wpi .if ${MK_SOURCELESS_UCODE} != "no" Added: head/sys/modules/wbwd/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/wbwd/Makefile Tue Mar 6 18:44:52 2012 (r232614) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../dev/wbwd + +KMOD= wbwd +SRCS= wbwd.c +SRCS+= bus_if.h device_if.h isa_if.h + +.include From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 18:51:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 03FAD1065676; Tue, 6 Mar 2012 18:51:25 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 86D0A8FC14; Tue, 6 Mar 2012 18:51:24 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 783BE25D385D; Tue, 6 Mar 2012 18:51:23 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id A085CBDCD4D; Tue, 6 Mar 2012 18:51:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id VvFtRC2gyNHj; Tue, 6 Mar 2012 18:51:21 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id A34CDBDCD4A; Tue, 6 Mar 2012 18:51:21 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201203061844.q26IiqZL052653@svn.freebsd.org> Date: Tue, 6 Mar 2012 18:51:20 +0000 Content-Transfer-Encoding: 7bit Message-Id: <3EB76A03-948B-407B-B8AE-AB25B035D620@FreeBSD.org> References: <201203061844.q26IiqZL052653@svn.freebsd.org> To: src-committers@freebsd.org X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r232614 - in head: share/man/man4 sys/amd64/conf sys/boot/forth sys/conf sys/dev/wbwd sys/i386/conf sys/modules sys/modules/wbwd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 18:51:25 -0000 On 6. Mar 2012, at 18:44 , Bjoern A. Zeeb wrote: > Author: bz > Date: Tue Mar 6 18:44:52 2012 > New Revision: 232614 > URL: http://svn.freebsd.org/changeset/base/232614 > > Log: > Provide wbwd(4), a driver for the watchdog timer found on various > Winbond Super I/O chips. The supported chips can be found on a variety of motherboards. I have especially seen it on SuperMicro. Some of these (like X8DT3) provide a jumper to set whether the watchdog would trigger an NMI or a reset (or be disabled). Some others only distinguish between disabled and reset. It's been tested on at least SM X7SPA-HF, H8QM8 and X8DT3 etc. /bz -- Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 19:01:33 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDE5F106566B; Tue, 6 Mar 2012 19:01:33 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC9298FC14; Tue, 6 Mar 2012 19:01:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26J1XeI053313; Tue, 6 Mar 2012 19:01:33 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26J1XF9053302; Tue, 6 Mar 2012 19:01:33 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203061901.q26J1XF9053302@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Mar 2012 19:01:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232615 - in head/sys/mips: include mips sibyte X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 19:01:33 -0000 Author: jmallett Date: Tue Mar 6 19:01:32 2012 New Revision: 232615 URL: http://svn.freebsd.org/changeset/base/232615 Log: At the risk of reducing source compatibility with old NetBSD and Sprite: o) Get rid of some unused macros related to features we don't intend to provide. o) Get rid of macro definitions for MIPS-I CPUs. We are not likely to support anything that predartes MIPS-III. o) Respell MIPS3_* macros as MIPS_*, which is how most of them were being used already. o) Eliminate a duplicate and mostly-unused set of exception vector macros. There's still considerable duplication and lots more obsolete in our headers, but this reduces one of the larger files to a size where one could reckon about the correctness of its contents with a mere few hours of contemplation. There is, of course, a question of whether we need definitions for fields, registers and configurations that we are unlikely to ever use or implement, even if they're not obsolete since 1991. FreeBSD is not a processor reference manual, and things that aren't used may be wrong, or may be duplicated because nobody could possibly actually know whether they're already defined. Modified: head/sys/mips/include/asm.h head/sys/mips/include/cpuregs.h head/sys/mips/include/locore.h head/sys/mips/mips/cpu.c head/sys/mips/mips/exception.S head/sys/mips/mips/locore.S head/sys/mips/mips/machdep.c head/sys/mips/mips/support.S head/sys/mips/mips/trap.c head/sys/mips/sibyte/sb_machdep.c Modified: head/sys/mips/include/asm.h ============================================================================== --- head/sys/mips/include/asm.h Tue Mar 6 18:44:52 2012 (r232614) +++ head/sys/mips/include/asm.h Tue Mar 6 19:01:32 2012 (r232615) @@ -765,29 +765,6 @@ _C_LABEL(x): : /* no outputs */ \ : "r" (data), "i" (spr), "i" (sel)); /* inputs */ -/* - * The DYNAMIC_STATUS_MASK option adds an additional masking operation - * when updating the hardware interrupt mask in the status register. - * - * This is useful for platforms that need to at run-time mask - * interrupts based on motherboard configuration or to handle - * slowly clearing interrupts. - * - * XXX this is only currently implemented for mips3. - */ -#ifdef MIPS_DYNAMIC_STATUS_MASK -#define DYNAMIC_STATUS_MASK(sr,scratch) \ - lw scratch, mips_dynamic_status_mask; \ - and sr, sr, scratch - -#define DYNAMIC_STATUS_MASK_TOUSER(sr,scratch1) \ - ori sr, (MIPS_INT_MASK | MIPS_SR_INT_IE); \ - DYNAMIC_STATUS_MASK(sr,scratch1) -#else -#define DYNAMIC_STATUS_MASK(sr,scratch) -#define DYNAMIC_STATUS_MASK_TOUSER(sr,scratch1) -#endif - #define GET_CPU_PCPU(reg) \ PTR_L reg, _C_LABEL(pcpup); Modified: head/sys/mips/include/cpuregs.h ============================================================================== --- head/sys/mips/include/cpuregs.h Tue Mar 6 18:44:52 2012 (r232614) +++ head/sys/mips/include/cpuregs.h Tue Mar 6 19:01:32 2012 (r232615) @@ -229,8 +229,7 @@ */ #define MIPS_CR_BR_DELAY 0x80000000 #define MIPS_CR_COP_ERR 0x30000000 -#define MIPS1_CR_EXC_CODE 0x0000003C /* four bits */ -#define MIPS3_CR_EXC_CODE 0x0000007C /* five bits */ +#define MIPS_CR_EXC_CODE 0x0000007C /* five bits */ #define MIPS_CR_IP 0x0000FF00 #define MIPS_CR_EXC_CODE_SHIFT 2 #define MIPS_CR_COP_ERR_SHIFT 28 @@ -268,94 +267,31 @@ #define MIPS_SR_INT_MASK 0x0000ff00 /* - * The R2000/R3000-specific status register bit definitions. - * all bits are active when set to 1. - * - * MIPS_SR_PARITY_ERR Parity error. - * MIPS_SR_CACHE_MISS Most recent D-cache load resulted in a miss. - * MIPS_SR_PARITY_ZERO Zero replaces outgoing parity bits. - * MIPS_SR_SWAP_CACHES Swap I-cache and D-cache. - * MIPS_SR_ISOL_CACHES Isolate D-cache from main memory. - * Interrupt enable bits defined below. - * MIPS_SR_KU_OLD Old kernel/user mode bit. 1 => user mode. - * MIPS_SR_INT_ENA_OLD Old interrupt enable bit. - * MIPS_SR_KU_PREV Previous kernel/user mode bit. 1 => user mode. - * MIPS_SR_INT_ENA_PREV Previous interrupt enable bit. - * MIPS_SR_KU_CUR Current kernel/user mode bit. 1 => user mode. - */ - -#define MIPS1_PARITY_ERR 0x00100000 -#define MIPS1_CACHE_MISS 0x00080000 -#define MIPS1_PARITY_ZERO 0x00040000 -#define MIPS1_SWAP_CACHES 0x00020000 -#define MIPS1_ISOL_CACHES 0x00010000 - -#define MIPS1_SR_KU_OLD 0x00000020 /* 2nd stacked KU/IE*/ -#define MIPS1_SR_INT_ENA_OLD 0x00000010 /* 2nd stacked KU/IE*/ -#define MIPS1_SR_KU_PREV 0x00000008 /* 1st stacked KU/IE*/ -#define MIPS1_SR_INT_ENA_PREV 0x00000004 /* 1st stacked KU/IE*/ -#define MIPS1_SR_KU_CUR 0x00000002 /* current KU */ - -/* backwards compatibility */ -#define MIPS_SR_PARITY_ERR MIPS1_PARITY_ERR -#define MIPS_SR_CACHE_MISS MIPS1_CACHE_MISS -#define MIPS_SR_PARITY_ZERO MIPS1_PARITY_ZERO -#define MIPS_SR_SWAP_CACHES MIPS1_SWAP_CACHES -#define MIPS_SR_ISOL_CACHES MIPS1_ISOL_CACHES - -#define MIPS_SR_KU_OLD MIPS1_SR_KU_OLD -#define MIPS_SR_INT_ENA_OLD MIPS1_SR_INT_ENA_OLD -#define MIPS_SR_KU_PREV MIPS1_SR_KU_PREV -#define MIPS_SR_KU_CUR MIPS1_SR_KU_CUR -#define MIPS_SR_INT_ENA_PREV MIPS1_SR_INT_ENA_PREV - -/* * R4000 status register bit definitons, * where different from r2000/r3000. */ -#define MIPS3_SR_XX 0x80000000 -#define MIPS3_SR_RP 0x08000000 -#define MIPS3_SR_FR 0x04000000 -#define MIPS3_SR_RE 0x02000000 - -#define MIPS3_SR_DIAG_DL 0x01000000 /* QED 52xx */ -#define MIPS3_SR_DIAG_IL 0x00800000 /* QED 52xx */ -#define MIPS3_SR_SR 0x00100000 -#define MIPS3_SR_NMI 0x00080000 /* MIPS32/64 */ -#define MIPS3_SR_DIAG_CH 0x00040000 -#define MIPS3_SR_DIAG_CE 0x00020000 -#define MIPS3_SR_DIAG_PE 0x00010000 -#define MIPS3_SR_EIE 0x00010000 /* TX79/R5900 */ -#define MIPS3_SR_KX 0x00000080 -#define MIPS3_SR_SX 0x00000040 -#define MIPS3_SR_UX 0x00000020 -#define MIPS3_SR_KSU_MASK 0x00000018 -#define MIPS3_SR_KSU_USER 0x00000010 -#define MIPS3_SR_KSU_SUPER 0x00000008 -#define MIPS3_SR_KSU_KERNEL 0x00000000 -#define MIPS3_SR_ERL 0x00000004 -#define MIPS3_SR_EXL 0x00000002 - -#ifdef MIPS3_5900 -#undef MIPS_SR_INT_IE -#define MIPS_SR_INT_IE 0x00010001 /* XXX */ -#endif - -#define MIPS_SR_SOFT_RESET MIPS3_SR_SR -#define MIPS_SR_DIAG_CH MIPS3_SR_DIAG_CH -#define MIPS_SR_DIAG_CE MIPS3_SR_DIAG_CE -#define MIPS_SR_DIAG_PE MIPS3_SR_DIAG_PE -#define MIPS_SR_KX MIPS3_SR_KX -#define MIPS_SR_SX MIPS3_SR_SX -#define MIPS_SR_UX MIPS3_SR_UX - -#define MIPS_SR_KSU_MASK MIPS3_SR_KSU_MASK -#define MIPS_SR_KSU_USER MIPS3_SR_KSU_USER -#define MIPS_SR_KSU_SUPER MIPS3_SR_KSU_SUPER -#define MIPS_SR_KSU_KERNEL MIPS3_SR_KSU_KERNEL -#define MIPS_SR_ERL MIPS3_SR_ERL -#define MIPS_SR_EXL MIPS3_SR_EXL - +#define MIPS_SR_XX 0x80000000 +#define MIPS_SR_RP 0x08000000 +#define MIPS_SR_FR 0x04000000 +#define MIPS_SR_RE 0x02000000 + +#define MIPS_SR_DIAG_DL 0x01000000 /* QED 52xx */ +#define MIPS_SR_DIAG_IL 0x00800000 /* QED 52xx */ +#define MIPS_SR_SR 0x00100000 +#define MIPS_SR_NMI 0x00080000 /* MIPS32/64 */ +#define MIPS_SR_DIAG_CH 0x00040000 +#define MIPS_SR_DIAG_CE 0x00020000 +#define MIPS_SR_DIAG_PE 0x00010000 +#define MIPS_SR_EIE 0x00010000 /* TX79/R5900 */ +#define MIPS_SR_KX 0x00000080 +#define MIPS_SR_SX 0x00000040 +#define MIPS_SR_UX 0x00000020 +#define MIPS_SR_KSU_MASK 0x00000018 +#define MIPS_SR_KSU_USER 0x00000010 +#define MIPS_SR_KSU_SUPER 0x00000008 +#define MIPS_SR_KSU_KERNEL 0x00000000 +#define MIPS_SR_ERL 0x00000004 +#define MIPS_SR_EXL 0x00000002 /* * The interrupt masks. @@ -373,149 +309,87 @@ #define MIPS_SOFT_INT_MASK_0 0x0100 /* - * mips3 CPUs have on-chip timer at INT_MASK_5. Each platform can - * choose to enable this interrupt. - */ -#if defined(MIPS3_ENABLE_CLOCK_INTR) -#define MIPS3_INT_MASK MIPS_INT_MASK -#define MIPS3_HARD_INT_MASK MIPS_HARD_INT_MASK -#else -#define MIPS3_INT_MASK (MIPS_INT_MASK & ~MIPS_INT_MASK_5) -#define MIPS3_HARD_INT_MASK (MIPS_HARD_INT_MASK & ~MIPS_INT_MASK_5) -#endif - -/* - * The bits in the context register. - */ -#define MIPS1_CNTXT_PTE_BASE 0xFFE00000 -#define MIPS1_CNTXT_BAD_VPN 0x001FFFFC - -#define MIPS3_CNTXT_PTE_BASE 0xFF800000 -#define MIPS3_CNTXT_BAD_VPN2 0x007FFFF0 - -/* - * Location of MIPS32 exception vectors. Most are multiplexed in - * the sense that further decoding is necessary (e.g. reading the - * CAUSE register or NMI bits in STATUS). - * Most interrupts go via the - * The INT vector is dedicated for hardware interrupts; it is - * only referenced if the IV bit in CAUSE is set to 1. - */ -#define MIPS_VEC_RESET 0xBFC00000 /* Hard, soft, or NMI */ -#define MIPS_VEC_EJTAG 0xBFC00480 -#define MIPS_VEC_TLB 0x80000000 -#define MIPS_VEC_XTLB 0x80000080 -#define MIPS_VEC_CACHE 0x80000100 -#define MIPS_VEC_GENERIC 0x80000180 /* Most exceptions */ -#define MIPS_VEC_INTERRUPT 0x80000200 - -/* * The bits in the MIPS3 config register. * * bit 0..5: R/W, Bit 6..31: R/O */ /* kseg0 coherency algorithm - see MIPS3_TLB_ATTR values */ -#define MIPS3_CONFIG_K0_MASK 0x00000007 +#define MIPS_CONFIG_K0_MASK 0x00000007 /* * R/W Update on Store Conditional * 0: Store Conditional uses coherency algorithm specified by TLB * 1: Store Conditional uses cacheable coherent update on write */ -#define MIPS3_CONFIG_CU 0x00000008 +#define MIPS_CONFIG_CU 0x00000008 -#define MIPS3_CONFIG_DB 0x00000010 /* Primary D-cache line size */ -#define MIPS3_CONFIG_IB 0x00000020 /* Primary I-cache line size */ -#define MIPS3_CONFIG_CACHE_L1_LSIZE(config, bit) \ +#define MIPS_CONFIG_DB 0x00000010 /* Primary D-cache line size */ +#define MIPS_CONFIG_IB 0x00000020 /* Primary I-cache line size */ +#define MIPS_CONFIG_CACHE_L1_LSIZE(config, bit) \ (((config) & (bit)) ? 32 : 16) -#define MIPS3_CONFIG_DC_MASK 0x000001c0 /* Primary D-cache size */ -#define MIPS3_CONFIG_DC_SHIFT 6 -#define MIPS3_CONFIG_IC_MASK 0x00000e00 /* Primary I-cache size */ -#define MIPS3_CONFIG_IC_SHIFT 9 -#define MIPS3_CONFIG_C_DEFBASE 0x1000 /* default base 2^12 */ +#define MIPS_CONFIG_DC_MASK 0x000001c0 /* Primary D-cache size */ +#define MIPS_CONFIG_DC_SHIFT 6 +#define MIPS_CONFIG_IC_MASK 0x00000e00 /* Primary I-cache size */ +#define MIPS_CONFIG_IC_SHIFT 9 +#define MIPS_CONFIG_C_DEFBASE 0x1000 /* default base 2^12 */ /* Cache size mode indication: available only on Vr41xx CPUs */ -#define MIPS3_CONFIG_CS 0x00001000 -#define MIPS3_CONFIG_C_4100BASE 0x0400 /* base is 2^10 if CS=1 */ -#define MIPS3_CONFIG_CACHE_SIZE(config, mask, base, shift) \ +#define MIPS_CONFIG_CS 0x00001000 +#define MIPS_CONFIG_C_4100BASE 0x0400 /* base is 2^10 if CS=1 */ +#define MIPS_CONFIG_CACHE_SIZE(config, mask, base, shift) \ ((base) << (((config) & (mask)) >> (shift))) /* External cache enable: Controls L2 for R5000/Rm527x and L3 for Rm7000 */ -#define MIPS3_CONFIG_SE 0x00001000 +#define MIPS_CONFIG_SE 0x00001000 /* Block ordering: 0: sequential, 1: sub-block */ -#define MIPS3_CONFIG_EB 0x00002000 +#define MIPS_CONFIG_EB 0x00002000 /* ECC mode - 0: ECC mode, 1: parity mode */ -#define MIPS3_CONFIG_EM 0x00004000 +#define MIPS_CONFIG_EM 0x00004000 /* BigEndianMem - 0: kernel and memory are little endian, 1: big endian */ -#define MIPS3_CONFIG_BE 0x00008000 +#define MIPS_CONFIG_BE 0x00008000 /* Dirty Shared coherency state - 0: enabled, 1: disabled */ -#define MIPS3_CONFIG_SM 0x00010000 +#define MIPS_CONFIG_SM 0x00010000 /* Secondary Cache - 0: present, 1: not present */ -#define MIPS3_CONFIG_SC 0x00020000 +#define MIPS_CONFIG_SC 0x00020000 /* System Port width - 0: 64-bit, 1: 32-bit (QED RM523x), 2,3: reserved */ -#define MIPS3_CONFIG_EW_MASK 0x000c0000 -#define MIPS3_CONFIG_EW_SHIFT 18 +#define MIPS_CONFIG_EW_MASK 0x000c0000 +#define MIPS_CONFIG_EW_SHIFT 18 /* Secondary Cache port width - 0: 128-bit data path to S-cache, 1: reserved */ -#define MIPS3_CONFIG_SW 0x00100000 +#define MIPS_CONFIG_SW 0x00100000 /* Split Secondary Cache Mode - 0: I/D mixed, 1: I/D separated by SCAddr(17) */ -#define MIPS3_CONFIG_SS 0x00200000 +#define MIPS_CONFIG_SS 0x00200000 /* Secondary Cache line size */ -#define MIPS3_CONFIG_SB_MASK 0x00c00000 -#define MIPS3_CONFIG_SB_SHIFT 22 -#define MIPS3_CONFIG_CACHE_L2_LSIZE(config) \ - (0x10 << (((config) & MIPS3_CONFIG_SB_MASK) >> MIPS3_CONFIG_SB_SHIFT)) +#define MIPS_CONFIG_SB_MASK 0x00c00000 +#define MIPS_CONFIG_SB_SHIFT 22 +#define MIPS_CONFIG_CACHE_L2_LSIZE(config) \ + (0x10 << (((config) & MIPS_CONFIG_SB_MASK) >> MIPS_CONFIG_SB_SHIFT)) /* Write back data rate */ -#define MIPS3_CONFIG_EP_MASK 0x0f000000 -#define MIPS3_CONFIG_EP_SHIFT 24 +#define MIPS_CONFIG_EP_MASK 0x0f000000 +#define MIPS_CONFIG_EP_SHIFT 24 /* System clock ratio - this value is CPU dependent */ -#define MIPS3_CONFIG_EC_MASK 0x70000000 -#define MIPS3_CONFIG_EC_SHIFT 28 +#define MIPS_CONFIG_EC_MASK 0x70000000 +#define MIPS_CONFIG_EC_SHIFT 28 /* Master-Checker Mode - 1: enabled */ -#define MIPS3_CONFIG_CM 0x80000000 +#define MIPS_CONFIG_CM 0x80000000 /* * The bits in the MIPS4 config register. */ -/* kseg0 coherency algorithm - see MIPS3_TLB_ATTR values */ -#define MIPS4_CONFIG_K0_MASK MIPS3_CONFIG_K0_MASK -#define MIPS4_CONFIG_DN_MASK 0x00000018 /* Device number */ -#define MIPS4_CONFIG_CT 0x00000020 /* CohPrcReqTar */ -#define MIPS4_CONFIG_PE 0x00000040 /* PreElmReq */ -#define MIPS4_CONFIG_PM_MASK 0x00000180 /* PreReqMax */ -#define MIPS4_CONFIG_EC_MASK 0x00001e00 /* SysClkDiv */ -#define MIPS4_CONFIG_SB 0x00002000 /* SCBlkSize */ -#define MIPS4_CONFIG_SK 0x00004000 /* SCColEn */ -#define MIPS4_CONFIG_BE 0x00008000 /* MemEnd */ -#define MIPS4_CONFIG_SS_MASK 0x00070000 /* SCSize */ -#define MIPS4_CONFIG_SC_MASK 0x00380000 /* SCClkDiv */ -#define MIPS4_CONFIG_RESERVED 0x03c00000 /* Reserved wired 0 */ -#define MIPS4_CONFIG_DC_MASK 0x1c000000 /* Primary D-Cache size */ -#define MIPS4_CONFIG_IC_MASK 0xe0000000 /* Primary I-Cache size */ - -#define MIPS4_CONFIG_DC_SHIFT 26 -#define MIPS4_CONFIG_IC_SHIFT 29 - -#define MIPS4_CONFIG_CACHE_SIZE(config, mask, base, shift) \ - ((base) << (((config) & (mask)) >> (shift))) - -#define MIPS4_CONFIG_CACHE_L2_LSIZE(config) \ - (((config) & MIPS4_CONFIG_SB) ? 128 : 64) - /* * Location of exception vectors. * @@ -525,27 +399,16 @@ #define MIPS_UTLB_MISS_EXC_VEC ((intptr_t)(int32_t)0x80000000) /* - * MIPS-1 general exception vector (everything else) - */ -#define MIPS1_GEN_EXC_VEC ((intptr_t)(int32_t)0x80000080) - -/* * MIPS-III exception vectors */ -#define MIPS3_XTLB_MISS_EXC_VEC ((intptr_t)(int32_t)0x80000080) -#define MIPS3_CACHE_ERR_EXC_VEC ((intptr_t)(int32_t)0x80000100) -#define MIPS3_GEN_EXC_VEC ((intptr_t)(int32_t)0x80000180) - -/* - * TX79 (R5900) exception vectors - */ -#define MIPS_R5900_COUNTER_EXC_VEC 0x80000080 -#define MIPS_R5900_DEBUG_EXC_VEC 0x80000100 +#define MIPS_XTLB_MISS_EXC_VEC ((intptr_t)(int32_t)0x80000080) +#define MIPS_CACHE_ERR_EXC_VEC ((intptr_t)(int32_t)0x80000100) +#define MIPS_GEN_EXC_VEC ((intptr_t)(int32_t)0x80000180) /* * MIPS32/MIPS64 (and some MIPS3) dedicated interrupt vector. */ -#define MIPS3_INTR_EXC_VEC 0x80000200 +#define MIPS_INTR_EXC_VEC 0x80000200 /* * Coprocessor 0 registers: @@ -712,7 +575,7 @@ */ #define MIPS_MIN_CACHE_SIZE (16 * 1024) #define MIPS_MAX_CACHE_SIZE (256 * 1024) -#define MIPS3_MAX_PCACHE_SIZE (32 * 1024) /* max. primary cache size */ +#define MIPS_MAX_PCACHE_SIZE (32 * 1024) /* max. primary cache size */ /* * The floating point version and status registers. @@ -749,8 +612,7 @@ #define MIPS_FPU_EXCEPTION_UNIMPL 0x00020000 #define MIPS_FPU_COND_BIT 0x00800000 #define MIPS_FPU_FLUSH_BIT 0x01000000 /* r4k, MBZ on r3k */ -#define MIPS1_FPC_MBZ_BITS 0xff7c0000 -#define MIPS3_FPC_MBZ_BITS 0xfe7c0000 +#define MIPS_FPC_MBZ_BITS 0xfe7c0000 /* @@ -759,235 +621,4 @@ #define MIPS_OPCODE_SHIFT 26 #define MIPS_OPCODE_C1 0x11 - -/* - * The low part of the TLB entry. - */ -#define MIPS1_TLB_PFN 0xfffff000 -#define MIPS1_TLB_NON_CACHEABLE_BIT 0x00000800 -#define MIPS1_TLB_DIRTY_BIT 0x00000400 -#define MIPS1_TLB_VALID_BIT 0x00000200 -#define MIPS1_TLB_GLOBAL_BIT 0x00000100 - -#define MIPS3_TLB_PFN 0x3fffffc0 -#define MIPS3_TLB_ATTR_MASK 0x00000038 -#define MIPS3_TLB_ATTR_SHIFT 3 -#define MIPS3_TLB_DIRTY_BIT 0x00000004 -#define MIPS3_TLB_VALID_BIT 0x00000002 -#define MIPS3_TLB_GLOBAL_BIT 0x00000001 - -#define MIPS1_TLB_PHYS_PAGE_SHIFT 12 -#define MIPS3_TLB_PHYS_PAGE_SHIFT 6 -#define MIPS1_TLB_PF_NUM MIPS1_TLB_PFN -#define MIPS3_TLB_PF_NUM MIPS3_TLB_PFN -#define MIPS1_TLB_MOD_BIT MIPS1_TLB_DIRTY_BIT -#define MIPS3_TLB_MOD_BIT MIPS3_TLB_DIRTY_BIT - -/* - * MIPS3_TLB_ATTR values - coherency algorithm: - * 0: cacheable, noncoherent, write-through, no write allocate - * 1: cacheable, noncoherent, write-through, write allocate - * 2: uncached - * 3: cacheable, noncoherent, write-back (noncoherent) - * 4: cacheable, coherent, write-back, exclusive (exclusive) - * 5: cacheable, coherent, write-back, exclusive on write (sharable) - * 6: cacheable, coherent, write-back, update on write (update) - * 7: uncached, accelerated (gather STORE operations) - */ -#define MIPS3_TLB_ATTR_WT 0 /* IDT */ -#define MIPS3_TLB_ATTR_WT_WRITEALLOCATE 1 /* IDT */ -#define MIPS3_TLB_ATTR_UNCACHED 2 /* R4000/R4400, IDT */ -#define MIPS3_TLB_ATTR_WB_NONCOHERENT 3 /* R4000/R4400, IDT */ -#define MIPS3_TLB_ATTR_WB_EXCLUSIVE 4 /* R4000/R4400 */ -#define MIPS3_TLB_ATTR_WB_SHARABLE 5 /* R4000/R4400 */ -#define MIPS3_TLB_ATTR_WB_UPDATE 6 /* R4000/R4400 */ -#define MIPS4_TLB_ATTR_UNCACHED_ACCELERATED 7 /* R10000 */ - - -/* - * The high part of the TLB entry. - */ -#define MIPS1_TLB_VPN 0xfffff000 -#define MIPS1_TLB_PID 0x00000fc0 -#define MIPS1_TLB_PID_SHIFT 6 - -#define MIPS3_TLB_VPN2 0xffffe000 -#define MIPS3_TLB_ASID 0x000000ff - -#define MIPS1_TLB_VIRT_PAGE_NUM MIPS1_TLB_VPN -#define MIPS3_TLB_VIRT_PAGE_NUM MIPS3_TLB_VPN2 -#define MIPS3_TLB_PID MIPS3_TLB_ASID -#define MIPS_TLB_VIRT_PAGE_SHIFT 12 - -/* - * r3000: shift count to put the index in the right spot. - */ -#define MIPS1_TLB_INDEX_SHIFT 8 - -/* - * The first TLB that write random hits. - */ -#define MIPS1_TLB_FIRST_RAND_ENTRY 8 -#define MIPS3_TLB_WIRED_UPAGES 1 - -/* - * The number of process id entries. - */ -#define MIPS1_TLB_NUM_PIDS 64 -#define MIPS3_TLB_NUM_ASIDS 256 - -/* - * Patch codes to hide CPU design differences between MIPS1 and MIPS3. - */ - -/* XXX simonb: this is before MIPS3_PLUS is defined (and is ugly!) */ - -#if !(defined(MIPS3) || defined(MIPS4) || defined(MIPS32) || defined(MIPS64)) \ - && defined(MIPS1) /* XXX simonb must be neater! */ -#define MIPS_TLB_PID_SHIFT MIPS1_TLB_PID_SHIFT -#define MIPS_TLB_NUM_PIDS MIPS1_TLB_NUM_PIDS -#endif - -#if (defined(MIPS3) || defined(MIPS4) || defined(MIPS32) || defined(MIPS64)) \ - && !defined(MIPS1) /* XXX simonb must be neater! */ -#define MIPS_TLB_PID_SHIFT 0 -#define MIPS_TLB_NUM_PIDS MIPS3_TLB_NUM_ASIDS -#endif - - -#if !defined(MIPS_TLB_PID_SHIFT) -#define MIPS_TLB_PID_SHIFT \ - ((MIPS_HAS_R4K_MMU) ? 0 : MIPS1_TLB_PID_SHIFT) - -#define MIPS_TLB_NUM_PIDS \ - ((MIPS_HAS_R4K_MMU) ? MIPS3_TLB_NUM_ASIDS : MIPS1_TLB_NUM_PIDS) -#endif - -/* - * CPU processor revision IDs for company ID == 0 (non mips32/64 chips) - */ -#define MIPS_R2000 0x01 /* MIPS R2000 ISA I */ -#define MIPS_R3000 0x02 /* MIPS R3000 ISA I */ -#define MIPS_R6000 0x03 /* MIPS R6000 ISA II */ -#define MIPS_R4000 0x04 /* MIPS R4000/R4400 ISA III */ -#define MIPS_R3LSI 0x05 /* LSI Logic R3000 derivative ISA I */ -#define MIPS_R6000A 0x06 /* MIPS R6000A ISA II */ -#define MIPS_R3IDT 0x07 /* IDT R3041 or RC36100 ISA I */ -#define MIPS_R10000 0x09 /* MIPS R10000 ISA IV */ -#define MIPS_R4200 0x0a /* NEC VR4200 ISA III */ -#define MIPS_R4300 0x0b /* NEC VR4300 ISA III */ -#define MIPS_R4100 0x0c /* NEC VR4100 ISA III */ -#define MIPS_R12000 0x0e /* MIPS R12000 ISA IV */ -#define MIPS_R14000 0x0f /* MIPS R14000 ISA IV */ -#define MIPS_R8000 0x10 /* MIPS R8000 Blackbird/TFP ISA IV */ -#define MIPS_RC32300 0x18 /* IDT RC32334,332,355 ISA 32 */ -#define MIPS_R4600 0x20 /* QED R4600 Orion ISA III */ -#define MIPS_R4700 0x21 /* QED R4700 Orion ISA III */ -#define MIPS_R3SONY 0x21 /* Sony R3000 based ISA I */ -#define MIPS_R4650 0x22 /* QED R4650 ISA III */ -#define MIPS_TX3900 0x22 /* Toshiba TX39 family ISA I */ -#define MIPS_R5000 0x23 /* MIPS R5000 ISA IV */ -#define MIPS_R3NKK 0x23 /* NKK R3000 based ISA I */ -#define MIPS_RC32364 0x26 /* IDT RC32364 ISA 32 */ -#define MIPS_RM7000 0x27 /* QED RM7000 ISA IV */ -#define MIPS_RM5200 0x28 /* QED RM5200s ISA IV */ -#define MIPS_TX4900 0x2d /* Toshiba TX49 family ISA III */ -#define MIPS_R5900 0x2e /* Toshiba R5900 (EECore) ISA --- */ -#define MIPS_RC64470 0x30 /* IDT RC64474/RC64475 ISA III */ -#define MIPS_TX7900 0x38 /* Toshiba TX79 ISA III+*/ -#define MIPS_R5400 0x54 /* NEC VR5400 ISA IV */ -#define MIPS_R5500 0x55 /* NEC VR5500 ISA IV */ - -/* - * CPU revision IDs for some prehistoric processors. - */ - -/* For MIPS_R3000 */ -#define MIPS_REV_R3000 0x20 -#define MIPS_REV_R3000A 0x30 - -/* For MIPS_TX3900 */ -#define MIPS_REV_TX3912 0x10 -#define MIPS_REV_TX3922 0x30 -#define MIPS_REV_TX3927 0x40 - -/* For MIPS_R4000 */ -#define MIPS_REV_R4000_A 0x00 -#define MIPS_REV_R4000_B 0x22 -#define MIPS_REV_R4000_C 0x30 -#define MIPS_REV_R4400_A 0x40 -#define MIPS_REV_R4400_B 0x50 -#define MIPS_REV_R4400_C 0x60 - -/* For MIPS_TX4900 */ -#define MIPS_REV_TX4927 0x22 - -/* - * CPU processor revision IDs for company ID == 1 (MIPS) - */ -#define MIPS_4Kc 0x80 /* MIPS 4Kc ISA 32 */ -#define MIPS_5Kc 0x81 /* MIPS 5Kc ISA 64 */ -#define MIPS_20Kc 0x82 /* MIPS 20Kc ISA 64 */ -#define MIPS_4Kmp 0x83 /* MIPS 4Km/4Kp ISA 32 */ -#define MIPS_4KEc 0x84 /* MIPS 4KEc ISA 32 */ -#define MIPS_4KEmp 0x85 /* MIPS 4KEm/4KEp ISA 32 */ -#define MIPS_4KSc 0x86 /* MIPS 4KSc ISA 32 */ -#define MIPS_M4K 0x87 /* MIPS M4K ISA 32 Rel 2 */ -#define MIPS_25Kf 0x88 /* MIPS 25Kf ISA 64 */ -#define MIPS_5KE 0x89 /* MIPS 5KE ISA 64 Rel 2 */ -#define MIPS_4KEc_R2 0x90 /* MIPS 4KEc_R2 ISA 32 Rel 2 */ -#define MIPS_4KEmp_R2 0x91 /* MIPS 4KEm/4KEp_R2 ISA 32 Rel 2 */ -#define MIPS_4KSd 0x92 /* MIPS 4KSd ISA 32 Rel 2 */ -#define MIPS_24K 0x93 /* MIPS 24Kc/24Kf ISA 32 Rel 2 */ -#define MIPS_34K 0x95 /* MIPS 34K ISA 32 R2 MT */ -#define MIPS_24KE 0x96 /* MIPS 24KEc ISA 32 Rel 2 */ -#define MIPS_74K 0x97 /* MIPS 74Kc/74Kf ISA 32 Rel 2 */ - -/* - * AMD (company ID 3) use the processor ID field to donote the CPU core - * revision and the company options field do donate the SOC chip type. - */ - -/* CPU processor revision IDs */ -#define MIPS_AU_REV1 0x01 /* Alchemy Au1000 (Rev 1) ISA 32 */ -#define MIPS_AU_REV2 0x02 /* Alchemy Au1000 (Rev 2) ISA 32 */ - -/* CPU company options IDs */ -#define MIPS_AU1000 0x00 -#define MIPS_AU1500 0x01 -#define MIPS_AU1100 0x02 -#define MIPS_AU1550 0x03 - -/* - * CPU processor revision IDs for company ID == 4 (Broadcom) - */ -#define MIPS_SB1 0x01 /* SiByte SB1 ISA 64 */ - -/* - * CPU processor revision IDs for company ID == 5 (SandCraft) - */ -#define MIPS_SR7100 0x04 /* SandCraft SR7100 ISA 64 */ - -/* - * FPU processor revision ID - */ -#define MIPS_SOFT 0x00 /* Software emulation ISA I */ -#define MIPS_R2360 0x01 /* MIPS R2360 FPC ISA I */ -#define MIPS_R2010 0x02 /* MIPS R2010 FPC ISA I */ -#define MIPS_R3010 0x03 /* MIPS R3010 FPC ISA I */ -#define MIPS_R6010 0x04 /* MIPS R6010 FPC ISA II */ -#define MIPS_R4010 0x05 /* MIPS R4010 FPC ISA II */ -#define MIPS_R31LSI 0x06 /* LSI Logic derivate ISA I */ -#define MIPS_R3TOSH 0x22 /* Toshiba R3000 based FPU ISA I */ - -#ifdef ENABLE_MIPS_TX3900 -#include -#endif -#ifdef MIPS3_5900 -#include -#endif -#ifdef MIPS64_SB1 -#include -#endif - #endif /* _MIPS_CPUREGS_H_ */ Modified: head/sys/mips/include/locore.h ============================================================================== --- head/sys/mips/include/locore.h Tue Mar 6 18:44:52 2012 (r232614) +++ head/sys/mips/include/locore.h Tue Mar 6 19:01:32 2012 (r232615) @@ -34,7 +34,6 @@ /* * CPU identification, from PRID register. */ -typedef int mips_prid_t; #define MIPS_PRID_REV(x) (((x) >> 0) & 0x00ff) #define MIPS_PRID_IMPL(x) (((x) >> 8) & 0x00ff) @@ -62,9 +61,4 @@ typedef int mips_prid_t; #define MIPS_PRID_CID_CAVIUM 0x0d /* Cavium */ #define MIPS_PRID_COPTS(x) (((x) >> 24) & 0x00ff) /* Company Options */ -#ifdef _KERNEL -#ifdef __HAVE_MIPS_MACHDEP_CACHE_CONFIG -void mips_machdep_cache_config(void); -#endif -#endif /* _KERNEL */ #endif /* _MIPS_LOCORE_H */ Modified: head/sys/mips/mips/cpu.c ============================================================================== --- head/sys/mips/mips/cpu.c Tue Mar 6 18:44:52 2012 (r232614) +++ head/sys/mips/mips/cpu.c Tue Mar 6 19:01:32 2012 (r232615) @@ -96,7 +96,7 @@ mips_get_identity(struct mips_cpuinfo *c cpuinfo->icache_virtual = cfg0 & MIPS_CONFIG0_VI; /* If config register selection 1 does not exist, exit. */ - if (!(cfg0 & MIPS3_CONFIG_CM)) + if (!(cfg0 & MIPS_CONFIG_CM)) return; /* Learn TLB size and L1 cache geometry. */ @@ -274,7 +274,7 @@ cpu_identify(void) cfg0 = mips_rd_config(); /* If config register selection 1 does not exist, exit. */ - if (!(cfg0 & MIPS3_CONFIG_CM)) + if (!(cfg0 & MIPS_CONFIG_CM)) return; cfg1 = mips_rd_config1(); @@ -282,7 +282,7 @@ cpu_identify(void) "\20\7COP2\6MDMX\5PerfCount\4WatchRegs\3MIPS16\2EJTAG\1FPU"); /* If config register selection 2 does not exist, exit. */ - if (!(cfg1 & MIPS3_CONFIG_CM)) + if (!(cfg1 & MIPS_CONFIG_CM)) return; cfg2 = mips_rd_config2(); /* @@ -291,7 +291,7 @@ cpu_identify(void) */ /* If config register selection 3 does not exist, exit. */ - if (!(cfg2 & MIPS3_CONFIG_CM)) + if (!(cfg2 & MIPS_CONFIG_CM)) return; cfg3 = mips_rd_config3(); Modified: head/sys/mips/mips/exception.S ============================================================================== --- head/sys/mips/mips/exception.S Tue Mar 6 18:44:52 2012 (r232614) +++ head/sys/mips/mips/exception.S Tue Mar 6 19:01:32 2012 (r232615) @@ -166,7 +166,7 @@ VECTOR(MipsException, unknown) # sneaky but the bits are # with us........ sll k0, k0, 3 # shift user bit for cause index - and k1, k1, MIPS3_CR_EXC_CODE # Mask out the cause bits. + and k1, k1, MIPS_CR_EXC_CODE # Mask out the cause bits. or k1, k1, k0 # change index to user table #if defined(__mips_n64) PTR_SLL k1, k1, 1 # shift to get 8-byte offset @@ -467,7 +467,7 @@ NNON_LEAF(MipsUserGenException, CALLFRAM REG_S a3, CALLFRAME_RA(sp) # for debugging PTR_LA gp, _C_LABEL(_gp) # switch to kernel GP # Turn off fpu and enter kernel mode - and t0, a0, ~(MIPS_SR_COP_1_BIT | MIPS_SR_EXL | MIPS3_SR_KSU_MASK | MIPS_SR_INT_IE) + and t0, a0, ~(MIPS_SR_COP_1_BIT | MIPS_SR_EXL | MIPS_SR_KSU_MASK | MIPS_SR_INT_IE) #if defined(CPU_CNMIPS) and t0, t0, ~(MIPS_SR_COP_2_BIT) or t0, t0, (MIPS_SR_KX | MIPS_SR_SX | MIPS_SR_UX | MIPS_SR_PX) @@ -726,7 +726,7 @@ NNON_LEAF(MipsUserIntr, CALLFRAME_SIZ, r PTR_LA gp, _C_LABEL(_gp) # switch to kernel GP # Turn off fpu, disable interrupts, set kernel mode kernel mode, clear exception level. - and t0, a0, ~(MIPS_SR_COP_1_BIT | MIPS_SR_EXL | MIPS_SR_INT_IE | MIPS3_SR_KSU_MASK) + and t0, a0, ~(MIPS_SR_COP_1_BIT | MIPS_SR_EXL | MIPS_SR_INT_IE | MIPS_SR_KSU_MASK) #ifdef CPU_CNMIPS and t0, t0, ~(MIPS_SR_COP_2_BIT) or t0, t0, (MIPS_SR_KX | MIPS_SR_SX | MIPS_SR_UX | MIPS_SR_PX) Modified: head/sys/mips/mips/locore.S ============================================================================== --- head/sys/mips/mips/locore.S Tue Mar 6 18:44:52 2012 (r232614) +++ head/sys/mips/mips/locore.S Tue Mar 6 19:01:32 2012 (r232615) @@ -98,20 +98,20 @@ VECTOR(_locore, unknown) li t1, (MIPS_SR_COP_0_BIT | MIPS_SR_PX | MIPS_SR_KX | MIPS_SR_UX | MIPS_SR_SX | MIPS_SR_BEV) /* Reset these bits */ - li t0, ~(MIPS_SR_DE | MIPS_SR_SOFT_RESET | MIPS_SR_ERL | MIPS_SR_EXL | MIPS_SR_INT_IE | MIPS_SR_COP_2_BIT) + li t0, ~(MIPS_SR_DE | MIPS_SR_SR | MIPS_SR_ERL | MIPS_SR_EXL | MIPS_SR_INT_IE | MIPS_SR_COP_2_BIT) #elif defined (CPU_RMI) || defined (CPU_NLM) /* Set these bits */ li t1, (MIPS_SR_COP_2_BIT | MIPS_SR_COP_0_BIT | MIPS_SR_KX | MIPS_SR_UX) /* Reset these bits */ - li t0, ~(MIPS_SR_BEV | MIPS_SR_SOFT_RESET | MIPS_SR_INT_IE) + li t0, ~(MIPS_SR_BEV | MIPS_SR_SR | MIPS_SR_INT_IE) #else /* * t0: Bits to preserve if set: * Soft reset * Boot exception vectors (firmware-provided) */ - li t0, (MIPS_SR_BEV | MIPS_SR_SOFT_RESET) + li t0, (MIPS_SR_BEV | MIPS_SR_SR) /* * t1: Bits to set explicitly: * Enable FPU Modified: head/sys/mips/mips/machdep.c ============================================================================== --- head/sys/mips/mips/machdep.c Tue Mar 6 18:44:52 2012 (r232614) +++ head/sys/mips/mips/machdep.c Tue Mar 6 19:01:32 2012 (r232615) @@ -349,14 +349,14 @@ mips_vector_init(void) #if defined(CPU_CNMIPS) || defined(CPU_RMI) || defined(CPU_NLM) /* Fake, but sufficient, for the 32-bit with 64-bit hardware addresses */ - bcopy(MipsTLBMiss, (void *)MIPS3_XTLB_MISS_EXC_VEC, + bcopy(MipsTLBMiss, (void *)MIPS_XTLB_MISS_EXC_VEC, MipsTLBMissEnd - MipsTLBMiss); #endif - bcopy(MipsException, (void *)MIPS3_GEN_EXC_VEC, + bcopy(MipsException, (void *)MIPS_GEN_EXC_VEC, MipsExceptionEnd - MipsException); - bcopy(MipsCache, (void *)MIPS3_CACHE_ERR_EXC_VEC, + bcopy(MipsCache, (void *)MIPS_CACHE_ERR_EXC_VEC, MipsCacheEnd - MipsCache); /* @@ -406,7 +406,7 @@ mips_postboot_fixup(void) void mips_generic_reset() { - ((void(*)(void))(intptr_t)MIPS_VEC_RESET)(); + ((void(*)(void))MIPS_RESET_EXC_VEC)(); } #ifdef SMP Modified: head/sys/mips/mips/support.S ============================================================================== --- head/sys/mips/mips/support.S Tue Mar 6 18:44:52 2012 (r232614) +++ head/sys/mips/mips/support.S Tue Mar 6 19:01:32 2012 (r232615) @@ -793,12 +793,6 @@ LEAF(memset) PTR_ADDU t0, t0, a0 # compute ending address 2: PTR_ADDU a0, a0, 4 # clear words -#ifdef MIPS3_5900 - nop - nop - nop - nop -#endif bne a0, t0, 2b # unrolling loop does not help sw t1, -4(a0) # since we are limited by memory speed @@ -807,12 +801,6 @@ memsetsmallclr: PTR_ADDU t0, a2, a0 # compute ending address 1: PTR_ADDU a0, a0, 1 # clear bytes -#ifdef MIPS3_5900 - nop - nop - nop - nop -#endif bne a0, t0, 1b sb a1, -1(a0) 2: Modified: head/sys/mips/mips/trap.c ============================================================================== --- head/sys/mips/mips/trap.c Tue Mar 6 18:44:52 2012 (r232614) +++ head/sys/mips/mips/trap.c Tue Mar 6 19:01:32 2012 (r232615) @@ -458,7 +458,7 @@ trap(struct trapframe *trapframe) trapdebug_enter(trapframe, 0); - type = (trapframe->cause & MIPS3_CR_EXC_CODE) >> MIPS_CR_EXC_CODE_SHIFT; + type = (trapframe->cause & MIPS_CR_EXC_CODE) >> MIPS_CR_EXC_CODE_SHIFT; if (TRAPF_USERMODE(trapframe)) { type |= T_USER; usermode = 1; @@ -1046,7 +1046,7 @@ trapDump(char *msg) break; printf("%s: ADR %jx PC %jx CR %jx SR %jx\n", - trap_type[(trp->cause & MIPS3_CR_EXC_CODE) >> + trap_type[(trp->cause & MIPS_CR_EXC_CODE) >> MIPS_CR_EXC_CODE_SHIFT], (intmax_t)trp->vadr, (intmax_t)trp->pc, (intmax_t)trp->cause, (intmax_t)trp->status); Modified: head/sys/mips/sibyte/sb_machdep.c ============================================================================== --- head/sys/mips/sibyte/sb_machdep.c Tue Mar 6 18:44:52 2012 (r232614) +++ head/sys/mips/sibyte/sb_machdep.c Tue Mar 6 19:01:32 2012 (r232615) @@ -253,7 +253,7 @@ mips_init(void) * code to the XTLB exception vector. */ { - bcopy(MipsTLBMiss, (void *)MIPS3_XTLB_MISS_EXC_VEC, + bcopy(MipsTLBMiss, (void *)MIPS_XTLB_MISS_EXC_VEC, MipsTLBMissEnd - MipsTLBMiss); mips_icache_sync_all(); @@ -314,7 +314,7 @@ kseg0_map_coherent(void) const int CFG_K0_COHERENT = 5; config = mips_rd_config(); - config &= ~MIPS3_CONFIG_K0_MASK; + config &= ~MIPS_CONFIG_K0_MASK; config |= CFG_K0_COHERENT; mips_wr_config(config); } From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 19:08:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 47CE11065672; Tue, 6 Mar 2012 19:08:04 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from gw01.mail.saunalahti.fi (gw01.mail.saunalahti.fi [195.197.172.115]) by mx1.freebsd.org (Postfix) with ESMTP id 8C0D28FC14; Tue, 6 Mar 2012 19:08:03 +0000 (UTC) Received: from jh (a91-153-115-208.elisa-laajakaista.fi [91.153.115.208]) by gw01.mail.saunalahti.fi (Postfix) with SMTP id EB2F61515FC; Tue, 6 Mar 2012 21:07:48 +0200 (EET) Date: Tue, 6 Mar 2012 21:07:48 +0200 From: Jaakko Heinonen To: Remko Lodder Message-ID: <20120306190748.GB51782@jh> References: <201203061410.q26EAvav043586@svn.freebsd.org> <56c9876464416184673b0ea9b41f025e@evilcoder.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56c9876464416184673b0ea9b41f025e@evilcoder.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: src-committers@freebsd.org, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Sergey Kandaurov , svn-src-stable-8@freebsd.org, Remko Lodder Subject: Re: svn commit: r232606 - stable/8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 19:08:04 -0000 On 2012-03-06, Remko Lodder wrote: > On 06.03.2012 15:29, Sergey Kandaurov wrote: > > > > Eh, it seems you merged r238821 to stable/8, and that's wrong. Actually mergeinfo says r219005. > > Changes to top-level files should be merged directly to that file > > rather than to the root of the whole tree (see rule 12). > > Point received and taken. I'll look after that the next time. How do I > clean this up on the root? In the stable/8 root directory: $ svn merge -c -232606 . $ svn revert ObsoleteFiles.inc $ svn diff Property changes on: . ___________________________________________________________________ Modified: svn:mergeinfo Reverse-merged /head:r219005 -- Jaakko From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 19:19:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3E49E106564A; Tue, 6 Mar 2012 19:19:34 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 152D68FC0A; Tue, 6 Mar 2012 19:19:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26JJX6T053870; Tue, 6 Mar 2012 19:19:33 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26JJX2m053868; Tue, 6 Mar 2012 19:19:33 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201203061919.q26JJX2m053868@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Tue, 6 Mar 2012 19:19:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232616 - head/lib/csu/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 19:19:34 -0000 Author: gonzo Date: Tue Mar 6 19:19:33 2012 New Revision: 232616 URL: http://svn.freebsd.org/changeset/base/232616 Log: - Remove one more no-op #ifndef Modified: head/lib/csu/mips/crt1.c Modified: head/lib/csu/mips/crt1.c ============================================================================== --- head/lib/csu/mips/crt1.c Tue Mar 6 19:01:32 2012 (r232615) +++ head/lib/csu/mips/crt1.c Tue Mar 6 19:19:33 2012 (r232616) @@ -101,9 +101,7 @@ __start(char **ap, #ifdef GCRT monstartup(&eprol, &etext); #endif -#ifndef NOGPREL _init(); -#endif exit( main(argc, argv, env) ); } From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 19:34:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF7871065670; Tue, 6 Mar 2012 19:34:24 +0000 (UTC) (envelope-from remko@elvandar.org) Received: from mailout.jr-hosting.nl (mailout.jr-hosting.nl [IPv6:2a01:4f8:141:5ffd::1:25]) by mx1.freebsd.org (Postfix) with ESMTP id 8EEFB8FC1B; Tue, 6 Mar 2012 19:34:24 +0000 (UTC) Received: from mail.jr-hosting.nl (mail.jr-hosting.nl [IPv6:2a01:4f8:141:5ffd::25]) by mailout.jr-hosting.nl (Postfix) with ESMTP id F1D3339028C7; Tue, 6 Mar 2012 19:34:23 +0000 (UTC) Received: from [IPv6:2001:470:d701::1:1a] (unknown [IPv6:2001:470:d701::1:1a]) by mail.jr-hosting.nl (Postfix) with ESMTPSA id A362838B18B4; Tue, 6 Mar 2012 19:34:23 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=iso-8859-1 From: Remko Lodder In-Reply-To: Date: Tue, 6 Mar 2012 20:34:19 +0100 Content-Transfer-Encoding: 7bit Message-Id: References: <201203041037.q24AbQhv026104@svn.freebsd.org> To: Sergey Kandaurov X-Mailer: Apple Mail (2.1257) Cc: svn-src-stable@freebsd.org, Remko Lodder , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r232486 - stable/9/sbin/ifconfig X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 19:34:24 -0000 We might ask whether we can commit this to 8.3 quicker then the suggested MFC period. I'll copy you in the request. On Mar 5, 2012, at 7:28 PM, Sergey Kandaurov wrote: > On 4 March 2012 14:37, Remko Lodder wrote: >> Author: remko >> Date: Sun Mar 4 10:37:26 2012 >> New Revision: 232486 >> URL: http://svn.freebsd.org/changeset/base/232486 >> >> Log: >> Add an ifconfig carp option that enables users to set >> the state of the carp cluster. >> >> This is a direct commit to stable/9 because -HEAD's >> code is very different. I discussed this with Gleb >> and the reason for this is that since we do not >> touch the kernel itself and are not adding very >> weird or confusing things, we can commit this to the >> stable branch directly. >> >> The options 'master' and 'backup' are now available, >> which enables the administrator to force a node into >> the backup or master state on the cluster. Ofcourse >> preempt has to be disabled otherwise the master node >> will become master again. >> >> One can do that with: >> >> sysctl net.inet.carp.preempt=0 >> >> After that one can schedule maintenance on the node >> normally running as the master and such. >> >> PR: 100956 >> Discussed with: glebius >> MFC after: 1 weeks > > What are the chances this will appear in 8.3-RELEASE? > > -- > wbr, > pluknet -- /"\ With kind regards, | remko@elvandar.org \ / Remko Lodder | remko@FreeBSD.org X FreeBSD | http://www.evilcoder.org / \ The Power to Serve | Quis custodiet ipsos custodes From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 20:01:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8500B1065672; Tue, 6 Mar 2012 20:01:26 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 72D1D8FC08; Tue, 6 Mar 2012 20:01:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26K1QRA055255; Tue, 6 Mar 2012 20:01:26 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26K1Q7R055245; Tue, 6 Mar 2012 20:01:26 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201203062001.q26K1Q7R055245@svn.freebsd.org> From: Attilio Rao Date: Tue, 6 Mar 2012 20:01:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232619 - in head: . sys/amd64/conf sys/arm/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/pc98/conf sys/powerpc/conf sys/sparc64/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 20:01:26 -0000 Author: attilio Date: Tue Mar 6 20:01:25 2012 New Revision: 232619 URL: http://svn.freebsd.org/changeset/base/232619 Log: Disable the option VFS_ALLOW_NONMPSAFE by default on all the supported platforms. This will make every attempt to mount a non-mpsafe filesystem to the kernel forbidden, unless it is expressely compiled with VFS_ALLOW_NONMPSAFE option. This patch is part of the effort of killing non-MPSAFE filesystems from the tree. No MFC is expected for this patch. Modified: head/UPDATING head/sys/amd64/conf/DEFAULTS head/sys/arm/conf/DEFAULTS head/sys/i386/conf/DEFAULTS head/sys/ia64/conf/DEFAULTS head/sys/mips/conf/DEFAULTS head/sys/pc98/conf/DEFAULTS head/sys/powerpc/conf/DEFAULTS head/sys/sparc64/conf/DEFAULTS Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Mar 6 19:46:57 2012 (r232618) +++ head/UPDATING Tue Mar 6 20:01:25 2012 (r232619) @@ -22,6 +22,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 machines to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20120306: + Disable by default the option VFS_ALLOW_NONMPSAFE for all supported + platforms. + 20120229: Now unix domain sockets behave "as expected" on nullfs(5). Previously nullfs(5) did not pass through all behaviours to the underlying layer, Modified: head/sys/amd64/conf/DEFAULTS ============================================================================== --- head/sys/amd64/conf/DEFAULTS Tue Mar 6 19:46:57 2012 (r232618) +++ head/sys/amd64/conf/DEFAULTS Tue Mar 6 20:01:25 2012 (r232619) @@ -22,6 +22,3 @@ options GEOM_PART_EBR_COMPAT options GEOM_PART_MBR options NEW_PCIB - -# Allow mounting non-MPSAFE filesystems -options VFS_ALLOW_NONMPSAFE Modified: head/sys/arm/conf/DEFAULTS ============================================================================== --- head/sys/arm/conf/DEFAULTS Tue Mar 6 19:46:57 2012 (r232618) +++ head/sys/arm/conf/DEFAULTS Tue Mar 6 20:01:25 2012 (r232619) @@ -9,5 +9,3 @@ device mem options GEOM_PART_BSD options GEOM_PART_MBR - -options VFS_ALLOW_NONMPSAFE Modified: head/sys/i386/conf/DEFAULTS ============================================================================== --- head/sys/i386/conf/DEFAULTS Tue Mar 6 19:46:57 2012 (r232618) +++ head/sys/i386/conf/DEFAULTS Tue Mar 6 20:01:25 2012 (r232619) @@ -30,6 +30,3 @@ options NATIVE device atpic options NEW_PCIB - -# Allow mounting non-MPSAFE filesystems -options VFS_ALLOW_NONMPSAFE Modified: head/sys/ia64/conf/DEFAULTS ============================================================================== --- head/sys/ia64/conf/DEFAULTS Tue Mar 6 19:46:57 2012 (r232618) +++ head/sys/ia64/conf/DEFAULTS Tue Mar 6 20:01:25 2012 (r232619) @@ -20,6 +20,3 @@ options GEOM_PART_GPT options GEOM_PART_MBR options NEW_PCIB - -# Allow mounting non-MPSAFE filesystems -options VFS_ALLOW_NONMPSAFE Modified: head/sys/mips/conf/DEFAULTS ============================================================================== --- head/sys/mips/conf/DEFAULTS Tue Mar 6 19:46:57 2012 (r232618) +++ head/sys/mips/conf/DEFAULTS Tue Mar 6 20:01:25 2012 (r232619) @@ -9,5 +9,3 @@ device uart_ns8250 options GEOM_PART_BSD options GEOM_PART_MBR - -options VFS_ALLOW_NONMPSAFE Modified: head/sys/pc98/conf/DEFAULTS ============================================================================== --- head/sys/pc98/conf/DEFAULTS Tue Mar 6 19:46:57 2012 (r232618) +++ head/sys/pc98/conf/DEFAULTS Tue Mar 6 20:01:25 2012 (r232619) @@ -29,6 +29,3 @@ options GEOM_PART_PC98 device atpic options NEW_PCIB - -# Allow mounting non-MPSAFE filesystems -options VFS_ALLOW_NONMPSAFE Modified: head/sys/powerpc/conf/DEFAULTS ============================================================================== --- head/sys/powerpc/conf/DEFAULTS Tue Mar 6 19:46:57 2012 (r232618) +++ head/sys/powerpc/conf/DEFAULTS Tue Mar 6 20:01:25 2012 (r232619) @@ -14,6 +14,3 @@ options GEOM_PART_APM options GEOM_PART_MBR options NEW_PCIB - -# Allow mounting non-MPSAFE filesystems -options VFS_ALLOW_NONMPSAFE Modified: head/sys/sparc64/conf/DEFAULTS ============================================================================== --- head/sys/sparc64/conf/DEFAULTS Tue Mar 6 19:46:57 2012 (r232618) +++ head/sys/sparc64/conf/DEFAULTS Tue Mar 6 20:01:25 2012 (r232619) @@ -21,6 +21,3 @@ options GEOM_PART_VTOC8 options SUNKBD_EMULATE_ATKBD options NEW_PCIB - -# Allow mounting non-MPSAFE filesystems -options VFS_ALLOW_NONMPSAFE From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 20:15:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4371B1065672; Tue, 6 Mar 2012 20:15:24 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 332F98FC0A; Tue, 6 Mar 2012 20:15:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26KFOD9055746; Tue, 6 Mar 2012 20:15:24 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26KFNJA055743; Tue, 6 Mar 2012 20:15:23 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201203062015.q26KFNJA055743@svn.freebsd.org> From: Dimitry Andric Date: Tue, 6 Mar 2012 20:15:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232620 - in head/include: . xlocale X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 20:15:24 -0000 Author: dim Date: Tue Mar 6 20:15:23 2012 New Revision: 232620 URL: http://svn.freebsd.org/changeset/base/232620 Log: After r232498, programs built with -ansi or -std=c89 including would not compile anymore, due to plain 'inline' keywords. Fix this by using __inline instead. Reported by: Jia-Shiun Li Discussed with: theraven Modified: head/include/runetype.h head/include/xlocale/_ctype.h Modified: head/include/runetype.h ============================================================================== --- head/include/runetype.h Tue Mar 6 20:01:25 2012 (r232619) +++ head/include/runetype.h Tue Mar 6 20:15:23 2012 (r232620) @@ -90,7 +90,7 @@ extern const _RuneLocale *_CurrentRuneLo extern const _RuneLocale *__getCurrentRuneLocale(void); #else extern _Thread_local const _RuneLocale *_ThreadRuneLocale; -static inline const _RuneLocale *__getCurrentRuneLocale(void) +static __inline const _RuneLocale *__getCurrentRuneLocale(void) { if (_ThreadRuneLocale) Modified: head/include/xlocale/_ctype.h ============================================================================== --- head/include/xlocale/_ctype.h Tue Mar 6 20:01:25 2012 (r232619) +++ head/include/xlocale/_ctype.h Tue Mar 6 20:15:23 2012 (r232620) @@ -55,11 +55,11 @@ _RuneLocale *__runes_for_locale(locale_t #ifndef _XLOCALE_INLINE #if __GNUC__ && !__GNUC_STDC_INLINE__ /* GNU89 inline has nonstandard semantics. */ -#define _XLOCALE_INLINE extern inline +#define _XLOCALE_INLINE extern __inline #else /* Hack to work around people who define inline away */ #ifdef inline -#define _XLOCALE_INLINE __inline static +#define _XLOCALE_INLINE static __inline #else /* Define with C++ / C99 compatible semantics */ #define _XLOCALE_INLINE inline From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 20:23:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6AA481065674; Tue, 6 Mar 2012 20:23:30 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4153C8FC16; Tue, 6 Mar 2012 20:23:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26KNUo9056051; Tue, 6 Mar 2012 20:23:30 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26KNUGp056050; Tue, 6 Mar 2012 20:23:30 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203062023.q26KNUGp056050@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Mar 2012 20:23:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232621 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 20:23:30 -0000 Author: jmallett Date: Tue Mar 6 20:23:29 2012 New Revision: 232621 URL: http://svn.freebsd.org/changeset/base/232621 Log: Remove unused file. Deleted: head/sys/mips/mips/elf64_machdep.c From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 20:37:07 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4B10D1065673; Tue, 6 Mar 2012 20:37:07 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 225D78FC1F; Tue, 6 Mar 2012 20:37:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26Kb6ek056564; Tue, 6 Mar 2012 20:37:06 GMT (envelope-from remko@svn.freebsd.org) Received: (from remko@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26Kb6wJ056563; Tue, 6 Mar 2012 20:37:06 GMT (envelope-from remko@svn.freebsd.org) Message-Id: <201203062037.q26Kb6wJ056563@svn.freebsd.org> From: Remko Lodder Date: Tue, 6 Mar 2012 20:37:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232622 - stable/8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 20:37:07 -0000 Author: remko Date: Tue Mar 6 20:37:06 2012 New Revision: 232622 URL: http://svn.freebsd.org/changeset/base/232622 Log: Revert mergeinfo on the root directory. The mergeinfo should only be on ObsoleteFiles.inc Thanks for helping: jh Modified: Directory Properties: stable/8/ (props changed) From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 20:45:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1DD37106566B; Tue, 6 Mar 2012 20:45:14 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0DA9A8FC1C; Tue, 6 Mar 2012 20:45:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26KjD5l056869; Tue, 6 Mar 2012 20:45:13 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26KjDR8056867; Tue, 6 Mar 2012 20:45:13 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201203062045.q26KjDR8056867@svn.freebsd.org> From: John Baldwin Date: Tue, 6 Mar 2012 20:45:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232623 - head/sys/boot/i386/boot2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 20:45:14 -0000 Author: jhb Date: Tue Mar 6 20:45:13 2012 New Revision: 232623 URL: http://svn.freebsd.org/changeset/base/232623 Log: Add a note to clarify why we create a relocated copy of boot1 in lower memory. Modified: head/sys/boot/i386/boot2/boot1.S Modified: head/sys/boot/i386/boot2/boot1.S ============================================================================== --- head/sys/boot/i386/boot2/boot1.S Tue Mar 6 20:37:06 2012 (r232622) +++ head/sys/boot/i386/boot2/boot1.S Tue Mar 6 20:45:13 2012 (r232623) @@ -125,7 +125,10 @@ main: cld # String ops inc mov $start,%sp # stack /* * Relocate ourself to MEM_REL. Since %cx == 0, the inc %ch sets - * %cx == 0x100. + * %cx == 0x100. Note that boot1 does not use this relocated copy + * of itself while loading boot2; however, BTX reclaims the memory + * used by boot1 during its initialization. As a result, boot2 uses + * xread from the relocated copy. */ mov %sp,%si # Source mov $MEM_REL,%di # Destination From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 21:20:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 151E7106566C; Tue, 6 Mar 2012 21:20:17 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 03F7B8FC21; Tue, 6 Mar 2012 21:20:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26LKGNJ058100; Tue, 6 Mar 2012 21:20:16 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26LKGUr058096; Tue, 6 Mar 2012 21:20:16 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201203062120.q26LKGUr058096@svn.freebsd.org> From: Adrian Chadd Date: Tue, 6 Mar 2012 21:20:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232625 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 21:20:17 -0000 Author: adrian Date: Tue Mar 6 21:20:16 2012 New Revision: 232625 URL: http://svn.freebsd.org/changeset/base/232625 Log: Modify HWMP to be able to allocate memory for PREQ/PREP/PERR for all scenarios. * Added verify_mesh_*_len functions that verify the length according to the amendment spec and return number of destination addresses for allocation of appropriate struct size in memory; * Modified hwmp_recv_action_meshpath to allocate HWMP ie instead of storing them on the stack and store all available field according the flags; * Modify hwmp_add_mesh* to work with all cases of HWMP according to amendment. * Modify hwmp_send_* to calculate correct len of bytes for the HWMP ie. * Added new M_80211_MESH_* malloc defines. * Added macros with magic numbers for HWMP ie sizes according to amendment. * Added the external address to all HWMP ie structs. Submitted by: monthadar@gmail.com Modified: head/sys/net80211/ieee80211_hwmp.c head/sys/net80211/ieee80211_mesh.c head/sys/net80211/ieee80211_mesh.h Modified: head/sys/net80211/ieee80211_hwmp.c ============================================================================== --- head/sys/net80211/ieee80211_hwmp.c Tue Mar 6 21:13:12 2012 (r232624) +++ head/sys/net80211/ieee80211_hwmp.c Tue Mar 6 21:20:16 2012 (r232625) @@ -279,17 +279,114 @@ hwmp_newstate(struct ieee80211vap *vap, return 0; } +/* + * Verify the length of an HWMP PREQ and return the number + * of destinations >= 1, if verification fails -1 is returned. + */ +static int +verify_mesh_preq_len(struct ieee80211vap *vap, + const struct ieee80211_frame *wh, const uint8_t *iefrm) +{ + int alloc_sz = -1; + int ndest = -1; + if (iefrm[2] & IEEE80211_MESHPREQ_FLAGS_AE) { + /* Originator External Address present */ + alloc_sz = IEEE80211_MESHPREQ_BASE_SZ_AE; + ndest = iefrm[IEEE80211_MESHPREQ_TCNT_OFFSET_AE]; + } else { + /* w/o Originator External Address */ + alloc_sz = IEEE80211_MESHPREQ_BASE_SZ; + ndest = iefrm[IEEE80211_MESHPREQ_TCNT_OFFSET]; + } + alloc_sz += ndest * IEEE80211_MESHPREQ_TRGT_SZ; + + if(iefrm[1] != (alloc_sz)) { + IEEE80211_DISCARD(vap, + IEEE80211_MSG_ACTION | IEEE80211_MSG_HWMP, + wh, NULL, "PREQ (AE=%s) with wrong len", + iefrm[2] & IEEE80211_MESHPREQ_FLAGS_AE ? "1" : "0"); + return (-1); + } + return ndest; +} + +/* + * Verify the length of an HWMP PREP and returns 1 on success, + * otherwise -1. + */ +static int +verify_mesh_prep_len(struct ieee80211vap *vap, + const struct ieee80211_frame *wh, const uint8_t *iefrm) +{ + int alloc_sz = -1; + if (iefrm[2] & IEEE80211_MESHPREP_FLAGS_AE) { + if (iefrm[1] == IEEE80211_MESHPREP_BASE_SZ_AE) + alloc_sz = IEEE80211_MESHPREP_BASE_SZ_AE; + } else if (iefrm[1] == IEEE80211_MESHPREP_BASE_SZ) + alloc_sz = IEEE80211_MESHPREP_BASE_SZ; + if(alloc_sz < 0) { + IEEE80211_DISCARD(vap, + IEEE80211_MSG_ACTION | IEEE80211_MSG_HWMP, + wh, NULL, "PREP (AE=%s) with wrong len", + iefrm[2] & IEEE80211_MESHPREP_FLAGS_AE ? "1" : "0"); + return (-1); + } + return (1); +} + +/* + * Verify the length of an HWMP PERR and return the number + * of destinations >= 1, if verification fails -1 is returned. + */ +static int +verify_mesh_perr_len(struct ieee80211vap *vap, + const struct ieee80211_frame *wh, const uint8_t *iefrm) +{ + int alloc_sz = -1; + const uint8_t *iefrm_t = iefrm; + uint8_t ndest = iefrm_t[IEEE80211_MESHPERR_NDEST_OFFSET]; + int i; + + if(ndest > IEEE80211_MESHPERR_MAXDEST) { + IEEE80211_DISCARD(vap, + IEEE80211_MSG_ACTION | IEEE80211_MSG_HWMP, + wh, NULL, "PERR with wrong number of destionat (>19), %u", + ndest); + return (-1); + } + + iefrm_t += IEEE80211_MESHPERR_NDEST_OFFSET + 1; /* flag is next field */ + /* We need to check each destionation flag to know size */ + for(i = 0; ini_vap; - struct ieee80211_meshpreq_ie preq; - struct ieee80211_meshprep_ie prep; - struct ieee80211_meshperr_ie perr; + struct ieee80211_meshpreq_ie *preq; + struct ieee80211_meshprep_ie *prep; + struct ieee80211_meshperr_ie *perr; struct ieee80211_meshrann_ie rann; const uint8_t *iefrm = frm + 2; /* action + code */ + const uint8_t *iefrm_t = iefrm; /* temporary pointer */ + int ndest = -1; int found = 0; while (efrm - iefrm > 1) { @@ -297,66 +394,132 @@ hwmp_recv_action_meshpath(struct ieee802 switch (*iefrm) { case IEEE80211_ELEMID_MESHPREQ: { - const struct ieee80211_meshpreq_ie *mpreq = - (const struct ieee80211_meshpreq_ie *) iefrm; - /* XXX > 1 target */ - if (mpreq->preq_len != - sizeof(struct ieee80211_meshpreq_ie) - 2) { - IEEE80211_DISCARD(vap, - IEEE80211_MSG_ACTION | IEEE80211_MSG_HWMP, - wh, NULL, "%s", "PREQ with wrong len"); + int i = 0; + + iefrm_t = iefrm; + ndest = verify_mesh_preq_len(vap, wh, iefrm_t); + if (ndest < 0) { vap->iv_stats.is_rx_mgtdiscard++; break; } - memcpy(&preq, mpreq, sizeof(preq)); - preq.preq_id = LE_READ_4(&mpreq->preq_id); - preq.preq_origseq = LE_READ_4(&mpreq->preq_origseq); - preq.preq_lifetime = LE_READ_4(&mpreq->preq_lifetime); - preq.preq_metric = LE_READ_4(&mpreq->preq_metric); - preq.preq_targets[0].target_seq = - LE_READ_4(&mpreq->preq_targets[0].target_seq); - hwmp_recv_preq(vap, ni, wh, &preq); + preq = malloc(sizeof(*preq) + + (ndest - 1) * sizeof(*preq->preq_targets), + M_80211_MESH_PREQ, M_NOWAIT | M_ZERO); + KASSERT(preq != NULL, ("preq == NULL")); + + preq->preq_ie = *iefrm_t++; + preq->preq_len = *iefrm_t++; + preq->preq_flags = *iefrm_t++; + preq->preq_hopcount = *iefrm_t++; + preq->preq_ttl = *iefrm_t++; + preq->preq_id = LE_READ_4(iefrm_t); iefrm_t += 4; + IEEE80211_ADDR_COPY(preq->preq_origaddr, iefrm_t); + iefrm_t += 6; + preq->preq_origseq = LE_READ_4(iefrm_t); iefrm_t += 4; + /* NB: may have Originator Proxied Address */ + if (preq->preq_flags & IEEE80211_MESHPREQ_FLAGS_AE) { + IEEE80211_ADDR_COPY( + preq->preq_orig_ext_addr, iefrm_t); + iefrm_t += 6; + } + preq->preq_lifetime = LE_READ_4(iefrm_t); iefrm_t += 4; + preq->preq_metric = LE_READ_4(iefrm_t); iefrm_t += 4; + preq->preq_tcount = *iefrm_t++; + + for (i = 0; i < preq->preq_tcount; i++) { + preq->preq_targets[i].target_flags = *iefrm_t++; + IEEE80211_ADDR_COPY( + preq->preq_targets[i].target_addr, iefrm_t); + iefrm_t += 6; + preq->preq_targets[i].target_seq = + LE_READ_4(iefrm_t); + iefrm_t += 4; + } + + hwmp_recv_preq(vap, ni, wh, preq); + free(preq, M_80211_MESH_PREQ); found++; - break; + break; } case IEEE80211_ELEMID_MESHPREP: { - const struct ieee80211_meshprep_ie *mprep = - (const struct ieee80211_meshprep_ie *) iefrm; - if (mprep->prep_len != - sizeof(struct ieee80211_meshprep_ie) - 2) { - IEEE80211_DISCARD(vap, - IEEE80211_MSG_ACTION | IEEE80211_MSG_HWMP, - wh, NULL, "%s", "PREP with wrong len"); + iefrm_t = iefrm; + ndest = verify_mesh_prep_len(vap, wh, iefrm_t); + if (ndest < 0) { vap->iv_stats.is_rx_mgtdiscard++; break; } - memcpy(&prep, mprep, sizeof(prep)); - prep.prep_targetseq = LE_READ_4(&mprep->prep_targetseq); - prep.prep_lifetime = LE_READ_4(&mprep->prep_lifetime); - prep.prep_metric = LE_READ_4(&mprep->prep_metric); - prep.prep_origseq = LE_READ_4(&mprep->prep_origseq); - hwmp_recv_prep(vap, ni, wh, &prep); + prep = malloc(sizeof(*prep), + M_80211_MESH_PREP, M_NOWAIT | M_ZERO); + KASSERT(prep != NULL, ("prep == NULL")); + + prep->prep_ie = *iefrm_t++; + prep->prep_len = *iefrm_t++; + prep->prep_flags = *iefrm_t++; + prep->prep_hopcount = *iefrm_t++; + prep->prep_ttl = *iefrm_t++; + IEEE80211_ADDR_COPY(prep->prep_targetaddr, iefrm_t); + iefrm_t += 6; + prep->prep_targetseq = LE_READ_4(iefrm_t); iefrm_t += 4; + /* NB: May have Target Proxied Address */ + if (prep->prep_flags & IEEE80211_MESHPREP_FLAGS_AE) { + IEEE80211_ADDR_COPY( + prep->prep_target_ext_addr, iefrm_t); + iefrm_t += 6; + } + prep->prep_lifetime = LE_READ_4(iefrm_t); iefrm_t += 4; + prep->prep_metric = LE_READ_4(iefrm_t); iefrm_t += 4; + IEEE80211_ADDR_COPY(prep->prep_origaddr, iefrm_t); + iefrm_t += 6; + prep->prep_origseq = LE_READ_4(iefrm_t); iefrm_t += 4; + + hwmp_recv_prep(vap, ni, wh, prep); + free(prep, M_80211_MESH_PREP); found++; break; } case IEEE80211_ELEMID_MESHPERR: { - const struct ieee80211_meshperr_ie *mperr = - (const struct ieee80211_meshperr_ie *) iefrm; - /* XXX > 1 target */ - if (mperr->perr_len != - sizeof(struct ieee80211_meshperr_ie) - 2) { - IEEE80211_DISCARD(vap, - IEEE80211_MSG_ACTION | IEEE80211_MSG_HWMP, - wh, NULL, "%s", "PERR with wrong len"); + int i = 0; + + iefrm_t = iefrm; + ndest = verify_mesh_perr_len(vap, wh, iefrm_t); + if (ndest < 0) { vap->iv_stats.is_rx_mgtdiscard++; break; } - memcpy(&perr, mperr, sizeof(perr)); - perr.perr_dests[0].dest_seq = - LE_READ_4(&mperr->perr_dests[0].dest_seq); - hwmp_recv_perr(vap, ni, wh, &perr); + perr = malloc(sizeof(*perr) + + (ndest - 1) * sizeof(*perr->perr_dests), + M_80211_MESH_PERR, M_NOWAIT | M_ZERO); + KASSERT(perr != NULL, ("perr == NULL")); + + perr->perr_ie = *iefrm_t++; + perr->perr_len = *iefrm_t++; + perr->perr_ttl = *iefrm_t++; + perr->perr_ndests = *iefrm_t++; + + for (i = 0; iperr_ndests; i++) { + perr->perr_dests[i].dest_flags = *iefrm_t++; + IEEE80211_ADDR_COPY( + perr->perr_dests[i].dest_addr, iefrm_t); + iefrm_t += 6; + perr->perr_dests[i].dest_seq = LE_READ_4(iefrm_t); + iefrm_t += 4; + /* NB: May have Target Proxied Address */ + if (perr->perr_dests[i].dest_flags & + IEEE80211_MESHPERR_FLAGS_AE) { + IEEE80211_ADDR_COPY( + perr->perr_dests[i].dest_ext_addr, + iefrm_t); + iefrm_t += 6; + } + perr->perr_dests[i].dest_rcode = + LE_READ_2(iefrm_t); + iefrm_t += 2; + } + + hwmp_recv_perr(vap, ni, wh, perr); + free(perr, M_80211_MESH_PERR); found++; break; } @@ -369,7 +532,7 @@ hwmp_recv_action_meshpath(struct ieee802 IEEE80211_DISCARD(vap, IEEE80211_MSG_ACTION | IEEE80211_MSG_HWMP, wh, NULL, "%s", "RAN with wrong len"); - vap->iv_stats.is_rx_mgtdiscard++; + vap->iv_stats.is_rx_mgtdiscard++; return 1; } memcpy(&rann, mrann, sizeof(rann)); @@ -492,31 +655,40 @@ hwmp_send_action(struct ieee80211_node * /* * Add a Mesh Path Request IE to a frame. */ +#define PREQ_TFLAGS(n) preq->preq_targets[n].target_flags +#define PREQ_TADDR(n) preq->preq_targets[n].target_addr +#define PREQ_TSEQ(n) preq->preq_targets[n].target_seq static uint8_t * hwmp_add_meshpreq(uint8_t *frm, const struct ieee80211_meshpreq_ie *preq) { int i; *frm++ = IEEE80211_ELEMID_MESHPREQ; - *frm++ = sizeof(struct ieee80211_meshpreq_ie) - 2 + - (preq->preq_tcount - 1) * sizeof(*preq->preq_targets); + *frm++ = preq->preq_len; /* len already calculated */ *frm++ = preq->preq_flags; *frm++ = preq->preq_hopcount; *frm++ = preq->preq_ttl; ADDWORD(frm, preq->preq_id); IEEE80211_ADDR_COPY(frm, preq->preq_origaddr); frm += 6; ADDWORD(frm, preq->preq_origseq); + if (preq->preq_flags & IEEE80211_MESHPREQ_FLAGS_AE) { + IEEE80211_ADDR_COPY(frm, preq->preq_orig_ext_addr); + frm += 6; + } ADDWORD(frm, preq->preq_lifetime); ADDWORD(frm, preq->preq_metric); *frm++ = preq->preq_tcount; for (i = 0; i < preq->preq_tcount; i++) { - *frm++ = preq->preq_targets[i].target_flags; - IEEE80211_ADDR_COPY(frm, preq->preq_targets[i].target_addr); + *frm++ = PREQ_TFLAGS(i); + IEEE80211_ADDR_COPY(frm, PREQ_TADDR(i)); frm += 6; - ADDWORD(frm, preq->preq_targets[i].target_seq); + ADDWORD(frm, PREQ_TSEQ(i)); } return frm; } +#undef PREQ_TFLAGS +#undef PREQ_TADDR +#undef PREQ_TSEQ /* * Add a Mesh Path Reply IE to a frame. @@ -525,12 +697,16 @@ static uint8_t * hwmp_add_meshprep(uint8_t *frm, const struct ieee80211_meshprep_ie *prep) { *frm++ = IEEE80211_ELEMID_MESHPREP; - *frm++ = sizeof(struct ieee80211_meshprep_ie) - 2; + *frm++ = prep->prep_len; /* len already calculated */ *frm++ = prep->prep_flags; *frm++ = prep->prep_hopcount; *frm++ = prep->prep_ttl; IEEE80211_ADDR_COPY(frm, prep->prep_targetaddr); frm += 6; ADDWORD(frm, prep->prep_targetseq); + if (prep->prep_flags & IEEE80211_MESHPREP_FLAGS_AE) { + IEEE80211_ADDR_COPY(frm, prep->prep_target_ext_addr); + frm += 6; + } ADDWORD(frm, prep->prep_lifetime); ADDWORD(frm, prep->prep_metric); IEEE80211_ADDR_COPY(frm, prep->prep_origaddr); frm += 6; @@ -541,25 +717,38 @@ hwmp_add_meshprep(uint8_t *frm, const st /* * Add a Mesh Path Error IE to a frame. */ +#define PERR_DFLAGS(n) perr->perr_dests[n].dest_flags +#define PERR_DADDR(n) perr->perr_dests[n].dest_addr +#define PERR_DSEQ(n) perr->perr_dests[n].dest_seq +#define PERR_EXTADDR(n) perr->perr_dests[n].dest_ext_addr +#define PERR_DRCODE(n) perr->perr_dests[n].dest_rcode static uint8_t * hwmp_add_meshperr(uint8_t *frm, const struct ieee80211_meshperr_ie *perr) { int i; *frm++ = IEEE80211_ELEMID_MESHPERR; - *frm++ = sizeof(struct ieee80211_meshperr_ie) - 2 + - (perr->perr_ndests - 1) * sizeof(*perr->perr_dests); + *frm++ = perr->perr_len; /* len already calculated */ *frm++ = perr->perr_ttl; *frm++ = perr->perr_ndests; for (i = 0; i < perr->perr_ndests; i++) { - *frm++ = perr->perr_dests[i].dest_flags; - IEEE80211_ADDR_COPY(frm, perr->perr_dests[i].dest_addr); + *frm++ = PERR_DFLAGS(i); + IEEE80211_ADDR_COPY(frm, PERR_DADDR(i)); frm += 6; - ADDWORD(frm, perr->perr_dests[i].dest_seq); - ADDSHORT(frm, perr->perr_dests[i].dest_rcode); + ADDWORD(frm, PERR_DSEQ(i)); + if (PERR_DFLAGS(i) & IEEE80211_MESHPERR_FLAGS_AE) { + IEEE80211_ADDR_COPY(frm, PERR_EXTADDR(i)); + frm += 6; + } + ADDSHORT(frm, PERR_DRCODE(i)); } return frm; } +#undef PERR_DFLAGS +#undef PERR_DADDR +#undef PERR_DSEQ +#undef PERR_EXTADDR +#undef PERR_DRCODE /* * Add a Root Annoucement IE to a frame. @@ -568,12 +757,13 @@ static uint8_t * hwmp_add_meshrann(uint8_t *frm, const struct ieee80211_meshrann_ie *rann) { *frm++ = IEEE80211_ELEMID_MESHRANN; - *frm++ = sizeof(struct ieee80211_meshrann_ie) - 2; + *frm++ = rann->rann_len; *frm++ = rann->rann_flags; *frm++ = rann->rann_hopcount; *frm++ = rann->rann_ttl; IEEE80211_ADDR_COPY(frm, rann->rann_addr); frm += 6; ADDWORD(frm, rann->rann_seq); + ADDWORD(frm, rann->rann_interval); ADDWORD(frm, rann->rann_metric); return frm; } @@ -980,8 +1170,10 @@ hwmp_send_preq(struct ieee80211_node *ni * [tlv] mesh path request */ preq->preq_ie = IEEE80211_ELEMID_MESHPREQ; - return hwmp_send_action(ni, sa, da, (uint8_t *)preq, - sizeof(struct ieee80211_meshpreq_ie)); + preq->preq_len = (preq->preq_flags & IEEE80211_MESHPREQ_FLAGS_AE ? + IEEE80211_MESHPREQ_BASE_SZ_AE : IEEE80211_MESHPREQ_BASE_SZ) + + preq->preq_tcount * IEEE80211_MESHPREQ_TRGT_SZ; + return hwmp_send_action(ni, sa, da, (uint8_t *)preq, preq->preq_len+2); } static void @@ -1162,8 +1354,10 @@ hwmp_send_prep(struct ieee80211_node *ni * [tlv] mesh path reply */ prep->prep_ie = IEEE80211_ELEMID_MESHPREP; + prep->prep_len = prep->prep_flags & IEEE80211_MESHPREP_FLAGS_AE ? + IEEE80211_MESHPREP_BASE_SZ_AE : IEEE80211_MESHPREP_BASE_SZ; return hwmp_send_action(ni, sa, da, (uint8_t *)prep, - sizeof(struct ieee80211_meshprep_ie)); + prep->prep_len + 2); } #define PERR_DFLAGS(n) perr.perr_dests[n].dest_flags @@ -1254,8 +1448,10 @@ hwmp_recv_perr(struct ieee80211vap *vap, &pperr); } } +#undef PERR_DFLAGS #undef PEER_DADDR #undef PERR_DSEQ +#undef PERR_DRCODE static int hwmp_send_perr(struct ieee80211_node *ni, @@ -1264,6 +1460,8 @@ hwmp_send_perr(struct ieee80211_node *ni struct ieee80211_meshperr_ie *perr) { struct ieee80211_hwmp_state *hs = ni->ni_vap->iv_hwmp; + int i; + uint8_t length = 0; /* * Enforce PERR interval. @@ -1282,8 +1480,17 @@ hwmp_send_perr(struct ieee80211_node *ni * [tlv] mesh path error */ perr->perr_ie = IEEE80211_ELEMID_MESHPERR; - return hwmp_send_action(ni, sa, da, (uint8_t *)perr, - sizeof(struct ieee80211_meshperr_ie)); + length = IEEE80211_MESHPERR_BASE_SZ; + for (i = 0; iperr_ndests; i++) { + if (perr->perr_dests[i].dest_flags & + IEEE80211_MESHPERR_FLAGS_AE) { + length += IEEE80211_MESHPERR_DEST_SZ_AE; + continue ; + } + length += IEEE80211_MESHPERR_DEST_SZ; + } + perr->perr_len =length; + return hwmp_send_action(ni, sa, da, (uint8_t *)perr, perr->perr_len+2); } static void @@ -1342,8 +1549,9 @@ hwmp_send_rann(struct ieee80211_node *ni * [tlv] root annoucement */ rann->rann_ie = IEEE80211_ELEMID_MESHRANN; + rann->rann_len = IEEE80211_MESHRANN_BASE_SZ; return hwmp_send_action(ni, sa, da, (uint8_t *)rann, - sizeof(struct ieee80211_meshrann_ie)); + rann->rann_len + 2); } #define PREQ_TFLAGS(n) preq.preq_targets[n].target_flags Modified: head/sys/net80211/ieee80211_mesh.c ============================================================================== --- head/sys/net80211/ieee80211_mesh.c Tue Mar 6 21:13:12 2012 (r232624) +++ head/sys/net80211/ieee80211_mesh.c Tue Mar 6 21:20:16 2012 (r232625) @@ -142,6 +142,10 @@ static struct ieee80211_mesh_proto_metri #define MESH_RT_LOCK_ASSERT(ms) mtx_assert(&(ms)->ms_rt_lock, MA_OWNED) #define MESH_RT_UNLOCK(ms) mtx_unlock(&(ms)->ms_rt_lock) +MALLOC_DEFINE(M_80211_MESH_PREQ, "80211preq", "802.11 MESH Path Request frame"); +MALLOC_DEFINE(M_80211_MESH_PREP, "80211prep", "802.11 MESH Path Reply frame"); +MALLOC_DEFINE(M_80211_MESH_PERR, "80211perr", "802.11 MESH Path Error frame"); + MALLOC_DEFINE(M_80211_MESH_RT, "80211mesh", "802.11s routing table"); /* Modified: head/sys/net80211/ieee80211_mesh.h ============================================================================== --- head/sys/net80211/ieee80211_mesh.h Tue Mar 6 21:13:12 2012 (r232624) +++ head/sys/net80211/ieee80211_mesh.h Tue Mar 6 21:20:16 2012 (r232625) @@ -212,6 +212,7 @@ struct ieee80211_meshpann_ie { } __packed; /* Root (MP) Annoucement */ +#define IEEE80211_MESHRANN_BASE_SZ (21) struct ieee80211_meshrann_ie { uint8_t rann_ie; /* IEEE80211_ELEMID_MESHRANN */ uint8_t rann_len; @@ -221,10 +222,16 @@ struct ieee80211_meshrann_ie { uint8_t rann_ttl; uint8_t rann_addr[IEEE80211_ADDR_LEN]; uint32_t rann_seq; /* HWMP Sequence Number */ + uint32_t rann_interval; uint32_t rann_metric; } __packed; /* Mesh Path Request */ +#define IEEE80211_MESHPREQ_BASE_SZ (26) +#define IEEE80211_MESHPREQ_BASE_SZ_AE (32) +#define IEEE80211_MESHPREQ_TRGT_SZ (11) +#define IEEE80211_MESHPREQ_TCNT_OFFSET (27) +#define IEEE80211_MESHPREQ_TCNT_OFFSET_AE (33) struct ieee80211_meshpreq_ie { uint8_t preq_ie; /* IEEE80211_ELEMID_MESHPREQ */ uint8_t preq_len; @@ -238,7 +245,8 @@ struct ieee80211_meshpreq_ie { uint32_t preq_id; uint8_t preq_origaddr[IEEE80211_ADDR_LEN]; uint32_t preq_origseq; /* HWMP Sequence Number */ - /* NB: may have Originator Proxied Address */ + /* NB: may have Originator External Address */ + uint8_t preq_orig_ext_addr[IEEE80211_ADDR_LEN]; uint32_t preq_lifetime; uint32_t preq_metric; uint8_t preq_tcount; /* target count */ @@ -253,15 +261,19 @@ struct ieee80211_meshpreq_ie { } __packed; /* Mesh Path Reply */ +#define IEEE80211_MESHPREP_BASE_SZ (31) +#define IEEE80211_MESHPREP_BASE_SZ_AE (37) struct ieee80211_meshprep_ie { uint8_t prep_ie; /* IEEE80211_ELEMID_MESHPREP */ uint8_t prep_len; uint8_t prep_flags; +#define IEEE80211_MESHPREP_FLAGS_AE 0x40 /* Address Extension */ uint8_t prep_hopcount; uint8_t prep_ttl; uint8_t prep_targetaddr[IEEE80211_ADDR_LEN]; uint32_t prep_targetseq; - /* NB: May have Target Proxied Address */ + /* NB: May have Target External Address */ + uint8_t prep_target_ext_addr[IEEE80211_ADDR_LEN]; uint32_t prep_lifetime; uint32_t prep_metric; uint8_t prep_origaddr[IEEE80211_ADDR_LEN]; @@ -269,6 +281,11 @@ struct ieee80211_meshprep_ie { } __packed; /* Mesh Path Error */ +#define IEEE80211_MESHPERR_MAXDEST (19) +#define IEEE80211_MESHPERR_NDEST_OFFSET (3) +#define IEEE80211_MESHPERR_BASE_SZ (2) +#define IEEE80211_MESHPERR_DEST_SZ (13) +#define IEEE80211_MESHPERR_DEST_SZ_AE (19) struct ieee80211_meshperr_ie { uint8_t perr_ie; /* IEEE80211_ELEMID_MESHPERR */ uint8_t perr_len; @@ -276,10 +293,13 @@ struct ieee80211_meshperr_ie { uint8_t perr_ndests; /* Number of Destinations */ struct { uint8_t dest_flags; -#define IEEE80211_MESHPERR_DFLAGS_USN 0x01 -#define IEEE80211_MESHPERR_DFLAGS_RC 0x02 +#define IEEE80211_MESHPERR_DFLAGS_USN 0x01 /* XXX: not part of standard */ +#define IEEE80211_MESHPERR_DFLAGS_RC 0x02 /* XXX: not part of standard */ +#define IEEE80211_MESHPERR_FLAGS_AE 0x40 /* Address Extension */ uint8_t dest_addr[IEEE80211_ADDR_LEN]; uint32_t dest_seq; /* HWMP Sequence Number */ + /* NB: May have Destination External Address */ + uint8_t dest_ext_addr[IEEE80211_ADDR_LEN]; uint16_t dest_rcode; } __packed perr_dests[1]; /* NB: variable size */ } __packed; @@ -390,6 +410,10 @@ struct ieee80211_meshcntl_ae11 { } __packed; #ifdef _KERNEL +MALLOC_DECLARE(M_80211_MESH_PREQ); +MALLOC_DECLARE(M_80211_MESH_PREP); +MALLOC_DECLARE(M_80211_MESH_PERR); + MALLOC_DECLARE(M_80211_MESH_RT); struct ieee80211_mesh_route { TAILQ_ENTRY(ieee80211_mesh_route) rt_next; From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 21:56:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3FC2106566C; Tue, 6 Mar 2012 21:56:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B3BE48FC0C; Tue, 6 Mar 2012 21:56:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26LuU7R059189; Tue, 6 Mar 2012 21:56:30 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26LuUsd059187; Tue, 6 Mar 2012 21:56:30 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201203062156.q26LuUsd059187@svn.freebsd.org> From: Dimitry Andric Date: Tue, 6 Mar 2012 21:56:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232626 - head/lib/libc/locale X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 21:56:30 -0000 Author: dim Date: Tue Mar 6 21:56:30 2012 New Revision: 232626 URL: http://svn.freebsd.org/changeset/base/232626 Log: Fix build of libc.so after r232620. This caused a duplicate definition of __getCurrentRuneLocale(). Pointy hat to: me Modified: head/lib/libc/locale/nomacros.c Modified: head/lib/libc/locale/nomacros.c ============================================================================== --- head/lib/libc/locale/nomacros.c Tue Mar 6 21:20:16 2012 (r232625) +++ head/lib/libc/locale/nomacros.c Tue Mar 6 21:56:30 2012 (r232626) @@ -9,4 +9,10 @@ __FBSDID("$FreeBSD$"); */ #define _EXTERNALIZE_CTYPE_INLINES_ +/* + * Also make sure does not generate an inline definition + * of __getCurrentRuneLocale(). + */ +#define __RUNETYPE_INTERNAL + #include From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 22:16:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6971A1065740; Tue, 6 Mar 2012 22:16:11 +0000 (UTC) (envelope-from ray@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 579638FC1D; Tue, 6 Mar 2012 22:16:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26MGB5M059827; Tue, 6 Mar 2012 22:16:11 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26MGBFG059825; Tue, 6 Mar 2012 22:16:11 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201203062216.q26MGBFG059825@svn.freebsd.org> From: Aleksandr Rybalko Date: Tue, 6 Mar 2012 22:16:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232627 - head/sys/mips/atheros X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 22:16:11 -0000 Author: ray Date: Tue Mar 6 22:16:10 2012 New Revision: 232627 URL: http://svn.freebsd.org/changeset/base/232627 Log: Remove EoL whitespaces. Approved by: adri (mentor) Modified: head/sys/mips/atheros/if_arge.c Modified: head/sys/mips/atheros/if_arge.c ============================================================================== --- head/sys/mips/atheros/if_arge.c Tue Mar 6 21:56:30 2012 (r232626) +++ head/sys/mips/atheros/if_arge.c Tue Mar 6 22:16:10 2012 (r232627) @@ -175,7 +175,7 @@ DRIVER_MODULE(arge, nexus, arge_driver, DRIVER_MODULE(miibus, arge, miibus_driver, miibus_devclass, 0, 0); /* - * RedBoot passes MAC address to entry point as environment + * RedBoot passes MAC address to entry point as environment * variable. platfrom_start parses it and stores in this variable */ extern uint32_t ar711_base_mac[ETHER_ADDR_LEN]; @@ -184,9 +184,8 @@ static struct mtx miibus_mtx; MTX_SYSINIT(miibus_mtx, &miibus_mtx, "arge mii lock", MTX_DEF); - /* - * Flushes all + * Flushes all */ static void arge_flush_ddr(struct arge_softc *sc) @@ -195,7 +194,7 @@ arge_flush_ddr(struct arge_softc *sc) ar71xx_device_flush_ddr_ge(sc->arge_mac_unit); } -static int +static int arge_probe(device_t dev) { @@ -260,7 +259,7 @@ arge_attach(device_t dev) * in CPU address space. */ if (sc->arge_mac_unit == 0 && - resource_long_value(device_get_name(dev), device_get_unit(dev), + resource_long_value(device_get_name(dev), device_get_unit(dev), "eeprommac", &eeprom_mac_addr) == 0) { int i; const char *mac = (const char *) MIPS_PHYS_TO_KSEG1(eeprom_mac_addr); @@ -270,17 +269,17 @@ arge_attach(device_t dev) } } - KASSERT(((sc->arge_mac_unit == 0) || (sc->arge_mac_unit == 1)), + KASSERT(((sc->arge_mac_unit == 0) || (sc->arge_mac_unit == 1)), ("if_arge: Only MAC0 and MAC1 supported")); /* * Get which PHY of 5 available we should use for this unit */ - if (resource_int_value(device_get_name(dev), device_get_unit(dev), + if (resource_int_value(device_get_name(dev), device_get_unit(dev), "phymask", &phymask) != 0) { /* - * Use port 4 (WAN) for GE0. For any other port use - * its PHY the same as its unit number + * Use port 4 (WAN) for GE0. For any other port use + * its PHY the same as its unit number */ if (sc->arge_mac_unit == 0) phymask = (1 << 4); @@ -292,10 +291,10 @@ arge_attach(device_t dev) } /* - * Get default media & duplex mode, by default its Base100T + * Get default media & duplex mode, by default its Base100T * and full duplex */ - if (resource_int_value(device_get_name(dev), device_get_unit(dev), + if (resource_int_value(device_get_name(dev), device_get_unit(dev), "media", &hint) != 0) hint = 0; @@ -304,7 +303,7 @@ arge_attach(device_t dev) else sc->arge_media_type = IFM_100_TX; - if (resource_int_value(device_get_name(dev), device_get_unit(dev), + if (resource_int_value(device_get_name(dev), device_get_unit(dev), "fduplex", &hint) != 0) hint = 1; @@ -322,7 +321,7 @@ arge_attach(device_t dev) /* Map control/status registers. */ sc->arge_rid = 0; - sc->arge_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + sc->arge_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->arge_rid, RF_ACTIVE); if (sc->arge_res == NULL) { @@ -333,7 +332,7 @@ arge_attach(device_t dev) /* Allocate interrupts */ rid = 0; - sc->arge_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, + sc->arge_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE); if (sc->arge_irq == NULL) { @@ -381,7 +380,7 @@ arge_attach(device_t dev) * No MAC address configured. Generate the random one. */ if (bootverbose) - device_printf(dev, + device_printf(dev, "Generating random ethernet address.\n"); rnd = arc4random(); @@ -402,7 +401,7 @@ arge_attach(device_t dev) } /* Initialize the MAC block */ - + /* Step 1. Soft-reset MAC */ ARGE_SET_BITS(sc, AR71XX_MAC_CFG1, MAC_CFG1_SOFT_RESET); DELAY(20); @@ -413,7 +412,7 @@ arge_attach(device_t dev) ar71xx_device_start(sc->arge_mac_unit == 0 ? RST_RESET_GE0_MAC : RST_RESET_GE1_MAC); /* Step 3. Reconfigure MAC block */ - ARGE_WRITE(sc, AR71XX_MAC_CFG1, + ARGE_WRITE(sc, AR71XX_MAC_CFG1, MAC_CFG1_SYNC_RX | MAC_CFG1_RX_ENABLE | MAC_CFG1_SYNC_TX | MAC_CFG1_TX_ENABLE); @@ -429,15 +428,15 @@ arge_attach(device_t dev) ARGE_WRITE(sc, AR71XX_MAC_MII_CFG, MAC_MII_CFG_CLOCK_DIV_28); DELAY(100); - /* + /* * Set all Ethernet address registers to the same initial values - * set all four addresses to 66-88-aa-cc-dd-ee + * set all four addresses to 66-88-aa-cc-dd-ee */ - ARGE_WRITE(sc, AR71XX_MAC_STA_ADDR1, + ARGE_WRITE(sc, AR71XX_MAC_STA_ADDR1, (eaddr[2] << 24) | (eaddr[3] << 16) | (eaddr[4] << 8) | eaddr[5]); ARGE_WRITE(sc, AR71XX_MAC_STA_ADDR2, (eaddr[0] << 8) | eaddr[1]); - ARGE_WRITE(sc, AR71XX_MAC_FIFO_CFG0, + ARGE_WRITE(sc, AR71XX_MAC_FIFO_CFG0, FIFO_CFG0_ALL << FIFO_CFG0_ENABLE_SHIFT); switch (ar71xx_soc) { @@ -452,13 +451,13 @@ arge_attach(device_t dev) ARGE_WRITE(sc, AR71XX_MAC_FIFO_CFG2, 0x00001fff); } - ARGE_WRITE(sc, AR71XX_MAC_FIFO_RX_FILTMATCH, + ARGE_WRITE(sc, AR71XX_MAC_FIFO_RX_FILTMATCH, FIFO_RX_FILTMATCH_DEFAULT); - ARGE_WRITE(sc, AR71XX_MAC_FIFO_RX_FILTMASK, + ARGE_WRITE(sc, AR71XX_MAC_FIFO_RX_FILTMASK, FIFO_RX_FILTMASK_DEFAULT); - /* + /* * Check if we have single-PHY MAC or multi-PHY */ phys_total = 0; @@ -482,11 +481,11 @@ arge_attach(device_t dev) } } else { - ifmedia_init(&sc->arge_ifmedia, 0, + ifmedia_init(&sc->arge_ifmedia, 0, arge_multiphy_mediachange, arge_multiphy_mediastatus); ifmedia_add(&sc->arge_ifmedia, - IFM_ETHER | sc->arge_media_type | sc->arge_duplex_mode, + IFM_ETHER | sc->arge_media_type | sc->arge_duplex_mode, 0, NULL); ifmedia_set(&sc->arge_ifmedia, IFM_ETHER | sc->arge_media_type | sc->arge_duplex_mode); @@ -510,7 +509,7 @@ arge_attach(device_t dev) arge_attach_sysctl(dev); fail: - if (error) + if (error) arge_detach(dev); return (error); @@ -548,7 +547,7 @@ arge_detach(device_t dev) bus_teardown_intr(dev, sc->arge_irq, sc->arge_intrhand); if (sc->arge_res) - bus_release_resource(dev, SYS_RES_MEMORY, sc->arge_rid, + bus_release_resource(dev, SYS_RES_MEMORY, sc->arge_rid, sc->arge_res); if (ifp) @@ -597,7 +596,7 @@ arge_miibus_readreg(device_t dev, int ph { struct arge_softc * sc = device_get_softc(dev); int i, result; - uint32_t addr = (phy << MAC_MII_PHY_ADDR_SHIFT) + uint32_t addr = (phy << MAC_MII_PHY_ADDR_SHIFT) | (reg & MAC_MII_REG_MASK); if ((sc->arge_phymask & (1 << phy)) == 0) @@ -609,7 +608,7 @@ arge_miibus_readreg(device_t dev, int ph ARGE_MII_WRITE(AR71XX_MAC_MII_CMD, MAC_MII_CMD_READ); i = ARGE_MII_TIMEOUT; - while ((ARGE_MII_READ(AR71XX_MAC_MII_INDICATOR) & + while ((ARGE_MII_READ(AR71XX_MAC_MII_INDICATOR) & MAC_MII_INDICATOR_BUSY) && (i--)) DELAY(5); @@ -624,7 +623,7 @@ arge_miibus_readreg(device_t dev, int ph ARGE_MII_WRITE(AR71XX_MAC_MII_CMD, MAC_MII_CMD_WRITE); mtx_unlock(&miibus_mtx); - ARGEDEBUG(sc, ARGE_DBG_MII, "%s: phy=%d, reg=%02x, value[%08x]=%04x\n", __func__, + ARGEDEBUG(sc, ARGE_DBG_MII, "%s: phy=%d, reg=%02x, value[%08x]=%04x\n", __func__, phy, reg, addr, result); return (result); @@ -635,14 +634,14 @@ arge_miibus_writereg(device_t dev, int p { struct arge_softc * sc = device_get_softc(dev); int i; - uint32_t addr = + uint32_t addr = (phy << MAC_MII_PHY_ADDR_SHIFT) | (reg & MAC_MII_REG_MASK); if ((sc->arge_phymask & (1 << phy)) == 0) return (-1); - ARGEDEBUG(sc, ARGE_DBG_MII, "%s: phy=%d, reg=%02x, value=%04x\n", __func__, + ARGEDEBUG(sc, ARGE_DBG_MII, "%s: phy=%d, reg=%02x, value=%04x\n", __func__, phy, reg, data); mtx_lock(&miibus_mtx); @@ -650,7 +649,7 @@ arge_miibus_writereg(device_t dev, int p ARGE_MII_WRITE(AR71XX_MAC_MII_CONTROL, data); i = ARGE_MII_TIMEOUT; - while ((ARGE_MII_READ(AR71XX_MAC_MII_INDICATOR) & + while ((ARGE_MII_READ(AR71XX_MAC_MII_INDICATOR) & MAC_MII_INDICATOR_BUSY) && (i--)) DELAY(5); @@ -668,7 +667,7 @@ arge_miibus_writereg(device_t dev, int p static void arge_miibus_statchg(device_t dev) { - struct arge_softc *sc; + struct arge_softc *sc; sc = device_get_softc(dev); taskqueue_enqueue(taskqueue_swi, &sc->arge_link_task); @@ -716,8 +715,8 @@ arge_set_pll(struct arge_softc *sc, int int if_speed; cfg = ARGE_READ(sc, AR71XX_MAC_CFG2); - cfg &= ~(MAC_CFG2_IFACE_MODE_1000 - | MAC_CFG2_IFACE_MODE_10_100 + cfg &= ~(MAC_CFG2_IFACE_MODE_1000 + | MAC_CFG2_IFACE_MODE_10_100 | MAC_CFG2_FULL_DUPLEX); if (duplex == IFM_FDX) @@ -725,7 +724,7 @@ arge_set_pll(struct arge_softc *sc, int ifcontrol = ARGE_READ(sc, AR71XX_MAC_IFCONTROL); ifcontrol &= ~MAC_IFCONTROL_SPEED; - rx_filtmask = + rx_filtmask = ARGE_READ(sc, AR71XX_MAC_FIFO_RX_FILTMASK); rx_filtmask &= ~FIFO_RX_MASK_BYTE_MODE; @@ -747,7 +746,7 @@ arge_set_pll(struct arge_softc *sc, int break; default: if_speed = 100; - device_printf(sc->arge_dev, + device_printf(sc->arge_dev, "Unknown media %d\n", media); } @@ -767,7 +766,7 @@ arge_set_pll(struct arge_softc *sc, int ARGE_WRITE(sc, AR71XX_MAC_CFG2, cfg); ARGE_WRITE(sc, AR71XX_MAC_IFCONTROL, ifcontrol); - ARGE_WRITE(sc, AR71XX_MAC_FIFO_RX_FILTMASK, + ARGE_WRITE(sc, AR71XX_MAC_FIFO_RX_FILTMASK, rx_filtmask); ARGE_WRITE(sc, AR71XX_MAC_FIFO_TX_THRESHOLD, fifo_tx); @@ -789,18 +788,18 @@ arge_reset_dma(struct arge_softc *sc) while(ARGE_READ(sc, AR71XX_DMA_RX_STATUS) & DMA_RX_STATUS_PKT_RECVD) ARGE_WRITE(sc, AR71XX_DMA_RX_STATUS, DMA_RX_STATUS_PKT_RECVD); - /* + /* * Clear all possible TX interrupts */ while(ARGE_READ(sc, AR71XX_DMA_TX_STATUS) & DMA_TX_STATUS_PKT_SENT) ARGE_WRITE(sc, AR71XX_DMA_TX_STATUS, DMA_TX_STATUS_PKT_SENT); - /* + /* * Now Rx/Tx errors */ - ARGE_WRITE(sc, AR71XX_DMA_RX_STATUS, + ARGE_WRITE(sc, AR71XX_DMA_RX_STATUS, DMA_RX_STATUS_BUS_ERROR | DMA_RX_STATUS_OVERFLOW); - ARGE_WRITE(sc, AR71XX_DMA_TX_STATUS, + ARGE_WRITE(sc, AR71XX_DMA_TX_STATUS, DMA_TX_STATUS_BUS_ERROR | DMA_TX_STATUS_UNDERRUN); } @@ -923,7 +922,7 @@ arge_encap(struct arge_softc *sc, struct prod = sc->arge_cdata.arge_tx_prod; txd = &sc->arge_cdata.arge_txdesc[prod]; - error = bus_dmamap_load_mbuf_sg(sc->arge_cdata.arge_tx_tag, + error = bus_dmamap_load_mbuf_sg(sc->arge_cdata.arge_tx_tag, txd->tx_dmamap, *m_head, txsegs, &nsegs, BUS_DMA_NOWAIT); if (error == EFBIG) { @@ -947,7 +946,7 @@ arge_encap(struct arge_softc *sc, struct bus_dmamap_sync(sc->arge_cdata.arge_tx_tag, txd->tx_dmamap, BUS_DMASYNC_PREWRITE); - /* + /* * Make a list of descriptors for this packet. DMA controller will * walk through it while arge_link is not zero. */ @@ -961,7 +960,7 @@ arge_encap(struct arge_softc *sc, struct panic("TX packet address unaligned\n"); desc->packet_addr = txsegs[i].ds_addr; - + /* link with previous descriptor */ if (prev_desc) prev_desc->packet_ctrl |= ARGE_DESC_MORE; @@ -1097,7 +1096,7 @@ arge_ioctl(struct ifnet *ifp, u_long com & (IFF_PROMISC | IFF_ALLMULTI)) != 0) { /* XXX: handle promisc & multi flags */ } - + } else { if (!sc->arge_detach) arge_init_locked(sc); @@ -1121,7 +1120,7 @@ arge_ioctl(struct ifnet *ifp, u_long com mii = device_get_softc(sc->arge_miibus); error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command); } - else + else error = ifmedia_ioctl(ifp, ifr, &sc->arge_ifmedia, command); break; case SIOCSIFCAP: @@ -1701,14 +1700,14 @@ arge_rx_locked(struct arge_softc *sc) sc->arge_cdata.arge_rx_ring_map, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); - for (prog = 0; prog < ARGE_RX_RING_COUNT; + for (prog = 0; prog < ARGE_RX_RING_COUNT; ARGE_INC(cons, ARGE_RX_RING_COUNT)) { cur_rx = &sc->arge_rdata.arge_rx_ring[cons]; rxd = &sc->arge_cdata.arge_rxdesc[cons]; m = rxd->rx_m; if ((cur_rx->packet_ctrl & ARGE_DESC_EMPTY) != 0) - break; + break; ARGE_WRITE(sc, AR71XX_DMA_RX_STATUS, DMA_RX_STATUS_PKT_RECVD); @@ -1737,7 +1736,7 @@ arge_rx_locked(struct arge_softc *sc) i = sc->arge_cdata.arge_rx_cons; for (; prog > 0 ; prog--) { if (arge_newbuf(sc, i) != 0) { - device_printf(sc->arge_dev, + device_printf(sc->arge_dev, "Failed to allocate buffer\n"); break; } @@ -1766,7 +1765,7 @@ arge_intr_filter(void *arg) ARGEDEBUG(sc, ARGE_DBG_INTR, "int mask(filter) = %b\n", ints, "\20\10RX_BUS_ERROR\7RX_OVERFLOW\5RX_PKT_RCVD" "\4TX_BUS_ERROR\2TX_UNDERRUN\1TX_PKT_SENT"); - ARGEDEBUG(sc, ARGE_DBG_INTR, "status(filter) = %b\n", status, + ARGEDEBUG(sc, ARGE_DBG_INTR, "status(filter) = %b\n", status, "\20\10RX_BUS_ERROR\7RX_OVERFLOW\5RX_PKT_RCVD" "\4TX_BUS_ERROR\2TX_UNDERRUN\1TX_PKT_SENT"); @@ -1774,7 +1773,7 @@ arge_intr_filter(void *arg) sc->arge_intr_status |= status; ARGE_WRITE(sc, AR71XX_DMA_INTR, 0); return (FILTER_SCHEDULE_THREAD); - } + } sc->arge_intr_status = 0; return (FILTER_STRAY); @@ -1790,12 +1789,12 @@ arge_intr(void *arg) status = ARGE_READ(sc, AR71XX_DMA_INTR_STATUS); status |= sc->arge_intr_status; - ARGEDEBUG(sc, ARGE_DBG_INTR, "int status(intr) = %b\n", status, + ARGEDEBUG(sc, ARGE_DBG_INTR, "int status(intr) = %b\n", status, "\20\10\7RX_OVERFLOW\5RX_PKT_RCVD" "\4TX_BUS_ERROR\2TX_UNDERRUN\1TX_PKT_SENT"); - /* - * Is it our interrupt at all? + /* + * Is it our interrupt at all? */ if (status == 0) return; @@ -1817,9 +1816,9 @@ arge_intr(void *arg) if (status & DMA_INTR_RX_PKT_RCVD) arge_rx_locked(sc); - /* - * RX overrun disables the receiver. - * Clear indication and re-enable rx. + /* + * RX overrun disables the receiver. + * Clear indication and re-enable rx. */ if ( status & DMA_INTR_RX_OVERFLOW) { ARGE_WRITE(sc, AR71XX_DMA_RX_STATUS, DMA_RX_STATUS_OVERFLOW); @@ -1829,16 +1828,16 @@ arge_intr(void *arg) if (status & DMA_INTR_TX_PKT_SENT) arge_tx_locked(sc); - /* - * Underrun turns off TX. Clear underrun indication. - * If there's anything left in the ring, reactivate the tx. + /* + * Underrun turns off TX. Clear underrun indication. + * If there's anything left in the ring, reactivate the tx. */ if (status & DMA_INTR_TX_UNDERRUN) { ARGE_WRITE(sc, AR71XX_DMA_TX_STATUS, DMA_TX_STATUS_UNDERRUN); sc->stats.tx_underflow++; ARGEDEBUG(sc, ARGE_DBG_TX, "%s: TX underrun; tx_cnt=%d\n", __func__, sc->arge_cdata.arge_tx_cnt); if (sc->arge_cdata.arge_tx_cnt > 0 ) { - ARGE_WRITE(sc, AR71XX_DMA_TX_CONTROL, + ARGE_WRITE(sc, AR71XX_DMA_TX_CONTROL, DMA_TX_CONTROL_EN); } } @@ -1870,7 +1869,7 @@ arge_intr(void *arg) sc->arge_intr_status = 0; ARGE_UNLOCK(sc); /* - * re-enable all interrupts + * re-enable all interrupts */ ARGE_WRITE(sc, AR71XX_DMA_INTR, DMA_INTR_ALL); } @@ -1902,7 +1901,7 @@ arge_multiphy_mediachange(struct ifnet * return (EINVAL); if (IFM_SUBTYPE(ife->ifm_media) == IFM_AUTO) { - device_printf(sc->arge_dev, + device_printf(sc->arge_dev, "AUTO is not supported for multiphy MAC"); return (EINVAL); } @@ -1919,7 +1918,7 @@ arge_multiphy_mediastatus(struct ifnet * struct arge_softc *sc = ifp->if_softc; ifmr->ifm_status = IFM_AVALID | IFM_ACTIVE; - ifmr->ifm_active = IFM_ETHER | sc->arge_media_type | + ifmr->ifm_active = IFM_ETHER | sc->arge_media_type | sc->arge_duplex_mode; } From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 22:45:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D81F106564A; Tue, 6 Mar 2012 22:45:55 +0000 (UTC) (envelope-from ray@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4BA988FC0A; Tue, 6 Mar 2012 22:45:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26MjtIB060829; Tue, 6 Mar 2012 22:45:55 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26MjtA2060827; Tue, 6 Mar 2012 22:45:55 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201203062245.q26MjtA2060827@svn.freebsd.org> From: Aleksandr Rybalko Date: Tue, 6 Mar 2012 22:45:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232628 - head/sys/mips/atheros X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 22:45:55 -0000 Author: ray Date: Tue Mar 6 22:45:54 2012 New Revision: 232628 URL: http://svn.freebsd.org/changeset/base/232628 Log: Break long lines. Approved by: adri (mentor) Modified: head/sys/mips/atheros/if_arge.c Modified: head/sys/mips/atheros/if_arge.c ============================================================================== --- head/sys/mips/atheros/if_arge.c Tue Mar 6 22:16:10 2012 (r232627) +++ head/sys/mips/atheros/if_arge.c Tue Mar 6 22:45:54 2012 (r232628) @@ -220,8 +220,8 @@ arge_attach_sysctl(device_t dev) "number of TX aligned packets"); SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, - "tx_pkts_unaligned", CTLFLAG_RW, &sc->stats.tx_pkts_unaligned, 0, - "number of TX unaligned packets"); + "tx_pkts_unaligned", CTLFLAG_RW, &sc->stats.tx_pkts_unaligned, + 0, "number of TX unaligned packets"); #ifdef ARGE_DEBUG SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "tx_prod", @@ -262,7 +262,8 @@ arge_attach(device_t dev) resource_long_value(device_get_name(dev), device_get_unit(dev), "eeprommac", &eeprom_mac_addr) == 0) { int i; - const char *mac = (const char *) MIPS_PHYS_TO_KSEG1(eeprom_mac_addr); + const char *mac = + (const char *) MIPS_PHYS_TO_KSEG1(eeprom_mac_addr); device_printf(dev, "Overriding MAC from EEPROM\n"); for (i = 0; i < 6; i++) { ar711_base_mac[i] = mac[i]; @@ -287,7 +288,8 @@ arge_attach(device_t dev) /* Use all phys up to 4 */ phymask = (1 << 4) - 1; - device_printf(dev, "No PHY specified, using mask %d\n", phymask); + device_printf(dev, "No PHY specified, using mask %d\n", + phymask); } /* @@ -407,9 +409,11 @@ arge_attach(device_t dev) DELAY(20); /* Step 2. Punt the MAC core from the central reset register */ - ar71xx_device_stop(sc->arge_mac_unit == 0 ? RST_RESET_GE0_MAC : RST_RESET_GE1_MAC); + ar71xx_device_stop(sc->arge_mac_unit == 0 ? RST_RESET_GE0_MAC : + RST_RESET_GE1_MAC); DELAY(100); - ar71xx_device_start(sc->arge_mac_unit == 0 ? RST_RESET_GE0_MAC : RST_RESET_GE1_MAC); + ar71xx_device_start(sc->arge_mac_unit == 0 ? RST_RESET_GE0_MAC : + RST_RESET_GE1_MAC); /* Step 3. Reconfigure MAC block */ ARGE_WRITE(sc, AR71XX_MAC_CFG1, @@ -433,7 +437,7 @@ arge_attach(device_t dev) * set all four addresses to 66-88-aa-cc-dd-ee */ ARGE_WRITE(sc, AR71XX_MAC_STA_ADDR1, - (eaddr[2] << 24) | (eaddr[3] << 16) | (eaddr[4] << 8) | eaddr[5]); + (eaddr[2] << 24) | (eaddr[3] << 16) | (eaddr[4] << 8) | eaddr[5]); ARGE_WRITE(sc, AR71XX_MAC_STA_ADDR2, (eaddr[0] << 8) | eaddr[1]); ARGE_WRITE(sc, AR71XX_MAC_FIFO_CFG0, @@ -521,7 +525,8 @@ arge_detach(device_t dev) struct arge_softc *sc = device_get_softc(dev); struct ifnet *ifp = sc->arge_ifp; - KASSERT(mtx_initialized(&sc->arge_mtx), ("arge mutex not initialized")); + KASSERT(mtx_initialized(&sc->arge_mtx), + ("arge mutex not initialized")); /* These should only be active if attach succeeded */ if (device_is_attached(dev)) { @@ -623,8 +628,9 @@ arge_miibus_readreg(device_t dev, int ph ARGE_MII_WRITE(AR71XX_MAC_MII_CMD, MAC_MII_CMD_WRITE); mtx_unlock(&miibus_mtx); - ARGEDEBUG(sc, ARGE_DBG_MII, "%s: phy=%d, reg=%02x, value[%08x]=%04x\n", __func__, - phy, reg, addr, result); + ARGEDEBUG(sc, ARGE_DBG_MII, + "%s: phy=%d, reg=%02x, value[%08x]=%04x\n", + __func__, phy, reg, addr, result); return (result); } @@ -641,8 +647,8 @@ arge_miibus_writereg(device_t dev, int p if ((sc->arge_phymask & (1 << phy)) == 0) return (-1); - ARGEDEBUG(sc, ARGE_DBG_MII, "%s: phy=%d, reg=%02x, value=%04x\n", __func__, - phy, reg, data); + ARGEDEBUG(sc, ARGE_DBG_MII, "%s: phy=%d, reg=%02x, value=%04x\n", + __func__, phy, reg, data); mtx_lock(&miibus_mtx); ARGE_MII_WRITE(AR71XX_MAC_MII_ADDR, addr); @@ -979,7 +985,8 @@ arge_encap(struct arge_softc *sc, struct BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); /* Start transmitting */ - ARGEDEBUG(sc, ARGE_DBG_TX, "%s: setting DMA_TX_CONTROL_EN\n", __func__); + ARGEDEBUG(sc, ARGE_DBG_TX, "%s: setting DMA_TX_CONTROL_EN\n", + __func__); ARGE_WRITE(sc, AR71XX_DMA_TX_CONTROL, DMA_TX_CONTROL_EN); return (0); } @@ -1022,8 +1029,10 @@ arge_start_locked(struct ifnet *ifp) */ if (sc->arge_cdata.arge_tx_cnt >= ARGE_TX_RING_COUNT - 2) { ifp->if_drv_flags |= IFF_DRV_OACTIVE; - ARGEDEBUG(sc, ARGE_DBG_ERR, "%s: tx_cnt %d >= max %d; setting IFF_DRV_OACTIVE\n", - __func__, sc->arge_cdata.arge_tx_cnt, ARGE_TX_RING_COUNT - 2); + ARGEDEBUG(sc, ARGE_DBG_ERR, + "%s: tx_cnt %d >= max %d; setting IFF_DRV_OACTIVE\n", + __func__, sc->arge_cdata.arge_tx_cnt, + ARGE_TX_RING_COUNT - 2); return; } @@ -1054,7 +1063,8 @@ arge_start_locked(struct ifnet *ifp) */ ETHER_BPF_MTAP(ifp, m_head); } - ARGEDEBUG(sc, ARGE_DBG_TX, "%s: finished; queued %d packets\n", __func__, enq); + ARGEDEBUG(sc, ARGE_DBG_TX, "%s: finished; queued %d packets\n", + __func__, enq); } static void @@ -1118,10 +1128,12 @@ arge_ioctl(struct ifnet *ifp, u_long com case SIOCSIFMEDIA: if (sc->arge_miibus) { mii = device_get_softc(sc->arge_miibus); - error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command); + error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, + command); } else - error = ifmedia_ioctl(ifp, ifr, &sc->arge_ifmedia, command); + error = ifmedia_ioctl(ifp, ifr, &sc->arge_ifmedia, + command); break; case SIOCSIFCAP: /* XXX: Check other capabilities */ @@ -1231,7 +1243,8 @@ arge_dma_alloc(struct arge_softc *sc) NULL, NULL, /* lockfunc, lockarg */ &sc->arge_cdata.arge_parent_tag); if (error != 0) { - device_printf(sc->arge_dev, "failed to create parent DMA tag\n"); + device_printf(sc->arge_dev, + "failed to create parent DMA tag\n"); goto fail; } /* Create tag for Tx ring. */ @@ -1248,7 +1261,8 @@ arge_dma_alloc(struct arge_softc *sc) NULL, NULL, /* lockfunc, lockarg */ &sc->arge_cdata.arge_tx_ring_tag); if (error != 0) { - device_printf(sc->arge_dev, "failed to create Tx ring DMA tag\n"); + device_printf(sc->arge_dev, + "failed to create Tx ring DMA tag\n"); goto fail; } @@ -1266,7 +1280,8 @@ arge_dma_alloc(struct arge_softc *sc) NULL, NULL, /* lockfunc, lockarg */ &sc->arge_cdata.arge_rx_ring_tag); if (error != 0) { - device_printf(sc->arge_dev, "failed to create Rx ring DMA tag\n"); + device_printf(sc->arge_dev, + "failed to create Rx ring DMA tag\n"); goto fail; } @@ -1309,7 +1324,8 @@ arge_dma_alloc(struct arge_softc *sc) /* Allocate DMA'able memory and load the DMA map for Tx ring. */ error = bus_dmamem_alloc(sc->arge_cdata.arge_tx_ring_tag, (void **)&sc->arge_rdata.arge_tx_ring, BUS_DMA_WAITOK | - BUS_DMA_COHERENT | BUS_DMA_ZERO, &sc->arge_cdata.arge_tx_ring_map); + BUS_DMA_COHERENT | BUS_DMA_ZERO, + &sc->arge_cdata.arge_tx_ring_map); if (error != 0) { device_printf(sc->arge_dev, "failed to allocate DMA'able memory for Tx ring\n"); @@ -1330,7 +1346,8 @@ arge_dma_alloc(struct arge_softc *sc) /* Allocate DMA'able memory and load the DMA map for Rx ring. */ error = bus_dmamem_alloc(sc->arge_cdata.arge_rx_ring_tag, (void **)&sc->arge_rdata.arge_rx_ring, BUS_DMA_WAITOK | - BUS_DMA_COHERENT | BUS_DMA_ZERO, &sc->arge_cdata.arge_rx_ring_map); + BUS_DMA_COHERENT | BUS_DMA_ZERO, + &sc->arge_cdata.arge_rx_ring_map); if (error != 0) { device_printf(sc->arge_dev, "failed to allocate DMA'able memory for Rx ring\n"); @@ -1632,7 +1649,8 @@ arge_tx_locked(struct arge_softc *sc) cons = sc->arge_cdata.arge_tx_cons; prod = sc->arge_cdata.arge_tx_prod; - ARGEDEBUG(sc, ARGE_DBG_TX, "%s: cons=%d, prod=%d\n", __func__, cons, prod); + ARGEDEBUG(sc, ARGE_DBG_TX, "%s: cons=%d, prod=%d\n", __func__, cons, + prod); if (cons == prod) return; @@ -1835,7 +1853,8 @@ arge_intr(void *arg) if (status & DMA_INTR_TX_UNDERRUN) { ARGE_WRITE(sc, AR71XX_DMA_TX_STATUS, DMA_TX_STATUS_UNDERRUN); sc->stats.tx_underflow++; - ARGEDEBUG(sc, ARGE_DBG_TX, "%s: TX underrun; tx_cnt=%d\n", __func__, sc->arge_cdata.arge_tx_cnt); + ARGEDEBUG(sc, ARGE_DBG_TX, "%s: TX underrun; tx_cnt=%d\n", + __func__, sc->arge_cdata.arge_tx_cnt); if (sc->arge_cdata.arge_tx_cnt > 0 ) { ARGE_WRITE(sc, AR71XX_DMA_TX_CONTROL, DMA_TX_CONTROL_EN); From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 22:58:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D4D01065673; Tue, 6 Mar 2012 22:58:14 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EF6088FC18; Tue, 6 Mar 2012 22:58:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26MwDZY061232; Tue, 6 Mar 2012 22:58:13 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26MwDI6061226; Tue, 6 Mar 2012 22:58:13 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201203062258.q26MwDI6061226@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Mar 2012 22:58:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232629 - in head: sbin/ifconfig sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 22:58:14 -0000 Author: thompsa Date: Tue Mar 6 22:58:13 2012 New Revision: 232629 URL: http://svn.freebsd.org/changeset/base/232629 Log: Add the ability to set which packet layers are used for the load balance hash calculation. Modified: head/sbin/ifconfig/ifconfig.8 head/sbin/ifconfig/iflagg.c head/sys/net/ieee8023ad_lacp.c head/sys/net/if_lagg.c head/sys/net/if_lagg.h Modified: head/sbin/ifconfig/ifconfig.8 ============================================================================== --- head/sbin/ifconfig/ifconfig.8 Tue Mar 6 22:45:54 2012 (r232628) +++ head/sbin/ifconfig/ifconfig.8 Tue Mar 6 22:58:13 2012 (r232629) @@ -2309,6 +2309,21 @@ Set the aggregation protocol. The default is failover. The available options are failover, fec, lacp, loadbalance, roundrobin and none. +.It Cm lagghash Ar option Ns Oo , Ns Ar option Oc +Set the packet layers to hash for aggregation protocols which load balance. +The default is +.Dq l2,l3,l4 . +The options can be combined using commas. +.Pp +.Bl -tag -width ".Cm l2" -compact +.It Cm l2 +src/dst mac address and optional vlan number. +.It Cm l3 +src/dst address for IPv4 or IPv6. +.It Cm l4 +src/dst port for TCP/UCP/SCTP. +.El +.Pp .El .Pp The following parameters are specific to IP tunnel interfaces, Modified: head/sbin/ifconfig/iflagg.c ============================================================================== --- head/sbin/ifconfig/iflagg.c Tue Mar 6 22:45:54 2012 (r232628) +++ head/sbin/ifconfig/iflagg.c Tue Mar 6 22:58:13 2012 (r232629) @@ -81,6 +81,36 @@ setlaggproto(const char *val, int d, int err(1, "SIOCSLAGG"); } +static void +setlagghash(const char *val, int d, int s, const struct afswtch *afp) +{ + struct lagg_reqflags rf; + char *str, *tmp, *tok; + + + rf.rf_flags = 0; + str = tmp = strdup(val); + while ((tok = strsep(&tmp, ",")) != NULL) { + if (strcmp(tok, "l2") == 0) + rf.rf_flags |= LAGG_F_HASHL2; + else if (strcmp(tok, "l3") == 0) + rf.rf_flags |= LAGG_F_HASHL3; + else if (strcmp(tok, "l4") == 0) + rf.rf_flags |= LAGG_F_HASHL4; + else { + free(str); + errx(1, "Invalid lagghash option: %s", tok); + } + } + free(str); + if (rf.rf_flags == 0) + errx(1, "No lagghash options supplied"); + + strlcpy(rf.rf_ifname, name, sizeof(rf.rf_ifname)); + if (ioctl(s, SIOCSLAGGHASH, &rf)) + err(1, "SIOCSLAGGHASH"); +} + static char * lacp_format_mac(const uint8_t *mac, char *buf, size_t buflen) { @@ -115,6 +145,7 @@ lagg_status(int s) struct lagg_protos lpr[] = LAGG_PROTOS; struct lagg_reqport rp, rpbuf[LAGG_MAX_PORTS]; struct lagg_reqall ra; + struct lagg_reqflags rf; struct lacp_opreq *lp; const char *proto = ""; int i, isport = 0; @@ -132,6 +163,10 @@ lagg_status(int s) ra.ra_size = sizeof(rpbuf); ra.ra_port = rpbuf; + strlcpy(rf.rf_ifname, name, sizeof(rf.rf_ifname)); + if (ioctl(s, SIOCGLAGGFLAGS, &rf) != 0) + rf.rf_flags = 0; + if (ioctl(s, SIOCGLAGG, &ra) == 0) { lp = (struct lacp_opreq *)&ra.ra_lacpreq; @@ -143,6 +178,23 @@ lagg_status(int s) } printf("\tlaggproto %s", proto); + if (rf.rf_flags & LAGG_F_HASHMASK) { + const char *sep = ""; + + printf(" lagghash "); + if (rf.rf_flags & LAGG_F_HASHL2) { + printf("%sl2", sep); + sep = ","; + } + if (rf.rf_flags & LAGG_F_HASHL3) { + printf("%sl3", sep); + sep = ","; + } + if (rf.rf_flags & LAGG_F_HASHL4) { + printf("%sl4", sep); + sep = ","; + } + } if (isport) printf(" laggdev %s", rp.rp_ifname); putchar('\n'); @@ -174,6 +226,7 @@ static struct cmd lagg_cmds[] = { DEF_CMD_ARG("laggport", setlaggport), DEF_CMD_ARG("-laggport", unsetlaggport), DEF_CMD_ARG("laggproto", setlaggproto), + DEF_CMD_ARG("lagghash", setlagghash), }; static struct afswtch af_lagg = { .af_name = "af_lagg", Modified: head/sys/net/ieee8023ad_lacp.c ============================================================================== --- head/sys/net/ieee8023ad_lacp.c Tue Mar 6 22:45:54 2012 (r232628) +++ head/sys/net/ieee8023ad_lacp.c Tue Mar 6 22:58:13 2012 (r232629) @@ -815,7 +815,7 @@ lacp_select_tx_port(struct lagg_softc *s if (sc->use_flowid && (m->m_flags & M_FLOWID)) hash = m->m_pkthdr.flowid; else - hash = lagg_hashmbuf(m, lsc->lsc_hashkey); + hash = lagg_hashmbuf(sc, m, lsc->lsc_hashkey); hash %= pm->pm_count; lp = pm->pm_map[hash]; Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Tue Mar 6 22:45:54 2012 (r232628) +++ head/sys/net/if_lagg.c Tue Mar 6 22:58:13 2012 (r232629) @@ -285,6 +285,8 @@ lagg_clone_create(struct if_clone *ifc, SYSCTL_ADD_INT(&sc->ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "use_flowid", CTLTYPE_INT|CTLFLAG_RW, &sc->use_flowid, sc->use_flowid, "Use flow id for load sharing"); + /* Hash all layers by default */ + sc->sc_flags = LAGG_F_HASHL2|LAGG_F_HASHL3|LAGG_F_HASHL4; sc->sc_proto = LAGG_PROTO_NONE; for (i = 0; lagg_protos[i].ti_proto != LAGG_PROTO_NONE; i++) { @@ -895,6 +897,7 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd struct lagg_softc *sc = (struct lagg_softc *)ifp->if_softc; struct lagg_reqall *ra = (struct lagg_reqall *)data; struct lagg_reqport *rp = (struct lagg_reqport *)data, rpbuf; + struct lagg_reqflags *rf = (struct lagg_reqflags *)data; struct ifreq *ifr = (struct ifreq *)data; struct lagg_port *lp; struct ifnet *tpif; @@ -984,6 +987,22 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd } error = EPROTONOSUPPORT; break; + case SIOCGLAGGFLAGS: + rf->rf_flags = sc->sc_flags; + break; + case SIOCSLAGGHASH: + error = priv_check(td, PRIV_NET_LAGG); + if (error) + break; + if ((rf->rf_flags & LAGG_F_HASHMASK) == 0) { + error = EINVAL; + break; + } + LAGG_WLOCK(sc); + sc->sc_flags &= ~LAGG_F_HASHMASK; + sc->sc_flags |= rf->rf_flags & LAGG_F_HASHMASK; + LAGG_WUNLOCK(sc); + break; case SIOCGLAGGPORT: if (rp->rp_portname[0] == '\0' || (tpif = ifunit(rp->rp_portname)) == NULL) { @@ -1413,34 +1432,46 @@ lagg_gethdr(struct mbuf *m, u_int off, u } uint32_t -lagg_hashmbuf(struct mbuf *m, uint32_t key) +lagg_hashmbuf(struct lagg_softc *sc, struct mbuf *m, uint32_t key) { uint16_t etype; - uint32_t p = 0; + uint32_t p = key; int off; struct ether_header *eh; struct ether_vlan_header vlanbuf; const struct ether_vlan_header *vlan; #ifdef INET const struct ip *ip; - struct ip ipbuf; + const uint32_t *ports; + int iphlen; #endif #ifdef INET6 const struct ip6_hdr *ip6; - struct ip6_hdr ip6buf; uint32_t flow; #endif + union { +#ifdef INET + struct ip ip; +#endif +#ifdef INET6 + struct ip6_hdr ip6; +#endif + uint32_t port; + } buf; + off = sizeof(*eh); if (m->m_len < off) goto out; eh = mtod(m, struct ether_header *); etype = ntohs(eh->ether_type); - p = hash32_buf(&eh->ether_shost, ETHER_ADDR_LEN, key); - p = hash32_buf(&eh->ether_dhost, ETHER_ADDR_LEN, p); + if (sc->sc_flags & LAGG_F_HASHL2) { + p = hash32_buf(&eh->ether_shost, ETHER_ADDR_LEN, p); + p = hash32_buf(&eh->ether_dhost, ETHER_ADDR_LEN, p); + } /* Special handling for encapsulating VLAN frames */ - if (m->m_flags & M_VLANTAG) { + if ((m->m_flags & M_VLANTAG) && (sc->sc_flags & LAGG_F_HASHL2)) { p = hash32_buf(&m->m_pkthdr.ether_vtag, sizeof(m->m_pkthdr.ether_vtag), p); } else if (etype == ETHERTYPE_VLAN) { @@ -1448,7 +1479,8 @@ lagg_hashmbuf(struct mbuf *m, uint32_t k if (vlan == NULL) goto out; - p = hash32_buf(&vlan->evl_tag, sizeof(vlan->evl_tag), p); + if (sc->sc_flags & LAGG_F_HASHL2) + p = hash32_buf(&vlan->evl_tag, sizeof(vlan->evl_tag), p); etype = ntohs(vlan->evl_proto); off += sizeof(*vlan) - sizeof(*eh); } @@ -1456,17 +1488,37 @@ lagg_hashmbuf(struct mbuf *m, uint32_t k switch (etype) { #ifdef INET case ETHERTYPE_IP: - ip = lagg_gethdr(m, off, sizeof(*ip), &ipbuf); + ip = lagg_gethdr(m, off, sizeof(*ip), &buf); if (ip == NULL) goto out; - p = hash32_buf(&ip->ip_src, sizeof(struct in_addr), p); - p = hash32_buf(&ip->ip_dst, sizeof(struct in_addr), p); + if (sc->sc_flags & LAGG_F_HASHL3) { + p = hash32_buf(&ip->ip_src, sizeof(struct in_addr), p); + p = hash32_buf(&ip->ip_dst, sizeof(struct in_addr), p); + } + if (!(sc->sc_flags & LAGG_F_HASHL4)) + break; + switch (ip->ip_p) { + case IPPROTO_TCP: + case IPPROTO_UDP: + case IPPROTO_SCTP: + iphlen = ip->ip_hl << 2; + if (iphlen < sizeof(*ip)) + break; + off += iphlen; + ports = lagg_gethdr(m, off, sizeof(*ports), &buf); + if (ports == NULL) + break; + p = hash32_buf(ports, sizeof(*ports), p); + break; + } break; #endif #ifdef INET6 case ETHERTYPE_IPV6: - ip6 = lagg_gethdr(m, off, sizeof(*ip6), &ip6buf); + if (!(sc->sc_flags & LAGG_F_HASHL3)) + break; + ip6 = lagg_gethdr(m, off, sizeof(*ip6), &buf); if (ip6 == NULL) goto out; @@ -1696,7 +1748,7 @@ lagg_lb_start(struct lagg_softc *sc, str if (sc->use_flowid && (m->m_flags & M_FLOWID)) p = m->m_pkthdr.flowid; else - p = lagg_hashmbuf(m, lb->lb_key); + p = lagg_hashmbuf(sc, m, lb->lb_key); p %= sc->sc_count; lp = lb->lb_ports[p]; Modified: head/sys/net/if_lagg.h ============================================================================== --- head/sys/net/if_lagg.h Tue Mar 6 22:45:54 2012 (r232628) +++ head/sys/net/if_lagg.h Tue Mar 6 22:58:13 2012 (r232629) @@ -31,6 +31,12 @@ #define LAGG_MAX_NAMESIZE 32 /* name of a protocol */ #define LAGG_MAX_STACKING 4 /* maximum number of stacked laggs */ +/* Lagg flags */ +#define LAGG_F_HASHL2 0x00000001 /* hash layer 2 */ +#define LAGG_F_HASHL3 0x00000002 /* hash layer 3 */ +#define LAGG_F_HASHL4 0x00000004 /* hash layer 4 */ +#define LAGG_F_HASHMASK 0x00000007 + /* Port flags */ #define LAGG_PORT_SLAVE 0x00000000 /* normal enslaved port */ #define LAGG_PORT_MASTER 0x00000001 /* primary port */ @@ -122,6 +128,14 @@ struct lagg_reqall { #define SIOCGLAGG _IOWR('i', 143, struct lagg_reqall) #define SIOCSLAGG _IOW('i', 144, struct lagg_reqall) +struct lagg_reqflags { + char rf_ifname[IFNAMSIZ]; /* name of the lagg */ + uint32_t rf_flags; /* lagg protocol */ +}; + +#define SIOCGLAGGFLAGS _IOWR('i', 145, struct lagg_reqflags) +#define SIOCSLAGGHASH _IOW('i', 146, struct lagg_reqflags) + #ifdef _KERNEL /* * Internal kernel part @@ -179,6 +193,7 @@ struct lagg_softc { struct ifmedia sc_media; /* media config */ caddr_t sc_psc; /* protocol data */ uint32_t sc_seq; /* sequence counter */ + uint32_t sc_flags; SLIST_HEAD(__tplhd, lagg_port) sc_ports; /* list of interfaces */ SLIST_ENTRY(lagg_softc) sc_entries; @@ -244,7 +259,7 @@ extern struct mbuf *(*lagg_input_p)(stru extern void (*lagg_linkstate_p)(struct ifnet *, int ); int lagg_enqueue(struct ifnet *, struct mbuf *); -uint32_t lagg_hashmbuf(struct mbuf *, uint32_t); +uint32_t lagg_hashmbuf(struct lagg_softc *, struct mbuf *, uint32_t); #endif /* _KERNEL */ From owner-svn-src-all@FreeBSD.ORG Tue Mar 6 23:08:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A456A106566C; Tue, 6 Mar 2012 23:08:03 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 930AF8FC1B; Tue, 6 Mar 2012 23:08:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q26N83EU061577; Tue, 6 Mar 2012 23:08:03 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q26N83i3061573; Tue, 6 Mar 2012 23:08:03 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203062308.q26N83i3061573@svn.freebsd.org> From: Juli Mallett Date: Tue, 6 Mar 2012 23:08:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232630 - in head/sys/mips: include mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2012 23:08:03 -0000 Author: jmallett Date: Tue Mar 6 23:08:02 2012 New Revision: 232630 URL: http://svn.freebsd.org/changeset/base/232630 Log: Get rid of duplicated versions of the KSU bits. Modified: head/sys/mips/include/cpu.h head/sys/mips/mips/exception.S head/sys/mips/mips/mpboot.S Modified: head/sys/mips/include/cpu.h ============================================================================== --- head/sys/mips/include/cpu.h Tue Mar 6 22:58:13 2012 (r232629) +++ head/sys/mips/include/cpu.h Tue Mar 6 23:08:02 2012 (r232630) @@ -51,11 +51,6 @@ /* BEGIN: these are going away */ -#define SR_KSU_MASK 0x00000018 -#define SR_KSU_USER 0x00000010 -#define SR_KSU_SUPER 0x00000008 -#define SR_KSU_KERNEL 0x00000000 - #define soft_int_mask(softintr) (1 << ((softintr) + 8)) #define hard_int_mask(hardintr) (1 << ((hardintr) + 10)) @@ -69,7 +64,7 @@ #include #include -#define TRAPF_USERMODE(framep) (((framep)->sr & SR_KSU_USER) != 0) +#define TRAPF_USERMODE(framep) (((framep)->sr & MIPS_SR_KSU_USER) != 0) #define TRAPF_PC(framep) ((framep)->pc) #define cpu_getstack(td) ((td)->td_frame->sp) #define cpu_setstack(td, nsp) ((td)->td_frame->sp = (nsp)) Modified: head/sys/mips/mips/exception.S ============================================================================== --- head/sys/mips/mips/exception.S Tue Mar 6 22:58:13 2012 (r232629) +++ head/sys/mips/mips/exception.S Tue Mar 6 23:08:02 2012 (r232630) @@ -162,7 +162,7 @@ VECTOR(MipsException, unknown) .set noat mfc0 k0, MIPS_COP_0_STATUS # Get the status register mfc0 k1, MIPS_COP_0_CAUSE # Get the cause register value. - and k0, k0, SR_KSU_USER # test for user mode + and k0, k0, MIPS_SR_KSU_USER # test for user mode # sneaky but the bits are # with us........ sll k0, k0, 3 # shift user bit for cause index @@ -193,7 +193,7 @@ SlowFault: .set noat mfc0 k0, MIPS_COP_0_STATUS nop - and k0, k0, SR_KSU_USER + and k0, k0, MIPS_SR_KSU_USER bne k0, zero, _C_LABEL(MipsUserGenException) nop .set at @@ -224,7 +224,7 @@ SlowFault: mfc0 a0, MIPS_COP_0_STATUS ;\ li a2, (MIPS_SR_KX | MIPS_SR_SX | MIPS_SR_UX) ; \ or a0, a0, a2 ; \ - li a2, ~(MIPS_SR_INT_IE | MIPS_SR_EXL | SR_KSU_USER) ; \ + li a2, ~(MIPS_SR_INT_IE | MIPS_SR_EXL | MIPS_SR_KSU_USER) ; \ and a0, a0, a2 ; \ mtc0 a0, MIPS_COP_0_STATUS ; \ ITLBNOPFIX @@ -233,14 +233,14 @@ SlowFault: mfc0 a0, MIPS_COP_0_STATUS ;\ li a2, (MIPS_SR_KX | MIPS_SR_UX | MIPS_SR_COP_2_BIT) ; \ or a0, a0, a2 ; \ - li a2, ~(MIPS_SR_INT_IE | MIPS_SR_EXL | SR_KSU_USER) ; \ + li a2, ~(MIPS_SR_INT_IE | MIPS_SR_EXL | MIPS_SR_KSU_USER) ; \ and a0, a0, a2 ; \ mtc0 a0, MIPS_COP_0_STATUS ; \ ITLBNOPFIX #else #define CLEAR_STATUS \ mfc0 a0, MIPS_COP_0_STATUS ;\ - li a2, ~(MIPS_SR_INT_IE | MIPS_SR_EXL | SR_KSU_USER) ; \ + li a2, ~(MIPS_SR_INT_IE | MIPS_SR_EXL | MIPS_SR_KSU_USER) ; \ and a0, a0, a2 ; \ mtc0 a0, MIPS_COP_0_STATUS ; \ ITLBNOPFIX @@ -929,7 +929,7 @@ tlb_insert_random: * Branch to the comprehensive exception processing. */ mfc0 k1, MIPS_COP_0_STATUS - andi k1, k1, SR_KSU_USER + andi k1, k1, MIPS_SR_KSU_USER bnez k1, _C_LABEL(MipsUserGenException) nop Modified: head/sys/mips/mips/mpboot.S ============================================================================== --- head/sys/mips/mips/mpboot.S Tue Mar 6 22:58:13 2012 (r232629) +++ head/sys/mips/mips/mpboot.S Tue Mar 6 23:08:02 2012 (r232630) @@ -42,7 +42,7 @@ mfc0 a0, MIPS_COP_0_STATUS ;\ li a2, (MIPS_SR_KX | MIPS_SR_SX | MIPS_SR_UX) ; \ or a0, a0, a2 ; \ - li a2, ~(MIPS_SR_INT_IE | MIPS_SR_EXL | SR_KSU_USER | MIPS_SR_BEV) ; \ + li a2, ~(MIPS_SR_INT_IE | MIPS_SR_EXL | MIPS_SR_KSU_USER | MIPS_SR_BEV) ; \ and a0, a0, a2 ; \ mtc0 a0, MIPS_COP_0_STATUS #elif defined(__mips_n64) From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 00:16:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0D961065670; Wed, 7 Mar 2012 00:16:32 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF8008FC0A; Wed, 7 Mar 2012 00:16:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q270GWAU063737; Wed, 7 Mar 2012 00:16:32 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q270GWRL063735; Wed, 7 Mar 2012 00:16:32 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201203070016.q270GWRL063735@svn.freebsd.org> From: "Kenneth D. Merry" Date: Wed, 7 Mar 2012 00:16:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232632 - releng/8.3/sys/dev/mpt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 00:16:33 -0000 Author: ken Date: Wed Mar 7 00:16:32 2012 New Revision: 232632 URL: http://svn.freebsd.org/changeset/base/232632 Log: Merge r232563 from stable/8 (r232411 from head): Fix a problem that was causing the mpt(4) driver to attach to MegaRAID cards that should be handled by the mfi(4) driver. The root of the problem is that the mpt(4) driver was masking off the bottom bit of the PCI device ID when deciding which cards to attach to. It appears that a number of the mpt(4) Fibre Channel cards had a LAN variant whose PCI device ID was just one bit off from the FC card's device ID. The FC cards were even and the LAN cards were odd. The problem was that this pattern wasn't carried over on the SAS and parallel SCSI mpt(4) cards. Luckily the SAS and parallel SCSI PCI device IDs were either even numbers, or they would get masked to a supported adjacent PCI device ID, and everything worked well. Now LSI is using some of the odd-numbered PCI device IDs between the 3Gb SAS device IDs for their new MegaRAID cards. This is causing the mpt(4) driver to attach to the RAID cards instead of the mfi(4) driver. The solution is to stop masking off the bottom bit of the device ID, and explicitly list the PCI device IDs of all supported cards. This change should be a no-op for mpt(4) hardware. The only intended functional change is that for the 929X, the is_fc variable gets set. It wasn't being set previously, but needs to be because the 929X is a Fibre Channel card. Reported by: Kashyap Desai Approved by: re (jpaetzel) Modified: releng/8.3/sys/dev/mpt/mpt_pci.c Directory Properties: releng/8.3/sys/ (props changed) Modified: releng/8.3/sys/dev/mpt/mpt_pci.c ============================================================================== --- releng/8.3/sys/dev/mpt/mpt_pci.c Tue Mar 6 23:37:53 2012 (r232631) +++ releng/8.3/sys/dev/mpt/mpt_pci.c Wed Mar 7 00:16:32 2012 (r232632) @@ -129,18 +129,34 @@ __FBSDID("$FreeBSD$"); #define PCI_PRODUCT_LSI_FC919 0x0624 #endif +#ifndef PCI_PRODUCT_LSI_FC919_LAN +#define PCI_PRODUCT_LSI_FC919_LAN 0x0625 +#endif + #ifndef PCI_PRODUCT_LSI_FC929 #define PCI_PRODUCT_LSI_FC929 0x0622 #endif +#ifndef PCI_PRODUCT_LSI_FC929_LAN +#define PCI_PRODUCT_LSI_FC929_LAN 0x0623 +#endif + #ifndef PCI_PRODUCT_LSI_FC929X #define PCI_PRODUCT_LSI_FC929X 0x0626 #endif +#ifndef PCI_PRODUCT_LSI_FC929X_LAN +#define PCI_PRODUCT_LSI_FC929X_LAN 0x0627 +#endif + #ifndef PCI_PRODUCT_LSI_FC919X #define PCI_PRODUCT_LSI_FC919X 0x0628 #endif +#ifndef PCI_PRODUCT_LSI_FC919X_LAN +#define PCI_PRODUCT_LSI_FC919X_LAN 0x0629 +#endif + #ifndef PCI_PRODUCT_LSI_FC7X04X #define PCI_PRODUCT_LSI_FC7X04X 0x0640 #endif @@ -153,6 +169,10 @@ __FBSDID("$FreeBSD$"); #define PCI_PRODUCT_LSI_1030 0x0030 #endif +#ifndef PCI_PRODUCT_LSI_1030ZC +#define PCI_PRODUCT_LSI_1030ZC 0x0031 +#endif + #ifndef PCI_PRODUCT_LSI_SAS1064 #define PCI_PRODUCT_LSI_SAS1064 0x0050 #endif @@ -177,6 +197,10 @@ __FBSDID("$FreeBSD$"); #define PCI_PRODUCT_LSI_SAS1068 0x0054 #endif +#ifndef PCI_PRODUCT_LSI_SAS1068A +#define PCI_PRODUCT_LSI_SAS1068A 0x0055 +#endif + #ifndef PCI_PRODUCT_LSI_SAS1068E #define PCI_PRODUCT_LSI_SAS1068E 0x0058 #endif @@ -232,7 +256,7 @@ mpt_pci_probe(device_t dev) return (ENXIO); } - switch ((pci_get_device(dev) & ~1)) { + switch (pci_get_device(dev)) { case PCI_PRODUCT_LSI_FC909: desc = "LSILogic FC909 FC Adapter"; break; @@ -242,15 +266,27 @@ mpt_pci_probe(device_t dev) case PCI_PRODUCT_LSI_FC919: desc = "LSILogic FC919 FC Adapter"; break; + case PCI_PRODUCT_LSI_FC919_LAN: + desc = "LSILogic FC919 LAN Adapter"; + break; case PCI_PRODUCT_LSI_FC929: desc = "Dual LSILogic FC929 FC Adapter"; break; + case PCI_PRODUCT_LSI_FC929_LAN: + desc = "Dual LSILogic FC929 LAN Adapter"; + break; case PCI_PRODUCT_LSI_FC919X: desc = "LSILogic FC919 FC PCI-X Adapter"; break; + case PCI_PRODUCT_LSI_FC919X_LAN: + desc = "LSILogic FC919 LAN PCI-X Adapter"; + break; case PCI_PRODUCT_LSI_FC929X: desc = "Dual LSILogic FC929X 2Gb/s FC PCI-X Adapter"; break; + case PCI_PRODUCT_LSI_FC929X_LAN: + desc = "Dual LSILogic FC929X LAN PCI-X Adapter"; + break; case PCI_PRODUCT_LSI_FC646: desc = "Dual LSILogic FC7X04X 4Gb/s FC PCI-Express Adapter"; break; @@ -258,6 +294,7 @@ mpt_pci_probe(device_t dev) desc = "Dual LSILogic FC7X04X 4Gb/s FC PCI-X Adapter"; break; case PCI_PRODUCT_LSI_1030: + case PCI_PRODUCT_LSI_1030ZC: desc = "LSILogic 1030 Ultra4 Adapter"; break; case PCI_PRODUCT_LSI_SAS1064: @@ -266,6 +303,7 @@ mpt_pci_probe(device_t dev) case PCI_PRODUCT_LSI_SAS1066: case PCI_PRODUCT_LSI_SAS1066E: case PCI_PRODUCT_LSI_SAS1068: + case PCI_PRODUCT_LSI_SAS1068A: case PCI_PRODUCT_LSI_SAS1068E: case PCI_PRODUCT_LSI_SAS1078: case PCI_PRODUCT_LSI_SAS1078DE: @@ -428,12 +466,17 @@ mpt_pci_attach(device_t dev) return (ENOMEM); } memset(mpt, 0, sizeof(struct mpt_softc)); - switch ((pci_get_device(dev) & ~1)) { + switch (pci_get_device(dev)) { case PCI_PRODUCT_LSI_FC909: case PCI_PRODUCT_LSI_FC909A: case PCI_PRODUCT_LSI_FC919: + case PCI_PRODUCT_LSI_FC919_LAN: case PCI_PRODUCT_LSI_FC929: + case PCI_PRODUCT_LSI_FC929_LAN: + case PCI_PRODUCT_LSI_FC929X: + case PCI_PRODUCT_LSI_FC929X_LAN: case PCI_PRODUCT_LSI_FC919X: + case PCI_PRODUCT_LSI_FC919X_LAN: case PCI_PRODUCT_LSI_FC646: case PCI_PRODUCT_LSI_FC7X04X: mpt->is_fc = 1; @@ -448,6 +491,7 @@ mpt_pci_attach(device_t dev) case PCI_PRODUCT_LSI_SAS1066: case PCI_PRODUCT_LSI_SAS1066E: case PCI_PRODUCT_LSI_SAS1068: + case PCI_PRODUCT_LSI_SAS1068A: case PCI_PRODUCT_LSI_SAS1068E: mpt->is_sas = 1; break; @@ -499,11 +543,17 @@ mpt_pci_attach(device_t dev) * Is this part a dual? * If so, link with our partner (around yet) */ - if ((pci_get_device(dev) & ~1) == PCI_PRODUCT_LSI_FC929 || - (pci_get_device(dev) & ~1) == PCI_PRODUCT_LSI_FC646 || - (pci_get_device(dev) & ~1) == PCI_PRODUCT_LSI_FC7X04X || - (pci_get_device(dev) & ~1) == PCI_PRODUCT_LSI_1030) { + switch (pci_get_device(dev)) { + case PCI_PRODUCT_LSI_FC929: + case PCI_PRODUCT_LSI_FC929_LAN: + case PCI_PRODUCT_LSI_FC646: + case PCI_PRODUCT_LSI_FC7X04X: + case PCI_PRODUCT_LSI_1030: + case PCI_PRODUCT_LSI_1030ZC: mpt_link_peer(mpt); + break; + default: + break; } /* From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 01:26:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 564E01065694; Wed, 7 Mar 2012 01:26:25 +0000 (UTC) (envelope-from mp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3D5DA8FC1B; Wed, 7 Mar 2012 01:26:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q271QPDC065917; Wed, 7 Mar 2012 01:26:25 GMT (envelope-from mp@svn.freebsd.org) Received: (from mp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q271QOH4065905; Wed, 7 Mar 2012 01:26:24 GMT (envelope-from mp@svn.freebsd.org) Message-Id: <201203070126.q271QOH4065905@svn.freebsd.org> From: Mark Peek Date: Wed, 7 Mar 2012 01:26:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232633 - in stable/9: bin/csh contrib/tcsh contrib/tcsh/config contrib/tcsh/nls contrib/tcsh/nls/C contrib/tcsh/nls/et contrib/tcsh/nls/finnish contrib/tcsh/nls/french contrib/tcsh/nls... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 01:26:25 -0000 Author: mp Date: Wed Mar 7 01:26:24 2012 New Revision: 232633 URL: http://svn.freebsd.org/changeset/base/232633 Log: MFC r231990 Update to tcsh 6.18.01 Added: stable/9/contrib/tcsh/nls/Makefile.in - copied unchanged from r231990, head/contrib/tcsh/nls/Makefile.in stable/9/contrib/tcsh/nls/catgen - copied unchanged from r231990, head/contrib/tcsh/nls/catgen stable/9/contrib/tcsh/svn - copied unchanged from r231990, head/contrib/tcsh/svn Deleted: stable/9/bin/csh/host.defs stable/9/contrib/tcsh/nls/Makefile Modified: stable/9/bin/csh/Makefile stable/9/bin/csh/config.h stable/9/bin/csh/config_p.h stable/9/contrib/tcsh/Fixes stable/9/contrib/tcsh/Imakefile stable/9/contrib/tcsh/Makefile.in stable/9/contrib/tcsh/Ported stable/9/contrib/tcsh/README stable/9/contrib/tcsh/WishList stable/9/contrib/tcsh/complete.tcsh stable/9/contrib/tcsh/config.guess stable/9/contrib/tcsh/config.h.in stable/9/contrib/tcsh/config.sub stable/9/contrib/tcsh/config/bsd4.4 stable/9/contrib/tcsh/config_f.h stable/9/contrib/tcsh/configure stable/9/contrib/tcsh/configure.in stable/9/contrib/tcsh/ed.chared.c stable/9/contrib/tcsh/ed.inputl.c stable/9/contrib/tcsh/ed.refresh.c stable/9/contrib/tcsh/ed.screen.c stable/9/contrib/tcsh/ed.term.c stable/9/contrib/tcsh/gethost.c stable/9/contrib/tcsh/glob.c stable/9/contrib/tcsh/glob.h stable/9/contrib/tcsh/host.defs stable/9/contrib/tcsh/install-sh stable/9/contrib/tcsh/nls/C/charset stable/9/contrib/tcsh/nls/C/set19 stable/9/contrib/tcsh/nls/et/charset stable/9/contrib/tcsh/nls/et/set1 stable/9/contrib/tcsh/nls/et/set10 stable/9/contrib/tcsh/nls/et/set11 stable/9/contrib/tcsh/nls/et/set13 stable/9/contrib/tcsh/nls/et/set14 stable/9/contrib/tcsh/nls/et/set15 stable/9/contrib/tcsh/nls/et/set16 stable/9/contrib/tcsh/nls/et/set17 stable/9/contrib/tcsh/nls/et/set18 stable/9/contrib/tcsh/nls/et/set19 stable/9/contrib/tcsh/nls/et/set2 stable/9/contrib/tcsh/nls/et/set20 stable/9/contrib/tcsh/nls/et/set21 stable/9/contrib/tcsh/nls/et/set22 stable/9/contrib/tcsh/nls/et/set23 stable/9/contrib/tcsh/nls/et/set24 stable/9/contrib/tcsh/nls/et/set25 stable/9/contrib/tcsh/nls/et/set26 stable/9/contrib/tcsh/nls/et/set27 stable/9/contrib/tcsh/nls/et/set3 stable/9/contrib/tcsh/nls/et/set30 stable/9/contrib/tcsh/nls/et/set4 stable/9/contrib/tcsh/nls/et/set5 stable/9/contrib/tcsh/nls/et/set6 stable/9/contrib/tcsh/nls/et/set7 stable/9/contrib/tcsh/nls/et/set8 stable/9/contrib/tcsh/nls/et/set9 stable/9/contrib/tcsh/nls/finnish/charset stable/9/contrib/tcsh/nls/finnish/set1 stable/9/contrib/tcsh/nls/finnish/set10 stable/9/contrib/tcsh/nls/finnish/set11 stable/9/contrib/tcsh/nls/finnish/set12 stable/9/contrib/tcsh/nls/finnish/set13 stable/9/contrib/tcsh/nls/finnish/set14 stable/9/contrib/tcsh/nls/finnish/set16 stable/9/contrib/tcsh/nls/finnish/set17 stable/9/contrib/tcsh/nls/finnish/set18 stable/9/contrib/tcsh/nls/finnish/set19 stable/9/contrib/tcsh/nls/finnish/set2 stable/9/contrib/tcsh/nls/finnish/set20 stable/9/contrib/tcsh/nls/finnish/set22 stable/9/contrib/tcsh/nls/finnish/set23 stable/9/contrib/tcsh/nls/finnish/set25 stable/9/contrib/tcsh/nls/finnish/set26 stable/9/contrib/tcsh/nls/finnish/set27 stable/9/contrib/tcsh/nls/finnish/set29 stable/9/contrib/tcsh/nls/finnish/set3 stable/9/contrib/tcsh/nls/finnish/set6 stable/9/contrib/tcsh/nls/finnish/set7 stable/9/contrib/tcsh/nls/finnish/set9 stable/9/contrib/tcsh/nls/french/charset stable/9/contrib/tcsh/nls/french/set1 stable/9/contrib/tcsh/nls/french/set10 stable/9/contrib/tcsh/nls/french/set11 stable/9/contrib/tcsh/nls/french/set12 stable/9/contrib/tcsh/nls/french/set13 stable/9/contrib/tcsh/nls/french/set15 stable/9/contrib/tcsh/nls/french/set16 stable/9/contrib/tcsh/nls/french/set17 stable/9/contrib/tcsh/nls/french/set18 stable/9/contrib/tcsh/nls/french/set19 stable/9/contrib/tcsh/nls/french/set2 stable/9/contrib/tcsh/nls/french/set20 stable/9/contrib/tcsh/nls/french/set21 stable/9/contrib/tcsh/nls/french/set22 stable/9/contrib/tcsh/nls/french/set23 stable/9/contrib/tcsh/nls/french/set25 stable/9/contrib/tcsh/nls/french/set26 stable/9/contrib/tcsh/nls/french/set27 stable/9/contrib/tcsh/nls/french/set3 stable/9/contrib/tcsh/nls/french/set30 stable/9/contrib/tcsh/nls/french/set31 stable/9/contrib/tcsh/nls/french/set4 stable/9/contrib/tcsh/nls/french/set6 stable/9/contrib/tcsh/nls/french/set7 stable/9/contrib/tcsh/nls/french/set8 stable/9/contrib/tcsh/nls/french/set9 stable/9/contrib/tcsh/nls/german/charset stable/9/contrib/tcsh/nls/german/set1 stable/9/contrib/tcsh/nls/german/set10 stable/9/contrib/tcsh/nls/german/set13 stable/9/contrib/tcsh/nls/german/set15 stable/9/contrib/tcsh/nls/german/set16 stable/9/contrib/tcsh/nls/german/set17 stable/9/contrib/tcsh/nls/german/set18 stable/9/contrib/tcsh/nls/german/set19 stable/9/contrib/tcsh/nls/german/set2 stable/9/contrib/tcsh/nls/german/set20 stable/9/contrib/tcsh/nls/german/set22 stable/9/contrib/tcsh/nls/german/set23 stable/9/contrib/tcsh/nls/german/set25 stable/9/contrib/tcsh/nls/german/set26 stable/9/contrib/tcsh/nls/german/set27 stable/9/contrib/tcsh/nls/german/set29 stable/9/contrib/tcsh/nls/german/set3 stable/9/contrib/tcsh/nls/german/set30 stable/9/contrib/tcsh/nls/german/set31 stable/9/contrib/tcsh/nls/german/set4 stable/9/contrib/tcsh/nls/german/set5 stable/9/contrib/tcsh/nls/german/set6 stable/9/contrib/tcsh/nls/german/set7 stable/9/contrib/tcsh/nls/german/set8 stable/9/contrib/tcsh/nls/german/set9 stable/9/contrib/tcsh/nls/greek/charset stable/9/contrib/tcsh/nls/greek/set1 (contents, props changed) stable/9/contrib/tcsh/nls/greek/set10 (contents, props changed) stable/9/contrib/tcsh/nls/greek/set11 (contents, props changed) stable/9/contrib/tcsh/nls/greek/set12 (contents, props changed) stable/9/contrib/tcsh/nls/greek/set13 (contents, props changed) stable/9/contrib/tcsh/nls/greek/set14 (contents, props changed) stable/9/contrib/tcsh/nls/greek/set15 (contents, props changed) stable/9/contrib/tcsh/nls/greek/set16 (contents, props changed) stable/9/contrib/tcsh/nls/greek/set17 (contents, props changed) stable/9/contrib/tcsh/nls/greek/set18 (contents, props changed) stable/9/contrib/tcsh/nls/greek/set19 (contents, props changed) stable/9/contrib/tcsh/nls/greek/set2 (contents, props changed) stable/9/contrib/tcsh/nls/greek/set20 (contents, props changed) stable/9/contrib/tcsh/nls/greek/set21 (contents, props changed) stable/9/contrib/tcsh/nls/greek/set22 (contents, props changed) stable/9/contrib/tcsh/nls/greek/set23 (contents, props changed) stable/9/contrib/tcsh/nls/greek/set25 (contents, props changed) stable/9/contrib/tcsh/nls/greek/set26 (contents, props changed) stable/9/contrib/tcsh/nls/greek/set27 (contents, props changed) stable/9/contrib/tcsh/nls/greek/set29 (contents, props changed) stable/9/contrib/tcsh/nls/greek/set3 (contents, props changed) stable/9/contrib/tcsh/nls/greek/set30 (contents, props changed) stable/9/contrib/tcsh/nls/greek/set31 (contents, props changed) stable/9/contrib/tcsh/nls/greek/set4 (contents, props changed) stable/9/contrib/tcsh/nls/greek/set5 (contents, props changed) stable/9/contrib/tcsh/nls/greek/set6 (contents, props changed) stable/9/contrib/tcsh/nls/greek/set7 (contents, props changed) stable/9/contrib/tcsh/nls/greek/set8 (contents, props changed) stable/9/contrib/tcsh/nls/greek/set9 (contents, props changed) stable/9/contrib/tcsh/nls/italian/charset stable/9/contrib/tcsh/nls/italian/set1 stable/9/contrib/tcsh/nls/italian/set11 stable/9/contrib/tcsh/nls/italian/set13 stable/9/contrib/tcsh/nls/italian/set15 stable/9/contrib/tcsh/nls/italian/set17 stable/9/contrib/tcsh/nls/italian/set19 stable/9/contrib/tcsh/nls/italian/set2 stable/9/contrib/tcsh/nls/italian/set20 stable/9/contrib/tcsh/nls/italian/set22 stable/9/contrib/tcsh/nls/italian/set23 stable/9/contrib/tcsh/nls/italian/set26 stable/9/contrib/tcsh/nls/italian/set3 stable/9/contrib/tcsh/nls/italian/set30 stable/9/contrib/tcsh/nls/italian/set4 stable/9/contrib/tcsh/nls/italian/set6 stable/9/contrib/tcsh/nls/italian/set7 stable/9/contrib/tcsh/nls/ja/charset stable/9/contrib/tcsh/nls/ja/set1 (contents, props changed) stable/9/contrib/tcsh/nls/ja/set10 (contents, props changed) stable/9/contrib/tcsh/nls/ja/set11 (contents, props changed) stable/9/contrib/tcsh/nls/ja/set12 (contents, props changed) stable/9/contrib/tcsh/nls/ja/set13 (contents, props changed) stable/9/contrib/tcsh/nls/ja/set15 (contents, props changed) stable/9/contrib/tcsh/nls/ja/set16 (contents, props changed) stable/9/contrib/tcsh/nls/ja/set17 (contents, props changed) stable/9/contrib/tcsh/nls/ja/set18 (contents, props changed) stable/9/contrib/tcsh/nls/ja/set2 (contents, props changed) stable/9/contrib/tcsh/nls/ja/set21 (contents, props changed) stable/9/contrib/tcsh/nls/ja/set29 (contents, props changed) stable/9/contrib/tcsh/nls/ja/set3 (contents, props changed) stable/9/contrib/tcsh/nls/ja/set30 (contents, props changed) stable/9/contrib/tcsh/nls/ja/set4 (contents, props changed) stable/9/contrib/tcsh/nls/ja/set5 (contents, props changed) stable/9/contrib/tcsh/nls/ja/set6 (contents, props changed) stable/9/contrib/tcsh/nls/ja/set7 (contents, props changed) stable/9/contrib/tcsh/nls/ja/set8 (contents, props changed) stable/9/contrib/tcsh/nls/russian/charset stable/9/contrib/tcsh/nls/russian/set1 (contents, props changed) stable/9/contrib/tcsh/nls/russian/set10 (contents, props changed) stable/9/contrib/tcsh/nls/russian/set11 (contents, props changed) stable/9/contrib/tcsh/nls/russian/set12 (contents, props changed) stable/9/contrib/tcsh/nls/russian/set13 (contents, props changed) stable/9/contrib/tcsh/nls/russian/set14 (contents, props changed) stable/9/contrib/tcsh/nls/russian/set15 (contents, props changed) stable/9/contrib/tcsh/nls/russian/set16 (contents, props changed) stable/9/contrib/tcsh/nls/russian/set17 (contents, props changed) stable/9/contrib/tcsh/nls/russian/set18 (contents, props changed) stable/9/contrib/tcsh/nls/russian/set19 (contents, props changed) stable/9/contrib/tcsh/nls/russian/set2 (contents, props changed) stable/9/contrib/tcsh/nls/russian/set20 (contents, props changed) stable/9/contrib/tcsh/nls/russian/set22 (contents, props changed) stable/9/contrib/tcsh/nls/russian/set23 (contents, props changed) stable/9/contrib/tcsh/nls/russian/set25 (contents, props changed) stable/9/contrib/tcsh/nls/russian/set26 (contents, props changed) stable/9/contrib/tcsh/nls/russian/set27 (contents, props changed) stable/9/contrib/tcsh/nls/russian/set29 (contents, props changed) stable/9/contrib/tcsh/nls/russian/set30 (contents, props changed) stable/9/contrib/tcsh/nls/russian/set31 (contents, props changed) stable/9/contrib/tcsh/nls/russian/set4 (contents, props changed) stable/9/contrib/tcsh/nls/russian/set5 (contents, props changed) stable/9/contrib/tcsh/nls/russian/set6 (contents, props changed) stable/9/contrib/tcsh/nls/russian/set7 (contents, props changed) stable/9/contrib/tcsh/nls/russian/set8 (contents, props changed) stable/9/contrib/tcsh/nls/russian/set9 (contents, props changed) stable/9/contrib/tcsh/nls/spanish/charset stable/9/contrib/tcsh/nls/spanish/set1 stable/9/contrib/tcsh/nls/spanish/set10 stable/9/contrib/tcsh/nls/spanish/set13 stable/9/contrib/tcsh/nls/spanish/set14 stable/9/contrib/tcsh/nls/spanish/set15 stable/9/contrib/tcsh/nls/spanish/set16 stable/9/contrib/tcsh/nls/spanish/set17 stable/9/contrib/tcsh/nls/spanish/set18 stable/9/contrib/tcsh/nls/spanish/set19 stable/9/contrib/tcsh/nls/spanish/set2 stable/9/contrib/tcsh/nls/spanish/set20 stable/9/contrib/tcsh/nls/spanish/set22 stable/9/contrib/tcsh/nls/spanish/set23 stable/9/contrib/tcsh/nls/spanish/set25 stable/9/contrib/tcsh/nls/spanish/set26 stable/9/contrib/tcsh/nls/spanish/set27 stable/9/contrib/tcsh/nls/spanish/set3 stable/9/contrib/tcsh/nls/spanish/set30 stable/9/contrib/tcsh/nls/spanish/set4 stable/9/contrib/tcsh/nls/spanish/set5 stable/9/contrib/tcsh/nls/spanish/set6 stable/9/contrib/tcsh/nls/spanish/set7 stable/9/contrib/tcsh/nls/spanish/set8 stable/9/contrib/tcsh/nls/spanish/set9 stable/9/contrib/tcsh/nls/ukrainian/charset stable/9/contrib/tcsh/nls/ukrainian/set1 (contents, props changed) stable/9/contrib/tcsh/nls/ukrainian/set10 (contents, props changed) stable/9/contrib/tcsh/nls/ukrainian/set11 (contents, props changed) stable/9/contrib/tcsh/nls/ukrainian/set12 (contents, props changed) stable/9/contrib/tcsh/nls/ukrainian/set13 (contents, props changed) stable/9/contrib/tcsh/nls/ukrainian/set14 (contents, props changed) stable/9/contrib/tcsh/nls/ukrainian/set15 (contents, props changed) stable/9/contrib/tcsh/nls/ukrainian/set16 (contents, props changed) stable/9/contrib/tcsh/nls/ukrainian/set17 (contents, props changed) stable/9/contrib/tcsh/nls/ukrainian/set18 (contents, props changed) stable/9/contrib/tcsh/nls/ukrainian/set19 (contents, props changed) stable/9/contrib/tcsh/nls/ukrainian/set2 (contents, props changed) stable/9/contrib/tcsh/nls/ukrainian/set20 (contents, props changed) stable/9/contrib/tcsh/nls/ukrainian/set22 (contents, props changed) stable/9/contrib/tcsh/nls/ukrainian/set23 (contents, props changed) stable/9/contrib/tcsh/nls/ukrainian/set25 (contents, props changed) stable/9/contrib/tcsh/nls/ukrainian/set26 (contents, props changed) stable/9/contrib/tcsh/nls/ukrainian/set27 (contents, props changed) stable/9/contrib/tcsh/nls/ukrainian/set29 (contents, props changed) stable/9/contrib/tcsh/nls/ukrainian/set30 (contents, props changed) stable/9/contrib/tcsh/nls/ukrainian/set31 (contents, props changed) stable/9/contrib/tcsh/nls/ukrainian/set5 (contents, props changed) stable/9/contrib/tcsh/nls/ukrainian/set6 (contents, props changed) stable/9/contrib/tcsh/nls/ukrainian/set7 (contents, props changed) stable/9/contrib/tcsh/nls/ukrainian/set8 (contents, props changed) stable/9/contrib/tcsh/nls/ukrainian/set9 (contents, props changed) stable/9/contrib/tcsh/patchlevel.h stable/9/contrib/tcsh/pathnames.h stable/9/contrib/tcsh/sh.c stable/9/contrib/tcsh/sh.char.c stable/9/contrib/tcsh/sh.char.h stable/9/contrib/tcsh/sh.decls.h stable/9/contrib/tcsh/sh.dir.c stable/9/contrib/tcsh/sh.dol.c stable/9/contrib/tcsh/sh.err.c stable/9/contrib/tcsh/sh.exec.c stable/9/contrib/tcsh/sh.exp.c stable/9/contrib/tcsh/sh.file.c stable/9/contrib/tcsh/sh.func.c stable/9/contrib/tcsh/sh.glob.c stable/9/contrib/tcsh/sh.h stable/9/contrib/tcsh/sh.hist.c stable/9/contrib/tcsh/sh.lex.c stable/9/contrib/tcsh/sh.misc.c stable/9/contrib/tcsh/sh.parse.c stable/9/contrib/tcsh/sh.print.c stable/9/contrib/tcsh/sh.proc.c stable/9/contrib/tcsh/sh.proc.h stable/9/contrib/tcsh/sh.sem.c stable/9/contrib/tcsh/sh.set.c stable/9/contrib/tcsh/sh.time.c stable/9/contrib/tcsh/tc.alloc.c stable/9/contrib/tcsh/tc.const.c stable/9/contrib/tcsh/tc.decls.h stable/9/contrib/tcsh/tc.disc.c stable/9/contrib/tcsh/tc.func.c stable/9/contrib/tcsh/tc.nls.c stable/9/contrib/tcsh/tc.nls.h stable/9/contrib/tcsh/tc.os.c stable/9/contrib/tcsh/tc.os.h stable/9/contrib/tcsh/tc.prompt.c stable/9/contrib/tcsh/tc.sig.c stable/9/contrib/tcsh/tc.sig.h stable/9/contrib/tcsh/tc.str.c stable/9/contrib/tcsh/tc.wait.h stable/9/contrib/tcsh/tc.who.c stable/9/contrib/tcsh/tcsh.man stable/9/contrib/tcsh/tcsh.man2html stable/9/contrib/tcsh/tw.color.c stable/9/contrib/tcsh/tw.init.c stable/9/contrib/tcsh/tw.parse.c stable/9/contrib/tcsh/vms.termcap.c Directory Properties: stable/9/bin/csh/ (props changed) stable/9/contrib/tcsh/ (props changed) stable/9/contrib/tcsh/nls/greek/set24 (props changed) stable/9/contrib/tcsh/nls/ja/set24 (props changed) stable/9/contrib/tcsh/nls/russian/set21 (props changed) stable/9/contrib/tcsh/nls/russian/set24 (props changed) stable/9/contrib/tcsh/nls/russian/set3 (props changed) stable/9/contrib/tcsh/nls/ukrainian/set21 (props changed) stable/9/contrib/tcsh/nls/ukrainian/set24 (props changed) stable/9/contrib/tcsh/nls/ukrainian/set3 (props changed) stable/9/contrib/tcsh/nls/ukrainian/set4 (props changed) Modified: stable/9/bin/csh/Makefile ============================================================================== --- stable/9/bin/csh/Makefile Wed Mar 7 00:16:32 2012 (r232632) +++ stable/9/bin/csh/Makefile Wed Mar 7 01:26:24 2012 (r232633) @@ -18,7 +18,7 @@ DFLAGS= -D_PATH_TCSHELL='"/rescue/${PROG DFLAGS= -D_PATH_TCSHELL='"/bin/${PROG}"' .endif CFLAGS+= -I. -I${.CURDIR} -I${TCSHDIR} ${DFLAGS} -WARNS?= 0 +WARNS?= 1 SRCS= sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \ sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \ sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \ @@ -116,10 +116,10 @@ gethost: gethost.c sh.err.h tc.const.h s ${CC} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \ ${TCSHDIR}/gethost.c -tc.defs.c: gethost ${.CURDIR}/host.defs +tc.defs.c: gethost ${TCSHDIR}/host.defs @rm -f ${.TARGET} @echo "/* Do not edit this file, make creates it */" > ${.TARGET} - ./gethost ${.CURDIR}/host.defs >> ${.TARGET} + ./gethost ${TCSHDIR}/host.defs >> ${.TARGET} ed.defns.h: ed.defns.c @rm -f ${.TARGET} Modified: stable/9/bin/csh/config.h ============================================================================== --- stable/9/bin/csh/config.h Wed Mar 7 00:16:32 2012 (r232632) +++ stable/9/bin/csh/config.h Wed Mar 7 01:26:24 2012 (r232633) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* config.h. Generated by configure. */ +/* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.in by autoheader. */ /* Define to the type of elements in the array set by `getgroups'. Usually @@ -12,9 +12,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_AUTH_H */ -/* Define to 1 if you have the `catgets' function. */ -#define HAVE_CATGETS 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_CRYPT_H */ @@ -41,6 +38,9 @@ /* Define to 1 if you have the `dup2' function. */ #define HAVE_DUP2 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_FEATURES_H */ + /* Define to 1 if you have the `getauthid' function. */ /* #undef HAVE_GETAUTHID */ @@ -54,9 +54,12 @@ #define HAVE_GETPWENT 1 /* Define to 1 if you have the `getutent' function. */ -#define HAVE_GETUTENT 1 +/* #undef HAVE_GETUTENT */ -/* Define if you have the iconv() function. */ +/* Define to 1 if you have the `getutxent' function. */ +#define HAVE_GETUTXENT 1 + +/* Define if you have the iconv() function and it works. */ /* #undef HAVE_ICONV */ /* Define to 1 if you have the header file. */ @@ -65,6 +68,9 @@ /* Define to 1 if the system has the type `long long'. */ #define HAVE_LONG_LONG 1 +/* Define to 1 if you have the `mallinfo' function. */ +/* #undef HAVE_MALLINFO */ + /* Define to 1 if mbrtowc and mbstate_t are properly declared. */ #define HAVE_MBRTOWC 1 @@ -77,6 +83,9 @@ /* Define to 1 if you have the `memset' function. */ #define HAVE_MEMSET 1 +/* Define to 1 if you have the `mkstemp' function. */ +#define HAVE_MKSTEMP 1 + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ @@ -86,6 +95,9 @@ /* Define to 1 if you have the `nl_langinfo' function. */ #define HAVE_NL_LANGINFO 1 +/* Define to 1 if you have the header file. */ +#define HAVE_PATHS_H 1 + /* Define to 1 if you have the `sbrk' function. */ #define HAVE_SBRK 1 @@ -120,22 +132,34 @@ /* Define to 1 if you have the `strstr' function. */ #define HAVE_STRSTR 1 -/* Define to 1 if `d_ino' is member of `struct dirent'. */ +/* Define to 1 if `d_ino' is a member of `struct dirent'. */ #define HAVE_STRUCT_DIRENT_D_INO 1 -/* Define to 1 if `ss_family' is member of `struct sockaddr_storage'. */ +/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */ #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 -/* Define to 1 if `ut_host' is member of `struct utmp'. */ +/* Define to 1 if `ut_host' is a member of `struct utmpx'. */ +#define HAVE_STRUCT_UTMPX_UT_HOST 1 + +/* Define to 1 if `ut_tv' is a member of `struct utmpx'. */ +#define HAVE_STRUCT_UTMPX_UT_TV 1 + +/* Define to 1 if `ut_user' is a member of `struct utmpx'. */ +#define HAVE_STRUCT_UTMPX_UT_USER 1 + +/* Define to 1 if `ut_xtime' is a member of `struct utmpx'. */ +/* #undef HAVE_STRUCT_UTMPX_UT_XTIME */ + +/* Define to 1 if `ut_host' is a member of `struct utmp'. */ #define HAVE_STRUCT_UTMP_UT_HOST 1 -/* Define to 1 if `ut_tv' is member of `struct utmp'. */ +/* Define to 1 if `ut_tv' is a member of `struct utmp'. */ #define HAVE_STRUCT_UTMP_UT_TV 1 -/* Define to 1 if `ut_user' is member of `struct utmp'. */ +/* Define to 1 if `ut_user' is a member of `struct utmp'. */ #define HAVE_STRUCT_UTMP_UT_USER 1 -/* Define to 1 if `ut_xtime' is member of `struct utmp'. */ +/* Define to 1 if `ut_xtime' is a member of `struct utmp'. */ /* #undef HAVE_STRUCT_UTMP_UT_XTIME */ /* Define to 1 if you have the `sysconf' function. */ @@ -179,25 +203,31 @@ /* Support NLS. */ #define NLS 1 +/* Support NLS catalogs. */ +#define NLS_CATALOGS 1 + /* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "" +#define PACKAGE_BUGREPORT "http://bugs.gw.com/" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "tcsh" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "tcsh 6.18.01" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "tcsh" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "6.18.01" /* Define to 1 if the `setpgrp' function takes no argument. */ /* #undef SETPGRP_VOID */ -/* The size of a `wchar_t', as computed by sizeof. */ +/* The size of `wchar_t', as computed by sizeof. */ #define SIZEOF_WCHAR_T 4 /* Define to 1 if the `S_IS*' macros in do not work properly. */ @@ -206,6 +236,11 @@ /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 +/* Define for Solaris 2.5.1 so the uint32_t typedef from , + , or is not used. If the typedef were allowed, the + #define below would cause a syntax error. */ +/* #undef _UINT32_T */ + /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ @@ -215,7 +250,7 @@ /* Define to `int' if does not define. */ /* #undef mode_t */ -/* Define to `unsigned' if does not define. */ +/* Define to `unsigned int' if does not define. */ /* #undef size_t */ /* Define to `int' if neither nor define. */ @@ -227,6 +262,10 @@ /* Define to `int' if doesn't define. */ /* #undef uid_t */ +/* Define to the type of an unsigned integer type of width exactly 32 bits if + such a type exists and the standard includes do not define it. */ +/* #undef uint32_t */ + /* Define to empty if the keyword `volatile' does not work. Warning: valid code using `volatile' can become incorrect without. Disable with care. */ /* #undef volatile */ @@ -234,9 +273,5 @@ #include "config_p.h" #include "config_f.h" -#ifndef NO_NLS_CATALOGS -#define NLS_CATALOGS -#endif - /* Work around a vendor issue where config_f.h is #undef'ing this setting */ #define SYSMALLOC Modified: stable/9/bin/csh/config_p.h ============================================================================== --- stable/9/bin/csh/config_p.h Wed Mar 7 00:16:32 2012 (r232632) +++ stable/9/bin/csh/config_p.h Wed Mar 7 01:26:24 2012 (r232633) @@ -106,9 +106,6 @@ #elif defined(__APPLE__) # define SYSMALLOC - -#else -# define NLS_CATALOGS #endif #endif /* _h_config */ Modified: stable/9/contrib/tcsh/Fixes ============================================================================== --- stable/9/contrib/tcsh/Fixes Wed Mar 7 00:16:32 2012 (r232632) +++ stable/9/contrib/tcsh/Fixes Wed Mar 7 01:26:24 2012 (r232633) @@ -1,3 +1,147 @@ + 6. V6.18.01 - 20120214 + 5. fix interruptible wait again + 4. ignore bogus compiler overflow message + 3. cleanup ifdefs in utmp code, and provide default array entries + 2. Ignore #machine entries in host.defs + 1. Detect missing ) in gethost.c (Corinna Vinschen) + +104. V6.18.00 - 20120114 +103. remove unused variables. +102. Make gethost use definitions for x __x__ and __x automatically. +101. More utmp fixes +100. V6.17.10 - 20120105 + 99. Add more FreeBSD/NetBSD machines + 98. Add portability wrapper for gencat + 97. Fix warning for write in SYSMALLOC systems. + 96. V6.17.09 - 20120102 + 95. revert gencat handling to pre-cygwin fixes (without the env settings) + 94. remove stray endutent() + 93. V6.17.08 - 20111230 + 92. Remove - from gencat + 91. Provide support for malloc_usable_size() so that linux works again + without SYSMALLOC + 90. Add support for FreeBSD's utmpx. + 89. V6.17.07 - 20111227 + 88. Fix debian bug #645238: tcsh segfaults when prompt includes %j and + there are more than 10 jobs. + 87. PR/155: Default $anyerror to set for backward compatibility + 86. PR/149: Don't print -1 in %j (Vojtech Vitek) + 85. handle -- on chdir commands as the end of options processing so that + they can process a directory like -x without resorting to ./-x + (Andrew Stevenson) + 84. Handle write(2) returning ENOENT from SoFS, thanks ++HAL (Robert Byrnes) + 83. PR/38: Null check for jobs (Kurt Miller) + 82. Fix spelling correction correcting ./foo -> ../foo2 (jean-luc leger) + 81. PR/120: string0 in filetest does not have enough space. + 80. V6.17.06 - 20110415 + 79. PR/110: Add $anyerror to select behavior. Default to the new one. + 78. Don't try to spell commands that are correct (Rouben Rostamian) + [./tcsh -f; set path=($path 2); mkdir foo2; cd foo2; touch foo; + chmod +x foo; set correct=cmd; ./foo -> ../foo] + 77. Don't push the syntax struct on the cleanup stack, because on foo;bar + if foo fails, we will free bar prematurely (Ben Miller) + 76. Avoid infinite loop while trying to print the pid of a dying process + to a closed file (Bob Arendt) + 75. Handle completion of ${ variables (Anthony Mallet) + 74. Add --disable-nls-catalogs (Corinna Vinschen) + 73. convert message catalogs to UTF-8 (Werner Fink) + 72. check that the NLS path works before setting $NLSPATH. + 71. use SYSMALLOC for GLIBC (Werner Fink) + 70. use mallinfo for SYSMALLOC (Corinna Vinschen) + 69. V6.17.05 - 20110201 + 68. Use mkstemp() if there for here docs (Werner Fink) + 67. Fix handling of errors and exit values in builtins (Werner Fink) + 66. Better pty name detection (Werner Fink) + 65. Enable NLS catalogs on Cygwin (Corinna Vinschen) + 64. NLSPATH handling fixes (Corinna Vinschen) + 63. Avoid infrequent exit when tcsh cd's into a non-existent directory + https://bugzilla.novell.com/show_bug.cgi?id=293395 (Werner Fink) + 62. Don't try to spell check full path binaries that are correct because + they can cause hangs when other nfs partitions are hung. (Werner Fink) + 61. Avoid nested interrupts when exiting causing history writing to fail + https://bugzilla.novell.com/show_bug.cgi?id=331627 (Werner Fink) + 60. Instead of giving an error or ignoring lines with missing eol at eof, + process them. + 59. Avoid leaking fd's in mail check (Werner Fink) + 58. Add cygwin_xcrypt() (Corinna Vinschen) + 57. Recognize i686 (Corinna Vinschen) + 56. Rename cygwin32 to cygwin and bring it up-to-date with modern cygwin + settings (Corinna Vinschen) + 55. Avoid double slashes in cdpath (Corinna Vinschen) + 54. V6.17.04 - 20110118 + 53. Revert PR/110, breaks the test suite. + 52. V6.17.03 - 20110117 + 51. PR/102: Complain on input files with missing trailing \n + 50. PR/104: If atime == mtime we don't have new mail. + 49. PR/113: Don't allow illegal variable names to be set. + 48. PR/112: don't set $REMOTEHOST on the local machine. + 47. PR/110: exit status of the pipeline should be the status of the last + command. + 46. Android support (Corinna Vinschen) + 45. Add AUTOSET_KANJI which works around the Shift-JIS encoding that + translates unshifted 7 bit ASCII (Werner Fink) + 44. Handle mb{r,}towc() returning 0 by setting the return value to NUL + (Jean-Luc Leger) + 43. PR/109: make wait interruptible (Vojtech Vitek) + 42. resource limit fixes: signed vs. unsigned, megabyte issue, doc issues + (Robert Byrnes) + 41. remove .bat and .cmd handling for executables on cygwin (Corinna Vinschen) + 40. Don't echo history while history -L or history -M + 39. Check for EOS before ** from Greg Dionne + 38. Don't fork in backeval from Bryan Mason + 37. Better globstar support from Greg Dionne + 36. Error out when processing the last incomplete line instead of silently + ignoring it (Anders Kaseorg) + 35. Fix SEGV from echo `` + 34. Better fixes for histchars and promptchars (nargs) + 33. Fix win32 issue calling fmalloc/ffree from non-thread-safe context. + (Fabio Fabbri) + 32. V6.17.02 - 20100512 + 31. PR/79: nargs: Better handling for promptchars. + 30. PR/97: Add parseoctal to retain compatibility with previous versions (Jim + Zajkowski) + 29. PR/84: Performance fixes for large history merges (add + hashtable (Ted Anderson) + 28. Revert previous #23; people should use $histlit if they want this + feature. + 27. Don't kill "hup" background jobs when a child of the shell exits. + From Debian. + 26. Ignore \r\n in the command line options for OS's that don't strip + these from #!; from Debian + 25. Fix enhanced missing patch (Greg Dionne) + 24. Callers of rt_mbtowc don't grok -2 as a return. Return -1 for now. + (Corinna Vinschen) + 23. Turn HistLit on while recording history to avoid \!\! losing its \. + From Debian + 22. set autoexpand; set histchars="";\n crash. From Debian + 21. V6.17.01 - 20100506 + 20. unset verbose while we are reading the history file to avoid echoing + to the terminal. (Jeffrey Bastian) + 19. globstar addition, Enhance addition, euid, euser, gid variables + (Greg Dionne) + 18. Make 'e' in vi mode work like 'b' - use wordchars (Alistair Crooks) + 17. Handle UTF-16 surrogates (Corinna Vinschen) + 16. Make tcsh work on systems where sizeof(wchar_t) == 2 (Corinna Vinschen) + 15. Better support for Solaris >= 2.9 (Thomas Uhle) + 14. Change internal expression calculations to long long so that we can + deal with > 32 bit time, inodes, uids, file sizes etc. + 13. Add new linux resource limits. + 12. Don't print 'Exit X' when printexitvalue is set in `` expressions + (Jeff Bastian) + 11. Add more LS_COLORS vars (M.H. Anderson) + 10. Reduce whitespace in Makefile (Don Estabrook) + 9. Manual page fixes (Alan R. S. Bueno) + 8. Remove history in loops bug from the documentation (Holger Weiss) + 7. Add autorehash (Holger Weiss) + 6. Add history.at (Ted Anderson) + 5. Better NLSPATH handling (Norm Jacobs) + 4. Fix hostname building from utmp (Cyrus Rahman) + 3. Handle pending signals before flush so that the the history file does + not get truncated. (Ted Anderson) + 2. Fix AsciiOnly setting that broke 8 bit input. (Juergen Keil) + 1. remember to closedir in mailchk (from Werner Fink, reported by + David Binderman) + 21. V6.17.00 - 20090710 20. Fix dataroot autoconf issue. 19. Fix directory stuff for unit tests. Modified: stable/9/contrib/tcsh/Imakefile ============================================================================== --- stable/9/contrib/tcsh/Imakefile Wed Mar 7 00:16:32 2012 (r232632) +++ stable/9/contrib/tcsh/Imakefile Wed Mar 7 01:26:24 2012 (r232633) @@ -1,5 +1,5 @@ XCOMM -XCOMM $tcsh: Imakefile,v 1.86 2007/03/19 23:25:02 christos Exp $ +XCOMM $tcsh: Imakefile,v 1.87 2010/01/28 19:01:05 christos Exp $ XCOMM XCOMM Imakefile for tcsh 6.12 XCOMM Marc Horowitz, MIT SIPB @@ -93,7 +93,11 @@ ones. Please send in your fixes and add # if (OSMinorVersion < 6) # define ConfigH sol24 # else -# define ConfigH sol26 +# if (OSMinorVersion < 9) +# define ConfigH sol26 +# else +# define ConfigH sol29 +# endif # endif # endif # endif Modified: stable/9/contrib/tcsh/Makefile.in ============================================================================== --- stable/9/contrib/tcsh/Makefile.in Wed Mar 7 00:16:32 2012 (r232632) +++ stable/9/contrib/tcsh/Makefile.in Wed Mar 7 01:26:24 2012 (r232633) @@ -1,4 +1,4 @@ -# $tcsh: Makefile.in,v 3.40 2009/06/24 22:09:05 christos Exp $ +# $tcsh: Makefile.in,v 3.49 2011/02/05 17:35:31 christos Exp $ # Makefile.in 4.3 6/11/83 # # C Shell with process control; VM/UNIX VAX Makefile @@ -26,22 +26,27 @@ CF=-c CPPFLAGS=-I. -I$(srcdir) LFLAGS= -#LFLAGS= -Zn10000 # hpux lint +# hpux lint +#LFLAGS= -Zn10000 -CFLAGS = @CFLAGS@ # This is set by autoconf. -#CFLAGS= -g # debug -#CFLAGS= -O # production -#CFLAGS= # Broken optimizers.... +# This is set by autoconf: +CFLAGS = @CFLAGS@ +# debug: +#CFLAGS= -g +# production: +#CFLAGS= -O +# Broken optimizers.... +#CFLAGS= #CFLAGS= -g -pg -DPROF #CFLAGS= -O -pg -DPROF # gcc 1.00-1.37 -#CFLAGS= -O -finline-functions -fstrength-reduce +#CFLAGS= -O -finline-functions -fstrength-reduce # gcc 1.37-1.40 -#CFLAGS= -O -fcombine-regs -finline-functions -fstrength-reduce +#CFLAGS= -O -fcombine-regs -finline-functions -fstrength-reduce # add -msoft-float for 68881 machines. # gcc 2.0 @@ -67,8 +72,10 @@ CFLAGS = @CFLAGS@ # This is set by auto #CFLAGS= -O -Mnodebug -Mnoperfmon # DEC Alpha OSF/1 -#CFLAGS= -O2 -Olimit 2000 ## Normal Optimization -#CFLAGS= -O3 -Olimit 2000 ## Full Optimization - may not work +## Normal Optimization +#CFLAGS= -O2 -Olimit 2000 +## Full Optimization - may not work +#CFLAGS= -O3 -Olimit 2000 #CF=-j #SUF=u #.SUFFIXES: .u @@ -77,7 +84,8 @@ CFLAGS = @CFLAGS@ # This is set by auto # global optimizer! (-O3). # On SGI 4.0+ you need to add -D__STDC__ too. #CFLAGS= -O3 -#CFLAGS= -O3 -Olimit 2000 ## Ultrix 4.2a +## Ultrix 4.2a +#CFLAGS= -O3 -Olimit 2000 #CF=-j #SUF=u #.SUFFIXES: .u ## Ultrix and gnu-make need that @@ -110,14 +118,14 @@ CFLAGS = @CFLAGS@ # This is set by auto # CFLAGS= -O3 # SINIX RMx00 -#CFLAGS= -O # -D_POSIX_SOURCE # -kansi +#CFLAGS= -O# -D_POSIX_SOURCE# -kansi # Apollo's with cc [apollo builtins don't work with gcc] # and apollo should not define __STDC__ if it does not have # the standard header files. RT's (aos4.3) need that too; # you might want to skip the -O on the rt's... Not very wise. # AIX/ESA needs -D_IBMESA on command line (this may disappear by GA) -#DFLAGS=-U__STDC__ +#DFLAGS=-U__STDC__ #DFLAGS=-D_IBMESA # On aix2.2.1 we need more compiler space. #DFLAGS=-Nd4000 -Nn3000 @@ -142,17 +150,25 @@ DFLAGS = -D_PATH_TCSHELL='"${bindir}/tcs ################################################################ ## LDFLAGS. Define something here if you need to ################################################################ -LDFLAGS= @LDFLAGS@ ## This is set by autoconf. -#LDFLAGS= ## The simplest, suitable for all. -#LDFLAGS= -s ## Stripped. Takes less space on disk. -#LDFLAGS= -s -n ## Pure executable. Spares paging over -# ## the network for machines with local -# ## swap but external /usr/local/bin . -#LDFLAGS= -s -n -Bstatic ## Without dynamic linking. (SunOS/cc) -#LDFLAGS= -s -n -static ## Without dynamic linking. (SunOS/gcc) -#LDFLAGS= -Wl,-s,-n ## Stripped, shared text (Unicos) -#LDFLAGS= -s -static ## Link statically. (linux) -#LDFLAGS= -s -N ## Impure executable (linux) +## This is set by autoconf: +LDFLAGS= @LDFLAGS@ +## The simplest, suitable for all. +#LDFLAGS= +## Stripped. Takes less space on disk. +#LDFLAGS= -s +## Pure executable. Spares paging over the network for machines with +## local swap but external /usr/local/bin . +#LDFLAGS= -s -n +## Without dynamic linking. (SunOS/cc) +#LDFLAGS= -s -n -Bstatic +## Without dynamic linking. (SunOS/gcc) +#LDFLAGS= -s -n -static +## Stripped, shared text (Unicos) +#LDFLAGS= -Wl,-s,-n +## Link statically. (linux) +#LDFLAGS= -s -static +## Impure executable (linux) +#LDFLAGS= -s -N ################################################################ ## SBINLDFLAGS. Flags to build a tcsh suitable for installation in @@ -164,53 +180,100 @@ SBINLDFLAGS=-Wl,-R/etc/lib,-I/etc/lib/ld ################################################################ ## LIBES. Pick one, or roll your own. ################################################################ -LIBES= @LIBS@ ## This is set by autoconf. -#LIBES= -ltermcap ## BSD style things -#LIBES= -ltermcap ## SunOS, HP-UX, pyramid -#LIBES= -ltermcap ## Linux -#LIBES= -ltermcap -lshadow ## Linux with PW_SHADOW -#LIBES= -ltermcap -lsec ## Tek XD88/10 (UTekV) with PW_SHADOW -#LIBES= -ltermcap -lsec ## Motorola MPC (sysV88) with PW_SHADOW -#LIBES= -ltermcap -lcs ## Mach -#LIBES= -ltermcap -lbsd ## DEC osf1 on the alpha -#LIBES= -ltermcap -lbsd ## Intel paragon -#LIBES= -ltermcap -lbsd ## Clipper intergraph -#LIBES= -ltermcap -lseq ## Sequent's Dynix -#LIBES= -ltermcap -lauth ## Ultrix with Enhanced Security -#LIBES= -ltermcap -ldir -lx ## Xenix 386 style things -#LIBES= -ltermcap -lndir -lsocket -ljobs ## masscomp RTU6.0 -#LIBES= -lcurses ## AIX on the rt -#LIBES= -lcurses ## TitanOS on the stellar -#LIBES= -ltermlib -lsocket -lnsl ## SysV4 w/o BSDTIMES or Solaris 2 -#LIBES= -lcurses ## SysV3 w/o networking -#LIBES= -lcurses -lnet ## SysV3 with networking -#LIBES= -lcurses -ldir ## SysV2 w/o networking & dirlib -#LIBES= -lcurses -ldir -lnet ## SysV2 with networking & dirlib -#LIBES= -lcurses -lbsd ## AIX on the IBM 370 or rs6000 or ps2 -#LIBES= -lcurses -lbsd ## ETA10 -#LIBES= -lcurses -lbsd ## Irix3.1 on the SGI-IRIS4D -#LIBES= -lcurses -lbsd -lc_s ## Irix3.3 on the SGI-IRIS4D w/o yp -#LIBES= -lcurses -lsun -lbsd -lc_s ## Irix3.3 on the SGI-IRIS4D with yp -#LIBES= -lcurses -lsocket -lbsd ## Amdahl UTS 2.1 -#LIBES= -lcurses -lsocket ## Intel's hypercube. -#LIBES= -lcurses -lsocket ## ns32000 based Opus. -#LIBES= -lcurses -lcposix ## ISC 2.2 without networking -#LIBES= -lcposix -lc_s -lcurses -linet ## ISC 2.2 with networking -#LIBES= -lcurses -lsec -lc_s ## ISC 2.0.2 without networking -#LIBES= -lcurses -linet -lsec -lc_s ## ISC 2.0.2 with networking -#LIBES= -lcurses -lintl -lcrypt ## SCO SysVR3.2v2.0 -#LIBES= -lcurses -lintl -lsocket -lcrypt ## SCO+ODT1.1 -#LIBES= -lposix -ltermcap ## A/UX 2.0 -#LIBES= -lposix -ltermcap -lc_s ## A/UX 3.0 -#LIBES= -ldirent -lcurses ## att3b1 cc w/o shared lib & dirlib -#LIBES= -shlib -ldirent -lcurses ## att3b1 gcc with shared lib & dirlib -#LIBES= -ltermlib -lsocket -lnsl -lc /usr/ucblib/libucb.a ## SysV4 with BSDTIMES -#LIBES= -lcurses -lnsl -lsocket -lc /usr/ucblib/libucb.a ## Stardent Vistra -#LIBES= -ltermc ## emx under OS/2 -#LIBES= ## Minix, VMS_POSIX -#LIBES= -ltermcap -lcrypt ## Multiflow -#LIBES= -ltermcap -lcrypt ## NetBSD -#LIBES= -lcurses ## DDE Supermax +## This is set by autoconf. +LIBES= @LIBS@ +## BSD style things +#LIBES= -ltermcap +## SunOS, HP-UX, pyramid +#LIBES= -ltermcap +## Linux +#LIBES= -ltermcap +## Linux with PW_SHADOW +#LIBES= -ltermcap -lshadow +## Tek XD88/10 (UTekV) with PW_SHADOW +#LIBES= -ltermcap -lsec +## Motorola MPC (sysV88) with PW_SHADOW +#LIBES= -ltermcap -lsec +## Mach +#LIBES= -ltermcap -lcs +## DEC osf1 on the alpha +#LIBES= -ltermcap -lbsd +## Intel paragon +#LIBES= -ltermcap -lbsd +## Clipper intergraph +#LIBES= -ltermcap -lbsd +## Sequent's Dynix +#LIBES= -ltermcap -lseq +## Ultrix with Enhanced Security +#LIBES= -ltermcap -lauth +## Xenix 386 style things +#LIBES= -ltermcap -ldir -lx +## masscomp RTU6.0 +#LIBES= -ltermcap -lndir -lsocket -ljobs +## AIX on the rt +#LIBES= -lcurses +## TitanOS on the stellar +#LIBES= -lcurses +## SysV4 w/o BSDTIMES or Solaris 2 +#LIBES= -ltermlib -lsocket -lnsl +## SysV3 w/o networking +#LIBES= -lcurses +## SysV3 with networking +#LIBES= -lcurses -lnet +## SysV2 w/o networking & dirlib +#LIBES= -lcurses -ldir +## SysV2 with networking & dirlib +#LIBES= -lcurses -ldir -lnet +## AIX on the IBM 370 or rs6000 or ps2 +#LIBES= -lcurses -lbsd +## ETA10 +#LIBES= -lcurses -lbsd +## Irix3.1 on the SGI-IRIS4D +#LIBES= -lcurses -lbsd +## Irix3.3 on the SGI-IRIS4D w/o yp +#LIBES= -lcurses -lbsd -lc_s +## Irix3.3 on the SGI-IRIS4D with yp +#LIBES= -lcurses -lsun -lbsd -lc_s +## Amdahl UTS 2.1 +#LIBES= -lcurses -lsocket -lbsd +## Intel's hypercube. +#LIBES= -lcurses -lsocket +## ns32000 based Opus. +#LIBES= -lcurses -lsocket +## ISC 2.2 without networking +#LIBES= -lcurses -lcposix +## ISC 2.2 with networking +#LIBES= -lcposix -lc_s -lcurses -linet +## ISC 2.0.2 without networking +#LIBES= -lcurses -lsec -lc_s +## ISC 2.0.2 with networking +#LIBES= -lcurses -linet -lsec -lc_s +## SCO SysVR3.2v2.0 +#LIBES= -lcurses -lintl -lcrypt +## SCO+ODT1.1 +#LIBES= -lcurses -lintl -lsocket -lcrypt +## A/UX 2.0 +#LIBES= -lposix -ltermcap +## A/UX 3.0 +#LIBES= -lposix -ltermcap -lc_s +## att3b1 cc w/o shared lib & dirlib +#LIBES= -ldirent -lcurses +## att3b1 gcc with shared lib & dirlib +#LIBES= -shlib -ldirent -lcurses +## SysV4 with BSDTIMES +#LIBES= -ltermlib -lsocket -lnsl -lc /usr/ucblib/libucb.a +## Stardent Vistra +#LIBES= -lcurses -lnsl -lsocket -lc /usr/ucblib/libucb.a +## emx under OS/2 +#LIBES= -ltermc +## Minix, VMS_POSIX +#LIBES= +## Multiflow +#LIBES= -ltermcap -lcrypt +## NetBSD +#LIBES= -ltermcap -lcrypt +## DDE Supermax +#LIBES= -lcurses ################################################################ ## EXTRAFLAGS and EXTRALIBS @@ -222,8 +285,10 @@ LIBES= @LIBS@ ## This is set by aut # #Solaris and HPUX require the BSD libraries with AFS. #We use -lc to use only what we require. -#AFSAUXLIB = -lsocket -lnsl -lc -lucb # Solaris -#AFSAUXLIB = -lc -lBSD # HPUX +# Solaris +#AFSAUXLIB = -lsocket -lnsl -lc -lucb +# HPUX +#AFSAUXLIB = -lc -lBSD # #AFSLIB = -L$(AFSLIBDIR) -L$(AFSLIBDIR)/afs -lkauth -lprot -lubik\ # -lauth -lrxkad -lsys -ldes -lrx -llwp -lcom_err\ @@ -244,26 +309,38 @@ EXTRALIBS = @HESLIB@ $(AFSLIB) @LIBICONV # will lose the editor and job control. # This is for setting your C preprocessor value. -CPP = @CPP@ # This is set by autoconf. +# This is set by autoconf. +CPP = @CPP@ # The -B tells gcc to use /bin/ld. This is to avoid using the gnu ld, which # on the suns does not know how to make dynamically linked binaries. -CC = @CC@ # This is set by autoconf. +# This is set by autoconf. +CC = @CC@ #CC= gcc -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Werror -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wsign-compare -Wcast-qual -Wreturn-type -Wswitch -Wshadow -Wwrite-strings -Wextra -#CC= gcc -Wall -pipe -B/bin/ # -ansi -pedantic -#CC= gcc -m486 -pipe -Wall # Generate code for Intel 486 (linux) -#CC= shlicc # BSDI2.1 w/ shared libraries +# -ansi -pedantic +#CC= gcc -Wall -pipe -B/bin/ +# Generate code for Intel 486 (linux) +#CC= gcc -m486 -pipe -Wall +# BSDI2.1 w/ shared libraries +#CC= shlicc #CC= cc #CC= occ #CC= acc #CC= pcc #CC= hc -w -#CC= c89 # For VMS/POSIX -#CC= /bin/cc # For suns, w/o gcc and SVR4 -#CC= /usr/lib/sun.compile/cc # FPS 500 (+FPX) with Sun C compiler -#CC= /opt/SUNWspro/bin/cc # Solaris 2.1 -#CC= scc # Alliant fx2800 -#CC= cc -h0,ansi,novector,float0 # for NEC SX-4 +# For VMS/POSIX +#CC= c89 +# For suns, w/o gcc and SVR4 +#CC= /bin/cc +# FPS 500 (+FPX) with Sun C compiler +#CC= /usr/lib/sun.compile/cc +# Solaris 2.1 +#CC= /opt/SUNWspro/bin/cc +# Alliant fx2800 +#CC= scc +# for NEC SX-4 +#CC= cc -h0,ansi,novector,float0 #CC= lcc -wa +CC_FOR_GETHOST = @CC_FOR_GETHOST@ ED= ed AS= as RM= rm @@ -272,8 +349,10 @@ VGRIND= csh /usr/ucb/vgrind CTAGS= /usr/ucb/ctags #XSTR= /usr/ucb/xstr SCCS= /usr/local/sccs -PARALLEL=12 # Make the multi-max run fast. -#P=& # Use Sequent's parallel make +# Make the multi-max run fast. +PARALLEL=12 +# Use Sequent's parallel make +#P=& P= prefix=@prefix@ exec_prefix=@exec_prefix@ @@ -282,12 +361,17 @@ mandir=@datarootdir@/man MANSECT=1 DESTBIN=${DESTDIR}${bindir} DESTMAN=${DESTDIR}${mandir}/man${MANSECT} -# DESTMAN=${DESTDIR}/catman/man${MANSECT} # A/UX -# DESTMAN=${DESTDIR}/usr/share/man/man${MANSECT} # Stardent Vistra (SysVR4) -# DESTMAN=/usr/catman/1l # Amiga unix (SysVR4) +# A/UX +# DESTMAN=${DESTDIR}/catman/man${MANSECT} +# Stardent Vistra (SysVR4) +# DESTMAN=${DESTDIR}/usr/share/man/man${MANSECT} +# Amiga unix (SysVR4) +# DESTMAN=/usr/catman/1l EXEEXT=@EXEEXT@ FTPAREA=/usr/spool/ftp +BUILD_CATALOGS = @BUILD_CATALOGS@ + ASSRCS= sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \ sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \ sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \ @@ -330,9 +414,9 @@ AVSRCS= Fixes MAKEDIFFS MAKESHAR NewThin host.defs gethost.c tcsh.man2html configure.in configure config.h.in \ tests/testsuite.at TESTFILES= tests/aliases.at tests/arguments.at tests/commands.at \ - tests/expr.at tests/lexical.at tests/mb-eucjp.at tests/mb-utf8.at \ - tests/noexec.at tests/syntax.at tests/subst.at tests/variables.at \ - tests/sh.dol.at + tests/expr.at tests/lexical.at tests/mb-eucjp.at \ + tests/mb-utf8.at tests/noexec.at tests/syntax.at tests/subst.at \ + tests/variables.at tests/sh.dol.at VHSRCS=${PVSRCS} ${AVSRCS} @@ -345,7 +429,7 @@ DISTSRCS= ${PSSRCS} ${TWSRCS} ${EDSRCS} OBJS= ${SHOBJS} ${TWOBJS} ${EDOBJS} ${TCOBJS} -all: ${BUILD} +all: ${BUILD} catalogs tcsh$(EXEEXT):$(P) ${OBJS} rm -f tcsh$(EXEEXT) core @@ -365,7 +449,7 @@ pure:$(P) ${OBJS} gethost: gethost.c sh.err.h tc.const.h sh.h rm -f gethost - ${CC} -o gethost ${LDFLAGS} ${CFLAGS} ${CPPFLAGS} ${DFLAGS} $(srcdir)/gethost.c ${LIBES} ${EXTRALIBS} + ${CC_FOR_GETHOST} -o gethost ${CPPFLAGS} $(srcdir)/gethost.c tc.defs.c: gethost host.defs @rm -f $@.tmp @@ -463,7 +547,7 @@ $(srcdir)/tests/package.m4: $(srcdir)/co echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \ } >$(srcdir)/tests/package.m4 -$(srcdir)/tests/testsuite: $(srcdir)/tests/package.m4 $(srcdir}/tests/testsuite.at $(TESTFILES) +$(srcdir)/tests/testsuite: $(srcdir)/tests/package.m4 $(srcdir)/tests/testsuite.at $(TESTFILES) autom4te --language=autotest -I $(srcdir)/tests \ $(srcdir)/tests/testsuite.at -o $@.tmp mv $@.tmp $@ @@ -511,20 +595,36 @@ vgrind: install-strip: install -install: tcsh$(EXEEXT) +install: tcsh$(EXEEXT) install.catalogs install.man -mkdir -p ${DESTBIN} -mv -f ${DESTBIN}/tcsh$(EXEEXT) ${DESTBIN}/tcsh.old cp tcsh$(EXEEXT) ${DESTBIN}/tcsh$(EXEEXT) -strip ${DESTBIN}/tcsh$(EXEEXT) chmod 755 ${DESTBIN}/tcsh$(EXEEXT) +install.catalogs: + @test "x${BUILD_CATALOGS}" = "xyes" && (cd nls; ${MAKE} install DESTDIR=${DESTDIR}) || exit 0 + install.man: tcsh.man -mkdir -p ${DESTMAN} -rm -f ${DESTMAN}/tcsh.${MANSECT} cp $(srcdir)/tcsh.man ${DESTMAN}/tcsh.${MANSECT} chmod 444 ${DESTMAN}/tcsh.${MANSECT} -install.cygwin: install install.man +# Amiga Unix +#install.man: tcsh.man +# compress tcsh.man +# cp tcsh.man.Z ${DESTMAN}/tcsh.Z +# chmod 444 ${DESTMAN}/tcsh.Z + +# Apple A/UX +#install.man: tcsh.man +# -rm -f ${DESTMAN}/tcsh.${MANSECT}.Z +# nroff -man tcsh.man | compress > ${DESTMAN}/tcsh.${MANSECT}.Z +# chmod 444 ${DESTMAN}/tcsh.${MANSECT}.Z + +install.cygwin: install + -gzip ${DESTMAN}/tcsh.${MANSECT} -mkdir -p ${DESTDIR}${prefix}/share/doc/tcsh cp ${srcdir}/FAQ ${srcdir}/Fixes ${DESTDIR}${prefix}/share/doc/tcsh cp ${srcdir}/NewThings ${srcdir}/README ${DESTDIR}${prefix}/share/doc/tcsh @@ -542,24 +642,15 @@ install.cygwin: install install.man cp -p ${srcdir}/cygwin/postinstall.sh ${DESTDIR}/etc/postinstall/tcsh.sh cp -p ${srcdir}/cygwin/preremove.sh ${DESTDIR}/etc/preremove/tcsh.sh -# Amiga Unix -#install.man: tcsh.man -# compress tcsh.man -# cp tcsh.man.Z ${DESTMAN}/tcsh.Z -# chmod 444 ${DESTMAN}/tcsh.Z - -# Apple A/UX -#install.man: tcsh.man -# -rm -f ${DESTMAN}/tcsh.${MANSECT}.Z -# nroff -man tcsh.man | compress > ${DESTMAN}/tcsh.${MANSECT}.Z -# chmod 444 ${DESTMAN}/tcsh.${MANSECT}.Z - -clean: +clean: clean.catalogs ${RM} -f a.out strings x.c xs.c tcsh$(EXEEXT) tcsh.a _MAKE_LOG gethost ${RM} -f *.${SUF} *.i *.s ${RM} -f sh.prof.c ed.defns.h tc.const.h sh.err.h tc.defs.c ${RM} -f tcsh.*.m tcsh.*.cat +clean.catalogs: + @test "x${BUILD_CATALOGS}" = "xyes" && (cd nls; ${MAKE} clean) || exit 0 + veryclean: clean ${RM} -f Makefile config.h config_p.h ${RM} -f config.status config.cache config.log tcsh.ps @@ -607,7 +698,7 @@ shar: rm -rf tcsh-${VERSION} catalogs: - @(cd nls; make catalogs) + @test "x${BUILD_CATALOGS}" = "xyes" && (cd nls; ${MAKE} catalogs) || exit 0 tcsh-${VERSION}.tar.Z: rm -rf tcsh-${VERSION} Modified: stable/9/contrib/tcsh/Ported ============================================================================== --- stable/9/contrib/tcsh/Ported Wed Mar 7 00:16:32 2012 (r232632) +++ stable/9/contrib/tcsh/Ported Wed Mar 7 01:26:24 2012 (r232633) @@ -7,7 +7,7 @@ find it out-of-date, or you have additio christos -VENDOR : sun +VENDOR : Sun MODELS : sun3, sun4, sun386i COMPILER: cc, gcc, acc CFLAGS : normal @@ -18,7 +18,7 @@ ENVIRON : n/a NOTES : Don't compile with /usr/5bin/cc VERSION : 6.08 -VENDOR : sun +VENDOR : Sun MODELS : sun4, ultra COMPILER: cc, gcc CFLAGS : normal @@ -34,18 +34,29 @@ NOTES : The sunpro compiler cannot compi : point failures of programs exec'ed from tcsh. VERSION : 6.08 -VENDOR : sun +VENDOR : Sun MODELS : ultra COMPILER: WorkShop cc CFLAGS : normal LIBES : -lcurses -lsocket -lnsl -OS : solaris 2.6 +OS : solaris 2.6, 2.7, 8 CONFIG : sol26 ENVIRON : n/a NOTES : none VERSION : 6.08 -VENDOR : sun +VENDOR : Sun +MODELS : ultra, i686, x86_64 +COMPILER: Sun Studio cc +CFLAGS : normal +LIBES : -lcurses -lsocket -lnsl +OS : solaris 9, 10 +CONFIG : sol29 +ENVIRON : n/a +NOTES : none +VERSION : 6.18 + +VENDOR : Sun MODELS : i386 COMPILER: cc, gcc CFLAGS : -D__STDC__=0 @@ -56,7 +67,7 @@ ENVIRON : n/a NOTES : n/a VERSION : 6.04.13 -VENDOR : sun +VENDOR : Sun MODELS : sun4 COMPILER: gcc CFLAGS : normal Modified: stable/9/contrib/tcsh/README ============================================================================== --- stable/9/contrib/tcsh/README Wed Mar 7 00:16:32 2012 (r232632) +++ stable/9/contrib/tcsh/README Wed Mar 7 01:26:24 2012 (r232633) @@ -1,4 +1,4 @@ -This is tcsh version 6.17.00. Tcsh is a version of the Berkeley +This is tcsh version 6.18.01. Tcsh is a version of the Berkeley C-Shell, with the addition of: a command line editor, command and file name completion, listing, etc. and a bunch of small additions to the shell itself. @@ -87,7 +87,7 @@ To install tcsh: 10) Enjoy. -12) PLEASE file any bug reports (and fixes), code for new features at: +11) PLEASE file any bug reports (and fixes), code for new features at: http://bugs.gw.com/ Modified: stable/9/contrib/tcsh/WishList ============================================================================== --- stable/9/contrib/tcsh/WishList Wed Mar 7 00:16:32 2012 (r232632) +++ stable/9/contrib/tcsh/WishList Wed Mar 7 01:26:24 2012 (r232633) @@ -52,17 +52,6 @@ ey ) - bhooglan _________________________________________________________________ - I'm a long-time faithful user of tcsh, and one thing has always bugged - me -- the need to type "rehash" at a prompt when adding a new command. - My suggestions is to change tcsh so before printing "Command not - found.", it first searches its entire path and rebuilds its hash - table. Only after doing this, and if the command is still not in the - path, then print "Command not found.". I realize there are some - extreme cases in which this is suboptimal, but in most cases with - normal users this would be a big win, and simplify the manual and - perhaps even the code. - _________________________________________________________________ - Wish "tcsh -l" would accept other flags. At least "-c". Currently I can't get ssh to have the right environment unless it is a Modified: stable/9/contrib/tcsh/complete.tcsh ============================================================================== --- stable/9/contrib/tcsh/complete.tcsh Wed Mar 7 00:16:32 2012 (r232632) +++ stable/9/contrib/tcsh/complete.tcsh Wed Mar 7 01:26:24 2012 (r232633) @@ -1,5 +1,5 @@ # -# $tcsh: complete.tcsh,v 1.51 2007/10/01 21:51:59 christos Exp $ +# $tcsh: complete.tcsh,v 1.52 2010/05/07 17:54:13 christos Exp $ # example file using the new completion code # # Debian GNU/Linux @@ -636,7 +636,7 @@ if ($?_complete) then complete nmap 'n@-e@`ifconfig -l`@' 'p/*/$hostnames/' complete perldoc 'n@*@`\ls -1 /usr/libdata/perl/5.*/pod | sed s%\\.pod.\*\$%%`@' complete postfix 'n/*/(start stop reload abort flush check)/' - complete postmap 'n/1/(hash: regexp:)' 'c/hash:/f/' 'c/regexp:/f/' + complete postmap 'n/1/(hash: regexp:)/' 'c/hash:/f/' 'c/regexp:/f/' complete rcsdiff 'p@1@`\ls -1a RCS | sed -e "s/\(.*\),v/\1/"`@' *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 01:30:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B6F81106566B; Wed, 7 Mar 2012 01:30:42 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A26C98FC15; Wed, 7 Mar 2012 01:30:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q271UgF5066091; Wed, 7 Mar 2012 01:30:42 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q271Ug8S066089; Wed, 7 Mar 2012 01:30:42 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201203070130.q271Ug8S066089@svn.freebsd.org> From: Hiroki Sato Date: Wed, 7 Mar 2012 01:30:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232634 - releng/8.3/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 01:30:42 -0000 Author: hrs Date: Wed Mar 7 01:30:42 2012 New Revision: 232634 URL: http://svn.freebsd.org/changeset/base/232634 Log: MFS r232560: Copy ip6po_minmtu and ip6po_prefer_tempaddr in ip6_copypktopts(). This fixes inconsistency when options are specified by both setsockopt() and ancillary data types. PR: kern/158307 Approved by: re (kib) Modified: releng/8.3/sys/netinet6/ip6_output.c Directory Properties: releng/8.3/sys/ (props changed) Modified: releng/8.3/sys/netinet6/ip6_output.c ============================================================================== --- releng/8.3/sys/netinet6/ip6_output.c Wed Mar 7 01:26:24 2012 (r232633) +++ releng/8.3/sys/netinet6/ip6_output.c Wed Mar 7 01:30:42 2012 (r232634) @@ -2310,6 +2310,8 @@ copypktopts(struct ip6_pktopts *dst, str dst->ip6po_hlim = src->ip6po_hlim; dst->ip6po_tclass = src->ip6po_tclass; dst->ip6po_flags = src->ip6po_flags; + dst->ip6po_minmtu = src->ip6po_minmtu; + dst->ip6po_prefer_tempaddr = src->ip6po_prefer_tempaddr; if (src->ip6po_pktinfo) { dst->ip6po_pktinfo = malloc(sizeof(*dst->ip6po_pktinfo), M_IP6OPT, canwait); From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 01:31:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 534631065676; Wed, 7 Mar 2012 01:31:30 +0000 (UTC) (envelope-from mp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 39D858FC16; Wed, 7 Mar 2012 01:31:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q271VUmv066161; Wed, 7 Mar 2012 01:31:30 GMT (envelope-from mp@svn.freebsd.org) Received: (from mp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q271VTsY066148; Wed, 7 Mar 2012 01:31:29 GMT (envelope-from mp@svn.freebsd.org) Message-Id: <201203070131.q271VTsY066148@svn.freebsd.org> From: Mark Peek Date: Wed, 7 Mar 2012 01:31:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232635 - in stable/8: bin/csh contrib/tcsh contrib/tcsh/config contrib/tcsh/nls contrib/tcsh/nls/C contrib/tcsh/nls/et contrib/tcsh/nls/finnish contrib/tcsh/nls/french contrib/tcsh/nls... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 01:31:30 -0000 Author: mp Date: Wed Mar 7 01:31:29 2012 New Revision: 232635 URL: http://svn.freebsd.org/changeset/base/232635 Log: MFC r231990 Update to tcsh 6.18.01 Added: stable/8/contrib/tcsh/nls/Makefile.in - copied unchanged from r231990, head/contrib/tcsh/nls/Makefile.in stable/8/contrib/tcsh/nls/catgen - copied unchanged from r231990, head/contrib/tcsh/nls/catgen stable/8/contrib/tcsh/svn - copied unchanged from r231990, head/contrib/tcsh/svn Deleted: stable/8/bin/csh/host.defs stable/8/contrib/tcsh/nls/Makefile Modified: stable/8/bin/csh/Makefile stable/8/bin/csh/config.h stable/8/bin/csh/config_p.h stable/8/contrib/tcsh/Fixes stable/8/contrib/tcsh/Imakefile stable/8/contrib/tcsh/Makefile.in stable/8/contrib/tcsh/Ported stable/8/contrib/tcsh/README stable/8/contrib/tcsh/WishList stable/8/contrib/tcsh/complete.tcsh stable/8/contrib/tcsh/config.guess stable/8/contrib/tcsh/config.h.in stable/8/contrib/tcsh/config.sub stable/8/contrib/tcsh/config/bsd4.4 stable/8/contrib/tcsh/config_f.h stable/8/contrib/tcsh/configure stable/8/contrib/tcsh/configure.in stable/8/contrib/tcsh/ed.chared.c stable/8/contrib/tcsh/ed.inputl.c stable/8/contrib/tcsh/ed.refresh.c stable/8/contrib/tcsh/ed.screen.c stable/8/contrib/tcsh/ed.term.c stable/8/contrib/tcsh/gethost.c stable/8/contrib/tcsh/glob.c stable/8/contrib/tcsh/glob.h stable/8/contrib/tcsh/host.defs stable/8/contrib/tcsh/install-sh stable/8/contrib/tcsh/nls/C/charset stable/8/contrib/tcsh/nls/C/set19 stable/8/contrib/tcsh/nls/et/charset stable/8/contrib/tcsh/nls/et/set1 stable/8/contrib/tcsh/nls/et/set10 stable/8/contrib/tcsh/nls/et/set11 stable/8/contrib/tcsh/nls/et/set13 stable/8/contrib/tcsh/nls/et/set14 stable/8/contrib/tcsh/nls/et/set15 stable/8/contrib/tcsh/nls/et/set16 stable/8/contrib/tcsh/nls/et/set17 stable/8/contrib/tcsh/nls/et/set18 stable/8/contrib/tcsh/nls/et/set19 stable/8/contrib/tcsh/nls/et/set2 stable/8/contrib/tcsh/nls/et/set20 stable/8/contrib/tcsh/nls/et/set21 stable/8/contrib/tcsh/nls/et/set22 stable/8/contrib/tcsh/nls/et/set23 stable/8/contrib/tcsh/nls/et/set24 stable/8/contrib/tcsh/nls/et/set25 stable/8/contrib/tcsh/nls/et/set26 stable/8/contrib/tcsh/nls/et/set27 stable/8/contrib/tcsh/nls/et/set3 stable/8/contrib/tcsh/nls/et/set30 stable/8/contrib/tcsh/nls/et/set4 stable/8/contrib/tcsh/nls/et/set5 stable/8/contrib/tcsh/nls/et/set6 stable/8/contrib/tcsh/nls/et/set7 stable/8/contrib/tcsh/nls/et/set8 stable/8/contrib/tcsh/nls/et/set9 stable/8/contrib/tcsh/nls/finnish/charset stable/8/contrib/tcsh/nls/finnish/set1 stable/8/contrib/tcsh/nls/finnish/set10 stable/8/contrib/tcsh/nls/finnish/set11 stable/8/contrib/tcsh/nls/finnish/set12 stable/8/contrib/tcsh/nls/finnish/set13 stable/8/contrib/tcsh/nls/finnish/set14 stable/8/contrib/tcsh/nls/finnish/set16 stable/8/contrib/tcsh/nls/finnish/set17 stable/8/contrib/tcsh/nls/finnish/set18 stable/8/contrib/tcsh/nls/finnish/set19 stable/8/contrib/tcsh/nls/finnish/set2 stable/8/contrib/tcsh/nls/finnish/set20 stable/8/contrib/tcsh/nls/finnish/set22 stable/8/contrib/tcsh/nls/finnish/set23 stable/8/contrib/tcsh/nls/finnish/set25 stable/8/contrib/tcsh/nls/finnish/set26 stable/8/contrib/tcsh/nls/finnish/set27 stable/8/contrib/tcsh/nls/finnish/set29 stable/8/contrib/tcsh/nls/finnish/set3 stable/8/contrib/tcsh/nls/finnish/set6 stable/8/contrib/tcsh/nls/finnish/set7 stable/8/contrib/tcsh/nls/finnish/set9 stable/8/contrib/tcsh/nls/french/charset stable/8/contrib/tcsh/nls/french/set1 stable/8/contrib/tcsh/nls/french/set10 stable/8/contrib/tcsh/nls/french/set11 stable/8/contrib/tcsh/nls/french/set12 stable/8/contrib/tcsh/nls/french/set13 stable/8/contrib/tcsh/nls/french/set15 stable/8/contrib/tcsh/nls/french/set16 stable/8/contrib/tcsh/nls/french/set17 stable/8/contrib/tcsh/nls/french/set18 stable/8/contrib/tcsh/nls/french/set19 stable/8/contrib/tcsh/nls/french/set2 stable/8/contrib/tcsh/nls/french/set20 stable/8/contrib/tcsh/nls/french/set21 stable/8/contrib/tcsh/nls/french/set22 stable/8/contrib/tcsh/nls/french/set23 stable/8/contrib/tcsh/nls/french/set25 stable/8/contrib/tcsh/nls/french/set26 stable/8/contrib/tcsh/nls/french/set27 stable/8/contrib/tcsh/nls/french/set3 stable/8/contrib/tcsh/nls/french/set30 stable/8/contrib/tcsh/nls/french/set31 stable/8/contrib/tcsh/nls/french/set4 stable/8/contrib/tcsh/nls/french/set6 stable/8/contrib/tcsh/nls/french/set7 stable/8/contrib/tcsh/nls/french/set8 stable/8/contrib/tcsh/nls/french/set9 stable/8/contrib/tcsh/nls/german/charset stable/8/contrib/tcsh/nls/german/set1 stable/8/contrib/tcsh/nls/german/set10 stable/8/contrib/tcsh/nls/german/set13 stable/8/contrib/tcsh/nls/german/set15 stable/8/contrib/tcsh/nls/german/set16 stable/8/contrib/tcsh/nls/german/set17 stable/8/contrib/tcsh/nls/german/set18 stable/8/contrib/tcsh/nls/german/set19 stable/8/contrib/tcsh/nls/german/set2 stable/8/contrib/tcsh/nls/german/set20 stable/8/contrib/tcsh/nls/german/set22 stable/8/contrib/tcsh/nls/german/set23 stable/8/contrib/tcsh/nls/german/set25 stable/8/contrib/tcsh/nls/german/set26 stable/8/contrib/tcsh/nls/german/set27 stable/8/contrib/tcsh/nls/german/set29 stable/8/contrib/tcsh/nls/german/set3 stable/8/contrib/tcsh/nls/german/set30 stable/8/contrib/tcsh/nls/german/set31 stable/8/contrib/tcsh/nls/german/set4 stable/8/contrib/tcsh/nls/german/set5 stable/8/contrib/tcsh/nls/german/set6 stable/8/contrib/tcsh/nls/german/set7 stable/8/contrib/tcsh/nls/german/set8 stable/8/contrib/tcsh/nls/german/set9 stable/8/contrib/tcsh/nls/greek/charset stable/8/contrib/tcsh/nls/greek/set1 (contents, props changed) stable/8/contrib/tcsh/nls/greek/set10 (contents, props changed) stable/8/contrib/tcsh/nls/greek/set11 (contents, props changed) stable/8/contrib/tcsh/nls/greek/set12 (contents, props changed) stable/8/contrib/tcsh/nls/greek/set13 (contents, props changed) stable/8/contrib/tcsh/nls/greek/set14 (contents, props changed) stable/8/contrib/tcsh/nls/greek/set15 (contents, props changed) stable/8/contrib/tcsh/nls/greek/set16 (contents, props changed) stable/8/contrib/tcsh/nls/greek/set17 (contents, props changed) stable/8/contrib/tcsh/nls/greek/set18 (contents, props changed) stable/8/contrib/tcsh/nls/greek/set19 (contents, props changed) stable/8/contrib/tcsh/nls/greek/set2 (contents, props changed) stable/8/contrib/tcsh/nls/greek/set20 (contents, props changed) stable/8/contrib/tcsh/nls/greek/set21 (contents, props changed) stable/8/contrib/tcsh/nls/greek/set22 (contents, props changed) stable/8/contrib/tcsh/nls/greek/set23 (contents, props changed) stable/8/contrib/tcsh/nls/greek/set25 (contents, props changed) stable/8/contrib/tcsh/nls/greek/set26 (contents, props changed) stable/8/contrib/tcsh/nls/greek/set27 (contents, props changed) stable/8/contrib/tcsh/nls/greek/set29 (contents, props changed) stable/8/contrib/tcsh/nls/greek/set3 (contents, props changed) stable/8/contrib/tcsh/nls/greek/set30 (contents, props changed) stable/8/contrib/tcsh/nls/greek/set31 (contents, props changed) stable/8/contrib/tcsh/nls/greek/set4 (contents, props changed) stable/8/contrib/tcsh/nls/greek/set5 (contents, props changed) stable/8/contrib/tcsh/nls/greek/set6 (contents, props changed) stable/8/contrib/tcsh/nls/greek/set7 (contents, props changed) stable/8/contrib/tcsh/nls/greek/set8 (contents, props changed) stable/8/contrib/tcsh/nls/greek/set9 (contents, props changed) stable/8/contrib/tcsh/nls/italian/charset stable/8/contrib/tcsh/nls/italian/set1 stable/8/contrib/tcsh/nls/italian/set11 stable/8/contrib/tcsh/nls/italian/set13 stable/8/contrib/tcsh/nls/italian/set15 stable/8/contrib/tcsh/nls/italian/set17 stable/8/contrib/tcsh/nls/italian/set19 stable/8/contrib/tcsh/nls/italian/set2 stable/8/contrib/tcsh/nls/italian/set20 stable/8/contrib/tcsh/nls/italian/set22 stable/8/contrib/tcsh/nls/italian/set23 stable/8/contrib/tcsh/nls/italian/set26 stable/8/contrib/tcsh/nls/italian/set3 stable/8/contrib/tcsh/nls/italian/set30 stable/8/contrib/tcsh/nls/italian/set4 stable/8/contrib/tcsh/nls/italian/set6 stable/8/contrib/tcsh/nls/italian/set7 stable/8/contrib/tcsh/nls/ja/charset stable/8/contrib/tcsh/nls/ja/set1 (contents, props changed) stable/8/contrib/tcsh/nls/ja/set10 (contents, props changed) stable/8/contrib/tcsh/nls/ja/set11 (contents, props changed) stable/8/contrib/tcsh/nls/ja/set12 (contents, props changed) stable/8/contrib/tcsh/nls/ja/set13 (contents, props changed) stable/8/contrib/tcsh/nls/ja/set15 (contents, props changed) stable/8/contrib/tcsh/nls/ja/set16 (contents, props changed) stable/8/contrib/tcsh/nls/ja/set17 (contents, props changed) stable/8/contrib/tcsh/nls/ja/set18 (contents, props changed) stable/8/contrib/tcsh/nls/ja/set2 (contents, props changed) stable/8/contrib/tcsh/nls/ja/set21 (contents, props changed) stable/8/contrib/tcsh/nls/ja/set29 (contents, props changed) stable/8/contrib/tcsh/nls/ja/set3 (contents, props changed) stable/8/contrib/tcsh/nls/ja/set30 (contents, props changed) stable/8/contrib/tcsh/nls/ja/set4 (contents, props changed) stable/8/contrib/tcsh/nls/ja/set5 (contents, props changed) stable/8/contrib/tcsh/nls/ja/set6 (contents, props changed) stable/8/contrib/tcsh/nls/ja/set7 (contents, props changed) stable/8/contrib/tcsh/nls/ja/set8 (contents, props changed) stable/8/contrib/tcsh/nls/russian/charset stable/8/contrib/tcsh/nls/russian/set1 (contents, props changed) stable/8/contrib/tcsh/nls/russian/set10 (contents, props changed) stable/8/contrib/tcsh/nls/russian/set11 (contents, props changed) stable/8/contrib/tcsh/nls/russian/set12 (contents, props changed) stable/8/contrib/tcsh/nls/russian/set13 (contents, props changed) stable/8/contrib/tcsh/nls/russian/set14 (contents, props changed) stable/8/contrib/tcsh/nls/russian/set15 (contents, props changed) stable/8/contrib/tcsh/nls/russian/set16 (contents, props changed) stable/8/contrib/tcsh/nls/russian/set17 (contents, props changed) stable/8/contrib/tcsh/nls/russian/set18 (contents, props changed) stable/8/contrib/tcsh/nls/russian/set19 (contents, props changed) stable/8/contrib/tcsh/nls/russian/set2 (contents, props changed) stable/8/contrib/tcsh/nls/russian/set20 (contents, props changed) stable/8/contrib/tcsh/nls/russian/set22 (contents, props changed) stable/8/contrib/tcsh/nls/russian/set23 (contents, props changed) stable/8/contrib/tcsh/nls/russian/set25 (contents, props changed) stable/8/contrib/tcsh/nls/russian/set26 (contents, props changed) stable/8/contrib/tcsh/nls/russian/set27 (contents, props changed) stable/8/contrib/tcsh/nls/russian/set29 (contents, props changed) stable/8/contrib/tcsh/nls/russian/set30 (contents, props changed) stable/8/contrib/tcsh/nls/russian/set31 (contents, props changed) stable/8/contrib/tcsh/nls/russian/set4 (contents, props changed) stable/8/contrib/tcsh/nls/russian/set5 (contents, props changed) stable/8/contrib/tcsh/nls/russian/set6 (contents, props changed) stable/8/contrib/tcsh/nls/russian/set7 (contents, props changed) stable/8/contrib/tcsh/nls/russian/set8 (contents, props changed) stable/8/contrib/tcsh/nls/russian/set9 (contents, props changed) stable/8/contrib/tcsh/nls/spanish/charset stable/8/contrib/tcsh/nls/spanish/set1 stable/8/contrib/tcsh/nls/spanish/set10 stable/8/contrib/tcsh/nls/spanish/set13 stable/8/contrib/tcsh/nls/spanish/set14 stable/8/contrib/tcsh/nls/spanish/set15 stable/8/contrib/tcsh/nls/spanish/set16 stable/8/contrib/tcsh/nls/spanish/set17 stable/8/contrib/tcsh/nls/spanish/set18 stable/8/contrib/tcsh/nls/spanish/set19 stable/8/contrib/tcsh/nls/spanish/set2 stable/8/contrib/tcsh/nls/spanish/set20 stable/8/contrib/tcsh/nls/spanish/set22 stable/8/contrib/tcsh/nls/spanish/set23 stable/8/contrib/tcsh/nls/spanish/set25 stable/8/contrib/tcsh/nls/spanish/set26 stable/8/contrib/tcsh/nls/spanish/set27 stable/8/contrib/tcsh/nls/spanish/set3 stable/8/contrib/tcsh/nls/spanish/set30 stable/8/contrib/tcsh/nls/spanish/set4 stable/8/contrib/tcsh/nls/spanish/set5 stable/8/contrib/tcsh/nls/spanish/set6 stable/8/contrib/tcsh/nls/spanish/set7 stable/8/contrib/tcsh/nls/spanish/set8 stable/8/contrib/tcsh/nls/spanish/set9 stable/8/contrib/tcsh/nls/ukrainian/charset stable/8/contrib/tcsh/nls/ukrainian/set1 (contents, props changed) stable/8/contrib/tcsh/nls/ukrainian/set10 (contents, props changed) stable/8/contrib/tcsh/nls/ukrainian/set11 (contents, props changed) stable/8/contrib/tcsh/nls/ukrainian/set12 (contents, props changed) stable/8/contrib/tcsh/nls/ukrainian/set13 (contents, props changed) stable/8/contrib/tcsh/nls/ukrainian/set14 (contents, props changed) stable/8/contrib/tcsh/nls/ukrainian/set15 (contents, props changed) stable/8/contrib/tcsh/nls/ukrainian/set16 (contents, props changed) stable/8/contrib/tcsh/nls/ukrainian/set17 (contents, props changed) stable/8/contrib/tcsh/nls/ukrainian/set18 (contents, props changed) stable/8/contrib/tcsh/nls/ukrainian/set19 (contents, props changed) stable/8/contrib/tcsh/nls/ukrainian/set2 (contents, props changed) stable/8/contrib/tcsh/nls/ukrainian/set20 (contents, props changed) stable/8/contrib/tcsh/nls/ukrainian/set22 (contents, props changed) stable/8/contrib/tcsh/nls/ukrainian/set23 (contents, props changed) stable/8/contrib/tcsh/nls/ukrainian/set25 (contents, props changed) stable/8/contrib/tcsh/nls/ukrainian/set26 (contents, props changed) stable/8/contrib/tcsh/nls/ukrainian/set27 (contents, props changed) stable/8/contrib/tcsh/nls/ukrainian/set29 (contents, props changed) stable/8/contrib/tcsh/nls/ukrainian/set30 (contents, props changed) stable/8/contrib/tcsh/nls/ukrainian/set31 (contents, props changed) stable/8/contrib/tcsh/nls/ukrainian/set5 (contents, props changed) stable/8/contrib/tcsh/nls/ukrainian/set6 (contents, props changed) stable/8/contrib/tcsh/nls/ukrainian/set7 (contents, props changed) stable/8/contrib/tcsh/nls/ukrainian/set8 (contents, props changed) stable/8/contrib/tcsh/nls/ukrainian/set9 (contents, props changed) stable/8/contrib/tcsh/patchlevel.h stable/8/contrib/tcsh/pathnames.h stable/8/contrib/tcsh/sh.c stable/8/contrib/tcsh/sh.char.c stable/8/contrib/tcsh/sh.char.h stable/8/contrib/tcsh/sh.decls.h stable/8/contrib/tcsh/sh.dir.c stable/8/contrib/tcsh/sh.dol.c stable/8/contrib/tcsh/sh.err.c stable/8/contrib/tcsh/sh.exec.c stable/8/contrib/tcsh/sh.exp.c stable/8/contrib/tcsh/sh.file.c stable/8/contrib/tcsh/sh.func.c stable/8/contrib/tcsh/sh.glob.c stable/8/contrib/tcsh/sh.h stable/8/contrib/tcsh/sh.hist.c stable/8/contrib/tcsh/sh.lex.c stable/8/contrib/tcsh/sh.misc.c stable/8/contrib/tcsh/sh.parse.c stable/8/contrib/tcsh/sh.print.c stable/8/contrib/tcsh/sh.proc.c stable/8/contrib/tcsh/sh.proc.h stable/8/contrib/tcsh/sh.sem.c stable/8/contrib/tcsh/sh.set.c stable/8/contrib/tcsh/sh.time.c stable/8/contrib/tcsh/tc.alloc.c stable/8/contrib/tcsh/tc.const.c stable/8/contrib/tcsh/tc.decls.h stable/8/contrib/tcsh/tc.disc.c stable/8/contrib/tcsh/tc.func.c stable/8/contrib/tcsh/tc.nls.c stable/8/contrib/tcsh/tc.nls.h stable/8/contrib/tcsh/tc.os.c stable/8/contrib/tcsh/tc.os.h stable/8/contrib/tcsh/tc.prompt.c stable/8/contrib/tcsh/tc.sig.c stable/8/contrib/tcsh/tc.sig.h stable/8/contrib/tcsh/tc.str.c stable/8/contrib/tcsh/tc.wait.h stable/8/contrib/tcsh/tc.who.c stable/8/contrib/tcsh/tcsh.man stable/8/contrib/tcsh/tcsh.man2html stable/8/contrib/tcsh/tw.color.c stable/8/contrib/tcsh/tw.init.c stable/8/contrib/tcsh/tw.parse.c stable/8/contrib/tcsh/vms.termcap.c Directory Properties: stable/8/bin/csh/ (props changed) stable/8/contrib/tcsh/ (props changed) stable/8/contrib/tcsh/nls/greek/set24 (props changed) stable/8/contrib/tcsh/nls/ja/set24 (props changed) stable/8/contrib/tcsh/nls/russian/set21 (props changed) stable/8/contrib/tcsh/nls/russian/set24 (props changed) stable/8/contrib/tcsh/nls/russian/set3 (props changed) stable/8/contrib/tcsh/nls/ukrainian/set21 (props changed) stable/8/contrib/tcsh/nls/ukrainian/set24 (props changed) stable/8/contrib/tcsh/nls/ukrainian/set3 (props changed) stable/8/contrib/tcsh/nls/ukrainian/set4 (props changed) Modified: stable/8/bin/csh/Makefile ============================================================================== --- stable/8/bin/csh/Makefile Wed Mar 7 01:30:42 2012 (r232634) +++ stable/8/bin/csh/Makefile Wed Mar 7 01:31:29 2012 (r232635) @@ -18,7 +18,7 @@ DFLAGS= -D_PATH_TCSHELL='"/rescue/${PROG DFLAGS= -D_PATH_TCSHELL='"/bin/${PROG}"' .endif CFLAGS+= -I. -I${.CURDIR} -I${TCSHDIR} ${DFLAGS} -WARNS?= 0 +WARNS?= 1 SRCS= sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \ sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \ sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \ @@ -107,10 +107,10 @@ gethost: gethost.c sh.err.h tc.const.h s @rm -f ${.TARGET} ${CC} -o gethost ${LDFLAGS} ${CFLAGS} ${TCSHDIR}/gethost.c -tc.defs.c: gethost ${.CURDIR}/host.defs +tc.defs.c: gethost ${TCSHDIR}/host.defs @rm -f ${.TARGET} @echo "/* Do not edit this file, make creates it */" > ${.TARGET} - ./gethost ${.CURDIR}/host.defs >> ${.TARGET} + ./gethost ${TCSHDIR}/host.defs >> ${.TARGET} ed.defns.h: ed.defns.c @rm -f ${.TARGET} Modified: stable/8/bin/csh/config.h ============================================================================== --- stable/8/bin/csh/config.h Wed Mar 7 01:30:42 2012 (r232634) +++ stable/8/bin/csh/config.h Wed Mar 7 01:31:29 2012 (r232635) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* config.h. Generated by configure. */ +/* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.in by autoheader. */ /* Define to the type of elements in the array set by `getgroups'. Usually @@ -12,9 +12,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_AUTH_H */ -/* Define to 1 if you have the `catgets' function. */ -#define HAVE_CATGETS 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_CRYPT_H */ @@ -41,6 +38,9 @@ /* Define to 1 if you have the `dup2' function. */ #define HAVE_DUP2 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_FEATURES_H */ + /* Define to 1 if you have the `getauthid' function. */ /* #undef HAVE_GETAUTHID */ @@ -56,7 +56,10 @@ /* Define to 1 if you have the `getutent' function. */ /* #undef HAVE_GETUTENT */ -/* Define if you have the iconv() function. */ +/* Define to 1 if you have the `getutxent' function. */ +/* #undef HAVE_GETUTXENT */ + +/* Define if you have the iconv() function and it works. */ /* #undef HAVE_ICONV */ /* Define to 1 if you have the header file. */ @@ -65,6 +68,9 @@ /* Define to 1 if the system has the type `long long'. */ #define HAVE_LONG_LONG 1 +/* Define to 1 if you have the `mallinfo' function. */ +/* #undef HAVE_MALLINFO */ + /* Define to 1 if mbrtowc and mbstate_t are properly declared. */ #define HAVE_MBRTOWC 1 @@ -77,6 +83,9 @@ /* Define to 1 if you have the `memset' function. */ #define HAVE_MEMSET 1 +/* Define to 1 if you have the `mkstemp' function. */ +#define HAVE_MKSTEMP 1 + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ @@ -86,6 +95,9 @@ /* Define to 1 if you have the `nl_langinfo' function. */ #define HAVE_NL_LANGINFO 1 +/* Define to 1 if you have the header file. */ +#define HAVE_PATHS_H 1 + /* Define to 1 if you have the `sbrk' function. */ #define HAVE_SBRK 1 @@ -120,22 +132,34 @@ /* Define to 1 if you have the `strstr' function. */ #define HAVE_STRSTR 1 -/* Define to 1 if `d_ino' is member of `struct dirent'. */ +/* Define to 1 if `d_ino' is a member of `struct dirent'. */ #define HAVE_STRUCT_DIRENT_D_INO 1 -/* Define to 1 if `ss_family' is member of `struct sockaddr_storage'. */ +/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */ #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 -/* Define to 1 if `ut_host' is member of `struct utmp'. */ +/* Define to 1 if `ut_host' is a member of `struct utmpx'. */ +/* #undef HAVE_STRUCT_UTMPX_UT_HOST */ + +/* Define to 1 if `ut_tv' is a member of `struct utmpx'. */ +/* #undef HAVE_STRUCT_UTMPX_UT_TV */ + +/* Define to 1 if `ut_user' is a member of `struct utmpx'. */ +/* #undef HAVE_STRUCT_UTMPX_UT_USER */ + +/* Define to 1 if `ut_xtime' is a member of `struct utmpx'. */ +/* #undef HAVE_STRUCT_UTMPX_UT_XTIME */ + +/* Define to 1 if `ut_host' is a member of `struct utmp'. */ #define HAVE_STRUCT_UTMP_UT_HOST 1 -/* Define to 1 if `ut_tv' is member of `struct utmp'. */ +/* Define to 1 if `ut_tv' is a member of `struct utmp'. */ /* #undef HAVE_STRUCT_UTMP_UT_TV */ -/* Define to 1 if `ut_user' is member of `struct utmp'. */ +/* Define to 1 if `ut_user' is a member of `struct utmp'. */ /* #undef HAVE_STRUCT_UTMP_UT_USER */ -/* Define to 1 if `ut_xtime' is member of `struct utmp'. */ +/* Define to 1 if `ut_xtime' is a member of `struct utmp'. */ /* #undef HAVE_STRUCT_UTMP_UT_XTIME */ /* Define to 1 if you have the `sysconf' function. */ @@ -179,25 +203,31 @@ /* Support NLS. */ #define NLS 1 +/* Support NLS catalogs. */ +#define NLS_CATALOGS 1 + /* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "" +#define PACKAGE_BUGREPORT "http://bugs.gw.com/" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "tcsh" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "tcsh 6.18.01" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "tcsh" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "6.18.01" /* Define to 1 if the `setpgrp' function takes no argument. */ /* #undef SETPGRP_VOID */ -/* The size of a `wchar_t', as computed by sizeof. */ +/* The size of `wchar_t', as computed by sizeof. */ #define SIZEOF_WCHAR_T 4 /* Define to 1 if the `S_IS*' macros in do not work properly. */ @@ -206,6 +236,11 @@ /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 +/* Define for Solaris 2.5.1 so the uint32_t typedef from , + , or is not used. If the typedef were allowed, the + #define below would cause a syntax error. */ +/* #undef _UINT32_T */ + /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ @@ -215,7 +250,7 @@ /* Define to `int' if does not define. */ /* #undef mode_t */ -/* Define to `unsigned' if does not define. */ +/* Define to `unsigned int' if does not define. */ /* #undef size_t */ /* Define to `int' if neither nor define. */ @@ -227,6 +262,10 @@ /* Define to `int' if doesn't define. */ /* #undef uid_t */ +/* Define to the type of an unsigned integer type of width exactly 32 bits if + such a type exists and the standard includes do not define it. */ +/* #undef uint32_t */ + /* Define to empty if the keyword `volatile' does not work. Warning: valid code using `volatile' can become incorrect without. Disable with care. */ /* #undef volatile */ @@ -234,9 +273,5 @@ #include "config_p.h" #include "config_f.h" -#ifndef NO_NLS_CATALOGS -#define NLS_CATALOGS -#endif - /* Work around a vendor issue where config_f.h is #undef'ing this setting */ #define SYSMALLOC Modified: stable/8/bin/csh/config_p.h ============================================================================== --- stable/8/bin/csh/config_p.h Wed Mar 7 01:30:42 2012 (r232634) +++ stable/8/bin/csh/config_p.h Wed Mar 7 01:31:29 2012 (r232635) @@ -105,9 +105,6 @@ #elif defined(__APPLE__) # define SYSMALLOC - -#else -# define NLS_CATALOGS #endif #endif /* _h_config */ Modified: stable/8/contrib/tcsh/Fixes ============================================================================== --- stable/8/contrib/tcsh/Fixes Wed Mar 7 01:30:42 2012 (r232634) +++ stable/8/contrib/tcsh/Fixes Wed Mar 7 01:31:29 2012 (r232635) @@ -1,3 +1,147 @@ + 6. V6.18.01 - 20120214 + 5. fix interruptible wait again + 4. ignore bogus compiler overflow message + 3. cleanup ifdefs in utmp code, and provide default array entries + 2. Ignore #machine entries in host.defs + 1. Detect missing ) in gethost.c (Corinna Vinschen) + +104. V6.18.00 - 20120114 +103. remove unused variables. +102. Make gethost use definitions for x __x__ and __x automatically. +101. More utmp fixes +100. V6.17.10 - 20120105 + 99. Add more FreeBSD/NetBSD machines + 98. Add portability wrapper for gencat + 97. Fix warning for write in SYSMALLOC systems. + 96. V6.17.09 - 20120102 + 95. revert gencat handling to pre-cygwin fixes (without the env settings) + 94. remove stray endutent() + 93. V6.17.08 - 20111230 + 92. Remove - from gencat + 91. Provide support for malloc_usable_size() so that linux works again + without SYSMALLOC + 90. Add support for FreeBSD's utmpx. + 89. V6.17.07 - 20111227 + 88. Fix debian bug #645238: tcsh segfaults when prompt includes %j and + there are more than 10 jobs. + 87. PR/155: Default $anyerror to set for backward compatibility + 86. PR/149: Don't print -1 in %j (Vojtech Vitek) + 85. handle -- on chdir commands as the end of options processing so that + they can process a directory like -x without resorting to ./-x + (Andrew Stevenson) + 84. Handle write(2) returning ENOENT from SoFS, thanks ++HAL (Robert Byrnes) + 83. PR/38: Null check for jobs (Kurt Miller) + 82. Fix spelling correction correcting ./foo -> ../foo2 (jean-luc leger) + 81. PR/120: string0 in filetest does not have enough space. + 80. V6.17.06 - 20110415 + 79. PR/110: Add $anyerror to select behavior. Default to the new one. + 78. Don't try to spell commands that are correct (Rouben Rostamian) + [./tcsh -f; set path=($path 2); mkdir foo2; cd foo2; touch foo; + chmod +x foo; set correct=cmd; ./foo -> ../foo] + 77. Don't push the syntax struct on the cleanup stack, because on foo;bar + if foo fails, we will free bar prematurely (Ben Miller) + 76. Avoid infinite loop while trying to print the pid of a dying process + to a closed file (Bob Arendt) + 75. Handle completion of ${ variables (Anthony Mallet) + 74. Add --disable-nls-catalogs (Corinna Vinschen) + 73. convert message catalogs to UTF-8 (Werner Fink) + 72. check that the NLS path works before setting $NLSPATH. + 71. use SYSMALLOC for GLIBC (Werner Fink) + 70. use mallinfo for SYSMALLOC (Corinna Vinschen) + 69. V6.17.05 - 20110201 + 68. Use mkstemp() if there for here docs (Werner Fink) + 67. Fix handling of errors and exit values in builtins (Werner Fink) + 66. Better pty name detection (Werner Fink) + 65. Enable NLS catalogs on Cygwin (Corinna Vinschen) + 64. NLSPATH handling fixes (Corinna Vinschen) + 63. Avoid infrequent exit when tcsh cd's into a non-existent directory + https://bugzilla.novell.com/show_bug.cgi?id=293395 (Werner Fink) + 62. Don't try to spell check full path binaries that are correct because + they can cause hangs when other nfs partitions are hung. (Werner Fink) + 61. Avoid nested interrupts when exiting causing history writing to fail + https://bugzilla.novell.com/show_bug.cgi?id=331627 (Werner Fink) + 60. Instead of giving an error or ignoring lines with missing eol at eof, + process them. + 59. Avoid leaking fd's in mail check (Werner Fink) + 58. Add cygwin_xcrypt() (Corinna Vinschen) + 57. Recognize i686 (Corinna Vinschen) + 56. Rename cygwin32 to cygwin and bring it up-to-date with modern cygwin + settings (Corinna Vinschen) + 55. Avoid double slashes in cdpath (Corinna Vinschen) + 54. V6.17.04 - 20110118 + 53. Revert PR/110, breaks the test suite. + 52. V6.17.03 - 20110117 + 51. PR/102: Complain on input files with missing trailing \n + 50. PR/104: If atime == mtime we don't have new mail. + 49. PR/113: Don't allow illegal variable names to be set. + 48. PR/112: don't set $REMOTEHOST on the local machine. + 47. PR/110: exit status of the pipeline should be the status of the last + command. + 46. Android support (Corinna Vinschen) + 45. Add AUTOSET_KANJI which works around the Shift-JIS encoding that + translates unshifted 7 bit ASCII (Werner Fink) + 44. Handle mb{r,}towc() returning 0 by setting the return value to NUL + (Jean-Luc Leger) + 43. PR/109: make wait interruptible (Vojtech Vitek) + 42. resource limit fixes: signed vs. unsigned, megabyte issue, doc issues + (Robert Byrnes) + 41. remove .bat and .cmd handling for executables on cygwin (Corinna Vinschen) + 40. Don't echo history while history -L or history -M + 39. Check for EOS before ** from Greg Dionne + 38. Don't fork in backeval from Bryan Mason + 37. Better globstar support from Greg Dionne + 36. Error out when processing the last incomplete line instead of silently + ignoring it (Anders Kaseorg) + 35. Fix SEGV from echo `` + 34. Better fixes for histchars and promptchars (nargs) + 33. Fix win32 issue calling fmalloc/ffree from non-thread-safe context. + (Fabio Fabbri) + 32. V6.17.02 - 20100512 + 31. PR/79: nargs: Better handling for promptchars. + 30. PR/97: Add parseoctal to retain compatibility with previous versions (Jim + Zajkowski) + 29. PR/84: Performance fixes for large history merges (add + hashtable (Ted Anderson) + 28. Revert previous #23; people should use $histlit if they want this + feature. + 27. Don't kill "hup" background jobs when a child of the shell exits. + From Debian. + 26. Ignore \r\n in the command line options for OS's that don't strip + these from #!; from Debian + 25. Fix enhanced missing patch (Greg Dionne) + 24. Callers of rt_mbtowc don't grok -2 as a return. Return -1 for now. + (Corinna Vinschen) + 23. Turn HistLit on while recording history to avoid \!\! losing its \. + From Debian + 22. set autoexpand; set histchars="";\n crash. From Debian + 21. V6.17.01 - 20100506 + 20. unset verbose while we are reading the history file to avoid echoing + to the terminal. (Jeffrey Bastian) + 19. globstar addition, Enhance addition, euid, euser, gid variables + (Greg Dionne) + 18. Make 'e' in vi mode work like 'b' - use wordchars (Alistair Crooks) + 17. Handle UTF-16 surrogates (Corinna Vinschen) + 16. Make tcsh work on systems where sizeof(wchar_t) == 2 (Corinna Vinschen) + 15. Better support for Solaris >= 2.9 (Thomas Uhle) + 14. Change internal expression calculations to long long so that we can + deal with > 32 bit time, inodes, uids, file sizes etc. + 13. Add new linux resource limits. + 12. Don't print 'Exit X' when printexitvalue is set in `` expressions + (Jeff Bastian) + 11. Add more LS_COLORS vars (M.H. Anderson) + 10. Reduce whitespace in Makefile (Don Estabrook) + 9. Manual page fixes (Alan R. S. Bueno) + 8. Remove history in loops bug from the documentation (Holger Weiss) + 7. Add autorehash (Holger Weiss) + 6. Add history.at (Ted Anderson) + 5. Better NLSPATH handling (Norm Jacobs) + 4. Fix hostname building from utmp (Cyrus Rahman) + 3. Handle pending signals before flush so that the the history file does + not get truncated. (Ted Anderson) + 2. Fix AsciiOnly setting that broke 8 bit input. (Juergen Keil) + 1. remember to closedir in mailchk (from Werner Fink, reported by + David Binderman) + 21. V6.17.00 - 20090710 20. Fix dataroot autoconf issue. 19. Fix directory stuff for unit tests. Modified: stable/8/contrib/tcsh/Imakefile ============================================================================== --- stable/8/contrib/tcsh/Imakefile Wed Mar 7 01:30:42 2012 (r232634) +++ stable/8/contrib/tcsh/Imakefile Wed Mar 7 01:31:29 2012 (r232635) @@ -1,5 +1,5 @@ XCOMM -XCOMM $tcsh: Imakefile,v 1.86 2007/03/19 23:25:02 christos Exp $ +XCOMM $tcsh: Imakefile,v 1.87 2010/01/28 19:01:05 christos Exp $ XCOMM XCOMM Imakefile for tcsh 6.12 XCOMM Marc Horowitz, MIT SIPB @@ -93,7 +93,11 @@ ones. Please send in your fixes and add # if (OSMinorVersion < 6) # define ConfigH sol24 # else -# define ConfigH sol26 +# if (OSMinorVersion < 9) +# define ConfigH sol26 +# else +# define ConfigH sol29 +# endif # endif # endif # endif Modified: stable/8/contrib/tcsh/Makefile.in ============================================================================== --- stable/8/contrib/tcsh/Makefile.in Wed Mar 7 01:30:42 2012 (r232634) +++ stable/8/contrib/tcsh/Makefile.in Wed Mar 7 01:31:29 2012 (r232635) @@ -1,4 +1,4 @@ -# $tcsh: Makefile.in,v 3.40 2009/06/24 22:09:05 christos Exp $ +# $tcsh: Makefile.in,v 3.49 2011/02/05 17:35:31 christos Exp $ # Makefile.in 4.3 6/11/83 # # C Shell with process control; VM/UNIX VAX Makefile @@ -26,22 +26,27 @@ CF=-c CPPFLAGS=-I. -I$(srcdir) LFLAGS= -#LFLAGS= -Zn10000 # hpux lint +# hpux lint +#LFLAGS= -Zn10000 -CFLAGS = @CFLAGS@ # This is set by autoconf. -#CFLAGS= -g # debug -#CFLAGS= -O # production -#CFLAGS= # Broken optimizers.... +# This is set by autoconf: +CFLAGS = @CFLAGS@ +# debug: +#CFLAGS= -g +# production: +#CFLAGS= -O +# Broken optimizers.... +#CFLAGS= #CFLAGS= -g -pg -DPROF #CFLAGS= -O -pg -DPROF # gcc 1.00-1.37 -#CFLAGS= -O -finline-functions -fstrength-reduce +#CFLAGS= -O -finline-functions -fstrength-reduce # gcc 1.37-1.40 -#CFLAGS= -O -fcombine-regs -finline-functions -fstrength-reduce +#CFLAGS= -O -fcombine-regs -finline-functions -fstrength-reduce # add -msoft-float for 68881 machines. # gcc 2.0 @@ -67,8 +72,10 @@ CFLAGS = @CFLAGS@ # This is set by auto #CFLAGS= -O -Mnodebug -Mnoperfmon # DEC Alpha OSF/1 -#CFLAGS= -O2 -Olimit 2000 ## Normal Optimization -#CFLAGS= -O3 -Olimit 2000 ## Full Optimization - may not work +## Normal Optimization +#CFLAGS= -O2 -Olimit 2000 +## Full Optimization - may not work +#CFLAGS= -O3 -Olimit 2000 #CF=-j #SUF=u #.SUFFIXES: .u @@ -77,7 +84,8 @@ CFLAGS = @CFLAGS@ # This is set by auto # global optimizer! (-O3). # On SGI 4.0+ you need to add -D__STDC__ too. #CFLAGS= -O3 -#CFLAGS= -O3 -Olimit 2000 ## Ultrix 4.2a +## Ultrix 4.2a +#CFLAGS= -O3 -Olimit 2000 #CF=-j #SUF=u #.SUFFIXES: .u ## Ultrix and gnu-make need that @@ -110,14 +118,14 @@ CFLAGS = @CFLAGS@ # This is set by auto # CFLAGS= -O3 # SINIX RMx00 -#CFLAGS= -O # -D_POSIX_SOURCE # -kansi +#CFLAGS= -O# -D_POSIX_SOURCE# -kansi # Apollo's with cc [apollo builtins don't work with gcc] # and apollo should not define __STDC__ if it does not have # the standard header files. RT's (aos4.3) need that too; # you might want to skip the -O on the rt's... Not very wise. # AIX/ESA needs -D_IBMESA on command line (this may disappear by GA) -#DFLAGS=-U__STDC__ +#DFLAGS=-U__STDC__ #DFLAGS=-D_IBMESA # On aix2.2.1 we need more compiler space. #DFLAGS=-Nd4000 -Nn3000 @@ -142,17 +150,25 @@ DFLAGS = -D_PATH_TCSHELL='"${bindir}/tcs ################################################################ ## LDFLAGS. Define something here if you need to ################################################################ -LDFLAGS= @LDFLAGS@ ## This is set by autoconf. -#LDFLAGS= ## The simplest, suitable for all. -#LDFLAGS= -s ## Stripped. Takes less space on disk. -#LDFLAGS= -s -n ## Pure executable. Spares paging over -# ## the network for machines with local -# ## swap but external /usr/local/bin . -#LDFLAGS= -s -n -Bstatic ## Without dynamic linking. (SunOS/cc) -#LDFLAGS= -s -n -static ## Without dynamic linking. (SunOS/gcc) -#LDFLAGS= -Wl,-s,-n ## Stripped, shared text (Unicos) -#LDFLAGS= -s -static ## Link statically. (linux) -#LDFLAGS= -s -N ## Impure executable (linux) +## This is set by autoconf: +LDFLAGS= @LDFLAGS@ +## The simplest, suitable for all. +#LDFLAGS= +## Stripped. Takes less space on disk. +#LDFLAGS= -s +## Pure executable. Spares paging over the network for machines with +## local swap but external /usr/local/bin . +#LDFLAGS= -s -n +## Without dynamic linking. (SunOS/cc) +#LDFLAGS= -s -n -Bstatic +## Without dynamic linking. (SunOS/gcc) +#LDFLAGS= -s -n -static +## Stripped, shared text (Unicos) +#LDFLAGS= -Wl,-s,-n +## Link statically. (linux) +#LDFLAGS= -s -static +## Impure executable (linux) +#LDFLAGS= -s -N ################################################################ ## SBINLDFLAGS. Flags to build a tcsh suitable for installation in @@ -164,53 +180,100 @@ SBINLDFLAGS=-Wl,-R/etc/lib,-I/etc/lib/ld ################################################################ ## LIBES. Pick one, or roll your own. ################################################################ -LIBES= @LIBS@ ## This is set by autoconf. -#LIBES= -ltermcap ## BSD style things -#LIBES= -ltermcap ## SunOS, HP-UX, pyramid -#LIBES= -ltermcap ## Linux -#LIBES= -ltermcap -lshadow ## Linux with PW_SHADOW -#LIBES= -ltermcap -lsec ## Tek XD88/10 (UTekV) with PW_SHADOW -#LIBES= -ltermcap -lsec ## Motorola MPC (sysV88) with PW_SHADOW -#LIBES= -ltermcap -lcs ## Mach -#LIBES= -ltermcap -lbsd ## DEC osf1 on the alpha -#LIBES= -ltermcap -lbsd ## Intel paragon -#LIBES= -ltermcap -lbsd ## Clipper intergraph -#LIBES= -ltermcap -lseq ## Sequent's Dynix -#LIBES= -ltermcap -lauth ## Ultrix with Enhanced Security -#LIBES= -ltermcap -ldir -lx ## Xenix 386 style things -#LIBES= -ltermcap -lndir -lsocket -ljobs ## masscomp RTU6.0 -#LIBES= -lcurses ## AIX on the rt -#LIBES= -lcurses ## TitanOS on the stellar -#LIBES= -ltermlib -lsocket -lnsl ## SysV4 w/o BSDTIMES or Solaris 2 -#LIBES= -lcurses ## SysV3 w/o networking -#LIBES= -lcurses -lnet ## SysV3 with networking -#LIBES= -lcurses -ldir ## SysV2 w/o networking & dirlib -#LIBES= -lcurses -ldir -lnet ## SysV2 with networking & dirlib -#LIBES= -lcurses -lbsd ## AIX on the IBM 370 or rs6000 or ps2 -#LIBES= -lcurses -lbsd ## ETA10 -#LIBES= -lcurses -lbsd ## Irix3.1 on the SGI-IRIS4D -#LIBES= -lcurses -lbsd -lc_s ## Irix3.3 on the SGI-IRIS4D w/o yp -#LIBES= -lcurses -lsun -lbsd -lc_s ## Irix3.3 on the SGI-IRIS4D with yp -#LIBES= -lcurses -lsocket -lbsd ## Amdahl UTS 2.1 -#LIBES= -lcurses -lsocket ## Intel's hypercube. -#LIBES= -lcurses -lsocket ## ns32000 based Opus. -#LIBES= -lcurses -lcposix ## ISC 2.2 without networking -#LIBES= -lcposix -lc_s -lcurses -linet ## ISC 2.2 with networking -#LIBES= -lcurses -lsec -lc_s ## ISC 2.0.2 without networking -#LIBES= -lcurses -linet -lsec -lc_s ## ISC 2.0.2 with networking -#LIBES= -lcurses -lintl -lcrypt ## SCO SysVR3.2v2.0 -#LIBES= -lcurses -lintl -lsocket -lcrypt ## SCO+ODT1.1 -#LIBES= -lposix -ltermcap ## A/UX 2.0 -#LIBES= -lposix -ltermcap -lc_s ## A/UX 3.0 -#LIBES= -ldirent -lcurses ## att3b1 cc w/o shared lib & dirlib -#LIBES= -shlib -ldirent -lcurses ## att3b1 gcc with shared lib & dirlib -#LIBES= -ltermlib -lsocket -lnsl -lc /usr/ucblib/libucb.a ## SysV4 with BSDTIMES -#LIBES= -lcurses -lnsl -lsocket -lc /usr/ucblib/libucb.a ## Stardent Vistra -#LIBES= -ltermc ## emx under OS/2 -#LIBES= ## Minix, VMS_POSIX -#LIBES= -ltermcap -lcrypt ## Multiflow -#LIBES= -ltermcap -lcrypt ## NetBSD -#LIBES= -lcurses ## DDE Supermax +## This is set by autoconf. +LIBES= @LIBS@ +## BSD style things +#LIBES= -ltermcap +## SunOS, HP-UX, pyramid +#LIBES= -ltermcap +## Linux +#LIBES= -ltermcap +## Linux with PW_SHADOW +#LIBES= -ltermcap -lshadow +## Tek XD88/10 (UTekV) with PW_SHADOW +#LIBES= -ltermcap -lsec +## Motorola MPC (sysV88) with PW_SHADOW +#LIBES= -ltermcap -lsec +## Mach +#LIBES= -ltermcap -lcs +## DEC osf1 on the alpha +#LIBES= -ltermcap -lbsd +## Intel paragon +#LIBES= -ltermcap -lbsd +## Clipper intergraph +#LIBES= -ltermcap -lbsd +## Sequent's Dynix +#LIBES= -ltermcap -lseq +## Ultrix with Enhanced Security +#LIBES= -ltermcap -lauth +## Xenix 386 style things +#LIBES= -ltermcap -ldir -lx +## masscomp RTU6.0 +#LIBES= -ltermcap -lndir -lsocket -ljobs +## AIX on the rt +#LIBES= -lcurses +## TitanOS on the stellar +#LIBES= -lcurses +## SysV4 w/o BSDTIMES or Solaris 2 +#LIBES= -ltermlib -lsocket -lnsl +## SysV3 w/o networking +#LIBES= -lcurses +## SysV3 with networking +#LIBES= -lcurses -lnet +## SysV2 w/o networking & dirlib +#LIBES= -lcurses -ldir +## SysV2 with networking & dirlib +#LIBES= -lcurses -ldir -lnet +## AIX on the IBM 370 or rs6000 or ps2 +#LIBES= -lcurses -lbsd +## ETA10 +#LIBES= -lcurses -lbsd +## Irix3.1 on the SGI-IRIS4D +#LIBES= -lcurses -lbsd +## Irix3.3 on the SGI-IRIS4D w/o yp +#LIBES= -lcurses -lbsd -lc_s +## Irix3.3 on the SGI-IRIS4D with yp +#LIBES= -lcurses -lsun -lbsd -lc_s +## Amdahl UTS 2.1 +#LIBES= -lcurses -lsocket -lbsd +## Intel's hypercube. +#LIBES= -lcurses -lsocket +## ns32000 based Opus. +#LIBES= -lcurses -lsocket +## ISC 2.2 without networking +#LIBES= -lcurses -lcposix +## ISC 2.2 with networking +#LIBES= -lcposix -lc_s -lcurses -linet +## ISC 2.0.2 without networking +#LIBES= -lcurses -lsec -lc_s +## ISC 2.0.2 with networking +#LIBES= -lcurses -linet -lsec -lc_s +## SCO SysVR3.2v2.0 +#LIBES= -lcurses -lintl -lcrypt +## SCO+ODT1.1 +#LIBES= -lcurses -lintl -lsocket -lcrypt +## A/UX 2.0 +#LIBES= -lposix -ltermcap +## A/UX 3.0 +#LIBES= -lposix -ltermcap -lc_s +## att3b1 cc w/o shared lib & dirlib +#LIBES= -ldirent -lcurses +## att3b1 gcc with shared lib & dirlib +#LIBES= -shlib -ldirent -lcurses +## SysV4 with BSDTIMES +#LIBES= -ltermlib -lsocket -lnsl -lc /usr/ucblib/libucb.a +## Stardent Vistra +#LIBES= -lcurses -lnsl -lsocket -lc /usr/ucblib/libucb.a +## emx under OS/2 +#LIBES= -ltermc +## Minix, VMS_POSIX +#LIBES= +## Multiflow +#LIBES= -ltermcap -lcrypt +## NetBSD +#LIBES= -ltermcap -lcrypt +## DDE Supermax +#LIBES= -lcurses ################################################################ ## EXTRAFLAGS and EXTRALIBS @@ -222,8 +285,10 @@ LIBES= @LIBS@ ## This is set by aut # #Solaris and HPUX require the BSD libraries with AFS. #We use -lc to use only what we require. -#AFSAUXLIB = -lsocket -lnsl -lc -lucb # Solaris -#AFSAUXLIB = -lc -lBSD # HPUX +# Solaris +#AFSAUXLIB = -lsocket -lnsl -lc -lucb +# HPUX +#AFSAUXLIB = -lc -lBSD # #AFSLIB = -L$(AFSLIBDIR) -L$(AFSLIBDIR)/afs -lkauth -lprot -lubik\ # -lauth -lrxkad -lsys -ldes -lrx -llwp -lcom_err\ @@ -244,26 +309,38 @@ EXTRALIBS = @HESLIB@ $(AFSLIB) @LIBICONV # will lose the editor and job control. # This is for setting your C preprocessor value. -CPP = @CPP@ # This is set by autoconf. +# This is set by autoconf. +CPP = @CPP@ # The -B tells gcc to use /bin/ld. This is to avoid using the gnu ld, which # on the suns does not know how to make dynamically linked binaries. -CC = @CC@ # This is set by autoconf. +# This is set by autoconf. +CC = @CC@ #CC= gcc -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Werror -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wsign-compare -Wcast-qual -Wreturn-type -Wswitch -Wshadow -Wwrite-strings -Wextra -#CC= gcc -Wall -pipe -B/bin/ # -ansi -pedantic -#CC= gcc -m486 -pipe -Wall # Generate code for Intel 486 (linux) -#CC= shlicc # BSDI2.1 w/ shared libraries +# -ansi -pedantic +#CC= gcc -Wall -pipe -B/bin/ +# Generate code for Intel 486 (linux) +#CC= gcc -m486 -pipe -Wall +# BSDI2.1 w/ shared libraries +#CC= shlicc #CC= cc #CC= occ #CC= acc #CC= pcc #CC= hc -w -#CC= c89 # For VMS/POSIX -#CC= /bin/cc # For suns, w/o gcc and SVR4 -#CC= /usr/lib/sun.compile/cc # FPS 500 (+FPX) with Sun C compiler -#CC= /opt/SUNWspro/bin/cc # Solaris 2.1 -#CC= scc # Alliant fx2800 -#CC= cc -h0,ansi,novector,float0 # for NEC SX-4 +# For VMS/POSIX +#CC= c89 +# For suns, w/o gcc and SVR4 +#CC= /bin/cc +# FPS 500 (+FPX) with Sun C compiler +#CC= /usr/lib/sun.compile/cc +# Solaris 2.1 +#CC= /opt/SUNWspro/bin/cc +# Alliant fx2800 +#CC= scc +# for NEC SX-4 +#CC= cc -h0,ansi,novector,float0 #CC= lcc -wa +CC_FOR_GETHOST = @CC_FOR_GETHOST@ ED= ed AS= as RM= rm @@ -272,8 +349,10 @@ VGRIND= csh /usr/ucb/vgrind CTAGS= /usr/ucb/ctags #XSTR= /usr/ucb/xstr SCCS= /usr/local/sccs -PARALLEL=12 # Make the multi-max run fast. -#P=& # Use Sequent's parallel make +# Make the multi-max run fast. +PARALLEL=12 +# Use Sequent's parallel make +#P=& P= prefix=@prefix@ exec_prefix=@exec_prefix@ @@ -282,12 +361,17 @@ mandir=@datarootdir@/man MANSECT=1 DESTBIN=${DESTDIR}${bindir} DESTMAN=${DESTDIR}${mandir}/man${MANSECT} -# DESTMAN=${DESTDIR}/catman/man${MANSECT} # A/UX -# DESTMAN=${DESTDIR}/usr/share/man/man${MANSECT} # Stardent Vistra (SysVR4) -# DESTMAN=/usr/catman/1l # Amiga unix (SysVR4) +# A/UX +# DESTMAN=${DESTDIR}/catman/man${MANSECT} +# Stardent Vistra (SysVR4) +# DESTMAN=${DESTDIR}/usr/share/man/man${MANSECT} +# Amiga unix (SysVR4) +# DESTMAN=/usr/catman/1l EXEEXT=@EXEEXT@ FTPAREA=/usr/spool/ftp +BUILD_CATALOGS = @BUILD_CATALOGS@ + ASSRCS= sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \ sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \ sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \ @@ -330,9 +414,9 @@ AVSRCS= Fixes MAKEDIFFS MAKESHAR NewThin host.defs gethost.c tcsh.man2html configure.in configure config.h.in \ tests/testsuite.at TESTFILES= tests/aliases.at tests/arguments.at tests/commands.at \ - tests/expr.at tests/lexical.at tests/mb-eucjp.at tests/mb-utf8.at \ - tests/noexec.at tests/syntax.at tests/subst.at tests/variables.at \ - tests/sh.dol.at + tests/expr.at tests/lexical.at tests/mb-eucjp.at \ + tests/mb-utf8.at tests/noexec.at tests/syntax.at tests/subst.at \ + tests/variables.at tests/sh.dol.at VHSRCS=${PVSRCS} ${AVSRCS} @@ -345,7 +429,7 @@ DISTSRCS= ${PSSRCS} ${TWSRCS} ${EDSRCS} OBJS= ${SHOBJS} ${TWOBJS} ${EDOBJS} ${TCOBJS} -all: ${BUILD} +all: ${BUILD} catalogs tcsh$(EXEEXT):$(P) ${OBJS} rm -f tcsh$(EXEEXT) core @@ -365,7 +449,7 @@ pure:$(P) ${OBJS} gethost: gethost.c sh.err.h tc.const.h sh.h rm -f gethost - ${CC} -o gethost ${LDFLAGS} ${CFLAGS} ${CPPFLAGS} ${DFLAGS} $(srcdir)/gethost.c ${LIBES} ${EXTRALIBS} + ${CC_FOR_GETHOST} -o gethost ${CPPFLAGS} $(srcdir)/gethost.c tc.defs.c: gethost host.defs @rm -f $@.tmp @@ -463,7 +547,7 @@ $(srcdir)/tests/package.m4: $(srcdir)/co echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \ } >$(srcdir)/tests/package.m4 -$(srcdir)/tests/testsuite: $(srcdir)/tests/package.m4 $(srcdir}/tests/testsuite.at $(TESTFILES) +$(srcdir)/tests/testsuite: $(srcdir)/tests/package.m4 $(srcdir)/tests/testsuite.at $(TESTFILES) autom4te --language=autotest -I $(srcdir)/tests \ $(srcdir)/tests/testsuite.at -o $@.tmp mv $@.tmp $@ @@ -511,20 +595,36 @@ vgrind: install-strip: install -install: tcsh$(EXEEXT) +install: tcsh$(EXEEXT) install.catalogs install.man -mkdir -p ${DESTBIN} -mv -f ${DESTBIN}/tcsh$(EXEEXT) ${DESTBIN}/tcsh.old cp tcsh$(EXEEXT) ${DESTBIN}/tcsh$(EXEEXT) -strip ${DESTBIN}/tcsh$(EXEEXT) chmod 755 ${DESTBIN}/tcsh$(EXEEXT) +install.catalogs: + @test "x${BUILD_CATALOGS}" = "xyes" && (cd nls; ${MAKE} install DESTDIR=${DESTDIR}) || exit 0 + install.man: tcsh.man -mkdir -p ${DESTMAN} -rm -f ${DESTMAN}/tcsh.${MANSECT} cp $(srcdir)/tcsh.man ${DESTMAN}/tcsh.${MANSECT} chmod 444 ${DESTMAN}/tcsh.${MANSECT} -install.cygwin: install install.man +# Amiga Unix +#install.man: tcsh.man +# compress tcsh.man +# cp tcsh.man.Z ${DESTMAN}/tcsh.Z +# chmod 444 ${DESTMAN}/tcsh.Z + +# Apple A/UX +#install.man: tcsh.man +# -rm -f ${DESTMAN}/tcsh.${MANSECT}.Z +# nroff -man tcsh.man | compress > ${DESTMAN}/tcsh.${MANSECT}.Z +# chmod 444 ${DESTMAN}/tcsh.${MANSECT}.Z + +install.cygwin: install + -gzip ${DESTMAN}/tcsh.${MANSECT} -mkdir -p ${DESTDIR}${prefix}/share/doc/tcsh cp ${srcdir}/FAQ ${srcdir}/Fixes ${DESTDIR}${prefix}/share/doc/tcsh cp ${srcdir}/NewThings ${srcdir}/README ${DESTDIR}${prefix}/share/doc/tcsh @@ -542,24 +642,15 @@ install.cygwin: install install.man cp -p ${srcdir}/cygwin/postinstall.sh ${DESTDIR}/etc/postinstall/tcsh.sh cp -p ${srcdir}/cygwin/preremove.sh ${DESTDIR}/etc/preremove/tcsh.sh -# Amiga Unix -#install.man: tcsh.man -# compress tcsh.man -# cp tcsh.man.Z ${DESTMAN}/tcsh.Z -# chmod 444 ${DESTMAN}/tcsh.Z - -# Apple A/UX -#install.man: tcsh.man -# -rm -f ${DESTMAN}/tcsh.${MANSECT}.Z -# nroff -man tcsh.man | compress > ${DESTMAN}/tcsh.${MANSECT}.Z -# chmod 444 ${DESTMAN}/tcsh.${MANSECT}.Z - -clean: +clean: clean.catalogs ${RM} -f a.out strings x.c xs.c tcsh$(EXEEXT) tcsh.a _MAKE_LOG gethost ${RM} -f *.${SUF} *.i *.s ${RM} -f sh.prof.c ed.defns.h tc.const.h sh.err.h tc.defs.c ${RM} -f tcsh.*.m tcsh.*.cat +clean.catalogs: + @test "x${BUILD_CATALOGS}" = "xyes" && (cd nls; ${MAKE} clean) || exit 0 + veryclean: clean ${RM} -f Makefile config.h config_p.h ${RM} -f config.status config.cache config.log tcsh.ps @@ -607,7 +698,7 @@ shar: rm -rf tcsh-${VERSION} catalogs: - @(cd nls; make catalogs) + @test "x${BUILD_CATALOGS}" = "xyes" && (cd nls; ${MAKE} catalogs) || exit 0 tcsh-${VERSION}.tar.Z: rm -rf tcsh-${VERSION} Modified: stable/8/contrib/tcsh/Ported ============================================================================== --- stable/8/contrib/tcsh/Ported Wed Mar 7 01:30:42 2012 (r232634) +++ stable/8/contrib/tcsh/Ported Wed Mar 7 01:31:29 2012 (r232635) @@ -7,7 +7,7 @@ find it out-of-date, or you have additio christos -VENDOR : sun +VENDOR : Sun MODELS : sun3, sun4, sun386i COMPILER: cc, gcc, acc CFLAGS : normal @@ -18,7 +18,7 @@ ENVIRON : n/a NOTES : Don't compile with /usr/5bin/cc VERSION : 6.08 -VENDOR : sun +VENDOR : Sun MODELS : sun4, ultra COMPILER: cc, gcc CFLAGS : normal @@ -34,18 +34,29 @@ NOTES : The sunpro compiler cannot compi : point failures of programs exec'ed from tcsh. VERSION : 6.08 -VENDOR : sun +VENDOR : Sun MODELS : ultra COMPILER: WorkShop cc CFLAGS : normal LIBES : -lcurses -lsocket -lnsl -OS : solaris 2.6 +OS : solaris 2.6, 2.7, 8 CONFIG : sol26 ENVIRON : n/a NOTES : none VERSION : 6.08 -VENDOR : sun +VENDOR : Sun +MODELS : ultra, i686, x86_64 +COMPILER: Sun Studio cc +CFLAGS : normal +LIBES : -lcurses -lsocket -lnsl +OS : solaris 9, 10 +CONFIG : sol29 +ENVIRON : n/a +NOTES : none +VERSION : 6.18 + +VENDOR : Sun MODELS : i386 COMPILER: cc, gcc CFLAGS : -D__STDC__=0 @@ -56,7 +67,7 @@ ENVIRON : n/a NOTES : n/a VERSION : 6.04.13 -VENDOR : sun +VENDOR : Sun MODELS : sun4 COMPILER: gcc CFLAGS : normal Modified: stable/8/contrib/tcsh/README ============================================================================== --- stable/8/contrib/tcsh/README Wed Mar 7 01:30:42 2012 (r232634) +++ stable/8/contrib/tcsh/README Wed Mar 7 01:31:29 2012 (r232635) @@ -1,4 +1,4 @@ -This is tcsh version 6.17.00. Tcsh is a version of the Berkeley +This is tcsh version 6.18.01. Tcsh is a version of the Berkeley C-Shell, with the addition of: a command line editor, command and file name completion, listing, etc. and a bunch of small additions to the shell itself. @@ -87,7 +87,7 @@ To install tcsh: 10) Enjoy. -12) PLEASE file any bug reports (and fixes), code for new features at: +11) PLEASE file any bug reports (and fixes), code for new features at: http://bugs.gw.com/ Modified: stable/8/contrib/tcsh/WishList ============================================================================== --- stable/8/contrib/tcsh/WishList Wed Mar 7 01:30:42 2012 (r232634) +++ stable/8/contrib/tcsh/WishList Wed Mar 7 01:31:29 2012 (r232635) @@ -52,17 +52,6 @@ ey ) - bhooglan _________________________________________________________________ - I'm a long-time faithful user of tcsh, and one thing has always bugged - me -- the need to type "rehash" at a prompt when adding a new command. - My suggestions is to change tcsh so before printing "Command not - found.", it first searches its entire path and rebuilds its hash - table. Only after doing this, and if the command is still not in the - path, then print "Command not found.". I realize there are some - extreme cases in which this is suboptimal, but in most cases with - normal users this would be a big win, and simplify the manual and - perhaps even the code. - _________________________________________________________________ - Wish "tcsh -l" would accept other flags. At least "-c". Currently I can't get ssh to have the right environment unless it is a Modified: stable/8/contrib/tcsh/complete.tcsh ============================================================================== --- stable/8/contrib/tcsh/complete.tcsh Wed Mar 7 01:30:42 2012 (r232634) +++ stable/8/contrib/tcsh/complete.tcsh Wed Mar 7 01:31:29 2012 (r232635) @@ -1,5 +1,5 @@ # -# $tcsh: complete.tcsh,v 1.51 2007/10/01 21:51:59 christos Exp $ +# $tcsh: complete.tcsh,v 1.52 2010/05/07 17:54:13 christos Exp $ # example file using the new completion code # # Debian GNU/Linux @@ -636,7 +636,7 @@ if ($?_complete) then complete nmap 'n@-e@`ifconfig -l`@' 'p/*/$hostnames/' complete perldoc 'n@*@`\ls -1 /usr/libdata/perl/5.*/pod | sed s%\\.pod.\*\$%%`@' complete postfix 'n/*/(start stop reload abort flush check)/' - complete postmap 'n/1/(hash: regexp:)' 'c/hash:/f/' 'c/regexp:/f/' + complete postmap 'n/1/(hash: regexp:)/' 'c/hash:/f/' 'c/regexp:/f/' complete rcsdiff 'p@1@`\ls -1a RCS | sed -e "s/\(.*\),v/\1/"`@' complete X 'c/-/(I a ac allowMouseOpenFail allowNonLocalModInDev \ allowNonLocalXvidtune ar1 ar2 audit auth bestRefresh \ Modified: stable/8/contrib/tcsh/config.guess ============================================================================== --- stable/8/contrib/tcsh/config.guess Wed Mar 7 01:30:42 2012 (r232634) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 03:17:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7565C1065673; Wed, 7 Mar 2012 03:17:05 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id ACC858FC0C; Wed, 7 Mar 2012 03:17:03 +0000 (UTC) Received: by lagv3 with SMTP id v3so9609252lag.13 for ; Tue, 06 Mar 2012 19:17:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=vzWhP1wUTBBLfmn+iDd1vXt578n4jTnKEpaaQsbycaY=; b=x5kAD0zie1kx/EvWVItXp9XIP5dmSw4EF5I9qWzjPEd18b+IfK0mf8Ler1r4UZGROY SjtPQ8jHA9pwQf+8l0zSBtPn4HWA0AwJbAVV7R3or3gQWIRKjzJLHHe8ke0a5WM1bw6Q YLsgGz9lQpVuNE557A5b4n2AK4kRXK+JEuWO3oUDWQ56z0GxBd3w3h0TWoTLt1W74rkT 0kIfgdD3pEy6Y4Ve6OhPTWRIIbZaQZb/B82i1fT8Bz7vdkMMeOqJUTYswfFsT+RWcyLo VaTN80y861WHV3fIBWwbkA/ulosgW2raUbezJTFRtoAinKp6XH1ZDe0JWPl9+Fzmbl/n pSug== MIME-Version: 1.0 Received: by 10.112.102.161 with SMTP id fp1mr124117lbb.71.1331090222650; Tue, 06 Mar 2012 19:17:02 -0800 (PST) Sender: pluknet@gmail.com Received: by 10.152.21.73 with HTTP; Tue, 6 Mar 2012 19:17:02 -0800 (PST) In-Reply-To: <20120306190748.GB51782@jh> References: <201203061410.q26EAvav043586@svn.freebsd.org> <56c9876464416184673b0ea9b41f025e@evilcoder.org> <20120306190748.GB51782@jh> Date: Wed, 7 Mar 2012 06:17:02 +0300 X-Google-Sender-Auth: vtuQBFmE-WhDNDmIAhSgVdAKArc Message-ID: From: Sergey Kandaurov To: Jaakko Heinonen Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Remko Lodder , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org, Remko Lodder Subject: Re: svn commit: r232606 - stable/8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 03:17:05 -0000 On 6 March 2012 23:07, Jaakko Heinonen wrote: > On 2012-03-06, Remko Lodder wrote: >> On 06.03.2012 15:29, Sergey Kandaurov wrote: >> > >> > Eh, it seems you merged r238821 to stable/8, and that's wrong. > > Actually mergeinfo says r219005. > >> > Changes to top-level files should be merged directly to that file >> > rather than to the root of the whole tree (see rule 12). >> >> Point received and taken. I'll look after that the next time. How do I >> clean this up on the root? > > In the stable/8 root directory: > > $ svn merge -c -232606 . > $ svn revert ObsoleteFiles.inc > $ svn diff > > Property changes on: . > ___________________________________________________________________ > Modified: svn:mergeinfo > =A0 Reverse-merged /head:r219005 Yep, that is a way I used to reverse-merge things in stable together with mergeinfo. --=20 wbr, pluknet From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 03:29:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B4D09106564A; Wed, 7 Mar 2012 03:29:37 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail03.syd.optusnet.com.au (mail03.syd.optusnet.com.au [211.29.132.184]) by mx1.freebsd.org (Postfix) with ESMTP id 113F98FC18; Wed, 7 Mar 2012 03:29:36 +0000 (UTC) Received: from c211-30-171-136.carlnfd1.nsw.optusnet.com.au (c211-30-171-136.carlnfd1.nsw.optusnet.com.au [211.30.171.136]) by mail03.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q273TSsI021296 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 7 Mar 2012 14:29:29 +1100 Date: Wed, 7 Mar 2012 14:29:28 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Dimitry Andric In-Reply-To: <201203062015.q26KFNJA055743@svn.freebsd.org> Message-ID: <20120307120126.K969@besplex.bde.org> References: <201203062015.q26KFNJA055743@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232620 - in head/include: . xlocale X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 03:29:37 -0000 On Tue, 6 Mar 2012, Dimitry Andric wrote: > Log: > After r232498, programs built with -ansi or -std=c89 including > would not compile anymore, due to plain 'inline' keywords. Fix this by > using __inline instead. > > Reported by: Jia-Shiun Li > Discussed with: theraven Any chance of also fixing the style bugs? Old ctype was one of the most carefully written headers, so it was almost free of style bugs. > Modified: head/include/runetype.h > ============================================================================== > --- head/include/runetype.h Tue Mar 6 20:01:25 2012 (r232619) > +++ head/include/runetype.h Tue Mar 6 20:15:23 2012 (r232620) > @@ -90,7 +90,7 @@ extern const _RuneLocale *_CurrentRuneLo > extern const _RuneLocale *__getCurrentRuneLocale(void); Old ctype had no style bugs like declaring prototypes as extern. Old ctype carefully indented prototypes. > #else > extern _Thread_local const _RuneLocale *_ThreadRuneLocale; > -static inline const _RuneLocale *__getCurrentRuneLocale(void) > +static __inline const _RuneLocale *__getCurrentRuneLocale(void) > { > > if (_ThreadRuneLocale) > > Modified: head/include/xlocale/_ctype.h > ============================================================================== > --- head/include/xlocale/_ctype.h Tue Mar 6 20:01:25 2012 (r232619) > +++ head/include/xlocale/_ctype.h Tue Mar 6 20:15:23 2012 (r232620) > @@ -55,11 +55,11 @@ _RuneLocale *__runes_for_locale(locale_t > #ifndef _XLOCALE_INLINE > #if __GNUC__ && !__GNUC_STDC_INLINE__ > /* GNU89 inline has nonstandard semantics. */ > -#define _XLOCALE_INLINE extern inline > +#define _XLOCALE_INLINE extern __inline Old ctype always used a tab after #define. Old ctype even used a tab after macro names. > #else > /* Hack to work around people who define inline away */ Old ctype mostly terminated its comments. This comment now doesn't match the code. The code is now supposed to use __inline, so it isn't affected by defining away inline. > #ifdef inline This part of the code was nonsense and hasn't really changed. The code should be using __inline, so it shouldn't be affected by any definition of inline. defines both inline and __inline to support old compilers. FreeBSD headers should not have their own ifdefs for this. > -#define _XLOCALE_INLINE __inline static > +#define _XLOCALE_INLINE static __inline This change is just a partial style fix. __inline was already used here, and still is, but in a different order. 2 style bugs remain in this line (same 2 as above). > #else > /* Define with C++ / C99 compatible semantics */ > #define _XLOCALE_INLINE inline This still doesn't use __inline, so it is still broken in most cases where it is reached at all, if any. `inline' not being defined has very little to do with whether it actually works here. There are some complications for old gcc extern inline vs C99 extern inline, but otherwise this code should just use __inline as defined in and not add its own ifdef tangle to the one there. Or better yet, use only static __inline like old ctype does. I once hoped to replace the static inlines in ctype.h by extern inline ones, but that was before changing the semantics of extern inline made it evern harder to use. Using it in libm mainly gives unportability to C90. Repeating the above, with the ifdefs untangled a bit: > Modified: head/include/xlocale/_ctype.h > ============================================================================== > --- head/include/xlocale/_ctype.h Tue Mar 6 20:01:25 2012 (r232619) > +++ head/include/xlocale/_ctype.h Tue Mar 6 20:15:23 2012 (r232620) > @@ -55,11 +55,11 @@ _RuneLocale *__runes_for_locale(locale_t > #ifndef _XLOCALE_INLINE > #if __GNUC__ && !__GNUC_STDC_INLINE__ The first part of this should be written as defined(__GNUC__), to support broken compilers that warn about an undefined identifier being used in an ifdef. Unfortunately, the simpler test 'ifdef __GNUC_GNU_INLINE__' seems to be unusable, since old versions of gcc that only have gnu inline also don't have a feature test for it. > /* GNU89 inline has nonstandard semantics. */ > -#define _XLOCALE_INLINE extern inline > +#define _XLOCALE_INLINE extern __inline I'm not sure if this actually works. Old gnu extern inline is quite different from C99 plain inline. Anyway, the above seems to fix the main bug. Old version of gcc have both inline and __inline, but -ansi or -std=c89 kills both. Except, very old versions of gcc (gcc-1?) have neither. These are partially handled by killing __inline. normally doesn't kill inline; it takes the namespace pollution NO_ANSI_KEYWORDS to do that; the semantics of this are even subtler. The fix seems to be only partial, since "extern inline" in any spelling simply doesn't work for compilers that don't support inline in any form. Here we have slightly wrong ifdefs that lead gcc-1 being misclassified and then mishandled in this clause of the ifdef tangle. The non-working spelling is now "extern" instead of "extern inline". The "extern" has been reduced to a style bug, since without a non-null "inline", it has no effect, but it needs to have an effect to work. > #else Now we have classified the compiler as either non-gcc, or gcc with STDC extern inline. > /* Hack to work around people who define inline away */ > #ifdef inline > -#define _XLOCALE_INLINE __inline static > +#define _XLOCALE_INLINE static __inline > #else > /* Define with C++ / C99 compatible semantics */ > #define _XLOCALE_INLINE inline It is now clearer that the inline ifdef has almost no effect. `inline' should never be defined. only defines it under weird obsolete conditions, and the application shouldn't define it. But if it might be defined, then we get the following behaviour from its ifdef: - if it is defined, then we use static __inline. If this actually works, then it is what we should use, without ifdefs, in all cases. - if it is not defined, then we assume C99 extern inline semantics (with implicit extern (IIRC, the extern is still needed, but is placed weirdly, not in the header file but in the C file; thus it is not part of the public interface and needs slightly different ifdefs). This assumption is invalid, since we haven't done a full classification of the compiler. We only know that the compiler supports C99 extern semantics if it is gcc. This leaves the following broken cases: - any C90 compiler that is not gcc - any K&R compiler In both of the cases, the compiler won't support inline in any form, so the only chance for working is to use "static __inline" where kills __inline, or to not have any inline functions in headers. Old did the latter, and still works with sources installed on 19 Feb 2012. Now it declares bazillions of inline functions. Most kernel headers do the former. Differences between the results of cc -E and cc -E -I on the file #undef __GNUC__ #include % diff -c2 a~ a % *** a~ Wed Mar 7 02:30:02 2012 % --- a Wed Mar 7 02:30:11 2012 % *************** % *** 4,11 **** % # 1 "a.c" % % ! # 1 "/usr/include/ctype.h" 1 3 4 % ! # 44 "/usr/include/ctype.h" 3 4 % # 1 "/usr/include/sys/cdefs.h" 1 3 4 % ! # 45 "/usr/include/ctype.h" 2 3 4 % # 1 "/usr/include/sys/_types.h" 1 3 4 % # 33 "/usr/include/sys/_types.h" 3 4 % --- 4,11 ---- % # 1 "a.c" % % ! # 1 "include/ctype.h" 1 % ! # 44 "include/ctype.h" % # 1 "/usr/include/sys/cdefs.h" 1 3 4 % ! # 45 "include/ctype.h" 2 % # 1 "/usr/include/sys/_types.h" 1 3 4 % # 33 "/usr/include/sys/_types.h" 3 4 % *************** % *** 136,142 **** % __int64_t _mbstateL; % } __mbstate_t; % ! # 46 "/usr/include/ctype.h" 2 3 4 % ! # 1 "/usr/include/_ctype.h" 1 3 4 % ! # 70 "/usr/include/_ctype.h" 3 4 % % unsigned long ___runetype(__ct_rune_t) ; % --- 136,142 ---- % __int64_t _mbstateL; % } __mbstate_t; % ! # 46 "include/ctype.h" 2 % ! # 1 "include/_ctype.h" 1 % ! # 70 "include/_ctype.h" % % unsigned long ___runetype(__ct_rune_t) ; % *************** % *** 144,150 **** % __ct_rune_t ___toupper(__ct_rune_t) ; % % ! # 86 "/usr/include/_ctype.h" 3 4 % extern int __mb_sb_limit; % ! # 172 "/usr/include/_ctype.h" 3 4 % % int __maskrune(__ct_rune_t, unsigned long); % --- 144,150 ---- % __ct_rune_t ___toupper(__ct_rune_t) ; % % ! # 86 "include/_ctype.h" % extern int __mb_sb_limit; % ! # 172 "include/_ctype.h" % % int __maskrune(__ct_rune_t, unsigned long); % *************** % *** 159,163 **** % int __wcwidth(__ct_rune_t); % % ! # 47 "/usr/include/ctype.h" 2 3 4 % % % --- 159,163 ---- % int __wcwidth(__ct_rune_t); % % ! # 47 "include/ctype.h" 2 % % % *************** % *** 195,197 **** % --- 195,274 ---- % % % + % + # 1 "include/xlocale/_ctype.h" 1 % + # 44 "include/xlocale/_ctype.h" This include is about the only change in ctype.h. % + typedef struct _xlocale *locale_t; xlocale also gives massive namespace pollution. locale_t isn't in C90. Compiling with -std=c89 -pedantic doesn't change the output at all. % + % + % + % + % + unsigned long ___runetype_l(__ct_rune_t, locale_t) ; The strange formatting (space before semicolon) is due to a __pure being there. __pure is correctly ifdefed, so my #undef of __GNUC__ kills it % + __ct_rune_t ___tolower_l(__ct_rune_t, locale_t) ; % + __ct_rune_t ___toupper_l(__ct_rune_t, locale_t) ; % + _RuneLocale *__runes_for_locale(locale_t, int*); The misformatting of "int*" is in the source code. The ifdefs are broken in other ways. _RuneLocale is not declared here. Without the #undef of __GNUC__, it is declared, and the preprocessed output is 132 lines longer and all compile, and the extra lines seem to be mostly correct too, since they are careful about namespaces and don't declare any new APIs. % + # 91 "include/xlocale/_ctype.h" % + static int __inline was corrctly killed here. % + __sbmaskrune_l(__ct_rune_t _c, unsigned long _f, locale_t locale) Namespace pollution (parameter name `locale' in the application namesspace. The other arg names are from old ctype code which is missing such bugs. % + { % + int mb_sb_limit; More namespace pollution. % + _RuneLocale *runes = __runes_for_locale(locale, &mb_sb_limit); More namespace pollution. Style bugs: initialization in declaration; no blank line after declarations). % + return (_c < 0 || _c >= mb_sb_limit) ? 0 : % + runes->__runetype[_c] & _f; Style bugs: unnecessary line splitting; weird continuation indent of 7 spaces (4 would be KNF and 1 tab would be gnu). % + } % + % + static int % + __sbistype_l(__ct_rune_t _c, unsigned long _f, locale_t locale) % + { % + return (!!__sbmaskrune_l(_c, _f, locale)); % + } Similarly. % + % + % + % + % + % + % + % + inline int isalnum_l(int c, locale_t l); inline int isalnum_l(int c, locale_t l) { return __sbistype_l(c, 0x00000100L|0x00000400L, l); } Now since we misclassified the compiler and don't use __inline, we have syntax errors from `inline'. We also have namespace pollution in almost every indentifier: - isalnum_l, locale_t: not in C89 - c, l: in application namespace We also have a redundant forward declaration. This seems to be technically necessary in some cases, to avoid warnings from -Wmissing-prototypes. But surely any such warnings are bugs for inline functions, and the compilers that don't support inline functions also don't support such warnings? In the source code, the 'inline' part is spelled _XLOCALE_INLINE, and it should reduce to the missing-prototype case, except I faked the compiler not being gcc and with a real non-gcc there would be no warning. The style bugs of hard explicit long constants and no space around the binary operator '|' seem to be in old ctype code. % + inline int isalpha_l(int c, locale_t l); inline int isalpha_l(int c, locale_t l) { return __sbistype_l(c, 0x00000100L, l); } % + inline int isblank_l(int c, locale_t l); inline int isblank_l(int c, locale_t l) { return __sbistype_l(c, 0x00020000L, l); } % + inline int iscntrl_l(int c, locale_t l); inline int iscntrl_l(int c, locale_t l) { return __sbistype_l(c, 0x00000200L, l); } % + inline int isdigit_l(int c, locale_t l); inline int isdigit_l(int c, locale_t l) { return __sbistype_l(c, 0x00000400L, l); } % + inline int isgraph_l(int c, locale_t l); inline int isgraph_l(int c, locale_t l) { return __sbistype_l(c, 0x00000800L, l); } % + inline int ishexnumber_l(int c, locale_t l); inline int ishexnumber_l(int c, locale_t l) { return __sbistype_l(c, 0x00010000L, l); } % + inline int isideogram_l(int c, locale_t l); inline int isideogram_l(int c, locale_t l) { return __sbistype_l(c, 0x00080000L, l); } % + inline int islower_l(int c, locale_t l); inline int islower_l(int c, locale_t l) { return __sbistype_l(c, 0x00001000L, l); } % + inline int isnumber_l(int c, locale_t l); inline int isnumber_l(int c, locale_t l) { return __sbistype_l(c, 0x00000400L, l); } % + inline int isphonogram_l(int c, locale_t l); inline int isphonogram_l(int c, locale_t l) { return __sbistype_l(c, 0x00200000L, l); } % + inline int isprint_l(int c, locale_t l); inline int isprint_l(int c, locale_t l) { return __sbistype_l(c, 0x00040000L, l); } % + inline int ispunct_l(int c, locale_t l); inline int ispunct_l(int c, locale_t l) { return __sbistype_l(c, 0x00002000L, l); } % + inline int isrune_l(int c, locale_t l); inline int isrune_l(int c, locale_t l) { return __sbistype_l(c, 0xFFFFFF00L, l); } % + inline int isspace_l(int c, locale_t l); inline int isspace_l(int c, locale_t l) { return __sbistype_l(c, 0x00004000L, l); } % + inline int isspecial_l(int c, locale_t l); inline int isspecial_l(int c, locale_t l) { return __sbistype_l(c, 0x00100000L, l); } % + inline int isupper_l(int c, locale_t l); inline int isupper_l(int c, locale_t l) { return __sbistype_l(c, 0x00008000L, l); } % + inline int isxdigit_l(int c, locale_t l); inline int isxdigit_l(int c, locale_t l) { return __sbistype_l(c, 0x00010000L, l); } These bugs are easy to fix since they are all generated by 1 macro. % + # 170 "include/xlocale/_ctype.h" % + inline int digittoint_l(int, locale_t); % + inline int tolower_l(int, locale_t); % + inline int toupper_l(int, locale_t); % + % + inline int digittoint_l(int __c, locale_t __l) % + { return __sbmaskrune_l((__c), 0xFF, __l); } Mounds of style bugs here. % + % + inline int tolower_l(int __c, locale_t __l) % + { % + int __limit; % + _RuneLocale *__runes = __runes_for_locale(__l, &__limit); % + return (__c < 0 || __c >= __limit) ? __c : % + __runes->__maplower[__c]; % + } % + inline int toupper_l(int __c, locale_t __l) % + { % + int __limit; % + _RuneLocale *__runes = __runes_for_locale(__l, &__limit); % + return (__c < 0 || __c >= __limit) ? __c : % + __runes->__mapupper[__c]; % + } As above, but is more careful about namespaces. This uses ugly unecessary double underscores instead of the necessary single underscores and the broken no underscores. Now the only namespace pollution is the non-C90 interfaces. % + # 84 "include/ctype.h" 2 % + % + % # 2 "a.c" 2 Next I tried defining inline as 'glorp'. This worked as correctly as possible -- it changed all the plain inlines to `static' (according to the ifdefs that avoid using inline if someone is hacking on it) and didn't cause any syntax errors. Of course the glorp would cause syntax errors in anything that uses plain inline. Bruce From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 06:07:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9512F106568C for ; Wed, 7 Mar 2012 06:07:09 +0000 (UTC) (envelope-from andrey@zonov.org) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id D7B728FC19 for ; Wed, 7 Mar 2012 06:07:07 +0000 (UTC) Received: by bkcjc3 with SMTP id jc3so6576186bkc.13 for ; Tue, 06 Mar 2012 22:07:06 -0800 (PST) Received: by 10.204.129.23 with SMTP id m23mr287688bks.134.1331100426686; Tue, 06 Mar 2012 22:07:06 -0800 (PST) Received: from [10.254.254.77] (ppp95-165-129-214.pppoe.spdop.ru. [95.165.129.214]) by mx.google.com with ESMTPS id k13sm177644bky.10.2012.03.06.22.07.05 (version=SSLv3 cipher=OTHER); Tue, 06 Mar 2012 22:07:06 -0800 (PST) Message-ID: <4F56FB08.2070508@zonov.org> Date: Wed, 07 Mar 2012 10:07:04 +0400 From: Andrey Zonov User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.24) Gecko/20100228 Thunderbird/2.0.0.24 Mnenhy/0.7.6.0 MIME-Version: 1.0 To: Andrew Thompson References: <201203062258.q26MwDI6061226@svn.freebsd.org> In-Reply-To: <201203062258.q26MwDI6061226@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQmgBt3HSzToh7D1p+JCx+jj5WfTYbDG/1/7inyanxY3o0ey16wE4fKqQ0qifHB68IEQP2dz Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232629 - in head: sbin/ifconfig sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 06:07:09 -0000 On 07.03.2012 2:58, Andrew Thompson wrote: [snip] > Modified: head/sbin/ifconfig/ifconfig.8 > ============================================================================== > --- head/sbin/ifconfig/ifconfig.8 Tue Mar 6 22:45:54 2012 (r232628) > +++ head/sbin/ifconfig/ifconfig.8 Tue Mar 6 22:58:13 2012 (r232629) > @@ -2309,6 +2309,21 @@ Set the aggregation protocol. > The default is failover. > The available options are failover, fec, lacp, loadbalance, roundrobin and > none. > +.It Cm lagghash Ar option Ns Oo , Ns Ar option Oc > +Set the packet layers to hash for aggregation protocols which load balance. > +The default is > +.Dq l2,l3,l4 . > +The options can be combined using commas. > +.Pp > +.Bl -tag -width ".Cm l2" -compact > +.It Cm l2 > +src/dst mac address and optional vlan number. > +.It Cm l3 > +src/dst address for IPv4 or IPv6. > +.It Cm l4 > +src/dst port for TCP/UCP/SCTP. s/UCP/UDP/? > +.El > +.Pp > .El > .Pp > The following parameters are specific to IP tunnel interfaces, > [snip] -- Andrey Zonov From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 06:23:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D6CEC1065672 for ; Wed, 7 Mar 2012 06:23:03 +0000 (UTC) (envelope-from andy@fud.org.nz) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id AFC368FC13 for ; Wed, 7 Mar 2012 06:23:03 +0000 (UTC) Received: by pbcwz17 with SMTP id wz17so259462pbc.13 for ; Tue, 06 Mar 2012 22:23:03 -0800 (PST) MIME-Version: 1.0 Received: by 10.68.212.232 with SMTP id nn8mr1874184pbc.156.1331101383112; Tue, 06 Mar 2012 22:23:03 -0800 (PST) Sender: andy@fud.org.nz Received: by 10.68.2.229 with HTTP; Tue, 6 Mar 2012 22:23:03 -0800 (PST) In-Reply-To: <4F56FB08.2070508@zonov.org> References: <201203062258.q26MwDI6061226@svn.freebsd.org> <4F56FB08.2070508@zonov.org> Date: Wed, 7 Mar 2012 19:23:03 +1300 X-Google-Sender-Auth: QZA0d1cw1AaHbpukLgiyIaJCeMw Message-ID: From: Andrew Thompson To: Andrey Zonov Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQnoko+W3BDxqu0FHT/zPeuBzpQwg88UU6vHmr0IqShKmzKt1+MYgag12Q5avgFmdAIZCY35 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232629 - in head: sbin/ifconfig sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 06:23:03 -0000 On 7 March 2012 19:07, Andrey Zonov wrote: > On 07.03.2012 2:58, Andrew Thompson wrote: > [snip] > >> Modified: head/sbin/ifconfig/ifconfig.8 >> >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sbin/ifconfig/ifconfig.8 =A0 =A0 =A0 Tue Mar =A06 22:45:54 2012 >> =A0(r232628) >> +++ head/sbin/ifconfig/ifconfig.8 =A0 =A0 =A0 Tue Mar =A06 22:58:13 2012 >> =A0(r232629) >> @@ -2309,6 +2309,21 @@ Set the aggregation protocol. >> =A0The default is failover. >> =A0The available options are failover, fec, lacp, loadbalance, roundrobi= n >> and >> =A0none. >> +.It Cm lagghash Ar option Ns Oo , Ns Ar option Oc >> +Set the packet layers to hash for aggregation protocols which load >> balance. >> +The default is >> +.Dq l2,l3,l4 . >> +The options can be combined using commas. >> +.Pp >> +.Bl -tag -width ".Cm l2" -compact >> +.It Cm l2 >> +src/dst mac address and optional vlan number. >> +.It Cm l3 >> +src/dst address for IPv4 or IPv6. >> +.It Cm l4 >> +src/dst port for TCP/UCP/SCTP. > > > s/UCP/UDP/? Oops, thanks. From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 06:25:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC0FC106564A; Wed, 7 Mar 2012 06:25:17 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9725E8FC17; Wed, 7 Mar 2012 06:25:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q276PHEU078492; Wed, 7 Mar 2012 06:25:17 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q276PHPq078490; Wed, 7 Mar 2012 06:25:17 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201203070625.q276PHPq078490@svn.freebsd.org> From: Andrew Thompson Date: Wed, 7 Mar 2012 06:25:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232638 - head/sbin/ifconfig X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 06:25:17 -0000 Author: thompsa Date: Wed Mar 7 06:25:17 2012 New Revision: 232638 URL: http://svn.freebsd.org/changeset/base/232638 Log: Fix typo and bump the document date which I also forgot. Spotted by: Andrey Zonov Modified: head/sbin/ifconfig/ifconfig.8 Modified: head/sbin/ifconfig/ifconfig.8 ============================================================================== --- head/sbin/ifconfig/ifconfig.8 Wed Mar 7 03:16:45 2012 (r232637) +++ head/sbin/ifconfig/ifconfig.8 Wed Mar 7 06:25:17 2012 (r232638) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd February 29, 2012 +.Dd March 7, 2012 .Dt IFCONFIG 8 .Os .Sh NAME @@ -2321,7 +2321,7 @@ src/dst mac address and optional vlan nu .It Cm l3 src/dst address for IPv4 or IPv6. .It Cm l4 -src/dst port for TCP/UCP/SCTP. +src/dst port for TCP/UDP/SCTP. .El .Pp .El From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 06:42:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DE4FE106564A; Wed, 7 Mar 2012 06:42:21 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CAF5E8FC13; Wed, 7 Mar 2012 06:42:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q276gLwv079030; Wed, 7 Mar 2012 06:42:21 GMT (envelope-from remko@svn.freebsd.org) Received: (from remko@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q276gLjW079028; Wed, 7 Mar 2012 06:42:21 GMT (envelope-from remko@svn.freebsd.org) Message-Id: <201203070642.q276gLjW079028@svn.freebsd.org> From: Remko Lodder Date: Wed, 7 Mar 2012 06:42:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232639 - head/sys/dev/uart X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 06:42:22 -0000 Author: remko Date: Wed Mar 7 06:42:21 2012 New Revision: 232639 URL: http://svn.freebsd.org/changeset/base/232639 Log: Add support for the MosChip MCS9904 four serial ports controller. PR: 165804 Submitted by: Eugene Grosbein MFC after: 1 week Modified: head/sys/dev/uart/uart_bus_pci.c Modified: head/sys/dev/uart/uart_bus_pci.c ============================================================================== --- head/sys/dev/uart/uart_bus_pci.c Wed Mar 7 06:25:17 2012 (r232638) +++ head/sys/dev/uart/uart_bus_pci.c Wed Mar 7 06:42:21 2012 (r232639) @@ -126,6 +126,8 @@ static struct pci_id pci_ns8250_ids[] = "MosChip MCS9900 PCIe to Peripheral Controller", 0x10 }, { 0x9710, 0x9901, 0xa000, 0x1000, "MosChip MCS9901 PCIe to Peripheral Controller", 0x10 }, +{ 0x9710, 0x9904, 0xa000, 0x1000, + "MosChip MCS9904 PCIe to Peripheral Controller", 0x10 }, { 0xdeaf, 0x9051, 0xffff, 0, "Middle Digital PC Weasel Serial Port", 0x10 }, { 0xffff, 0, 0xffff, 0, NULL, 0, 0} }; From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 07:01:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90986106564A; Wed, 7 Mar 2012 07:01:42 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6B4DE8FC08; Wed, 7 Mar 2012 07:01:41 +0000 (UTC) Received: by lagv3 with SMTP id v3so9791774lag.13 for ; Tue, 06 Mar 2012 23:01:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=+D+k8oRJUcnfWPXyker5NpArCDuK3p01CRDj2ewzmJM=; b=gFXPhbgDNHCh90HIDBe1oHr7XnC+EGnnmqsDOc2V2EKzk02U+kkCVWPetYIa9hdUzq PLVqSkdo5VE+HPia3ezBBi9Ib1ogLUp5L66moeSa8AFLVYb3Ta8dX7x6FzTRgyeQOVIP Jlx0NpLbJ/EhbuESa7YMz1CREfFpCfhJWUmFwdJwhoS7uRbsy8ubCAoT6X3kfNlYnHDc S+LMWQwJa2UWebKMs8pMWoIYV9BqEl9quCLsjV422ERb2Gbs5mmae4w8tv/mfIcpKL1a 9hteTZp3WSx04vffVH8MrmOhVlv0sHOIwlShoV0WwxhVl/pFnYvCy9nyfoX0Cucjm4On lagA== MIME-Version: 1.0 Received: by 10.112.102.161 with SMTP id fp1mr279551lbb.71.1331103700061; Tue, 06 Mar 2012 23:01:40 -0800 (PST) Sender: pluknet@gmail.com Received: by 10.152.21.73 with HTTP; Tue, 6 Mar 2012 23:01:37 -0800 (PST) In-Reply-To: <201203062258.q26MwDI6061226@svn.freebsd.org> References: <201203062258.q26MwDI6061226@svn.freebsd.org> Date: Wed, 7 Mar 2012 10:01:37 +0300 X-Google-Sender-Auth: DQckszJ9E0051U1uMQtCXk52scU Message-ID: From: Sergey Kandaurov To: Andrew Thompson Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232629 - in head: sbin/ifconfig sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 07:01:42 -0000 On 7 March 2012 02:58, Andrew Thompson wrote: > Author: thompsa > Date: Tue Mar =A06 22:58:13 2012 > New Revision: 232629 > URL: http://svn.freebsd.org/changeset/base/232629 > > Log: > =A0Add the ability to set which packet layers are used for the load balan= ce hash > =A0calculation. > > Modified: > =A0head/sbin/ifconfig/ifconfig.8 > =A0head/sbin/ifconfig/iflagg.c > =A0head/sys/net/ieee8023ad_lacp.c > =A0head/sys/net/if_lagg.c > =A0head/sys/net/if_lagg.h HI. This change breaks LINT-NOIP. Something like this shoud fix it: Index: sys/net/if_lagg.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sys/net/if_lagg.c (revision 232637) +++ sys/net/if_lagg.c (working copy) @@ -1449,6 +1449,7 @@ const struct ip6_hdr *ip6; uint32_t flow; #endif +#if defined(INET) || defined(INET6) union { #ifdef INET struct ip ip; @@ -1458,8 +1459,8 @@ #endif uint32_t port; } buf; +#endif - off =3D sizeof(*eh); if (m->m_len < off) goto out; > Modified: head/sys/net/if_lagg.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/net/if_lagg.c =A0 =A0 =A0Tue Mar =A06 22:45:54 2012 =A0 =A0 = =A0 =A0(r232628) > +++ head/sys/net/if_lagg.c =A0 =A0 =A0Tue Mar =A06 22:58:13 2012 =A0 =A0 = =A0 =A0(r232629) [..] > @@ -1413,34 +1432,46 @@ lagg_gethdr(struct mbuf *m, u_int off, u > =A0} > > =A0uint32_t > -lagg_hashmbuf(struct mbuf *m, uint32_t key) > +lagg_hashmbuf(struct lagg_softc *sc, struct mbuf *m, uint32_t key) > =A0{ > =A0 =A0 =A0 =A0uint16_t etype; > - =A0 =A0 =A0 uint32_t p =3D 0; > + =A0 =A0 =A0 uint32_t p =3D key; > =A0 =A0 =A0 =A0int off; > =A0 =A0 =A0 =A0struct ether_header *eh; > =A0 =A0 =A0 =A0struct ether_vlan_header vlanbuf; > =A0 =A0 =A0 =A0const struct ether_vlan_header *vlan; > =A0#ifdef INET > =A0 =A0 =A0 =A0const struct ip *ip; > - =A0 =A0 =A0 struct ip ipbuf; > + =A0 =A0 =A0 const uint32_t *ports; > + =A0 =A0 =A0 int iphlen; > =A0#endif > =A0#ifdef INET6 > =A0 =A0 =A0 =A0const struct ip6_hdr *ip6; > - =A0 =A0 =A0 struct ip6_hdr ip6buf; > =A0 =A0 =A0 =A0uint32_t flow; > =A0#endif > + =A0 =A0 =A0 union { > +#ifdef INET > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 struct ip ip; > +#endif > +#ifdef INET6 > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 struct ip6_hdr ip6; > +#endif > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 uint32_t port; > + =A0 =A0 =A0 } buf; > + > [..] --=20 wbr, pluknet From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 07:22:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A1B1D106566B; Wed, 7 Mar 2012 07:22:53 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D5398FC0A; Wed, 7 Mar 2012 07:22:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q277Mrf5080592; Wed, 7 Mar 2012 07:22:53 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q277MrwJ080590; Wed, 7 Mar 2012 07:22:53 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201203070722.q277MrwJ080590@svn.freebsd.org> From: Andrew Thompson Date: Wed, 7 Mar 2012 07:22:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232640 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 07:22:53 -0000 Author: thompsa Date: Wed Mar 7 07:22:53 2012 New Revision: 232640 URL: http://svn.freebsd.org/changeset/base/232640 Log: Move the vlan buffer space into the union which also fixes an unused variable warning with !INET & !INET6. Spotted by: pluknet Modified: head/sys/net/if_lagg.c Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Wed Mar 7 06:42:21 2012 (r232639) +++ head/sys/net/if_lagg.c Wed Mar 7 07:22:53 2012 (r232640) @@ -1438,7 +1438,6 @@ lagg_hashmbuf(struct lagg_softc *sc, str uint32_t p = key; int off; struct ether_header *eh; - struct ether_vlan_header vlanbuf; const struct ether_vlan_header *vlan; #ifdef INET const struct ip *ip; @@ -1456,6 +1455,7 @@ lagg_hashmbuf(struct lagg_softc *sc, str #ifdef INET6 struct ip6_hdr ip6; #endif + struct ether_vlan_header vlan; uint32_t port; } buf; @@ -1475,7 +1475,7 @@ lagg_hashmbuf(struct lagg_softc *sc, str p = hash32_buf(&m->m_pkthdr.ether_vtag, sizeof(m->m_pkthdr.ether_vtag), p); } else if (etype == ETHERTYPE_VLAN) { - vlan = lagg_gethdr(m, off, sizeof(*vlan), &vlanbuf); + vlan = lagg_gethdr(m, off, sizeof(*vlan), &buf); if (vlan == NULL) goto out; From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 07:30:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D574106566B; Wed, 7 Mar 2012 07:30:44 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3E1EB8FC08; Wed, 7 Mar 2012 07:30:42 +0000 (UTC) Received: by lagv3 with SMTP id v3so9817646lag.13 for ; Tue, 06 Mar 2012 23:30:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=ogktaXZT/Io6UW+HYsdLgqXFuNoAtOv/z5IWSYd1gO4=; b=J0jw7Z9/3htYz9IR8A2KkR6n9tJ9sHNqS3eq5727O8uOn5ZFhp7++qSrGaSEEZ+Qa2 5QeI0XSSBHar3hW5vAU/5bweJuzg060aB2mDq+jZ95duoByB/6Iub6oqLs13UYGQopJT iWrbJChDkI6LCvnZpcQc3GMuDaoMwv8n3UbyDZLKbNEQC75WL2JxEJ6hSuNCXUJ/+XmL bBPG8cEeTJKmyi4csUo7OBleQxROhsS8+qz0LdewLAljnPByJnNUhUrliWN6tzNOGyVX jOwK6gHS0bBlEpKvmoZqw/lCYGqceTJgp3OMU+QDIin+1Gno8GZFpJFNoYzYkWF2OfnO CnZw== MIME-Version: 1.0 Received: by 10.112.102.161 with SMTP id fp1mr301395lbb.71.1331105442077; Tue, 06 Mar 2012 23:30:42 -0800 (PST) Sender: pluknet@gmail.com Received: by 10.152.21.73 with HTTP; Tue, 6 Mar 2012 23:30:41 -0800 (PST) In-Reply-To: <201203070722.q277MrwJ080590@svn.freebsd.org> References: <201203070722.q277MrwJ080590@svn.freebsd.org> Date: Wed, 7 Mar 2012 10:30:41 +0300 X-Google-Sender-Auth: bEBmBimoViHcKj4ybQOpPY4vXbY Message-ID: From: Sergey Kandaurov To: Andrew Thompson Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232640 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 07:30:44 -0000 On 7 March 2012 11:22, Andrew Thompson wrote: > Author: thompsa > Date: Wed Mar =A07 07:22:53 2012 > New Revision: 232640 > URL: http://svn.freebsd.org/changeset/base/232640 > > Log: > =A0Move the vlan buffer space into the union which also fixes an unused v= ariable > =A0warning with !INET & !INET6. > > =A0Spotted by: =A0 pluknet > > Modified: > =A0head/sys/net/if_lagg.c Thank you. BTW, how do you like this change? Index: Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- Makefile (revision 232637) +++ Makefile (working copy) @@ -7,8 +7,10 @@ SRCS=3D if_lagg.c ieee8023ad_lacp.c opt_inet.h opt_inet6.h .if !defined(KERNBUILDDIR) +.if ${MK_INET_SUPPORT} !=3D "no" opt_inet.h: echo "#define INET 1" > ${.TARGET} +.endif .if ${MK_INET6_SUPPORT} !=3D "no" opt_inet6.h: > > Modified: head/sys/net/if_lagg.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/net/if_lagg.c =A0 =A0 =A0Wed Mar =A07 06:42:21 2012 =A0 =A0 = =A0 =A0(r232639) > +++ head/sys/net/if_lagg.c =A0 =A0 =A0Wed Mar =A07 07:22:53 2012 =A0 =A0 = =A0 =A0(r232640) > @@ -1438,7 +1438,6 @@ lagg_hashmbuf(struct lagg_softc *sc, str > =A0 =A0 =A0 =A0uint32_t p =3D key; > =A0 =A0 =A0 =A0int off; > =A0 =A0 =A0 =A0struct ether_header *eh; > - =A0 =A0 =A0 struct ether_vlan_header vlanbuf; > =A0 =A0 =A0 =A0const struct ether_vlan_header *vlan; > =A0#ifdef INET > =A0 =A0 =A0 =A0const struct ip *ip; > @@ -1456,6 +1455,7 @@ lagg_hashmbuf(struct lagg_softc *sc, str > =A0#ifdef INET6 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0struct ip6_hdr ip6; > =A0#endif > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 struct ether_vlan_header vlan; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0uint32_t port; > =A0 =A0 =A0 =A0} buf; > > @@ -1475,7 +1475,7 @@ lagg_hashmbuf(struct lagg_softc *sc, str > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0p =3D hash32_buf(&m->m_pkthdr.ether_vtag, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sizeof(m->m_pkthdr.ether_vtag), p)= ; > =A0 =A0 =A0 =A0} else if (etype =3D=3D ETHERTYPE_VLAN) { > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 vlan =3D lagg_gethdr(m, off, =A0sizeof(*vla= n), &vlanbuf); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 vlan =3D lagg_gethdr(m, off, =A0sizeof(*vla= n), &buf); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (vlan =3D=3D NULL) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0goto out; > --=20 wbr, pluknet From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 07:31:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BD7F4106566C; Wed, 7 Mar 2012 07:31:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A84E08FC12; Wed, 7 Mar 2012 07:31:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q277VopH080884; Wed, 7 Mar 2012 07:31:50 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q277VoDY080879; Wed, 7 Mar 2012 07:31:50 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203070731.q277VoDY080879@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 7 Mar 2012 07:31:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232641 - in head/sys: fs/fifofs kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 07:31:50 -0000 Author: kib Date: Wed Mar 7 07:31:50 2012 New Revision: 232641 URL: http://svn.freebsd.org/changeset/base/232641 Log: The pipe_poll() performs lockless access to the vnode to test fifo_iseof() condition, allowing the v_fifoinfo to be reset and freed by fifo_cleanup(). Precalculate EOF at the places were fo_wgen is changed, and cache the state in a new pipe state flag PIPE_SAMEWGEN. Reported and tested by: bf Submitted by: gianni MFC after: 1 week (a backport) Modified: head/sys/fs/fifofs/fifo.h head/sys/fs/fifofs/fifo_vnops.c head/sys/kern/sys_pipe.c head/sys/sys/pipe.h Modified: head/sys/fs/fifofs/fifo.h ============================================================================== --- head/sys/fs/fifofs/fifo.h Wed Mar 7 07:22:53 2012 (r232640) +++ head/sys/fs/fifofs/fifo.h Wed Mar 7 07:31:50 2012 (r232641) @@ -33,7 +33,6 @@ /* * Prototypes for fifo operations on vnodes. */ -int fifo_iseof(struct file *); int fifo_vnoperate(struct vop_generic_args *); int fifo_printinfo(struct vnode *); Modified: head/sys/fs/fifofs/fifo_vnops.c ============================================================================== --- head/sys/fs/fifofs/fifo_vnops.c Wed Mar 7 07:22:53 2012 (r232640) +++ head/sys/fs/fifofs/fifo_vnops.c Wed Mar 7 07:31:50 2012 (r232641) @@ -67,8 +67,16 @@ struct fifoinfo { long fi_readers; long fi_writers; int fi_wgen; + int fi_seqcount; }; +#define FIFO_UPDWGEN(fip, pip) do { \ + if ((fip)->fi_wgen == (fip)->fi_seqcount) \ + (pip)->pipe_state |= PIPE_SAMEWGEN; \ + else \ + (pip)->pipe_state &= ~PIPE_SAMEWGEN; \ +} while (0) + static vop_print_t fifo_print; static vop_open_t fifo_open; static vop_close_t fifo_close; @@ -174,7 +182,8 @@ fifo_open(ap) if (fip->fi_writers > 0) wakeup(&fip->fi_writers); } - fp->f_seqcount = fip->fi_wgen - fip->fi_writers; + fip->fi_seqcount = fip->fi_wgen - fip->fi_writers; + FIFO_UPDWGEN(fip, fpipe); } if (ap->a_mode & FWRITE) { if ((ap->a_mode & O_NONBLOCK) && fip->fi_readers == 0) { @@ -228,6 +237,7 @@ fifo_open(ap) if (fpipe->pipe_state & PIPE_WANTR) wakeup(fpipe); fip->fi_wgen++; + FIFO_UPDWGEN(fip, fpipe); PIPE_UNLOCK(fpipe); fifo_cleanup(vp); } @@ -287,6 +297,7 @@ fifo_close(ap) if (cpipe->pipe_state & PIPE_WANTR) wakeup(cpipe); fip->fi_wgen++; + FIFO_UPDWGEN(fip, cpipe); PIPE_UNLOCK(cpipe); } } @@ -373,15 +384,3 @@ fifo_advlock(ap) return (ap->a_flags & F_FLOCK ? EOPNOTSUPP : EINVAL); } -int -fifo_iseof(struct file *fp) -{ - struct fifoinfo *fip; - - KASSERT(fp->f_vnode != NULL, ("fifo_iseof: no vnode info")); - KASSERT(fp->f_vnode->v_fifoinfo != NULL, ("fifo_iseof: no fifoinfo")); - fip = fp->f_vnode->v_fifoinfo; - PIPE_LOCK_ASSERT(fip->fi_pipe, MA_OWNED); - return (fp->f_seqcount == fip->fi_wgen); -} - Modified: head/sys/kern/sys_pipe.c ============================================================================== --- head/sys/kern/sys_pipe.c Wed Mar 7 07:22:53 2012 (r232640) +++ head/sys/kern/sys_pipe.c Wed Mar 7 07:31:50 2012 (r232641) @@ -1430,7 +1430,7 @@ pipe_poll(fp, events, active_cred, td) levents = events & (POLLIN | POLLINIGNEOF | POLLPRI | POLLRDNORM | POLLRDBAND); if (rpipe->pipe_state & PIPE_NAMED && fp->f_flag & FREAD && levents && - fifo_iseof(fp)) + rpipe->pipe_state & PIPE_SAMEWGEN) events |= POLLINIGNEOF; if ((events & POLLINIGNEOF) == 0) { Modified: head/sys/sys/pipe.h ============================================================================== --- head/sys/sys/pipe.h Wed Mar 7 07:22:53 2012 (r232640) +++ head/sys/sys/pipe.h Wed Mar 7 07:31:50 2012 (r232641) @@ -96,6 +96,7 @@ struct pipemapping { #define PIPE_DIRECTW 0x400 /* Pipe direct write active. */ #define PIPE_DIRECTOK 0x800 /* Direct mode ok. */ #define PIPE_NAMED 0x1000 /* Is a named pipe. */ +#define PIPE_SAMEWGEN 0x2000 /* same write generation for named pipes. */ /* * Per-pipe data structure. From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 07:55:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CC548106564A; Wed, 7 Mar 2012 07:55:35 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B6A008FC0C; Wed, 7 Mar 2012 07:55:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q277tZl8081645; Wed, 7 Mar 2012 07:55:35 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q277tZXJ081643; Wed, 7 Mar 2012 07:55:35 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203070755.q277tZXJ081643@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 7 Mar 2012 07:55:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232642 - stable/9/sys/fs/nullfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 07:55:35 -0000 Author: kib Date: Wed Mar 7 07:55:35 2012 New Revision: 232642 URL: http://svn.freebsd.org/changeset/base/232642 Log: MFC r232296: Merge a split multi-line comment. Modified: stable/9/sys/fs/nullfs/null_subr.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/fs/nullfs/null_subr.c ============================================================================== --- stable/9/sys/fs/nullfs/null_subr.c Wed Mar 7 07:31:50 2012 (r232641) +++ stable/9/sys/fs/nullfs/null_subr.c Wed Mar 7 07:55:35 2012 (r232642) @@ -213,12 +213,9 @@ null_nodeget(mp, lowervp, vpp) /* * We do not serialize vnode creation, instead we will check for * duplicates later, when adding new vnode to hash. - * * Note that duplicate can only appear in hash if the lowervp is * locked LK_SHARED. - */ - - /* + * * Do the MALLOC before the getnewvnode since doing so afterward * might cause a bogus v_data pointer to get dereferenced * elsewhere if MALLOC should block. From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 07:59:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3F540106566C; Wed, 7 Mar 2012 07:59:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 29D828FC12; Wed, 7 Mar 2012 07:59:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q277xVnT081815; Wed, 7 Mar 2012 07:59:31 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q277xVfO081813; Wed, 7 Mar 2012 07:59:31 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203070759.q277xVfO081813@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 7 Mar 2012 07:59:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232643 - stable/9/sys/fs/nullfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 07:59:31 -0000 Author: kib Date: Wed Mar 7 07:59:30 2012 New Revision: 232643 URL: http://svn.freebsd.org/changeset/base/232643 Log: MFC r232299: Move the code to destroy half-contructed nullfs vnode into helper function null_destroy_proto() from null_insmntque_dtr(). Also apply null_destroy_proto() in null_nodeget() when we raced and a vnode is found in the hash, so the currently allocated protonode shall be destroyed. Lock the vnode interlock around reassigning the v_vnlock. MFC r232383: Do not expose unlocked unconstructed nullfs vnode on mount list. Lock the native nullfs vnode lock before switching the locks. Modified: stable/9/sys/fs/nullfs/null_subr.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/fs/nullfs/null_subr.c ============================================================================== --- stable/9/sys/fs/nullfs/null_subr.c Wed Mar 7 07:55:35 2012 (r232642) +++ stable/9/sys/fs/nullfs/null_subr.c Wed Mar 7 07:59:30 2012 (r232643) @@ -169,17 +169,26 @@ null_hashins(mp, xp) } static void -null_insmntque_dtr(struct vnode *vp, void *xp) +null_destroy_proto(struct vnode *vp, void *xp) { - vput(((struct null_node *)xp)->null_lowervp); + lockmgr(&vp->v_lock, LK_EXCLUSIVE, NULL); + VI_LOCK(vp); vp->v_data = NULL; vp->v_vnlock = &vp->v_lock; - free(xp, M_NULLFSNODE); vp->v_op = &dead_vnodeops; - (void) vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + VI_UNLOCK(vp); vgone(vp); vput(vp); + free(xp, M_NULLFSNODE); +} + +static void +null_insmntque_dtr(struct vnode *vp, void *xp) +{ + + vput(((struct null_node *)xp)->null_lowervp); + null_destroy_proto(vp, xp); } /* @@ -247,9 +256,7 @@ null_nodeget(mp, lowervp, vpp) *vpp = null_hashins(mp, xp); if (*vpp != NULL) { vrele(lowervp); - vp->v_vnlock = &vp->v_lock; - xp->null_lowervp = NULL; - vrele(vp); + null_destroy_proto(vp, xp); return (0); } *vpp = vp; From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 08:02:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5DF611065673; Wed, 7 Mar 2012 08:02:44 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 493608FC0C; Wed, 7 Mar 2012 08:02:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2782iHR081995; Wed, 7 Mar 2012 08:02:44 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2782iQ6081993; Wed, 7 Mar 2012 08:02:44 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203070802.q2782iQ6081993@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 7 Mar 2012 08:02:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232644 - stable/9/sys/fs/nullfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 08:02:44 -0000 Author: kib Date: Wed Mar 7 08:02:43 2012 New Revision: 232644 URL: http://svn.freebsd.org/changeset/base/232644 Log: MFC r232301: Always request exclusive lock for the lower vnode in nullfs_vget(). The null_nodeget() requires exclusive lock on lowervp to be able to insmntque() new vnode. Modified: stable/9/sys/fs/nullfs/null_vfsops.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/fs/nullfs/null_vfsops.c ============================================================================== --- stable/9/sys/fs/nullfs/null_vfsops.c Wed Mar 7 07:59:30 2012 (r232643) +++ stable/9/sys/fs/nullfs/null_vfsops.c Wed Mar 7 08:02:43 2012 (r232644) @@ -307,6 +307,12 @@ nullfs_vget(mp, ino, flags, vpp) struct vnode **vpp; { int error; + + KASSERT((flags & LK_TYPE_MASK) != 0, + ("nullfs_vget: no lock requested")); + flags &= ~LK_TYPE_MASK; + flags |= LK_EXCLUSIVE; + error = VFS_VGET(MOUNTTONULLMOUNT(mp)->nullm_vfs, ino, flags, vpp); if (error) return (error); From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 08:05:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB0C6106566B; Wed, 7 Mar 2012 08:05:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A5D068FC14; Wed, 7 Mar 2012 08:05:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2785CdT082121; Wed, 7 Mar 2012 08:05:12 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2785CiJ082119; Wed, 7 Mar 2012 08:05:12 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203070805.q2785CiJ082119@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 7 Mar 2012 08:05:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232645 - stable/9/sys/fs/nullfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 08:05:12 -0000 Author: kib Date: Wed Mar 7 08:05:12 2012 New Revision: 232645 URL: http://svn.freebsd.org/changeset/base/232645 Log: MFC r232303: In null_reclaim(), assert that reclaimed vnode is fully constructed, instead of accepting half-constructed vnode. Previous code cannot decide what to do with such vnode anyway, and although processing it for hash removal, paniced later when getting rid of nullfs reference on lowervp. While there, remove initializations from the declaration block. Modified: stable/9/sys/fs/nullfs/null_vnops.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/fs/nullfs/null_vnops.c ============================================================================== --- stable/9/sys/fs/nullfs/null_vnops.c Wed Mar 7 08:02:43 2012 (r232644) +++ stable/9/sys/fs/nullfs/null_vnops.c Wed Mar 7 08:05:12 2012 (r232645) @@ -697,12 +697,18 @@ null_inactive(struct vop_inactive_args * static int null_reclaim(struct vop_reclaim_args *ap) { - struct vnode *vp = ap->a_vp; - struct null_node *xp = VTONULL(vp); - struct vnode *lowervp = xp->null_lowervp; + struct vnode *vp; + struct null_node *xp; + struct vnode *lowervp; + + vp = ap->a_vp; + xp = VTONULL(vp); + lowervp = xp->null_lowervp; + + KASSERT(lowervp != NULL && vp->v_vnlock != &vp->v_lock, + ("Reclaiming inclomplete null vnode %p", vp)); - if (lowervp) - null_hashrem(xp); + null_hashrem(xp); /* * Use the interlock to protect the clearing of v_data to * prevent faults in null_lock(). @@ -713,10 +719,7 @@ null_reclaim(struct vop_reclaim_args *ap vp->v_object = NULL; vp->v_vnlock = &vp->v_lock; VI_UNLOCK(vp); - if (lowervp) - vput(lowervp); - else - panic("null_reclaim: reclaiming a node with no lowervp"); + vput(lowervp); free(xp, M_NULLFSNODE); return (0); From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 08:07:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 595A810656AE; Wed, 7 Mar 2012 08:07:29 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 443AE8FC15; Wed, 7 Mar 2012 08:07:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2787TKO082252; Wed, 7 Mar 2012 08:07:29 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2787T1w082250; Wed, 7 Mar 2012 08:07:29 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201203070807.q2787T1w082250@svn.freebsd.org> From: Sergey Kandaurov Date: Wed, 7 Mar 2012 08:07:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232646 - stable/8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 08:07:29 -0000 Author: pluknet Date: Wed Mar 7 08:07:28 2012 New Revision: 232646 URL: http://svn.freebsd.org/changeset/base/232646 Log: MFC r231821: delete-old does not have delete-old-libs dependency. Reflect this in the comment. PR: conf/163993 Submitted by: Eugen Konkov Modified: stable/8/Makefile (contents, props changed) Modified: stable/8/Makefile ============================================================================== --- stable/8/Makefile Wed Mar 7 08:05:12 2012 (r232645) +++ stable/8/Makefile Wed Mar 7 08:07:28 2012 (r232646) @@ -21,7 +21,7 @@ # check-old-dirs - List obsolete directories. # check-old-files - List obsolete files. # check-old-libs - List obsolete libraries. -# delete-old - Delete obsolete directories/files/libraries. +# delete-old - Delete obsolete directories/files. # delete-old-dirs - Delete obsolete directories. # delete-old-files - Delete obsolete files. # delete-old-libs - Delete obsolete libraries. From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 08:08:36 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7B85F106564A; Wed, 7 Mar 2012 08:08:36 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6667B8FC0C; Wed, 7 Mar 2012 08:08:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2788a7c082332; Wed, 7 Mar 2012 08:08:36 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2788adC082330; Wed, 7 Mar 2012 08:08:36 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203070808.q2788adC082330@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 7 Mar 2012 08:08:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232647 - stable/9/sys/fs/nullfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 08:08:36 -0000 Author: kib Date: Wed Mar 7 08:08:36 2012 New Revision: 232647 URL: http://svn.freebsd.org/changeset/base/232647 Log: MFC r232304: Document that null_nodeget() cannot take shared-locked lowervp due to insmntque() requirements. Modified: stable/9/sys/fs/nullfs/null_subr.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/fs/nullfs/null_subr.c ============================================================================== --- stable/9/sys/fs/nullfs/null_subr.c Wed Mar 7 08:07:28 2012 (r232646) +++ stable/9/sys/fs/nullfs/null_subr.c Wed Mar 7 08:08:36 2012 (r232647) @@ -209,7 +209,11 @@ null_nodeget(mp, lowervp, vpp) struct vnode *vp; int error; - ASSERT_VOP_LOCKED(lowervp, "lowervp"); + /* + * The insmntque1() call below requires the exclusive lock on + * the nullfs vnode. + */ + ASSERT_VOP_ELOCKED(lowervp, "lowervp"); KASSERT(lowervp->v_usecount >= 1, ("Unreferenced vnode %p\n", lowervp)); /* Lookup the hash firstly */ From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 08:10:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 61A36106566B; Wed, 7 Mar 2012 08:10:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4CD948FC1E; Wed, 7 Mar 2012 08:10:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q278AuqV082456; Wed, 7 Mar 2012 08:10:56 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q278AuI4082454; Wed, 7 Mar 2012 08:10:56 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203070810.q278AuI4082454@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 7 Mar 2012 08:10:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232648 - stable/9/sys/fs/nullfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 08:10:56 -0000 Author: kib Date: Wed Mar 7 08:10:55 2012 New Revision: 232648 URL: http://svn.freebsd.org/changeset/base/232648 Log: MFC r232305: Allow shared locks for reads when lower filesystem accept shared locking. Modified: stable/9/sys/fs/nullfs/null_vfsops.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/fs/nullfs/null_vfsops.c ============================================================================== --- stable/9/sys/fs/nullfs/null_vfsops.c Wed Mar 7 08:08:36 2012 (r232647) +++ stable/9/sys/fs/nullfs/null_vfsops.c Wed Mar 7 08:10:55 2012 (r232648) @@ -180,7 +180,8 @@ nullfs_mount(struct mount *mp) MNT_IUNLOCK(mp); } MNT_ILOCK(mp); - mp->mnt_kern_flag |= lowerrootvp->v_mount->mnt_kern_flag & MNTK_MPSAFE; + mp->mnt_kern_flag |= lowerrootvp->v_mount->mnt_kern_flag & + (MNTK_MPSAFE | MNTK_SHARED_WRITES); MNT_IUNLOCK(mp); mp->mnt_data = xmp; vfs_getnewfsid(mp); From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 08:21:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CC81B106566B; Wed, 7 Mar 2012 08:21:25 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B80FA8FC08; Wed, 7 Mar 2012 08:21:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q278LPJQ082903; Wed, 7 Mar 2012 08:21:25 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q278LPK5082901; Wed, 7 Mar 2012 08:21:25 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201203070821.q278LPK5082901@svn.freebsd.org> From: Sergey Kandaurov Date: Wed, 7 Mar 2012 08:21:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232649 - stable/7 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 08:21:25 -0000 Author: pluknet Date: Wed Mar 7 08:21:25 2012 New Revision: 232649 URL: http://svn.freebsd.org/changeset/base/232649 Log: MFC r231821: delete-old does not have delete-old-libs dependency. Reflect this in the comment. PR: conf/163993 Submitted by: Eugen Konkov Modified: stable/7/Makefile (contents, props changed) Modified: stable/7/Makefile ============================================================================== --- stable/7/Makefile Wed Mar 7 08:10:55 2012 (r232648) +++ stable/7/Makefile Wed Mar 7 08:21:25 2012 (r232649) @@ -21,7 +21,7 @@ # check-old-dirs - List obsolete directories. # check-old-files - List obsolete files. # check-old-libs - List obsolete libraries. -# delete-old - Delete obsolete directories/files/libraries. +# delete-old - Delete obsolete directories/files. # delete-old-dirs - Delete obsolete directories. # delete-old-files - Delete obsolete files. # delete-old-libs - Delete obsolete libraries. From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 08:24:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 763F01065673; Wed, 7 Mar 2012 08:24:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2361A8FC22; Wed, 7 Mar 2012 08:24:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q278Onvl083049; Wed, 7 Mar 2012 08:24:49 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q278Onqp083047; Wed, 7 Mar 2012 08:24:49 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203070824.q278Onqp083047@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 7 Mar 2012 08:24:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232650 - stable/8/sys/fs/nullfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 08:24:49 -0000 Author: kib Date: Wed Mar 7 08:24:48 2012 New Revision: 232650 URL: http://svn.freebsd.org/changeset/base/232650 Log: MFC r232296: Merge a split multi-line comment. Modified: stable/8/sys/fs/nullfs/null_subr.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/fs/nullfs/null_subr.c ============================================================================== --- stable/8/sys/fs/nullfs/null_subr.c Wed Mar 7 08:21:25 2012 (r232649) +++ stable/8/sys/fs/nullfs/null_subr.c Wed Mar 7 08:24:48 2012 (r232650) @@ -208,12 +208,9 @@ null_nodeget(mp, lowervp, vpp) /* * We do not serialize vnode creation, instead we will check for * duplicates later, when adding new vnode to hash. - * * Note that duplicate can only appear in hash if the lowervp is * locked LK_SHARED. - */ - - /* + * * Do the MALLOC before the getnewvnode since doing so afterward * might cause a bogus v_data pointer to get dereferenced * elsewhere if MALLOC should block. From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 09:42:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 203E51065674; Wed, 7 Mar 2012 09:42:20 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A8F38FC15; Wed, 7 Mar 2012 09:42:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q279gJXH085447; Wed, 7 Mar 2012 09:42:19 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q279gJm8085445; Wed, 7 Mar 2012 09:42:19 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201203070942.q279gJm8085445@svn.freebsd.org> From: Sergey Kandaurov Date: Wed, 7 Mar 2012 09:42:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232651 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 09:42:20 -0000 Author: pluknet Date: Wed Mar 7 09:42:19 2012 New Revision: 232651 URL: http://svn.freebsd.org/changeset/base/232651 Log: Update ifa_rtrequest() description after post-4.4BSD change made in r85074. 3rd argument of ifa->ifa_rtrequest is now ``rt_addrinfo *'' instead of ``sockaddr *''. While here, un-document RTM_RESOLVE cmd argument for ifa_rtrequest() that became a stub after separating L2 tables in r186119. MFC after: 1 week Modified: head/share/man/man9/ifnet.9 Modified: head/share/man/man9/ifnet.9 ============================================================================== --- head/share/man/man9/ifnet.9 Wed Mar 7 08:24:48 2012 (r232650) +++ head/share/man/man9/ifnet.9 Wed Mar 7 09:42:19 2012 (r232651) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 2, 2012 +.Dd March 7, 2012 .Dt IFNET 9 .Os .Sh NAME @@ -122,7 +122,7 @@ .Ss "struct ifaddr member function" .Ft void .Fo \*(lp*ifa_rtrequest\*(rp -.Fa "int cmd" "struct rtentry *rt" "struct sockaddr *dst" +.Fa "int cmd" "struct rtentry *rt" "struct rt_addrinfo *info" .Fc .\" .Ss "Global Variables" @@ -1016,22 +1016,19 @@ function. is a pointer to a function which receives callouts from the routing code .Pq Fn rtrequest -to perform link-layer-specific actions upon requests to add, resolve, +to perform link-layer-specific actions upon requests to add, or delete routes. The .Fa cmd argument indicates the request in question: -.Dv RTM_ADD , RTM_RESOLVE , +.Dv RTM_ADD , or .Dv RTM_DELETE . The .Fa rt argument is the route in question; the -.Fa dst -argument is the specific destination being manipulated -for -.Dv RTM_RESOLVE , -or a null pointer otherwise. +.Fa info +argument contains the specific destination being manipulated. .Sh FUNCTIONS The functions provided by the generic interface code can be divided into two groups: those which manipulate interfaces, and those which From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 10:49:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E73D0106564A; Wed, 7 Mar 2012 10:49:20 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 7088E8FC16; Wed, 7 Mar 2012 10:49:20 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 53A7925D3A9A; Wed, 7 Mar 2012 10:49:19 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 8040DBDCE0F; Wed, 7 Mar 2012 10:49:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id Xe-fffibhjfI; Wed, 7 Mar 2012 10:49:17 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 5CCAFBDCE0E; Wed, 7 Mar 2012 10:49:17 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201203050240.q252eI3J062834@svn.freebsd.org> Date: Wed, 7 Mar 2012 10:49:16 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <14EF0623-D07F-4BCC-BFE0-FDF9CAD66C8A@lists.zabbadoz.net> References: <201203050240.q252eI3J062834@svn.freebsd.org> To: Nathan Whitehorn X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232531 - head/usr.sbin/bsdinstall/scripts X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 10:49:21 -0000 On 5. Mar 2012, at 02:40 , Nathan Whitehorn wrote: > Author: nwhitehorn > Date: Mon Mar 5 02:40:18 2012 > New Revision: 232531 > URL: http://svn.freebsd.org/changeset/base/232531 >=20 > Log: > Make the chroot shell more functional by providing devfs. I am just replying to your last bsdinstall commit. I am on r232627 and = when I press "guided install" the installer aborts and restarts from = the keyboard menu. Do you have any idea what causes this. I cannot = easily switch to alternate consoles as our vty switching key bindings = don't go well with some virtualization technology:( /bz --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 11:29:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 827771065673; Wed, 7 Mar 2012 11:29:43 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6BFAC8FC20; Wed, 7 Mar 2012 11:29:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q27BThIW090883; Wed, 7 Mar 2012 11:29:43 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q27BThKp090881; Wed, 7 Mar 2012 11:29:43 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201203071129.q27BThKp090881@svn.freebsd.org> From: Sergey Kandaurov Date: Wed, 7 Mar 2012 11:29:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232654 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 11:29:43 -0000 Author: pluknet Date: Wed Mar 7 11:29:43 2012 New Revision: 232654 URL: http://svn.freebsd.org/changeset/base/232654 Log: Reflect that if_output changed to take a struct route as its fourth argument (r191148). MFC after: 1 week Modified: head/share/man/man9/ifnet.9 Modified: head/share/man/man9/ifnet.9 ============================================================================== --- head/share/man/man9/ifnet.9 Wed Mar 7 11:18:38 2012 (r232653) +++ head/share/man/man9/ifnet.9 Wed Mar 7 11:29:43 2012 (r232654) @@ -103,7 +103,7 @@ .Ft int .Fo \*(lp*if_output\*(rp .Fa "struct ifnet *ifp" "struct mbuf *m" -.Fa "struct sockaddr *dst" "struct rtentry *rt" +.Fa "struct sockaddr *dst" "struct route *ro" .Fc .Ft void .Fn \*(lp*if_start\*(rp "struct ifnet *ifp" From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 13:17:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA525106566C; Wed, 7 Mar 2012 13:17:28 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 721B78FC0C; Wed, 7 Mar 2012 13:17:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q27DHSdw094988; Wed, 7 Mar 2012 13:17:28 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q27DHSkC094985; Wed, 7 Mar 2012 13:17:28 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201203071317.q27DHSkC094985@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 7 Mar 2012 13:17:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232657 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 13:17:28 -0000 Author: gavin Date: Wed Mar 7 13:17:27 2012 New Revision: 232657 URL: http://svn.freebsd.org/changeset/base/232657 Log: Take ceri's commit bit into safekeeping, per his request. Approved by: core (implicit) M access Modified: svnadmin/conf/access Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Wed Mar 7 11:47:46 2012 (r232656) +++ svnadmin/conf/access Wed Mar 7 13:17:27 2012 (r232657) @@ -47,7 +47,6 @@ brueffer bruno bschmidt bz -ceri charnier cognet cokane From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 14:11:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FF41106564A; Wed, 7 Mar 2012 14:11:12 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 18E038FC15; Wed, 7 Mar 2012 14:11:11 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id CDD7425D3A9A; Wed, 7 Mar 2012 14:11:10 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 06040BDCE36; Wed, 7 Mar 2012 14:11:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id bCAKKiPUsF2B; Wed, 7 Mar 2012 14:11:09 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 0E691BDCE33; Wed, 7 Mar 2012 14:11:09 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <14EF0623-D07F-4BCC-BFE0-FDF9CAD66C8A@lists.zabbadoz.net> Date: Wed, 7 Mar 2012 14:11:08 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <22C4960D-2E99-4969-853A-E05B8C777BBF@lists.zabbadoz.net> References: <201203050240.q252eI3J062834@svn.freebsd.org> <14EF0623-D07F-4BCC-BFE0-FDF9CAD66C8A@lists.zabbadoz.net> To: Nathan Whitehorn X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232531 - head/usr.sbin/bsdinstall/scripts X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 14:11:12 -0000 On 7. Mar 2012, at 10:49 , Bjoern A. Zeeb wrote: > On 5. Mar 2012, at 02:40 , Nathan Whitehorn wrote: >=20 >> Author: nwhitehorn >> Date: Mon Mar 5 02:40:18 2012 >> New Revision: 232531 >> URL: http://svn.freebsd.org/changeset/base/232531 >>=20 >> Log: >> Make the chroot shell more functional by providing devfs. >=20 > I am just replying to your last bsdinstall commit. I am on r232627 = and when I press "guided install" the installer aborts and restarts = from the keyboard menu. Do you have any idea what causes this. I = cannot easily switch to alternate consoles as our vty switching key = bindings don't go well with some virtualization technology:( Got to console. On a re-run it logged: Running installation step: keymap Running installation step: hostname rm: /tmp/bsdinstall_etc/fstab: No such file or directory Running installation step: autopart Segmentation fault Running installation step: umount --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 14:20:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA66E1065670; Wed, 7 Mar 2012 14:20:52 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 595868FC1C; Wed, 7 Mar 2012 14:20:52 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 69B3425D3A9A; Wed, 7 Mar 2012 14:20:51 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 92137BDCE39; Wed, 7 Mar 2012 14:20:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id kDNL8s-RlXAy; Wed, 7 Mar 2012 14:20:49 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 683C2BDCE37; Wed, 7 Mar 2012 14:20:49 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <22C4960D-2E99-4969-853A-E05B8C777BBF@lists.zabbadoz.net> Date: Wed, 7 Mar 2012 14:20:43 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201203050240.q252eI3J062834@svn.freebsd.org> <14EF0623-D07F-4BCC-BFE0-FDF9CAD66C8A@lists.zabbadoz.net> <22C4960D-2E99-4969-853A-E05B8C777BBF@lists.zabbadoz.net> To: Nathan Whitehorn X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232531 - head/usr.sbin/bsdinstall/scripts X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 14:20:52 -0000 On 7. Mar 2012, at 14:11 , Bjoern A. Zeeb wrote: >=20 > On 7. Mar 2012, at 10:49 , Bjoern A. Zeeb wrote: >=20 >> On 5. Mar 2012, at 02:40 , Nathan Whitehorn wrote: >>=20 >>> Author: nwhitehorn >>> Date: Mon Mar 5 02:40:18 2012 >>> New Revision: 232531 >>> URL: http://svn.freebsd.org/changeset/base/232531 >>>=20 >>> Log: >>> Make the chroot shell more functional by providing devfs. >>=20 >> I am just replying to your last bsdinstall commit. I am on r232627 = and when I press "guided install" the installer aborts and restarts = from the keyboard menu. Do you have any idea what causes this. I = cannot easily switch to alternate consoles as our vty switching key = bindings don't go well with some virtualization technology:( >=20 > Got to console. On a re-run it logged: >=20 > Running installation step: keymap > Running installation step: hostname > rm: /tmp/bsdinstall_etc/fstab: No such file or directory > Running installation step: autopart > Segmentation fault > Running installation step: umount Ok, the real error mesasge there should not be "Segmentation fault" but = "No disk found". By the time I added a HDD to the machine as well, the = installer proceeded; so much for trying to install into a big piece of = memory for testing;-) Should I file a PR for both features to be = added? /bz --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 14:50:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0356C106564A; Wed, 7 Mar 2012 14:50:15 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C8ABF8FC17; Wed, 7 Mar 2012 14:50:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q27EoEtd097951; Wed, 7 Mar 2012 14:50:14 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q27EoELr097949; Wed, 7 Mar 2012 14:50:14 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201203071450.q27EoELr097949@svn.freebsd.org> From: Maxim Konovalov Date: Wed, 7 Mar 2012 14:50:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232658 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 14:50:15 -0000 Author: maxim Date: Wed Mar 7 14:50:14 2012 New Revision: 232658 URL: http://svn.freebsd.org/changeset/base/232658 Log: o Sync LOCK_PROFILING manpage with the current code: remove unexistent sysctls, add new ones. Reviewed by: gjb Sponsored by: Nginx, Inc. Modified: head/share/man/man9/LOCK_PROFILING.9 Modified: head/share/man/man9/LOCK_PROFILING.9 ============================================================================== --- head/share/man/man9/LOCK_PROFILING.9 Wed Mar 7 13:17:27 2012 (r232657) +++ head/share/man/man9/LOCK_PROFILING.9 Wed Mar 7 14:50:14 2012 (r232658) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 11, 2006 +.Dd March 7, 2012 .Dt LOCK_PROFILING 9 .Os .Sh NAME @@ -82,32 +82,6 @@ Enable or disable the lock profiling cod This defaults to 0 (off). .It Va debug.lock.prof.reset Reset the current lock profiling buffers. -.It Va debug.lock.prof.acquisitions -The total number of lock acquisitions recorded. -.It Va debug.lock.prof.records -The total number of acquisition points recorded. -Note that only active acquisition points (i.e., points that have been -reached at least once) are counted. -.It Va debug.lock.prof.maxrecords -The maximum number of acquisition points the profiling code is capable -of monitoring. -Since it would not be possible to call -.Xr malloc 9 -from within the lock profiling code, this is a static limit. -The number of records can be changed with the -.Dv LPROF_BUFFERS -kernel option. -.It Va debug.lock.prof.rejected -The number of acquisition points that were ignored after the table -filled up. -.It Va debug.lock.prof.hashsize -The size of the hash table used to map acquisition points to -statistics records. -The hash size can be changed with the -.Dv LPROF_HASH_SIZE -kernel option. -.It Va debug.lock.prof.collisions -The number of hash collisions in the acquisition point hash table. .It Va debug.lock.prof.stats The actual profiling statistics in plain text. The columns are as follows, from left to right: @@ -138,6 +112,14 @@ reached. The name of the acquisition point, derived from the source file name and line number, followed by the name of the lock in parentheses. .El +.It Va debug.lock.prof.rejected +The number of acquisition points that were ignored after the table +filled up. +.It Va debug.lock.prof.skipspin +Disable or enable the lock profiling code for the spin locks. +This defaults to 0 (do profiling for the spin locks). +.It Va debug.lock.prof.skipcount +Do sampling approximately every N lock acquisitions. .El .Sh SEE ALSO .Xr sysctl 8 , From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 14:53:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4149F1065670; Wed, 7 Mar 2012 14:53:54 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2CEE98FC13; Wed, 7 Mar 2012 14:53:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q27Ersfd098092; Wed, 7 Mar 2012 14:53:54 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q27Errq5098090; Wed, 7 Mar 2012 14:53:53 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201203071453.q27Errq5098090@svn.freebsd.org> From: Sergey Kandaurov Date: Wed, 7 Mar 2012 14:53:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232659 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 14:53:54 -0000 Author: pluknet Date: Wed Mar 7 14:53:53 2012 New Revision: 232659 URL: http://svn.freebsd.org/changeset/base/232659 Log: Move struct if_data basic description to a more suitable place, and remove a bit of .Bx 4.4 history. MFC after: 1 week Modified: head/share/man/man9/ifnet.9 Modified: head/share/man/man9/ifnet.9 ============================================================================== --- head/share/man/man9/ifnet.9 Wed Mar 7 14:50:14 2012 (r232658) +++ head/share/man/man9/ifnet.9 Wed Mar 7 14:53:53 2012 (r232659) @@ -181,13 +181,7 @@ return pointers to these structures. Each interface structure contains an .Vt if_data -structure, which contains statistics and identifying information used -by management programs, and which is exported to user programs by way -of the -.Xr ifmib 4 -branch of the -.Xr sysctl 3 -MIB. +structure used for statistics and information. Each interface also has a .Li TAILQ of interface addresses, described by @@ -734,14 +728,15 @@ is marked or cleared in the interface's .Va if_flags to indicate the current mode of the interface. .Ss The Vt if_data Ss Structure -In -.Bx 4.4 , -a subset of the interface information believed to be of interest to -management stations was segregated from the -.Vt ifnet -structure and moved into its own +The .Vt if_data -structure to facilitate its use by user programs. +structure contains statistics and identifying information used +by management programs, and which is exported to user programs by way +of the +.Xr ifmib 4 +branch of the +.Xr sysctl 3 +MIB. The following elements of the .Vt if_data structure are initialized by the interface and are not expected to change From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 15:41:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 23A55106564A; Wed, 7 Mar 2012 15:41:38 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from adsum.doit.wisc.edu (adsum.doit.wisc.edu [144.92.197.210]) by mx1.freebsd.org (Postfix) with ESMTP id E6AE68FC08; Wed, 7 Mar 2012 15:41:37 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed; delsp=yes Received: from avs-daemon.smtpauth1.wiscmail.wisc.edu by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0M0I0050KU97P800@smtpauth1.wiscmail.wisc.edu>; Wed, 07 Mar 2012 09:41:31 -0600 (CST) Received: from [10.0.2.93] ([unknown] [76.210.73.151]) by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0M0I00IWRU945P30@smtpauth1.wiscmail.wisc.edu>; Wed, 07 Mar 2012 09:41:30 -0600 (CST) Date: Wed, 07 Mar 2012 09:41:28 -0600 From: Nathan Whitehorn In-reply-to: To: "Bjoern A. Zeeb" Message-id: <9687CDF1-11B1-4DB1-914C-149E8DF6DF4D@freebsd.org> X-Mailer: Apple Mail (2.936) X-Spam-Report: AuthenticatedSender=yes, SenderIP=76.210.73.151 X-Spam-PmxInfo: Server=avs-16, Version=5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.3.7.153333, SenderIP=76.210.73.151 References: <201203050240.q252eI3J062834@svn.freebsd.org> <14EF0623-D07F-4BCC-BFE0-FDF9CAD66C8A@lists.zabbadoz.net> <22C4960D-2E99-4969-853A-E05B8C777BBF@lists.zabbadoz.net> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232531 - head/usr.sbin/bsdinstall/scripts X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 15:41:38 -0000 On Mar 7, 2012, at 8:20 AM, Bjoern A. Zeeb wrote: > > On 7. Mar 2012, at 14:11 , Bjoern A. Zeeb wrote: > >> >> On 7. Mar 2012, at 10:49 , Bjoern A. Zeeb wrote: >> >>> On 5. Mar 2012, at 02:40 , Nathan Whitehorn wrote: >>> >>>> Author: nwhitehorn >>>> Date: Mon Mar 5 02:40:18 2012 >>>> New Revision: 232531 >>>> URL: http://svn.freebsd.org/changeset/base/232531 >>>> >>>> Log: >>>> Make the chroot shell more functional by providing devfs. >>> >>> I am just replying to your last bsdinstall commit. I am on >>> r232627 and when I press "guided install" the installer aborts >>> and restarts from the keyboard menu. Do you have any idea what >>> causes this. I cannot easily switch to alternate consoles as our >>> vty switching key bindings don't go well with some virtualization >>> technology:( >> >> Got to console. On a re-run it logged: >> >> Running installation step: keymap >> Running installation step: hostname >> rm: /tmp/bsdinstall_etc/fstab: No such file or directory >> Running installation step: autopart >> Segmentation fault >> Running installation step: umount > > Ok, the real error mesasge there should not be "Segmentation fault" > but "No disk found". By the time I added a HDD to the machine as > well, the installer proceeded; so much for trying to install into a > big piece of memory for testing;-) Should I file a PR for both > features to be added? It should have already handled that case correctly -- please file a PR. One of the features I can't add, though :) -Nathan From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 18:05:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35AFA106564A; Wed, 7 Mar 2012 18:05:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 25AD28FC08; Wed, 7 Mar 2012 18:05:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q27I5joS004190; Wed, 7 Mar 2012 18:05:45 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q27I5jFg004188; Wed, 7 Mar 2012 18:05:45 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203071805.q27I5jFg004188@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 7 Mar 2012 18:05:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232660 - head/contrib/top X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 18:05:46 -0000 Author: kib Date: Wed Mar 7 18:05:45 2012 New Revision: 232660 URL: http://svn.freebsd.org/changeset/base/232660 Log: In batch mode, exit after receiving SIGINT, instead of immediate output of the next display. Submitted by: Andrey Zonov MFC after: 1 week Modified: head/contrib/top/top.c Modified: head/contrib/top/top.c ============================================================================== --- head/contrib/top/top.c Wed Mar 7 14:53:53 2012 (r232659) +++ head/contrib/top/top.c Wed Mar 7 18:05:45 2012 (r232660) @@ -723,6 +723,10 @@ restart: if (!interactive) { sleep(delay); + if (leaveflag) { + end_screen(); + exit(0); + } } else while (no_command) { From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 18:33:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 010EA106564A; Wed, 7 Mar 2012 18:33:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E393C8FC0A; Wed, 7 Mar 2012 18:33:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q27IXBgE005348; Wed, 7 Mar 2012 18:33:11 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q27IXBZK005344; Wed, 7 Mar 2012 18:33:11 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203071833.q27IXBZK005344@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 7 Mar 2012 18:33:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232665 - stable/8/sys/fs/nullfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 18:33:12 -0000 Author: kib Date: Wed Mar 7 18:33:11 2012 New Revision: 232665 URL: http://svn.freebsd.org/changeset/base/232665 Log: Synchronize nullfs with HEAD, mostly merge all locking changes. Tested by: pho MFC r229428: Document the state of the lowervp vnode for null_nodeget(). MFC r229431: Do the vput() for the lowervp in the null_nodeget() for error case too. Several callers of null_nodeget() did the cleanup itself, but several missed it, most prominent being null_bypass(). Remove the cleanup from the callers, now null_nodeget() handles lowervp free itself. MFC r229600 (by dim): In sys/fs/nullfs/null_subr.c, in a KASSERT, output the correct vnode pointer 'lowervp' instead of 'vp', which is uninitialized at that point. MFC r230304 (by rea): Use hashdestroy() instead of naive free(). MFC r232299: Move the code to destroy half-contructed nullfs vnode into helper function null_destroy_proto() from null_insmntque_dtr(). Also apply null_destroy_proto() in null_nodeget() when we raced and a vnode is found in the hash, so the currently allocated protonode shall be destroyed. Lock the vnode interlock around reassigning the v_vnlock. MFC r232301: Always request exclusive lock for the lower vnode in nullfs_vget(). The null_nodeget() requires exclusive lock on lowervp to be able to insmntque() new vnode. MFC r232303: In null_reclaim(), assert that reclaimed vnode is fully constructed, instead of accepting half-constructed vnode. Previous code cannot decide what to do with such vnode anyway, and although processing it for hash removal, paniced later when getting rid of nullfs reference on lowervp. While there, remove initializations from the declaration block. MFC r232304: Document that null_nodeget() cannot take shared-locked lowervp due to insmntque() requirements. MFC r232305: Allow shared locks for reads when lower filesystem accept shared locking. MFC r232383: Do not expose unlocked unconstructed nullfs vnode on mount list. Lock the native nullfs vnode lock before switching the locks. Modified: stable/8/sys/fs/nullfs/null_subr.c stable/8/sys/fs/nullfs/null_vfsops.c stable/8/sys/fs/nullfs/null_vnops.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/fs/nullfs/null_subr.c ============================================================================== --- stable/8/sys/fs/nullfs/null_subr.c Wed Mar 7 18:29:12 2012 (r232664) +++ stable/8/sys/fs/nullfs/null_subr.c Wed Mar 7 18:33:11 2012 (r232665) @@ -90,7 +90,7 @@ nullfs_uninit(vfsp) { mtx_destroy(&null_hashmtx); - free(null_node_hashtbl, M_NULLFSHASH); + hashdestroy(null_node_hashtbl, M_NULLFSHASH, null_node_hash); return (0); } @@ -169,15 +169,26 @@ null_hashins(mp, xp) } static void -null_insmntque_dtr(struct vnode *vp, void *xp) +null_destroy_proto(struct vnode *vp, void *xp) { + + lockmgr(&vp->v_lock, LK_EXCLUSIVE, NULL); + VI_LOCK(vp); vp->v_data = NULL; vp->v_vnlock = &vp->v_lock; - free(xp, M_NULLFSNODE); vp->v_op = &dead_vnodeops; - (void) vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + VI_UNLOCK(vp); vgone(vp); vput(vp); + free(xp, M_NULLFSNODE); +} + +static void +null_insmntque_dtr(struct vnode *vp, void *xp) +{ + + vput(((struct null_node *)xp)->null_lowervp); + null_destroy_proto(vp, xp); } /* @@ -198,6 +209,13 @@ null_nodeget(mp, lowervp, vpp) struct vnode *vp; int error; + /* + * The insmntque1() call below requires the exclusive lock on + * the nullfs vnode. + */ + ASSERT_VOP_ELOCKED(lowervp, "lowervp"); + KASSERT(lowervp->v_usecount >= 1, ("Unreferenced vnode %p\n", lowervp)); + /* Lookup the hash firstly */ *vpp = null_hashget(mp, lowervp); if (*vpp != NULL) { @@ -220,6 +238,7 @@ null_nodeget(mp, lowervp, vpp) error = getnewvnode("null", mp, &null_vnodeops, &vp); if (error) { + vput(lowervp); free(xp, M_NULLFSNODE); return (error); } @@ -241,9 +260,7 @@ null_nodeget(mp, lowervp, vpp) *vpp = null_hashins(mp, xp); if (*vpp != NULL) { vrele(lowervp); - vp->v_vnlock = &vp->v_lock; - xp->null_lowervp = NULL; - vrele(vp); + null_destroy_proto(vp, xp); return (0); } *vpp = vp; Modified: stable/8/sys/fs/nullfs/null_vfsops.c ============================================================================== --- stable/8/sys/fs/nullfs/null_vfsops.c Wed Mar 7 18:29:12 2012 (r232664) +++ stable/8/sys/fs/nullfs/null_vfsops.c Wed Mar 7 18:33:11 2012 (r232665) @@ -157,8 +157,7 @@ nullfs_mount(struct mount *mp) * Make sure the node alias worked */ if (error) { - vrele(lowerrootvp); - free(xmp, M_NULLFSMNT); /* XXX */ + free(xmp, M_NULLFSMNT); return (error); } @@ -181,7 +180,8 @@ nullfs_mount(struct mount *mp) MNT_IUNLOCK(mp); } MNT_ILOCK(mp); - mp->mnt_kern_flag |= lowerrootvp->v_mount->mnt_kern_flag & MNTK_MPSAFE; + mp->mnt_kern_flag |= lowerrootvp->v_mount->mnt_kern_flag & + (MNTK_MPSAFE | MNTK_SHARED_WRITES); MNT_IUNLOCK(mp); mp->mnt_data = xmp; vfs_getnewfsid(mp); @@ -308,6 +308,12 @@ nullfs_vget(mp, ino, flags, vpp) struct vnode **vpp; { int error; + + KASSERT((flags & LK_TYPE_MASK) != 0, + ("nullfs_vget: no lock requested")); + flags &= ~LK_TYPE_MASK; + flags |= LK_EXCLUSIVE; + error = VFS_VGET(MOUNTTONULLMOUNT(mp)->nullm_vfs, ino, flags, vpp); if (error) return (error); Modified: stable/8/sys/fs/nullfs/null_vnops.c ============================================================================== --- stable/8/sys/fs/nullfs/null_vnops.c Wed Mar 7 18:29:12 2012 (r232664) +++ stable/8/sys/fs/nullfs/null_vnops.c Wed Mar 7 18:33:11 2012 (r232665) @@ -365,9 +365,7 @@ null_lookup(struct vop_lookup_args *ap) vrele(lvp); } else { error = null_nodeget(dvp->v_mount, lvp, &vp); - if (error) - vput(lvp); - else + if (error == 0) *ap->a_vpp = vp; } } @@ -699,12 +697,18 @@ null_inactive(struct vop_inactive_args * static int null_reclaim(struct vop_reclaim_args *ap) { - struct vnode *vp = ap->a_vp; - struct null_node *xp = VTONULL(vp); - struct vnode *lowervp = xp->null_lowervp; + struct vnode *vp; + struct null_node *xp; + struct vnode *lowervp; - if (lowervp) - null_hashrem(xp); + vp = ap->a_vp; + xp = VTONULL(vp); + lowervp = xp->null_lowervp; + + KASSERT(lowervp != NULL && vp->v_vnlock != &vp->v_lock, + ("Reclaiming inclomplete null vnode %p", vp)); + + null_hashrem(xp); /* * Use the interlock to protect the clearing of v_data to * prevent faults in null_lock(). @@ -715,10 +719,7 @@ null_reclaim(struct vop_reclaim_args *ap vp->v_object = NULL; vp->v_vnlock = &vp->v_lock; VI_UNLOCK(vp); - if (lowervp) - vput(lowervp); - else - panic("null_reclaim: reclaiming a node with no lowervp"); + vput(lowervp); free(xp, M_NULLFSNODE); return (0); @@ -810,9 +811,7 @@ null_vptocnp(struct vop_vptocnp_args *ap #endif vhold(*dvp); vput(*dvp); - } else - vput(ldvp); - + } vn_lock(vp, locked | LK_RETRY); return (error); } From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 18:46:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9600510656EE; Wed, 7 Mar 2012 18:46:21 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8608F8FC12; Wed, 7 Mar 2012 18:46:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q27IkLh9005864; Wed, 7 Mar 2012 18:46:21 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q27IkL9I005862; Wed, 7 Mar 2012 18:46:21 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201203071846.q27IkL9I005862@svn.freebsd.org> From: Ed Maste Date: Wed, 7 Mar 2012 18:46:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232666 - head/usr.sbin/crashinfo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 18:46:21 -0000 Author: emaste Date: Wed Mar 7 18:46:21 2012 New Revision: 232666 URL: http://svn.freebsd.org/changeset/base/232666 Log: Improve multi-line kernel ident parsing Instead of blindly grabbing the line with 'Version string' and the following one from the core info file, take all lines after 'Version string' until the one one that matches the field format in the core info file. This provides compatibility with VendorBSD modifications that have a different kernel ident format. Reviewed by: jhb Modified: head/usr.sbin/crashinfo/crashinfo.sh Modified: head/usr.sbin/crashinfo/crashinfo.sh ============================================================================== --- head/usr.sbin/crashinfo/crashinfo.sh Wed Mar 7 18:33:11 2012 (r232665) +++ head/usr.sbin/crashinfo/crashinfo.sh Wed Mar 7 18:46:21 2012 (r232666) @@ -45,10 +45,11 @@ find_kernel() nextline=1 next } - // { - if (nextline) { - print + nextline==1 { + if ($0 ~ "^ [A-Za-z ]+: ") { nextline=0 + } else { + print } }' $INFO) From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 18:50:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 694C8106564A; Wed, 7 Mar 2012 18:50:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3FE828FC15; Wed, 7 Mar 2012 18:50:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q27IoYVG006023; Wed, 7 Mar 2012 18:50:34 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q27IoYTS006020; Wed, 7 Mar 2012 18:50:34 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201203071850.q27IoYTS006020@svn.freebsd.org> From: John Baldwin Date: Wed, 7 Mar 2012 18:50:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232667 - head/sys/dev/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 18:50:34 -0000 Author: jhb Date: Wed Mar 7 18:50:33 2012 New Revision: 232667 URL: http://svn.freebsd.org/changeset/base/232667 Log: Simplify the PCI bus dma tag code a bit. First, don't create a tag at all for platforms that only have 32-bit bus addresses. Second, remove the 'tag_valid' flag from the softc. Instead, if we don't create a tag in pci_attach_common(), just cache the value of our parent's tag so that we always have a valid tag to return. Modified: head/sys/dev/pci/pci.c head/sys/dev/pci/pci_private.h Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Wed Mar 7 18:46:21 2012 (r232666) +++ head/sys/dev/pci/pci.c Wed Mar 7 18:50:33 2012 (r232667) @@ -77,10 +77,12 @@ __FBSDID("$FreeBSD$"); * However, in the case of PAE, DMA addresses can cross a 4GB * boundary, so as a workaround use a 2GB boundary. */ +#if (BUS_SPACE_MAXADDR > 0xFFFFFFFF) #ifdef PAE -#define PCI_DMA_BOUNDARY (1u << 31) +#define PCI_DMA_BOUNDARY 0x80000000 #else -#define PCI_DMA_BOUNDARY ((bus_size_t)((uint64_t)1 << 32)) +#define PCI_DMA_BOUNDARY 0x100000000 +#endif #endif #define PCIR_IS_BIOS(cfg, reg) \ @@ -3232,7 +3234,10 @@ int pci_attach_common(device_t dev) { struct pci_softc *sc; - int busno, domain, error; + int busno, domain; +#ifdef PCI_DMA_BOUNDARY + int error, tag_valid; +#endif sc = device_get_softc(dev); domain = pcib_get_domain(dev); @@ -3240,6 +3245,8 @@ pci_attach_common(device_t dev) if (bootverbose) device_printf(dev, "domain=%d, physical bus=%d\n", domain, busno); +#ifdef PCI_DMA_BOUNDARY + tag_valid = 0; if (device_get_devclass(device_get_parent(device_get_parent(dev))) != devclass_find("pci")) { error = bus_dma_tag_create(bus_get_dma_tag(dev), 1, @@ -3250,8 +3257,11 @@ pci_attach_common(device_t dev) device_printf(dev, "Failed to create DMA tag: %d\n", error); else - sc->sc_dma_tag_valid = 1; + tag_valid = 1; } + if (!tag_valid) +#endif + sc->sc_dma_tag = bus_get_dma_tag(dev); return (0); } @@ -4363,9 +4373,7 @@ pci_get_dma_tag(device_t bus, device_t d { struct pci_softc *sc = device_get_softc(bus); - if (sc->sc_dma_tag_valid) - return (sc->sc_dma_tag); - return (bus_generic_get_dma_tag(bus, dev)); + return (sc->sc_dma_tag); } uint32_t Modified: head/sys/dev/pci/pci_private.h ============================================================================== --- head/sys/dev/pci/pci_private.h Wed Mar 7 18:46:21 2012 (r232666) +++ head/sys/dev/pci/pci_private.h Wed Mar 7 18:50:33 2012 (r232667) @@ -40,7 +40,6 @@ DECLARE_CLASS(pci_driver); struct pci_softc { bus_dma_tag_t sc_dma_tag; - int sc_dma_tag_valid; }; extern int pci_do_power_resume; From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 18:52:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B77A9106564A; Wed, 7 Mar 2012 18:52:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A78E98FC16; Wed, 7 Mar 2012 18:52:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q27Iqkui006135; Wed, 7 Mar 2012 18:52:46 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q27IqkaF006133; Wed, 7 Mar 2012 18:52:46 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201203071852.q27IqkaF006133@svn.freebsd.org> From: John Baldwin Date: Wed, 7 Mar 2012 18:52:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232668 - head/sys/dev/aac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 18:52:46 -0000 Author: jhb Date: Wed Mar 7 18:52:46 2012 New Revision: 232668 URL: http://svn.freebsd.org/changeset/base/232668 Log: Use bus_get_dma_tag() to inherit the PCI bus' 4G boundary constraint. Tested by: emaste Modified: head/sys/dev/aac/aac_pci.c Modified: head/sys/dev/aac/aac_pci.c ============================================================================== --- head/sys/dev/aac/aac_pci.c Wed Mar 7 18:50:33 2012 (r232667) +++ head/sys/dev/aac/aac_pci.c Wed Mar 7 18:52:46 2012 (r232668) @@ -402,7 +402,7 @@ aac_pci_attach(device_t dev) * * Note that some of these controllers are 64-bit capable. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(sc->aac_dev), /* parent */ PAGE_SIZE, 0, /* algnmnt, boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 18:53:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5426F106564A; Wed, 7 Mar 2012 18:53:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 444438FC16; Wed, 7 Mar 2012 18:53:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q27Irvg7006202; Wed, 7 Mar 2012 18:53:57 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q27IrvHJ006199; Wed, 7 Mar 2012 18:53:57 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201203071853.q27IrvHJ006199@svn.freebsd.org> From: John Baldwin Date: Wed, 7 Mar 2012 18:53:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232669 - head/sys/dev/twa X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 18:53:57 -0000 Author: jhb Date: Wed Mar 7 18:53:56 2012 New Revision: 232669 URL: http://svn.freebsd.org/changeset/base/232669 Log: Use bus_get_dma_tag() to inherit the 4G boundary restriction from the parent PCI bus and remove the home-grown version in this driver. Modified: head/sys/dev/twa/tw_osl.h head/sys/dev/twa/tw_osl_freebsd.c Modified: head/sys/dev/twa/tw_osl.h ============================================================================== --- head/sys/dev/twa/tw_osl.h Wed Mar 7 18:52:46 2012 (r232668) +++ head/sys/dev/twa/tw_osl.h Wed Mar 7 18:53:56 2012 (r232669) @@ -55,12 +55,6 @@ #define TW_OSLI_MAX_NUM_IOS (TW_OSLI_MAX_NUM_REQUESTS - 2) #define TW_OSLI_MAX_NUM_AENS 0x100 -#ifdef PAE -#define TW_OSLI_DMA_BOUNDARY (1u << 31) -#else -#define TW_OSLI_DMA_BOUNDARY ((bus_size_t)((uint64_t)1 << 32)) -#endif - /* Possible values of req->state. */ #define TW_OSLI_REQ_STATE_INIT 0x0 /* being initialized */ #define TW_OSLI_REQ_STATE_BUSY 0x1 /* submitted to CL */ Modified: head/sys/dev/twa/tw_osl_freebsd.c ============================================================================== --- head/sys/dev/twa/tw_osl_freebsd.c Wed Mar 7 18:52:46 2012 (r232668) +++ head/sys/dev/twa/tw_osl_freebsd.c Wed Mar 7 18:53:56 2012 (r232669) @@ -562,9 +562,9 @@ tw_osli_alloc_mem(struct twa_softc *sc) } /* Create the parent dma tag. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(sc->bus_dev), /* parent */ sc->alignment, /* alignment */ - TW_OSLI_DMA_BOUNDARY, /* boundary */ + 0, /* boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 18:57:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C16751065676; Wed, 7 Mar 2012 18:57:09 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B1AC48FC2F; Wed, 7 Mar 2012 18:57:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q27Iv9wD006359; Wed, 7 Mar 2012 18:57:09 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q27Iv9W0006357; Wed, 7 Mar 2012 18:57:09 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201203071857.q27Iv9W0006357@svn.freebsd.org> From: John Baldwin Date: Wed, 7 Mar 2012 18:57:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232670 - head/sys/dev/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 18:57:09 -0000 Author: jhb Date: Wed Mar 7 18:57:09 2012 New Revision: 232670 URL: http://svn.freebsd.org/changeset/base/232670 Log: Remove the PAE-specific 2GB DMA boundary since HEAD now supports a proper 4G boundary for PAE. Modified: head/sys/dev/pci/pci.c Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Wed Mar 7 18:53:56 2012 (r232669) +++ head/sys/dev/pci/pci.c Wed Mar 7 18:57:09 2012 (r232670) @@ -70,20 +70,9 @@ __FBSDID("$FreeBSD$"); #include "pcib_if.h" #include "pci_if.h" -/* - * XXX: Due to a limitation of the bus_dma_tag_create() API, we cannot - * specify a 4GB boundary on 32-bit targets. Usually this does not - * matter as it is ok to use a boundary of 0 on these systems. - * However, in the case of PAE, DMA addresses can cross a 4GB - * boundary, so as a workaround use a 2GB boundary. - */ #if (BUS_SPACE_MAXADDR > 0xFFFFFFFF) -#ifdef PAE -#define PCI_DMA_BOUNDARY 0x80000000 -#else #define PCI_DMA_BOUNDARY 0x100000000 #endif -#endif #define PCIR_IS_BIOS(cfg, reg) \ (((cfg)->hdrtype == PCIM_HDRTYPE_NORMAL && reg == PCIR_BIOS) || \ From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 20:46:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C337E106564A; Wed, 7 Mar 2012 20:46:59 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B300E8FC0A; Wed, 7 Mar 2012 20:46:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q27KkxXr009848; Wed, 7 Mar 2012 20:46:59 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q27KkxFr009846; Wed, 7 Mar 2012 20:46:59 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201203072046.q27KkxFr009846@svn.freebsd.org> From: Sergey Kandaurov Date: Wed, 7 Mar 2012 20:46:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232671 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 20:46:59 -0000 Author: pluknet Date: Wed Mar 7 20:46:59 2012 New Revision: 232671 URL: http://svn.freebsd.org/changeset/base/232671 Log: Add lib32 part for libutil after its version bump to 9. PR: misc/165523 Submitted by: Andrey Zonov MFC after: 1 week Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed Mar 7 18:57:09 2012 (r232670) +++ head/ObsoleteFiles.inc Wed Mar 7 20:46:59 2012 (r232671) @@ -417,6 +417,9 @@ OLD_FILES+=usr/share/man/man5/lastlog.5. OLD_FILES+=usr/share/man/man5/utmp.5.gz OLD_FILES+=usr/share/man/man5/wtmp.5.gz OLD_LIBS+=lib/libutil.so.8 +.if ${TARGET_ARCH} == "amd64" +OLB_LIBS+=usr/lib32/libutil.so.8 +.endif # 20100105: new userland semaphore implementation OLD_FILES+=usr/include/sys/semaphore.h # 20100103: ntptrace(8) removed From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 20:49:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F5881065670; Wed, 7 Mar 2012 20:49:17 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from adsum.doit.wisc.edu (adsum.doit.wisc.edu [144.92.197.210]) by mx1.freebsd.org (Postfix) with ESMTP id 31A968FC08; Wed, 7 Mar 2012 20:49:17 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from avs-daemon.smtpauth1.wiscmail.wisc.edu by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0M0J0020C8I4MQ00@smtpauth1.wiscmail.wisc.edu>; Wed, 07 Mar 2012 14:49:16 -0600 (CST) Received: from anacreon.physics.wisc.edu (anacreon.physics.wisc.edu [128.104.160.176]) by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0M0J00AG58I17Y30@smtpauth1.wiscmail.wisc.edu>; Wed, 07 Mar 2012 14:49:13 -0600 (CST) Date: Wed, 07 Mar 2012 14:49:12 -0600 From: Nathan Whitehorn In-reply-to: <201203072046.q27KkxFr009846@svn.freebsd.org> To: Sergey Kandaurov Message-id: <4F57C9C8.80907@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=128.104.160.176 X-Spam-PmxInfo: Server=avs-13, Version=5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.3.7.203320, SenderIP=128.104.160.176 References: <201203072046.q27KkxFr009846@svn.freebsd.org> User-Agent: Mozilla/5.0 (X11; U; FreeBSD powerpc; en-US; rv:1.9.2.25) Gecko/20120130 Thunderbird/3.1.17 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232671 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 20:49:17 -0000 On 03/07/12 14:46, Sergey Kandaurov wrote: > Author: pluknet > Date: Wed Mar 7 20:46:59 2012 > New Revision: 232671 > URL: http://svn.freebsd.org/changeset/base/232671 > > Log: > Add lib32 part for libutil after its version bump to 9. > > PR: misc/165523 > Submitted by: Andrey Zonov > MFC after: 1 week > > Modified: > head/ObsoleteFiles.inc > > Modified: head/ObsoleteFiles.inc > ============================================================================== > --- head/ObsoleteFiles.inc Wed Mar 7 18:57:09 2012 (r232670) > +++ head/ObsoleteFiles.inc Wed Mar 7 20:46:59 2012 (r232671) > @@ -417,6 +417,9 @@ OLD_FILES+=usr/share/man/man5/lastlog.5. > OLD_FILES+=usr/share/man/man5/utmp.5.gz > OLD_FILES+=usr/share/man/man5/wtmp.5.gz > OLD_LIBS+=lib/libutil.so.8 > +.if ${TARGET_ARCH} == "amd64" > +OLB_LIBS+=usr/lib32/libutil.so.8 > +.endif > # 20100105: new userland semaphore implementation > OLD_FILES+=usr/include/sys/semaphore.h > # 20100103: ntptrace(8) removed This should also check for powerpc64. Or, better, do it unconditionally, since it will only remove files that actually exist and there's no harm trying to remove /usr/lib32/blah on 32-bit systems. -Nathan From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 20:53:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B652110656D9; Wed, 7 Mar 2012 20:53:52 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id A360C8FC18; Wed, 7 Mar 2012 20:53:51 +0000 (UTC) Received: by bkcjc3 with SMTP id jc3so7569264bkc.13 for ; Wed, 07 Mar 2012 12:53:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=VA7jemCzHs9xThm/GsX31HiHPzaVlCXYkhKvOxvEoLE=; b=w3w69Htlbe8lJfVbqZydYW6qJ9YlPMWZkbnW7lYVMmXxwXn8ItoLgulYLXIHvCCEM1 AZuCMKxeYf/xVqb0/2kCd3YtsKQKC2UVeru2E+YKLZJz0jqyrsXSYsm4H4lEw/9666BH Ge1Y1eGB76pDa5XECDrmGrGWcSj5swZ8W7KH0y9PorbfCtGcdyMWGFDu1g7kADWTd0R0 P7erWAz+TZtBdhzFlM2eMn706+MEEkI8H1O0Vbms5Krl7FwO94/zNxqMLCwp/n8jqeue DxxM6ebonrSwqrSd/tDhOEtd/8jV618YdMMXVcj2XJic8T5uDPYh0gbTb0yXceoU5B5K F7+w== MIME-Version: 1.0 Received: by 10.112.44.232 with SMTP id h8mr1238070lbm.85.1331153630423; Wed, 07 Mar 2012 12:53:50 -0800 (PST) Sender: pluknet@gmail.com Received: by 10.152.21.73 with HTTP; Wed, 7 Mar 2012 12:53:50 -0800 (PST) In-Reply-To: <4F57C9C8.80907@freebsd.org> References: <201203072046.q27KkxFr009846@svn.freebsd.org> <4F57C9C8.80907@freebsd.org> Date: Wed, 7 Mar 2012 23:53:50 +0300 X-Google-Sender-Auth: lZzHKCPHM4_B8E-FO445LQy9sGE Message-ID: From: Sergey Kandaurov To: Nathan Whitehorn Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232671 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 20:53:52 -0000 On 8 March 2012 00:49, Nathan Whitehorn wrote: > On 03/07/12 14:46, Sergey Kandaurov wrote: >> >> Author: pluknet >> Date: Wed Mar =A07 20:46:59 2012 >> New Revision: 232671 >> URL: http://svn.freebsd.org/changeset/base/232671 >> >> Log: >> =A0 Add lib32 part for libutil after its version bump to 9. >> >> =A0 PR: =A0 =A0 =A0 =A0 =A0misc/165523 >> =A0 Submitted by: =A0 =A0 =A0 =A0Andrey Zonov >> =A0 MFC after: =A0 1 week >> >> Modified: >> =A0 head/ObsoleteFiles.inc >> >> Modified: head/ObsoleteFiles.inc >> >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/ObsoleteFiles.inc =A0 =A0 =A0Wed Mar =A07 18:57:09 2012 =A0 =A0= =A0 =A0(r232670) >> +++ head/ObsoleteFiles.inc =A0 =A0 =A0Wed Mar =A07 20:46:59 2012 =A0 =A0= =A0 =A0(r232671) >> @@ -417,6 +417,9 @@ OLD_FILES+=3Dusr/share/man/man5/lastlog.5. >> =A0OLD_FILES+=3Dusr/share/man/man5/utmp.5.gz >> =A0OLD_FILES+=3Dusr/share/man/man5/wtmp.5.gz >> =A0OLD_LIBS+=3Dlib/libutil.so.8 >> +.if ${TARGET_ARCH} =3D=3D "amd64" >> +OLB_LIBS+=3Dusr/lib32/libutil.so.8 >> +.endif >> =A0# 20100105: new userland semaphore implementation >> =A0OLD_FILES+=3Dusr/include/sys/semaphore.h >> =A0# 20100103: ntptrace(8) removed > > > This should also check for powerpc64. Or, better, do it unconditionally, > since it will only remove files that actually exist and there's no harm > trying to remove /usr/lib32/blah on 32-bit systems. > -Nathan Ok. so there are two way to go. - add .if for powerpc64 (btw, does this arch exist in RELENG_8?) - remove all lib32 related conditions throughout the file. The latter looks easier to maintain. --=20 wbr, pluknet From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 20:55:23 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A566D1065673; Wed, 7 Mar 2012 20:55:23 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 922708FC1D; Wed, 7 Mar 2012 20:55:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q27KtNF7010149; Wed, 7 Mar 2012 20:55:23 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q27KtNID010145; Wed, 7 Mar 2012 20:55:23 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201203072055.q27KtNID010145@svn.freebsd.org> From: Hiroki Sato Date: Wed, 7 Mar 2012 20:55:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232672 - in releng/8.3/release/doc: en_US.ISO8859-1/errata en_US.ISO8859-1/relnotes share/examples share/sgml X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 20:55:23 -0000 Author: hrs Date: Wed Mar 7 20:55:23 2012 New Revision: 232672 URL: http://svn.freebsd.org/changeset/base/232672 Log: Trim old entries and update version numbers. Approved by: re (implicit) Modified: releng/8.3/release/doc/en_US.ISO8859-1/errata/article.sgml releng/8.3/release/doc/en_US.ISO8859-1/relnotes/article.sgml releng/8.3/release/doc/share/examples/Makefile.relnotesng releng/8.3/release/doc/share/sgml/release.ent Modified: releng/8.3/release/doc/en_US.ISO8859-1/errata/article.sgml ============================================================================== --- releng/8.3/release/doc/en_US.ISO8859-1/errata/article.sgml Wed Mar 7 20:46:59 2012 (r232671) +++ releng/8.3/release/doc/en_US.ISO8859-1/errata/article.sgml Wed Mar 7 20:55:23 2012 (r232672) @@ -16,7 +16,7 @@ %release; - + ]>
@@ -40,7 +40,7 @@ $FreeBSD$ - 2011 + 2012 The &os; Documentation Project Modified: releng/8.3/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- releng/8.3/release/doc/en_US.ISO8859-1/relnotes/article.sgml Wed Mar 7 20:46:59 2012 (r232671) +++ releng/8.3/release/doc/en_US.ISO8859-1/relnotes/article.sgml Wed Mar 7 20:55:23 2012 (r232672) @@ -15,7 +15,7 @@ $FreeBSD$ - 2011 + 2012 The &os; Documentation Project @@ -109,6 +109,7 @@ advisories, user-visible changes, and major architectural improvements. + SA-10:10.openssl @@ -155,1101 +154,90 @@ +--> Kernel Changes - The maximum number of pages - used for DMA bounce buffer pool has been increased from 256 to - 1024. - - The default value of - kern.hz has been increased from 100 to - 1000. - - The SMP kernel now works on - MPC7400-based Apple desktop machines such as - PowerMac3,3. - - &os;/powerpc now supports - DMA bounce buffer which is required on systems with larger RAM - than 4GB. - - &os;/mips support has been - improved. It now supports SMP on a SWARM with a dual-core - Sibyte processor. - - &os;/mips now supports Netlogic Microsystems' - XLR and XLS multi-core processor families. - - &os;/sparc64 now supports - reservation-based physical memory allocation which provides - better performance. - - &os;/amd64 now always sets - the KVA space as equal to or larger than physical memory size. - The default size was calculated based on one-third of the - physical memory size by a code derived from one for i386. It - has been changed because constraints for memory space are not - severe on amd64 and this change would help to prevent a - kmem_map too small panic which often occurs - when using ZFS. - - CPU topology detection - for Intel CPUs has been improved. - - ACPI suspend/resume - functionality support has been improved. - - &os; kernel now - supports kern_fpu_enter() and - kern_fpu_leave() KPIs which allow the - kernel subsystems to use XMM register files used in Intel SSE - (Streaming SIMD Extensions). - - The &man.acpi.4; - driver now uses ACPI Reset Register capability by default only - when a flag in the FADT which indicates it is available. This - behavior was controlled by a &man.sysctl.8; variable - hw.acpi.handle_reboot and the default value - was always set to 0. - - The &man.acpi.4; - driver now supports new loader tunables - hw.acpi.install_interface and - hw.acpi.remove_interface. For more - details, see &man.acpi.4; manual page. - - The &man.alq.9; support has been - improved. The alq_writen() and - alq_getn() KPIs have been extended to - support variable length messages, which is enabled at ALQ - creation time depending on the arguments passed to - alq_open(). Also, the - ALQ_NOACTIVATE and - ALQ_ORDERED flags have been added to allow - ALQ consumers to have more control over I/O scheduling and - resource acquisition respectively. These extensions are fully - backward compatible. - - The &man.alq.9; support is now provided - as a kernel module alq.ko. - - The &man.ddb.8; kernel debugger now - supports an optional delay in reset and - reboot commands. This allows an - administrator to break the system into debugger and trigger - automatic textdump when an unattended panic occurs. - - The &man.ddb.8; kernel debugger now - supports a show cdev command. This - displays the list of all created cdev's, consisting of devfs - node name and struct cdev address. - - The &os; GENERIC - kernel is now compiled with and - options. From 8.2-RELEASE the - kernel supports displaying a stack trace on panic by using - &man.stack.9; facility with no debugger backend like - &man.ddb.8;. Note that this does not change the default - behaviors of the GENERIC kernel on - panic. - - The following - &man.sysctl.8; variables are also now loader tunables: - vm.kmem_size, - vm.kmem_size_max, and - vm.kmem_size_min, - debug.kdb.stop_cpus, - debug.trace_on_panic, and - kern.sync_on_panic. Also, new - &man.sysctl.8; variables vm.kmem_map_size - for the current kmem map size and - vm.kmem_map_free for largest contiguous - free range in kmem map, vfs.ncsizefactor - for size factor for namecache, and - vfs.ncnegfactor for ratio of negative - namecache entries have been added. - - The &os; &man.memguard.9; framework has - been improved to make it able to detect use-after-free of - allocated memories over a longer time. For more details, see - &man.memguard.9; manual page. - - PT_LWPINFO request to - obtain information about the kernel thread that caused the - traced process to stop in the &man.ptrace.2; process tracing - and debugging facility has been improved. It now reports - system call entry and leave events, as well as availability of - siginfo_t accompanying the reported - signal. - - The &os; &man.crypto.4; framework - (opencrypto) now supports XTS-AES (XEX-TCB-CTS, or XEX-based - Tweaked Code Book mode with CipherText Stealing), which is - defined in IEEE Std. 1619-2007. - - Xen HVM support in - &os;/amd64 kernel has been improved. For more details, see - &man.xen.4; manual page. - - The qpi(4) pseudo bus - driver has been added. This supports extra PCI buses on Intel - QPI chipsets where various hardware such as memory controllers - for each socket is connected. + Boot Loader Changes - &os; now fully supports GPT (GUID - Partition Table). Checksums of primary header and primary - partition table are verified properly now. - - Memory - management issues that prevented &os; OpenFirmware loader - and netbooting from working have been fixed. - - The &man.pxeboot.8; now uses NFS - version 3 instead of version 2 by default. + Hardware Support - The &man.aesni.4; - driver has been added. This supports AES accelerator on - Intel CPUs and accelerates AES operations for - &man.crypto.4;. - - The &man.aibs.4; - driver has been added. This supports the hardware sensors - in ASUS motherboards and replaces the &man.acpi.aiboost.4; - driver. - - The &man.coretemp.4; - driver now supports Xeon 5500/5600 series. - - &os;/powerpc now - supports the I2C bus in Apple System Management Unit. - - A device driver that - supports CPU temperature sensors on PowerMac 11,2 has been - added. - - The &man.ehci.4;, &man.ohci.4;, and - &man.uhci.4; driver now support LOW speed BULK transfer - mode. - - The &man.ichwd.4; - driver now supports Intel NM10 Express chipset watchdog - timer. - - The &man.tpm.4; driver, which supports - Trusted Platform Module has been added. - - The xhci(4) driver, which supports - Extensible Host Controller Interface (xHCI) and USB 3.0, has - been added. + Multimedia Support - The &os; Linux emulation subsystem now supports the - video4linux API. This requires - native video4linux hardware - drivers such as the ones provided by multimedia/pwcbsd and multimedia/webcamd. - - MIDI input buffer size in the - &man.uaudio.4; driver has been changed. This fixes a - problem where the input appears several seconds - late. - - An issue in the &man.uaudio.4; - driver that prevented some USB audio devices from working - has been fixed. + Network Interface Support - The &man.alc.4; driver now supports - Atheros AR8151/AR8152 PCIe Gigabit/Fast Ethernet - controllers. - - A bug in the &man.alc.4; driver was - fixed that could lead to a system freeze when the system - was booted without a cable plugged in. This symptom was - found in AR8132 on EEE PC. - - The TX interrupt moderation timer in - the &man.alc.4; driver has been reduced from 50ms to 1ms. - The 50ms timer resulted in a poor UDP performance. - - The &man.axe.4; driver - has been improved for stability and better performance on - the TX packet rate. - - The &man.bge.4; driver now supports - BCM5718 x2 PCI Express dual-port gigabit Ethernet - controller family. This family is the successor to the - BCM5714/BCM5715 family and supports IPv4/IPv6 checksum - offloading, TSO, VLAN hardware tagging, jumbo frames, - MSI/MSIX, IOV, RSS and TSS. The current version of the - driver supports all hardware features except IOV and - RSS/TSS. - - A bug in the &man.bge.4; driver which - prevented TSO from working in BCM57780 has been - fixed. - - A bug in the &man.bge.4; driver that - could wrongly disable the TX checksum offloading feature - as well when one tries to disable only the RX checksum - offloading has been fixed. - - Some improvements for reliability of - the &man.bge.4; driver with BCM5906 controller has been - made. - - The &man.bge.4; driver now supports - hardware MAC statistics in controller's internal memory - for BCM5705 or newer Broadcom controllers. These counters - can be accessed via &man.sysctl.8; variable - dev.bge.N.stats.* - and provide useful information to diagnose driver - issues. - - UDP checksum offloading in the - &man.bge.4; driver has been disabled by default. This is - because Broadcom controllers have a bug which can generate - UDP datagrams with checksum value 0 - when TX UDP checksum offloading is enabled. The checksum - offloading can be enabled by using the following loader - tunable: - - dev.bge.N.forced_udpcsum - - A bug in the &man.bge.4; driver that - could lead to poor performance on a system with more than - 4 GB RAM has been fixed. The cause was that all of - Broadcom controllers except the BCM5755 and later have a - bug in 4 GB-boundary DMA processing and used the bounce - buffer in an inefficient way. - - The &man.bwi.4; driver, which supports - Broadcom BCM430* and BCM431* family Wireless Ethernet - controllers, has been added. This is not compiled into - the GENERIC kernel because there are - some problems. The kernel module - if_bwi.ko is available and can be - loaded without recompiling the kernel to enable this - driver. - - A bug in the &man.bwn.4; driver that - prevented WPA authentication from working has been - fixed. - - A bug in the &man.cdce.4; driver has - been fixed. - - The &man.cxgb.4; driver now supports - the following new &man.sysctl.8; variables: - hw.cxgb.nfilters sets the maximum - number of entries in the hardware filter table, - dev.cxgbc.N.pkt_timestamp - provides packet timestamp instead of connection hash, and - dev.cxgbc.N.core_clock - provides the core clock frequency in kHz. - - The &man.em.4; driver has been updated to version - 7.1.9. - - The &man.igb.4; driver has been updated to version - 2.0.7. - - The &man.em.4; and &man.igb.4; drivers - now provide statistics counters as &man.sysctl.8; MIB - objects. - - The &man.em.4; and &man.igb.4; drivers - now support the &man.led.4; interface via - /dev/led/emN - and - /dev/led/igbN - for identification LED control. The following command - line makes the LED blink on em0: - - &prompt.root; echo f2 > /dev/led/em0 - - The &man.epair.4; virtual Ethernet - interface driver now supports explicit UP/DOWN linkstate. - This fixes an issue when it is used with the &man.carp.4; - protocol. - - The &man.fxp.4; driver now supports - TSO over VLAN on i82550 and i82551 controllers. - - The &man.iwn.4; driver now supports - Intel Wireless WiFi Link 6000 series. The firmware has - been updated to version 9.221.4.1. - - The &man.ixgbe.4; - driver is now also provided as a kernel module. - - The &man.ixgbe.4; - driver has been updated to version 2.3.8. It now supports - 82599, better interrupt handling, hardware assist to LRO, - VM SRIOV interface, and so on. - - The - &man.miibus.4; has been rewritten for the generic IEEE - 802.3 annex 31B full duplex flow control support. The - &man.alc.4;, &man.bge.4;, &man.bce.4;, &man.cas.4;, - &man.fxp.4;, &man.gem.4;, &man.jme.4;, &man.msk.4;, - &man.nfe.4;, &man.re.4;, &man.stge.4;, and &man.xl.4; - drivers along with atphy(4), bmtphy(4), brgphy(4), - e1000phy(4), gentbi(4), inphy(4), ip1000phy(4), jmphy(4), - nsgphy(4), nsphyter(4), and &man.rgephy.4; have been - updated to support flow control via this facility. - - The &man.mwlfw.4; - driver is now also provided as a kernel module. - - A bug in the &man.mxge.4; driver - that prevented TSO from working has been fixed. - - The &man.nfe.4; driver now supports - WoL (Wake on LAN). - - The &man.re.4; driver now supports - 64-bit DMA addressing for RTL810xE/RTL8168/RTL8111 PCIe - controllers. - - The &man.re.4; driver now supports - hardware interrupt moderation of TX completion interrupts - on RTL8169/RTL8168 controllers. - - The &man.rl.4; driver now supports WoL - (Wake on LAN) on RTL8139B or newer controllers. - - The &man.rl.4; driver now supports - reading hardware statistics counters by setting a - &man.sysctl.8; variable - dev.rl.N.stats - to 1. - - The &man.rl.4; driver now supports a - device hint to change a way of register access. Although - some newer RTL8139 controllers support memory-mapped - register access, it is difficult to detect the support - automatically. For this reason the driver uses I/O - mapping by default and provides the following device hint. - If it is set to 0, the driver uses - memory mapping for register access. - - hint.rl.N.prefer_iomap="0" - - Note that the default value is 1. - - The &man.rl.4; driver has improved - interrupt handling. It now has better TX performance - under high RX load. - - A bug in the &man.sk.4; driver has - been fixed. It did not program the station address for - Yukon controllers and overriding the station address with - &man.ifconfig.8; was not possible. - - The &man.sk.4; driver now disables TX - checksum offloading by default. This is because some - revisions of the Yukon controller generate corrupted frames. - The checksum offloading can be enabled manually by using - option in the &man.ifconfig.8; - utility. - - The &man.sis.4; driver - now works on all supported platforms. Some stability and - performance issues have also been fixed. - - The &man.sis.4; driver now supports - WoL (Wake on LAN) on NS DP8315 controller. - - A tunable - dev.sis.N.manual_pad - for the &man.sis.4; driver has been added. This controls - whether padding with 0x00 for short frames is done by CPU, - rather than the controller. The reason why this tunable - has been added is that NS DP83815/DP83816 pads them with - 0xff though RFC 1042 specifies it should be 0x00. The - tunable is disabled by default, which means padding with - 0xff is used because padding with 0x00 by software needs - extra CPU cycles. Enabling manual_pad, - by setting this &man.sysctl.8; variable to a non-zero - value, forces the use of software padding. - - The &man.ste.4; driver now supports - a device hint to change the device register access mode. - The driver uses memory-mapped register access by default, - but this caused stability problems with some old IC Plus - Corp (formerly Sundace) controllers. The following device - hint makes the driver use I/O mapping for register - access: - - hint.ste.N.prefer_iomap="1" - - The &man.xl.4; driver now supports - WoL (Wake on LAN). Note that not all controllers support - this functionality and some need an additional remote - wakeup cable. + Network Protocols - An issue in the &man.carp.4; pseudo - interface and linkstate changes of the underlying interfaces - has been fixed. This happened when a &man.carp.4; interface - was created before the underlying interface and its - linkstate became UP. - - A bug in the &man.ipfw.4; - packet filter subsystem has been fixed. The &man.sysctl.8; - variable net.inet.ip.fw.one_pass did not - work for netgraph action and in-kernel - NAT. - - A new loader tunable - net.link.ifqmaxlen has been added. It - specifies the default value of send interface queue length. - The default value for this parameter is - 50. - - The ngtee action in - the &man.ipfw.4; packet filter subsystem has been changed. - It no longer accepts a packet. - - A possible panic in the &man.ipfw.4; - pseudo interface for logging has been fixed. - - IPsec flow distribution has been - improved for more parallel processing. - - A bug in the &os; IPv4 stack that - prevented adding a proxy ARP entry over &man.netgraph.4; - interfaces has been fixed. - - A bug in the &os; IPv6 stack that - prevented an in the &man.ping6.8; - utility from working with - net.inet6.ip6.use_defaultzone=1 has been - fixed. - - The &man.lagg.4; interface now - supports a &man.sysctl.8; variable - net.link.lagg.failover_rx_all. This - controls whether to accept input packets on any link in a - failover lagg. - - The &man.ng.eiface.4; &man.netgraph.4; - node now supports VLAN-compatible MTU and an MTU size which - is larger than 1500. - - The &man.ng.ether.4; &man.netgraph.4; - node now supports interface transfer between multiple virtual - network stacks by &man.ifconfig.8; vnet - command. A &man.ng.ether.4; node associated with a network - interface is now destroyed and recreated when the network - interface is moved to another vnet. - - A new &man.netgraph.4; node - &man.ng.patch.4; has been added. This performs data - modification of packets passing through. Modifications are - restricted to a subset of C language operations on unsigned - integers of 8, 16, 32 or 64-bit size. - - An ICMP unreachable problem in the - &man.pf.4; packet filter subsystem when TSO support is - enabled has been fixed. - - The TCP bandwidth delay product window - limiting algorithm controlled by the &man.sysctl.8; variable - net.inet.tcp.inflight.enable is now - disabled by default. It has been found that this algorithm - is inefficient on a fast network with smaller RTT than 10ms. - It had been enabled by default since 5.2-RELEASE, and then - had been disabled only if the RTT was lesser than 10ms since - 7.0-RELEASE. Pluggable TCP congestion control algorithm - modules are planned to be added for the future - releases. - - A bug in &os; TCP Path MTU discovery - which could lead to a wrong calculation for an MTU smaller - than 256 octets has been fixed. Note that this bug did not - affect MTUs equal to or larger than 256 octets. - - The &os; TCP reassembly - implementation has been improved. A long-standing - accounting bug affecting SMP systems has been fixed and the - net.inet.tcp.reass.maxqlen &man.sysctl.8; - variable has been retired in favor of a per-connection - dynamic limit based on the receive socket buffer size. &os; - receivers now handle packet loss (particularly losses caused - by queue overflows) significantly better than before which - improves connection throughput. - - The TCP initial window increase in RFC - 3390 which can be controlled by a &man.sysctl.8; variable - net.inet.tcp.rfc3390 now reduces the - congestion window to the restart window if a TCP connection - has been idle for one retransmit timeout or more. For more - details, see RFC 5681 Section 4.1. - - The &man.siftr.4;, Statistical - Information For TCP Research (SIFTR) kernel module has been - added. This is a facility that logs a range of statistics - on active TCP connections to a log file. It provides the - ability to make highly granular measurements of TCP - connection state, aimed at system administrators, developers - and researchers. - - &os; virtual network stack (vnet) now - supports IPv4 multicast routing. + Disks and Storage - The &man.ahci.4; driver now disables NCQ - and PMP support on VIA VT8251 because they are unreliable - under load. - - The &man.ahci.4; driver now uses 15 - seconds for device reset timeout instead of 10 seconds - because some devices need 10 - 12 seconds to spin up. - - The &man.arcmsr.4; driver - has been updated to version 1.20.00.19. - - The &man.ada.4; driver now supports a - new &man.sysctl.8; variable - kern.cam.ada.spindown_shutdown which - controls whether or not to spin-down disks when shutting - down if the device supports the functionality. The default - value is 1. - - The &man.ata.4; driver - now supports limiting initial ATA mode for devices via - device hints - hint.devname.unit.devN.mode or - hint.devname.unit.mode. - The valid values are the same as ones supported in the - &man.atacontrol.8; and &man.camcontrol.8; utilities. - - The &man.ata.4; driver now disables - cable status check on both controller and device side - when the loader tunable - hw.ata.ata_dma_check_80pin is - 0. The check on controller side was - performed regardless of this loader tunable. - - The &man.ata.4; driver now reports - SATA power management capabilities to the &man.CAM.4; layer when - is enabled. This allows a device - to initiate transitions if controller configured to accept - it. This makes - hint.ata.N.pm_level=1 - mode work. - - The &man.ata.4; driver has been - improved on hotplugging and connection speed reporting - support for some Intel SATA controllers including ICH5 and - ICH8+ operating in legacy mode. - - An issue of device detection of - Serverworks K2 SATA controllers in the &man.ata.4; has been fixed. - - A bug in the &man.ata.4; driver that - prevented some Silicon Image chipsets from working on big - endian systems has been fixed. - - The &man.gconcat.8; GEOM class now - supports kernel crash dump. The dumping is performed to the - component where a dump partition begins. - - A bug in the &man.geli.8; GEOM class - on little endian platforms has been fixed. The metadata - version for newly created providers has been updated to - 4 due to this. Providers with the older - versions are fully interoperable with 8.2-RELEASE and later - by being treated as ones with the native byte order flag - automatically. - - The &man.geli.8; GEOM class now - supports a &man.sysctl.8; variable - kern.geom.eli.overwrites. This specifies - the number of times on-disk keys should be overwritten when - destroying them. The default value is - 5. - - The &man.geli.8; GEOM class has been - improved for preventing the same encryption key from being - used in 2^20 blocks (sectors). - - The &man.geli.8; GEOM class now uses - XTS-AES mode by default. - - A &man.sysctl.8; variable - kern.geom.eli.debug now allows a value - -1. This means turn off any log messages - of the &man.geli.8; GEOM class. - - The &man.mpt.4; driver now supports - larger I/O sizes which the device and &man.CAM.4; subsystem - can support. This was limited to 64KB, and the number of - scatter/gather segments was limited to 33 on platforms with - 4K pages. - - The &man.twa.4; - driver has been updated. The version number is - 3.80.06.003. + File Systems - The &man.linprocfs.5; Linux process - file system now supports - proc/$$/environment. - - The &os; NFS client now supports a - kernel environment variable - boot.nfsroot.nfshandlelen. This lets the - diskless root file system on boot to use NFS version 3 and - the specified file handle length. If this variable is not - set, NFS version 2 is used. - - The ZFS on-disk format has been updated - to version 15. - - The ZFS metaslab code has been updated. - This provides a noticeable improvement on write speed, - especially on pools with less than 30% of free space. The - related OpenSolaris Bug IDs are 6826241, 6869229, 6918420, - and 6917066. - - The ZFS now supports offlining of log - devices. The related OpenSolaris Bug IDs are 6599442, - 6726045, and 6803605. - - Performance improvements for the ZFS - have been imported from OpenSolaris. They include caching of - ACL permission checks, faster handling of &man.stat.2;, - mitigation of mutex lock contention. The related - OpenSolaris Bug IDs are 6802734, 6844861, 6848431, 6775100, - 6827779, 6857433, 6860318, 6865875, 6867395, 6868276, and - 6870564. - - The default value of - vfs.zfs.vdev.max_pending has been - decreased from 35 to 10 (OpenSolaris Bug ID is 6891731) to - improve latency. - - Various bugs in the ZFS subsystem have been fixed. The - related OpenSolaris Bug IDs are: 6328632, 6396518, 6501037, - 6504953, 6542860, 6551866, 6572357, 6572376, 6582163, - 6586537, 6595194, 6596237, 6604992, 6621164, 6623978, - 6633095, 6635482, 6664765, 6674216, 6696242, 6696858, - 6702206, 6710376, 6713916, 6717022, 6722540, 6722991, - 6737463, 6739487, 6739553, 6740164, 6745863, 6747596, - 6747698, 6748436, 6755435, 6757430, 6758107, 6759986, - 6759999, 6761100, 6761406, 6764124, 6765294, 6767129, - 6769612, 6770866, 6774713, 6774886, 6775697, 6776104, - 6776548, 6780491, 6784104, 6784108, 6785914, 6788152, - 6788830, 6789318, 6790064, 6790345, 6790687, 6791064, - 6791066, 6791071, 6791101, 6792134, 6792139, 6792884, - 6793430, 6794136, 6794570, 6794830, 6797109, 6797118, - 6798384, 6798878, 6799895, 6800184, 6800942, 6801507, - 6801810, 6803343, 6803822, 6804954, 6807339, 6807765, - 6809340, 6809683, 6809691, 6810367, 6815592, 6815893, - 6816124, 6818183, 6821169, 6821170, 6822816, 6824006, - 6824062, 6824968, 6826466, 6826468, 6826469, 6826470, - 6826471, 6826472, 6827260, 6830237, 6830541, 6833162, - 6833711, 6833999, 6834217, 6836714, 6836768, 6838062, - 6838344, 6841321, 6843014, 6843069, 6843235, 6844069, - 6844900, 6847229, 6848242, 6856634, 6857012, 6861983, - 6862984, 6863610, 6870564, 6880764, 6882227, 6892298, - 6898245, 6906110, 6906946, 6939941, 6950219, 6951024, and - 6953403. + Userland Changes - The &man.arp.8; utility has been improved. - It now runs faster even when a single interface has a number - of aliases. - - A bug in the &man.b64decode.1; utility that - prevented an option from handling arbitrary - breaks in a base64 encoded string has been fixed. - - The &man.calendar.1; utility now supports - repeating events which span multiple years, lunar events, and - solar events. - - The &man.dhclient.8; utility now reports a - reason for exiting and the 10-second period in which the - &man.dhclient.8; ignores routing messages has been changed to - start just after dhclient-script starts - instead of just after it finished. This change fixes a - symptom that &man.dhclient.8; silently exits under a certain - condition. - - Userland support for the &man.dtrace.1; - subsystem has been added. This allows inspection of userland - software itself and its correlation with the kernel, thus - allowing a much better picture of what exactly is going on - behind the scenes. The &man.dtruss.1; utility has been added - and the libproc library has been updated - to support the facility. - - The &man.du.1; utility now supports a - - option to display entries that exceeds the value of - threshold. If the value is - negative, it displays entries with a value less than the - absolute value of threshold. - - The &man.fdisk.8; utility now supports - partitions which are provided by &man.gjournal.8; or - &man.geli.8; GEOM classes. - - The &man.gcore.1; utility now supports an - flag which forces a full dump of all the - segments except for the malformed ones. - - The &man.geli.8; utility now supports - resize subcommand to resize encrypted file - systems after growing it. - - The &man.geli.8; utility now supports - suspend and resume - subcommands. The suspend subcommand makes - &man.geli.8; devices wait for all in-flight I/O requests, - suspend new I/O requests, remove all &man.geli.8; sensitive - data from the kernel memory (like encryption keys) and will - wait for either geli resume or - geli detach command. For more - information, see &man.geli.8; manual page. - - The &man.geli.8; utility now checks the - metadata provider size strictly. If the check fails, the - provider is not attached. A new option - can override this behavior. - - The &man.geli.8; utility now supports - and - - options for loading passphrase from a file. - - The gethost*(), - getnet*(), and - getproto*() functions now set the errno - to ERANGE and the NSS backend terminates - with NS_RETURN when the result buffer size - is too small. - - The &man.gpart.8; utility now supports a - resize command to resize partitions for all - schemes but EBR. - - The &man.gpart.8; utility now supports - backup and restore - subcommands to backup partition tables and restore - them. - - The &man.gpart.8; utility now handles - given geom/provider names with and without - /dev/ prefix. - - The &man.gpart.8; utility now supports - an option for the - destroy subcommand. This option forces - destroying of the partition table even if it is not - empty. - - The &man.gpart.8; utility now supports a - recover subcommand for GPT partition - tables. A corrupted GPT is now marked when the following - three types of corruption: - - - - Primary GPT header or table is corrupted. - - - - Secondary GPT header or table is corrupted. - - - - Secondary GPT header is not located at the last LBA. - - - - Changes to the corrupted GPT table are not allowed except - for destroy and recover - subcommands. - - The &man.gpart.8; utility now supports - GPT_ENT_ATTR_BOOTME, - GPT_ENT_ATTR_BOOTONCE, and - GPT_ENT_ATTR_BOOTFAILED attributes in GPT. - The attribute keywords in the command line are - bootme, bootonce, and - bootfailed respectively. - - An issue in the &man.newfs.8; utility - has been fixed. A UFS1 file system created with 64KB - blocksize was incorrectly recognized as one with a broken - superblock. This is because the &os; kernel checks a - partition first for a UFS2 superblock at 64KB offset while it - is possible that a UFS1 file systems with 64KB blocksize has - an alternative superblock at the same location. For example, - a file system created by newfs -U -O 1 -b 65536 -f - 8192 could lead to this symptom. - - The &man.hastd.8; utility now supports - SIGHUP for reloading the configuration - file. When SIGTERM or - SIGINT is received, the worker processes - terminate. - - The &man.ifconfig.8; utility now check an - invalid CIDR subnet notation more strictly. It wrongly - accepted 10.0.0.1/10.0.0.1 as - 10.0.0.1/10. - - An accuracy issue in the &man.jn.3; and - &man.jnf.3; functions in libm has been - fixed. - - Incorrect behaviors in stuttering - sequences and reverse ranges in the &man.jot.1; utility have - been fixed. - - The libarchive - library and &man.tar.1; utility now support LZMA - (Lempel-Ziv-Markov chain-Algorithm) compression format. - - The &man.tar.1; utility now supports a - blocksize which is up to 8192 (4MB) in the - - option. - - A bug in the &man.lpr.1; utility that - prevented it from working with some files on a ZFS file system - has been fixed. - - The option in the - &man.mount.8; utility now displays the rw - mount option correctly as in the &man.fstab.5; format. - - The &man.ncal.1; utility has been - updated. The option has been replaced - with and . Options - to show previous, current and next month, and - to show - months after current month have been added. The option - now prints only the - month, not the whole year. - - The &man.newsyslog.8; utility now supports - an - option to override the default &man.syslogd.8; PID - file. - - The &man.newsyslog.8; utility now - supports a special log file name - <include> for processing file - inclusion. Globbing in the file name and circular dependency - detection are supported. For more details, see - the &man.newsyslog.conf.5; manual page. - - The &man.ntpd.8; utility is now compiled - with shared memory reference clock driver. For example, GPS - devices can be used as source of precise time via astro/gpsd in the Ports *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 21:05:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D316C1065674; Wed, 7 Mar 2012 21:05:34 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from adsum.doit.wisc.edu (adsum.doit.wisc.edu [144.92.197.210]) by mx1.freebsd.org (Postfix) with ESMTP id A2E258FC16; Wed, 7 Mar 2012 21:05:34 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from avs-daemon.smtpauth1.wiscmail.wisc.edu by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0M0J0040M99AXL00@smtpauth1.wiscmail.wisc.edu>; Wed, 07 Mar 2012 15:05:34 -0600 (CST) Received: from anacreon.physics.wisc.edu (anacreon.physics.wisc.edu [128.104.160.176]) by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0M0J0046X998JY00@smtpauth1.wiscmail.wisc.edu>; Wed, 07 Mar 2012 15:05:32 -0600 (CST) Date: Wed, 07 Mar 2012 15:05:31 -0600 From: Nathan Whitehorn In-reply-to: To: Sergey Kandaurov Message-id: <4F57CD9B.5010600@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=128.104.160.176 X-Spam-PmxInfo: Server=avs-15, Version=5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.3.7.205414, SenderIP=128.104.160.176 References: <201203072046.q27KkxFr009846@svn.freebsd.org> <4F57C9C8.80907@freebsd.org> User-Agent: Mozilla/5.0 (X11; U; FreeBSD powerpc; en-US; rv:1.9.2.25) Gecko/20120130 Thunderbird/3.1.17 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232671 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 21:05:34 -0000 On 03/07/12 14:53, Sergey Kandaurov wrote: > On 8 March 2012 00:49, Nathan Whitehorn wrote: >> On 03/07/12 14:46, Sergey Kandaurov wrote: >>> Author: pluknet >>> Date: Wed Mar 7 20:46:59 2012 >>> New Revision: 232671 >>> URL: http://svn.freebsd.org/changeset/base/232671 >>> >>> Log: >>> Add lib32 part for libutil after its version bump to 9. >>> >>> PR: misc/165523 >>> Submitted by: Andrey Zonov >>> MFC after: 1 week >>> >>> Modified: >>> head/ObsoleteFiles.inc >>> >>> Modified: head/ObsoleteFiles.inc >>> >>> ============================================================================== >>> --- head/ObsoleteFiles.inc Wed Mar 7 18:57:09 2012 (r232670) >>> +++ head/ObsoleteFiles.inc Wed Mar 7 20:46:59 2012 (r232671) >>> @@ -417,6 +417,9 @@ OLD_FILES+=usr/share/man/man5/lastlog.5. >>> OLD_FILES+=usr/share/man/man5/utmp.5.gz >>> OLD_FILES+=usr/share/man/man5/wtmp.5.gz >>> OLD_LIBS+=lib/libutil.so.8 >>> +.if ${TARGET_ARCH} == "amd64" >>> +OLB_LIBS+=usr/lib32/libutil.so.8 >>> +.endif >>> # 20100105: new userland semaphore implementation >>> OLD_FILES+=usr/include/sys/semaphore.h >>> # 20100103: ntptrace(8) removed >> >> This should also check for powerpc64. Or, better, do it unconditionally, >> since it will only remove files that actually exist and there's no harm >> trying to remove /usr/lib32/blah on 32-bit systems. >> -Nathan > Ok. so there are two way to go. > - add .if for powerpc64 (btw, does this arch exist in RELENG_8?) powerpc64 is new in RELENG_9. > - remove all lib32 related conditions throughout the file. > > The latter looks easier to maintain. I think that's a better way to go, especially with the addition of COMPAT_FREEBSD32 on mips. -Nathan From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 21:18:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A4DB106564A; Wed, 7 Mar 2012 21:18:06 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 621D38FC08; Wed, 7 Mar 2012 21:18:05 +0000 (UTC) Received: by lagv3 with SMTP id v3so10945416lag.13 for ; Wed, 07 Mar 2012 13:18:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=4WZ5gw7M2rhRuqNJRXeMeuQ42xNIev5p5FN2dt5Lx8U=; b=ODhRQzECBqt/2Pb/9ELnwksemdCaSu6M2iHxHruZr1aclJxP2IAH5nbOqSL7klK/XL 1xlEEqfEc/I0yY+PwdqOyCPKIc/YrxSAgGQPUd6SXQ9s4SxkiUyaXaGbs0HhYkrAyIp/ 6OKiGO5/Lu+E/jmubkReqJ9bZhoMHZE4Ule8yL2Lijt6vmMrsnYSfkuye0enk9dVivv7 J61uxVHzU7OsWc3dGpXCbAdOQOJj5LG1qTjc2vFYQGR4ophJernZ3E2POvTCxwH6za8B dR63aV6WwUZ5ZX8hlyBtICQRWTsRCDhWOA9m6yrG9TpT05CTJQ8bAmZ98D77YEZtCbUx KXlQ== MIME-Version: 1.0 Received: by 10.112.99.231 with SMTP id et7mr1253412lbb.57.1331155084215; Wed, 07 Mar 2012 13:18:04 -0800 (PST) Sender: pluknet@gmail.com Received: by 10.152.21.73 with HTTP; Wed, 7 Mar 2012 13:18:04 -0800 (PST) In-Reply-To: <4F57CD9B.5010600@freebsd.org> References: <201203072046.q27KkxFr009846@svn.freebsd.org> <4F57C9C8.80907@freebsd.org> <4F57CD9B.5010600@freebsd.org> Date: Thu, 8 Mar 2012 00:18:04 +0300 X-Google-Sender-Auth: deIS5awmPeBAqWyv_OSRRdFhObo Message-ID: From: Sergey Kandaurov To: Nathan Whitehorn Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232671 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 21:18:06 -0000 On 8 March 2012 01:05, Nathan Whitehorn wrote: > On 03/07/12 14:53, Sergey Kandaurov wrote: >> >> On 8 March 2012 00:49, Nathan Whitehorn =A0wrote= : >>> >>> On 03/07/12 14:46, Sergey Kandaurov wrote: >>>> >>>> Author: pluknet >>>> Date: Wed Mar =A07 20:46:59 2012 >>>> New Revision: 232671 >>>> URL: http://svn.freebsd.org/changeset/base/232671 >>>> >>>> Log: >>>> =A0 Add lib32 part for libutil after its version bump to 9. >>>> >>>> =A0 PR: =A0 =A0 =A0 =A0 =A0misc/165523 >>>> =A0 Submitted by: =A0 =A0 =A0 =A0Andrey Zonov >>>> =A0 MFC after: =A0 1 week >>>> >>>> Modified: >>>> =A0 head/ObsoleteFiles.inc >>>> >>>> Modified: head/ObsoleteFiles.inc >>>> >>>> >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>> --- head/ObsoleteFiles.inc =A0 =A0 =A0Wed Mar =A07 18:57:09 2012 >>>> =A0(r232670) >>>> +++ head/ObsoleteFiles.inc =A0 =A0 =A0Wed Mar =A07 20:46:59 2012 >>>> =A0(r232671) >>>> @@ -417,6 +417,9 @@ OLD_FILES+=3Dusr/share/man/man5/lastlog.5. >>>> =A0OLD_FILES+=3Dusr/share/man/man5/utmp.5.gz >>>> =A0OLD_FILES+=3Dusr/share/man/man5/wtmp.5.gz >>>> =A0OLD_LIBS+=3Dlib/libutil.so.8 >>>> +.if ${TARGET_ARCH} =3D=3D "amd64" >>>> +OLB_LIBS+=3Dusr/lib32/libutil.so.8 >>>> +.endif >>>> =A0# 20100105: new userland semaphore implementation >>>> =A0OLD_FILES+=3Dusr/include/sys/semaphore.h >>>> =A0# 20100103: ntptrace(8) removed >>> >>> >>> This should also check for powerpc64. Or, better, do it unconditionally= , >>> since it will only remove files that actually exist and there's no harm >>> trying to remove /usr/lib32/blah on 32-bit systems. >>> -Nathan >> >> Ok. so there are two way to go. >> - add .if for powerpc64 (btw, does this arch exist in RELENG_8?) > > > powerpc64 is new in RELENG_9. > > >> - remove all lib32 related conditions throughout the file. >> >> The latter looks easier to maintain. > > > I think that's a better way to go, especially with the addition of > COMPAT_FREEBSD32 on mips. > -Nathan Does this patch look good for you? Index: ObsoleteFiles.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- ObsoleteFiles.inc (revision 232672) +++ ObsoleteFiles.inc (working copy) @@ -56,9 +56,7 @@ usr/share/man/man3/archive_write_set_compression_none.3.gz \ usr/share/man/man3/archive_write_set_compression_program.3.gz OLD_LIBS+=3Dusr/lib/libarchive.so.5 -.if ${TARGET_ARCH} =3D=3D "amd64" || ${TARGET_ARCH} =3D=3D "powerpc64" OLD_LIBS+=3Dusr/lib32/libarchive.so.5 -.endif # 20120113: removal of wtmpcvt(1) OLD_FILES+=3Dusr/bin/wtmpcvt OLD_FILES+=3Dusr/share/man/man1/wtmpcvt.1.gz @@ -71,12 +69,10 @@ OLD_FILES+=3Dusr/lib/libodialog.so OLD_LIBS+=3Dusr/lib/libodialog.so.7 OLD_FILES+=3Dusr/lib/libodialog_p.a -.if ${TARGET_ARCH} =3D=3D "amd64" || ${TARGET_ARCH} =3D=3D "powerpc64" OLD_FILES+=3Dusr/lib32/libodialog.a OLD_FILES+=3Dusr/lib32/libodialog.so OLD_LIBS+=3Dusr/lib32/libodialog.so.7 OLD_FILES+=3Dusr/lib32/libodialog_p.a -.endif # 20110930: sysinstall removed OLD_FILES+=3Dusr/sbin/sysinstall OLD_FILES+=3Dusr/share/man/man8/sysinstall.8.gz @@ -84,12 +80,10 @@ OLD_FILES+=3Dusr/lib/libftpio.so OLD_LIBS+=3Dusr/lib/libftpio.so.8 OLD_FILES+=3Dusr/lib/libftpio_p.a -.if ${TARGET_ARCH} =3D=3D "amd64" || ${TARGET_ARCH} =3D=3D "powerpc64" OLD_FILES+=3Dusr/lib32/libftpio.a OLD_FILES+=3Dusr/lib32/libftpio.so OLD_LIBS+=3Dusr/lib32/libftpio.so.8 OLD_FILES+=3Dusr/lib32/libftpio_p.a -.endif OLD_FILES+=3Dusr/include/ftpio.h OLD_FILES+=3Dusr/share/man/man3/ftpio.3.gz # 20110915: rename congestion control manpages @@ -108,7 +102,6 @@ OLD_LIBS+=3Dusr/lib/libopie.so.6 OLD_LIBS+=3Dusr/lib/librtld_db.so.1 OLD_LIBS+=3Dusr/lib/libtacplus.so.4 -.if ${TARGET_ARCH} =3D=3D "amd64" || ${TARGET_ARCH} =3D=3D "powerpc64" OLD_LIBS+=3Dusr/lib32/libcam.so.5 OLD_LIBS+=3Dusr/lib32/libpcap.so.7 OLD_LIBS+=3Dusr/lib32/libufs.so.5 @@ -117,7 +110,6 @@ OLD_LIBS+=3Dusr/lib32/libopie.so.6 OLD_LIBS+=3Dusr/lib32/librtld_db.so.1 OLD_LIBS+=3Dusr/lib32/libtacplus.so.4 -.endif # 20110817: no more acd.4, ad.4, afd.4 and ast.4 OLD_FILES+=3Dusr/share/man/man4/acd.4.gz OLD_FILES+=3Dusr/share/man/man4/ad.4.gz @@ -157,17 +149,13 @@ OLD_FILES+=3Dusr/lib/libpkg.so OLD_LIBS+=3Dusr/lib/libpkg.so.0 OLD_FILES+=3Dusr/lib/libpkg_p.a -.if ${TARGET_ARCH} =3D=3D "amd64" || ${TARGET_ARCH} =3D=3D "powerpc64" OLD_FILES+=3Dusr/lib32/libpkg.a OLD_FILES+=3Dusr/lib32/libpkg.so OLD_LIBS+=3Dusr/lib32/libpkg.so.0 OLD_FILES+=3Dusr/lib32/libpkg_p.a -.endif # 20110517: libsbuf version bump OLD_LIBS+=3Dlib/libsbuf.so.5 -.if ${TARGET_ARCH} =3D=3D "amd64" || ${TARGET_ARCH} =3D=3D "powerpc64" OLD_LIBS+=3Dusr/lib32/libsbuf.so.5 -.endif # 20110502: new clang import which bumps version from 2.9 to 3.0 OLD_FILES+=3Dusr/include/clang/2.9/emmintrin.h OLD_FILES+=3Dusr/include/clang/2.9/mm_malloc.h @@ -196,12 +184,10 @@ OLD_FILES+=3Dusr/libexec/cc1obj OLD_LIBS+=3Dusr/lib/libobjc.so.4 OLD_DIRS+=3Dusr/include/objc -.if ${TARGET_ARCH} =3D=3D "amd64" || ${TARGET_ARCH} =3D=3D "powerpc64" OLD_FILES+=3Dusr/lib32/libobjc.a OLD_FILES+=3Dusr/lib32/libobjc.so OLD_FILES+=3Dusr/lib32/libobjc_p.a OLD_LIBS+=3Dusr/lib32/libobjc.so.4 -.endif # 20110331: firmware.img created at build time OLD_FILES+=3Dusr/share/examples/kld/firmware/fwimage/firmware.img # 20110224: sticky.8 -> sticky.7 @@ -323,9 +309,7 @@ .endif # 20100514: library version bump for versioned symbols for liblzma OLD_LIBS+=3Dusr/lib/liblzma.so.0 -.if ${TARGET_ARCH} =3D=3D "amd64" || ${TARGET_ARCH} =3D=3D "powerpc64" OLD_LIBS+=3Dusr/lib32/liblzma.so.0 -.endif # 20100511: move GCC-specific headers to /usr/include/gcc .if ${TARGET_ARCH} =3D=3D "amd64" || ${TARGET_ARCH} =3D=3D "i386" OLD_FILES+=3Dusr/include/emmintrin.h @@ -366,9 +350,7 @@ OLD_FILES+=3Dusr/share/man/man1/gcpio.1.gz # 20100322: libz update OLD_LIBS+=3Dlib/libz.so.5 -.if ${TARGET_ARCH} =3D=3D "amd64" OLD_LIBS+=3Dusr/lib32/libz.so.5 -.endif # 20100314: removal of regexp.h OLD_FILES+=3Dusr/include/regexp.h OLD_FILES+=3Dusr/share/man/man3/regexp.3.gz @@ -417,9 +399,7 @@ OLD_FILES+=3Dusr/share/man/man5/utmp.5.gz OLD_FILES+=3Dusr/share/man/man5/wtmp.5.gz OLD_LIBS+=3Dlib/libutil.so.8 -.if ${TARGET_ARCH} =3D=3D "amd64" OLB_LIBS+=3Dusr/lib32/libutil.so.8 -.endif # 20100105: new userland semaphore implementation OLD_FILES+=3Dusr/include/sys/semaphore.h # 20100103: ntptrace(8) removed @@ -627,7 +607,6 @@ OLD_LIBS+=3Dusr/lib/snmp_mibII.so.5 OLD_LIBS+=3Dusr/lib/snmp_netgraph.so.5 OLD_LIBS+=3Dusr/lib/snmp_pf.so.5 -.if ${TARGET_ARCH} =3D=3D "amd64" OLD_LIBS+=3Dusr/lib32/libalias.so.6 OLD_LIBS+=3Dusr/lib32/libarchive.so.4 OLD_LIBS+=3Dusr/lib32/libauditd.so.4 @@ -728,7 +707,6 @@ OLD_LIBS+=3Dusr/lib32/pam_ssh.so.4 OLD_LIBS+=3Dusr/lib32/pam_tacplus.so.4 OLD_LIBS+=3Dusr/lib32/pam_unix.so.4 -.endif # 20090718: the gdm pam.d file is no longer required. OLD_FILES+=3Detc/pam.d/gdm # 20090714: net_add_domain(9) renamed to domain_add(9) @@ -915,9 +893,7 @@ OLD_FILES+=3Dusr/share/man/man8/slstat.8.gz # 20090321: libpcap upgraded to 1.0.0 OLD_LIBS+=3Dlib/libpcap.so.5 -.if ${TARGET_ARCH} =3D=3D "amd64" OLD_LIBS+=3Dusr/lib32/libpcap.so.5 -.endif # 20090319: uscanner(4) has been removed OLD_FILES+=3Dusr/share/man/man4/uscanner.4.gz # 20090313: k8temp(4) renamed to amdtemp(4) @@ -929,17 +905,13 @@ OLD_FILES+=3Dusr/lib/libusb20_p.a OLD_FILES+=3Dusr/include/libusb20_compat01.h OLD_FILES+=3Dusr/include/libusb20_compat10.h -.if ${TARGET_ARCH} =3D=3D "amd64" OLD_LIBS+=3Dusr/lib32/libusb20.so.1 OLD_FILES+=3Dusr/lib32/libusb20.a OLD_FILES+=3Dusr/lib32/libusb20.so OLD_FILES+=3Dusr/lib32/libusb20_p.a -.endif # 20090226: libmp(3) functions renamed OLD_LIBS+=3Dusr/lib/libmp.so.6 -.if ${TARGET_ARCH} =3D=3D "amd64" OLD_LIBS+=3Dusr/lib32/libmp.so.6 -.endif # 20090223: changeover of USB stacks OLD_FILES+=3Dusr/include/dev/usb2/include/ufm2_ioctl.h OLD_FILES+=3Dusr/include/dev/usb2/include/urio2_ioctl.h @@ -1242,9 +1214,7 @@ OLD_LIBS+=3Dusr/lib/libkafs5.so.9 OLD_LIBS+=3Dusr/lib/libkrb5.so.9 OLD_LIBS+=3Dusr/lib/libroken.so.9 -.if ${TARGET_ARCH} =3D=3D "amd64" OLD_LIBS+=3Dusr/lib32/libgssapi.so.9 -.endif # 20080420: Symbol card support dropped OLD_FILES+=3Dusr/include/dev/wi/spectrum24t_cf.h # 20080420: awi removal @@ -1271,10 +1241,8 @@ OLD_FILES+=3Dusr/share/man/man2/kse_switchin.2.gz OLD_FILES+=3Dusr/share/man/man2/kse_thr_interrupt.2.gz OLD_FILES+=3Dusr/share/man/man2/kse_wakeup.2.gz -.if ${TARGET_ARCH} =3D=3D "amd64" OLD_FILES+=3Dusr/lib32/libkse.so OLD_LIBS+=3Dusr/lib32/libkse.so.3 -.endif # 20080220: geom_lvm rename to geom_linux_lvm OLD_FILES+=3Dusr/share/man/man4/geom_lvm.4.gz # 20080126: oldcard.4 removal @@ -1294,11 +1262,9 @@ OLD_FILES+=3Dusr/lib/libkse.a OLD_FILES+=3Dusr/lib/libkse_p.a OLD_FILES+=3Dusr/lib/libkse_pic.a -.if ${TARGET_ARCH} =3D=3D "amd64" OLD_FILES+=3Dusr/lib32/libkse.a OLD_FILES+=3Dusr/lib32/libkse_p.a OLD_FILES+=3Dusr/lib32/libkse_pic.a -.endif # 20071129: Removed a Solaris compatibility header OLD_FILES+=3Dusr/include/sys/_elf_solaris.h # 20071125: Renamed to pmc_get_msr() @@ -1398,12 +1364,10 @@ OLD_DIRS+=3Dusr/include/netatm/uni OLD_DIRS+=3Dusr/include/netatm OLD_DIRS+=3Dusr/share/examples/atm -.if ${TARGET_ARCH} =3D=3D "amd64" OLD_FILES+=3Dusr/lib32/libatm.a OLD_FILES+=3Dusr/lib32/libatm.so OLD_LIBS+=3Dusr/lib32/libatm.so.5 OLD_FILES+=3Dusr/lib32/libatm_p.a -.endif # 20070705: I4B headers repo-copied to include/i4b/ .if ${TARGET_ARCH} =3D=3D "i386" OLD_FILES+=3Dusr/include/machine/i4b_cause.h @@ -1488,7 +1452,6 @@ OLD_LIBS+=3Dusr/lib/snmp_mibII.so.4 OLD_LIBS+=3Dusr/lib/snmp_netgraph.so.4 OLD_LIBS+=3Dusr/lib/snmp_pf.so.4 -.if ${TARGET_ARCH} =3D=3D "amd64" OLD_LIBS+=3Dusr/lib32/libalias.so.5 OLD_LIBS+=3Dusr/lib32/libbsnmp.so.3 OLD_LIBS+=3Dusr/lib32/libdialog.so.5 @@ -1523,7 +1486,6 @@ OLD_LIBS+=3Dusr/lib32/pam_ssh.so.3 OLD_LIBS+=3Dusr/lib32/pam_tacplus.so.3 OLD_LIBS+=3Dusr/lib32/pam_unix.so.3 -.endif # 20070613: IPX over IP tunnel removal OLD_FILES+=3Dusr/include/netipx/ipx_ip.h # 20070605: sched_core removal @@ -1593,7 +1555,6 @@ OLD_LIBS+=3Dusr/lib/libypclnt.so.2 OLD_LIBS+=3Dusr/lib/snmp_bridge.so.3 OLD_LIBS+=3Dusr/lib/snmp_hostres.so.3 -.if ${TARGET_ARCH} =3D=3D "amd64" OLD_LIBS+=3Dusr/lib32/libatm.so.4 OLD_LIBS+=3Dusr/lib32/libbegemot.so.2 OLD_LIBS+=3Dusr/lib32/libbluetooth.so.2 @@ -1652,7 +1613,6 @@ OLD_LIBS+=3Dusr/lib32/libwrap.so.4 OLD_LIBS+=3Dusr/lib32/libypclnt.so.2 OLD_LIBS+=3Dusr/lib32/libz.so.3 -.endif # 20070519: GCC 4.2 OLD_FILES+=3Dusr/bin/f77 OLD_FILES+=3Dusr/bin/protoize @@ -1899,9 +1859,7 @@ OLD_FILES+=3Dusr/share/info/bzip2.info.gz # 20070303: libarchive 2.0 OLD_LIBS+=3Dusr/lib/libarchive.so.3 -.if ${TARGET_ARCH} =3D=3D "amd64" OLD_LIBS+=3Dusr/lib32/libarchive.so.3 -.endif # 20070301: remove addr2ascii and ascii2addr OLD_FILES+=3Dusr/share/man/man3/addr2ascii.3.gz OLD_FILES+=3Dusr/share/man/man3/ascii2addr.3.gz @@ -1918,14 +1876,12 @@ OLD_FILES+=3Dusr/lib/libmytinfow.a OLD_FILES+=3Dusr/lib/libmytinfow.so OLD_FILES+=3Dusr/lib/libmytinfow_p.a -.if ${TARGET_ARCH} =3D=3D "amd64" OLD_FILES+=3Dusr/lib32/libmytinfo.a OLD_FILES+=3Dusr/lib32/libmytinfo.so OLD_FILES+=3Dusr/lib32/libmytinfo_p.a OLD_FILES+=3Dusr/lib32/libmytinfow.a OLD_FILES+=3Dusr/lib32/libmytinfow.so OLD_FILES+=3Dusr/lib32/libmytinfow_p.a -.endif # 20070128: remove vnconfig OLD_FILES+=3Dusr/sbin/vnconfig # 20070127: remove bpf_compat.h @@ -5269,40 +5225,32 @@ OLD_LIBS+=3Dusr/lib/libkafs5.so.8 OLD_LIBS+=3Dusr/lib/libkrb5.so.8 OLD_LIBS+=3Dusr/lib/libobjc.so.2 -.if ${TARGET_ARCH} =3D=3D "amd64" OLD_LIBS+=3Dusr/lib32/libgssapi.so.8 OLD_LIBS+=3Dusr/lib32/libobjc.so.2 -.endif # 20070519: GCC 4.2 OLD_LIBS+=3Dusr/lib/libg2c.a OLD_LIBS+=3Dusr/lib/libg2c.so OLD_LIBS+=3Dusr/lib/libg2c.so.2 OLD_LIBS+=3Dusr/lib/libg2c_p.a OLD_LIBS+=3Dusr/lib/libgcc_pic.a -.if ${TARGET_ARCH} =3D=3D "amd64" OLD_LIBS+=3Dusr/lib32/libg2c.a OLD_LIBS+=3Dusr/lib32/libg2c.so OLD_LIBS+=3Dusr/lib32/libg2c.so.2 OLD_LIBS+=3Dusr/lib32/libg2c_p.a OLD_LIBS+=3Dusr/lib32/libgcc_pic.a -.endif # 20060729: OpenSSL 0.9.7e -> 0.9.8b upgrade OLD_LIBS+=3Dlib/libcrypto.so.4 OLD_LIBS+=3Dusr/lib/libssl.so.4 -.if ${TARGET_ARCH} =3D=3D "amd64" OLD_LIBS+=3Dusr/lib32/libcrypto.so.4 OLD_LIBS+=3Dusr/lib32/libssl.so.4 -.endif # 20060521: gethostbyaddr(3) ABI change OLD_LIBS+=3Dusr/lib/libroken.so.8 OLD_LIBS+=3Dlib/libatm.so.3 OLD_LIBS+=3Dlib/libc.so.6 OLD_LIBS+=3Dlib/libutil.so.5 -.if ${TARGET_ARCH} =3D=3D "amd64" OLD_LIBS+=3Dusr/lib32/libatm.so.3 OLD_LIBS+=3Dusr/lib32/libc.so.6 OLD_LIBS+=3Dusr/lib32/libutil.so.5 -.endif # 20060413: shared library moved to /usr/lib OLD_LIBS+=3Dlib/libgpib.so.1 # 20060413: libpcap.so.4 moved to /lib/ @@ -5316,12 +5264,10 @@ OLD_LIBS+=3Dusr/lib/libc_r.so OLD_LIBS+=3Dusr/lib/libc_r.so.7 OLD_LIBS+=3Dusr/lib/libc_r_p.a -.if ${TARGET_ARCH} =3D=3D "amd64" OLD_LIBS+=3Dusr/lib32/libc_r.a OLD_LIBS+=3Dusr/lib32/libc_r.so OLD_LIBS+=3Dusr/lib32/libc_r.so.7 OLD_LIBS+=3Dusr/lib32/libc_r_p.a -.endif # 20050722: bump for 6.0-RELEASE OLD_LIBS+=3Dlib/libalias.so.4 OLD_LIBS+=3Dlib/libatm.so.2 @@ -5533,10 +5479,8 @@ OLD_LIBS+=3Dusr/lib/libarchive.so.2 OLD_LIBS+=3Dusr/lib/libbsnmp.so.1 OLD_LIBS+=3Dusr/lib/libc_r.so.6 -.if ${TARGET_ARCH} =3D=3D "amd64" OLD_LIBS+=3Dusr/lib32/libarchive.so.2 OLD_LIBS+=3Dusr/lib32/libc_r.so.6 -.endif OLD_LIBS+=3Dusr/lib/libcipher.so.2 OLD_LIBS+=3Dusr/lib/libgssapi.so.6 OLD_LIBS+=3Dusr/lib/libkse.so.1 --=20 wbr, pluknet From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 21:27:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21FCC10656DB; Wed, 7 Mar 2012 21:27:54 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from adsum.doit.wisc.edu (adsum.doit.wisc.edu [144.92.197.210]) by mx1.freebsd.org (Postfix) with ESMTP id E40B58FC13; Wed, 7 Mar 2012 21:27:53 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from avs-daemon.smtpauth1.wiscmail.wisc.edu by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0M0J0080EAAH3V00@smtpauth1.wiscmail.wisc.edu>; Wed, 07 Mar 2012 15:27:53 -0600 (CST) Received: from anacreon.physics.wisc.edu (anacreon.physics.wisc.edu [128.104.160.176]) by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0M0J0035BAAB4E10@smtpauth1.wiscmail.wisc.edu>; Wed, 07 Mar 2012 15:27:47 -0600 (CST) Date: Wed, 07 Mar 2012 15:27:47 -0600 From: Nathan Whitehorn In-reply-to: To: Sergey Kandaurov Message-id: <4F57D2D3.60409@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=128.104.160.176 X-Spam-PmxInfo: Server=avs-14, Version=5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.3.7.211521, SenderIP=128.104.160.176 References: <201203072046.q27KkxFr009846@svn.freebsd.org> <4F57C9C8.80907@freebsd.org> <4F57CD9B.5010600@freebsd.org> User-Agent: Mozilla/5.0 (X11; U; FreeBSD powerpc; en-US; rv:1.9.2.25) Gecko/20120130 Thunderbird/3.1.17 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232671 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 21:27:54 -0000 On 03/07/12 15:18, Sergey Kandaurov wrote: > On 8 March 2012 01:05, Nathan Whitehorn wrote: >> On 03/07/12 14:53, Sergey Kandaurov wrote: >>> On 8 March 2012 00:49, Nathan Whitehorn wrote: >>>> On 03/07/12 14:46, Sergey Kandaurov wrote: >>>>> Author: pluknet >>>>> Date: Wed Mar 7 20:46:59 2012 >>>>> New Revision: 232671 >>>>> URL: http://svn.freebsd.org/changeset/base/232671 >>>>> >>>>> Log: >>>>> Add lib32 part for libutil after its version bump to 9. >>>>> >>>>> PR: misc/165523 >>>>> Submitted by: Andrey Zonov >>>>> MFC after: 1 week >>>>> >>>>> Modified: >>>>> head/ObsoleteFiles.inc >>>>> >>>>> Modified: head/ObsoleteFiles.inc >>>>> >>>>> >>>>> ============================================================================== >>>>> --- head/ObsoleteFiles.inc Wed Mar 7 18:57:09 2012 >>>>> (r232670) >>>>> +++ head/ObsoleteFiles.inc Wed Mar 7 20:46:59 2012 >>>>> (r232671) >>>>> @@ -417,6 +417,9 @@ OLD_FILES+=usr/share/man/man5/lastlog.5. >>>>> OLD_FILES+=usr/share/man/man5/utmp.5.gz >>>>> OLD_FILES+=usr/share/man/man5/wtmp.5.gz >>>>> OLD_LIBS+=lib/libutil.so.8 >>>>> +.if ${TARGET_ARCH} == "amd64" >>>>> +OLB_LIBS+=usr/lib32/libutil.so.8 >>>>> +.endif >>>>> # 20100105: new userland semaphore implementation >>>>> OLD_FILES+=usr/include/sys/semaphore.h >>>>> # 20100103: ntptrace(8) removed >>>> >>>> This should also check for powerpc64. Or, better, do it unconditionally, >>>> since it will only remove files that actually exist and there's no harm >>>> trying to remove /usr/lib32/blah on 32-bit systems. >>>> -Nathan >>> Ok. so there are two way to go. >>> - add .if for powerpc64 (btw, does this arch exist in RELENG_8?) >> >> powerpc64 is new in RELENG_9. >> >> >>> - remove all lib32 related conditions throughout the file. >>> >>> The latter looks easier to maintain. >> >> I think that's a better way to go, especially with the addition of >> COMPAT_FREEBSD32 on mips. >> -Nathan > Does this patch look good for you? > > Index: ObsoleteFiles.inc > =================================================================== > --- ObsoleteFiles.inc (revision 232672) > +++ ObsoleteFiles.inc (working copy) > @@ -56,9 +56,7 @@ > usr/share/man/man3/archive_write_set_compression_none.3.gz \ > usr/share/man/man3/archive_write_set_compression_program.3.gz > OLD_LIBS+=usr/lib/libarchive.so.5 > -.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" > OLD_LIBS+=usr/lib32/libarchive.so.5 > -.endif I like it. -Nathan From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 21:34:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC9241065675; Wed, 7 Mar 2012 21:34:50 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id B1E128FC14; Wed, 7 Mar 2012 21:34:49 +0000 (UTC) Received: by lagv3 with SMTP id v3so10968529lag.13 for ; Wed, 07 Mar 2012 13:34:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=RVbF9X7AH9nWuXKichmT2HsJtoFCovi7AyoQmuB+16w=; b=izsAzU+h7X02JSD1myt+tl0LVNE/fhYCmzfGYd7yFZccP7v62m8+Wf1YGxaBC08g1s Re8nLIu4/o5Wcdv4XQoSvi5P3uo1M5Qqkn+ubBp4eGtnk8/axdDXn0t4XKASKGE2ss23 lLvaBhaFT7TS54oiXLE82o3DVjhcOhv3/ixkJacUKpbt1y09Ou6ze3hgVdzGsCArxvVP DGTBkym++q+Z0B0i8kaowmilim5M5MBI1VqSz6eD2eW8PdQ30s8UfulH1HeeI8QFsL0x aaKL/ckimg9dBcA3raB7yePgK82jCEN5+P5KKIDs63uY8hzmbp4YmoDLW2W7v4UvAX0r Ud3g== MIME-Version: 1.0 Received: by 10.152.145.135 with SMTP id su7mr2632552lab.5.1331156088371; Wed, 07 Mar 2012 13:34:48 -0800 (PST) Sender: pluknet@gmail.com Received: by 10.152.21.73 with HTTP; Wed, 7 Mar 2012 13:34:48 -0800 (PST) In-Reply-To: <4F57D2D3.60409@freebsd.org> References: <201203072046.q27KkxFr009846@svn.freebsd.org> <4F57C9C8.80907@freebsd.org> <4F57CD9B.5010600@freebsd.org> <4F57D2D3.60409@freebsd.org> Date: Thu, 8 Mar 2012 00:34:48 +0300 X-Google-Sender-Auth: pikcR8bHfdRPETEwdZ0GpsI0NOI Message-ID: From: Sergey Kandaurov To: Nathan Whitehorn Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232671 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 21:34:50 -0000 On 8 March 2012 01:27, Nathan Whitehorn wrote: > On 03/07/12 15:18, Sergey Kandaurov wrote: >> >> On 8 March 2012 01:05, Nathan Whitehorn =A0wrote= : >>> >>> On 03/07/12 14:53, Sergey Kandaurov wrote: >>>> >>>> On 8 March 2012 00:49, Nathan Whitehorn >>>> =A0wrote: >>>>> >>>>> On 03/07/12 14:46, Sergey Kandaurov wrote: >>>>>> >>>>>> Author: pluknet >>>>>> Date: Wed Mar =A07 20:46:59 2012 >>>>>> New Revision: 232671 >>>>>> URL: http://svn.freebsd.org/changeset/base/232671 >>>>>> >>>>>> Log: >>>>>> =A0 Add lib32 part for libutil after its version bump to 9. >>>>>> >>>>>> =A0 PR: =A0 =A0 =A0 =A0 =A0misc/165523 >>>>>> =A0 Submitted by: =A0 =A0 =A0 =A0Andrey Zonov >>>>>> =A0 MFC after: =A0 1 week >>>>>> >>>>>> Modified: >>>>>> =A0 head/ObsoleteFiles.inc >>>>>> >>>>>> Modified: head/ObsoleteFiles.inc >>>>>> >>>>>> >>>>>> >>>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D >>>>>> --- head/ObsoleteFiles.inc =A0 =A0 =A0Wed Mar =A07 18:57:09 2012 >>>>>> =A0(r232670) >>>>>> +++ head/ObsoleteFiles.inc =A0 =A0 =A0Wed Mar =A07 20:46:59 2012 >>>>>> =A0(r232671) >>>>>> @@ -417,6 +417,9 @@ OLD_FILES+=3Dusr/share/man/man5/lastlog.5. >>>>>> =A0OLD_FILES+=3Dusr/share/man/man5/utmp.5.gz >>>>>> =A0OLD_FILES+=3Dusr/share/man/man5/wtmp.5.gz >>>>>> =A0OLD_LIBS+=3Dlib/libutil.so.8 >>>>>> +.if ${TARGET_ARCH} =3D=3D "amd64" >>>>>> +OLB_LIBS+=3Dusr/lib32/libutil.so.8 >>>>>> +.endif >>>>>> =A0# 20100105: new userland semaphore implementation >>>>>> =A0OLD_FILES+=3Dusr/include/sys/semaphore.h >>>>>> =A0# 20100103: ntptrace(8) removed >>>>> >>>>> >>>>> This should also check for powerpc64. Or, better, do it >>>>> unconditionally, >>>>> since it will only remove files that actually exist and there's no ha= rm >>>>> trying to remove /usr/lib32/blah on 32-bit systems. >>>>> -Nathan >>>> >>>> Ok. so there are two way to go. >>>> - add .if for powerpc64 (btw, does this arch exist in RELENG_8?) >>> >>> >>> powerpc64 is new in RELENG_9. >>> >>> >>>> - remove all lib32 related conditions throughout the file. >>>> >>>> The latter looks easier to maintain. >>> >>> >>> I think that's a better way to go, especially with the addition of >>> COMPAT_FREEBSD32 on mips. >>> -Nathan >> >> Does this patch look good for you? >> >> Index: ObsoleteFiles.inc >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> --- ObsoleteFiles.inc =A0 (revision 232672) >> +++ ObsoleteFiles.inc =A0 (working copy) >> @@ -56,9 +56,7 @@ >> =A0 =A0 =A0 =A0 usr/share/man/man3/archive_write_set_compression_none.3.= gz \ >> =A0 =A0 =A0 =A0 usr/share/man/man3/archive_write_set_compression_program= .3.gz >> =A0OLD_LIBS+=3Dusr/lib/libarchive.so.5 >> -.if ${TARGET_ARCH} =3D=3D "amd64" || ${TARGET_ARCH} =3D=3D "powerpc64" >> =A0OLD_LIBS+=3Dusr/lib32/libarchive.so.5 >> -.endif > > > I like it. > -Nathan I will commit the patch tomorrow then if no one else will object against it= . Thanks for review. --=20 wbr, pluknet From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 22:00:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id D3B63106564A; Wed, 7 Mar 2012 22:00:34 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: src-committers@FreeBSD.org Date: Wed, 7 Mar 2012 17:00:19 -0500 User-Agent: KMail/1.6.2 References: <201203051953.q25JrIS1002269@svn.freebsd.org> In-Reply-To: <201203051953.q25JrIS1002269@svn.freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201203071700.21259.jkim@FreeBSD.org> Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , John Baldwin Subject: Re: svn commit: r232570 - head/sys/boot/i386/boot2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 22:00:35 -0000 On Monday 05 March 2012 02:53 pm, John Baldwin wrote: > Author: jhb > Date: Mon Mar 5 19:53:17 2012 > New Revision: 232570 > URL: http://svn.freebsd.org/changeset/base/232570 > > Log: > Fix boot2 to handle boot config files that only contain a custom > path to a loader or kernel. Specifically, kname cannot be pointed > at cmd[] since it's value is change to be an empty string after the > initial call to parse, and cmd[]'s value can be changed (thus > losing a prior setting for kname) due to user input at the boot > prompt. While here, ensure that that initial boot config file text > is nul-terminated, that ops is initialized to zero, and that kname > is always initialized to a valid string. As many people pointed out, Clang overflows boot2 again after this commit. Long long time ago, I asked this question on arch@: http://docs.freebsd.org/cgi/mid.cgi?200509081418.47794.jkim Why can't we do that now? Can't we build separate ufs1-only and ufs2-only boot2's, at least? Having ufs1+ufs2 boot block is great but I see very little benefit to support that in 2012. :-/ Jung-uk Kim From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 22:19:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A53D01065673; Wed, 7 Mar 2012 22:19:44 +0000 (UTC) (envelope-from mp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9081A8FC0C; Wed, 7 Mar 2012 22:19:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q27MJipK012903; Wed, 7 Mar 2012 22:19:44 GMT (envelope-from mp@svn.freebsd.org) Received: (from mp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q27MJihI012890; Wed, 7 Mar 2012 22:19:44 GMT (envelope-from mp@svn.freebsd.org) Message-Id: <201203072219.q27MJihI012890@svn.freebsd.org> From: Mark Peek Date: Wed, 7 Mar 2012 22:19:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232674 - in stable/7: bin/csh contrib/tcsh contrib/tcsh/config contrib/tcsh/nls contrib/tcsh/nls/C contrib/tcsh/nls/et contrib/tcsh/nls/finnish contrib/tcsh/nls/french contrib/tcsh/nls... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 22:19:44 -0000 Author: mp Date: Wed Mar 7 22:19:43 2012 New Revision: 232674 URL: http://svn.freebsd.org/changeset/base/232674 Log: MFC r231990 Update to tcsh 6.18.01 Added: stable/7/contrib/tcsh/nls/Makefile.in - copied unchanged from r231990, head/contrib/tcsh/nls/Makefile.in stable/7/contrib/tcsh/nls/catgen - copied unchanged from r231990, head/contrib/tcsh/nls/catgen stable/7/contrib/tcsh/svn - copied unchanged from r231990, head/contrib/tcsh/svn Deleted: stable/7/bin/csh/host.defs stable/7/contrib/tcsh/nls/Makefile Modified: stable/7/bin/csh/Makefile stable/7/bin/csh/config.h stable/7/bin/csh/config_p.h stable/7/contrib/tcsh/Fixes stable/7/contrib/tcsh/Imakefile stable/7/contrib/tcsh/Makefile.in stable/7/contrib/tcsh/Ported stable/7/contrib/tcsh/README stable/7/contrib/tcsh/WishList stable/7/contrib/tcsh/complete.tcsh stable/7/contrib/tcsh/config.guess stable/7/contrib/tcsh/config.h.in stable/7/contrib/tcsh/config.sub stable/7/contrib/tcsh/config/bsd4.4 stable/7/contrib/tcsh/config_f.h stable/7/contrib/tcsh/configure stable/7/contrib/tcsh/configure.in stable/7/contrib/tcsh/ed.chared.c stable/7/contrib/tcsh/ed.inputl.c stable/7/contrib/tcsh/ed.refresh.c stable/7/contrib/tcsh/ed.screen.c stable/7/contrib/tcsh/ed.term.c stable/7/contrib/tcsh/gethost.c stable/7/contrib/tcsh/glob.c stable/7/contrib/tcsh/glob.h stable/7/contrib/tcsh/host.defs stable/7/contrib/tcsh/install-sh stable/7/contrib/tcsh/nls/C/charset stable/7/contrib/tcsh/nls/C/set19 stable/7/contrib/tcsh/nls/et/charset stable/7/contrib/tcsh/nls/et/set1 stable/7/contrib/tcsh/nls/et/set10 stable/7/contrib/tcsh/nls/et/set11 stable/7/contrib/tcsh/nls/et/set13 stable/7/contrib/tcsh/nls/et/set14 stable/7/contrib/tcsh/nls/et/set15 stable/7/contrib/tcsh/nls/et/set16 stable/7/contrib/tcsh/nls/et/set17 stable/7/contrib/tcsh/nls/et/set18 stable/7/contrib/tcsh/nls/et/set19 stable/7/contrib/tcsh/nls/et/set2 stable/7/contrib/tcsh/nls/et/set20 stable/7/contrib/tcsh/nls/et/set21 stable/7/contrib/tcsh/nls/et/set22 stable/7/contrib/tcsh/nls/et/set23 stable/7/contrib/tcsh/nls/et/set24 stable/7/contrib/tcsh/nls/et/set25 stable/7/contrib/tcsh/nls/et/set26 stable/7/contrib/tcsh/nls/et/set27 stable/7/contrib/tcsh/nls/et/set3 stable/7/contrib/tcsh/nls/et/set30 stable/7/contrib/tcsh/nls/et/set4 stable/7/contrib/tcsh/nls/et/set5 stable/7/contrib/tcsh/nls/et/set6 stable/7/contrib/tcsh/nls/et/set7 stable/7/contrib/tcsh/nls/et/set8 stable/7/contrib/tcsh/nls/et/set9 stable/7/contrib/tcsh/nls/finnish/charset stable/7/contrib/tcsh/nls/finnish/set1 stable/7/contrib/tcsh/nls/finnish/set10 stable/7/contrib/tcsh/nls/finnish/set11 stable/7/contrib/tcsh/nls/finnish/set12 stable/7/contrib/tcsh/nls/finnish/set13 stable/7/contrib/tcsh/nls/finnish/set14 stable/7/contrib/tcsh/nls/finnish/set16 stable/7/contrib/tcsh/nls/finnish/set17 stable/7/contrib/tcsh/nls/finnish/set18 stable/7/contrib/tcsh/nls/finnish/set19 stable/7/contrib/tcsh/nls/finnish/set2 stable/7/contrib/tcsh/nls/finnish/set20 stable/7/contrib/tcsh/nls/finnish/set22 stable/7/contrib/tcsh/nls/finnish/set23 stable/7/contrib/tcsh/nls/finnish/set25 stable/7/contrib/tcsh/nls/finnish/set26 stable/7/contrib/tcsh/nls/finnish/set27 stable/7/contrib/tcsh/nls/finnish/set29 stable/7/contrib/tcsh/nls/finnish/set3 stable/7/contrib/tcsh/nls/finnish/set6 stable/7/contrib/tcsh/nls/finnish/set7 stable/7/contrib/tcsh/nls/finnish/set9 stable/7/contrib/tcsh/nls/french/charset stable/7/contrib/tcsh/nls/french/set1 stable/7/contrib/tcsh/nls/french/set10 stable/7/contrib/tcsh/nls/french/set11 stable/7/contrib/tcsh/nls/french/set12 stable/7/contrib/tcsh/nls/french/set13 stable/7/contrib/tcsh/nls/french/set15 stable/7/contrib/tcsh/nls/french/set16 stable/7/contrib/tcsh/nls/french/set17 stable/7/contrib/tcsh/nls/french/set18 stable/7/contrib/tcsh/nls/french/set19 stable/7/contrib/tcsh/nls/french/set2 stable/7/contrib/tcsh/nls/french/set20 stable/7/contrib/tcsh/nls/french/set21 stable/7/contrib/tcsh/nls/french/set22 stable/7/contrib/tcsh/nls/french/set23 stable/7/contrib/tcsh/nls/french/set25 stable/7/contrib/tcsh/nls/french/set26 stable/7/contrib/tcsh/nls/french/set27 stable/7/contrib/tcsh/nls/french/set3 stable/7/contrib/tcsh/nls/french/set30 stable/7/contrib/tcsh/nls/french/set31 stable/7/contrib/tcsh/nls/french/set4 stable/7/contrib/tcsh/nls/french/set6 stable/7/contrib/tcsh/nls/french/set7 stable/7/contrib/tcsh/nls/french/set8 stable/7/contrib/tcsh/nls/french/set9 stable/7/contrib/tcsh/nls/german/charset stable/7/contrib/tcsh/nls/german/set1 stable/7/contrib/tcsh/nls/german/set10 stable/7/contrib/tcsh/nls/german/set13 stable/7/contrib/tcsh/nls/german/set15 stable/7/contrib/tcsh/nls/german/set16 stable/7/contrib/tcsh/nls/german/set17 stable/7/contrib/tcsh/nls/german/set18 stable/7/contrib/tcsh/nls/german/set19 stable/7/contrib/tcsh/nls/german/set2 stable/7/contrib/tcsh/nls/german/set20 stable/7/contrib/tcsh/nls/german/set22 stable/7/contrib/tcsh/nls/german/set23 stable/7/contrib/tcsh/nls/german/set25 stable/7/contrib/tcsh/nls/german/set26 stable/7/contrib/tcsh/nls/german/set27 stable/7/contrib/tcsh/nls/german/set29 stable/7/contrib/tcsh/nls/german/set3 stable/7/contrib/tcsh/nls/german/set30 stable/7/contrib/tcsh/nls/german/set31 stable/7/contrib/tcsh/nls/german/set4 stable/7/contrib/tcsh/nls/german/set5 stable/7/contrib/tcsh/nls/german/set6 stable/7/contrib/tcsh/nls/german/set7 stable/7/contrib/tcsh/nls/german/set8 stable/7/contrib/tcsh/nls/german/set9 stable/7/contrib/tcsh/nls/greek/charset stable/7/contrib/tcsh/nls/greek/set1 (contents, props changed) stable/7/contrib/tcsh/nls/greek/set10 (contents, props changed) stable/7/contrib/tcsh/nls/greek/set11 (contents, props changed) stable/7/contrib/tcsh/nls/greek/set12 (contents, props changed) stable/7/contrib/tcsh/nls/greek/set13 (contents, props changed) stable/7/contrib/tcsh/nls/greek/set14 (contents, props changed) stable/7/contrib/tcsh/nls/greek/set15 (contents, props changed) stable/7/contrib/tcsh/nls/greek/set16 (contents, props changed) stable/7/contrib/tcsh/nls/greek/set17 (contents, props changed) stable/7/contrib/tcsh/nls/greek/set18 (contents, props changed) stable/7/contrib/tcsh/nls/greek/set19 (contents, props changed) stable/7/contrib/tcsh/nls/greek/set2 (contents, props changed) stable/7/contrib/tcsh/nls/greek/set20 (contents, props changed) stable/7/contrib/tcsh/nls/greek/set21 (contents, props changed) stable/7/contrib/tcsh/nls/greek/set22 (contents, props changed) stable/7/contrib/tcsh/nls/greek/set23 (contents, props changed) stable/7/contrib/tcsh/nls/greek/set25 (contents, props changed) stable/7/contrib/tcsh/nls/greek/set26 (contents, props changed) stable/7/contrib/tcsh/nls/greek/set27 (contents, props changed) stable/7/contrib/tcsh/nls/greek/set29 (contents, props changed) stable/7/contrib/tcsh/nls/greek/set3 (contents, props changed) stable/7/contrib/tcsh/nls/greek/set30 (contents, props changed) stable/7/contrib/tcsh/nls/greek/set31 (contents, props changed) stable/7/contrib/tcsh/nls/greek/set4 (contents, props changed) stable/7/contrib/tcsh/nls/greek/set5 (contents, props changed) stable/7/contrib/tcsh/nls/greek/set6 (contents, props changed) stable/7/contrib/tcsh/nls/greek/set7 (contents, props changed) stable/7/contrib/tcsh/nls/greek/set8 (contents, props changed) stable/7/contrib/tcsh/nls/greek/set9 (contents, props changed) stable/7/contrib/tcsh/nls/italian/charset stable/7/contrib/tcsh/nls/italian/set1 stable/7/contrib/tcsh/nls/italian/set11 stable/7/contrib/tcsh/nls/italian/set13 stable/7/contrib/tcsh/nls/italian/set15 stable/7/contrib/tcsh/nls/italian/set17 stable/7/contrib/tcsh/nls/italian/set19 stable/7/contrib/tcsh/nls/italian/set2 stable/7/contrib/tcsh/nls/italian/set20 stable/7/contrib/tcsh/nls/italian/set22 stable/7/contrib/tcsh/nls/italian/set23 stable/7/contrib/tcsh/nls/italian/set26 stable/7/contrib/tcsh/nls/italian/set3 stable/7/contrib/tcsh/nls/italian/set30 stable/7/contrib/tcsh/nls/italian/set4 stable/7/contrib/tcsh/nls/italian/set6 stable/7/contrib/tcsh/nls/italian/set7 stable/7/contrib/tcsh/nls/ja/charset stable/7/contrib/tcsh/nls/ja/set1 (contents, props changed) stable/7/contrib/tcsh/nls/ja/set10 (contents, props changed) stable/7/contrib/tcsh/nls/ja/set11 (contents, props changed) stable/7/contrib/tcsh/nls/ja/set12 (contents, props changed) stable/7/contrib/tcsh/nls/ja/set13 (contents, props changed) stable/7/contrib/tcsh/nls/ja/set15 (contents, props changed) stable/7/contrib/tcsh/nls/ja/set16 (contents, props changed) stable/7/contrib/tcsh/nls/ja/set17 (contents, props changed) stable/7/contrib/tcsh/nls/ja/set18 (contents, props changed) stable/7/contrib/tcsh/nls/ja/set2 (contents, props changed) stable/7/contrib/tcsh/nls/ja/set21 (contents, props changed) stable/7/contrib/tcsh/nls/ja/set29 (contents, props changed) stable/7/contrib/tcsh/nls/ja/set3 (contents, props changed) stable/7/contrib/tcsh/nls/ja/set30 (contents, props changed) stable/7/contrib/tcsh/nls/ja/set4 (contents, props changed) stable/7/contrib/tcsh/nls/ja/set5 (contents, props changed) stable/7/contrib/tcsh/nls/ja/set6 (contents, props changed) stable/7/contrib/tcsh/nls/ja/set7 (contents, props changed) stable/7/contrib/tcsh/nls/ja/set8 (contents, props changed) stable/7/contrib/tcsh/nls/russian/charset stable/7/contrib/tcsh/nls/russian/set1 (contents, props changed) stable/7/contrib/tcsh/nls/russian/set10 (contents, props changed) stable/7/contrib/tcsh/nls/russian/set11 (contents, props changed) stable/7/contrib/tcsh/nls/russian/set12 (contents, props changed) stable/7/contrib/tcsh/nls/russian/set13 (contents, props changed) stable/7/contrib/tcsh/nls/russian/set14 (contents, props changed) stable/7/contrib/tcsh/nls/russian/set15 (contents, props changed) stable/7/contrib/tcsh/nls/russian/set16 (contents, props changed) stable/7/contrib/tcsh/nls/russian/set17 (contents, props changed) stable/7/contrib/tcsh/nls/russian/set18 (contents, props changed) stable/7/contrib/tcsh/nls/russian/set19 (contents, props changed) stable/7/contrib/tcsh/nls/russian/set2 (contents, props changed) stable/7/contrib/tcsh/nls/russian/set20 (contents, props changed) stable/7/contrib/tcsh/nls/russian/set22 (contents, props changed) stable/7/contrib/tcsh/nls/russian/set23 (contents, props changed) stable/7/contrib/tcsh/nls/russian/set25 (contents, props changed) stable/7/contrib/tcsh/nls/russian/set26 (contents, props changed) stable/7/contrib/tcsh/nls/russian/set27 (contents, props changed) stable/7/contrib/tcsh/nls/russian/set29 (contents, props changed) stable/7/contrib/tcsh/nls/russian/set30 (contents, props changed) stable/7/contrib/tcsh/nls/russian/set31 (contents, props changed) stable/7/contrib/tcsh/nls/russian/set4 (contents, props changed) stable/7/contrib/tcsh/nls/russian/set5 (contents, props changed) stable/7/contrib/tcsh/nls/russian/set6 (contents, props changed) stable/7/contrib/tcsh/nls/russian/set7 (contents, props changed) stable/7/contrib/tcsh/nls/russian/set8 (contents, props changed) stable/7/contrib/tcsh/nls/russian/set9 (contents, props changed) stable/7/contrib/tcsh/nls/spanish/charset stable/7/contrib/tcsh/nls/spanish/set1 stable/7/contrib/tcsh/nls/spanish/set10 stable/7/contrib/tcsh/nls/spanish/set13 stable/7/contrib/tcsh/nls/spanish/set14 stable/7/contrib/tcsh/nls/spanish/set15 stable/7/contrib/tcsh/nls/spanish/set16 stable/7/contrib/tcsh/nls/spanish/set17 stable/7/contrib/tcsh/nls/spanish/set18 stable/7/contrib/tcsh/nls/spanish/set19 stable/7/contrib/tcsh/nls/spanish/set2 stable/7/contrib/tcsh/nls/spanish/set20 stable/7/contrib/tcsh/nls/spanish/set22 stable/7/contrib/tcsh/nls/spanish/set23 stable/7/contrib/tcsh/nls/spanish/set25 stable/7/contrib/tcsh/nls/spanish/set26 stable/7/contrib/tcsh/nls/spanish/set27 stable/7/contrib/tcsh/nls/spanish/set3 stable/7/contrib/tcsh/nls/spanish/set30 stable/7/contrib/tcsh/nls/spanish/set4 stable/7/contrib/tcsh/nls/spanish/set5 stable/7/contrib/tcsh/nls/spanish/set6 stable/7/contrib/tcsh/nls/spanish/set7 stable/7/contrib/tcsh/nls/spanish/set8 stable/7/contrib/tcsh/nls/spanish/set9 stable/7/contrib/tcsh/nls/ukrainian/charset stable/7/contrib/tcsh/nls/ukrainian/set1 (contents, props changed) stable/7/contrib/tcsh/nls/ukrainian/set10 (contents, props changed) stable/7/contrib/tcsh/nls/ukrainian/set11 (contents, props changed) stable/7/contrib/tcsh/nls/ukrainian/set12 (contents, props changed) stable/7/contrib/tcsh/nls/ukrainian/set13 (contents, props changed) stable/7/contrib/tcsh/nls/ukrainian/set14 (contents, props changed) stable/7/contrib/tcsh/nls/ukrainian/set15 (contents, props changed) stable/7/contrib/tcsh/nls/ukrainian/set16 (contents, props changed) stable/7/contrib/tcsh/nls/ukrainian/set17 (contents, props changed) stable/7/contrib/tcsh/nls/ukrainian/set18 (contents, props changed) stable/7/contrib/tcsh/nls/ukrainian/set19 (contents, props changed) stable/7/contrib/tcsh/nls/ukrainian/set2 (contents, props changed) stable/7/contrib/tcsh/nls/ukrainian/set20 (contents, props changed) stable/7/contrib/tcsh/nls/ukrainian/set22 (contents, props changed) stable/7/contrib/tcsh/nls/ukrainian/set23 (contents, props changed) stable/7/contrib/tcsh/nls/ukrainian/set25 (contents, props changed) stable/7/contrib/tcsh/nls/ukrainian/set26 (contents, props changed) stable/7/contrib/tcsh/nls/ukrainian/set27 (contents, props changed) stable/7/contrib/tcsh/nls/ukrainian/set29 (contents, props changed) stable/7/contrib/tcsh/nls/ukrainian/set30 (contents, props changed) stable/7/contrib/tcsh/nls/ukrainian/set31 (contents, props changed) stable/7/contrib/tcsh/nls/ukrainian/set5 (contents, props changed) stable/7/contrib/tcsh/nls/ukrainian/set6 (contents, props changed) stable/7/contrib/tcsh/nls/ukrainian/set7 (contents, props changed) stable/7/contrib/tcsh/nls/ukrainian/set8 (contents, props changed) stable/7/contrib/tcsh/nls/ukrainian/set9 (contents, props changed) stable/7/contrib/tcsh/patchlevel.h stable/7/contrib/tcsh/pathnames.h stable/7/contrib/tcsh/sh.c stable/7/contrib/tcsh/sh.char.c stable/7/contrib/tcsh/sh.char.h stable/7/contrib/tcsh/sh.decls.h stable/7/contrib/tcsh/sh.dir.c stable/7/contrib/tcsh/sh.dol.c stable/7/contrib/tcsh/sh.err.c stable/7/contrib/tcsh/sh.exec.c stable/7/contrib/tcsh/sh.exp.c stable/7/contrib/tcsh/sh.file.c stable/7/contrib/tcsh/sh.func.c stable/7/contrib/tcsh/sh.glob.c stable/7/contrib/tcsh/sh.h stable/7/contrib/tcsh/sh.hist.c stable/7/contrib/tcsh/sh.lex.c stable/7/contrib/tcsh/sh.misc.c stable/7/contrib/tcsh/sh.parse.c stable/7/contrib/tcsh/sh.print.c stable/7/contrib/tcsh/sh.proc.c stable/7/contrib/tcsh/sh.proc.h stable/7/contrib/tcsh/sh.sem.c stable/7/contrib/tcsh/sh.set.c stable/7/contrib/tcsh/sh.time.c stable/7/contrib/tcsh/tc.alloc.c stable/7/contrib/tcsh/tc.const.c stable/7/contrib/tcsh/tc.decls.h stable/7/contrib/tcsh/tc.disc.c stable/7/contrib/tcsh/tc.func.c stable/7/contrib/tcsh/tc.nls.c stable/7/contrib/tcsh/tc.nls.h stable/7/contrib/tcsh/tc.os.c stable/7/contrib/tcsh/tc.os.h stable/7/contrib/tcsh/tc.prompt.c stable/7/contrib/tcsh/tc.sig.c stable/7/contrib/tcsh/tc.sig.h stable/7/contrib/tcsh/tc.str.c stable/7/contrib/tcsh/tc.wait.h stable/7/contrib/tcsh/tc.who.c stable/7/contrib/tcsh/tcsh.man stable/7/contrib/tcsh/tcsh.man2html stable/7/contrib/tcsh/tw.color.c stable/7/contrib/tcsh/tw.init.c stable/7/contrib/tcsh/tw.parse.c stable/7/contrib/tcsh/vms.termcap.c Directory Properties: stable/7/bin/csh/ (props changed) stable/7/contrib/tcsh/ (props changed) stable/7/contrib/tcsh/nls/greek/set24 (props changed) stable/7/contrib/tcsh/nls/ja/set24 (props changed) stable/7/contrib/tcsh/nls/russian/set21 (props changed) stable/7/contrib/tcsh/nls/russian/set24 (props changed) stable/7/contrib/tcsh/nls/russian/set3 (props changed) stable/7/contrib/tcsh/nls/ukrainian/set21 (props changed) stable/7/contrib/tcsh/nls/ukrainian/set24 (props changed) stable/7/contrib/tcsh/nls/ukrainian/set3 (props changed) stable/7/contrib/tcsh/nls/ukrainian/set4 (props changed) Modified: stable/7/bin/csh/Makefile ============================================================================== --- stable/7/bin/csh/Makefile Wed Mar 7 22:09:40 2012 (r232673) +++ stable/7/bin/csh/Makefile Wed Mar 7 22:19:43 2012 (r232674) @@ -18,7 +18,7 @@ DFLAGS= -D_PATH_TCSHELL='"/rescue/${PROG DFLAGS= -D_PATH_TCSHELL='"/bin/${PROG}"' .endif CFLAGS+= -I. -I${.CURDIR} -I${TCSHDIR} ${DFLAGS} -WARNS?= 0 +WARNS?= 1 SRCS= sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \ sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \ sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \ @@ -107,10 +107,10 @@ gethost: gethost.c sh.err.h tc.const.h s @rm -f ${.TARGET} ${CC} -o gethost ${LDFLAGS} ${CFLAGS} ${TCSHDIR}/gethost.c -tc.defs.c: gethost ${.CURDIR}/host.defs +tc.defs.c: gethost ${TCSHDIR}/host.defs @rm -f ${.TARGET} @echo "/* Do not edit this file, make creates it */" > ${.TARGET} - ./gethost ${.CURDIR}/host.defs >> ${.TARGET} + ./gethost ${TCSHDIR}/host.defs >> ${.TARGET} ed.defns.h: ed.defns.c @rm -f ${.TARGET} Modified: stable/7/bin/csh/config.h ============================================================================== --- stable/7/bin/csh/config.h Wed Mar 7 22:09:40 2012 (r232673) +++ stable/7/bin/csh/config.h Wed Mar 7 22:19:43 2012 (r232674) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* config.h. Generated by configure. */ +/* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.in by autoheader. */ /* Define to the type of elements in the array set by `getgroups'. Usually @@ -12,9 +12,6 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_AUTH_H */ -/* Define to 1 if you have the `catgets' function. */ -#define HAVE_CATGETS 1 - /* Define to 1 if you have the header file. */ /* #undef HAVE_CRYPT_H */ @@ -41,6 +38,9 @@ /* Define to 1 if you have the `dup2' function. */ #define HAVE_DUP2 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_FEATURES_H */ + /* Define to 1 if you have the `getauthid' function. */ /* #undef HAVE_GETAUTHID */ @@ -56,7 +56,10 @@ /* Define to 1 if you have the `getutent' function. */ /* #undef HAVE_GETUTENT */ -/* Define if you have the iconv() function. */ +/* Define to 1 if you have the `getutxent' function. */ +/* #undef HAVE_GETUTXENT */ + +/* Define if you have the iconv() function and it works. */ /* #undef HAVE_ICONV */ /* Define to 1 if you have the header file. */ @@ -65,6 +68,9 @@ /* Define to 1 if the system has the type `long long'. */ #define HAVE_LONG_LONG 1 +/* Define to 1 if you have the `mallinfo' function. */ +/* #undef HAVE_MALLINFO */ + /* Define to 1 if mbrtowc and mbstate_t are properly declared. */ #define HAVE_MBRTOWC 1 @@ -77,6 +83,9 @@ /* Define to 1 if you have the `memset' function. */ #define HAVE_MEMSET 1 +/* Define to 1 if you have the `mkstemp' function. */ +#define HAVE_MKSTEMP 1 + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ @@ -86,6 +95,9 @@ /* Define to 1 if you have the `nl_langinfo' function. */ #define HAVE_NL_LANGINFO 1 +/* Define to 1 if you have the header file. */ +#define HAVE_PATHS_H 1 + /* Define to 1 if you have the `sbrk' function. */ #define HAVE_SBRK 1 @@ -120,22 +132,34 @@ /* Define to 1 if you have the `strstr' function. */ #define HAVE_STRSTR 1 -/* Define to 1 if `d_ino' is member of `struct dirent'. */ +/* Define to 1 if `d_ino' is a member of `struct dirent'. */ #define HAVE_STRUCT_DIRENT_D_INO 1 -/* Define to 1 if `ss_family' is member of `struct sockaddr_storage'. */ +/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */ #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 -/* Define to 1 if `ut_host' is member of `struct utmp'. */ +/* Define to 1 if `ut_host' is a member of `struct utmpx'. */ +/* #undef HAVE_STRUCT_UTMPX_UT_HOST */ + +/* Define to 1 if `ut_tv' is a member of `struct utmpx'. */ +/* #undef HAVE_STRUCT_UTMPX_UT_TV */ + +/* Define to 1 if `ut_user' is a member of `struct utmpx'. */ +/* #undef HAVE_STRUCT_UTMPX_UT_USER */ + +/* Define to 1 if `ut_xtime' is a member of `struct utmpx'. */ +/* #undef HAVE_STRUCT_UTMPX_UT_XTIME */ + +/* Define to 1 if `ut_host' is a member of `struct utmp'. */ #define HAVE_STRUCT_UTMP_UT_HOST 1 -/* Define to 1 if `ut_tv' is member of `struct utmp'. */ +/* Define to 1 if `ut_tv' is a member of `struct utmp'. */ /* #undef HAVE_STRUCT_UTMP_UT_TV */ -/* Define to 1 if `ut_user' is member of `struct utmp'. */ +/* Define to 1 if `ut_user' is a member of `struct utmp'. */ /* #undef HAVE_STRUCT_UTMP_UT_USER */ -/* Define to 1 if `ut_xtime' is member of `struct utmp'. */ +/* Define to 1 if `ut_xtime' is a member of `struct utmp'. */ /* #undef HAVE_STRUCT_UTMP_UT_XTIME */ /* Define to 1 if you have the `sysconf' function. */ @@ -179,25 +203,31 @@ /* Support NLS. */ #define NLS 1 +/* Support NLS catalogs. */ +#define NLS_CATALOGS 1 + /* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "" +#define PACKAGE_BUGREPORT "http://bugs.gw.com/" /* Define to the full name of this package. */ -#define PACKAGE_NAME "" +#define PACKAGE_NAME "tcsh" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "" +#define PACKAGE_STRING "tcsh 6.18.01" /* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "" +#define PACKAGE_TARNAME "tcsh" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "" +#define PACKAGE_VERSION "6.18.01" /* Define to 1 if the `setpgrp' function takes no argument. */ /* #undef SETPGRP_VOID */ -/* The size of a `wchar_t', as computed by sizeof. */ +/* The size of `wchar_t', as computed by sizeof. */ #define SIZEOF_WCHAR_T 4 /* Define to 1 if the `S_IS*' macros in do not work properly. */ @@ -206,6 +236,11 @@ /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 +/* Define for Solaris 2.5.1 so the uint32_t typedef from , + , or is not used. If the typedef were allowed, the + #define below would cause a syntax error. */ +/* #undef _UINT32_T */ + /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ @@ -215,7 +250,7 @@ /* Define to `int' if does not define. */ /* #undef mode_t */ -/* Define to `unsigned' if does not define. */ +/* Define to `unsigned int' if does not define. */ /* #undef size_t */ /* Define to `int' if neither nor define. */ @@ -227,6 +262,10 @@ /* Define to `int' if doesn't define. */ /* #undef uid_t */ +/* Define to the type of an unsigned integer type of width exactly 32 bits if + such a type exists and the standard includes do not define it. */ +/* #undef uint32_t */ + /* Define to empty if the keyword `volatile' does not work. Warning: valid code using `volatile' can become incorrect without. Disable with care. */ /* #undef volatile */ @@ -234,9 +273,5 @@ #include "config_p.h" #include "config_f.h" -#ifndef NO_NLS_CATALOGS -#define NLS_CATALOGS -#endif - /* Work around a vendor issue where config_f.h is #undef'ing this setting */ #define SYSMALLOC Modified: stable/7/bin/csh/config_p.h ============================================================================== --- stable/7/bin/csh/config_p.h Wed Mar 7 22:09:40 2012 (r232673) +++ stable/7/bin/csh/config_p.h Wed Mar 7 22:19:43 2012 (r232674) @@ -105,9 +105,6 @@ #elif defined(__APPLE__) # define SYSMALLOC - -#else -# define NLS_CATALOGS #endif #endif /* _h_config */ Modified: stable/7/contrib/tcsh/Fixes ============================================================================== --- stable/7/contrib/tcsh/Fixes Wed Mar 7 22:09:40 2012 (r232673) +++ stable/7/contrib/tcsh/Fixes Wed Mar 7 22:19:43 2012 (r232674) @@ -1,3 +1,147 @@ + 6. V6.18.01 - 20120214 + 5. fix interruptible wait again + 4. ignore bogus compiler overflow message + 3. cleanup ifdefs in utmp code, and provide default array entries + 2. Ignore #machine entries in host.defs + 1. Detect missing ) in gethost.c (Corinna Vinschen) + +104. V6.18.00 - 20120114 +103. remove unused variables. +102. Make gethost use definitions for x __x__ and __x automatically. +101. More utmp fixes +100. V6.17.10 - 20120105 + 99. Add more FreeBSD/NetBSD machines + 98. Add portability wrapper for gencat + 97. Fix warning for write in SYSMALLOC systems. + 96. V6.17.09 - 20120102 + 95. revert gencat handling to pre-cygwin fixes (without the env settings) + 94. remove stray endutent() + 93. V6.17.08 - 20111230 + 92. Remove - from gencat + 91. Provide support for malloc_usable_size() so that linux works again + without SYSMALLOC + 90. Add support for FreeBSD's utmpx. + 89. V6.17.07 - 20111227 + 88. Fix debian bug #645238: tcsh segfaults when prompt includes %j and + there are more than 10 jobs. + 87. PR/155: Default $anyerror to set for backward compatibility + 86. PR/149: Don't print -1 in %j (Vojtech Vitek) + 85. handle -- on chdir commands as the end of options processing so that + they can process a directory like -x without resorting to ./-x + (Andrew Stevenson) + 84. Handle write(2) returning ENOENT from SoFS, thanks ++HAL (Robert Byrnes) + 83. PR/38: Null check for jobs (Kurt Miller) + 82. Fix spelling correction correcting ./foo -> ../foo2 (jean-luc leger) + 81. PR/120: string0 in filetest does not have enough space. + 80. V6.17.06 - 20110415 + 79. PR/110: Add $anyerror to select behavior. Default to the new one. + 78. Don't try to spell commands that are correct (Rouben Rostamian) + [./tcsh -f; set path=($path 2); mkdir foo2; cd foo2; touch foo; + chmod +x foo; set correct=cmd; ./foo -> ../foo] + 77. Don't push the syntax struct on the cleanup stack, because on foo;bar + if foo fails, we will free bar prematurely (Ben Miller) + 76. Avoid infinite loop while trying to print the pid of a dying process + to a closed file (Bob Arendt) + 75. Handle completion of ${ variables (Anthony Mallet) + 74. Add --disable-nls-catalogs (Corinna Vinschen) + 73. convert message catalogs to UTF-8 (Werner Fink) + 72. check that the NLS path works before setting $NLSPATH. + 71. use SYSMALLOC for GLIBC (Werner Fink) + 70. use mallinfo for SYSMALLOC (Corinna Vinschen) + 69. V6.17.05 - 20110201 + 68. Use mkstemp() if there for here docs (Werner Fink) + 67. Fix handling of errors and exit values in builtins (Werner Fink) + 66. Better pty name detection (Werner Fink) + 65. Enable NLS catalogs on Cygwin (Corinna Vinschen) + 64. NLSPATH handling fixes (Corinna Vinschen) + 63. Avoid infrequent exit when tcsh cd's into a non-existent directory + https://bugzilla.novell.com/show_bug.cgi?id=293395 (Werner Fink) + 62. Don't try to spell check full path binaries that are correct because + they can cause hangs when other nfs partitions are hung. (Werner Fink) + 61. Avoid nested interrupts when exiting causing history writing to fail + https://bugzilla.novell.com/show_bug.cgi?id=331627 (Werner Fink) + 60. Instead of giving an error or ignoring lines with missing eol at eof, + process them. + 59. Avoid leaking fd's in mail check (Werner Fink) + 58. Add cygwin_xcrypt() (Corinna Vinschen) + 57. Recognize i686 (Corinna Vinschen) + 56. Rename cygwin32 to cygwin and bring it up-to-date with modern cygwin + settings (Corinna Vinschen) + 55. Avoid double slashes in cdpath (Corinna Vinschen) + 54. V6.17.04 - 20110118 + 53. Revert PR/110, breaks the test suite. + 52. V6.17.03 - 20110117 + 51. PR/102: Complain on input files with missing trailing \n + 50. PR/104: If atime == mtime we don't have new mail. + 49. PR/113: Don't allow illegal variable names to be set. + 48. PR/112: don't set $REMOTEHOST on the local machine. + 47. PR/110: exit status of the pipeline should be the status of the last + command. + 46. Android support (Corinna Vinschen) + 45. Add AUTOSET_KANJI which works around the Shift-JIS encoding that + translates unshifted 7 bit ASCII (Werner Fink) + 44. Handle mb{r,}towc() returning 0 by setting the return value to NUL + (Jean-Luc Leger) + 43. PR/109: make wait interruptible (Vojtech Vitek) + 42. resource limit fixes: signed vs. unsigned, megabyte issue, doc issues + (Robert Byrnes) + 41. remove .bat and .cmd handling for executables on cygwin (Corinna Vinschen) + 40. Don't echo history while history -L or history -M + 39. Check for EOS before ** from Greg Dionne + 38. Don't fork in backeval from Bryan Mason + 37. Better globstar support from Greg Dionne + 36. Error out when processing the last incomplete line instead of silently + ignoring it (Anders Kaseorg) + 35. Fix SEGV from echo `` + 34. Better fixes for histchars and promptchars (nargs) + 33. Fix win32 issue calling fmalloc/ffree from non-thread-safe context. + (Fabio Fabbri) + 32. V6.17.02 - 20100512 + 31. PR/79: nargs: Better handling for promptchars. + 30. PR/97: Add parseoctal to retain compatibility with previous versions (Jim + Zajkowski) + 29. PR/84: Performance fixes for large history merges (add + hashtable (Ted Anderson) + 28. Revert previous #23; people should use $histlit if they want this + feature. + 27. Don't kill "hup" background jobs when a child of the shell exits. + From Debian. + 26. Ignore \r\n in the command line options for OS's that don't strip + these from #!; from Debian + 25. Fix enhanced missing patch (Greg Dionne) + 24. Callers of rt_mbtowc don't grok -2 as a return. Return -1 for now. + (Corinna Vinschen) + 23. Turn HistLit on while recording history to avoid \!\! losing its \. + From Debian + 22. set autoexpand; set histchars="";\n crash. From Debian + 21. V6.17.01 - 20100506 + 20. unset verbose while we are reading the history file to avoid echoing + to the terminal. (Jeffrey Bastian) + 19. globstar addition, Enhance addition, euid, euser, gid variables + (Greg Dionne) + 18. Make 'e' in vi mode work like 'b' - use wordchars (Alistair Crooks) + 17. Handle UTF-16 surrogates (Corinna Vinschen) + 16. Make tcsh work on systems where sizeof(wchar_t) == 2 (Corinna Vinschen) + 15. Better support for Solaris >= 2.9 (Thomas Uhle) + 14. Change internal expression calculations to long long so that we can + deal with > 32 bit time, inodes, uids, file sizes etc. + 13. Add new linux resource limits. + 12. Don't print 'Exit X' when printexitvalue is set in `` expressions + (Jeff Bastian) + 11. Add more LS_COLORS vars (M.H. Anderson) + 10. Reduce whitespace in Makefile (Don Estabrook) + 9. Manual page fixes (Alan R. S. Bueno) + 8. Remove history in loops bug from the documentation (Holger Weiss) + 7. Add autorehash (Holger Weiss) + 6. Add history.at (Ted Anderson) + 5. Better NLSPATH handling (Norm Jacobs) + 4. Fix hostname building from utmp (Cyrus Rahman) + 3. Handle pending signals before flush so that the the history file does + not get truncated. (Ted Anderson) + 2. Fix AsciiOnly setting that broke 8 bit input. (Juergen Keil) + 1. remember to closedir in mailchk (from Werner Fink, reported by + David Binderman) + 21. V6.17.00 - 20090710 20. Fix dataroot autoconf issue. 19. Fix directory stuff for unit tests. Modified: stable/7/contrib/tcsh/Imakefile ============================================================================== --- stable/7/contrib/tcsh/Imakefile Wed Mar 7 22:09:40 2012 (r232673) +++ stable/7/contrib/tcsh/Imakefile Wed Mar 7 22:19:43 2012 (r232674) @@ -1,5 +1,5 @@ XCOMM -XCOMM $tcsh: Imakefile,v 1.86 2007/03/19 23:25:02 christos Exp $ +XCOMM $tcsh: Imakefile,v 1.87 2010/01/28 19:01:05 christos Exp $ XCOMM XCOMM Imakefile for tcsh 6.12 XCOMM Marc Horowitz, MIT SIPB @@ -93,7 +93,11 @@ ones. Please send in your fixes and add # if (OSMinorVersion < 6) # define ConfigH sol24 # else -# define ConfigH sol26 +# if (OSMinorVersion < 9) +# define ConfigH sol26 +# else +# define ConfigH sol29 +# endif # endif # endif # endif Modified: stable/7/contrib/tcsh/Makefile.in ============================================================================== --- stable/7/contrib/tcsh/Makefile.in Wed Mar 7 22:09:40 2012 (r232673) +++ stable/7/contrib/tcsh/Makefile.in Wed Mar 7 22:19:43 2012 (r232674) @@ -1,4 +1,4 @@ -# $tcsh: Makefile.in,v 3.40 2009/06/24 22:09:05 christos Exp $ +# $tcsh: Makefile.in,v 3.49 2011/02/05 17:35:31 christos Exp $ # Makefile.in 4.3 6/11/83 # # C Shell with process control; VM/UNIX VAX Makefile @@ -26,22 +26,27 @@ CF=-c CPPFLAGS=-I. -I$(srcdir) LFLAGS= -#LFLAGS= -Zn10000 # hpux lint +# hpux lint +#LFLAGS= -Zn10000 -CFLAGS = @CFLAGS@ # This is set by autoconf. -#CFLAGS= -g # debug -#CFLAGS= -O # production -#CFLAGS= # Broken optimizers.... +# This is set by autoconf: +CFLAGS = @CFLAGS@ +# debug: +#CFLAGS= -g +# production: +#CFLAGS= -O +# Broken optimizers.... +#CFLAGS= #CFLAGS= -g -pg -DPROF #CFLAGS= -O -pg -DPROF # gcc 1.00-1.37 -#CFLAGS= -O -finline-functions -fstrength-reduce +#CFLAGS= -O -finline-functions -fstrength-reduce # gcc 1.37-1.40 -#CFLAGS= -O -fcombine-regs -finline-functions -fstrength-reduce +#CFLAGS= -O -fcombine-regs -finline-functions -fstrength-reduce # add -msoft-float for 68881 machines. # gcc 2.0 @@ -67,8 +72,10 @@ CFLAGS = @CFLAGS@ # This is set by auto #CFLAGS= -O -Mnodebug -Mnoperfmon # DEC Alpha OSF/1 -#CFLAGS= -O2 -Olimit 2000 ## Normal Optimization -#CFLAGS= -O3 -Olimit 2000 ## Full Optimization - may not work +## Normal Optimization +#CFLAGS= -O2 -Olimit 2000 +## Full Optimization - may not work +#CFLAGS= -O3 -Olimit 2000 #CF=-j #SUF=u #.SUFFIXES: .u @@ -77,7 +84,8 @@ CFLAGS = @CFLAGS@ # This is set by auto # global optimizer! (-O3). # On SGI 4.0+ you need to add -D__STDC__ too. #CFLAGS= -O3 -#CFLAGS= -O3 -Olimit 2000 ## Ultrix 4.2a +## Ultrix 4.2a +#CFLAGS= -O3 -Olimit 2000 #CF=-j #SUF=u #.SUFFIXES: .u ## Ultrix and gnu-make need that @@ -110,14 +118,14 @@ CFLAGS = @CFLAGS@ # This is set by auto # CFLAGS= -O3 # SINIX RMx00 -#CFLAGS= -O # -D_POSIX_SOURCE # -kansi +#CFLAGS= -O# -D_POSIX_SOURCE# -kansi # Apollo's with cc [apollo builtins don't work with gcc] # and apollo should not define __STDC__ if it does not have # the standard header files. RT's (aos4.3) need that too; # you might want to skip the -O on the rt's... Not very wise. # AIX/ESA needs -D_IBMESA on command line (this may disappear by GA) -#DFLAGS=-U__STDC__ +#DFLAGS=-U__STDC__ #DFLAGS=-D_IBMESA # On aix2.2.1 we need more compiler space. #DFLAGS=-Nd4000 -Nn3000 @@ -142,17 +150,25 @@ DFLAGS = -D_PATH_TCSHELL='"${bindir}/tcs ################################################################ ## LDFLAGS. Define something here if you need to ################################################################ -LDFLAGS= @LDFLAGS@ ## This is set by autoconf. -#LDFLAGS= ## The simplest, suitable for all. -#LDFLAGS= -s ## Stripped. Takes less space on disk. -#LDFLAGS= -s -n ## Pure executable. Spares paging over -# ## the network for machines with local -# ## swap but external /usr/local/bin . -#LDFLAGS= -s -n -Bstatic ## Without dynamic linking. (SunOS/cc) -#LDFLAGS= -s -n -static ## Without dynamic linking. (SunOS/gcc) -#LDFLAGS= -Wl,-s,-n ## Stripped, shared text (Unicos) -#LDFLAGS= -s -static ## Link statically. (linux) -#LDFLAGS= -s -N ## Impure executable (linux) +## This is set by autoconf: +LDFLAGS= @LDFLAGS@ +## The simplest, suitable for all. +#LDFLAGS= +## Stripped. Takes less space on disk. +#LDFLAGS= -s +## Pure executable. Spares paging over the network for machines with +## local swap but external /usr/local/bin . +#LDFLAGS= -s -n +## Without dynamic linking. (SunOS/cc) +#LDFLAGS= -s -n -Bstatic +## Without dynamic linking. (SunOS/gcc) +#LDFLAGS= -s -n -static +## Stripped, shared text (Unicos) +#LDFLAGS= -Wl,-s,-n +## Link statically. (linux) +#LDFLAGS= -s -static +## Impure executable (linux) +#LDFLAGS= -s -N ################################################################ ## SBINLDFLAGS. Flags to build a tcsh suitable for installation in @@ -164,53 +180,100 @@ SBINLDFLAGS=-Wl,-R/etc/lib,-I/etc/lib/ld ################################################################ ## LIBES. Pick one, or roll your own. ################################################################ -LIBES= @LIBS@ ## This is set by autoconf. -#LIBES= -ltermcap ## BSD style things -#LIBES= -ltermcap ## SunOS, HP-UX, pyramid -#LIBES= -ltermcap ## Linux -#LIBES= -ltermcap -lshadow ## Linux with PW_SHADOW -#LIBES= -ltermcap -lsec ## Tek XD88/10 (UTekV) with PW_SHADOW -#LIBES= -ltermcap -lsec ## Motorola MPC (sysV88) with PW_SHADOW -#LIBES= -ltermcap -lcs ## Mach -#LIBES= -ltermcap -lbsd ## DEC osf1 on the alpha -#LIBES= -ltermcap -lbsd ## Intel paragon -#LIBES= -ltermcap -lbsd ## Clipper intergraph -#LIBES= -ltermcap -lseq ## Sequent's Dynix -#LIBES= -ltermcap -lauth ## Ultrix with Enhanced Security -#LIBES= -ltermcap -ldir -lx ## Xenix 386 style things -#LIBES= -ltermcap -lndir -lsocket -ljobs ## masscomp RTU6.0 -#LIBES= -lcurses ## AIX on the rt -#LIBES= -lcurses ## TitanOS on the stellar -#LIBES= -ltermlib -lsocket -lnsl ## SysV4 w/o BSDTIMES or Solaris 2 -#LIBES= -lcurses ## SysV3 w/o networking -#LIBES= -lcurses -lnet ## SysV3 with networking -#LIBES= -lcurses -ldir ## SysV2 w/o networking & dirlib -#LIBES= -lcurses -ldir -lnet ## SysV2 with networking & dirlib -#LIBES= -lcurses -lbsd ## AIX on the IBM 370 or rs6000 or ps2 -#LIBES= -lcurses -lbsd ## ETA10 -#LIBES= -lcurses -lbsd ## Irix3.1 on the SGI-IRIS4D -#LIBES= -lcurses -lbsd -lc_s ## Irix3.3 on the SGI-IRIS4D w/o yp -#LIBES= -lcurses -lsun -lbsd -lc_s ## Irix3.3 on the SGI-IRIS4D with yp -#LIBES= -lcurses -lsocket -lbsd ## Amdahl UTS 2.1 -#LIBES= -lcurses -lsocket ## Intel's hypercube. -#LIBES= -lcurses -lsocket ## ns32000 based Opus. -#LIBES= -lcurses -lcposix ## ISC 2.2 without networking -#LIBES= -lcposix -lc_s -lcurses -linet ## ISC 2.2 with networking -#LIBES= -lcurses -lsec -lc_s ## ISC 2.0.2 without networking -#LIBES= -lcurses -linet -lsec -lc_s ## ISC 2.0.2 with networking -#LIBES= -lcurses -lintl -lcrypt ## SCO SysVR3.2v2.0 -#LIBES= -lcurses -lintl -lsocket -lcrypt ## SCO+ODT1.1 -#LIBES= -lposix -ltermcap ## A/UX 2.0 -#LIBES= -lposix -ltermcap -lc_s ## A/UX 3.0 -#LIBES= -ldirent -lcurses ## att3b1 cc w/o shared lib & dirlib -#LIBES= -shlib -ldirent -lcurses ## att3b1 gcc with shared lib & dirlib -#LIBES= -ltermlib -lsocket -lnsl -lc /usr/ucblib/libucb.a ## SysV4 with BSDTIMES -#LIBES= -lcurses -lnsl -lsocket -lc /usr/ucblib/libucb.a ## Stardent Vistra -#LIBES= -ltermc ## emx under OS/2 -#LIBES= ## Minix, VMS_POSIX -#LIBES= -ltermcap -lcrypt ## Multiflow -#LIBES= -ltermcap -lcrypt ## NetBSD -#LIBES= -lcurses ## DDE Supermax +## This is set by autoconf. +LIBES= @LIBS@ +## BSD style things +#LIBES= -ltermcap +## SunOS, HP-UX, pyramid +#LIBES= -ltermcap +## Linux +#LIBES= -ltermcap +## Linux with PW_SHADOW +#LIBES= -ltermcap -lshadow +## Tek XD88/10 (UTekV) with PW_SHADOW +#LIBES= -ltermcap -lsec +## Motorola MPC (sysV88) with PW_SHADOW +#LIBES= -ltermcap -lsec +## Mach +#LIBES= -ltermcap -lcs +## DEC osf1 on the alpha +#LIBES= -ltermcap -lbsd +## Intel paragon +#LIBES= -ltermcap -lbsd +## Clipper intergraph +#LIBES= -ltermcap -lbsd +## Sequent's Dynix +#LIBES= -ltermcap -lseq +## Ultrix with Enhanced Security +#LIBES= -ltermcap -lauth +## Xenix 386 style things +#LIBES= -ltermcap -ldir -lx +## masscomp RTU6.0 +#LIBES= -ltermcap -lndir -lsocket -ljobs +## AIX on the rt +#LIBES= -lcurses +## TitanOS on the stellar +#LIBES= -lcurses +## SysV4 w/o BSDTIMES or Solaris 2 +#LIBES= -ltermlib -lsocket -lnsl +## SysV3 w/o networking +#LIBES= -lcurses +## SysV3 with networking +#LIBES= -lcurses -lnet +## SysV2 w/o networking & dirlib +#LIBES= -lcurses -ldir +## SysV2 with networking & dirlib +#LIBES= -lcurses -ldir -lnet +## AIX on the IBM 370 or rs6000 or ps2 +#LIBES= -lcurses -lbsd +## ETA10 +#LIBES= -lcurses -lbsd +## Irix3.1 on the SGI-IRIS4D +#LIBES= -lcurses -lbsd +## Irix3.3 on the SGI-IRIS4D w/o yp +#LIBES= -lcurses -lbsd -lc_s +## Irix3.3 on the SGI-IRIS4D with yp +#LIBES= -lcurses -lsun -lbsd -lc_s +## Amdahl UTS 2.1 +#LIBES= -lcurses -lsocket -lbsd +## Intel's hypercube. +#LIBES= -lcurses -lsocket +## ns32000 based Opus. +#LIBES= -lcurses -lsocket +## ISC 2.2 without networking +#LIBES= -lcurses -lcposix +## ISC 2.2 with networking +#LIBES= -lcposix -lc_s -lcurses -linet +## ISC 2.0.2 without networking +#LIBES= -lcurses -lsec -lc_s +## ISC 2.0.2 with networking +#LIBES= -lcurses -linet -lsec -lc_s +## SCO SysVR3.2v2.0 +#LIBES= -lcurses -lintl -lcrypt +## SCO+ODT1.1 +#LIBES= -lcurses -lintl -lsocket -lcrypt +## A/UX 2.0 +#LIBES= -lposix -ltermcap +## A/UX 3.0 +#LIBES= -lposix -ltermcap -lc_s +## att3b1 cc w/o shared lib & dirlib +#LIBES= -ldirent -lcurses +## att3b1 gcc with shared lib & dirlib +#LIBES= -shlib -ldirent -lcurses +## SysV4 with BSDTIMES +#LIBES= -ltermlib -lsocket -lnsl -lc /usr/ucblib/libucb.a +## Stardent Vistra +#LIBES= -lcurses -lnsl -lsocket -lc /usr/ucblib/libucb.a +## emx under OS/2 +#LIBES= -ltermc +## Minix, VMS_POSIX +#LIBES= +## Multiflow +#LIBES= -ltermcap -lcrypt +## NetBSD +#LIBES= -ltermcap -lcrypt +## DDE Supermax +#LIBES= -lcurses ################################################################ ## EXTRAFLAGS and EXTRALIBS @@ -222,8 +285,10 @@ LIBES= @LIBS@ ## This is set by aut # #Solaris and HPUX require the BSD libraries with AFS. #We use -lc to use only what we require. -#AFSAUXLIB = -lsocket -lnsl -lc -lucb # Solaris -#AFSAUXLIB = -lc -lBSD # HPUX +# Solaris +#AFSAUXLIB = -lsocket -lnsl -lc -lucb +# HPUX +#AFSAUXLIB = -lc -lBSD # #AFSLIB = -L$(AFSLIBDIR) -L$(AFSLIBDIR)/afs -lkauth -lprot -lubik\ # -lauth -lrxkad -lsys -ldes -lrx -llwp -lcom_err\ @@ -244,26 +309,38 @@ EXTRALIBS = @HESLIB@ $(AFSLIB) @LIBICONV # will lose the editor and job control. # This is for setting your C preprocessor value. -CPP = @CPP@ # This is set by autoconf. +# This is set by autoconf. +CPP = @CPP@ # The -B tells gcc to use /bin/ld. This is to avoid using the gnu ld, which # on the suns does not know how to make dynamically linked binaries. -CC = @CC@ # This is set by autoconf. +# This is set by autoconf. +CC = @CC@ #CC= gcc -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Werror -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wsign-compare -Wcast-qual -Wreturn-type -Wswitch -Wshadow -Wwrite-strings -Wextra -#CC= gcc -Wall -pipe -B/bin/ # -ansi -pedantic -#CC= gcc -m486 -pipe -Wall # Generate code for Intel 486 (linux) -#CC= shlicc # BSDI2.1 w/ shared libraries +# -ansi -pedantic +#CC= gcc -Wall -pipe -B/bin/ +# Generate code for Intel 486 (linux) +#CC= gcc -m486 -pipe -Wall +# BSDI2.1 w/ shared libraries +#CC= shlicc #CC= cc #CC= occ #CC= acc #CC= pcc #CC= hc -w -#CC= c89 # For VMS/POSIX -#CC= /bin/cc # For suns, w/o gcc and SVR4 -#CC= /usr/lib/sun.compile/cc # FPS 500 (+FPX) with Sun C compiler -#CC= /opt/SUNWspro/bin/cc # Solaris 2.1 -#CC= scc # Alliant fx2800 -#CC= cc -h0,ansi,novector,float0 # for NEC SX-4 +# For VMS/POSIX +#CC= c89 +# For suns, w/o gcc and SVR4 +#CC= /bin/cc +# FPS 500 (+FPX) with Sun C compiler +#CC= /usr/lib/sun.compile/cc +# Solaris 2.1 +#CC= /opt/SUNWspro/bin/cc +# Alliant fx2800 +#CC= scc +# for NEC SX-4 +#CC= cc -h0,ansi,novector,float0 #CC= lcc -wa +CC_FOR_GETHOST = @CC_FOR_GETHOST@ ED= ed AS= as RM= rm @@ -272,8 +349,10 @@ VGRIND= csh /usr/ucb/vgrind CTAGS= /usr/ucb/ctags #XSTR= /usr/ucb/xstr SCCS= /usr/local/sccs -PARALLEL=12 # Make the multi-max run fast. -#P=& # Use Sequent's parallel make +# Make the multi-max run fast. +PARALLEL=12 +# Use Sequent's parallel make +#P=& P= prefix=@prefix@ exec_prefix=@exec_prefix@ @@ -282,12 +361,17 @@ mandir=@datarootdir@/man MANSECT=1 DESTBIN=${DESTDIR}${bindir} DESTMAN=${DESTDIR}${mandir}/man${MANSECT} -# DESTMAN=${DESTDIR}/catman/man${MANSECT} # A/UX -# DESTMAN=${DESTDIR}/usr/share/man/man${MANSECT} # Stardent Vistra (SysVR4) -# DESTMAN=/usr/catman/1l # Amiga unix (SysVR4) +# A/UX +# DESTMAN=${DESTDIR}/catman/man${MANSECT} +# Stardent Vistra (SysVR4) +# DESTMAN=${DESTDIR}/usr/share/man/man${MANSECT} +# Amiga unix (SysVR4) +# DESTMAN=/usr/catman/1l EXEEXT=@EXEEXT@ FTPAREA=/usr/spool/ftp +BUILD_CATALOGS = @BUILD_CATALOGS@ + ASSRCS= sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \ sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \ sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \ @@ -330,9 +414,9 @@ AVSRCS= Fixes MAKEDIFFS MAKESHAR NewThin host.defs gethost.c tcsh.man2html configure.in configure config.h.in \ tests/testsuite.at TESTFILES= tests/aliases.at tests/arguments.at tests/commands.at \ - tests/expr.at tests/lexical.at tests/mb-eucjp.at tests/mb-utf8.at \ - tests/noexec.at tests/syntax.at tests/subst.at tests/variables.at \ - tests/sh.dol.at + tests/expr.at tests/lexical.at tests/mb-eucjp.at \ + tests/mb-utf8.at tests/noexec.at tests/syntax.at tests/subst.at \ + tests/variables.at tests/sh.dol.at VHSRCS=${PVSRCS} ${AVSRCS} @@ -345,7 +429,7 @@ DISTSRCS= ${PSSRCS} ${TWSRCS} ${EDSRCS} OBJS= ${SHOBJS} ${TWOBJS} ${EDOBJS} ${TCOBJS} -all: ${BUILD} +all: ${BUILD} catalogs tcsh$(EXEEXT):$(P) ${OBJS} rm -f tcsh$(EXEEXT) core @@ -365,7 +449,7 @@ pure:$(P) ${OBJS} gethost: gethost.c sh.err.h tc.const.h sh.h rm -f gethost - ${CC} -o gethost ${LDFLAGS} ${CFLAGS} ${CPPFLAGS} ${DFLAGS} $(srcdir)/gethost.c ${LIBES} ${EXTRALIBS} + ${CC_FOR_GETHOST} -o gethost ${CPPFLAGS} $(srcdir)/gethost.c tc.defs.c: gethost host.defs @rm -f $@.tmp @@ -463,7 +547,7 @@ $(srcdir)/tests/package.m4: $(srcdir)/co echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \ } >$(srcdir)/tests/package.m4 -$(srcdir)/tests/testsuite: $(srcdir)/tests/package.m4 $(srcdir}/tests/testsuite.at $(TESTFILES) +$(srcdir)/tests/testsuite: $(srcdir)/tests/package.m4 $(srcdir)/tests/testsuite.at $(TESTFILES) autom4te --language=autotest -I $(srcdir)/tests \ $(srcdir)/tests/testsuite.at -o $@.tmp mv $@.tmp $@ @@ -511,20 +595,36 @@ vgrind: install-strip: install -install: tcsh$(EXEEXT) +install: tcsh$(EXEEXT) install.catalogs install.man -mkdir -p ${DESTBIN} -mv -f ${DESTBIN}/tcsh$(EXEEXT) ${DESTBIN}/tcsh.old cp tcsh$(EXEEXT) ${DESTBIN}/tcsh$(EXEEXT) -strip ${DESTBIN}/tcsh$(EXEEXT) chmod 755 ${DESTBIN}/tcsh$(EXEEXT) +install.catalogs: + @test "x${BUILD_CATALOGS}" = "xyes" && (cd nls; ${MAKE} install DESTDIR=${DESTDIR}) || exit 0 + install.man: tcsh.man -mkdir -p ${DESTMAN} -rm -f ${DESTMAN}/tcsh.${MANSECT} cp $(srcdir)/tcsh.man ${DESTMAN}/tcsh.${MANSECT} chmod 444 ${DESTMAN}/tcsh.${MANSECT} -install.cygwin: install install.man +# Amiga Unix +#install.man: tcsh.man +# compress tcsh.man +# cp tcsh.man.Z ${DESTMAN}/tcsh.Z +# chmod 444 ${DESTMAN}/tcsh.Z + +# Apple A/UX +#install.man: tcsh.man +# -rm -f ${DESTMAN}/tcsh.${MANSECT}.Z +# nroff -man tcsh.man | compress > ${DESTMAN}/tcsh.${MANSECT}.Z +# chmod 444 ${DESTMAN}/tcsh.${MANSECT}.Z + +install.cygwin: install + -gzip ${DESTMAN}/tcsh.${MANSECT} -mkdir -p ${DESTDIR}${prefix}/share/doc/tcsh cp ${srcdir}/FAQ ${srcdir}/Fixes ${DESTDIR}${prefix}/share/doc/tcsh cp ${srcdir}/NewThings ${srcdir}/README ${DESTDIR}${prefix}/share/doc/tcsh @@ -542,24 +642,15 @@ install.cygwin: install install.man cp -p ${srcdir}/cygwin/postinstall.sh ${DESTDIR}/etc/postinstall/tcsh.sh cp -p ${srcdir}/cygwin/preremove.sh ${DESTDIR}/etc/preremove/tcsh.sh -# Amiga Unix -#install.man: tcsh.man -# compress tcsh.man -# cp tcsh.man.Z ${DESTMAN}/tcsh.Z -# chmod 444 ${DESTMAN}/tcsh.Z - -# Apple A/UX -#install.man: tcsh.man -# -rm -f ${DESTMAN}/tcsh.${MANSECT}.Z -# nroff -man tcsh.man | compress > ${DESTMAN}/tcsh.${MANSECT}.Z -# chmod 444 ${DESTMAN}/tcsh.${MANSECT}.Z - -clean: +clean: clean.catalogs ${RM} -f a.out strings x.c xs.c tcsh$(EXEEXT) tcsh.a _MAKE_LOG gethost ${RM} -f *.${SUF} *.i *.s ${RM} -f sh.prof.c ed.defns.h tc.const.h sh.err.h tc.defs.c ${RM} -f tcsh.*.m tcsh.*.cat +clean.catalogs: + @test "x${BUILD_CATALOGS}" = "xyes" && (cd nls; ${MAKE} clean) || exit 0 + veryclean: clean ${RM} -f Makefile config.h config_p.h ${RM} -f config.status config.cache config.log tcsh.ps @@ -607,7 +698,7 @@ shar: rm -rf tcsh-${VERSION} catalogs: - @(cd nls; make catalogs) + @test "x${BUILD_CATALOGS}" = "xyes" && (cd nls; ${MAKE} catalogs) || exit 0 tcsh-${VERSION}.tar.Z: rm -rf tcsh-${VERSION} Modified: stable/7/contrib/tcsh/Ported ============================================================================== --- stable/7/contrib/tcsh/Ported Wed Mar 7 22:09:40 2012 (r232673) +++ stable/7/contrib/tcsh/Ported Wed Mar 7 22:19:43 2012 (r232674) @@ -7,7 +7,7 @@ find it out-of-date, or you have additio christos -VENDOR : sun +VENDOR : Sun MODELS : sun3, sun4, sun386i COMPILER: cc, gcc, acc CFLAGS : normal @@ -18,7 +18,7 @@ ENVIRON : n/a NOTES : Don't compile with /usr/5bin/cc VERSION : 6.08 -VENDOR : sun +VENDOR : Sun MODELS : sun4, ultra COMPILER: cc, gcc CFLAGS : normal @@ -34,18 +34,29 @@ NOTES : The sunpro compiler cannot compi : point failures of programs exec'ed from tcsh. VERSION : 6.08 -VENDOR : sun +VENDOR : Sun MODELS : ultra COMPILER: WorkShop cc CFLAGS : normal LIBES : -lcurses -lsocket -lnsl -OS : solaris 2.6 +OS : solaris 2.6, 2.7, 8 CONFIG : sol26 ENVIRON : n/a NOTES : none VERSION : 6.08 -VENDOR : sun +VENDOR : Sun +MODELS : ultra, i686, x86_64 +COMPILER: Sun Studio cc +CFLAGS : normal +LIBES : -lcurses -lsocket -lnsl +OS : solaris 9, 10 +CONFIG : sol29 +ENVIRON : n/a +NOTES : none +VERSION : 6.18 + +VENDOR : Sun MODELS : i386 COMPILER: cc, gcc CFLAGS : -D__STDC__=0 @@ -56,7 +67,7 @@ ENVIRON : n/a NOTES : n/a VERSION : 6.04.13 -VENDOR : sun +VENDOR : Sun MODELS : sun4 COMPILER: gcc CFLAGS : normal Modified: stable/7/contrib/tcsh/README ============================================================================== --- stable/7/contrib/tcsh/README Wed Mar 7 22:09:40 2012 (r232673) +++ stable/7/contrib/tcsh/README Wed Mar 7 22:19:43 2012 (r232674) @@ -1,4 +1,4 @@ -This is tcsh version 6.17.00. Tcsh is a version of the Berkeley +This is tcsh version 6.18.01. Tcsh is a version of the Berkeley C-Shell, with the addition of: a command line editor, command and file name completion, listing, etc. and a bunch of small additions to the shell itself. @@ -87,7 +87,7 @@ To install tcsh: 10) Enjoy. -12) PLEASE file any bug reports (and fixes), code for new features at: +11) PLEASE file any bug reports (and fixes), code for new features at: http://bugs.gw.com/ Modified: stable/7/contrib/tcsh/WishList ============================================================================== --- stable/7/contrib/tcsh/WishList Wed Mar 7 22:09:40 2012 (r232673) +++ stable/7/contrib/tcsh/WishList Wed Mar 7 22:19:43 2012 (r232674) @@ -52,17 +52,6 @@ ey ) - bhooglan _________________________________________________________________ - I'm a long-time faithful user of tcsh, and one thing has always bugged - me -- the need to type "rehash" at a prompt when adding a new command. - My suggestions is to change tcsh so before printing "Command not - found.", it first searches its entire path and rebuilds its hash - table. Only after doing this, and if the command is still not in the - path, then print "Command not found.". I realize there are some - extreme cases in which this is suboptimal, but in most cases with - normal users this would be a big win, and simplify the manual and - perhaps even the code. - _________________________________________________________________ - Wish "tcsh -l" would accept other flags. At least "-c". Currently I can't get ssh to have the right environment unless it is a Modified: stable/7/contrib/tcsh/complete.tcsh ============================================================================== --- stable/7/contrib/tcsh/complete.tcsh Wed Mar 7 22:09:40 2012 (r232673) +++ stable/7/contrib/tcsh/complete.tcsh Wed Mar 7 22:19:43 2012 (r232674) @@ -1,5 +1,5 @@ # -# $tcsh: complete.tcsh,v 1.51 2007/10/01 21:51:59 christos Exp $ +# $tcsh: complete.tcsh,v 1.52 2010/05/07 17:54:13 christos Exp $ # example file using the new completion code # # Debian GNU/Linux @@ -636,7 +636,7 @@ if ($?_complete) then complete nmap 'n@-e@`ifconfig -l`@' 'p/*/$hostnames/' complete perldoc 'n@*@`\ls -1 /usr/libdata/perl/5.*/pod | sed s%\\.pod.\*\$%%`@' complete postfix 'n/*/(start stop reload abort flush check)/' - complete postmap 'n/1/(hash: regexp:)' 'c/hash:/f/' 'c/regexp:/f/' + complete postmap 'n/1/(hash: regexp:)/' 'c/hash:/f/' 'c/regexp:/f/' complete rcsdiff 'p@1@`\ls -1a RCS | sed -e "s/\(.*\),v/\1/"`@' complete X 'c/-/(I a ac allowMouseOpenFail allowNonLocalModInDev \ allowNonLocalXvidtune ar1 ar2 audit auth bestRefresh \ Modified: stable/7/contrib/tcsh/config.guess ============================================================================== --- stable/7/contrib/tcsh/config.guess Wed Mar 7 22:09:40 2012 (r232673) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 22:39:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 626A5106566C; Wed, 7 Mar 2012 22:39:12 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 521368FC12; Wed, 7 Mar 2012 22:39:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q27MdCeT013630; Wed, 7 Mar 2012 22:39:12 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q27MdCj1013628; Wed, 7 Mar 2012 22:39:12 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201203072239.q27MdCj1013628@svn.freebsd.org> From: "Kenneth D. Merry" Date: Wed, 7 Mar 2012 22:39:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232675 - head/sys/dev/mps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 22:39:12 -0000 Author: ken Date: Wed Mar 7 22:39:11 2012 New Revision: 232675 URL: http://svn.freebsd.org/changeset/base/232675 Log: Make the mps(4) module depend on the cam module. Submitted by: Mykola Dzham MFC after: 3 days Modified: head/sys/dev/mps/mps_pci.c Modified: head/sys/dev/mps/mps_pci.c ============================================================================== --- head/sys/dev/mps/mps_pci.c Wed Mar 7 22:19:43 2012 (r232674) +++ head/sys/dev/mps/mps_pci.c Wed Mar 7 22:39:11 2012 (r232675) @@ -87,6 +87,7 @@ static driver_t mps_pci_driver = { static devclass_t mps_devclass; DRIVER_MODULE(mps, pci, mps_pci_driver, mps_devclass, 0, 0); +MODULE_DEPEND(mps, cam, 1, 1, 1); struct mps_ident { uint16_t vendor; From owner-svn-src-all@FreeBSD.ORG Wed Mar 7 23:57:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 594D71065670; Wed, 7 Mar 2012 23:57:50 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 48DE58FC14; Wed, 7 Mar 2012 23:57:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q27Nvorx016186; Wed, 7 Mar 2012 23:57:50 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q27NvoDJ016184; Wed, 7 Mar 2012 23:57:50 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201203072357.q27NvoDJ016184@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 7 Mar 2012 23:57:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232676 - head/usr.sbin/acpi/iasl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 23:57:50 -0000 Author: jkim Date: Wed Mar 7 23:57:49 2012 New Revision: 232676 URL: http://svn.freebsd.org/changeset/base/232676 Log: Make parallel build more safer. Reviewed by: tijl Modified: head/usr.sbin/acpi/iasl/Makefile Modified: head/usr.sbin/acpi/iasl/Makefile ============================================================================== --- head/usr.sbin/acpi/iasl/Makefile Wed Mar 7 22:39:11 2012 (r232675) +++ head/usr.sbin/acpi/iasl/Makefile Wed Mar 7 23:57:49 2012 (r232676) @@ -75,19 +75,21 @@ CLEANFILES= aslcompiler.y.h aslcompilerl aslcompilerlex.c: aslcompiler.l ${LEX} ${LFLAGS} -PAslCompiler -o${.TARGET} ${.ALLSRC} -aslcompilerparse.c: aslcompiler.y - ${YACC} ${YFLAGS} -pAslCompiler -o${.TARGET} ${.ALLSRC} +.ORDER: aslcompilerparse.c aslcompilerparse.h +aslcompilerparse.c aslcompilerparse.h: aslcompiler.y + ${YACC} ${YFLAGS} -pAslCompiler -oaslcompilerparse.c ${.ALLSRC} -aslcompiler.y.h: aslcompilerparse.c - mv -f aslcompilerparse.h ${.TARGET} +aslcompiler.y.h: aslcompilerparse.h + ln -f ${.ALLSRC} ${.TARGET} dtparserlex.c: dtparser.l ${LEX} ${LFLAGS} -PDtParser -o${.TARGET} ${.ALLSRC} -dtparserparse.c: dtparser.y - ${YACC} ${YFLAGS} -pDtParser -o${.TARGET} ${.ALLSRC} +.ORDER: dtparserparse.c dtparserparse.h +dtparserparse.c dtparserparse.h: dtparser.y + ${YACC} ${YFLAGS} -pDtParser -odtparserparse.c ${.ALLSRC} -dtparser.y.h: dtparserparse.c - mv -f dtparserparse.h ${.TARGET} +dtparser.y.h: dtparserparse.h + ln -f ${.ALLSRC} ${.TARGET} .include From owner-svn-src-all@FreeBSD.ORG Thu Mar 8 00:03:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 9564B106566B; Thu, 8 Mar 2012 00:03:42 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: "src-committers@freebsd.org" Date: Wed, 7 Mar 2012 19:03:23 -0500 User-Agent: KMail/1.6.2 References: <201203051953.q25JrIS1002269@svn.freebsd.org> <201203071700.21259.jkim@FreeBSD.org> In-Reply-To: <201203071700.21259.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Multipart/Mixed; boundary="Boundary-00=_Yd/VPakYDBLxXp2" Message-Id: <201203071903.36731.jkim@FreeBSD.org> Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , John Baldwin Subject: Re: svn commit: r232570 - head/sys/boot/i386/boot2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2012 00:03:42 -0000 --Boundary-00=_Yd/VPakYDBLxXp2 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Wednesday 07 March 2012 05:00 pm, Jung-uk Kim wrote: > On Monday 05 March 2012 02:53 pm, John Baldwin wrote: > > Author: jhb > > Date: Mon Mar 5 19:53:17 2012 > > New Revision: 232570 > > URL: http://svn.freebsd.org/changeset/base/232570 > > > > Log: > > Fix boot2 to handle boot config files that only contain a > > custom path to a loader or kernel. Specifically, kname cannot be > > pointed at cmd[] since it's value is change to be an empty string > > after the initial call to parse, and cmd[]'s value can be changed > > (thus losing a prior setting for kname) due to user input at the > > boot prompt. While here, ensure that that initial boot config > > file text is nul-terminated, that ops is initialized to zero, and > > that kname is always initialized to a valid string. > > As many people pointed out, Clang overflows boot2 again after this > commit. Long long time ago, I asked this question on arch@: > > http://docs.freebsd.org/cgi/mid.cgi?200509081418.47794.jkim > > Why can't we do that now? Can't we build separate ufs1-only and > ufs2-only boot2's, at least? Having ufs1+ufs2 boot block is great > but I see very little benefit to support that in 2012. :-/ FYI, this patch does the separation. Also available from here: http://people.freebsd.org/~jkim/boot2.diff Jung-uk Kim --Boundary-00=_Yd/VPakYDBLxXp2 Content-Type: text/plain; charset="iso-8859-1"; name="boot2.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="boot2.diff" Index: sys/boot/i386/Makefile =================================================================== --- sys/boot/i386/Makefile (revision 232670) +++ sys/boot/i386/Makefile (working copy) @@ -2,8 +2,8 @@ .include -SUBDIR= mbr pmbr boot0 boot0sio btx boot2 cdboot gptboot kgzldr \ - libi386 libfirewire loader +SUBDIR= mbr pmbr boot0 boot0sio btx boot2 boot2ufs1 cdboot gptboot \ + kgzldr libi386 libfirewire loader # special boot programs, 'self-extracting boot2+loader' SUBDIR+= pxeldr Index: sys/boot/i386/boot2/Makefile =================================================================== --- sys/boot/i386/boot2/Makefile (revision 232670) +++ sys/boot/i386/boot2/Makefile (working copy) @@ -2,8 +2,10 @@ .include -FILES= boot boot1 boot2 +FILES= boot${BOOT_SUFFIX} boot2${BOOT2_SUFFIX} +SRCDIR= ${.CURDIR}/../boot2 + NM?= nm # A value of 0x80 enables LBA support. @@ -18,10 +20,22 @@ ORG1= 0x7c00 ORG2= 0x2000 # Decide level of UFS support. -BOOT2_UFS?= UFS1_AND_UFS2 -#BOOT2_UFS?= UFS2_ONLY -#BOOT2_UFS?= UFS1_ONLY +BOOT2_UFS?= UFS2_ONLY +#BOOT2_UFS?= UFS1_AND_UFS2 +.if ${BOOT2_UFS} != UFS1_ONLY +FILES+= boot1 +.endif +.if ${BOOT2_UFS} == UFS1_ONLY +BOOT_SUFFIX= .ufs1 +BOOT2_SUFFIX= ufs1 +.elif ${BOOT2_UFS} == UFS2_ONLY +BOOT_SUFFIX= .ufs2 +BOOT2_SUFFIX= ufs2 +LINKS= ${BINDIR}/boot${BOOT_SUFFIX} ${BINDIR}/boot \ + ${BINDIR}/boot2${BOOT2_SUFFIX} ${BINDIR}/boot2 +.endif + CFLAGS= -Os \ -fno-guess-branch-probability \ -fomit-frame-pointer \ @@ -50,8 +64,8 @@ LDFLAGS=-static -N --gc-sections CLEANFILES= boot -boot: boot1 boot2 - cat boot1 boot2 > boot +boot${BOOT_SUFFIX}: boot1 boot2${BOOT2_SUFFIX} + cat ${.ALLSRC} > ${.TARGET} CLEANFILES+= boot1 boot1.out boot1.o @@ -64,7 +78,7 @@ boot1.out: boot1.o CLEANFILES+= boot2 boot2.ld boot2.ldr boot2.bin boot2.out boot2.o \ boot2.s boot2.s.tmp boot2.h sio.o -boot2: boot2.ld +boot2${BOOT2_SUFFIX}: boot2.ld @set -- `ls -l boot2.ld`; x=$$((7680-$$5)); \ echo "$$x bytes available"; test $$x -ge 0 dd if=boot2.ld of=${.TARGET} obs=7680 conv=osync @@ -88,7 +102,7 @@ boot2.o: boot2.s SRCS= boot2.c boot2.h boot2.s: boot2.c boot2.h ${.CURDIR}/../../common/ufsread.c - ${CC} ${CFLAGS} -S -o boot2.s.tmp ${.CURDIR}/boot2.c + ${CC} ${CFLAGS} -S -o boot2.s.tmp ${SRCDIR}/boot2.c sed -e '/align/d' -e '/nop/d' < boot2.s.tmp > boot2.s rm -f boot2.s.tmp Index: sys/boot/i386/boot2ufs1/Makefile =================================================================== --- sys/boot/i386/boot2ufs1/Makefile (revision 0) +++ sys/boot/i386/boot2ufs1/Makefile (working copy) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../boot2 + +BOOT2_UFS= UFS1_ONLY + +.include "${.CURDIR}/../boot2/Makefile" Property changes on: sys/boot/i386/boot2ufs1/Makefile ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property --Boundary-00=_Yd/VPakYDBLxXp2-- From owner-svn-src-all@FreeBSD.ORG Thu Mar 8 01:10:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96A6C106564A; Thu, 8 Mar 2012 01:10:24 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 836E08FC08; Thu, 8 Mar 2012 01:10:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q281AOww018685; Thu, 8 Mar 2012 01:10:24 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q281AO9X018679; Thu, 8 Mar 2012 01:10:24 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201203080110.q281AO9X018679@svn.freebsd.org> From: Justin Hibbits Date: Thu, 8 Mar 2012 01:10:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232677 - in stable/9: etc/devd sys/conf sys/powerpc/conf sys/powerpc/powermac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2012 01:10:24 -0000 Author: jhibbits Date: Thu Mar 8 01:10:23 2012 New Revision: 232677 URL: http://svn.freebsd.org/changeset/base/232677 Log: MFC r232177: Add backlight control to ATI-graphics PowerBooks and iBooks. Approved by: nwhitehorn (mentor) Added: stable/9/sys/powerpc/powermac/atibl.c - copied unchanged from r232177, head/sys/powerpc/powermac/atibl.c Modified: stable/9/etc/devd/apple.conf stable/9/sys/conf/files.powerpc stable/9/sys/powerpc/conf/GENERIC stable/9/sys/powerpc/conf/GENERIC64 Directory Properties: stable/9/etc/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/etc/devd/apple.conf ============================================================================== --- stable/9/etc/devd/apple.conf Wed Mar 7 23:57:49 2012 (r232676) +++ stable/9/etc/devd/apple.conf Thu Mar 8 01:10:23 2012 (r232677) @@ -19,6 +19,26 @@ notify 0 { }; +# The next blocks enable brightness hotkeys that can be found on Apple laptops +notify 0 { + match "system" "PMU"; + match "subsystem" "keys"; + match "type" "brightness"; + match "notify" "down"; + action "sysctl dev.backlight.0.level=\ + $(expr `sysctl -n dev.backlight.0.level` - 10)"; +}; + +notify 0 { + match "system" "PMU"; + match "subsystem" "keys"; + match "type" "brightness"; + match "notify" "up"; + action "sysctl dev.backlight.0.level=\ + $(expr `sysctl -n dev.backlight.0.level` + 10)"; +}; + + # The next blocks enable volume hotkeys that can be found on Apple laptops notify 0 { match "system" "PMU"; Modified: stable/9/sys/conf/files.powerpc ============================================================================== --- stable/9/sys/conf/files.powerpc Wed Mar 7 23:57:49 2012 (r232676) +++ stable/9/sys/conf/files.powerpc Thu Mar 8 01:10:23 2012 (r232677) @@ -144,6 +144,7 @@ powerpc/ofw/rtas.c optional aim powerpc/powermac/ata_kauai.c optional powermac ata | powermac atamacio powerpc/powermac/ata_macio.c optional powermac ata | powermac atamacio powerpc/powermac/ata_dbdma.c optional powermac ata | powermac atamacio +powerpc/powermac/atibl.c optional powermac atibl powerpc/powermac/cuda.c optional powermac cuda powerpc/powermac/cpcht.c optional powermac pci powerpc/powermac/dbdma.c optional powermac pci Modified: stable/9/sys/powerpc/conf/GENERIC ============================================================================== --- stable/9/sys/powerpc/conf/GENERIC Wed Mar 7 23:57:49 2012 (r232676) +++ stable/9/sys/powerpc/conf/GENERIC Thu Mar 8 01:10:23 2012 (r232677) @@ -177,6 +177,7 @@ device max6690 # PowerMac7,2 temperatu device powermac_nvram # Open Firmware configuration NVRAM device smu # Apple System Management Unit device windtunnel # Apple G4 MDD fan controller +device atibl # ATI-based backlight driver for PowerBooks/iBooks # ADB support device adb Modified: stable/9/sys/powerpc/conf/GENERIC64 ============================================================================== --- stable/9/sys/powerpc/conf/GENERIC64 Wed Mar 7 23:57:49 2012 (r232676) +++ stable/9/sys/powerpc/conf/GENERIC64 Thu Mar 8 01:10:23 2012 (r232677) @@ -184,6 +184,7 @@ device fcu # Apple Fan Control Unit device max6690 # PowerMac7,2 temperature sensor device powermac_nvram # Open Firmware configuration NVRAM device smu # Apple System Management Unit +device atibl # ATI-based backlight driver for PowerBooks/iBooks # ADB support device adb Copied: stable/9/sys/powerpc/powermac/atibl.c (from r232177, head/sys/powerpc/powermac/atibl.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/sys/powerpc/powermac/atibl.c Thu Mar 8 01:10:23 2012 (r232677, copy of r232177, head/sys/powerpc/powermac/atibl.c) @@ -0,0 +1,196 @@ +/*- + * Copyright (c) 2012 Justin Hibbits + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +/* From the xf86-video-ati driver's radeon_reg.h */ +#define RADEON_LVDS_GEN_CNTL 0x02d0 +#define RADEON_LVDS_ON (1 << 0) +#define RADEON_LVDS_DISPLAY_DIS (1 << 1) +#define RADEON_LVDS_PANEL_TYPE (1 << 2) +#define RADEON_LVDS_PANEL_FORMAT (1 << 3) +#define RADEON_LVDS_RST_FM (1 << 6) +#define RADEON_LVDS_EN (1 << 7) +#define RADEON_LVDS_BL_MOD_LEVEL_SHIFT 8 +#define RADEON_LVDS_BL_MOD_LEVEL_MASK (0xff << 8) +#define RADEON_LVDS_BL_MOD_EN (1 << 16) +#define RADEON_LVDS_DIGON (1 << 18) +#define RADEON_LVDS_BLON (1 << 19) + +struct atibl_softc { + device_t dev; + struct resource *sc_memr; +}; + +static void atibl_identify(driver_t *driver, device_t parent); +static int atibl_probe(device_t dev); +static int atibl_attach(device_t dev); +static int atibl_setlevel(struct atibl_softc *sc, int newlevel); +static int atibl_getlevel(struct atibl_softc *sc); +static int atibl_sysctl(SYSCTL_HANDLER_ARGS); + +static device_method_t atibl_methods[] = { + /* Device interface */ + DEVMETHOD(device_identify, atibl_identify), + DEVMETHOD(device_probe, atibl_probe), + DEVMETHOD(device_attach, atibl_attach), + {0, 0}, +}; + +static driver_t atibl_driver = { + "backlight", + atibl_methods, + sizeof(struct atibl_softc) +}; + +static devclass_t atibl_devclass; + +DRIVER_MODULE(atibl, vgapci, atibl_driver, atibl_devclass, 0, 0); + +static void +atibl_identify(driver_t *driver, device_t parent) +{ + if (device_find_child(parent, "backlight", -1) == NULL) + device_add_child(parent, "backlight", -1); +} + +static int +atibl_probe(device_t dev) +{ + char control[8]; + phandle_t handle; + + handle = OF_finddevice("mac-io/backlight"); + + if (handle <= 0) + return (ENXIO); + + if (OF_getprop(handle, "backlight-control", &control, sizeof(control)) < 0) + return (ENXIO); + + if (strcmp(control, "ati") != 0) + return (ENXIO); + + device_set_desc(dev, "PowerBook backlight"); + + return (0); +} + +static int +atibl_attach(device_t dev) +{ + struct atibl_softc *sc; + struct sysctl_ctx_list *ctx; + struct sysctl_oid *tree; + int rid; + + sc = device_get_softc(dev); + + rid = 0x18; /* BAR[2], for the MMIO register */ + sc->sc_memr = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE | RF_SHAREABLE); + if (sc->sc_memr == NULL) { + device_printf(dev, "Could not alloc mem resource!\n"); + return (ENXIO); + } + + ctx = device_get_sysctl_ctx(dev); + tree = device_get_sysctl_tree(dev); + + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "level", CTLTYPE_INT | CTLFLAG_RW, sc, 0, + atibl_sysctl, "I", "Backlight level (0-100)"); + + return (0); +} + +static int +atibl_setlevel(struct atibl_softc *sc, int newlevel) +{ + uint32_t lvds_gen_cntl; + + if (newlevel > 100) + newlevel = 100; + + if (newlevel < 0) + newlevel = 0; + + newlevel = (newlevel * 5) / 2 + 5; + lvds_gen_cntl = bus_read_4(sc->sc_memr, RADEON_LVDS_GEN_CNTL); + lvds_gen_cntl |= RADEON_LVDS_BL_MOD_EN; + lvds_gen_cntl &= ~RADEON_LVDS_BL_MOD_LEVEL_MASK; + lvds_gen_cntl |= (newlevel << RADEON_LVDS_BL_MOD_LEVEL_SHIFT) & + RADEON_LVDS_BL_MOD_LEVEL_MASK; + bus_write_4(sc->sc_memr, RADEON_LVDS_GEN_CNTL, lvds_gen_cntl); + + return (0); +} + +static int +atibl_getlevel(struct atibl_softc *sc) +{ + uint32_t lvds_gen_cntl; + int level; + + lvds_gen_cntl = bus_read_4(sc->sc_memr, RADEON_LVDS_GEN_CNTL); + + level = ((lvds_gen_cntl & RADEON_LVDS_BL_MOD_LEVEL_MASK) >> + RADEON_LVDS_BL_MOD_LEVEL_SHIFT); + level = ((level - 5) * 2) / 5; + + return (level); +} + +static int +atibl_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct atibl_softc *sc; + int newlevel, error; + + sc = arg1; + + newlevel = atibl_getlevel(sc); + + error = sysctl_handle_int(oidp, &newlevel, 0, req); + + if (error || !req->newptr) + return (error); + + return (atibl_setlevel(sc, newlevel)); +} From owner-svn-src-all@FreeBSD.ORG Thu Mar 8 01:37:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 20FD31065677; Thu, 8 Mar 2012 01:37:01 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CE6938FC12; Thu, 8 Mar 2012 01:37:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q281b1X0019576; Thu, 8 Mar 2012 01:37:01 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q281b1cg019574; Thu, 8 Mar 2012 01:37:01 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201203080137.q281b1cg019574@svn.freebsd.org> From: Ed Maste Date: Thu, 8 Mar 2012 01:37:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232678 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2012 01:37:02 -0000 Author: emaste Date: Thu Mar 8 01:37:01 2012 New Revision: 232678 URL: http://svn.freebsd.org/changeset/base/232678 Log: Inbound TCP-MD5 digest validation is now supported Modified: head/share/man/man4/tcp.4 Modified: head/share/man/man4/tcp.4 ============================================================================== --- head/share/man/man4/tcp.4 Thu Mar 8 01:10:23 2012 (r232677) +++ head/share/man/man4/tcp.4 Thu Mar 8 01:37:01 2012 (r232678) @@ -38,7 +38,7 @@ .\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd February 5, 2012 +.Dd March 7, 2012 .Dt TCP 4 .Os .Sh NAME @@ -255,8 +255,9 @@ or the internal send buffer is filled. .It Dv TCP_MD5SIG This option enables the use of MD5 digests (also known as TCP-MD5) on writes to the specified socket. -In the current release, only outgoing traffic is digested; -digests on incoming traffic are not verified. +Outgoing traffic is digested; +digests on incoming traffic are verified +if the net.inet.tcp.signature_verify_input sysctl is nonzero. The current default behavior for the system is to respond to a system advertising this option with TCP-MD5; this may change. .Pp From owner-svn-src-all@FreeBSD.ORG Thu Mar 8 01:47:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 38B2D106564A; Thu, 8 Mar 2012 01:47:13 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 27D958FC12; Thu, 8 Mar 2012 01:47:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q281lDDP019911; Thu, 8 Mar 2012 01:47:13 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q281lCGN019909; Thu, 8 Mar 2012 01:47:12 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201203080147.q281lCGN019909@svn.freebsd.org> From: Hiroki Sato Date: Thu, 8 Mar 2012 01:47:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232679 - head/release X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2012 01:47:13 -0000 Author: hrs Date: Thu Mar 8 01:47:12 2012 New Revision: 232679 URL: http://svn.freebsd.org/changeset/base/232679 Log: - Clean up extra ${.OBJDIR}. - Add ${IMAGE} for the supported image files. This fixes the install target on FreeBSD/pc98. - Use "mkdir -p" instead of "-mkdir" consistently. Reviewed by: nwhitehorn Modified: head/release/Makefile Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Thu Mar 8 01:37:01 2012 (r232678) +++ head/release/Makefile Thu Mar 8 01:47:12 2012 (r232679) @@ -32,7 +32,7 @@ TARGET_ARCH?= ${MACHINE_ARCH} TARGET_ARCH?= ${TARGET} .endif IMAKE= ${MAKE} TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET} -DISTDIR= ${.OBJDIR}/dist +DISTDIR= dist .if !exists(${DOCDIR}) NODOC= true @@ -53,38 +53,41 @@ EXTRA_PACKAGES+= reldoc .endif RELEASE_TARGETS= ftp +IMAGES= .if exists(${.CURDIR}/${TARGET}/mkisoimages.sh) RELEASE_TARGETS+= cdrom +IMAGES+= release.iso bootonly.iso .endif .if exists(${.CURDIR}/${TARGET}/make-memstick.sh) RELEASE_TARGETS+= memstick +IMAGES+= memstick .endif .include base.txz: - -mkdir ${DISTDIR} - cd ${WORLDDIR} && ${IMAKE} distributeworld DISTDIR=${DISTDIR} + mkdir -p ${DISTDIR} + cd ${WORLDDIR} && ${IMAKE} distributeworld DISTDIR=${.OBJDIR}/${DISTDIR} # Set up mergemaster root database sh ${.CURDIR}/scripts/mm-mtree.sh -m ${WORLDDIR} -F \ - "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" -D "${DISTDIR}/base" + "TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}" -D "${.OBJDIR}/${DISTDIR}/base" # Package all components - cd ${WORLDDIR} && ${IMAKE} packageworld DISTDIR=${DISTDIR} - mv ${DISTDIR}/*.txz ${.OBJDIR} + cd ${WORLDDIR} && ${IMAKE} packageworld DISTDIR=${.OBJDIR}/${DISTDIR} + mv ${DISTDIR}/*.txz . kernel.txz: - -mkdir ${DISTDIR} - cd ${WORLDDIR} && ${IMAKE} distributekernel packagekernel DISTDIR=${DISTDIR} - mv ${DISTDIR}/kernel*.txz ${.OBJDIR} + mkdir -p ${DISTDIR} + cd ${WORLDDIR} && ${IMAKE} distributekernel packagekernel DISTDIR=${.OBJDIR}/${DISTDIR} + mv ${DISTDIR}/kernel*.txz . src.txz: - -mkdir -p ${DISTDIR}/usr + mkdir -p ${DISTDIR}/usr ln -fs ${WORLDDIR} ${DISTDIR}/usr/src cd ${DISTDIR} && tar cLvJf ${.OBJDIR}/src.txz --exclude .svn \ --exclude CVS usr/src ports.txz: - -mkdir -p ${DISTDIR}/usr + mkdir -p ${DISTDIR}/usr ln -fs ${PORTSDIR} ${DISTDIR}/usr/ports cd ${DISTDIR} && tar cLvJf ${.OBJDIR}/ports.txz \ --exclude usr/ports/distfiles --exclude usr/ports/packages \ @@ -93,38 +96,35 @@ ports.txz: reldoc: cd ${.CURDIR}/doc && ${MAKE} all install clean 'FORMATS=html txt' \ INSTALL_COMPRESSED='' URLS_ABSOLUTE=YES DOCDIR=${.OBJDIR}/rdoc - -mkdir ${.OBJDIR}/reldoc + mkdir -p reldoc .for i in hardware readme relnotes errata - ln -f ${.OBJDIR}/rdoc/${RELNOTES_LANG}/${i}/article.txt \ - ${.OBJDIR}/reldoc/${i:U}.TXT - ln -f ${.OBJDIR}/rdoc/${RELNOTES_LANG}/${i}/article.html \ - ${.OBJDIR}/reldoc/${i:U}.HTM + ln -f rdoc/${RELNOTES_LANG}/${i}/article.txt reldoc/${i:U}.TXT + ln -f rdoc/${RELNOTES_LANG}/${i}/article.html reldoc/${i:U}.HTM .endfor - cp ${.OBJDIR}/rdoc/${RELNOTES_LANG}/readme/docbook.css ${.OBJDIR}/reldoc + cp rdoc/${RELNOTES_LANG}/readme/docbook.css reldoc system: packagesystem # Install system - -mkdir ${.OBJDIR}/release + mkdir -p release cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \ DESTDIR=${.OBJDIR}/release WITHOUT_RESCUE=1 WITHOUT_KERNEL_SYMBOLS=1 # Copy distfiles - mkdir ${.OBJDIR}/release/usr/freebsd-dist - cp ${.OBJDIR}/*.txz ${.OBJDIR}/MANIFEST \ - ${.OBJDIR}/release/usr/freebsd-dist + mkdir -p release/usr/freebsd-dist + cp *.txz MANIFEST release/usr/freebsd-dist # Copy documentation, if generated .if !defined(NODOC) - cp ${.OBJDIR}/reldoc/* ${.OBJDIR}/release + cp reldoc/* release .endif # Set up installation environment - ln -s /tmp/bsdinstall_etc/resolv.conf ${.OBJDIR}/release/etc/resolv.conf - echo sendmail_enable=\"NONE\" > ${.OBJDIR}/release/etc/rc.conf - echo hostid_enable=\"NO\" >> ${.OBJDIR}/release/etc/rc.conf - cp ${.CURDIR}/rc.local ${.OBJDIR}/release/etc - touch ${.OBJDIR}/${.TARGET} + ln -s /tmp/bsdinstall_etc/resolv.conf release/etc/resolv.conf + echo sendmail_enable=\"NONE\" > release/etc/rc.conf + echo hostid_enable=\"NO\" >> release/etc/rc.conf + cp ${.CURDIR}/rc.local release/etc + touch ${.TARGET} bootonly: packagesystem # Install system - mkdir ${.OBJDIR}/bootonly + mkdir -p bootonly cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \ DESTDIR=${.OBJDIR}/bootonly WITHOUT_AMD=1 WITHOUT_AT=1 \ WITHOUT_BIND_DNSSEC=1 WITHOUT_BIND_ETC=1 WITHOUT_BIND_MTREE=1 \ @@ -134,35 +134,35 @@ bootonly: packagesystem WITHOUT_INSTALLIB=1 WITHOUT_RESCUE=1 WITHOUT_DICT=1 \ WITHOUT_KERNEL_SYMBOLS=1 # Copy manifest only (no distfiles) to get checksums - mkdir ${.OBJDIR}/bootonly/usr/freebsd-dist - cp ${.OBJDIR}/MANIFEST ${.OBJDIR}/bootonly/usr/freebsd-dist + mkdir -p bootonly/usr/freebsd-dist + cp MANIFEST bootonly/usr/freebsd-dist # Copy documentation, if generated .if !defined(NODOC) - cp ${.OBJDIR}/reldoc/* ${.OBJDIR}/bootonly + cp reldoc/* bootonly .endif # Set up installation environment - ln -s /tmp/bsdinstall_etc/resolv.conf ${.OBJDIR}/bootonly/etc/resolv.conf - echo sendmail_enable=\"NONE\" > ${.OBJDIR}/bootonly/etc/rc.conf - echo hostid_enable=\"NO\" >> ${.OBJDIR}/bootonly/etc/rc.conf - cp ${.CURDIR}/rc.local ${.OBJDIR}/bootonly/etc + ln -s /tmp/bsdinstall_etc/resolv.conf bootonly/etc/resolv.conf + echo sendmail_enable=\"NONE\" > bootonly/etc/rc.conf + echo hostid_enable=\"NO\" >> bootonly/etc/rc.conf + cp ${.CURDIR}/rc.local bootonly/etc release.iso: system - sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b FreeBSD_Install ${.OBJDIR}/release.iso ${.OBJDIR}/release + sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b FreeBSD_Install ${.TARGET} release bootonly.iso: bootonly - sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b FreeBSD_Install ${.OBJDIR}/bootonly.iso ${.OBJDIR}/bootonly + sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b FreeBSD_Install ${.TARGET} bootonly memstick: system - sh ${.CURDIR}/${TARGET}/make-memstick.sh ${.OBJDIR}/release ${.OBJDIR}/memstick + sh ${.CURDIR}/${TARGET}/make-memstick.sh release ${.TARGET} packagesystem: base.txz kernel.txz ${EXTRA_PACKAGES} - sh ${.CURDIR}/scripts/make-manifest.sh ${.OBJDIR}/*.txz > ${.OBJDIR}/MANIFEST + sh ${.CURDIR}/scripts/make-manifest.sh *.txz > MANIFEST touch ${.TARGET} cdrom: release.iso bootonly.iso ftp: packagesystem rm -rf ftp - mkdir ftp + mkdir -p ftp cp *.txz MANIFEST ftp release: @@ -170,7 +170,7 @@ release: ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${RELEASE_TARGETS} clean: - chflags -R noschg ${.OBJDIR} + chflags -R noschg . rm -rf dist ftp rm -f packagesystem rm -f *.txz MANIFEST @@ -179,6 +179,7 @@ clean: rm -f release.iso bootonly.iso memstick install: - -mkdir ${DESTDIR} - cp -a *.iso memstick ftp ${DESTDIR}/ - +.if defined(DESTDIR) && !empty(DESTDIR) + mkdir -p ${DESTDIR} +.endif + cp -a ${IMAGES} ftp ${DESTDIR}/ From owner-svn-src-all@FreeBSD.ORG Thu Mar 8 01:48:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA39D1065670; Thu, 8 Mar 2012 01:48:44 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA06B8FC12; Thu, 8 Mar 2012 01:48:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q281migb020002; Thu, 8 Mar 2012 01:48:44 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q281miii020000; Thu, 8 Mar 2012 01:48:44 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201203080148.q281miii020000@svn.freebsd.org> From: Ed Maste Date: Thu, 8 Mar 2012 01:48:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232680 - head/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2012 01:48:45 -0000 Author: emaste Date: Thu Mar 8 01:48:44 2012 New Revision: 232680 URL: http://svn.freebsd.org/changeset/base/232680 Log: Remove unactionable message about label geometry It's not clear to a user what they should do after seeing the "geometry does not match label" kernel message, and it does not appear to present a problem in practice. Thus, just remove the messages. Approved by: marcel Modified: head/sys/geom/part/g_part_bsd.c Modified: head/sys/geom/part/g_part_bsd.c ============================================================================== --- head/sys/geom/part/g_part_bsd.c Thu Mar 8 01:47:12 2012 (r232679) +++ head/sys/geom/part/g_part_bsd.c Thu Mar 8 01:48:44 2012 (r232680) @@ -389,10 +389,6 @@ g_part_bsd_read(struct g_part_table *bas goto invalid_label; if (heads != basetable->gpt_heads && !basetable->gpt_fixgeom) basetable->gpt_heads = heads; - if (sectors != basetable->gpt_sectors || heads != basetable->gpt_heads) - printf("GEOM: %s: geometry does not match label" - " (%uh,%us != %uh,%us).\n", pp->name, heads, sectors, - basetable->gpt_heads, basetable->gpt_sectors); chs = le32dec(buf + 60); if (chs < 1) @@ -402,9 +398,6 @@ g_part_bsd_read(struct g_part_table *bas chs = msize; le32enc(buf + 60, msize); } - if (chs != msize) - printf("GEOM: %s: media size does not match label.\n", - pp->name); basetable->gpt_first = 0; basetable->gpt_last = msize - 1; From owner-svn-src-all@FreeBSD.ORG Thu Mar 8 02:00:53 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 873491065677; Thu, 8 Mar 2012 02:00:53 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 766FA8FC13; Thu, 8 Mar 2012 02:00:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2820r6I020449; Thu, 8 Mar 2012 02:00:53 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2820rQP020447; Thu, 8 Mar 2012 02:00:53 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201203080200.q2820rQP020447@svn.freebsd.org> From: Ed Maste Date: Thu, 8 Mar 2012 02:00:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232681 - head/usr.sbin/pc-sysinstall/backend-query X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2012 02:00:53 -0000 Author: emaste Date: Thu Mar 8 02:00:52 2012 New Revision: 232681 URL: http://svn.freebsd.org/changeset/base/232681 Log: Work around broken BIOS memory reporting Andrzej has a machine with 32GB of RAM, but only 16GB is reported by the smbios.memory.enabled. Thus, use the greater of hw.realmem and the smbios value. Reported by: Andrzej Tobola Modified: head/usr.sbin/pc-sysinstall/backend-query/sys-mem.sh Modified: head/usr.sbin/pc-sysinstall/backend-query/sys-mem.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/sys-mem.sh Thu Mar 8 01:48:44 2012 (r232680) +++ head/usr.sbin/pc-sysinstall/backend-query/sys-mem.sh Thu Mar 8 02:00:52 2012 (r232681) @@ -26,7 +26,14 @@ # $FreeBSD$ if smbios_mem=$(kenv -q smbios.memory.enabled); then - expr $smbios_mem / 1024 + smbios_mem=$(expr $smbios_mem / 1024) else - expr $(sysctl -n hw.realmem) / 1048576 + smbios_mem=0 +fi +realmem=$(expr $(sysctl -n hw.realmem) / 1048576) + +if [ $smbios_mem -gt $realmem ]; then + echo $smbios_mem +else + echo $realmem fi From owner-svn-src-all@FreeBSD.ORG Thu Mar 8 02:27:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1000E1065675; Thu, 8 Mar 2012 02:27:31 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F1F058FC13; Thu, 8 Mar 2012 02:27:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q282RUOU021387; Thu, 8 Mar 2012 02:27:30 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q282RUa1021384; Thu, 8 Mar 2012 02:27:30 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201203080227.q282RUa1021384@svn.freebsd.org> From: Rick Macklem Date: Thu, 8 Mar 2012 02:27:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232682 - in stable/9/sys: fs/nfsclient i386/conf nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2012 02:27:31 -0000 Author: rmacklem Date: Thu Mar 8 02:27:29 2012 New Revision: 232682 URL: http://svn.freebsd.org/changeset/base/232682 Log: MFC: r232327 Fix the NFS clients so that they use copyin() instead of bcopy(), when doing direct I/O. This direct I/O code is not enabled by default. Modified: stable/9/sys/fs/nfsclient/nfs_clbio.c stable/9/sys/nfsclient/nfs_bio.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) Modified: stable/9/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- stable/9/sys/fs/nfsclient/nfs_clbio.c Thu Mar 8 02:00:52 2012 (r232681) +++ stable/9/sys/fs/nfsclient/nfs_clbio.c Thu Mar 8 02:27:29 2012 (r232682) @@ -820,7 +820,21 @@ do_sync: t_uio->uio_segflg = UIO_SYSSPACE; t_uio->uio_rw = UIO_WRITE; t_uio->uio_td = td; - bcopy(uiop->uio_iov->iov_base, t_iov->iov_base, size); + KASSERT(uiop->uio_segflg == UIO_USERSPACE || + uiop->uio_segflg == UIO_SYSSPACE, + ("nfs_directio_write: Bad uio_segflg")); + if (uiop->uio_segflg == UIO_USERSPACE) { + error = copyin(uiop->uio_iov->iov_base, + t_iov->iov_base, size); + if (error != 0) + goto err_free; + } else + /* + * UIO_SYSSPACE may never happen, but handle + * it just in case it does. + */ + bcopy(uiop->uio_iov->iov_base, t_iov->iov_base, + size); bp->b_flags |= B_DIRECT; bp->b_iocmd = BIO_WRITE; if (cred != NOCRED) { @@ -831,6 +845,7 @@ do_sync: bp->b_caller1 = (void *)t_uio; bp->b_vp = vp; error = ncl_asyncio(nmp, bp, NOCRED, td); +err_free: if (error) { free(t_iov->iov_base, M_NFSDIRECTIO); free(t_iov, M_NFSDIRECTIO); Modified: stable/9/sys/nfsclient/nfs_bio.c ============================================================================== --- stable/9/sys/nfsclient/nfs_bio.c Thu Mar 8 02:00:52 2012 (r232681) +++ stable/9/sys/nfsclient/nfs_bio.c Thu Mar 8 02:27:29 2012 (r232682) @@ -814,7 +814,21 @@ do_sync: t_uio->uio_segflg = UIO_SYSSPACE; t_uio->uio_rw = UIO_WRITE; t_uio->uio_td = td; - bcopy(uiop->uio_iov->iov_base, t_iov->iov_base, size); + KASSERT(uiop->uio_segflg == UIO_USERSPACE || + uiop->uio_segflg == UIO_SYSSPACE, + ("nfs_directio_write: Bad uio_segflg")); + if (uiop->uio_segflg == UIO_USERSPACE) { + error = copyin(uiop->uio_iov->iov_base, + t_iov->iov_base, size); + if (error != 0) + goto err_free; + } else + /* + * UIO_SYSSPACE may never happen, but handle + * it just in case it does. + */ + bcopy(uiop->uio_iov->iov_base, t_iov->iov_base, + size); bp->b_flags |= B_DIRECT; bp->b_iocmd = BIO_WRITE; if (cred != NOCRED) { @@ -825,6 +839,7 @@ do_sync: bp->b_caller1 = (void *)t_uio; bp->b_vp = vp; error = nfs_asyncio(nmp, bp, NOCRED, td); +err_free: if (error) { free(t_iov->iov_base, M_NFSDIRECTIO); free(t_iov, M_NFSDIRECTIO); From owner-svn-src-all@FreeBSD.ORG Thu Mar 8 03:02:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 817D71065674; Thu, 8 Mar 2012 03:02:49 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F9B68FC16; Thu, 8 Mar 2012 03:02:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2832nIO022684; Thu, 8 Mar 2012 03:02:49 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2832nH4022682; Thu, 8 Mar 2012 03:02:49 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201203080302.q2832nH4022682@svn.freebsd.org> From: Rick Macklem Date: Thu, 8 Mar 2012 03:02:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232683 - in stable/9/sys: fs/nfsserver i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2012 03:02:49 -0000 Author: rmacklem Date: Thu Mar 8 03:02:48 2012 New Revision: 232683 URL: http://svn.freebsd.org/changeset/base/232683 Log: MFC: r2323467 The name caching changes of r230394 exposed an intermittent bug in the new NFS server for NFSv4, where it would report ENOENT when the file actually existed on the server. This turned out to be caused by not initializing ni_topdir before calling lookup() and there was a rare case where the value on the stack location assigned to ni_topdir happened to be a pointer to a ".." entry, such that "dp == ndp->ni_topdir" succeeded in lookup(). This patch initializes ni_topdir to fix the problem. Modified: stable/9/sys/fs/nfsserver/nfs_nfsdport.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) Modified: stable/9/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/9/sys/fs/nfsserver/nfs_nfsdport.c Thu Mar 8 02:27:29 2012 (r232682) +++ stable/9/sys/fs/nfsserver/nfs_nfsdport.c Thu Mar 8 03:02:48 2012 (r232683) @@ -395,6 +395,7 @@ nfsvno_namei(struct nfsrv_descript *nd, cnp->cn_thread = p; ndp->ni_startdir = dp; ndp->ni_rootdir = rootvnode; + ndp->ni_topdir = NULL; if (!lockleaf) cnp->cn_flags |= LOCKLEAF; From owner-svn-src-all@FreeBSD.ORG Thu Mar 8 07:22:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31B7C106564A; Thu, 8 Mar 2012 07:22:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1D07C8FC12; Thu, 8 Mar 2012 07:22:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q287MgxW031093; Thu, 8 Mar 2012 07:22:42 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q287Mff6031089; Thu, 8 Mar 2012 07:22:41 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201203080722.q287Mff6031089@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 8 Mar 2012 07:22:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232684 - in head: share/man/man4 sys/dev/usb sys/dev/usb/serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2012 07:22:42 -0000 Author: hselasky Date: Thu Mar 8 07:22:41 2012 New Revision: 232684 URL: http://svn.freebsd.org/changeset/base/232684 Log: Add new USB device IDs. PR: usb/165815 MFC after: 1 week Modified: head/share/man/man4/u3g.4 head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usbdevs Modified: head/share/man/man4/u3g.4 ============================================================================== --- head/share/man/man4/u3g.4 Thu Mar 8 03:02:48 2012 (r232683) +++ head/share/man/man4/u3g.4 Thu Mar 8 07:22:41 2012 (r232684) @@ -63,6 +63,8 @@ Option GT 3G, GT 3G Quad, etc. .It Vodafone Mobile Connect Card 3G .It +Vodafone Mobile Broadband K3772-Z +.It Qualcomm Inc. CDMA MSM .It Huawei B190, E180v, E220 ('') Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Thu Mar 8 03:02:48 2012 (r232683) +++ head/sys/dev/usb/serial/u3g.c Thu Mar 8 07:22:41 2012 (r232684) @@ -423,6 +423,7 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(QUALCOMMINC, SURFSTICK, 0), U3G_DEV(QUALCOMMINC, E2002, 0), U3G_DEV(QUALCOMMINC, E2003, 0), + U3G_DEV(QUALCOMMINC, K3772_Z, U3GINIT_SCSIEJECT), U3G_DEV(QUALCOMMINC, MF626, 0), U3G_DEV(QUALCOMMINC, MF628, 0), U3G_DEV(QUALCOMMINC, MF633R, 0), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Thu Mar 8 03:02:48 2012 (r232683) +++ head/sys/dev/usb/usbdevs Thu Mar 8 07:22:41 2012 (r232684) @@ -2750,6 +2750,7 @@ product QUALCOMMINC E0078 0x0078 3G mode product QUALCOMMINC E0082 0x0082 3G modem product QUALCOMMINC E0086 0x0086 3G modem product QUALCOMMINC SURFSTICK 0x0117 1&1 Surf Stick +product QUALCOMMINC K3772_Z 0x1179 3G modem product QUALCOMMINC ZTE_STOR 0x2000 USB ZTE Storage product QUALCOMMINC E2002 0x2002 3G modem product QUALCOMMINC E2003 0x2003 3G modem From owner-svn-src-all@FreeBSD.ORG Thu Mar 8 09:20:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6978D106566B; Thu, 8 Mar 2012 09:20:01 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 501E78FC12; Thu, 8 Mar 2012 09:20:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q289K1nR035205; Thu, 8 Mar 2012 09:20:01 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q289K10S035203; Thu, 8 Mar 2012 09:20:01 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201203080920.q289K10S035203@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 8 Mar 2012 09:20:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232685 - head/sys/contrib/pf/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2012 09:20:01 -0000 Author: glebius Date: Thu Mar 8 09:20:00 2012 New Revision: 232685 URL: http://svn.freebsd.org/changeset/base/232685 Log: Merge from OpenBSD: revision 1.146 date: 2010/05/12 08:11:11; author: claudio; state: Exp; lines: +2 -3 bzero() the full compressed update struct before setting the values. This is needed because pf_state_peer_hton() skips some fields in certain situations which could result in garbage beeing sent to the other peer. This seems to fix the pfsync storms seen by stephan@ and so dlg owes me a whiskey. I didn't see any storms, but this definitely fixes a useless memory allocation on the receiving side, due to non zero scrub_flags field in a pfsync_state_peer structure. Modified: head/sys/contrib/pf/net/if_pfsync.c Modified: head/sys/contrib/pf/net/if_pfsync.c ============================================================================== --- head/sys/contrib/pf/net/if_pfsync.c Thu Mar 8 07:22:41 2012 (r232684) +++ head/sys/contrib/pf/net/if_pfsync.c Thu Mar 8 09:20:00 2012 (r232685) @@ -48,6 +48,7 @@ * 1.120, 1.175 - use monotonic time_uptime * 1.122 - reduce number of updates for non-TCP sessions * 1.128 - cleanups + * 1.146 - bzero() mbuf before sparsely filling it with data * 1.170 - SIOCSIFMTU checks */ @@ -2011,6 +2012,7 @@ pfsync_out_upd_c(struct pf_state *st, st { struct pfsync_upd_c *up = (struct pfsync_upd_c *)(m->m_data + offset); + bzero(up, sizeof(*up)); up->id = st->id; pf_state_peer_hton(&st->src, &up->src); pf_state_peer_hton(&st->dst, &up->dst); @@ -2023,8 +2025,6 @@ pfsync_out_upd_c(struct pf_state *st, st up->expire = htonl(up->expire - time_second); up->timeout = st->timeout; - bzero(up->_pad, sizeof(up->_pad)); /* XXX */ - return (sizeof(*up)); } From owner-svn-src-all@FreeBSD.ORG Thu Mar 8 09:55:18 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF6691065675; Thu, 8 Mar 2012 09:55:18 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 999F28FC15; Thu, 8 Mar 2012 09:55:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q289tI8r036433; Thu, 8 Mar 2012 09:55:18 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q289tIYE036431; Thu, 8 Mar 2012 09:55:18 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201203080955.q289tIYE036431@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 8 Mar 2012 09:55:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232686 - stable/9/lib/libc/uuid X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2012 09:55:18 -0000 Author: ae Date: Thu Mar 8 09:55:18 2012 New Revision: 232686 URL: http://svn.freebsd.org/changeset/base/232686 Log: MFC r232339: Note that memory should be freed after uuid_to_string(3) call. PR: docs/161808 Modified: stable/9/lib/libc/uuid/uuid.3 Directory Properties: stable/9/lib/libc/uuid/ (props changed) Modified: stable/9/lib/libc/uuid/uuid.3 ============================================================================== --- stable/9/lib/libc/uuid/uuid.3 Thu Mar 8 09:20:00 2012 (r232685) +++ stable/9/lib/libc/uuid/uuid.3 Thu Mar 8 09:55:18 2012 (r232686) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 13, 2008 +.Dd March 1, 2012 .Dt UUID 3 .Os .Sh NAME @@ -84,6 +84,15 @@ A 16-bit hash value can be obtained by c .Fn uuid_hash . .Pp The +.Fn uuid_to_string +function set +.Fa *str +to be a pointer to a buffer sufficiently large to hold the string. +This pointer should be passed to +.Xr free 3 +to release the allocated storage when it is no longer needed. +.Pp +The .Fn uuid_enc_le and .Fn uuid_enc_be @@ -116,7 +125,7 @@ The UUID does not have a known version. .It Dv uuid_s_invalid_string_uuid The string representation of an UUID is not valid. .It Dv uuid_s_no_memory -The meaning of the code escaped the writers mind. +The function can not allocate memory to store an UUID representation. .El .Sh SEE ALSO .Xr uuidgen 1 , From owner-svn-src-all@FreeBSD.ORG Thu Mar 8 09:55:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1BC8F106564A; Thu, 8 Mar 2012 09:55:48 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 05A138FC18; Thu, 8 Mar 2012 09:55:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q289tltB036486; Thu, 8 Mar 2012 09:55:47 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q289tlp4036484; Thu, 8 Mar 2012 09:55:47 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201203080955.q289tlp4036484@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 8 Mar 2012 09:55:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232687 - stable/8/lib/libc/uuid X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2012 09:55:48 -0000 Author: ae Date: Thu Mar 8 09:55:47 2012 New Revision: 232687 URL: http://svn.freebsd.org/changeset/base/232687 Log: MFC r232339: Note that memory should be freed after uuid_to_string(3) call. PR: docs/161808 Modified: stable/8/lib/libc/uuid/uuid.3 Directory Properties: stable/8/lib/libc/uuid/ (props changed) Modified: stable/8/lib/libc/uuid/uuid.3 ============================================================================== --- stable/8/lib/libc/uuid/uuid.3 Thu Mar 8 09:55:18 2012 (r232686) +++ stable/8/lib/libc/uuid/uuid.3 Thu Mar 8 09:55:47 2012 (r232687) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 13, 2008 +.Dd March 1, 2012 .Dt UUID 3 .Os .Sh NAME @@ -84,6 +84,15 @@ A 16-bit hash value can be obtained by c .Fn uuid_hash . .Pp The +.Fn uuid_to_string +function set +.Fa *str +to be a pointer to a buffer sufficiently large to hold the string. +This pointer should be passed to +.Xr free 3 +to release the allocated storage when it is no longer needed. +.Pp +The .Fn uuid_enc_le and .Fn uuid_enc_be @@ -117,7 +126,7 @@ The UUID does not have a known version. .It Dv uuid_s_invalid_string_uuid The string representation of an UUID is not valid. .It Dv uuid_s_no_memory -The meaning of the code escaped the writers mind. +The function can not allocate memory to store an UUID representation. .El .Sh SEE ALSO .Xr uuidgen 1 , From owner-svn-src-all@FreeBSD.ORG Thu Mar 8 09:56:07 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D19C31065677; Thu, 8 Mar 2012 09:56:07 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BBF1A8FC23; Thu, 8 Mar 2012 09:56:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q289u7V6036539; Thu, 8 Mar 2012 09:56:07 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q289u7dn036537; Thu, 8 Mar 2012 09:56:07 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201203080956.q289u7dn036537@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 8 Mar 2012 09:56:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232688 - stable/7/lib/libc/uuid X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2012 09:56:07 -0000 Author: ae Date: Thu Mar 8 09:56:07 2012 New Revision: 232688 URL: http://svn.freebsd.org/changeset/base/232688 Log: MFC r232339: Note that memory should be freed after uuid_to_string(3) call. PR: docs/161808 Modified: stable/7/lib/libc/uuid/uuid.3 Directory Properties: stable/7/lib/libc/uuid/ (props changed) Modified: stable/7/lib/libc/uuid/uuid.3 ============================================================================== --- stable/7/lib/libc/uuid/uuid.3 Thu Mar 8 09:55:47 2012 (r232687) +++ stable/7/lib/libc/uuid/uuid.3 Thu Mar 8 09:56:07 2012 (r232688) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 13, 2008 +.Dd March 1, 2012 .Dt UUID 3 .Os .Sh NAME @@ -84,6 +84,15 @@ A 16-bit hash value can be obtained by c .Fn uuid_hash . .Pp The +.Fn uuid_to_string +function set +.Fa *str +to be a pointer to a buffer sufficiently large to hold the string. +This pointer should be passed to +.Xr free 3 +to release the allocated storage when it is no longer needed. +.Pp +The .Fn uuid_enc_le and .Fn uuid_enc_be @@ -117,7 +126,7 @@ The UUID does not have a known version. .It Dv uuid_s_invalid_string_uuid The string representation of an UUID is not valid. .It Dv uuid_s_no_memory -The meaning of the code escaped the writers mind. +The function can not allocate memory to store an UUID representation. .El .Sh SEE ALSO .Xr uuidgen 1 , From owner-svn-src-all@FreeBSD.ORG Thu Mar 8 10:40:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2AA0106564A; Thu, 8 Mar 2012 10:40:14 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD4088FC08; Thu, 8 Mar 2012 10:40:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q28AeEDg041611; Thu, 8 Mar 2012 10:40:14 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q28AeE2J041609; Thu, 8 Mar 2012 10:40:14 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201203081040.q28AeE2J041609@svn.freebsd.org> From: Christian Brueffer Date: Thu, 8 Mar 2012 10:40:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232690 - stable/9/tools/regression/security/cap_test X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2012 10:40:14 -0000 Author: brueffer Date: Thu Mar 8 10:40:14 2012 New Revision: 232690 URL: http://svn.freebsd.org/changeset/base/232690 Log: MFC: r232312 Fix order of arguments to lseek(). Modified: stable/9/tools/regression/security/cap_test/cap_test_capmode.c Directory Properties: stable/9/tools/regression/security/cap_test/ (props changed) Modified: stable/9/tools/regression/security/cap_test/cap_test_capmode.c ============================================================================== --- stable/9/tools/regression/security/cap_test/cap_test_capmode.c Thu Mar 8 09:58:17 2012 (r232689) +++ stable/9/tools/regression/security/cap_test/cap_test_capmode.c Thu Mar 8 10:40:14 2012 (r232690) @@ -117,7 +117,7 @@ test_capmode(void) CHECK_SYSCALL_SUCCEEDS(close, fd_close); CHECK_SYSCALL_SUCCEEDS(dup, fd_file); CHECK_SYSCALL_SUCCEEDS(fstat, fd_file, &sb); - CHECK_SYSCALL_SUCCEEDS(lseek, fd_file, SEEK_SET, 0); + CHECK_SYSCALL_SUCCEEDS(lseek, fd_file, 0, SEEK_SET); CHECK_SYSCALL_SUCCEEDS(msync, &fd_file, 8192, MS_ASYNC); CHECK_SYSCALL_SUCCEEDS(profil, NULL, 0, 0, 0); CHECK_SYSCALL_SUCCEEDS(read, fd_file, &ch, sizeof(ch)); From owner-svn-src-all@FreeBSD.ORG Thu Mar 8 12:49:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 59EEA1065672; Thu, 8 Mar 2012 12:49:09 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 34E628FC0C; Thu, 8 Mar 2012 12:49:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q28Cn9m4045650; Thu, 8 Mar 2012 12:49:09 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q28Cn9ed045648; Thu, 8 Mar 2012 12:49:09 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201203081249.q28Cn9ed045648@svn.freebsd.org> From: Peter Holm Date: Thu, 8 Mar 2012 12:49:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232692 - head/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2012 12:49:09 -0000 Author: pho Date: Thu Mar 8 12:49:08 2012 New Revision: 232692 URL: http://svn.freebsd.org/changeset/base/232692 Log: syscall() fuzzing can trigger this panic. Return EINVAL instead. MFC after: 1 week Modified: head/sys/ufs/ffs/ffs_vnops.c Modified: head/sys/ufs/ffs/ffs_vnops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vnops.c Thu Mar 8 11:05:53 2012 (r232691) +++ head/sys/ufs/ffs/ffs_vnops.c Thu Mar 8 12:49:08 2012 (r232692) @@ -464,11 +464,11 @@ ffs_read(ap) } else if (vp->v_type != VREG && vp->v_type != VDIR) panic("ffs_read: type %d", vp->v_type); #endif + if (uio->uio_resid < 0 || uio->uio_offset < 0) + return (EINVAL); orig_resid = uio->uio_resid; - KASSERT(orig_resid >= 0, ("ffs_read: uio->uio_resid < 0")); if (orig_resid == 0) return (0); - KASSERT(uio->uio_offset >= 0, ("ffs_read: uio->uio_offset < 0")); fs = ip->i_fs; if (uio->uio_offset < ip->i_size && uio->uio_offset >= fs->fs_maxfilesize) From owner-svn-src-all@FreeBSD.ORG Thu Mar 8 12:54:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38DA1106564A; Thu, 8 Mar 2012 12:54:27 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 21D678FC0A; Thu, 8 Mar 2012 12:54:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q28CsQfm045846; Thu, 8 Mar 2012 12:54:26 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q28CsQQc045841; Thu, 8 Mar 2012 12:54:26 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203081254.q28CsQQc045841@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 8 Mar 2012 12:54:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232693 - in stable/9/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2012 12:54:27 -0000 Author: kib Date: Thu Mar 8 12:54:26 2012 New Revision: 232693 URL: http://svn.freebsd.org/changeset/base/232693 Log: MFC r232048: Allow the parent to gather the exit status of the children reparented to the debugger. When reparenting for debugging, keep the child in the new orphan list of old parent. When looping over the children in kern_wait(), iterate over both children list and orphan list to search for the process by pid. MFC r232104: Restore the return statement erronously removed in the r232048. In order to keep stable/9 KBI, the p_dbg_child member of struct proc was replaced with padding. Modified: stable/9/sys/kern/kern_exit.c stable/9/sys/kern/kern_fork.c stable/9/sys/kern/sys_process.c stable/9/sys/sys/proc.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_exit.c ============================================================================== --- stable/9/sys/kern/kern_exit.c Thu Mar 8 12:49:08 2012 (r232692) +++ stable/9/sys/kern/kern_exit.c Thu Mar 8 12:54:26 2012 (r232693) @@ -720,7 +720,6 @@ proc_reap(struct thread *td, struct proc if (p->p_oppid && (t = pfind(p->p_oppid)) != NULL) { PROC_LOCK(p); proc_reparent(p, t); - p->p_pptr->p_dbg_child--; p->p_oppid = 0; PROC_UNLOCK(p); pksignal(t, SIGCHLD, p->p_ksi); @@ -739,6 +738,10 @@ proc_reap(struct thread *td, struct proc LIST_REMOVE(p, p_list); /* off zombproc */ sx_xunlock(&allproc_lock); LIST_REMOVE(p, p_sibling); + if (p->p_flag & P_ORPHAN) { + LIST_REMOVE(p, p_orphan); + p->p_flag &= ~P_ORPHAN; + } leavepgrp(p); #ifdef PROCDESC if (p->p_procdesc != NULL) @@ -803,12 +806,53 @@ proc_reap(struct thread *td, struct proc sx_xunlock(&allproc_lock); } +static int +proc_to_reap(struct thread *td, struct proc *p, pid_t pid, int *status, + int options, struct rusage *rusage) +{ + struct proc *q; + + q = td->td_proc; + PROC_LOCK(p); + if (pid != WAIT_ANY && p->p_pid != pid && p->p_pgid != -pid) { + PROC_UNLOCK(p); + return (0); + } + if (p_canwait(td, p)) { + PROC_UNLOCK(p); + return (0); + } + + /* + * This special case handles a kthread spawned by linux_clone + * (see linux_misc.c). The linux_wait4 and linux_waitpid + * functions need to be able to distinguish between waiting + * on a process and waiting on a thread. It is a thread if + * p_sigparent is not SIGCHLD, and the WLINUXCLONE option + * signifies we want to wait for threads and not processes. + */ + if ((p->p_sigparent != SIGCHLD) ^ + ((options & WLINUXCLONE) != 0)) { + PROC_UNLOCK(p); + return (0); + } + + PROC_SLOCK(p); + if (p->p_state == PRS_ZOMBIE) { + proc_reap(td, p, status, options, rusage); + return (-1); + } + PROC_SUNLOCK(p); + PROC_UNLOCK(p); + return (1); +} + int kern_wait(struct thread *td, pid_t pid, int *status, int options, struct rusage *rusage) { struct proc *p, *q; - int error, nfound; + int error, nfound, ret; AUDIT_ARG_PID(pid); AUDIT_ARG_VALUE(options); @@ -831,37 +875,16 @@ loop: nfound = 0; sx_xlock(&proctree_lock); LIST_FOREACH(p, &q->p_children, p_sibling) { - PROC_LOCK(p); - if (pid != WAIT_ANY && - p->p_pid != pid && p->p_pgid != -pid) { - PROC_UNLOCK(p); - continue; - } - if (p_canwait(td, p)) { - PROC_UNLOCK(p); + ret = proc_to_reap(td, p, pid, status, options, rusage); + if (ret == 0) continue; - } - - /* - * This special case handles a kthread spawned by linux_clone - * (see linux_misc.c). The linux_wait4 and linux_waitpid - * functions need to be able to distinguish between waiting - * on a process and waiting on a thread. It is a thread if - * p_sigparent is not SIGCHLD, and the WLINUXCLONE option - * signifies we want to wait for threads and not processes. - */ - if ((p->p_sigparent != SIGCHLD) ^ - ((options & WLINUXCLONE) != 0)) { - PROC_UNLOCK(p); - continue; - } + else if (ret == 1) + nfound++; + else + return (0); - nfound++; + PROC_LOCK(p); PROC_SLOCK(p); - if (p->p_state == PRS_ZOMBIE) { - proc_reap(td, p, status, options, rusage); - return (0); - } if ((p->p_flag & P_STOPPED_SIG) && (p->p_suspcount == p->p_numthreads) && (p->p_flag & P_WAITED) == 0 && @@ -897,12 +920,31 @@ loop: } PROC_UNLOCK(p); } + + /* + * Look in the orphans list too, to allow the parent to + * collect it's child exit status even if child is being + * debugged. + * + * Debugger detaches from the parent upon successful + * switch-over from parent to child. At this point due to + * re-parenting the parent loses the child to debugger and a + * wait4(2) call would report that it has no children to wait + * for. By maintaining a list of orphans we allow the parent + * to successfully wait until the child becomes a zombie. + */ + LIST_FOREACH(p, &q->p_orphans, p_orphan) { + ret = proc_to_reap(td, p, pid, status, options, rusage); + if (ret == 0) + continue; + else if (ret == 1) + nfound++; + else + return (0); + } if (nfound == 0) { sx_xunlock(&proctree_lock); - if (td->td_proc->p_dbg_child) - return (0); - else - return (ECHILD); + return (ECHILD); } if (options & WNOHANG) { sx_xunlock(&proctree_lock); @@ -940,5 +982,15 @@ proc_reparent(struct proc *child, struct PROC_UNLOCK(child->p_pptr); LIST_REMOVE(child, p_sibling); LIST_INSERT_HEAD(&parent->p_children, child, p_sibling); + + if (child->p_flag & P_ORPHAN) { + LIST_REMOVE(child, p_orphan); + child->p_flag &= ~P_ORPHAN; + } + if (child->p_flag & P_TRACED) { + LIST_INSERT_HEAD(&child->p_pptr->p_orphans, child, p_orphan); + child->p_flag |= P_ORPHAN; + } + child->p_pptr = parent; } Modified: stable/9/sys/kern/kern_fork.c ============================================================================== --- stable/9/sys/kern/kern_fork.c Thu Mar 8 12:49:08 2012 (r232692) +++ stable/9/sys/kern/kern_fork.c Thu Mar 8 12:54:26 2012 (r232693) @@ -590,6 +590,7 @@ do_fork(struct thread *td, int flags, st LIST_INSERT_AFTER(p1, p2, p_pglist); PGRP_UNLOCK(p1->p_pgrp); LIST_INIT(&p2->p_children); + LIST_INIT(&p2->p_orphans); callout_init(&p2->p_itcallout, CALLOUT_MPSAFE); Modified: stable/9/sys/kern/sys_process.c ============================================================================== --- stable/9/sys/kern/sys_process.c Thu Mar 8 12:49:08 2012 (r232692) +++ stable/9/sys/kern/sys_process.c Thu Mar 8 12:54:26 2012 (r232693) @@ -841,8 +841,6 @@ kern_ptrace(struct thread *td, int req, p->p_flag |= P_TRACED; p->p_oppid = p->p_pptr->p_pid; if (p->p_pptr != td->td_proc) { - /* Remember that a child is being debugged(traced). */ - p->p_pptr->p_dbg_child++; proc_reparent(p, td->td_proc); } data = SIGSTOP; @@ -931,7 +929,6 @@ kern_ptrace(struct thread *td, int req, PROC_UNLOCK(pp); PROC_LOCK(p); proc_reparent(p, pp); - p->p_pptr->p_dbg_child--; if (pp == initproc) p->p_sigparent = SIGCHLD; } Modified: stable/9/sys/sys/proc.h ============================================================================== --- stable/9/sys/sys/proc.h Thu Mar 8 12:49:08 2012 (r232692) +++ stable/9/sys/sys/proc.h Thu Mar 8 12:54:26 2012 (r232693) @@ -506,8 +506,7 @@ struct proc { /* The following fields are all zeroed upon creation in fork. */ #define p_startzero p_oppid pid_t p_oppid; /* (c + e) Save ppid in ptrace. XXX */ - int p_dbg_child; /* (c + e) # of debugged children in - ptrace. */ + int p_pad_dbg_child; struct vmspace *p_vmspace; /* (b) Address space. */ u_int p_swtick; /* (c) Tick when swapped in or out. */ struct itimerval p_realtimer; /* (c) Alarm timer. */ @@ -575,6 +574,14 @@ struct proc { after fork. */ uint64_t p_prev_runtime; /* (c) Resource usage accounting. */ struct racct *p_racct; /* (b) Resource accounting. */ + /* + * An orphan is the child that has beed re-parented to the + * debugger as a result of attaching to it. Need to keep + * track of them for parent to be able to collect the exit + * status of what used to be children. + */ + LIST_ENTRY(proc) p_orphan; /* (e) List of orphan processes. */ + LIST_HEAD(, proc) p_orphans; /* (e) Pointer to list of orphans. */ }; #define p_session p_pgrp->pg_session @@ -613,6 +620,7 @@ struct proc { #define P_HWPMC 0x800000 /* Process is using HWPMCs */ #define P_JAILED 0x1000000 /* Process is in jail. */ +#define P_ORPHAN 0x2000000 /* Orphaned. */ #define P_INEXEC 0x4000000 /* Process is in execve(). */ #define P_STATCHILD 0x8000000 /* Child process stopped or exited. */ #define P_INMEM 0x10000000 /* Loaded into memory. */ From owner-svn-src-all@FreeBSD.ORG Thu Mar 8 13:00:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 467A41065672; Thu, 8 Mar 2012 13:00:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 317D68FC13; Thu, 8 Mar 2012 13:00:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q28D0ore046092; Thu, 8 Mar 2012 13:00:50 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q28D0nZo046090; Thu, 8 Mar 2012 13:00:49 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203081300.q28D0nZo046090@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 8 Mar 2012 13:00:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232694 - head/bin/ps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2012 13:00:50 -0000 Author: kib Date: Thu Mar 8 13:00:49 2012 New Revision: 232694 URL: http://svn.freebsd.org/changeset/base/232694 Log: Document P_ORPHAN. MFC after: 3 days Modified: head/bin/ps/ps.1 Modified: head/bin/ps/ps.1 ============================================================================== --- head/bin/ps/ps.1 Thu Mar 8 12:54:26 2012 (r232693) +++ head/bin/ps/ps.1 Thu Mar 8 13:00:49 2012 (r232694) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd November 22, 2011 +.Dd March 8, 2012 .Dt PS 1 .Os .Sh NAME @@ -317,6 +317,7 @@ the include file .It Dv "P_SINGLE_BOUNDARY" Ta No "0x400000 Threads should suspend at user boundary" .It Dv "P_HWPMC" Ta No "0x800000 Process is using HWPMCs" .It Dv "P_JAILED" Ta No "0x1000000 Process is in jail" +.It Dv "P_ORPHAN" Ta No "0x2000000 Orphaned by original parent, reparented to debugger" .It Dv "P_INEXEC" Ta No "0x4000000 Process is in execve()" .It Dv "P_STATCHILD" Ta No "0x8000000 Child process stopped or exited" .It Dv "P_INMEM" Ta No "0x10000000 Loaded into memory" From owner-svn-src-all@FreeBSD.ORG Thu Mar 8 15:27:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 501B8106564A; Thu, 8 Mar 2012 15:27:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3A99C8FC14; Thu, 8 Mar 2012 15:27:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q28FRUJK050524; Thu, 8 Mar 2012 15:27:30 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q28FRUSm050522; Thu, 8 Mar 2012 15:27:30 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201203081527.q28FRUSm050522@svn.freebsd.org> From: Ed Maste Date: Thu, 8 Mar 2012 15:27:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232695 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2012 15:27:30 -0000 Author: emaste Date: Thu Mar 8 15:27:29 2012 New Revision: 232695 URL: http://svn.freebsd.org/changeset/base/232695 Log: Correct markup, use proper reference for sysctl(3) Submitted by: brueffer@ Modified: head/share/man/man4/tcp.4 Modified: head/share/man/man4/tcp.4 ============================================================================== --- head/share/man/man4/tcp.4 Thu Mar 8 13:00:49 2012 (r232694) +++ head/share/man/man4/tcp.4 Thu Mar 8 15:27:29 2012 (r232695) @@ -256,8 +256,10 @@ or the internal send buffer is filled. This option enables the use of MD5 digests (also known as TCP-MD5) on writes to the specified socket. Outgoing traffic is digested; -digests on incoming traffic are verified -if the net.inet.tcp.signature_verify_input sysctl is nonzero. +digests on incoming traffic are verified if the +.Va net.inet.tcp.signature_verify_input +.Xr sysctl 3 +is nonzero. The current default behavior for the system is to respond to a system advertising this option with TCP-MD5; this may change. .Pp From owner-svn-src-all@FreeBSD.ORG Thu Mar 8 18:01:07 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BE6BA1065672; Thu, 8 Mar 2012 18:01:07 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A969F8FC16; Thu, 8 Mar 2012 18:01:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q28I17cW055482; Thu, 8 Mar 2012 18:01:07 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q28I17dX055480; Thu, 8 Mar 2012 18:01:07 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201203081801.q28I17dX055480@svn.freebsd.org> From: Xin LI Date: Thu, 8 Mar 2012 18:01:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232696 - releng/8.3/usr.sbin/pw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2012 18:01:07 -0000 Author: delphij Date: Thu Mar 8 18:01:07 2012 New Revision: 232696 URL: http://svn.freebsd.org/changeset/base/232696 Log: MFS r232550: Backout r223115 and restore the historic behavior (create the default base directory in pw.conf). Approved by: re (kib) Modified: releng/8.3/usr.sbin/pw/pw_user.c Directory Properties: releng/8.3/usr.sbin/pw/ (props changed) Modified: releng/8.3/usr.sbin/pw/pw_user.c ============================================================================== --- releng/8.3/usr.sbin/pw/pw_user.c Thu Mar 8 15:27:29 2012 (r232695) +++ releng/8.3/usr.sbin/pw/pw_user.c Thu Mar 8 18:01:07 2012 (r232696) @@ -170,7 +170,7 @@ pw_user(struct userconf * cnf, int mode, * If we'll need to use it or we're updating it, * then create the base home directory if necessary */ - if ((arg != NULL || getarg(args, 'm') != NULL) && (getarg(args, 'd') == NULL)) { + if (arg != NULL || getarg(args, 'm') != NULL) { int l = strlen(cnf->home); if (l > 1 && cnf->home[l-1] == '/') /* Shave off any trailing path delimiter */ From owner-svn-src-all@FreeBSD.ORG Thu Mar 8 19:26:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 10DEA106564A; Thu, 8 Mar 2012 19:26:30 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 9C9528FC15; Thu, 8 Mar 2012 19:26:29 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 5565A46B0A; Thu, 8 Mar 2012 14:26:29 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B8E72B94D; Thu, 8 Mar 2012 14:26:28 -0500 (EST) From: John Baldwin To: "Jung-uk Kim" Date: Thu, 8 Mar 2012 11:05:32 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <201203051953.q25JrIS1002269@svn.freebsd.org> <201203071700.21259.jkim@FreeBSD.org> In-Reply-To: <201203071700.21259.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201203081105.32334.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 08 Mar 2012 14:26:28 -0500 (EST) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers@freebsd.org Subject: Re: svn commit: r232570 - head/sys/boot/i386/boot2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2012 19:26:30 -0000 On Wednesday, March 07, 2012 5:00:19 pm Jung-uk Kim wrote: > On Monday 05 March 2012 02:53 pm, John Baldwin wrote: > > Author: jhb > > Date: Mon Mar 5 19:53:17 2012 > > New Revision: 232570 > > URL: http://svn.freebsd.org/changeset/base/232570 > > > > Log: > > Fix boot2 to handle boot config files that only contain a custom > > path to a loader or kernel. Specifically, kname cannot be pointed > > at cmd[] since it's value is change to be an empty string after the > > initial call to parse, and cmd[]'s value can be changed (thus > > losing a prior setting for kname) due to user input at the boot > > prompt. While here, ensure that that initial boot config file text > > is nul-terminated, that ops is initialized to zero, and that kname > > is always initialized to a valid string. > > As many people pointed out, Clang overflows boot2 again after this > commit. Long long time ago, I asked this question on arch@: > > http://docs.freebsd.org/cgi/mid.cgi?200509081418.47794.jkim > > Why can't we do that now? Can't we build separate ufs1-only and > ufs2-only boot2's, at least? Having ufs1+ufs2 boot block is great > but I see very little benefit to support that in 2012. :-/ As I said on the reply to current@, I think having separate boot blocks will be a headache and PITA for our users. Let's see if we can get boot2 to fit without breaking functionality first. It is a shame that gcc outperforms clang so drastically in this case (gcc's boot2 is about 250 bytes smaller than clang's). -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Mar 8 19:41:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 75C40106566B; Thu, 8 Mar 2012 19:41:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 64CD08FC15; Thu, 8 Mar 2012 19:41:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q28Jf6al061877; Thu, 8 Mar 2012 19:41:06 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q28Jf6X6061869; Thu, 8 Mar 2012 19:41:06 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201203081941.q28Jf6X6061869@svn.freebsd.org> From: John Baldwin Date: Thu, 8 Mar 2012 19:41:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232700 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2012 19:41:06 -0000 Author: jhb Date: Thu Mar 8 19:41:05 2012 New Revision: 232700 URL: http://svn.freebsd.org/changeset/base/232700 Log: Add a new sched_clear_name() method to the scheduler interface to clear the cached name used for KTR_SCHED traces when a thread's name changes. This way KTR_SCHED traces (and thus schedgraph) will notice when a thread's name changes, most commonly via execve(). MFC after: 2 weeks Modified: head/sys/kern/kern_exec.c head/sys/kern/kern_intr.c head/sys/kern/kern_kthread.c head/sys/kern/kern_thr.c head/sys/kern/sched_4bsd.c head/sys/kern/sched_ule.c head/sys/sys/sched.h Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Thu Mar 8 19:17:02 2012 (r232699) +++ head/sys/kern/kern_exec.c Thu Mar 8 19:41:05 2012 (r232700) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -636,6 +637,9 @@ interpret: else if (vn_commname(binvp, p->p_comm, sizeof(p->p_comm)) != 0) bcopy(fexecv_proc_title, p->p_comm, sizeof(fexecv_proc_title)); bcopy(p->p_comm, td->td_name, sizeof(td->td_name)); +#ifdef KTR + sched_clear_tdname(td); +#endif /* * mark as execed, wakeup the process that vforked (if any) and tell Modified: head/sys/kern/kern_intr.c ============================================================================== --- head/sys/kern/kern_intr.c Thu Mar 8 19:17:02 2012 (r232699) +++ head/sys/kern/kern_intr.c Thu Mar 8 19:41:05 2012 (r232700) @@ -180,6 +180,9 @@ ithread_update(struct intr_thread *ithd) /* Update name and priority. */ strlcpy(td->td_name, ie->ie_fullname, sizeof(td->td_name)); +#ifdef KTR + sched_clear_tdname(td); +#endif thread_lock(td); sched_prio(td, pri); thread_unlock(td); Modified: head/sys/kern/kern_kthread.c ============================================================================== --- head/sys/kern/kern_kthread.c Thu Mar 8 19:17:02 2012 (r232699) +++ head/sys/kern/kern_kthread.c Thu Mar 8 19:41:05 2012 (r232700) @@ -115,6 +115,9 @@ kproc_create(void (*func)(void *), void va_start(ap, fmt); vsnprintf(td->td_name, sizeof(td->td_name), fmt, ap); va_end(ap); +#ifdef KTR + sched_clear_tdname(td); +#endif /* call the processes' main()... */ cpu_set_fork_handler(td, func, arg); @@ -453,6 +456,9 @@ kproc_kthread_add(void (*func)(void *), va_start(ap, fmt); vsnprintf(td->td_name, sizeof(td->td_name), fmt, ap); va_end(ap); +#ifdef KTR + sched_clear_tdname(td); +#endif return (0); } va_start(ap, fmt); Modified: head/sys/kern/kern_thr.c ============================================================================== --- head/sys/kern/kern_thr.c Thu Mar 8 19:17:02 2012 (r232699) +++ head/sys/kern/kern_thr.c Thu Mar 8 19:41:05 2012 (r232700) @@ -548,6 +548,9 @@ sys_thr_set_name(struct thread *td, stru if (ttd == NULL) return (ESRCH); strcpy(ttd->td_name, name); +#ifdef KTR + sched_clear_tdname(ttd); +#endif PROC_UNLOCK(p); return (error); } Modified: head/sys/kern/sched_4bsd.c ============================================================================== --- head/sys/kern/sched_4bsd.c Thu Mar 8 19:17:02 2012 (r232699) +++ head/sys/kern/sched_4bsd.c Thu Mar 8 19:41:05 2012 (r232700) @@ -1614,6 +1614,17 @@ sched_tdname(struct thread *td) #endif } +#ifdef KTR +void +sched_clear_tdname(struct thread *td) +{ + struct td_sched *ts; + + ts = td->td_sched; + ts->ts_name[0] = '\0'; +} +#endif + void sched_affinity(struct thread *td) { Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Thu Mar 8 19:17:02 2012 (r232699) +++ head/sys/kern/sched_ule.c Thu Mar 8 19:41:05 2012 (r232700) @@ -2684,6 +2684,17 @@ sched_tdname(struct thread *td) #endif } +#ifdef KTR +void +sched_clear_tdname(struct thread *td) +{ + struct td_sched *ts; + + ts = td->td_sched; + ts->ts_name[0] = '\0'; +} +#endif + #ifdef SMP /* Modified: head/sys/sys/sched.h ============================================================================== --- head/sys/sys/sched.h Thu Mar 8 19:17:02 2012 (r232699) +++ head/sys/sys/sched.h Thu Mar 8 19:41:05 2012 (r232700) @@ -138,6 +138,9 @@ int sched_sizeof_thread(void); * functions. */ char *sched_tdname(struct thread *td); +#ifdef KTR +void sched_clear_tdname(struct thread *td); +#endif static __inline void sched_pin(void) From owner-svn-src-all@FreeBSD.ORG Thu Mar 8 19:54:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2CD6106566B for ; Thu, 8 Mar 2012 19:54:56 +0000 (UTC) (envelope-from dchisnall@pathscale.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 286BB8FC0C for ; Thu, 8 Mar 2012 19:54:55 +0000 (UTC) Received: by eaaf13 with SMTP id f13so269585eaa.13 for ; Thu, 08 Mar 2012 11:54:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=FecBPFE5szP5zFoXHadRD3idtPehnZnW1M99hZHjMBI=; b=U4uNQ8fvlvp7GdE7rb3kDqFo3GM4Lr7xwRIiS9mo00LQie9Cg/nq69wxAtt2XV+apN 92wu9GfGn+9CgF0+NxRHI0ZM5kWSFmNSuapVueCdnfKlpQ4hDK3LL0QS3Kc77Xc8wZNP 7DURq32K87xbos6BhUhIup0+4G026FT+HWci1hf+VHgh0U7DujOW73CqxH99tAiQx7CE SfCekKu/IZ2nMEQWeizOy5zbivofWbBi+GbMLujijKJWCklgqkHiP66/Mlr4BZMaisc1 UNVL9sQa3ZSpNBox5Mf3JrGaepBA8PI2BIH0HRrwwJUoqMO5UMoUQFUf/gi3POINwHYF 5UAw== Received: by 10.213.105.147 with SMTP id t19mr3639ebo.170.1331235131199; Thu, 08 Mar 2012 11:32:11 -0800 (PST) Received: from [192.168.0.2] (cpc1-cwma8-2-0-cust257.7-3.cable.virginmedia.com. [82.20.153.2]) by mx.google.com with ESMTPS id h47sm9432016eea.10.2012.03.08.11.32.08 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 08 Mar 2012 11:32:10 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=iso-8859-1 From: David Chisnall In-Reply-To: <201203081105.32334.jhb@freebsd.org> Date: Thu, 8 Mar 2012 19:32:07 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <09C8D743-8295-4F92-9332-D83F73B5F86D@FreeBSD.org> References: <201203051953.q25JrIS1002269@svn.freebsd.org> <201203071700.21259.jkim@FreeBSD.org> <201203081105.32334.jhb@freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1257) X-Gm-Message-State: ALoCoQkpjTk36amztuUtaOP1aqNgcFgGx1yjHOGwPXc2O1hG7K6scAcrgDaom3oNcfFLvkAN1pnP Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers@FreeBSD.org, Jung-uk Kim Subject: Re: svn commit: r232570 - head/sys/boot/i386/boot2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2012 19:54:56 -0000 On 8 Mar 2012, at 16:05, John Baldwin wrote: > On Wednesday, March 07, 2012 5:00:19 pm Jung-uk Kim wrote: >> On Monday 05 March 2012 02:53 pm, John Baldwin wrote: >>> Author: jhb >>> Date: Mon Mar 5 19:53:17 2012 >>> New Revision: 232570 >>> URL: http://svn.freebsd.org/changeset/base/232570 >>>=20 >>> Log: >>> Fix boot2 to handle boot config files that only contain a custom >>> path to a loader or kernel. Specifically, kname cannot be pointed >>> at cmd[] since it's value is change to be an empty string after the >>> initial call to parse, and cmd[]'s value can be changed (thus >>> losing a prior setting for kname) due to user input at the boot >>> prompt. While here, ensure that that initial boot config file text >>> is nul-terminated, that ops is initialized to zero, and that kname >>> is always initialized to a valid string. >>=20 >> As many people pointed out, Clang overflows boot2 again after this=20 >> commit. Long long time ago, I asked this question on arch@: >>=20 >> http://docs.freebsd.org/cgi/mid.cgi?200509081418.47794.jkim >>=20 >> Why can't we do that now? Can't we build separate ufs1-only and=20 >> ufs2-only boot2's, at least? Having ufs1+ufs2 boot block is great=20 >> but I see very little benefit to support that in 2012. :-/ >=20 > As I said on the reply to current@, I think having separate boot = blocks will=20 > be a headache and PITA for our users. Let's see if we can get boot2 = to fit=20 > without breaking functionality first. It is a shame that gcc = outperforms=20 > clang so drastically in this case (gcc's boot2 is about 250 bytes = smaller than=20 > clang's). I'm going to take a look at the sequence of optimisations that are run = with -Os. It's currently mostly the same as -O2, which is probably not = ideal. I'll also see if I can create a .ll from boot2 that we can add = to the LLVM unit tests so that anyone who pushes it over the size = boundary will get a buildbot failure. David= From owner-svn-src-all@FreeBSD.ORG Thu Mar 8 20:27:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2257F106564A; Thu, 8 Mar 2012 20:27:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0F55A8FC17; Thu, 8 Mar 2012 20:27:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q28KRKp8063344; Thu, 8 Mar 2012 20:27:20 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q28KRKri063338; Thu, 8 Mar 2012 20:27:20 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201203082027.q28KRKri063338@svn.freebsd.org> From: John Baldwin Date: Thu, 8 Mar 2012 20:27:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232701 - in head/sys: fs/unionfs kern ufs/ufs vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2012 20:27:21 -0000 Author: jhb Date: Thu Mar 8 20:27:20 2012 New Revision: 232701 URL: http://svn.freebsd.org/changeset/base/232701 Log: Add KTR_VFS traces to track modifications to a vnode's writecount. Modified: head/sys/fs/unionfs/union_subr.c head/sys/kern/vfs_syscalls.c head/sys/kern/vfs_vnops.c head/sys/ufs/ufs/ufs_extattr.c head/sys/vm/vnode_pager.c Modified: head/sys/fs/unionfs/union_subr.c ============================================================================== --- head/sys/fs/unionfs/union_subr.c Thu Mar 8 19:41:05 2012 (r232700) +++ head/sys/fs/unionfs/union_subr.c Thu Mar 8 20:27:20 2012 (r232701) @@ -952,6 +952,8 @@ unionfs_vn_create_on_upper(struct vnode goto unionfs_vn_create_on_upper_free_out1; } vp->v_writecount++; + CTR3(KTR_VFS, "%s: vp %p v_writecount increased to %d", __func__, vp, + vp->v_writecount); *vpp = vp; unionfs_vn_create_on_upper_free_out1: @@ -1087,6 +1089,8 @@ unionfs_copyfile(struct unionfs_node *un } VOP_CLOSE(uvp, FWRITE, cred, td); uvp->v_writecount--; + CTR3(KTR_VFS, "%s: vp %p v_writecount decreased to %d", __func__, uvp, + uvp->v_writecount); vn_finished_write(mp); Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Thu Mar 8 19:41:05 2012 (r232700) +++ head/sys/kern/vfs_syscalls.c Thu Mar 8 20:27:20 2012 (r232701) @@ -4591,16 +4591,22 @@ sys_fhopen(td, uap) if (error) goto bad; - if (fmode & FWRITE) + if (fmode & FWRITE) { vp->v_writecount++; + CTR3(KTR_VFS, "%s: vp %p v_writecount increased to %d", + __func__, vp, vp->v_writecount); + } /* * end of vn_open code */ if ((error = falloc(td, &nfp, &indx, fmode)) != 0) { - if (fmode & FWRITE) + if (fmode & FWRITE) { vp->v_writecount--; + CTR3(KTR_VFS, "%s: vp %p v_writecount decreased to %d", + __func__, vp, vp->v_writecount); + } goto bad; } /* An extra reference on `nfp' has been held for us by falloc(). */ Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Thu Mar 8 19:41:05 2012 (r232700) +++ head/sys/kern/vfs_vnops.c Thu Mar 8 20:27:20 2012 (r232701) @@ -245,8 +245,11 @@ restart: if ((error = VOP_OPEN(vp, fmode, cred, td, fp)) != 0) goto bad; - if (fmode & FWRITE) + if (fmode & FWRITE) { vp->v_writecount++; + CTR3(KTR_VFS, "%s: vp %p v_writecount increased to %d", + __func__, vp, vp->v_writecount); + } *flagp = fmode; ASSERT_VOP_LOCKED(vp, "vn_open_cred"); if (!mpsafe) @@ -309,6 +312,8 @@ vn_close(vp, flags, file_cred, td) VNASSERT(vp->v_writecount > 0, vp, ("vn_close: negative writecount")); vp->v_writecount--; + CTR3(KTR_VFS, "%s: vp %p v_writecount decreased to %d", + __func__, vp, vp->v_writecount); } error = VOP_CLOSE(vp, flags, file_cred, td); vput(vp); Modified: head/sys/ufs/ufs/ufs_extattr.c ============================================================================== --- head/sys/ufs/ufs/ufs_extattr.c Thu Mar 8 19:41:05 2012 (r232700) +++ head/sys/ufs/ufs/ufs_extattr.c Thu Mar 8 20:27:20 2012 (r232701) @@ -335,6 +335,8 @@ ufs_extattr_enable_with_open(struct ufsm } vp->v_writecount++; + CTR3(KTR_VFS, "%s: vp %p v_writecount increased to %d", __func__, vp, + vp->v_writecount); vref(vp); Modified: head/sys/vm/vnode_pager.c ============================================================================== --- head/sys/vm/vnode_pager.c Thu Mar 8 19:41:05 2012 (r232700) +++ head/sys/vm/vnode_pager.c Thu Mar 8 20:27:20 2012 (r232701) @@ -272,6 +272,8 @@ vnode_pager_dealloc(object) if (object->un_pager.vnp.writemappings > 0) { object->un_pager.vnp.writemappings = 0; vp->v_writecount--; + CTR3(KTR_VFS, "%s: vp %p v_writecount decreased to %d", + __func__, vp, vp->v_writecount); } vp->v_object = NULL; vp->v_vflag &= ~VV_TEXT; @@ -1241,9 +1243,13 @@ vnode_pager_update_writecount(vm_object_ if (old_wm == 0 && object->un_pager.vnp.writemappings != 0) { ASSERT_VOP_ELOCKED(vp, "v_writecount inc"); vp->v_writecount++; + CTR3(KTR_VFS, "%s: vp %p v_writecount increased to %d", + __func__, vp, vp->v_writecount); } else if (old_wm != 0 && object->un_pager.vnp.writemappings == 0) { ASSERT_VOP_ELOCKED(vp, "v_writecount dec"); vp->v_writecount--; + CTR3(KTR_VFS, "%s: vp %p v_writecount decreased to %d", + __func__, vp, vp->v_writecount); } VM_OBJECT_UNLOCK(object); } From owner-svn-src-all@FreeBSD.ORG Thu Mar 8 20:34:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 11753106566B; Thu, 8 Mar 2012 20:34:14 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0139A8FC16; Thu, 8 Mar 2012 20:34:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q28KYDnb063705; Thu, 8 Mar 2012 20:34:13 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q28KYDwq063702; Thu, 8 Mar 2012 20:34:13 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201203082034.q28KYDwq063702@svn.freebsd.org> From: Peter Holm Date: Thu, 8 Mar 2012 20:34:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232702 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2012 20:34:14 -0000 Author: pho Date: Thu Mar 8 20:34:13 2012 New Revision: 232702 URL: http://svn.freebsd.org/changeset/base/232702 Log: Free up allocated memory used by posix_fadvise(2). Modified: head/sys/kern/kern_descrip.c head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Thu Mar 8 20:27:20 2012 (r232701) +++ head/sys/kern/kern_descrip.c Thu Mar 8 20:34:13 2012 (r232702) @@ -104,6 +104,8 @@ static MALLOC_DEFINE(M_FILEDESC_TO_LEADE "file desc to leader structures"); static MALLOC_DEFINE(M_SIGIO, "sigio", "sigio structures"); +MALLOC_DECLARE(M_FADVISE); + static uma_zone_t file_zone; @@ -2577,6 +2579,7 @@ _fdrop(struct file *fp, struct thread *t error = fo_close(fp, td); atomic_subtract_int(&openfiles, 1); crfree(fp->f_cred); + free(fp->f_advice, M_FADVISE); uma_zfree(file_zone, fp); return (error); Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Thu Mar 8 20:27:20 2012 (r232701) +++ head/sys/kern/vfs_syscalls.c Thu Mar 8 20:34:13 2012 (r232702) @@ -88,7 +88,7 @@ __FBSDID("$FreeBSD$"); #include -static MALLOC_DEFINE(M_FADVISE, "fadvise", "posix_fadvise(2) information"); +MALLOC_DEFINE(M_FADVISE, "fadvise", "posix_fadvise(2) information"); SDT_PROVIDER_DEFINE(vfs); SDT_PROBE_DEFINE(vfs, , stat, mode, mode); From owner-svn-src-all@FreeBSD.ORG Thu Mar 8 21:06:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 41D96106564A; Thu, 8 Mar 2012 21:06:06 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 308848FC15; Thu, 8 Mar 2012 21:06:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q28L6638064882; Thu, 8 Mar 2012 21:06:06 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q28L65Bw064874; Thu, 8 Mar 2012 21:06:05 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201203082106.q28L65Bw064874@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Thu, 8 Mar 2012 21:06:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232703 - head/sys/fs/ext2fs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2012 21:06:06 -0000 Author: pfg Date: Thu Mar 8 21:06:05 2012 New Revision: 232703 URL: http://svn.freebsd.org/changeset/base/232703 Log: Add support for ns timestamps and birthtime to the ext2/3 driver. When using big inodes there is sufficient space in ext3 to keep extra resolution and birthtime (creation) timestamps. The appropriate fields in the on-disk inode have been approved for a long time but support for this in ext3 has not been widely distributed. In preparation for ext4 most linux distributions have enabled by default such bigger inodes and some people use nanosecond timestamps in ext3. We now support those when the inode is big enough and while we do recognize the EXT4F_ROCOMPAT_EXTRA_ISIZE, we maintain the extra timestamps even when they are not used. An additional note by Bruce Evans: We blindly accept unrepresentable tv_nsec in VOP_SETATTR(), but all file systems have always done that. When POSIX gets around to specifying the behaviour, it will probably require certain rounding to the fs's resolution and not rejecting the request. This unfortunately means that syscalls that set times can't really tell if they succeeded without reading back the times using stat() or similar and checking that they were set close enough. Reviewed by: bde Approved by: jhb (mentor) MFC after: 2 weeks Modified: head/sys/fs/ext2fs/ext2_alloc.c head/sys/fs/ext2fs/ext2_dinode.h head/sys/fs/ext2fs/ext2_inode_cnv.c head/sys/fs/ext2fs/ext2_vfsops.c head/sys/fs/ext2fs/ext2_vnops.c head/sys/fs/ext2fs/ext2fs.h head/sys/fs/ext2fs/inode.h Modified: head/sys/fs/ext2fs/ext2_alloc.c ============================================================================== --- head/sys/fs/ext2fs/ext2_alloc.c Thu Mar 8 20:34:13 2012 (r232702) +++ head/sys/fs/ext2fs/ext2_alloc.c Thu Mar 8 21:06:05 2012 (r232703) @@ -344,6 +344,7 @@ ext2_valloc(pvp, mode, cred, vpp) struct ucred *cred; struct vnode **vpp; { + struct timespec ts; struct inode *pip; struct m_ext2fs *fs; struct inode *ip; @@ -385,14 +386,14 @@ ext2_valloc(pvp, mode, cred, vpp) } ip = VTOI(*vpp); - /* - the question is whether using VGET was such good idea at all - - Linux doesn't read the old inode in when it's allocating a - new one. I will set at least i_size & i_blocks the zero. - */ - ip->i_mode = 0; + /* + * The question is whether using VGET was such good idea at all: + * Linux doesn't read the old inode in when it is allocating a + * new one. I will set at least i_size and i_blocks to zero. + */ ip->i_size = 0; ip->i_blocks = 0; + ip->i_mode = 0; ip->i_flags = 0; /* now we want to make sure that the block pointers are zeroed out */ for (i = 0; i < NDADDR; i++) @@ -406,6 +407,11 @@ ext2_valloc(pvp, mode, cred, vpp) */ if (ip->i_gen == 0 || ++ip->i_gen == 0) ip->i_gen = random() / 2 + 1; + + vfs_timestamp(&ts); + ip->i_birthtime = ts.tv_sec; + ip->i_birthnsec = ts.tv_nsec; + /* printf("ext2_valloc: allocated inode %d\n", ino); */ Modified: head/sys/fs/ext2fs/ext2_dinode.h ============================================================================== --- head/sys/fs/ext2fs/ext2_dinode.h Thu Mar 8 20:34:13 2012 (r232702) +++ head/sys/fs/ext2fs/ext2_dinode.h Thu Mar 8 21:06:05 2012 (r232703) @@ -61,6 +61,16 @@ #define EXT2_NODUMP 0x00000040 /* do not dump file */ #define EXT2_NOATIME 0x00000080 /* do not update atime */ +/* + * Definitions for nanosecond timestamps. + * Ext3 inode versioning, 2006-12-13. + */ +#define EXT3_EPOCH_BITS 2 +#define EXT3_EPOCH_MASK ((1 << EXT3_EPOCH_BITS) - 1) +#define EXT3_NSEC_MASK (~0UL << EXT3_EPOCH_BITS) + +#define E2DI_HAS_XTIME(ip) (EXT2_INODE_SIZE((ip)->i_e2fs) > \ + E2FS_REV0_INODE_SIZE) /* * Structure of an inode on the disk @@ -77,7 +87,7 @@ struct ext2fs_dinode { uint16_t e2di_nlink; /* 26: File link count */ uint32_t e2di_nblock; /* 28: Blocks count */ uint32_t e2di_flags; /* 32: Status flags (chflags) */ - uint32_t e2di_linux_reserved1; /* 36 */ + uint32_t e2di_version; /* 36: Low 32 bits inode version */ uint32_t e2di_blocks[EXT2_N_BLOCKS]; /* 40: disk blocks */ uint32_t e2di_gen; /* 100: generation number */ uint32_t e2di_facl; /* 104: file ACL (not implemented) */ @@ -91,6 +101,12 @@ struct ext2fs_dinode { uint32_t e2di_linux_reserved3; /* 124 */ uint16_t e2di_extra_isize; uint16_t e2di_pad1; + uint32_t e2di_ctime_extra; /* Extra change time */ + uint32_t e2di_mtime_extra; /* Extra modification time */ + uint32_t e2di_atime_extra; /* Extra access time */ + uint32_t e2di_crtime; /* Creation (birth)time */ + uint32_t e2di_crtime_extra; /* Extra creation (birth)time */ + uint32_t e2di_version_hi; /* High 30 bits of inode version */ }; #endif /* !_FS_EXT2FS_EXT2_DINODE_H_ */ Modified: head/sys/fs/ext2fs/ext2_inode_cnv.c ============================================================================== --- head/sys/fs/ext2fs/ext2_inode_cnv.c Thu Mar 8 20:34:13 2012 (r232702) +++ head/sys/fs/ext2fs/ext2_inode_cnv.c Thu Mar 8 21:06:05 2012 (r232703) @@ -36,6 +36,9 @@ #include #include +#define XTIME_TO_NSEC(x) ((x & EXT3_NSEC_MASK) >> 2) +#define NSEC_TO_XTIME(t) ((t << 2) & EXT3_NSEC_MASK) + void ext2_print_inode( in ) struct inode *in; @@ -83,6 +86,13 @@ ext2_ei2i(ei, ip) ip->i_atime = ei->e2di_atime; ip->i_mtime = ei->e2di_mtime; ip->i_ctime = ei->e2di_ctime; + if (E2DI_HAS_XTIME(ip)) { + ip->i_atimensec = XTIME_TO_NSEC(ei->e2di_atime_extra); + ip->i_mtimensec = XTIME_TO_NSEC(ei->e2di_mtime_extra); + ip->i_ctimensec = XTIME_TO_NSEC(ei->e2di_ctime_extra); + ip->i_birthtime = ei->e2di_crtime; + ip->i_birthnsec = XTIME_TO_NSEC(ei->e2di_crtime_extra); + } ip->i_flags = 0; ip->i_flags |= (ei->e2di_flags & EXT2_APPEND) ? SF_APPEND : 0; ip->i_flags |= (ei->e2di_flags & EXT2_IMMUTABLE) ? SF_IMMUTABLE : 0; @@ -121,6 +131,13 @@ ext2_i2ei(ip, ei) ei->e2di_atime = ip->i_atime; ei->e2di_mtime = ip->i_mtime; ei->e2di_ctime = ip->i_ctime; + if (E2DI_HAS_XTIME(ip)) { + ei->e2di_ctime_extra = NSEC_TO_XTIME(ip->i_ctimensec); + ei->e2di_mtime_extra = NSEC_TO_XTIME(ip->i_mtimensec); + ei->e2di_atime_extra = NSEC_TO_XTIME(ip->i_atimensec); + ei->e2di_crtime = ip->i_birthtime; + ei->e2di_crtime_extra = NSEC_TO_XTIME(ip->i_birthnsec); + } ei->e2di_flags = ip->i_flags; ei->e2di_flags = 0; ei->e2di_flags |= (ip->i_flags & SF_APPEND) ? EXT2_APPEND: 0; Modified: head/sys/fs/ext2fs/ext2_vfsops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vfsops.c Thu Mar 8 20:34:13 2012 (r232702) +++ head/sys/fs/ext2fs/ext2_vfsops.c Thu Mar 8 21:06:05 2012 (r232703) @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include @@ -339,14 +340,21 @@ compute_sb_data(struct vnode *devvp, str /* * Simple sanity check for superblock inode size value. */ - if (fs->e2fs_isize < E2FS_REV0_INODE_SIZE || - fs->e2fs_isize > fs->e2fs_bsize || + if (EXT2_INODE_SIZE(fs) < E2FS_REV0_INODE_SIZE || + EXT2_INODE_SIZE(fs) > fs->e2fs_bsize || (fs->e2fs_isize & (fs->e2fs_isize - 1)) != 0) { - printf("EXT2-fs: invalid inode size %d\n", + printf("ext2fs: invalid inode size %d\n", fs->e2fs_isize); return (EIO); } } + /* Check for extra isize in big inodes. */ + if (EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT4F_ROCOMPAT_EXTRA_ISIZE) && + EXT2_INODE_SIZE(fs) < sizeof(struct ext2fs_dinode)) { + printf("ext2fs: no space for extra inode timestamps\n"); + return (EINVAL); + } + fs->e2fs_ipb = fs->e2fs_bsize / EXT2_INODE_SIZE(fs); fs->e2fs_itpg = fs->e2fs_ipg /fs->e2fs_ipb; fs->e2fs_descpb = fs->e2fs_bsize / sizeof(struct ext2_gd); @@ -358,8 +366,8 @@ compute_sb_data(struct vnode *devvp, str fs->e2fs_gdbcount = db_count; fs->e2fs_gd = malloc(db_count * fs->e2fs_bsize, M_EXT2MNT, M_WAITOK); - fs->e2fs_contigdirs = malloc(fs->e2fs_gcount * sizeof(*fs->e2fs_contigdirs), - M_EXT2MNT, M_WAITOK); + fs->e2fs_contigdirs = malloc(fs->e2fs_gcount * + sizeof(*fs->e2fs_contigdirs), M_EXT2MNT, M_WAITOK); /* * Adjust logic_sb_block. @@ -390,7 +398,7 @@ compute_sb_data(struct vnode *devvp, str fs->e2fs_contigdirs[i] = 0; } if (es->e2fs_rev == E2FS_REV0 || - (es->e2fs_features_rocompat & EXT2F_ROCOMPAT_LARGEFILE) == 0) + !EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_LARGEFILE)) fs->e2fs_maxfilesize = 0x7fffffff; else fs->e2fs_maxfilesize = 0x7fffffffffffffff; @@ -967,8 +975,6 @@ ext2_vget(struct mount *mp, ino_t ino, i ip->i_block_group = ino_to_cg(fs, ino); ip->i_next_alloc_block = 0; ip->i_next_alloc_goal = 0; - ip->i_prealloc_count = 0; - ip->i_prealloc_block = 0; /* * Now we want to make sure that block pointers for unused Modified: head/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vnops.c Thu Mar 8 20:34:13 2012 (r232702) +++ head/sys/fs/ext2fs/ext2_vnops.c Thu Mar 8 21:06:05 2012 (r232703) @@ -360,11 +360,15 @@ ext2_getattr(ap) vap->va_rdev = ip->i_rdev; vap->va_size = ip->i_size; vap->va_atime.tv_sec = ip->i_atime; - vap->va_atime.tv_nsec = ip->i_atimensec; + vap->va_atime.tv_nsec = E2DI_HAS_XTIME(ip) ? ip->i_atimensec : 0; vap->va_mtime.tv_sec = ip->i_mtime; - vap->va_mtime.tv_nsec = ip->i_mtimensec; + vap->va_mtime.tv_nsec = E2DI_HAS_XTIME(ip) ? ip->i_mtimensec : 0; vap->va_ctime.tv_sec = ip->i_ctime; - vap->va_ctime.tv_nsec = ip->i_ctimensec; + vap->va_ctime.tv_nsec = E2DI_HAS_XTIME(ip) ? ip->i_ctimensec : 0; + if E2DI_HAS_XTIME(ip) { + vap->va_birthtime.tv_sec = ip->i_birthtime; + vap->va_birthtime.tv_nsec = ip->i_birthnsec; + } vap->va_flags = ip->i_flags; vap->va_gen = ip->i_gen; vap->va_blocksize = vp->v_mount->mnt_stat.f_iosize; @@ -501,6 +505,8 @@ ext2_setattr(ap) ip->i_mtime = vap->va_mtime.tv_sec; ip->i_mtimensec = vap->va_mtime.tv_nsec; } + ip->i_birthtime = vap->va_birthtime.tv_sec; + ip->i_birthnsec = vap->va_birthtime.tv_nsec; error = ext2_update(vp, 0); if (error) return (error); Modified: head/sys/fs/ext2fs/ext2fs.h ============================================================================== --- head/sys/fs/ext2fs/ext2fs.h Thu Mar 8 20:34:13 2012 (r232702) +++ head/sys/fs/ext2fs/ext2fs.h Thu Mar 8 21:06:05 2012 (r232703) @@ -129,7 +129,7 @@ struct ext2fs { uint32_t e4fs_rbcount_hi; /* reserved blocks count */ uint32_t e4fs_fbcount_hi; /* free blocks count */ uint16_t e4fs_min_extra_isize;/* all inodes have at least some bytes */ - uint16_t e4fs_want_extra_isize; /* new inodes should reserve some bytes */ + uint16_t e4fs_want_extra_isize; /* inodes must reserve some bytes */ uint32_t e4fs_flags; /* miscellaneous flags */ uint16_t e4fs_raid_stride; /* RAID stride */ uint16_t e4fs_mmpintv; /* number of seconds to wait in MMP checking */ @@ -214,6 +214,7 @@ struct m_ext2fs { #define EXT2F_ROCOMPAT_SPARSESUPER 0x0001 #define EXT2F_ROCOMPAT_LARGEFILE 0x0002 #define EXT2F_ROCOMPAT_BTREE_DIR 0x0004 +#define EXT4F_ROCOMPAT_EXTRA_ISIZE 0x0040 #define EXT2F_INCOMPAT_COMP 0x0001 #define EXT2F_INCOMPAT_FTYPE 0x0002 @@ -227,8 +228,9 @@ struct m_ext2fs { * - EXT2F_INCOMPAT_FTYPE */ #define EXT2F_COMPAT_SUPP 0x0000 -#define EXT2F_ROCOMPAT_SUPP (EXT2F_ROCOMPAT_SPARSESUPER \ - | EXT2F_ROCOMPAT_LARGEFILE) +#define EXT2F_ROCOMPAT_SUPP (EXT2F_ROCOMPAT_SPARSESUPER | \ + EXT2F_ROCOMPAT_LARGEFILE | \ + EXT4F_ROCOMPAT_EXTRA_ISIZE) #define EXT2F_INCOMPAT_SUPP EXT2F_INCOMPAT_FTYPE /* Assume that user mode programs are passing in an ext2fs superblock, not Modified: head/sys/fs/ext2fs/inode.h ============================================================================== --- head/sys/fs/ext2fs/inode.h Thu Mar 8 20:34:13 2012 (r232702) +++ head/sys/fs/ext2fs/inode.h Thu Mar 8 21:06:05 2012 (r232703) @@ -77,8 +77,6 @@ struct inode { uint32_t i_block_group; uint32_t i_next_alloc_block; uint32_t i_next_alloc_goal; - uint32_t i_prealloc_block; - uint32_t i_prealloc_count; /* Fields from struct dinode in UFS. */ uint16_t i_mode; /* IFMT, permissions; see below. */ From owner-svn-src-all@FreeBSD.ORG Thu Mar 8 21:09:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D55141065670; Thu, 8 Mar 2012 21:09:34 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C426A8FC14; Thu, 8 Mar 2012 21:09:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q28L9Yj7065021; Thu, 8 Mar 2012 21:09:34 GMT (envelope-from kan@svn.freebsd.org) Received: (from kan@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q28L9YIp065017; Thu, 8 Mar 2012 21:09:34 GMT (envelope-from kan@svn.freebsd.org) Message-Id: <201203082109.q28L9YIp065017@svn.freebsd.org> From: Alexander Kabaev Date: Thu, 8 Mar 2012 21:09:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232704 - head/sys/dev/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2012 21:09:34 -0000 Author: kan Date: Thu Mar 8 21:09:34 2012 New Revision: 232704 URL: http://svn.freebsd.org/changeset/base/232704 Log: Save more of config space for PCI Express and PCI-X devices. Expand pci_save_state and pci_restore_state to save more of the config state for PCI Express and PCI-X devices. Various writable control registers are present in PCI Express that can potentially be lost over suspend/resume cycle. This change is modeled after similar functionality in Linux. Reviewed by: wlosh,jhb MFC after: 1 month Modified: head/sys/dev/pci/pci.c head/sys/dev/pci/pcireg.h head/sys/dev/pci/pcivar.h Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Thu Mar 8 21:06:05 2012 (r232703) +++ head/sys/dev/pci/pci.c Thu Mar 8 21:09:34 2012 (r232704) @@ -723,6 +723,7 @@ pci_read_cap(device_t pcib, pcicfgregs * if ((cfg->hdrtype & PCIM_HDRTYPE) == PCIM_HDRTYPE_BRIDGE) pcix_chipset = 1; + cfg->pcix.pcix_location = ptr; break; case PCIY_EXPRESS: /* PCI-express */ /* @@ -4444,6 +4445,49 @@ pci_modevent(module_t mod, int what, voi return (0); } +static void +pci_cfg_restore_pcie(device_t dev, struct pci_devinfo *dinfo) +{ +#define WREG(n, v) pci_write_config(dev, pos + (n), (v), 2) + struct pcicfg_pcie *cfg; + int version, pos; + + cfg = &dinfo->cfg.pcie; + pos = cfg->pcie_location; + + version = cfg->pcie_flags & PCIM_EXP_FLAGS_VERSION; + + WREG(PCIR_EXPRESS_DEVICE_CTL, cfg->pcie_device_ctl); + + if (version > 1 || cfg->pcie_type == PCIM_EXP_TYPE_ROOT_PORT || + cfg->pcie_type == PCIM_EXP_TYPE_ENDPOINT || + cfg->pcie_type == PCIM_EXP_TYPE_LEGACY_ENDPOINT) + WREG(PCIR_EXPRESS_LINK_CTL, cfg->pcie_link_ctl); + + if (version > 1 || (cfg->pcie_type == PCIM_EXP_TYPE_ROOT_PORT || + (cfg->pcie_type == PCIM_EXP_TYPE_DOWNSTREAM_PORT && + (cfg->pcie_flags & PCIM_EXP_FLAGS_SLOT)))) + WREG(PCIR_EXPRESS_SLOT_CTL, cfg->pcie_slot_ctl); + + if (version > 1 || cfg->pcie_type == PCIM_EXP_TYPE_ROOT_PORT || + cfg->pcie_type == PCIM_EXP_TYPE_ROOT_EC) + WREG(PCIR_EXPRESS_ROOT_CTL, cfg->pcie_root_ctl); + + if (version > 1) { + WREG(PCIR_EXPRESS_DEVICE_CTL2, cfg->pcie_device_ctl2); + WREG(PCIR_EXPRESS_LINK_CTL2, cfg->pcie_link_ctl2); + WREG(PCIR_EXPRESS_SLOT_CTL2, cfg->pcie_slot_ctl2); + } +#undef WREG +} + +static void +pci_cfg_restore_pcix(device_t dev, struct pci_devinfo *dinfo) +{ + pci_write_config(dev, dinfo->cfg.pcix.pcix_location + PCIXR_COMMAND, + dinfo->cfg.pcix.pcix_command, 2); +} + void pci_cfg_restore(device_t dev, struct pci_devinfo *dinfo) { @@ -4479,6 +4523,14 @@ pci_cfg_restore(device_t dev, struct pci pci_write_config(dev, PCIR_PROGIF, dinfo->cfg.progif, 1); pci_write_config(dev, PCIR_REVID, dinfo->cfg.revid, 1); + /* + * Restore extended capabilities for PCI-Express and PCI-X + */ + if (dinfo->cfg.pcie.pcie_location != 0) + pci_cfg_restore_pcie(dev, dinfo); + if (dinfo->cfg.pcix.pcix_location != 0) + pci_cfg_restore_pcix(dev, dinfo); + /* Restore MSI and MSI-X configurations if they are present. */ if (dinfo->cfg.msi.msi_location != 0) pci_resume_msi(dev); @@ -4486,6 +4538,51 @@ pci_cfg_restore(device_t dev, struct pci pci_resume_msix(dev); } +static void +pci_cfg_save_pcie(device_t dev, struct pci_devinfo *dinfo) +{ +#define RREG(n) pci_read_config(dev, pos + (n), 2) + struct pcicfg_pcie *cfg; + int version, pos; + + cfg = &dinfo->cfg.pcie; + pos = cfg->pcie_location; + + cfg->pcie_flags = RREG(PCIR_EXPRESS_FLAGS); + + version = cfg->pcie_flags & PCIM_EXP_FLAGS_VERSION; + + cfg->pcie_device_ctl = RREG(PCIR_EXPRESS_DEVICE_CTL); + + if (version > 1 || cfg->pcie_type == PCIM_EXP_TYPE_ROOT_PORT || + cfg->pcie_type == PCIM_EXP_TYPE_ENDPOINT || + cfg->pcie_type == PCIM_EXP_TYPE_LEGACY_ENDPOINT) + cfg->pcie_link_ctl = RREG(PCIR_EXPRESS_LINK_CTL); + + if (version > 1 || (cfg->pcie_type == PCIM_EXP_TYPE_ROOT_PORT || + (cfg->pcie_type == PCIM_EXP_TYPE_DOWNSTREAM_PORT && + (cfg->pcie_flags & PCIM_EXP_FLAGS_SLOT)))) + cfg->pcie_slot_ctl = RREG(PCIR_EXPRESS_SLOT_CTL); + + if (version > 1 || cfg->pcie_type == PCIM_EXP_TYPE_ROOT_PORT || + cfg->pcie_type == PCIM_EXP_TYPE_ROOT_EC) + cfg->pcie_root_ctl = RREG(PCIR_EXPRESS_ROOT_CTL); + + if (version > 1) { + cfg->pcie_device_ctl2 = RREG(PCIR_EXPRESS_DEVICE_CTL2); + cfg->pcie_link_ctl2 = RREG(PCIR_EXPRESS_LINK_CTL2); + cfg->pcie_slot_ctl2 = RREG(PCIR_EXPRESS_SLOT_CTL2); + } +#undef RREG +} + +static void +pci_cfg_save_pcix(device_t dev, struct pci_devinfo *dinfo) +{ + dinfo->cfg.pcix.pcix_command = pci_read_config(dev, + dinfo->cfg.pcix.pcix_location + PCIXR_COMMAND, 2); +} + void pci_cfg_save(device_t dev, struct pci_devinfo *dinfo, int setstate) { @@ -4528,6 +4625,12 @@ pci_cfg_save(device_t dev, struct pci_de dinfo->cfg.progif = pci_read_config(dev, PCIR_PROGIF, 1); dinfo->cfg.revid = pci_read_config(dev, PCIR_REVID, 1); + if (dinfo->cfg.pcie.pcie_location != 0) + pci_cfg_save_pcie(dev, dinfo); + + if (dinfo->cfg.pcix.pcix_location != 0) + pci_cfg_save_pcix(dev, dinfo); + /* * don't set the state for display devices, base peripherals and * memory devices since bad things happen when they are powered down. Modified: head/sys/dev/pci/pcireg.h ============================================================================== --- head/sys/dev/pci/pcireg.h Thu Mar 8 21:06:05 2012 (r232703) +++ head/sys/dev/pci/pcireg.h Thu Mar 8 21:09:34 2012 (r232704) @@ -667,6 +667,16 @@ #define PCIR_EXPRESS_SLOT_STA 0x1a #define PCIR_EXPRESS_ROOT_CTL 0x1c #define PCIR_EXPRESS_ROOT_STA 0x20 +#define PCIR_EXPRESS_DEVICE_CTL2 40 +#define PCIM_EXPRESS_DEVICE_CTL2_ARI 0x20 +#define PCIM_EXPRESS_ID_ORDERED_REQ_EN 0x100 +#define PCIM_EXPRESS_ID_ORDERED_CMP_EN 0x200 +#define PCIM_EXPRESS_LTR_ENABLE 0x400 +#define PCIM_EXPRESS_OBFF_MSGA_ENABLE 0x2000 +#define PCIM_EXPRESS_OBFF_MSGB_ENABLE 0x4000 +#define PCIM_EXPRESS_OBFF_WAKE_ENABLE 0x6000 +#define PCIR_EXPRESS_LINK_CTL2 48 +#define PCIR_EXPRESS_SLOT_CTL2 56 /* MSI-X definitions */ #define PCIR_MSIX_CTRL 0x2 Modified: head/sys/dev/pci/pcivar.h ============================================================================== --- head/sys/dev/pci/pcivar.h Thu Mar 8 21:06:05 2012 (r232703) +++ head/sys/dev/pci/pcivar.h Thu Mar 8 21:09:34 2012 (r232704) @@ -127,6 +127,19 @@ struct pcicfg_ht { struct pcicfg_pcie { uint8_t pcie_location; /* Offset of PCI-e capability registers. */ uint8_t pcie_type; /* Device type. */ + uint16_t pcie_flags; /* Device capabilities register. */ + uint16_t pcie_device_ctl; /* Device control register. */ + uint16_t pcie_link_ctl; /* Link control register. */ + uint16_t pcie_slot_ctl; /* Slot control register. */ + uint16_t pcie_root_ctl; /* Root control register. */ + uint16_t pcie_device_ctl2; /* Second device control register. */ + uint16_t pcie_link_ctl2; /* Second link control register. */ + uint16_t pcie_slot_ctl2; /* Second slot control register. */ +}; + +struct pcicfg_pcix { + uint16_t pcix_command; + uint8_t pcix_location; /* Offset of PCI-X capability registers. */ }; /* config header information common to all header types */ @@ -171,6 +184,7 @@ typedef struct pcicfg { struct pcicfg_msix msix; /* PCI MSI-X */ struct pcicfg_ht ht; /* HyperTransport */ struct pcicfg_pcie pcie; /* PCI Express */ + struct pcicfg_pcix pcix; /* PCI-X */ } pcicfgregs; /* additional type 1 device config header information (PCI to PCI bridge) */ From owner-svn-src-all@FreeBSD.ORG Thu Mar 8 23:46:43 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CC421065673; Thu, 8 Mar 2012 23:46:43 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7C32C8FC15; Thu, 8 Mar 2012 23:46:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q28NkhYR069890; Thu, 8 Mar 2012 23:46:43 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q28NkhCL069888; Thu, 8 Mar 2012 23:46:43 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201203082346.q28NkhCL069888@svn.freebsd.org> From: Adrian Chadd Date: Thu, 8 Mar 2012 23:46:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232705 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2012 23:46:43 -0000 Author: adrian Date: Thu Mar 8 23:46:42 2012 New Revision: 232705 URL: http://svn.freebsd.org/changeset/base/232705 Log: Add missing \n's. This showed up when testing the wtap module, as it attaches with no radiotap tx/rx configuration. Modified: head/sys/net80211/ieee80211_radiotap.c Modified: head/sys/net80211/ieee80211_radiotap.c ============================================================================== --- head/sys/net80211/ieee80211_radiotap.c Thu Mar 8 21:09:34 2012 (r232704) +++ head/sys/net80211/ieee80211_radiotap.c Thu Mar 8 23:46:42 2012 (r232705) @@ -67,7 +67,7 @@ ieee80211_radiotap_attach(struct ieee802 else if (tx_radiotap & B(IEEE80211_RADIOTAP_XCHANNEL)) off = radiotap_offset(th, IEEE80211_RADIOTAP_XCHANNEL); if (off == -1) { - if_printf(ic->ic_ifp, "%s: no tx channel, radiotap 0x%x", + if_printf(ic->ic_ifp, "%s: no tx channel, radiotap 0x%x\n", __func__, tx_radiotap); /* NB: we handle this case but data will have no chan spec */ } else @@ -83,7 +83,7 @@ ieee80211_radiotap_attach(struct ieee802 else if (rx_radiotap & B(IEEE80211_RADIOTAP_XCHANNEL)) off = radiotap_offset(rh, IEEE80211_RADIOTAP_XCHANNEL); if (off == -1) { - if_printf(ic->ic_ifp, "%s: no rx channel, radiotap 0x%x", + if_printf(ic->ic_ifp, "%s: no rx channel, radiotap 0x%x\n", __func__, rx_radiotap); /* NB: we handle this case but data will have no chan spec */ } else From owner-svn-src-all@FreeBSD.ORG Thu Mar 8 23:53:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29147106564A; Thu, 8 Mar 2012 23:53:39 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 186A58FC0C; Thu, 8 Mar 2012 23:53:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q28NrciO070156; Thu, 8 Mar 2012 23:53:38 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q28Nrc5k070154; Thu, 8 Mar 2012 23:53:38 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201203082353.q28Nrc5k070154@svn.freebsd.org> From: Adrian Chadd Date: Thu, 8 Mar 2012 23:53:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232707 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2012 23:53:39 -0000 Author: adrian Date: Thu Mar 8 23:53:38 2012 New Revision: 232707 URL: http://svn.freebsd.org/changeset/base/232707 Log: Correctly initialise the TXQ link pointer to the last descriptor in the last buffer in the list. The current behaviour (due to me, so pointy hat is firmly on my head here) was incorrect - it was setting the link pointer to the last descriptor of the _first_ buffer in the TXQ. Instead, it should have set it to the last descriptor in the _last_ buffer in the TXQ. This showed up as occasional TX stalls with frames in the TXQ but no TX progress being made. Further inspection showed the TXQ looked like it contained multiple "lists" of frames - there'd be a list of correct frames, then a NULL link pointer, but there'd be a next buffer in the list. Since this code is only called upon an interface reset, it's likely this only began showing up when I started doing stress testing in environments which annoy the radios enough to cause lockups. I've not yet any TX stalls with this patch applied. PR: kern/165866 Modified: head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Thu Mar 8 23:52:22 2012 (r232706) +++ head/sys/dev/ath/if_ath_tx.c Thu Mar 8 23:53:38 2012 (r232707) @@ -623,19 +623,22 @@ void ath_txq_restart_dma(struct ath_softc *sc, struct ath_txq *txq) { struct ath_hal *ah = sc->sc_ah; - struct ath_buf *bf; + struct ath_buf *bf, *bf_last; ATH_TXQ_LOCK_ASSERT(txq); /* This is always going to be cleared, empty or not */ txq->axq_flags &= ~ATH_TXQ_PUTPENDING; + /* XXX make this ATH_TXQ_FIRST */ bf = TAILQ_FIRST(&txq->axq_q); + bf_last = ATH_TXQ_LAST(txq, axq_q_s); + if (bf == NULL) return; ath_hal_puttxbuf(ah, txq->axq_qnum, bf->bf_daddr); - txq->axq_link = &bf->bf_lastds->ds_link; + txq->axq_link = &bf_last->bf_lastds->ds_link; ath_hal_txstart(ah, txq->axq_qnum); } From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 00:12:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1E617106564A; Fri, 9 Mar 2012 00:12:06 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0D6478FC08; Fri, 9 Mar 2012 00:12:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q290C5SI070820; Fri, 9 Mar 2012 00:12:05 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q290C51M070815; Fri, 9 Mar 2012 00:12:05 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203090012.q290C51M070815@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 9 Mar 2012 00:12:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232709 - in head/sys: kern sys ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 00:12:06 -0000 Author: kib Date: Fri Mar 9 00:12:05 2012 New Revision: 232709 URL: http://svn.freebsd.org/changeset/base/232709 Log: Decomission mnt_noasync. Introduce MNTK_NOASYNC mnt_kern_flag which allows a filesystem to request VFS to not allow MNTK_ASYNC. MFC after: 1 week Modified: head/sys/kern/vfs_mount.c head/sys/kern/vfs_subr.c head/sys/sys/mount.h head/sys/ufs/ffs/ffs_softdep.c Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Thu Mar 8 23:59:49 2012 (r232708) +++ head/sys/kern/vfs_mount.c Fri Mar 9 00:12:05 2012 (r232709) @@ -851,7 +851,8 @@ vfs_domount_first( mp->mnt_optnew = NULL; MNT_ILOCK(mp); - if ((mp->mnt_flag & MNT_ASYNC) != 0 && mp->mnt_noasync == 0) + if ((mp->mnt_flag & MNT_ASYNC) != 0 && + (mp->mnt_kern_flag & MNTK_NOASYNC) == 0) mp->mnt_kern_flag |= MNTK_ASYNC; else mp->mnt_kern_flag &= ~MNTK_ASYNC; @@ -991,7 +992,8 @@ vfs_domount_update( */ mp->mnt_flag = (mp->mnt_flag & MNT_QUOTA) | (flag & ~MNT_QUOTA); } - if ((mp->mnt_flag & MNT_ASYNC) != 0 && mp->mnt_noasync == 0) + if ((mp->mnt_flag & MNT_ASYNC) != 0 && + (mp->mnt_kern_flag & MNTK_NOASYNC) == 0) mp->mnt_kern_flag |= MNTK_ASYNC; else mp->mnt_kern_flag &= ~MNTK_ASYNC; @@ -1351,7 +1353,8 @@ dounmount(mp, flags, td) } mp->mnt_kern_flag &= ~(MNTK_UNMOUNT | MNTK_UNMOUNTF); mp->mnt_flag |= async_flag; - if ((mp->mnt_flag & MNT_ASYNC) != 0 && mp->mnt_noasync == 0) + if ((mp->mnt_flag & MNT_ASYNC) != 0 && + (mp->mnt_kern_flag & MNTK_NOASYNC) == 0) mp->mnt_kern_flag |= MNTK_ASYNC; if (mp->mnt_kern_flag & MNTK_MWAIT) { mp->mnt_kern_flag &= ~MNTK_MWAIT; Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Thu Mar 8 23:59:49 2012 (r232708) +++ head/sys/kern/vfs_subr.c Fri Mar 9 00:12:05 2012 (r232709) @@ -2942,6 +2942,7 @@ DB_SHOW_COMMAND(mount, db_show_mount) MNT_KERN_FLAG(MNTK_REFEXPIRE); MNT_KERN_FLAG(MNTK_EXTENDED_SHARED); MNT_KERN_FLAG(MNTK_SHARED_WRITES); + MNT_KERN_FLAG(MNTK_NOASYNC); MNT_KERN_FLAG(MNTK_UNMOUNT); MNT_KERN_FLAG(MNTK_MWAIT); MNT_KERN_FLAG(MNTK_SUSPEND); @@ -2994,7 +2995,6 @@ DB_SHOW_COMMAND(mount, db_show_mount) db_printf(" mnt_gen = %d\n", mp->mnt_gen); db_printf(" mnt_nvnodelistsize = %d\n", mp->mnt_nvnodelistsize); db_printf(" mnt_writeopcount = %d\n", mp->mnt_writeopcount); - db_printf(" mnt_noasync = %u\n", mp->mnt_noasync); db_printf(" mnt_maxsymlinklen = %d\n", mp->mnt_maxsymlinklen); db_printf(" mnt_iosize_max = %d\n", mp->mnt_iosize_max); db_printf(" mnt_hashseed = %u\n", mp->mnt_hashseed); Modified: head/sys/sys/mount.h ============================================================================== --- head/sys/sys/mount.h Thu Mar 8 23:59:49 2012 (r232708) +++ head/sys/sys/mount.h Fri Mar 9 00:12:05 2012 (r232709) @@ -167,7 +167,6 @@ struct mount { int mnt_writeopcount; /* (i) write syscalls pending */ int mnt_kern_flag; /* (i) kernel only flags */ uint64_t mnt_flag; /* (i) flags shared with user */ - u_int mnt_noasync; /* (i) # noasync overrides */ struct vfsoptlist *mnt_opt; /* current mount options */ struct vfsoptlist *mnt_optnew; /* new options passed to fs */ int mnt_maxsymlinklen; /* max size of short symlink */ @@ -325,6 +324,7 @@ void __mnt_vnode_markerfree(str #define MNTK_REFEXPIRE 0x00000020 /* refcount expiring is happening */ #define MNTK_EXTENDED_SHARED 0x00000040 /* Allow shared locking for more ops */ #define MNTK_SHARED_WRITES 0x00000080 /* Allow shared locking for writes */ +#define MNTK_NOASYNC 0x00800000 /* disable async */ #define MNTK_UNMOUNT 0x01000000 /* unmount in progress */ #define MNTK_MWAIT 0x02000000 /* waiting for unmount to finish */ #define MNTK_SUSPEND 0x08000000 /* request write suspension */ Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Thu Mar 8 23:59:49 2012 (r232708) +++ head/sys/ufs/ffs/ffs_softdep.c Fri Mar 9 00:12:05 2012 (r232709) @@ -2368,8 +2368,7 @@ softdep_mount(devvp, mp, fs, cred) mp->mnt_flag = (mp->mnt_flag & ~MNT_ASYNC) | MNT_SOFTDEP; if ((mp->mnt_kern_flag & MNTK_SOFTDEP) == 0) { mp->mnt_kern_flag = (mp->mnt_kern_flag & ~MNTK_ASYNC) | - MNTK_SOFTDEP; - mp->mnt_noasync++; + MNTK_SOFTDEP | MNTK_NOASYNC; } MNT_IUNLOCK(mp); ump = VFSTOUFS(mp); From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 01:32:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 759BC106566B; Fri, 9 Mar 2012 01:32:06 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5B0E88FC0A; Fri, 9 Mar 2012 01:32:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q291W62v073699; Fri, 9 Mar 2012 01:32:06 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q291W6TG073697; Fri, 9 Mar 2012 01:32:06 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201203090132.q291W6TG073697@svn.freebsd.org> From: Eitan Adler Date: Fri, 9 Mar 2012 01:32:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232712 - head/sbin/adjkerntz X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 01:32:06 -0000 Author: eadler Date: Fri Mar 9 01:32:05 2012 New Revision: 232712 URL: http://svn.freebsd.org/changeset/base/232712 Log: Fix a variety of grammar and style nits PR: docs/165841 Submitted by: Robert Simmons Approved by: brd MFC after: 1 week Modified: head/sbin/adjkerntz/adjkerntz.8 Modified: head/sbin/adjkerntz/adjkerntz.8 ============================================================================== --- head/sbin/adjkerntz/adjkerntz.8 Fri Mar 9 00:53:54 2012 (r232711) +++ head/sbin/adjkerntz/adjkerntz.8 Fri Mar 9 01:32:05 2012 (r232712) @@ -24,12 +24,12 @@ .\" .\" $FreeBSD$ .\" -.Dd April 4, 1996 +.Dd March 8, 2012 .Dt ADJKERNTZ 8 .Os .Sh NAME .Nm adjkerntz -.Nd "adjust local time CMOS clock to reflect time zone changes and keep current timezone offset for the kernel" +.Nd adjust the local time CMOS clock to reflect time zone changes and keep the current timezone offset for the kernel .Sh SYNOPSIS .Nm .Fl i @@ -39,23 +39,21 @@ The .Nm utility maintains the proper relationship between the kernel clock, which -is always set to UTC, and the CMOS clock, which may be set to local -time. +is always set to UTC and the CMOS clock, which may be set to local time. The .Nm -utility also informs the kernel about machine timezone shifts to +utility also informs the kernel about machine timezone shifts in order to maintain proper timestamps for local time file systems such as the MS-DOS file system. -The main purpose of this thing is not general fixing of -initially broken MS-DOS file timestamp idea but keeping -the same timestamps between +The main purpose of maintaining these timestamps properly is to keep the +timestamps of a .Fx -MS-DOS file system -and MS-DOS operating system installed on the same -machine. +MS-DOS file system and an MS-DOS operating system synchronized when they are +installed on the same system rather than fixing broken MS-DOS file +timestamps. If the file .Pa /etc/wall_cmos_clock -exists, it means that CMOS clock keeps local time (MS-DOS and MS-Windows +exists, it means that the CMOS clock keeps local time (MS-DOS and MS-Windows compatible mode). If that file does not exist, it means that the CMOS clock keeps UTC time. The @@ -86,7 +84,7 @@ reads the local time from it and sets the kernel clock to the corresponding UTC time. The .Nm -utility also stores the local time zone offset into the +utility also stores the local time zone offset in the .Pa machdep.adjkerntz kernel variable, for use by subsequent invocations of .Em "'adjkerntz -a'" @@ -94,7 +92,7 @@ and by local time file systems. .Pp For a local time CMOS clock .Em "'adjkerntz -i'" -pauses, and remains inactive as a background daemon until it +pauses and remains inactive as a background daemon until it receives a SIGTERM. The SIGTERM will normally be sent by .Xr init 8 @@ -120,7 +118,7 @@ time zone offset, and the changed time z calculate a new time zone offset. It stores the new offset into the .Pa machdep.adjkerntz -kernel variable, and updates the wall CMOS clock to the new local time. +kernel variable and updates the wall CMOS clock to the new local time. If .Em "'adjkerntz -a'" was started at a nonexistent time (during a timezone change), it exits From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 02:23:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D9C941065670; Fri, 9 Mar 2012 02:23:03 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C92AC8FC1A; Fri, 9 Mar 2012 02:23:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q292N36j075287; Fri, 9 Mar 2012 02:23:03 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q292N3Ij075285; Fri, 9 Mar 2012 02:23:03 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201203090223.q292N3Ij075285@svn.freebsd.org> From: Nathan Whitehorn Date: Fri, 9 Mar 2012 02:23:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232714 - head/release X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 02:23:03 -0000 Author: nwhitehorn Date: Fri Mar 9 02:23:03 2012 New Revision: 232714 URL: http://svn.freebsd.org/changeset/base/232714 Log: Make sure not to tar up CVS directories if this ports tree is a CVS checkout. PR: bin/165868 MFC after: 5 days Modified: head/release/Makefile Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Fri Mar 9 02:13:47 2012 (r232713) +++ head/release/Makefile Fri Mar 9 02:23:03 2012 (r232714) @@ -90,6 +90,7 @@ ports.txz: mkdir -p ${DISTDIR}/usr ln -fs ${PORTSDIR} ${DISTDIR}/usr/ports cd ${DISTDIR} && tar cLvJf ${.OBJDIR}/ports.txz \ + --exclude CVS --exclude .svn \ --exclude usr/ports/distfiles --exclude usr/ports/packages \ --exclude 'usr/ports/INDEX*' --exclude work usr/ports From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 04:51:43 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 60BC4106566B; Fri, 9 Mar 2012 04:51:43 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail28.syd.optusnet.com.au (mail28.syd.optusnet.com.au [211.29.133.169]) by mx1.freebsd.org (Postfix) with ESMTP id F188E8FC12; Fri, 9 Mar 2012 04:51:42 +0000 (UTC) Received: from c211-30-171-136.carlnfd1.nsw.optusnet.com.au (c211-30-171-136.carlnfd1.nsw.optusnet.com.au [211.30.171.136]) by mail28.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q294pYWE013258 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 9 Mar 2012 15:51:35 +1100 Date: Fri, 9 Mar 2012 15:51:30 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Peter Holm In-Reply-To: <201203081249.q28Cn9ed045648@svn.freebsd.org> Message-ID: <20120309145110.D1365@besplex.bde.org> References: <201203081249.q28Cn9ed045648@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r232692 - head/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 04:51:43 -0000 On Thu, 8 Mar 2012, Peter Holm wrote: > Log: > syscall() fuzzing can trigger this panic. Return EINVAL instead. > > MFC after: 1 week If so, then, this is not the place to hide the bug. > Modified: head/sys/ufs/ffs/ffs_vnops.c > ============================================================================== > --- head/sys/ufs/ffs/ffs_vnops.c Thu Mar 8 11:05:53 2012 (r232691) > +++ head/sys/ufs/ffs/ffs_vnops.c Thu Mar 8 12:49:08 2012 (r232692) > @@ -464,11 +464,11 @@ ffs_read(ap) > } else if (vp->v_type != VREG && vp->v_type != VDIR) > panic("ffs_read: type %d", vp->v_type); > #endif > + if (uio->uio_resid < 0 || uio->uio_offset < 0) > + return (EINVAL); > orig_resid = uio->uio_resid; > - KASSERT(orig_resid >= 0, ("ffs_read: uio->uio_resid < 0")); > if (orig_resid == 0) > return (0); > - KASSERT(uio->uio_offset >= 0, ("ffs_read: uio->uio_offset < 0")); > fs = ip->i_fs; > if (uio->uio_offset < ip->i_size && > uio->uio_offset >= fs->fs_maxfilesize) All file systems are supposed to copy ffs here. The ones that actually do are still correct here. The code that enforces a non-negative uio_resid for read(2) is: % #ifndef _SYS_SYSPROTO_H_ % struct read_args { % int fd; % void *buf; % size_t nbyte; % }; % #endif % int % sys_read(td, uap) % struct thread *td; % struct read_args *uap; % { % struct uio auio; % struct iovec aiov; % int error; % % if (uap->nbyte > IOSIZE_MAX) % return (EINVAL); uap->nbyte is unsigned, so it is never negative. IOSIZE_MAX is either INT_MAX or SSIZE_MAX. % aiov.iov_base = uap->buf; % aiov.iov_len = uap->nbyte; iov_len has type size_t, so it can represent any value of nbytes, since that has type size_t too. % auio.uio_iov = &aiov; % auio.uio_iovcnt = 1; % auio.uio_resid = uap->nbyte; uio_resid has type ssize_t, so it can represent any value of nbyte less than IOSIZE_MAX. Thus no overflow occurs on this assignment, else there would be undefined behaviour and perhaps a negative value here. % auio.uio_segflg = UIO_USERSPACE; % error = kern_readv(td, uap->fd, &auio); % return(error); % } kib is supposed to have been careful converting the old int types and INT_MAX limit to ssize_t types and SSIZE_MAX limit, so that negative values remain impossible. They should be so impossible that asserting that they don't happen in VOPs is as useful as asserting that parity errors in the CPU don't happen, but if one happens then the fix is not to remove the assertion. Negative offsets seem to be disallowed correctly in sys_lseek() and sys_preadv(). syscall() can be used to pass weirder args than usual, but I don't know any way to reach ffs_read() without going through the checking in sys_lseek() or sys_preadv(). A stack trace of the panic would be useful for showing how it got through. There seems to be no checking of the non-negativeness of the arg for mmap(). That is almost correct, since the offset for mmap() is for memory, so off_t and its signedness are bogus anyway. sys_sendfile() checks. Bruce From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 05:14:59 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6454A1065672; Fri, 9 Mar 2012 05:14:59 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by mx1.freebsd.org (Postfix) with ESMTP id 007378FC14; Fri, 9 Mar 2012 05:14:58 +0000 (UTC) Received: from c211-30-171-136.carlnfd1.nsw.optusnet.com.au (c211-30-171-136.carlnfd1.nsw.optusnet.com.au [211.30.171.136]) by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q295EoRe009405 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 9 Mar 2012 16:14:51 +1100 Date: Fri, 9 Mar 2012 16:14:46 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ed Maste In-Reply-To: <201203081527.q28FRUSm050522@svn.freebsd.org> Message-ID: <20120309155320.W1588@besplex.bde.org> References: <201203081527.q28FRUSm050522@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r232695 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 05:14:59 -0000 On Thu, 8 Mar 2012, Ed Maste wrote: > Log: > Correct markup, use proper reference for sysctl(3) This is sort of backwards. > Submitted by: brueffer@ > > Modified: > head/share/man/man4/tcp.4 > > Modified: head/share/man/man4/tcp.4 > ============================================================================== > --- head/share/man/man4/tcp.4 Thu Mar 8 13:00:49 2012 (r232694) > +++ head/share/man/man4/tcp.4 Thu Mar 8 15:27:29 2012 (r232695) > @@ -256,8 +256,10 @@ or the internal send buffer is filled. > This option enables the use of MD5 digests (also known as TCP-MD5) > on writes to the specified socket. > Outgoing traffic is digested; > -digests on incoming traffic are verified > -if the net.inet.tcp.signature_verify_input sysctl is nonzero. > +digests on incoming traffic are verified if the > +.Va net.inet.tcp.signature_verify_input > +.Xr sysctl 3 sysctl(3) is a man page for sysctls. The (3) in it is part of its name. It is not part of the name of any sysctl. > +is nonzero. > The current default behavior for the system is to respond to a system > advertising this option with TCP-MD5; this may change. > .Pp Normal abuse of language is "the foo sysctl". This is a to avoid writing out a full description, which would be something like "the foo feature, which is controlled in the usual way by sysctl(3) at the programmer level and by sysctl(8) at the sysadmin level". For most sysctls (_not_ for most sysctl(3)s or sysctl(8)s), their man page is not the place to reference sysctl(3) or sysctl(8). The reference to sysctl(3) is negatively useful here, as in most places: - except for a few style inconsistencies, sysctl(3) contains no documentation about any sysctl by name. It mainly documents a very incomplete set of sysctls by number. It doesn't document even 1 tcp sysctl by either name or number. - sysctl(8) mainly documents a very incomplete set of sysctls by name. However, it too doesn't document even 1 tcp sysctl. - this sysctl actually is documented, in tcp(4). But that's where we already are. It would be more useful to refer to red_herring(3), since everyone knows how much time they should spend reading that. Bruce From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 05:37:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E7AF106566C; Fri, 9 Mar 2012 05:37:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6CE858FC0C; Fri, 9 Mar 2012 05:37:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q295btlm081503; Fri, 9 Mar 2012 05:37:55 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q295btTg081501; Fri, 9 Mar 2012 05:37:55 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201203090537.q295btTg081501@svn.freebsd.org> From: Alexander Motin Date: Fri, 9 Mar 2012 05:37:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232715 - stable/9/release/doc/en_US.ISO8859-1/hardware X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 05:37:55 -0000 Author: mav Date: Fri Mar 9 05:37:55 2012 New Revision: 232715 URL: http://svn.freebsd.org/changeset/base/232715 Log: MFC r232376: Add ahci(4) and siis(4) to the hardware notes. Modified: stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml Directory Properties: stable/9/release/doc/en_US.ISO8859-1/hardware/ (props changed) Modified: stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml Fri Mar 9 02:23:03 2012 (r232714) +++ stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml Fri Mar 9 05:37:55 2012 (r232715) @@ -748,6 +748,8 @@ &hwlist.ahc; + &hwlist.ahci; + &hwlist.ahd; &hwlist.aic; @@ -820,6 +822,8 @@ &hwlist.pst; + &hwlist.siis; + &hwlist.stg; &hwlist.sym; From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 05:43:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89F2F106566B; Fri, 9 Mar 2012 05:43:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 770288FC17; Fri, 9 Mar 2012 05:43:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q295h89M081717; Fri, 9 Mar 2012 05:43:08 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q295h8W5081710; Fri, 9 Mar 2012 05:43:08 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201203090543.q295h8W5081710@svn.freebsd.org> From: Alexander Motin Date: Fri, 9 Mar 2012 05:43:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232716 - in stable/9: share/man/man4 sys/dev/ahci sys/dev/ata sys/dev/ata/chipsets X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 05:43:08 -0000 Author: mav Date: Fri Mar 9 05:43:08 2012 New Revision: 232716 URL: http://svn.freebsd.org/changeset/base/232716 Log: MFC r232380: Fix names of some Marvell SATA chips. It looks like chips with proprietary interface supported by mvs(4) are 88SX, while AHCI-like chips are 88SE. PR: kern/165271 Modified: stable/9/share/man/man4/ahci.4 stable/9/share/man/man4/ata.4 stable/9/sys/dev/ahci/ahci.c stable/9/sys/dev/ata/ata-pci.h stable/9/sys/dev/ata/chipsets/ata-ahci.c stable/9/sys/dev/ata/chipsets/ata-marvell.c Directory Properties: stable/9/share/man/man4/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/share/man/man4/ahci.4 ============================================================================== --- stable/9/share/man/man4/ahci.4 Fri Mar 9 05:37:55 2012 (r232715) +++ stable/9/share/man/man4/ahci.4 Fri Mar 9 05:43:08 2012 (r232716) @@ -146,7 +146,7 @@ subclass 6 (SATA) and programming interf .Pp Also, in cooperation with atamarvell and atajmicron drivers of ata(4), it supports AHCI part of legacy-PATA + AHCI-SATA combined controllers, -such as JMicron JMB36x and Marvell 88SX61xx. +such as JMicron JMB36x and Marvell 88SE61xx. .Sh FILES .Bl -tag -width /dev/led/ahcich*.locate .It Pa /dev/led/ahcich*.act Modified: stable/9/share/man/man4/ata.4 ============================================================================== --- stable/9/share/man/man4/ata.4 Fri Mar 9 05:37:55 2012 (r232715) +++ stable/9/share/man/man4/ata.4 Fri Mar 9 05:43:08 2012 (r232716) @@ -193,8 +193,8 @@ IT8211F, IT8212F, IT8213F. .It JMicron: JMB360, JMB361, JMB363, JMB365, JMB366, JMB368. .It Marvell -88SX5040, 88SX5041, 88SX5080, 88SX5081, 88SX6041, 88SX6042, 88SX6081, 88SX6101, -88SX6102, 88SX6111, 88SX6121, 88SX6141, 88SX6145, 88SX7042. +88SX5040, 88SX5041, 88SX5080, 88SX5081, 88SX6041, 88SX6042, 88SX6081, 88SE6101, +88SE6102, 88SE6111, 88SE6121, 88SE6141, 88SE6145, 88SX7042. .It National: SC1100. .It NetCell: Modified: stable/9/sys/dev/ahci/ahci.c ============================================================================== --- stable/9/sys/dev/ahci/ahci.c Fri Mar 9 05:37:55 2012 (r232715) +++ stable/9/sys/dev/ahci/ahci.c Fri Mar 9 05:43:08 2012 (r232716) @@ -186,13 +186,13 @@ static struct { {0x2365197b, 0x00, "JMicron JMB365", AHCI_Q_NOFORCE}, {0x2366197b, 0x00, "JMicron JMB366", AHCI_Q_NOFORCE}, {0x2368197b, 0x00, "JMicron JMB368", AHCI_Q_NOFORCE}, - {0x611111ab, 0x00, "Marvell 88SX6111", AHCI_Q_NOFORCE | AHCI_Q_1CH | + {0x611111ab, 0x00, "Marvell 88SE6111", AHCI_Q_NOFORCE | AHCI_Q_1CH | AHCI_Q_EDGEIS}, - {0x612111ab, 0x00, "Marvell 88SX6121", AHCI_Q_NOFORCE | AHCI_Q_2CH | + {0x612111ab, 0x00, "Marvell 88SE6121", AHCI_Q_NOFORCE | AHCI_Q_2CH | AHCI_Q_EDGEIS | AHCI_Q_NONCQ | AHCI_Q_NOCOUNT}, - {0x614111ab, 0x00, "Marvell 88SX6141", AHCI_Q_NOFORCE | AHCI_Q_4CH | + {0x614111ab, 0x00, "Marvell 88SE6141", AHCI_Q_NOFORCE | AHCI_Q_4CH | AHCI_Q_EDGEIS | AHCI_Q_NONCQ | AHCI_Q_NOCOUNT}, - {0x614511ab, 0x00, "Marvell 88SX6145", AHCI_Q_NOFORCE | AHCI_Q_4CH | + {0x614511ab, 0x00, "Marvell 88SE6145", AHCI_Q_NOFORCE | AHCI_Q_4CH | AHCI_Q_EDGEIS | AHCI_Q_NONCQ | AHCI_Q_NOCOUNT}, {0x91201b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_NOBSYRES}, {0x91231b4b, 0x11, "Marvell 88SE912x", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, Modified: stable/9/sys/dev/ata/ata-pci.h ============================================================================== --- stable/9/sys/dev/ata/ata-pci.h Fri Mar 9 05:37:55 2012 (r232715) +++ stable/9/sys/dev/ata/ata-pci.h Fri Mar 9 05:43:08 2012 (r232716) @@ -278,12 +278,12 @@ struct ata_pci_controller { #define ATA_M88SX6042 0x604211ab #define ATA_M88SX6081 0x608111ab #define ATA_M88SX7042 0x704211ab -#define ATA_M88SX6101 0x610111ab -#define ATA_M88SX6102 0x610211ab -#define ATA_M88SX6111 0x611111ab -#define ATA_M88SX6121 0x612111ab -#define ATA_M88SX6141 0x614111ab -#define ATA_M88SX6145 0x614511ab +#define ATA_M88SE6101 0x610111ab +#define ATA_M88SE6102 0x610211ab +#define ATA_M88SE6111 0x611111ab +#define ATA_M88SE6121 0x612111ab +#define ATA_M88SE6141 0x614111ab +#define ATA_M88SE6145 0x614511ab #define ATA_MARVELL2_ID 0x1b4b #define ATA_MICRON_ID 0x1042 Modified: stable/9/sys/dev/ata/chipsets/ata-ahci.c ============================================================================== --- stable/9/sys/dev/ata/chipsets/ata-ahci.c Fri Mar 9 05:37:55 2012 (r232715) +++ stable/9/sys/dev/ata/chipsets/ata-ahci.c Fri Mar 9 05:43:08 2012 (r232716) @@ -180,12 +180,12 @@ ata_ahci_chipinit(device_t dev) ctlr->ichannels = ATA_INL(ctlr->r_res2, ATA_AHCI_PI); ctlr->channels = MAX(flsl(ctlr->ichannels), (ATA_INL(ctlr->r_res2, ATA_AHCI_CAP) & ATA_AHCI_CAP_NPMASK) + 1); - if (pci_get_devid(dev) == ATA_M88SX6111) + if (pci_get_devid(dev) == ATA_M88SE6111) ctlr->channels = 1; - else if (pci_get_devid(dev) == ATA_M88SX6121) + else if (pci_get_devid(dev) == ATA_M88SE6121) ctlr->channels = 2; - else if (pci_get_devid(dev) == ATA_M88SX6141 || - pci_get_devid(dev) == ATA_M88SX6145) + else if (pci_get_devid(dev) == ATA_M88SE6141 || + pci_get_devid(dev) == ATA_M88SE6145) ctlr->channels = 4; ctlr->reset = ata_ahci_reset; Modified: stable/9/sys/dev/ata/chipsets/ata-marvell.c ============================================================================== --- stable/9/sys/dev/ata/chipsets/ata-marvell.c Fri Mar 9 05:37:55 2012 (r232715) +++ stable/9/sys/dev/ata/chipsets/ata-marvell.c Fri Mar 9 05:43:08 2012 (r232716) @@ -108,12 +108,12 @@ ata_marvell_probe(device_t dev) { ATA_M88SX6042, 0, 4, MV_6042, ATA_SA300, "88SX6042" }, { ATA_M88SX6081, 0, 8, MV_60XX, ATA_SA300, "88SX6081" }, { ATA_M88SX7042, 0, 4, MV_7042, ATA_SA300, "88SX7042" }, - { ATA_M88SX6101, 0, 0, MV_61XX, ATA_UDMA6, "88SX6101" }, - { ATA_M88SX6102, 0, 0, MV_61XX, ATA_UDMA6, "88SX6102" }, - { ATA_M88SX6111, 0, 1, MV_61XX, ATA_UDMA6, "88SX6111" }, - { ATA_M88SX6121, 0, 2, MV_61XX, ATA_UDMA6, "88SX6121" }, - { ATA_M88SX6141, 0, 4, MV_61XX, ATA_UDMA6, "88SX6141" }, - { ATA_M88SX6145, 0, 4, MV_61XX, ATA_UDMA6, "88SX6145" }, + { ATA_M88SE6101, 0, 0, MV_61XX, ATA_UDMA6, "88SE6101" }, + { ATA_M88SE6102, 0, 0, MV_61XX, ATA_UDMA6, "88SE6102" }, + { ATA_M88SE6111, 0, 1, MV_61XX, ATA_UDMA6, "88SE6111" }, + { ATA_M88SE6121, 0, 2, MV_61XX, ATA_UDMA6, "88SE6121" }, + { ATA_M88SE6141, 0, 4, MV_61XX, ATA_UDMA6, "88SE6141" }, + { ATA_M88SE6145, 0, 4, MV_61XX, ATA_UDMA6, "88SE6145" }, { 0x91a41b4b, 0, 0, MV_91XX, ATA_UDMA6, "88SE912x" }, { 0, 0, 0, 0, 0, 0}}; From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 06:40:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 416D41065670 for ; Fri, 9 Mar 2012 06:40:40 +0000 (UTC) (envelope-from pho@holm.cc) Received: from relay03.pair.com (relay03.pair.com [209.68.5.17]) by mx1.freebsd.org (Postfix) with SMTP id 03F6D8FC17 for ; Fri, 9 Mar 2012 06:40:39 +0000 (UTC) Received: (qmail 2802 invoked from network); 9 Mar 2012 06:40:38 -0000 Received: from 87.58.144.241 (HELO x2.osted.lan) (87.58.144.241) by relay03.pair.com with SMTP; 9 Mar 2012 06:40:38 -0000 X-pair-Authenticated: 87.58.144.241 Received: from x2.osted.lan (localhost [127.0.0.1]) by x2.osted.lan (8.14.4/8.14.4) with ESMTP id q296eb5J040101; Fri, 9 Mar 2012 07:40:37 +0100 (CET) (envelope-from pho@x2.osted.lan) Received: (from pho@localhost) by x2.osted.lan (8.14.4/8.14.4/Submit) id q296eaOY040100; Fri, 9 Mar 2012 07:40:36 +0100 (CET) (envelope-from pho) Date: Fri, 9 Mar 2012 07:40:36 +0100 From: Peter Holm To: Bruce Evans Message-ID: <20120309064036.GA40029@x2.osted.lan> References: <201203081249.q28Cn9ed045648@svn.freebsd.org> <20120309145110.D1365@besplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120309145110.D1365@besplex.bde.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232692 - head/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 06:40:40 -0000 On Fri, Mar 09, 2012 at 03:51:30PM +1100, Bruce Evans wrote: > On Thu, 8 Mar 2012, Peter Holm wrote: > > >Log: > > syscall() fuzzing can trigger this panic. Return EINVAL instead. > > > > MFC after: 1 week > > If so, then, this is not the place to hide the bug. > OK > >Modified: head/sys/ufs/ffs/ffs_vnops.c > >============================================================================== > >--- head/sys/ufs/ffs/ffs_vnops.c Thu Mar 8 11:05:53 2012 (r232691) > >+++ head/sys/ufs/ffs/ffs_vnops.c Thu Mar 8 12:49:08 2012 (r232692) > >@@ -464,11 +464,11 @@ ffs_read(ap) > > } else if (vp->v_type != VREG && vp->v_type != VDIR) > > panic("ffs_read: type %d", vp->v_type); > >#endif > >+ if (uio->uio_resid < 0 || uio->uio_offset < 0) > >+ return (EINVAL); > > orig_resid = uio->uio_resid; > >- KASSERT(orig_resid >= 0, ("ffs_read: uio->uio_resid < 0")); > > if (orig_resid == 0) > > return (0); > >- KASSERT(uio->uio_offset >= 0, ("ffs_read: uio->uio_offset < 0")); > > fs = ip->i_fs; > > if (uio->uio_offset < ip->i_size && > > uio->uio_offset >= fs->fs_maxfilesize) > > All file systems are supposed to copy ffs here. The ones that actually > do are still correct here. > > The code that enforces a non-negative uio_resid for read(2) is: > > % #ifndef _SYS_SYSPROTO_H_ > % struct read_args { > % int fd; > % void *buf; > % size_t nbyte; > % }; > % #endif > % int > % sys_read(td, uap) > % struct thread *td; > % struct read_args *uap; > % { > % struct uio auio; > % struct iovec aiov; > % int error; > % > % if (uap->nbyte > IOSIZE_MAX) > % return (EINVAL); > > uap->nbyte is unsigned, so it is never negative. IOSIZE_MAX is either > INT_MAX or SSIZE_MAX. > > % aiov.iov_base = uap->buf; > % aiov.iov_len = uap->nbyte; > > iov_len has type size_t, so it can represent any value of nbytes, since > that has type size_t too. > > % auio.uio_iov = &aiov; > % auio.uio_iovcnt = 1; > % auio.uio_resid = uap->nbyte; > > uio_resid has type ssize_t, so it can represent any value of nbyte less > than IOSIZE_MAX. Thus no overflow occurs on this assignment, else there > would be undefined behaviour and perhaps a negative value here. > > % auio.uio_segflg = UIO_USERSPACE; > % error = kern_readv(td, uap->fd, &auio); > % return(error); > % } > > kib is supposed to have been careful converting the old int types and > INT_MAX limit to ssize_t types and SSIZE_MAX limit, so that negative > values remain impossible. They should be so impossible that asserting > that they don't happen in VOPs is as useful as asserting that parity > errors in the CPU don't happen, but if one happens then the fix is not > to remove the assertion. > > Negative offsets seem to be disallowed correctly in sys_lseek() and > sys_preadv(). > > syscall() can be used to pass weirder args than usual, but I don't > know any way to reach ffs_read() without going through the checking > in sys_lseek() or sys_preadv(). A stack trace of the panic would be > useful for showing how it got through. > This specific problem here was discover by: for (i = 0; i < 2000; i++) { if ((dirp = opendir(path)) == NULL) break; bcopy(dirp, &fuzz, sizeof(fuzz)); fuzz.dd_len = arc4random(); readdir(&fuzz); closedir(dirp); } http://people.freebsd.org/~pho/stress/log/kostik478.txt > There seems to be no checking of the non-negativeness of the arg for > mmap(). That is almost correct, since the offset for mmap() is for > memory, so off_t and its signedness are bogus anyway. > > sys_sendfile() checks. > > Bruce -- Peter From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 07:30:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C08FC1065670; Fri, 9 Mar 2012 07:30:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B02C58FC14; Fri, 9 Mar 2012 07:30:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q297UmHl085026; Fri, 9 Mar 2012 07:30:48 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q297UmYb085024; Fri, 9 Mar 2012 07:30:48 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201203090730.q297UmYb085024@svn.freebsd.org> From: Alexander Motin Date: Fri, 9 Mar 2012 07:30:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232717 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 07:30:48 -0000 Author: mav Date: Fri Mar 9 07:30:48 2012 New Revision: 232717 URL: http://svn.freebsd.org/changeset/base/232717 Log: Be more polite when setting state->nextevent inside cpu_new_callout(). Hardclock is not the only who wakes idle CPU since kdtrace cyclic addition. MFC after: 2 weeks Modified: head/sys/kern/kern_clocksource.c Modified: head/sys/kern/kern_clocksource.c ============================================================================== --- head/sys/kern/kern_clocksource.c Fri Mar 9 05:43:08 2012 (r232716) +++ head/sys/kern/kern_clocksource.c Fri Mar 9 07:30:48 2012 (r232717) @@ -854,10 +854,11 @@ cpu_new_callout(int cpu, int ticks) * If timer is global - there is chance it is already programmed. */ if (periodic || (timer->et_flags & ET_FLAGS_PERCPU) == 0) { - state->nextevent = state->nexthard; tmp = hardperiod; bintime_mul(&tmp, ticks - 1); - bintime_add(&state->nextevent, &tmp); + bintime_add(&tmp, &state->nexthard); + if (bintime_cmp(&tmp, &state->nextevent, <)) + state->nextevent = tmp; if (periodic || bintime_cmp(&state->nextevent, &nexttick, >=)) { ET_HW_UNLOCK(state); From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 07:53:45 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 292B3106566B; Fri, 9 Mar 2012 07:53:45 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 18A8E8FC0C; Fri, 9 Mar 2012 07:53:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q297ribh085717; Fri, 9 Mar 2012 07:53:44 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q297riiK085715; Fri, 9 Mar 2012 07:53:44 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203090753.q297riiK085715@svn.freebsd.org> From: Juli Mallett Date: Fri, 9 Mar 2012 07:53:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232718 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 07:53:45 -0000 Author: jmallett Date: Fri Mar 9 07:53:44 2012 New Revision: 232718 URL: http://svn.freebsd.org/changeset/base/232718 Log: Enable COMPAT_FREEBSD32 for the Octeon kernel config by default. Modified: head/sys/mips/conf/OCTEON1 Modified: head/sys/mips/conf/OCTEON1 ============================================================================== --- head/sys/mips/conf/OCTEON1 Fri Mar 9 07:30:48 2012 (r232717) +++ head/sys/mips/conf/OCTEON1 Fri Mar 9 07:53:44 2012 (r232718) @@ -61,7 +61,7 @@ options PROCFS # Process filesystem ( options PSEUDOFS # Pseudo-filesystem framework options GEOM_PART_GPT # GUID Partition Tables. options GEOM_LABEL # Provides labelization -#options COMPAT_FREEBSD32 # Compatible with o32 binaries (not yet) +options COMPAT_FREEBSD32 # Compatible with o32 binaries (not yet) options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options STACK # stack(9) support From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 08:36:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6058C106564A; Fri, 9 Mar 2012 08:36:31 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4FE868FC15; Fri, 9 Mar 2012 08:36:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q298aV8u087074; Fri, 9 Mar 2012 08:36:31 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q298aVOg087072; Fri, 9 Mar 2012 08:36:31 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201203090836.q298aVOg087072@svn.freebsd.org> From: Adrian Chadd Date: Fri, 9 Mar 2012 08:36:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232719 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 08:36:31 -0000 Author: adrian Date: Fri Mar 9 08:36:30 2012 New Revision: 232719 URL: http://svn.freebsd.org/changeset/base/232719 Log: Insert extra paranoia into the ath(4) driver. This function must be called with both the source and destination TXQs locked or things will get hairy. I added this as part of some debugging in a PR but it turned out to not be the cause. I still think it's -correct- so, here it is. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Fri Mar 9 07:53:44 2012 (r232718) +++ head/sys/dev/ath/if_ath.c Fri Mar 9 08:36:30 2012 (r232719) @@ -2908,6 +2908,10 @@ ath_beacon_update(struct ieee80211vap *v static void ath_txqmove(struct ath_txq *dst, struct ath_txq *src) { + + ATH_TXQ_LOCK_ASSERT(dst); + ATH_TXQ_LOCK_ASSERT(src); + TAILQ_CONCAT(&dst->axq_q, &src->axq_q, bf_list); dst->axq_link = src->axq_link; src->axq_link = NULL; From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 09:32:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9BBE0106566C; Fri, 9 Mar 2012 09:32:20 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 873A78FC13; Fri, 9 Mar 2012 09:32:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q299WKSI088899; Fri, 9 Mar 2012 09:32:20 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q299WK4c088897; Fri, 9 Mar 2012 09:32:20 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203090932.q299WK4c088897@svn.freebsd.org> From: Juli Mallett Date: Fri, 9 Mar 2012 09:32:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232720 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 09:32:20 -0000 Author: jmallett Date: Fri Mar 9 09:32:20 2012 New Revision: 232720 URL: http://svn.freebsd.org/changeset/base/232720 Log: "Did you still want the not yet? I think we just arrived at yet." Submitted by: thompsa Modified: head/sys/mips/conf/OCTEON1 Modified: head/sys/mips/conf/OCTEON1 ============================================================================== --- head/sys/mips/conf/OCTEON1 Fri Mar 9 08:36:30 2012 (r232719) +++ head/sys/mips/conf/OCTEON1 Fri Mar 9 09:32:20 2012 (r232720) @@ -61,7 +61,7 @@ options PROCFS # Process filesystem ( options PSEUDOFS # Pseudo-filesystem framework options GEOM_PART_GPT # GUID Partition Tables. options GEOM_LABEL # Provides labelization -options COMPAT_FREEBSD32 # Compatible with o32 binaries (not yet) +options COMPAT_FREEBSD32 # Compatible with o32 binaries options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options STACK # stack(9) support From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 11:48:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE0BD106564A; Fri, 9 Mar 2012 11:48:56 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A86B08FC18; Fri, 9 Mar 2012 11:48:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q29Bmuoi005153; Fri, 9 Mar 2012 11:48:56 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q29BmuIp005151; Fri, 9 Mar 2012 11:48:56 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201203091148.q29BmuIp005151@svn.freebsd.org> From: Tijl Coosemans Date: Fri, 9 Mar 2012 11:48:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232721 - head/sys/x86/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 11:48:56 -0000 Author: tijl Date: Fri Mar 9 11:48:56 2012 New Revision: 232721 URL: http://svn.freebsd.org/changeset/base/232721 Log: Clean up x86 endian.h: - Remove extern "C". There are no functions with external linkage here. [1] - Rename bswapNN_const(x) to bswapNN_gen(x) to indicate that these macros are generic implementations that can take non-constant arguments. [1] - Split up __GNUCLIKE_ASM && __GNUCLIKE_BUILTIN_CONSTANT_P and deal with each separately. - Replace _LP64 with __amd64__ because asm instructions are machine dependent, not ABI dependent. Submitted by: bde [1] Reviewed by: bde Modified: head/sys/x86/include/endian.h Modified: head/sys/x86/include/endian.h ============================================================================== --- head/sys/x86/include/endian.h Fri Mar 9 09:32:20 2012 (r232720) +++ head/sys/x86/include/endian.h Fri Mar 9 11:48:56 2012 (r232721) @@ -36,10 +36,6 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif - /* * Define the order of 32-bit words in 64-bit words. */ @@ -67,51 +63,63 @@ extern "C" { #define BYTE_ORDER _BYTE_ORDER #endif -#if defined(__GNUCLIKE_ASM) && defined(__GNUCLIKE_BUILTIN_CONSTANT_P) - -#define __bswap16_const(_x) (__uint16_t)((_x) << 8 | (_x) >> 8) - -#define __bswap16(_x) \ - (__builtin_constant_p(_x) ? \ - __bswap16_const((__uint16_t)(_x)) : __bswap16_var(_x)) - -#define __bswap32_const(_x) \ - (((__uint32_t)__bswap16(_x) << 16) | __bswap16((_x) >> 16)) - -#define __bswap32(_x) \ - (__builtin_constant_p(_x) ? \ - __bswap32_const((__uint32_t)(_x)) : __bswap32_var(_x)) - -#define __bswap64_const(_x) \ - (((__uint64_t)__bswap32(_x) << 32) | __bswap32((_x) >> 32)) +#define __bswap16_gen(x) (__uint16_t)((x) << 8 | (x) >> 8) +#define __bswap32_gen(x) \ + (((__uint32_t)__bswap16(x) << 16) | __bswap16((x) >> 16)) +#define __bswap64_gen(x) \ + (((__uint64_t)__bswap32(x) << 32) | __bswap32((x) >> 32)) + +#ifdef __GNUCLIKE_BUILTIN_CONSTANT_P +#define __bswap16(x) \ + (__builtin_constant_p(x) ? \ + __bswap16_gen((__uint16_t)(x)) : __bswap16_var(x)) +#define __bswap32(x) \ + (__builtin_constant_p(x) ? \ + __bswap32_gen((__uint32_t)(x)) : __bswap32_var(x)) +#define __bswap64(x) \ + (__builtin_constant_p(x) ? \ + __bswap64_gen((__uint64_t)(x)) : __bswap64_var(x)) +#else +/* XXX these are broken for use in static initializers. */ +#define __bswap16(x) __bswap16_var(x) +#define __bswap32(x) __bswap32_var(x) +#define __bswap64(x) __bswap64_var(x) +#endif -#define __bswap64(_x) \ - (__builtin_constant_p(_x) ? \ - __bswap64_const((__uint64_t)(_x)) : __bswap64_var(_x)) +/* These are defined as functions to avoid multiple evaluation of x. */ static __inline __uint16_t __bswap16_var(__uint16_t _x) { - return (__bswap16_const(_x)); + return (__bswap16_gen(_x)); } static __inline __uint32_t __bswap32_var(__uint32_t _x) { - __asm ("bswap %0" : "+r" (_x)); +#ifdef __GNUCLIKE_ASM + __asm("bswap %0" : "+r" (_x)); return (_x); +#else + return (__bswap32_gen(_x)); +#endif } static __inline __uint64_t __bswap64_var(__uint64_t _x) { -#ifdef _LP64 - __asm ("bswap %0" : "+r" (_x)); + +#if defined(__amd64__) && defined(__GNUCLIKE_ASM) + __asm("bswap %0" : "+r" (_x)); return (_x); #else - return (__bswap64_const(_x)); + /* + * It is important for the optimizations that the following is not + * really generic, but expands to 2 __bswap32_var()'s. + */ + return (__bswap64_gen(_x)); #endif } @@ -120,19 +128,4 @@ __bswap64_var(__uint64_t _x) #define __ntohl(x) __bswap32(x) #define __ntohs(x) __bswap16(x) -#else /* !(__GNUCLIKE_ASM && __GNUCLIKE_BUILTIN_CONSTANT_P) */ - -/* - * No optimizations are available for this compiler. Fall back to - * non-optimized functions by defining the constant usually used to prevent - * redefinition. - */ -#define _BYTEORDER_FUNC_DEFINED - -#endif /* __GNUCLIKE_ASM && __GNUCLIKE_BUILTIN_CONSTANT_P */ - -#ifdef __cplusplus -} -#endif - #endif /* !_MACHINE_ENDIAN_H_ */ From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 12:58:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E0351106566B; Fri, 9 Mar 2012 12:58:55 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 9AB718FC0A; Fri, 9 Mar 2012 12:58:55 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:21e7:1ad:882:b366] (unknown [IPv6:2001:7b8:3a7:0:21e7:1ad:882:b366]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id DF2355C37; Fri, 9 Mar 2012 13:58:54 +0100 (CET) Message-ID: <4F59FE93.2040401@FreeBSD.org> Date: Fri, 09 Mar 2012 13:58:59 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120229 Thunderbird/11.0 MIME-Version: 1.0 To: Tijl Coosemans References: <201203091148.q29BmuIp005151@svn.freebsd.org> In-Reply-To: <201203091148.q29BmuIp005151@svn.freebsd.org> X-Enigmail-Version: 1.4a1pre Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232721 - head/sys/x86/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 12:58:56 -0000 On 2012-03-09 12:48, Tijl Coosemans wrote: > Author: tijl > Date: Fri Mar 9 11:48:56 2012 > New Revision: 232721 > URL: http://svn.freebsd.org/changeset/base/232721 > > Log: > Clean up x86 endian.h: > - Remove extern "C". There are no functions with external linkage here. [1] > - Rename bswapNN_const(x) to bswapNN_gen(x) to indicate that these macros > are generic implementations that can take non-constant arguments. [1] > - Split up __GNUCLIKE_ASM && __GNUCLIKE_BUILTIN_CONSTANT_P and deal with > each separately. > - Replace _LP64 with __amd64__ because asm instructions are machine > dependent, not ABI dependent. ... > +#ifdef __GNUCLIKE_BUILTIN_CONSTANT_P > +#define __bswap16(x) \ > + (__builtin_constant_p(x) ? \ > + __bswap16_gen((__uint16_t)(x)) : __bswap16_var(x)) Shall we now add a cast to __uint16_t to this ternary expression? That should solve the problems with clang warnings about ntohs() etc once and for all. From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 13:06:25 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37B64106564A; Fri, 9 Mar 2012 13:06:25 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 22F0F8FC19; Fri, 9 Mar 2012 13:06:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q29D6O7p008096; Fri, 9 Mar 2012 13:06:24 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q29D6OAA008094; Fri, 9 Mar 2012 13:06:24 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201203091306.q29D6OAA008094@svn.freebsd.org> From: Jaakko Heinonen Date: Fri, 9 Mar 2012 13:06:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232722 - stable/9/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 13:06:25 -0000 Author: jh Date: Fri Mar 9 13:06:24 2012 New Revision: 232722 URL: http://svn.freebsd.org/changeset/base/232722 Log: MFC r232350: Since r199137 namei() returns EINVAL for DELETE and RENAME operations if the last component of the pathname is ".". Modified: stable/9/share/man/man9/namei.9 Directory Properties: stable/9/share/man/man9/ (props changed) Modified: stable/9/share/man/man9/namei.9 ============================================================================== --- stable/9/share/man/man9/namei.9 Fri Mar 9 11:48:56 2012 (r232721) +++ stable/9/share/man/man9/namei.9 Fri Mar 9 13:06:24 2012 (r232722) @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 21, 2005 +.Dd March 1, 2012 .Dt NAMEI 9 .Os .Sh NAME @@ -344,6 +344,13 @@ permissions. Too many symbolic links were encountered in translating the pathname. .It Bq Er EISDIR An attempt is made to open a directory with write mode specified. +.It Bq Er EINVAL +The last component of the pathname specified for a +.Dv DELETE +or +.Dv RENAME +operation is +.Ql \&. . .It Bq Er EROFS An attempt is made to modify a file or directory on a read-only file system. .El From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 13:12:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0E5E5106564A; Fri, 9 Mar 2012 13:12:34 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EE3618FC12; Fri, 9 Mar 2012 13:12:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q29DCXV0008315; Fri, 9 Mar 2012 13:12:33 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q29DCXLJ008313; Fri, 9 Mar 2012 13:12:33 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201203091312.q29DCXLJ008313@svn.freebsd.org> From: Michael Tuexen Date: Fri, 9 Mar 2012 13:12:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232723 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 13:12:34 -0000 Author: tuexen Date: Fri Mar 9 13:12:33 2012 New Revision: 232723 URL: http://svn.freebsd.org/changeset/base/232723 Log: Fix a bug reported by Peter Holm which results in a crash: Verify in sctp_peeloff() that the socket is a one-to-many style SCTP socket. MFC after: 3 days. Modified: head/sys/netinet/sctp_peeloff.c Modified: head/sys/netinet/sctp_peeloff.c ============================================================================== --- head/sys/netinet/sctp_peeloff.c Fri Mar 9 13:06:24 2012 (r232722) +++ head/sys/netinet/sctp_peeloff.c Fri Mar 9 13:12:33 2012 (r232723) @@ -55,6 +55,15 @@ sctp_can_peel_off(struct socket *head, s struct sctp_tcb *stcb; uint32_t state; + if (head == NULL) { + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PEELOFF, EBADF); + return (EBADF); + } + if ((head->so_proto->pr_protocol != IPPROTO_SCTP) || + (head->so_type != SOCK_SEQPACKET)) { + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PEELOFF, EOPNOTSUPP); + return (EOPNOTSUPP); + } inp = (struct sctp_inpcb *)head->so_pcb; if (inp == NULL) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PEELOFF, EFAULT); From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 13:15:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0E3BC106566C; Fri, 9 Mar 2012 13:15:41 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ED96B8FC16; Fri, 9 Mar 2012 13:15:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q29DFeF8008442; Fri, 9 Mar 2012 13:15:40 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q29DFeeu008440; Fri, 9 Mar 2012 13:15:40 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201203091315.q29DFeeu008440@svn.freebsd.org> From: Michael Tuexen Date: Fri, 9 Mar 2012 13:15:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232724 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 13:15:41 -0000 Author: tuexen Date: Fri Mar 9 13:15:40 2012 New Revision: 232724 URL: http://svn.freebsd.org/changeset/base/232724 Log: Add support for stf interfaces. MFC after: 3days. Modified: head/sys/netinet/sctp_bsd_addr.c Modified: head/sys/netinet/sctp_bsd_addr.c ============================================================================== --- head/sys/netinet/sctp_bsd_addr.c Fri Mar 9 13:12:33 2012 (r232723) +++ head/sys/netinet/sctp_bsd_addr.c Fri Mar 9 13:15:40 2012 (r232724) @@ -180,6 +180,7 @@ sctp_is_desired_interface_type(struct if case IFT_SLIP: case IFT_GIF: case IFT_L2VLAN: + case IFT_STF: case IFT_IP: case IFT_IPOVERCDLC: case IFT_IPOVERCLAW: From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 14:08:46 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EA670106566B; Fri, 9 Mar 2012 14:08:46 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 73A9F8FC08; Fri, 9 Mar 2012 14:08:46 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id F144725D3893; Fri, 9 Mar 2012 14:08:44 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id ECE1ABDD076; Fri, 9 Mar 2012 14:08:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id Ke+7pW-tadTJ; Fri, 9 Mar 2012 14:08:42 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id B2932BDD075; Fri, 9 Mar 2012 14:08:42 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201203091312.q29DCXLJ008313@svn.freebsd.org> Date: Fri, 9 Mar 2012 14:08:41 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <6E2D25B4-B9BC-4D51-98BF-FDE1EDDED7CB@lists.zabbadoz.net> References: <201203091312.q29DCXLJ008313@svn.freebsd.org> To: Michael Tuexen X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232723 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 14:08:47 -0000 On 9. Mar 2012, at 13:12 , Michael Tuexen wrote: > Author: tuexen > Date: Fri Mar 9 13:12:33 2012 > New Revision: 232723 > URL: http://svn.freebsd.org/changeset/base/232723 >=20 > Log: > Fix a bug reported by Peter Holm which results in a crash: > Verify in sctp_peeloff() that the socket is a one-to-many > style SCTP socket. /scratch/tmp/bz/head.svn/sys/netinet/sctp_peeloff.c: In function = 'sctp_can_peel_off': /scratch/tmp/bz/head.svn/sys/netinet/sctp_peeloff.c:59: warning: 'inp' = is used uninitialized in this function >=20 > MFC after: 3 days. >=20 > Modified: > head/sys/netinet/sctp_peeloff.c >=20 > Modified: head/sys/netinet/sctp_peeloff.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/netinet/sctp_peeloff.c Fri Mar 9 13:06:24 2012 = (r232722) > +++ head/sys/netinet/sctp_peeloff.c Fri Mar 9 13:12:33 2012 = (r232723) > @@ -55,6 +55,15 @@ sctp_can_peel_off(struct socket *head, s > struct sctp_tcb *stcb; > uint32_t state; >=20 > + if (head =3D=3D NULL) { > + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, = SCTP_FROM_SCTP_PEELOFF, EBADF); > + return (EBADF); > + } > + if ((head->so_proto->pr_protocol !=3D IPPROTO_SCTP) || > + (head->so_type !=3D SOCK_SEQPACKET)) { > + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, = SCTP_FROM_SCTP_PEELOFF, EOPNOTSUPP); > + return (EOPNOTSUPP); > + } > inp =3D (struct sctp_inpcb *)head->so_pcb; > if (inp =3D=3D NULL) { > SCTP_LTRACE_ERR_RET(inp, NULL, NULL, = SCTP_FROM_SCTP_PEELOFF, EFAULT); --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 14:48:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC2C1106566C; Fri, 9 Mar 2012 14:48:37 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail26.syd.optusnet.com.au (mail26.syd.optusnet.com.au [211.29.133.167]) by mx1.freebsd.org (Postfix) with ESMTP id 5394D8FC16; Fri, 9 Mar 2012 14:48:36 +0000 (UTC) Received: from c211-30-171-136.carlnfd1.nsw.optusnet.com.au (c211-30-171-136.carlnfd1.nsw.optusnet.com.au [211.30.171.136]) by mail26.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q29EmPHS006290 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 10 Mar 2012 01:48:28 +1100 Date: Sat, 10 Mar 2012 01:48:20 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Peter Holm In-Reply-To: <20120309064036.GA40029@x2.osted.lan> Message-ID: <20120310012432.Y3108@besplex.bde.org> References: <201203081249.q28Cn9ed045648@svn.freebsd.org> <20120309145110.D1365@besplex.bde.org> <20120309064036.GA40029@x2.osted.lan> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232692 - head/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 14:48:37 -0000 On Fri, 9 Mar 2012, Peter Holm wrote: > On Fri, Mar 09, 2012 at 03:51:30PM +1100, Bruce Evans wrote: >> On Thu, 8 Mar 2012, Peter Holm wrote: >> >>> Log: >>> syscall() fuzzing can trigger this panic. Return EINVAL instead. >>> >>> MFC after: 1 week >> >> If so, then, this is not the place to hide the bug. > > OK > > This specific problem here was discover by: > > for (i = 0; i < 2000; i++) { > if ((dirp = opendir(path)) == NULL) > break; > bcopy(dirp, &fuzz, sizeof(fuzz)); > fuzz.dd_len = arc4random(); > readdir(&fuzz); > closedir(dirp); > } Try this fix. You already fixed getdirentries() in 2008, but it was broken recently. % Index: vfs_syscalls.c % =================================================================== % RCS file: /home/ncvs/src/sys/kern/vfs_syscalls.c,v % retrieving revision 1.522 % diff -u -2 -r1.522 vfs_syscalls.c % --- vfs_syscalls.c 21 Feb 2012 01:05:12 -0000 1.522 % +++ vfs_syscalls.c 9 Mar 2012 14:22:57 -0000 % @@ -4154,7 +4154,7 @@ % % AUDIT_ARG_FD(fd); % - auio.uio_resid = count; % - if (auio.uio_resid > IOSIZE_MAX) % + if (count > IOSIZE_MAX) % return (EINVAL); % + auio.uio_resid = count; % if ((error = getvnode(td->td_proc->p_fd, fd, CAP_READ | CAP_SEEK, % &fp)) != 0) The broken version checked `count' only after possibly clobbering it. Clobbering occurs in practice on 32-bit arches, since then uio_resid has type int so it cannot hold a value of INT_MAX + 1U. The behaviour was undefined. The actual behaviour was normally to store a negative value in uio_resid. Comparing this with IOSIZE_MAX then always passed, since IOSIZE_MAX is a large int. `count' only has type u_int, not the usual size_t. It would be safer to keep comparing it with INT_MAX. Supporting directory reads of more than INT_MAX bytes is even more useless bloat than supporting regular files reads of more than INT_MAX bytes. But it seems safe enough. The limit is still INT_MAX on 32-bit arches. On 64-bit arches, it is now UINT_MAX = 2**32-1, not actually IOSIZE_MAX = 2**63-1 like the code checks for, since u_int can't go nearly as high as IOSIZE_MAX. At least after the above change, the compiler should see that the check always passes, and not generate any code for it, and maybe complain about it. Perhaps this is why it was broken. However, the compiler can't see this now, since IOSIZE_MAX is actually a macro that depends on a configuration variable, so it isn't always > UINT_MAX on 64-bit arches. Without the dynamic configuration, the broken check would obviously always pass on 32-bit arches, and the compiler complaining about it would be just what was required to avoid the bug. And even with dynamic configuration, it is almost obvious that the check always passed, since IOSIZE_MAX is (var ? INT_MAX : SSIZE_MAX), which is always INT_MAX. Bruce From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 15:25:28 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F6611065670; Fri, 9 Mar 2012 15:25:28 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EE31C8FC0A; Fri, 9 Mar 2012 15:25:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q29FPRTU013129; Fri, 9 Mar 2012 15:25:27 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q29FPRrK013127; Fri, 9 Mar 2012 15:25:27 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201203091525.q29FPRrK013127@svn.freebsd.org> From: Ed Maste Date: Fri, 9 Mar 2012 15:25:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232725 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 15:25:28 -0000 Author: emaste Date: Fri Mar 9 15:25:27 2012 New Revision: 232725 URL: http://svn.freebsd.org/changeset/base/232725 Log: Remove undesired sysctl(3) xref Submitted by: bde Modified: head/share/man/man4/tcp.4 Modified: head/share/man/man4/tcp.4 ============================================================================== --- head/share/man/man4/tcp.4 Fri Mar 9 13:15:40 2012 (r232724) +++ head/share/man/man4/tcp.4 Fri Mar 9 15:25:27 2012 (r232725) @@ -258,8 +258,7 @@ on writes to the specified socket. Outgoing traffic is digested; digests on incoming traffic are verified if the .Va net.inet.tcp.signature_verify_input -.Xr sysctl 3 -is nonzero. +sysctl is nonzero. The current default behavior for the system is to respond to a system advertising this option with TCP-MD5; this may change. .Pp From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 15:42:48 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7F216106568B; Fri, 9 Mar 2012 15:42:48 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6B20A8FC1B; Fri, 9 Mar 2012 15:42:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q29FgmYQ013696; Fri, 9 Mar 2012 15:42:48 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q29FgmgD013694; Fri, 9 Mar 2012 15:42:48 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201203091542.q29FgmgD013694@svn.freebsd.org> From: Michael Tuexen Date: Fri, 9 Mar 2012 15:42:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232726 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 15:42:48 -0000 Author: tuexen Date: Fri Mar 9 15:42:47 2012 New Revision: 232726 URL: http://svn.freebsd.org/changeset/base/232726 Log: Fix a warning reported by bz@ MFC after: 3 days. Modified: head/sys/netinet/sctp_peeloff.c Modified: head/sys/netinet/sctp_peeloff.c ============================================================================== --- head/sys/netinet/sctp_peeloff.c Fri Mar 9 15:25:27 2012 (r232725) +++ head/sys/netinet/sctp_peeloff.c Fri Mar 9 15:42:47 2012 (r232726) @@ -56,17 +56,17 @@ sctp_can_peel_off(struct socket *head, s uint32_t state; if (head == NULL) { - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PEELOFF, EBADF); + SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_PEELOFF, EBADF); return (EBADF); } if ((head->so_proto->pr_protocol != IPPROTO_SCTP) || (head->so_type != SOCK_SEQPACKET)) { - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PEELOFF, EOPNOTSUPP); + SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_PEELOFF, EOPNOTSUPP); return (EOPNOTSUPP); } inp = (struct sctp_inpcb *)head->so_pcb; if (inp == NULL) { - SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PEELOFF, EFAULT); + SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_PEELOFF, EFAULT); return (EFAULT); } stcb = sctp_findassociation_ep_asocid(inp, assoc_id, 1); From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 15:45:02 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 470161065675; Fri, 9 Mar 2012 15:45:02 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mail-n.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) by mx1.freebsd.org (Postfix) with ESMTP id A97F68FC14; Fri, 9 Mar 2012 15:45:01 +0000 (UTC) Received: from [192.168.1.103] (p508FA066.dip.t-dialin.net [80.143.160.102]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTP id E96391C0C0BCC; Fri, 9 Mar 2012 16:44:58 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=us-ascii From: Michael Tuexen In-Reply-To: <6E2D25B4-B9BC-4D51-98BF-FDE1EDDED7CB@lists.zabbadoz.net> Date: Fri, 9 Mar 2012 16:44:57 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201203091312.q29DCXLJ008313@svn.freebsd.org> <6E2D25B4-B9BC-4D51-98BF-FDE1EDDED7CB@lists.zabbadoz.net> To: Bjoern A. Zeeb X-Mailer: Apple Mail (2.1257) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232723 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 15:45:02 -0000 On Mar 9, 2012, at 3:08 PM, Bjoern A. Zeeb wrote: >=20 > On 9. Mar 2012, at 13:12 , Michael Tuexen wrote: >=20 >> Author: tuexen >> Date: Fri Mar 9 13:12:33 2012 >> New Revision: 232723 >> URL: http://svn.freebsd.org/changeset/base/232723 >>=20 >> Log: >> Fix a bug reported by Peter Holm which results in a crash: >> Verify in sctp_peeloff() that the socket is a one-to-many >> style SCTP socket. >=20 > /scratch/tmp/bz/head.svn/sys/netinet/sctp_peeloff.c: In function = 'sctp_can_peel_off': > /scratch/tmp/bz/head.svn/sys/netinet/sctp_peeloff.c:59: warning: 'inp' = is used uninitialized in this function Fixed in http://svn.freebsd.org/changeset/base/232726 Thanks for the report. Best regards Michael >=20 >=20 >>=20 >> MFC after: 3 days. >>=20 >> Modified: >> head/sys/netinet/sctp_peeloff.c >>=20 >> Modified: head/sys/netinet/sctp_peeloff.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/netinet/sctp_peeloff.c Fri Mar 9 13:06:24 2012 = (r232722) >> +++ head/sys/netinet/sctp_peeloff.c Fri Mar 9 13:12:33 2012 = (r232723) >> @@ -55,6 +55,15 @@ sctp_can_peel_off(struct socket *head, s >> struct sctp_tcb *stcb; >> uint32_t state; >>=20 >> + if (head =3D=3D NULL) { >> + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, = SCTP_FROM_SCTP_PEELOFF, EBADF); >> + return (EBADF); >> + } >> + if ((head->so_proto->pr_protocol !=3D IPPROTO_SCTP) || >> + (head->so_type !=3D SOCK_SEQPACKET)) { >> + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, = SCTP_FROM_SCTP_PEELOFF, EOPNOTSUPP); >> + return (EOPNOTSUPP); >> + } >> inp =3D (struct sctp_inpcb *)head->so_pcb; >> if (inp =3D=3D NULL) { >> SCTP_LTRACE_ERR_RET(inp, NULL, NULL, = SCTP_FROM_SCTP_PEELOFF, EFAULT); >=20 > --=20 > Bjoern A. Zeeb You have to have = visions! > It does not matter how good you are. It matters what good you do! >=20 >=20 From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 15:47:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6AD38106564A; Fri, 9 Mar 2012 15:47:09 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (mx0.hoeg.nl [IPv6:2a01:4f8:101:5343::aa]) by mx1.freebsd.org (Postfix) with ESMTP id 030668FC12; Fri, 9 Mar 2012 15:47:08 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id DDF6F2A28CD3; Fri, 9 Mar 2012 16:47:07 +0100 (CET) Date: Fri, 9 Mar 2012 16:47:07 +0100 From: Ed Schouten To: Tijl Coosemans Message-ID: <20120309154707.GB27469@hoeg.nl> References: <201203091148.q29BmuIp005151@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pvezYHf7grwyp3Bc" Content-Disposition: inline In-Reply-To: <201203091148.q29BmuIp005151@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232721 - head/sys/x86/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 15:47:09 -0000 --pvezYHf7grwyp3Bc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Tijl, * Tijl Coosemans , 20120309 12:48: > Clean up x86 endian.h: Wouldn't it be possible to simply place these macros in and only let define the assembly versions for the non-constant cases? Thanks, --=20 Ed Schouten WWW: http://80386.nl/ --pvezYHf7grwyp3Bc Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iQIcBAEBAgAGBQJPWiX7AAoJEG5e2P40kaK7OzUQAJv5D/M76NZwuztc4M1Z5fZd 7cdS9nQMeeQDLpEcEZdWj+44+8MvM3JNp8dNKZySJHdRW5SCHxCJIchFonQepVxB e9VV4xVez51oM/Wd17TOYsZP6wzH6j30QAOzZ1W2tZN5FsP9WE4i78rh+TcZVtOA 9Ayt2I8vQGOY9TAQIqOmJPcdT9Y8T7VIHcj2gnEbOvSRoi9mYYJZYB7HZDQv/69c wVycLuodexMGx6hBfSFx/By/ElX5v0q+O3f3f/+gWwpDYnGW8nqZ72Danx33U3R7 jLJpApY1cTL5SGN1A9Ug3cevCzFWy9puBeX6Oezw+MVJx/K4Yy64WSk0jXW/Ab4d riLIoGPvIO0ZT57FTcDEwnV9rQdBQvDMDxc+KLWlYFuSJ1flveE4CWCFUUwx0yIO TizGDaUxIbGyhaDWSYocGDEIB7CUQfy5nbuKQ09bEfSVn0Dabd9FE8ivS65Vqsf1 HAuYM0f4jFxqkc1F3Zhxs6ls8trFef0HZkUvX6FEQYF3ZVKIq5XiR7vhYm4l8ZTs 9/hfohTvYP5EcXAlLsiEBn0p0PeO2OfH6K5lJG+RpuvGfPOigN8AeKOMKUFJ8QXL 6LvHyBknZHvoitT49CDhe8DN7DzpDNtQGF4Bo1sqNsJh11pc0mq+5GjxoOZ5xeQn edGkbBHY4ZtjDN2luSxk =08z8 -----END PGP SIGNATURE----- --pvezYHf7grwyp3Bc-- From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 16:05:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFA6C1065670; Fri, 9 Mar 2012 16:05:11 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B10C8FC14; Fri, 9 Mar 2012 16:05:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q29G5BDP014416; Fri, 9 Mar 2012 16:05:11 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q29G5B5i014414; Fri, 9 Mar 2012 16:05:11 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201203091605.q29G5B5i014414@svn.freebsd.org> From: John Baldwin Date: Fri, 9 Mar 2012 16:05:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232727 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 16:05:11 -0000 Author: jhb Date: Fri Mar 9 16:05:11 2012 New Revision: 232727 URL: http://svn.freebsd.org/changeset/base/232727 Log: Remove PAE special-case 2GB DMA boundary and always use a 4GB boundary now that DMA tags in PAE kernels support 4GB boundaries. Reviewed by: yongari Modified: head/sys/dev/bge/if_bgereg.h Modified: head/sys/dev/bge/if_bgereg.h ============================================================================== --- head/sys/dev/bge/if_bgereg.h Fri Mar 9 15:42:47 2012 (r232726) +++ head/sys/dev/bge/if_bgereg.h Fri Mar 9 16:05:11 2012 (r232727) @@ -2691,15 +2691,11 @@ struct bge_gib { #define BGE_DMA_MAXADDR 0xFFFFFFFFFF #endif -#ifdef PAE -#define BGE_DMA_BNDRY 0x80000000 -#else #if (BUS_SPACE_MAXADDR > 0xFFFFFFFF) #define BGE_DMA_BNDRY 0x100000000 #else #define BGE_DMA_BNDRY 0 #endif -#endif /* * Ring structures. Most of these reside in host memory and we tell From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 16:11:57 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 568731065672; Fri, 9 Mar 2012 16:11:57 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay001.isp.belgacom.be (mailrelay001.isp.belgacom.be [195.238.6.51]) by mx1.freebsd.org (Postfix) with ESMTP id 8235B8FC14; Fri, 9 Mar 2012 16:11:56 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EADUrWk9bsWTD/2dsb2JhbABDtTGBCIIKAQEFViMQCxguOR4GE4gOuyGQWgSlZYJk Received: from 195.100-177-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.177.100.195]) by relay.skynet.be with ESMTP; 09 Mar 2012 17:11:48 +0100 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.5/8.14.5) with ESMTP id q29GBlk2004248; Fri, 9 Mar 2012 17:11:47 +0100 (CET) (envelope-from tijl@freebsd.org) From: Tijl Coosemans To: Ed Schouten Date: Fri, 9 Mar 2012 17:11:41 +0100 User-Agent: KMail/1.13.7 (FreeBSD/10.0-CURRENT; KDE/4.7.3; i386; ; ) References: <201203091148.q29BmuIp005151@svn.freebsd.org> <20120309154707.GB27469@hoeg.nl> In-Reply-To: <20120309154707.GB27469@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1552931.9rx4fqYbL6"; protocol="application/pgp-signature"; micalg=pgp-sha256 Content-Transfer-Encoding: 7bit Message-Id: <201203091711.45604.tijl@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232721 - head/sys/x86/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 16:11:57 -0000 --nextPart1552931.9rx4fqYbL6 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable On Friday 09 March 2012 16:47:07 Ed Schouten wrote: > * Tijl Coosemans , 20120309 12:48: >> Clean up x86 endian.h: >=20 > Wouldn't it be possible to simply place these macros in > and only let define the assembly versions for the > non-constant cases? Several things could be moved to sys, not just endian.h, but I'd like to finish merging amd64/i386 headers first. Also, for clang and gcc >=3D 4.3 it's better to use __builtin_bswapNN(x), because it can use movbe rather than mov+bswap when x is a memory operand. --nextPart1552931.9rx4fqYbL6 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iF4EABEIAAYFAk9aK8EACgkQfoCS2CCgtisQSgD/bSh41FegN7GHd4WS5+iDrzdD l3yIqGbg7l7kX9j4E18A/jZsccCrNAkYFJeqzyVz7H82/8e2tVZ+u+ePDEi2BqOc =GTf0 -----END PGP SIGNATURE----- --nextPart1552931.9rx4fqYbL6-- From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 16:17:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 95A2F1065672; Fri, 9 Mar 2012 16:17:47 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B5038FC13; Fri, 9 Mar 2012 16:17:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q29GHlq9014883; Fri, 9 Mar 2012 16:17:47 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q29GHlFb014867; Fri, 9 Mar 2012 16:17:47 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201203091617.q29GHlFb014867@svn.freebsd.org> From: Martin Matuska Date: Fri, 9 Mar 2012 16:17:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232728 - in stable/9: lib/libjail share/man/man5 sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/compat/linprocfs sys/compat/linsysfs sys/fs/devfs sys/fs/nullfs sys/fs/procfs sys/fs... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 16:17:47 -0000 Author: mm Date: Fri Mar 9 16:17:46 2012 New Revision: 232728 URL: http://svn.freebsd.org/changeset/base/232728 Log: Jail-mount MFC: r231265,r231267,r231269,r232059,r232186,r232247, r232278,r232307,r232342 MFC r231265: Introduce the "ruleset=number" option for devfs(5) mounts. Add support for updating the devfs mount (currently only changing the ruleset number is supported). Check mnt_optnew with vfs_filteropt(9). This new option sets the specified ruleset number as the active ruleset of the new devfs mount and applies all its rules at mount time. If the specified ruleset doesn't exist, a new empty ruleset is created. MFC r231267 [1]: Add support for mounting devfs inside jails. A new jail(8) option "devfs_ruleset" defines the ruleset enforcement for mounting devfs inside jails. A value of -1 disables mounting devfs in jails, a value of zero means no restrictions. Nested jails can only have mounting devfs disabled or inherit parent's enforcement as jails are not allowed to view or manipulate devfs(8) rules. Utilizes new functions introduced in r231265. MFC r231269: Allow mounting nullfs(5) inside jails. This is now possible thanks to r230129. MFC r232059 [1]: To improve control over the use of mount(8) inside a jail(8), introduce a new jail parameter node with the following parameters: allow.mount.devfs: allow mounting the devfs filesystem inside a jail allow.mount.nullfs: allow mounting the nullfs filesystem inside a jail Both parameters are disabled by default (equals the behavior before devfs and nullfs in jails). Administrators have to explicitly allow mounting devfs and nullfs for each jail. The value "-1" of the devfs_ruleset parameter is removed in favor of the new allow setting. MFC r232186: Analogous to r232059, add a parameter for the ZFS file system: allow.mount.zfs: allow mounting the zfs filesystem inside a jail This way the permssions for mounting all current VFCF_JAIL filesystems inside a jail are controlled wia allow.mount.* jail parameters. Update sysctl descriptions. Update jail(8) and zfs(8) manpages. MFC r232247: mdoc(7) stype - start new sentences on new line MFC r232278 [1]: Add procfs to jail-mountable filesystems. MFC r232291: Bump .Dd to reflect latest update MFC r232307: Add "export" to devfs_opts[] and return EOPNOTSUPP if called with it. Fixes mountd warnings. MFC r232342 (jamie) [2]: Handle the case where a boolean parameter is also a node. PR: bin/165515 [2] Reviewed by: jamie [1] Modified: stable/9/lib/libjail/jail.c stable/9/share/man/man5/devfs.5 stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c stable/9/sys/compat/linprocfs/linprocfs.c stable/9/sys/compat/linsysfs/linsysfs.c stable/9/sys/fs/devfs/devfs.h stable/9/sys/fs/devfs/devfs_rule.c stable/9/sys/fs/devfs/devfs_vfsops.c stable/9/sys/fs/nullfs/null_vfsops.c stable/9/sys/fs/procfs/procfs.c stable/9/sys/fs/pseudofs/pseudofs.h stable/9/sys/kern/kern_jail.c stable/9/sys/sys/jail.h stable/9/sys/sys/param.h stable/9/usr.sbin/jail/jail.8 Directory Properties: stable/9/lib/libjail/ (props changed) stable/9/share/man/man5/ (props changed) stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/usr.sbin/jail/ (props changed) Modified: stable/9/lib/libjail/jail.c ============================================================================== --- stable/9/lib/libjail/jail.c Fri Mar 9 16:05:11 2012 (r232727) +++ stable/9/lib/libjail/jail.c Fri Mar 9 16:17:46 2012 (r232728) @@ -885,36 +885,20 @@ jailparam_type(struct jailparam *jp) * the "no" counterpart to a boolean. */ nname = nononame(jp->jp_name); - if (nname != NULL) { - snprintf(desc.s, sizeof(desc.s), SJPARAM ".%s", nname); - free(nname); - miblen = sizeof(mib) - 2 * sizeof(int); - if (sysctl(mib, 2, mib + 2, &miblen, desc.s, - strlen(desc.s)) >= 0) { - mib[1] = 4; - desclen = sizeof(desc); - if (sysctl(mib, (miblen / sizeof(int)) + 2, - &desc, &desclen, NULL, 0) < 0) { - snprintf(jail_errmsg, - JAIL_ERRMSGLEN, - "sysctl(0.4.%s): %s", desc.s, - strerror(errno)); - return (-1); - } - if ((desc.i & CTLTYPE) == CTLTYPE_INT && - desc.s[0] == 'B') { - jp->jp_ctltype = desc.i; - jp->jp_flags |= JP_NOBOOL; - jp->jp_valuelen = sizeof(int); - return (0); - } - } + if (nname == NULL) { + unknown_parameter: + snprintf(jail_errmsg, JAIL_ERRMSGLEN, + "unknown parameter: %s", jp->jp_name); + errno = ENOENT; + return (-1); } - unknown_parameter: - snprintf(jail_errmsg, JAIL_ERRMSGLEN, - "unknown parameter: %s", jp->jp_name); - errno = ENOENT; - return (-1); + snprintf(desc.s, sizeof(desc.s), SJPARAM ".%s", nname); + free(nname); + miblen = sizeof(mib) - 2 * sizeof(int); + if (sysctl(mib, 2, mib + 2, &miblen, desc.s, + strlen(desc.s)) < 0) + goto unknown_parameter; + jp->jp_flags |= JP_NOBOOL; } mib_desc: mib[1] = 4; @@ -925,6 +909,16 @@ jailparam_type(struct jailparam *jp) "sysctl(0.4.%s): %s", jp->jp_name, strerror(errno)); return (-1); } + jp->jp_ctltype = desc.i; + /* If this came from removing a "no", it better be a boolean. */ + if (jp->jp_flags & JP_NOBOOL) { + if ((desc.i & CTLTYPE) == CTLTYPE_INT && desc.s[0] == 'B') { + jp->jp_valuelen = sizeof(int); + return (0); + } + else if ((desc.i & CTLTYPE) != CTLTYPE_NODE) + goto unknown_parameter; + } /* See if this is an array type. */ p = strchr(desc.s, '\0'); isarray = 0; @@ -935,7 +929,6 @@ jailparam_type(struct jailparam *jp) p[-2] = 0; } /* Look for types we understand. */ - jp->jp_ctltype = desc.i; switch (desc.i & CTLTYPE) { case CTLTYPE_INT: if (desc.s[0] == 'B') Modified: stable/9/share/man/man5/devfs.5 ============================================================================== --- stable/9/share/man/man5/devfs.5 Fri Mar 9 16:05:11 2012 (r232727) +++ stable/9/share/man/man5/devfs.5 Fri Mar 9 16:17:46 2012 (r232728) @@ -38,7 +38,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 18, 2010 +.Dd February 9, 2012 .Dt DEVFS 5 .Os .Sh NAME @@ -90,6 +90,30 @@ and .Pa 2 . .Xr fdescfs 5 creates files for all open descriptors. +.Pp +The options are as follows: +.Bl -tag -width indent +.It Fl o Ar options +Use the specified mount +.Ar options , +as described in +.Xr mount 8 . +The following devfs file system-specific options are available: +.Bl -tag -width indent +.It Cm ruleset Ns No = Ns Ar ruleset +Set ruleset number +.Ar ruleset +as the current ruleset for the mount-point and apply all its rules. +If the ruleset number +.Ar ruleset +does not exist, an empty ruleset with the number +.Ar ruleset +is created. +See +.Xr devfs 8 +for more information on working with devfs rulesets. +.El +.El .Sh FILES .Bl -tag -width /dev/XXXX -compact .It Pa /dev Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Fri Mar 9 16:05:11 2012 (r232727) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Fri Mar 9 16:17:46 2012 (r232728) @@ -60,6 +60,7 @@ #include #include #include +#include #include "zfs_comutil.h" struct mtx zfs_debug_mtx; @@ -1533,6 +1534,9 @@ zfs_mount(vfs_t *vfsp) int error = 0; int canwrite; + if (!prison_allow(td->td_ucred, PR_ALLOW_MOUNT_ZFS)) + return (EPERM); + if (vfs_getopt(vfsp->mnt_optnew, "from", (void **)&osname, NULL)) return (EINVAL); Modified: stable/9/sys/compat/linprocfs/linprocfs.c ============================================================================== --- stable/9/sys/compat/linprocfs/linprocfs.c Fri Mar 9 16:05:11 2012 (r232727) +++ stable/9/sys/compat/linprocfs/linprocfs.c Fri Mar 9 16:17:46 2012 (r232728) @@ -1460,7 +1460,7 @@ linprocfs_uninit(PFS_INIT_ARGS) return (0); } -PSEUDOFS(linprocfs, 1); +PSEUDOFS(linprocfs, 1, 0); MODULE_DEPEND(linprocfs, linux, 1, 1, 1); MODULE_DEPEND(linprocfs, procfs, 1, 1, 1); MODULE_DEPEND(linprocfs, sysvmsg, 1, 1, 1); Modified: stable/9/sys/compat/linsysfs/linsysfs.c ============================================================================== --- stable/9/sys/compat/linsysfs/linsysfs.c Fri Mar 9 16:05:11 2012 (r232727) +++ stable/9/sys/compat/linsysfs/linsysfs.c Fri Mar 9 16:17:46 2012 (r232728) @@ -280,5 +280,5 @@ linsysfs_uninit(PFS_INIT_ARGS) return (0); } -PSEUDOFS(linsysfs, 1); +PSEUDOFS(linsysfs, 1, 0); MODULE_DEPEND(linsysfs, linux, 1, 1, 1); Modified: stable/9/sys/fs/devfs/devfs.h ============================================================================== --- stable/9/sys/fs/devfs/devfs.h Fri Mar 9 16:05:11 2012 (r232727) +++ stable/9/sys/fs/devfs/devfs.h Fri Mar 9 16:17:46 2012 (r232728) @@ -182,6 +182,8 @@ void devfs_rules_apply(struct devfs_moun void devfs_rules_cleanup(struct devfs_mount *); int devfs_rules_ioctl(struct devfs_mount *, u_long, caddr_t, struct thread *); +void devfs_ruleset_set(devfs_rsnum rsnum, struct devfs_mount *dm); +void devfs_ruleset_apply(struct devfs_mount *dm); int devfs_allocv(struct devfs_dirent *, struct mount *, int, struct vnode **); char *devfs_fqpn(char *, struct devfs_mount *, struct devfs_dirent *, Modified: stable/9/sys/fs/devfs/devfs_rule.c ============================================================================== --- stable/9/sys/fs/devfs/devfs_rule.c Fri Mar 9 16:05:11 2012 (r232727) +++ stable/9/sys/fs/devfs/devfs_rule.c Fri Mar 9 16:17:46 2012 (r232728) @@ -771,3 +771,38 @@ devfs_rules_cleanup(struct devfs_mount * devfs_ruleset_reap(ds); } } + +/* + * Make rsnum the active ruleset for dm (locked) + */ +void +devfs_ruleset_set(devfs_rsnum rsnum, struct devfs_mount *dm) +{ + + sx_assert(&dm->dm_lock, SX_XLOCKED); + + sx_xlock(&sx_rules); + devfs_ruleset_use(rsnum, dm); + sx_xunlock(&sx_rules); +} + +/* + * Apply the current active ruleset on a mount + */ +void +devfs_ruleset_apply(struct devfs_mount *dm) +{ + struct devfs_ruleset *ds; + + sx_assert(&dm->dm_lock, SX_XLOCKED); + + sx_xlock(&sx_rules); + if (dm->dm_ruleset == 0) { + sx_xunlock(&sx_rules); + return; + } + ds = devfs_ruleset_bynum(dm->dm_ruleset); + if (ds != NULL) + devfs_ruleset_applydm(ds, dm); + sx_xunlock(&sx_rules); +} Modified: stable/9/sys/fs/devfs/devfs_vfsops.c ============================================================================== --- stable/9/sys/fs/devfs/devfs_vfsops.c Fri Mar 9 16:05:11 2012 (r232727) +++ stable/9/sys/fs/devfs/devfs_vfsops.c Fri Mar 9 16:17:46 2012 (r232728) @@ -44,6 +44,7 @@ #include #include #include +#include #include @@ -56,6 +57,10 @@ static vfs_unmount_t devfs_unmount; static vfs_root_t devfs_root; static vfs_statfs_t devfs_statfs; +static const char *devfs_opts[] = { + "from", "export", "ruleset", NULL +}; + /* * Mount the filesystem */ @@ -65,15 +70,60 @@ devfs_mount(struct mount *mp) int error; struct devfs_mount *fmp; struct vnode *rvp; + struct thread *td = curthread; + int injail, rsnum; if (devfs_unr == NULL) devfs_unr = new_unrhdr(0, INT_MAX, NULL); error = 0; - if (mp->mnt_flag & (MNT_UPDATE | MNT_ROOTFS)) + if (mp->mnt_flag & MNT_ROOTFS) return (EOPNOTSUPP); + if (!prison_allow(td->td_ucred, PR_ALLOW_MOUNT_DEVFS)) + return (EPERM); + + rsnum = 0; + injail = jailed(td->td_ucred); + + if (mp->mnt_optnew != NULL) { + if (vfs_filteropt(mp->mnt_optnew, devfs_opts)) + return (EINVAL); + + if (vfs_flagopt(mp->mnt_optnew, "export", NULL, 0)) + return (EOPNOTSUPP); + + if (vfs_getopt(mp->mnt_optnew, "ruleset", NULL, NULL) == 0 && + (vfs_scanopt(mp->mnt_optnew, "ruleset", "%d", + &rsnum) != 1 || rsnum < 0 || rsnum > 65535)) { + vfs_mount_error(mp, "%s", + "invalid ruleset specification"); + return (EINVAL); + } + + if (injail && rsnum != 0 && + rsnum != td->td_ucred->cr_prison->pr_devfs_rsnum) + return (EPERM); + } + + /* jails enforce their ruleset */ + if (injail) + rsnum = td->td_ucred->cr_prison->pr_devfs_rsnum; + + if (mp->mnt_flag & MNT_UPDATE) { + if (rsnum != 0) { + fmp = mp->mnt_data; + if (fmp != NULL) { + sx_xlock(&fmp->dm_lock); + devfs_ruleset_set((devfs_rsnum)rsnum, fmp); + devfs_ruleset_apply(fmp); + sx_xunlock(&fmp->dm_lock); + } + } + return (0); + } + fmp = malloc(sizeof *fmp, M_DEVFS, M_WAITOK | M_ZERO); fmp->dm_idx = alloc_unr(devfs_unr); sx_init(&fmp->dm_lock, "devfsmount"); @@ -101,6 +151,12 @@ devfs_mount(struct mount *mp) return (error); } + if (rsnum != 0) { + sx_xlock(&fmp->dm_lock); + devfs_ruleset_set((devfs_rsnum)rsnum, fmp); + sx_xunlock(&fmp->dm_lock); + } + VOP_UNLOCK(rvp, 0); vfs_mountedfrom(mp, "devfs"); @@ -186,4 +242,4 @@ static struct vfsops devfs_vfsops = { .vfs_unmount = devfs_unmount, }; -VFS_SET(devfs_vfsops, devfs, VFCF_SYNTHETIC); +VFS_SET(devfs_vfsops, devfs, VFCF_SYNTHETIC | VFCF_JAIL); Modified: stable/9/sys/fs/nullfs/null_vfsops.c ============================================================================== --- stable/9/sys/fs/nullfs/null_vfsops.c Fri Mar 9 16:05:11 2012 (r232727) +++ stable/9/sys/fs/nullfs/null_vfsops.c Fri Mar 9 16:17:46 2012 (r232728) @@ -50,6 +50,7 @@ #include #include #include +#include #include @@ -75,12 +76,16 @@ nullfs_mount(struct mount *mp) struct vnode *lowerrootvp, *vp; struct vnode *nullm_rootvp; struct null_mount *xmp; + struct thread *td = curthread; char *target; int isvnunlocked = 0, len; struct nameidata nd, *ndp = &nd; NULLFSDEBUG("nullfs_mount(mp = %p)\n", (void *)mp); + if (!prison_allow(td->td_ucred, PR_ALLOW_MOUNT_NULLFS)) + return (EPERM); + if (mp->mnt_flag & MNT_ROOTFS) return (EOPNOTSUPP); /* @@ -364,4 +369,4 @@ static struct vfsops null_vfsops = { .vfs_vget = nullfs_vget, }; -VFS_SET(null_vfsops, nullfs, VFCF_LOOPBACK); +VFS_SET(null_vfsops, nullfs, VFCF_LOOPBACK | VFCF_JAIL); Modified: stable/9/sys/fs/procfs/procfs.c ============================================================================== --- stable/9/sys/fs/procfs/procfs.c Fri Mar 9 16:05:11 2012 (r232727) +++ stable/9/sys/fs/procfs/procfs.c Fri Mar 9 16:17:46 2012 (r232728) @@ -209,4 +209,4 @@ procfs_uninit(PFS_INIT_ARGS) return (0); } -PSEUDOFS(procfs, 1); +PSEUDOFS(procfs, 1, PR_ALLOW_MOUNT_PROCFS); Modified: stable/9/sys/fs/pseudofs/pseudofs.h ============================================================================== --- stable/9/sys/fs/pseudofs/pseudofs.h Fri Mar 9 16:05:11 2012 (r232727) +++ stable/9/sys/fs/pseudofs/pseudofs.h Fri Mar 9 16:17:46 2012 (r232728) @@ -31,6 +31,8 @@ #ifndef _PSEUDOFS_H_INCLUDED #define _PSEUDOFS_H_INCLUDED +#include + /* * Opaque structures */ @@ -271,7 +273,7 @@ int pfs_destroy (struct pfs_node *pn); /* * Now for some initialization magic... */ -#define PSEUDOFS(name, version) \ +#define PSEUDOFS(name, version, jflag) \ \ static struct pfs_info name##_info = { \ #name, \ @@ -281,6 +283,8 @@ static struct pfs_info name##_info = { \ static int \ _##name##_mount(struct mount *mp) { \ + if (jflag && !prison_allow(curthread->td_ucred, jflag)) \ + return (EPERM); \ return pfs_mount(&name##_info, mp); \ } \ \ @@ -303,7 +307,7 @@ static struct vfsops name##_vfsops = { .vfs_uninit = _##name##_uninit, \ .vfs_unmount = pfs_unmount, \ }; \ -VFS_SET(name##_vfsops, name, VFCF_SYNTHETIC); \ +VFS_SET(name##_vfsops, name, VFCF_SYNTHETIC | (jflag ? VFCF_JAIL : 0)); \ MODULE_VERSION(name, version); \ MODULE_DEPEND(name, pseudofs, 1, 1, 1); Modified: stable/9/sys/kern/kern_jail.c ============================================================================== --- stable/9/sys/kern/kern_jail.c Fri Mar 9 16:05:11 2012 (r232727) +++ stable/9/sys/kern/kern_jail.c Fri Mar 9 16:17:46 2012 (r232728) @@ -103,6 +103,7 @@ struct prison prison0 = { .pr_uref = 1, .pr_path = "/", .pr_securelevel = -1, + .pr_devfs_rsnum = 0, .pr_childmax = JAIL_MAX, .pr_hostuuid = DEFAULT_HOSTUUID, .pr_children = LIST_HEAD_INITIALIZER(prison0.pr_children), @@ -200,6 +201,10 @@ static char *pr_allow_names[] = { "allow.mount", "allow.quotas", "allow.socket_af", + "allow.mount.devfs", + "allow.mount.nullfs", + "allow.mount.zfs", + "allow.mount.procfs", }; const size_t pr_allow_names_size = sizeof(pr_allow_names); @@ -211,13 +216,19 @@ static char *pr_allow_nonames[] = { "allow.nomount", "allow.noquotas", "allow.nosocket_af", + "allow.mount.nodevfs", + "allow.mount.nonullfs", + "allow.mount.nozfs", + "allow.mount.noprocfs", }; const size_t pr_allow_nonames_size = sizeof(pr_allow_nonames); #define JAIL_DEFAULT_ALLOW PR_ALLOW_SET_HOSTNAME #define JAIL_DEFAULT_ENFORCE_STATFS 2 +#define JAIL_DEFAULT_DEVFS_RSNUM 0 static unsigned jail_default_allow = JAIL_DEFAULT_ALLOW; static int jail_default_enforce_statfs = JAIL_DEFAULT_ENFORCE_STATFS; +static int jail_default_devfs_rsnum = JAIL_DEFAULT_DEVFS_RSNUM; #if defined(INET) || defined(INET6) static unsigned jail_max_af_ips = 255; #endif @@ -529,9 +540,9 @@ kern_jail_set(struct thread *td, struct unsigned long hid; size_t namelen, onamelen; int created, cuflags, descend, enforce, error, errmsg_len, errmsg_pos; - int gotchildmax, gotenforce, gothid, gotslevel; + int gotchildmax, gotenforce, gothid, gotrsnum, gotslevel; int fi, jid, jsys, len, level; - int childmax, slevel, vfslocked; + int childmax, rsnum, slevel, vfslocked; int fullpath_disabled; #if defined(INET) || defined(INET6) int ii, ij; @@ -612,6 +623,14 @@ kern_jail_set(struct thread *td, struct } else gotenforce = 1; + error = vfs_copyopt(opts, "devfs_ruleset", &rsnum, sizeof(rsnum)); + if (error == ENOENT) + gotrsnum = 0; + else if (error != 0) + goto done_free; + else + gotrsnum = 1; + pr_flags = ch_flags = 0; for (fi = 0; fi < sizeof(pr_flag_names) / sizeof(pr_flag_names[0]); fi++) { @@ -1268,6 +1287,7 @@ kern_jail_set(struct thread *td, struct pr->pr_securelevel = ppr->pr_securelevel; pr->pr_allow = JAIL_DEFAULT_ALLOW & ppr->pr_allow; pr->pr_enforce_statfs = JAIL_DEFAULT_ENFORCE_STATFS; + pr->pr_devfs_rsnum = ppr->pr_devfs_rsnum; LIST_INIT(&pr->pr_children); mtx_init(&pr->pr_mtx, "jail mutex", NULL, MTX_DEF | MTX_DUPOK); @@ -1346,6 +1366,25 @@ kern_jail_set(struct thread *td, struct goto done_deref_locked; } } + if (gotrsnum) { + /* + * devfs_rsnum is a uint16_t + */ + if (rsnum < 0 || rsnum > 65535) { + error = EINVAL; + goto done_deref_locked; + } + /* + * Nested jails always inherit parent's devfs ruleset + */ + if (jailed(td->td_ucred)) { + if (rsnum > 0 && rsnum != ppr->pr_devfs_rsnum) { + error = EPERM; + goto done_deref_locked; + } else + rsnum = ppr->pr_devfs_rsnum; + } + } #ifdef INET if (ip4s > 0) { if (ppr->pr_flags & PR_IP4) { @@ -1586,6 +1625,12 @@ kern_jail_set(struct thread *td, struct if (tpr->pr_enforce_statfs < enforce) tpr->pr_enforce_statfs = enforce; } + if (gotrsnum) { + pr->pr_devfs_rsnum = rsnum; + /* Pass this restriction on to the children. */ + FOREACH_PRISON_DESCENDANT_LOCKED(pr, tpr, descend) + tpr->pr_devfs_rsnum = rsnum; + } if (name != NULL) { if (ppr == &prison0) strlcpy(pr->pr_name, name, sizeof(pr->pr_name)); @@ -2020,6 +2065,10 @@ kern_jail_get(struct thread *td, struct sizeof(pr->pr_enforce_statfs)); if (error != 0 && error != ENOENT) goto done_deref; + error = vfs_setopt(opts, "devfs_ruleset", &pr->pr_devfs_rsnum, + sizeof(pr->pr_devfs_rsnum)); + if (error != 0 && error != ENOENT) + goto done_deref; for (fi = 0; fi < sizeof(pr_flag_names) / sizeof(pr_flag_names[0]); fi++) { if (pr_flag_names[fi] == NULL) @@ -4151,6 +4200,22 @@ SYSCTL_PROC(_security_jail, OID_AUTO, mo CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, PR_ALLOW_MOUNT, sysctl_jail_default_allow, "I", "Processes in jail can mount/unmount jail-friendly file systems"); +SYSCTL_PROC(_security_jail, OID_AUTO, mount_devfs_allowed, + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, + NULL, PR_ALLOW_MOUNT_DEVFS, sysctl_jail_default_allow, "I", + "Processes in jail can mount the devfs file system"); +SYSCTL_PROC(_security_jail, OID_AUTO, mount_nullfs_allowed, + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, + NULL, PR_ALLOW_MOUNT_NULLFS, sysctl_jail_default_allow, "I", + "Processes in jail can mount the nullfs file system"); +SYSCTL_PROC(_security_jail, OID_AUTO, mount_procfs_allowed, + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, + NULL, PR_ALLOW_MOUNT_PROCFS, sysctl_jail_default_allow, "I", + "Processes in jail can mount the procfs file system"); +SYSCTL_PROC(_security_jail, OID_AUTO, mount_zfs_allowed, + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, + NULL, PR_ALLOW_MOUNT_ZFS, sysctl_jail_default_allow, "I", + "Processes in jail can mount the zfs file system"); static int sysctl_jail_default_level(SYSCTL_HANDLER_ARGS) @@ -4173,6 +4238,12 @@ SYSCTL_PROC(_security_jail, OID_AUTO, en sysctl_jail_default_level, "I", "Processes in jail cannot see all mounted file systems"); +SYSCTL_PROC(_security_jail, OID_AUTO, devfs_ruleset, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, + &jail_default_devfs_rsnum, offsetof(struct prison, pr_devfs_rsnum), + sysctl_jail_default_level, "I", + "Ruleset for the devfs filesystem in jail"); + /* * Nodes to describe jail parameters. Maximum length of string parameters * is returned in the string itself, and the other parameters exist merely @@ -4221,6 +4292,8 @@ SYSCTL_JAIL_PARAM(, securelevel, CTLTYPE "I", "Jail secure level"); SYSCTL_JAIL_PARAM(, enforce_statfs, CTLTYPE_INT | CTLFLAG_RW, "I", "Jail cannot see all mounted file systems"); +SYSCTL_JAIL_PARAM(, devfs_ruleset, CTLTYPE_INT | CTLFLAG_RW, + "I", "Ruleset for in-jail devfs mounts"); SYSCTL_JAIL_PARAM(, persist, CTLTYPE_INT | CTLFLAG_RW, "B", "Jail persistence"); #ifdef VIMAGE @@ -4277,13 +4350,23 @@ SYSCTL_JAIL_PARAM(_allow, raw_sockets, C "B", "Jail may create raw sockets"); SYSCTL_JAIL_PARAM(_allow, chflags, CTLTYPE_INT | CTLFLAG_RW, "B", "Jail may alter system file flags"); -SYSCTL_JAIL_PARAM(_allow, mount, CTLTYPE_INT | CTLFLAG_RW, - "B", "Jail may mount/unmount jail-friendly file systems"); SYSCTL_JAIL_PARAM(_allow, quotas, CTLTYPE_INT | CTLFLAG_RW, "B", "Jail may set file quotas"); SYSCTL_JAIL_PARAM(_allow, socket_af, CTLTYPE_INT | CTLFLAG_RW, "B", "Jail may create sockets other than just UNIX/IPv4/IPv6/route"); +SYSCTL_JAIL_PARAM_SUBNODE(allow, mount, "Jail mount/unmount permission flags"); +SYSCTL_JAIL_PARAM(_allow_mount, , CTLTYPE_INT | CTLFLAG_RW, + "B", "Jail may mount/unmount jail-friendly file systems in general"); +SYSCTL_JAIL_PARAM(_allow_mount, devfs, CTLTYPE_INT | CTLFLAG_RW, + "B", "Jail may mount the devfs file system"); +SYSCTL_JAIL_PARAM(_allow_mount, nullfs, CTLTYPE_INT | CTLFLAG_RW, + "B", "Jail may mount the nullfs file system"); +SYSCTL_JAIL_PARAM(_allow_mount, procfs, CTLTYPE_INT | CTLFLAG_RW, + "B", "Jail may mount the procfs file system"); +SYSCTL_JAIL_PARAM(_allow_mount, zfs, CTLTYPE_INT | CTLFLAG_RW, + "B", "Jail may mount the zfs file system"); + void prison_racct_foreach(void (*callback)(struct racct *racct, void *arg2, void *arg3), void *arg2, void *arg3) @@ -4413,6 +4496,7 @@ db_show_prison(struct prison *pr) #endif db_printf(" root = %p\n", pr->pr_root); db_printf(" securelevel = %d\n", pr->pr_securelevel); + db_printf(" devfs_rsnum = %d\n", pr->pr_devfs_rsnum); db_printf(" children.max = %d\n", pr->pr_childmax); db_printf(" children.cur = %d\n", pr->pr_childcount); db_printf(" child = %p\n", LIST_FIRST(&pr->pr_children)); Modified: stable/9/sys/sys/jail.h ============================================================================== --- stable/9/sys/sys/jail.h Fri Mar 9 16:05:11 2012 (r232727) +++ stable/9/sys/sys/jail.h Fri Mar 9 16:17:46 2012 (r232728) @@ -176,7 +176,8 @@ struct prison { unsigned pr_allow; /* (p) PR_ALLOW_* flags */ int pr_securelevel; /* (p) securelevel */ int pr_enforce_statfs; /* (p) statfs permission */ - int pr_spare[5]; + int pr_devfs_rsnum; /* (p) devfs ruleset */ + int pr_spare[4]; unsigned long pr_hostid; /* (p) jail hostid */ char pr_name[MAXHOSTNAMELEN]; /* (p) admin jail name */ char pr_path[MAXPATHLEN]; /* (c) chroot path */ @@ -222,7 +223,11 @@ struct prison_racct { #define PR_ALLOW_MOUNT 0x0010 #define PR_ALLOW_QUOTAS 0x0020 #define PR_ALLOW_SOCKET_AF 0x0040 -#define PR_ALLOW_ALL 0x007f +#define PR_ALLOW_MOUNT_DEVFS 0x0080 +#define PR_ALLOW_MOUNT_NULLFS 0x0100 +#define PR_ALLOW_MOUNT_ZFS 0x0200 +#define PR_ALLOW_MOUNT_PROCFS 0x0400 +#define PR_ALLOW_ALL 0x07ff /* * OSD methods @@ -337,6 +342,8 @@ SYSCTL_DECL(_security_jail_param); sysctl_jail_param, fmt, descr) #define SYSCTL_JAIL_PARAM_NODE(module, descr) \ SYSCTL_NODE(_security_jail_param, OID_AUTO, module, 0, 0, descr) +#define SYSCTL_JAIL_PARAM_SUBNODE(parent, module, descr) \ + SYSCTL_NODE(_security_jail_param_##parent, OID_AUTO, module, 0, 0, descr) #define SYSCTL_JAIL_PARAM_SYS_NODE(module, access, descr) \ SYSCTL_JAIL_PARAM_NODE(module, descr); \ SYSCTL_JAIL_PARAM(_##module, , CTLTYPE_INT | (access), "E,jailsys", \ Modified: stable/9/sys/sys/param.h ============================================================================== --- stable/9/sys/sys/param.h Fri Mar 9 16:05:11 2012 (r232727) +++ stable/9/sys/sys/param.h Fri Mar 9 16:17:46 2012 (r232728) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 900503 /* Master, propagated to newvers */ +#define __FreeBSD_version 900504 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, Modified: stable/9/usr.sbin/jail/jail.8 ============================================================================== --- stable/9/usr.sbin/jail/jail.8 Fri Mar 9 16:05:11 2012 (r232727) +++ stable/9/usr.sbin/jail/jail.8 Fri Mar 9 16:17:46 2012 (r232728) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 23, 2011 +.Dd February 29, 2012 .Dt JAIL 8 .Os .Sh NAME @@ -301,6 +301,19 @@ A jail never has a lower securelevel tha setting this parameter it may have a higher one. If the system securelevel is changed, any jail securelevels will be at least as secure. +.It Va devfs_ruleset +The number of the devfs ruleset that is enforced for mounting devfs in +this jail. +A value of zero (default) means no ruleset is enforced. +Descendant jails inherit the parent jail's devfs ruleset enforcement. +Mounting devfs inside a jail is possible only if the +.Va allow.mount +and +.Va allow.mount.devfs +permissions are effective and +.Va enforce_statfs +is set to a value lower than 2. +Devfs rules and rulesets cannot be viewed or modified from inside a jail. .It Va children.max The number of child jails allowed to be created by this jail (or by other jails under this jail). @@ -396,6 +409,45 @@ within a jail. This permission is effective only if .Va enforce_statfs is set to a value lower than 2. +.It Va allow.mount.devfs +privileged users inside the jail will be able to mount and unmount the +devfs file system. +This permission is effective only together with +.Va allow.mount +and if +.Va enforce_statfs +is set to a value lower than 2. +Please consider restricting the devfs ruleset with the +.Va devfs_ruleset +option. +.It Va allow.mount.nullfs +privileged users inside the jail will be able to mount and unmount the +nullfs file system. +This permission is effective only together with +.Va allow.mount +and if +.Va enforce_statfs +is set to a value lower than 2. +.It Va allow.mount.procfs +privileged users inside the jail will be able to mount and unmount the +procfs file system. +This permission is effective only together with +.Va allow.mount +and if +.Va enforce_statfs +is set to a value lower than 2. +.It Va allow.mount.zfs +privileged users inside the jail will be able to mount and unmount the +ZFS file system. +This permission is effective only together with +.Va allow.mount +and if +.Va enforce_statfs +is set to a value lower than 2. +See +.Xr zfs 8 +for information on how to configure the ZFS filesystem to operate from +within a jail. .It Va allow.quotas The prison root may administer quotas on the jail's filesystem(s). This includes filesystems that the jail may share with other jails or From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 16:21:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2973A1065673; Fri, 9 Mar 2012 16:21:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 148498FC19; Fri, 9 Mar 2012 16:21:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q29GLePZ015056; Fri, 9 Mar 2012 16:21:40 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q29GLecE015054; Fri, 9 Mar 2012 16:21:40 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203091621.q29GLecE015054@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 9 Mar 2012 16:21:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232729 - head/libexec/rtld-elf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 16:21:41 -0000 Author: kib Date: Fri Mar 9 16:21:40 2012 New Revision: 232729 URL: http://svn.freebsd.org/changeset/base/232729 Log: Remove the use of toupper() from rtld_printf.c. Use of the libc function relies on working TLS, which is particulary not true for LD_DEBUG uses. MFC after: 1 week Modified: head/libexec/rtld-elf/rtld_printf.c Modified: head/libexec/rtld-elf/rtld_printf.c ============================================================================== --- head/libexec/rtld-elf/rtld_printf.c Fri Mar 9 16:17:46 2012 (r232728) +++ head/libexec/rtld-elf/rtld_printf.c Fri Mar 9 16:21:40 2012 (r232729) @@ -36,7 +36,6 @@ */ #include -#include #include #include #include @@ -90,8 +89,10 @@ snprintf_func(int ch, struct snprintf_ar } } -static char const hex2ascii_data[] = "0123456789abcdefghijklmnopqrstuvwxyz"; -#define hex2ascii(hex) (hex2ascii_data[hex]) +static char const hex2ascii_lower[] = "0123456789abcdefghijklmnopqrstuvwxyz"; +static char const hex2ascii_upper[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; +#define hex2ascii(hex) (hex2ascii_lower[hex]) +#define hex2ascii_upper(hex) (hex2ascii_upper[hex]) static __inline int imax(int a, int b) @@ -108,8 +109,9 @@ ksprintn(char *nbuf, uintmax_t num, int p = nbuf; *p = '\0'; do { - c = hex2ascii(num % base); - *++p = upper ? toupper(c) : c; + c = upper ? hex2ascii_upper(num % base) : + hex2ascii(num % base); + *++p = c; } while (num /= base); if (lenp) *lenp = p - nbuf; From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 16:39:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3EFB106566B; Fri, 9 Mar 2012 16:39:34 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F62F8FC0C; Fri, 9 Mar 2012 16:39:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q29GdYms015759; Fri, 9 Mar 2012 16:39:34 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q29GdYIl015757; Fri, 9 Mar 2012 16:39:34 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201203091639.q29GdYIl015757@svn.freebsd.org> From: Tijl Coosemans Date: Fri, 9 Mar 2012 16:39:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232730 - head/sys/x86/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 16:39:34 -0000 Author: tijl Date: Fri Mar 9 16:39:34 2012 New Revision: 232730 URL: http://svn.freebsd.org/changeset/base/232730 Log: Cast the expression in __bswap16(x) to __uint16_t because it is promoted to int. Reviewed by: dim Modified: head/sys/x86/include/endian.h Modified: head/sys/x86/include/endian.h ============================================================================== --- head/sys/x86/include/endian.h Fri Mar 9 16:21:40 2012 (r232729) +++ head/sys/x86/include/endian.h Fri Mar 9 16:39:34 2012 (r232730) @@ -70,8 +70,8 @@ (((__uint64_t)__bswap32(x) << 32) | __bswap32((x) >> 32)) #ifdef __GNUCLIKE_BUILTIN_CONSTANT_P -#define __bswap16(x) \ - (__builtin_constant_p(x) ? \ +#define __bswap16(x) \ + (__uint16_t)(__builtin_constant_p(x) ? \ __bswap16_gen((__uint16_t)(x)) : __bswap16_var(x)) #define __bswap32(x) \ (__builtin_constant_p(x) ? \ From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 17:18:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 548521065673 for ; Fri, 9 Mar 2012 17:18:21 +0000 (UTC) (envelope-from pho@holm.cc) Received: from relay00.pair.com (relay00.pair.com [209.68.5.9]) by mx1.freebsd.org (Postfix) with SMTP id AF8E48FC14 for ; Fri, 9 Mar 2012 17:18:20 +0000 (UTC) Received: (qmail 25424 invoked from network); 9 Mar 2012 17:18:13 -0000 Received: from 87.58.144.241 (HELO x2.osted.lan) (87.58.144.241) by relay00.pair.com with SMTP; 9 Mar 2012 17:18:13 -0000 X-pair-Authenticated: 87.58.144.241 Received: from x2.osted.lan (localhost [127.0.0.1]) by x2.osted.lan (8.14.4/8.14.4) with ESMTP id q29HICwh052814; Fri, 9 Mar 2012 18:18:12 +0100 (CET) (envelope-from pho@x2.osted.lan) Received: (from pho@localhost) by x2.osted.lan (8.14.4/8.14.4/Submit) id q29HICgU052813; Fri, 9 Mar 2012 18:18:12 +0100 (CET) (envelope-from pho) Date: Fri, 9 Mar 2012 18:18:12 +0100 From: Peter Holm To: Bruce Evans Message-ID: <20120309171812.GA52767@x2.osted.lan> References: <201203081249.q28Cn9ed045648@svn.freebsd.org> <20120309145110.D1365@besplex.bde.org> <20120309064036.GA40029@x2.osted.lan> <20120310012432.Y3108@besplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120310012432.Y3108@besplex.bde.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232692 - head/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 17:18:21 -0000 On Sat, Mar 10, 2012 at 01:48:20AM +1100, Bruce Evans wrote: > On Fri, 9 Mar 2012, Peter Holm wrote: > > >On Fri, Mar 09, 2012 at 03:51:30PM +1100, Bruce Evans wrote: > >>On Thu, 8 Mar 2012, Peter Holm wrote: > >> > >>>Log: > >>>syscall() fuzzing can trigger this panic. Return EINVAL instead. > >>> > >>>MFC after: 1 week > >> > >>If so, then, this is not the place to hide the bug. > > > >OK > > > >This specific problem here was discover by: > > > > for (i = 0; i < 2000; i++) { > > if ((dirp = opendir(path)) == NULL) > > break; > > bcopy(dirp, &fuzz, sizeof(fuzz)); > > fuzz.dd_len = arc4random(); > > readdir(&fuzz); > > closedir(dirp); > > } > > Try this fix. You already fixed getdirentries() in 2008, but it was > broken recently. > > % Index: vfs_syscalls.c > % =================================================================== > % RCS file: /home/ncvs/src/sys/kern/vfs_syscalls.c,v > % retrieving revision 1.522 > % diff -u -2 -r1.522 vfs_syscalls.c > % --- vfs_syscalls.c 21 Feb 2012 01:05:12 -0000 1.522 > % +++ vfs_syscalls.c 9 Mar 2012 14:22:57 -0000 > % @@ -4154,7 +4154,7 @@ > % > % AUDIT_ARG_FD(fd); > % - auio.uio_resid = count; > % - if (auio.uio_resid > IOSIZE_MAX) > % + if (count > IOSIZE_MAX) > % return (EINVAL); > % + auio.uio_resid = count; > % if ((error = getvnode(td->td_proc->p_fd, fd, CAP_READ | CAP_SEEK, > % &fp)) != 0) > > The broken version checked `count' only after possibly clobbering it. > Clobbering occurs in practice on 32-bit arches, since then uio_resid > has type int so it cannot hold a value of INT_MAX + 1U. The behaviour > was undefined. The actual behaviour was normally to store a negative > value in uio_resid. Comparing this with IOSIZE_MAX then always passed, > since IOSIZE_MAX is a large int. > > `count' only has type u_int, not the usual size_t. It would be safer > to keep comparing it with INT_MAX. Supporting directory reads of more > than INT_MAX bytes is even more useless bloat than supporting regular > files reads of more than INT_MAX bytes. But it seems safe enough. > The limit is still INT_MAX on 32-bit arches. On 64-bit arches, it is > now UINT_MAX = 2**32-1, not actually IOSIZE_MAX = 2**63-1 like the code > checks for, since u_int can't go nearly as high as IOSIZE_MAX. At least > after the above change, the compiler should see that the check always > passes, and not generate any code for it, and maybe complain about it. > Perhaps this is why it was broken. However, the compiler can't see this > now, since IOSIZE_MAX is actually a macro that depends on a configuration > variable, so it isn't always > UINT_MAX on 64-bit arches. Without the > dynamic configuration, the broken check would obviously always pass on > 32-bit arches, and the compiler complaining about it would be just what > was required to avoid the bug. And even with dynamic configuration, it > is almost obvious that the check always passed, since IOSIZE_MAX is > (var ? INT_MAX : SSIZE_MAX), which is always INT_MAX. > > Bruce Thank you for the analysis. I have tested your patch, without r232692 and it works as expected. I'll back out r232692. Thank you. -- Peter From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 17:19:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 61E801065674; Fri, 9 Mar 2012 17:19:51 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C1C18FC0A; Fri, 9 Mar 2012 17:19:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q29HJouY017101; Fri, 9 Mar 2012 17:19:50 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q29HJoXH017099; Fri, 9 Mar 2012 17:19:50 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201203091719.q29HJoXH017099@svn.freebsd.org> From: Peter Holm Date: Fri, 9 Mar 2012 17:19:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232732 - head/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 17:19:51 -0000 Author: pho Date: Fri Mar 9 17:19:50 2012 New Revision: 232732 URL: http://svn.freebsd.org/changeset/base/232732 Log: Revert r232692 as the correct place to fix this is at the syscall level. Modified: head/sys/ufs/ffs/ffs_vnops.c Modified: head/sys/ufs/ffs/ffs_vnops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vnops.c Fri Mar 9 17:13:08 2012 (r232731) +++ head/sys/ufs/ffs/ffs_vnops.c Fri Mar 9 17:19:50 2012 (r232732) @@ -464,11 +464,11 @@ ffs_read(ap) } else if (vp->v_type != VREG && vp->v_type != VDIR) panic("ffs_read: type %d", vp->v_type); #endif - if (uio->uio_resid < 0 || uio->uio_offset < 0) - return (EINVAL); orig_resid = uio->uio_resid; + KASSERT(orig_resid >= 0, ("ffs_read: uio->uio_resid < 0")); if (orig_resid == 0) return (0); + KASSERT(uio->uio_offset >= 0, ("ffs_read: uio->uio_offset < 0")); fs = ip->i_fs; if (uio->uio_offset < ip->i_size && uio->uio_offset >= fs->fs_maxfilesize) From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 18:34:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 376F91065670; Fri, 9 Mar 2012 18:34:15 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 21ECA8FC1A; Fri, 9 Mar 2012 18:34:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q29IYEZj019713; Fri, 9 Mar 2012 18:34:14 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q29IYEoc019711; Fri, 9 Mar 2012 18:34:14 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201203091834.q29IYEoc019711@svn.freebsd.org> From: Edward Tomasz Napierala Date: Fri, 9 Mar 2012 18:34:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232738 - head/usr.sbin/diskinfo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 18:34:15 -0000 Author: trasz Date: Fri Mar 9 18:34:14 2012 New Revision: 232738 URL: http://svn.freebsd.org/changeset/base/232738 Log: Improve error reporting in diskinfo(8) by not displaying errno when it doesn't make sense. Modified: head/usr.sbin/diskinfo/diskinfo.c Modified: head/usr.sbin/diskinfo/diskinfo.c ============================================================================== --- head/usr.sbin/diskinfo/diskinfo.c Fri Mar 9 18:26:35 2012 (r232737) +++ head/usr.sbin/diskinfo/diskinfo.c Fri Mar 9 18:34:14 2012 (r232738) @@ -99,13 +99,13 @@ main(int argc, char **argv) } error = ioctl(fd, DIOCGMEDIASIZE, &mediasize); if (error) { - warn("%s: ioctl(DIOCGMEDIASIZE) failed, probably not a disk.", argv[i]); + warnx("%s: ioctl(DIOCGMEDIASIZE) failed, probably not a disk.", argv[i]); exitval = 1; goto out; } error = ioctl(fd, DIOCGSECTORSIZE, §orsize); if (error) { - warn("%s: DIOCGSECTORSIZE failed, probably not a disk.", argv[i]); + warnx("%s: ioctl(DIOCGSECTORSIZE) failed, probably not a disk.", argv[i]); exitval = 1; goto out; } @@ -178,8 +178,10 @@ rdsect(int fd, off_t blockno, u_int sect lseek(fd, (off_t)blockno * sectorsize, SEEK_SET); error = read(fd, sector, sectorsize); + if (error == -1) + err(1, "read"); if (error != (int)sectorsize) - err(1, "read error or disk too small for test."); + errx(1, "disk too small for test."); } static void @@ -188,8 +190,10 @@ rdmega(int fd) int error; error = read(fd, mega, sizeof(mega)); + if (error == -1) + err(1, "read"); if (error != sizeof(mega)) - err(1, "read error or disk too small for test."); + errx(1, "disk too small for test."); } static struct timeval tv1, tv2; From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 19:09:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 940F01065674; Fri, 9 Mar 2012 19:09:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8139D8FC23; Fri, 9 Mar 2012 19:09:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q29J99mY020919; Fri, 9 Mar 2012 19:09:09 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q29J99jZ020917; Fri, 9 Mar 2012 19:09:09 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201203091909.q29J99jZ020917@svn.freebsd.org> From: Alexander Motin Date: Fri, 9 Mar 2012 19:09:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232740 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 19:09:09 -0000 Author: mav Date: Fri Mar 9 19:09:08 2012 New Revision: 232740 URL: http://svn.freebsd.org/changeset/base/232740 Log: Make kern.sched.idlespinthresh default value adaptive depending of HZ. Otherwise with HZ above 8000 CPU may never skip timer ticks on idle. Modified: head/sys/kern/sched_ule.c Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Fri Mar 9 18:50:49 2012 (r232739) +++ head/sys/kern/sched_ule.c Fri Mar 9 19:09:08 2012 (r232740) @@ -212,7 +212,7 @@ static int preempt_thresh = 0; #endif static int static_boost = PRI_MIN_BATCH; static int sched_idlespins = 10000; -static int sched_idlespinthresh = 16; +static int sched_idlespinthresh = -1; /* * tdq - per processor runqs and statistics. All fields are protected by the @@ -1390,6 +1390,8 @@ sched_initticks(void *dummy) steal_thresh = min(fls(mp_ncpus) - 1, 3); affinity = SCHED_AFFINITY_DEFAULT; #endif + if (sched_idlespinthresh < 0) + sched_idlespinthresh = max(16, 2 * hz / realstathz); } From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 19:20:20 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5E3221065672; Fri, 9 Mar 2012 19:20:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2FD978FC14; Fri, 9 Mar 2012 19:20:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q29JKKBx021408; Fri, 9 Mar 2012 19:20:20 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q29JKJh7021406; Fri, 9 Mar 2012 19:20:19 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201203091920.q29JKJh7021406@svn.freebsd.org> From: John Baldwin Date: Fri, 9 Mar 2012 19:20:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232742 - head/sys/i386/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 19:20:20 -0000 Author: jhb Date: Fri Mar 9 19:20:19 2012 New Revision: 232742 URL: http://svn.freebsd.org/changeset/base/232742 Log: MFamd64: - Return failure for a suspend attempt if we have no wake address. - Use intr_disable()/intr_restore() instead of ACPI_DISABLE_IRQS(). - Invoke intr_suspend() earlier and call intr_resume() if suspend fails. - Use pause in the loop waiting for CPU to suspend. - Restore PAT MSR, switchtime, switchticks, and MTRRs on resume. Reviewed by: jkim (earlier version) MFC after: 2 weeks Modified: head/sys/i386/acpica/acpi_wakeup.c Modified: head/sys/i386/acpica/acpi_wakeup.c ============================================================================== --- head/sys/i386/acpica/acpi_wakeup.c Fri Mar 9 19:18:31 2012 (r232741) +++ head/sys/i386/acpica/acpi_wakeup.c Fri Mar 9 19:20:19 2012 (r232742) @@ -33,6 +33,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include @@ -200,13 +202,14 @@ acpi_sleep_machdep(struct acpi_softc *sc uint32_t cr3; u_long ef; - ret = 0; + ret = -1; if (sc->acpi_wakeaddr == 0) - return (0); + return (ret); AcpiSetFirmwareWakingVector(sc->acpi_wakephys); - ef = read_eflags(); + ef = intr_disable(); + intr_suspend(); /* * Temporarily switch to the kernel pmap because it provides an @@ -222,10 +225,8 @@ acpi_sleep_machdep(struct acpi_softc *sc #endif ret_addr = 0; - ACPI_DISABLE_IRQS(); if (acpi_savecpu()) { /* Execute Sleep */ - intr_suspend(); p_gdt = (struct region_descriptor *) (sc->acpi_wakeaddr + physical_gdt); @@ -267,25 +268,31 @@ acpi_sleep_machdep(struct acpi_softc *sc device_printf(sc->acpi_dev, "AcpiEnterSleepState failed - %s\n", AcpiFormatException(status)); - ret = -1; goto out; } - for (;;) ; + for (;;) + ia32_pause(); } else { - /* Execute Wakeup */ - mca_resume(); - intr_resume(); - + pmap_init_pat(); + PCPU_SET(switchtime, 0); + PCPU_SET(switchticks, ticks); if (bootverbose) { acpi_savecpu(); acpi_printcpu(); } + ret = 0; } out: load_cr3(cr3); - write_eflags(ef); + mca_resume(); + intr_resume(); + intr_restore(ef); + + if (ret == 0 && mem_range_softc.mr_op != NULL && + mem_range_softc.mr_op->reinit != NULL) + mem_range_softc.mr_op->reinit(&mem_range_softc); /* If we beeped, turn it off after a delay. */ if (acpi_resume_beep) From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 19:42:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A2B4106566C; Fri, 9 Mar 2012 19:42:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 440748FC0A; Fri, 9 Mar 2012 19:42:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q29JgnW0022238; Fri, 9 Mar 2012 19:42:49 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q29Jgmj1022231; Fri, 9 Mar 2012 19:42:48 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201203091942.q29Jgmj1022231@svn.freebsd.org> From: John Baldwin Date: Fri, 9 Mar 2012 19:42:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232744 - in head/sys: conf i386/i386 i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 19:42:49 -0000 Author: jhb Date: Fri Mar 9 19:42:48 2012 New Revision: 232744 URL: http://svn.freebsd.org/changeset/base/232744 Log: Allow a native i386 kernel to be built with 'nodevice atpic'. Just as on amd64, if 'device isa' is present quiesce the 8259A's during boot and resume from suspend. While here, be more selective on amd64 about which kernel configurations need elcr.c. MFC after: 2 weeks Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/i386/i386/exception.s head/sys/i386/i386/intr_machdep.c head/sys/i386/i386/machdep.c head/sys/i386/include/intr_machdep.h Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Fri Mar 9 19:22:31 2012 (r232743) +++ head/sys/conf/files.amd64 Fri Mar 9 19:42:48 2012 (r232744) @@ -466,7 +466,7 @@ x86/cpufreq/p4tcc.c optional cpufreq x86/isa/atpic.c optional atpic isa x86/isa/atrtc.c standard x86/isa/clock.c standard -x86/isa/elcr.c standard +x86/isa/elcr.c optional atpic isa | mptable x86/isa/isa.c standard x86/isa/isa_dma.c standard x86/isa/nmi.c standard Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Fri Mar 9 19:22:31 2012 (r232743) +++ head/sys/conf/files.i386 Fri Mar 9 19:42:48 2012 (r232744) @@ -516,9 +516,9 @@ x86/cpufreq/p4tcc.c optional cpufreq x86/cpufreq/powernow.c optional cpufreq x86/cpufreq/smist.c optional cpufreq x86/isa/atpic.c optional atpic -x86/isa/atrtc.c optional atpic +x86/isa/atrtc.c optional native x86/isa/clock.c optional native -x86/isa/elcr.c standard +x86/isa/elcr.c optional atpic | apic native x86/isa/isa.c optional isa x86/isa/isa_dma.c optional isa x86/isa/nmi.c standard Modified: head/sys/i386/i386/exception.s ============================================================================== --- head/sys/i386/i386/exception.s Fri Mar 9 19:22:31 2012 (r232743) +++ head/sys/i386/i386/exception.s Fri Mar 9 19:42:48 2012 (r232744) @@ -35,6 +35,7 @@ */ #include "opt_apic.h" +#include "opt_atpic.h" #include "opt_hwpmc_hooks.h" #include "opt_kdtrace.h" #include "opt_npx.h" @@ -299,14 +300,18 @@ ENTRY(fork_trampoline) SUPERALIGN_TEXT MCOUNT_LABEL(bintr) +#ifdef DEV_ATPIC #include +#endif -#ifdef DEV_APIC +#if defined(DEV_APIC) && defined(DEV_ATPIC) .data .p2align 4 .text SUPERALIGN_TEXT +#endif +#ifdef DEV_APIC #include #endif Modified: head/sys/i386/i386/intr_machdep.c ============================================================================== --- head/sys/i386/i386/intr_machdep.c Fri Mar 9 19:22:31 2012 (r232743) +++ head/sys/i386/i386/intr_machdep.c Fri Mar 9 19:42:48 2012 (r232744) @@ -37,6 +37,7 @@ * that source. */ +#include "opt_atpic.h" #include "opt_ddb.h" #include @@ -57,6 +58,14 @@ #include #endif +#ifndef DEV_ATPIC +#include +#include +#include +#include +#include +#endif + #define MAX_STRAY_LOG 5 typedef void (*mask_fn)(void *); @@ -270,6 +279,9 @@ intr_resume(void) { struct pic *pic; +#ifndef DEV_ATPIC + atpic_reset(); +#endif mtx_lock(&intr_table_lock); STAILQ_FOREACH(pic, &pics, pics) { if (pic->pic_resume != NULL) @@ -371,6 +383,28 @@ intr_init(void *dummy __unused) } SYSINIT(intr_init, SI_SUB_INTR, SI_ORDER_FIRST, intr_init, NULL); +#ifndef DEV_ATPIC +/* Initialize the two 8259A's to a known-good shutdown state. */ +void +atpic_reset(void) +{ + + outb(IO_ICU1, ICW1_RESET | ICW1_IC4); + outb(IO_ICU1 + ICU_IMR_OFFSET, IDT_IO_INTS); + outb(IO_ICU1 + ICU_IMR_OFFSET, 1 << 2); + outb(IO_ICU1 + ICU_IMR_OFFSET, ICW4_8086); + outb(IO_ICU1 + ICU_IMR_OFFSET, 0xff); + outb(IO_ICU1, OCW3_SEL | OCW3_RR); + + outb(IO_ICU2, ICW1_RESET | ICW1_IC4); + outb(IO_ICU2 + ICU_IMR_OFFSET, IDT_IO_INTS + 8); + outb(IO_ICU2 + ICU_IMR_OFFSET, 2); + outb(IO_ICU2 + ICU_IMR_OFFSET, ICW4_8086); + outb(IO_ICU2 + ICU_IMR_OFFSET, 0xff); + outb(IO_ICU2, OCW3_SEL | OCW3_RR); +} +#endif + /* Add a description to an active interrupt handler. */ int intr_describe(u_int vector, void *ih, const char *descr) Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Fri Mar 9 19:22:31 2012 (r232743) +++ head/sys/i386/i386/machdep.c Fri Mar 9 19:42:48 2012 (r232744) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include "opt_atalk.h" +#include "opt_atpic.h" #include "opt_compat.h" #include "opt_cpu.h" #include "opt_ddb.h" @@ -2712,8 +2713,22 @@ init386(first) printf("WARNING: loader(8) metadata is missing!\n"); #ifdef DEV_ISA +#ifdef DEV_ATPIC elcr_probe(); atpic_startup(); +#else + /* Reset and mask the atpics and leave them shut down. */ + atpic_reset(); + + /* + * Point the ICU spurious interrupt vectors at the APIC spurious + * interrupt handler. + */ + setidt(IDT_IO_INTS + 7, IDTVEC(spuriousint), SDT_SYS386IGT, SEL_KPL, + GSEL(GCODE_SEL, SEL_KPL)); + setidt(IDT_IO_INTS + 15, IDTVEC(spuriousint), SDT_SYS386IGT, SEL_KPL, + GSEL(GCODE_SEL, SEL_KPL)); +#endif #endif #ifdef DDB @@ -2971,8 +2986,22 @@ init386(first) printf("WARNING: loader(8) metadata is missing!\n"); #ifdef DEV_ISA +#ifdef DEV_ATPIC elcr_probe(); atpic_startup(); +#else + /* Reset and mask the atpics and leave them shut down. */ + atpic_reset(); + + /* + * Point the ICU spurious interrupt vectors at the APIC spurious + * interrupt handler. + */ + setidt(IDT_IO_INTS + 7, IDTVEC(spuriousint), SDT_SYS386IGT, SEL_KPL, + GSEL(GCODE_SEL, SEL_KPL)); + setidt(IDT_IO_INTS + 15, IDTVEC(spuriousint), SDT_SYS386IGT, SEL_KPL, + GSEL(GCODE_SEL, SEL_KPL)); +#endif #endif #ifdef DDB Modified: head/sys/i386/include/intr_machdep.h ============================================================================== --- head/sys/i386/include/intr_machdep.h Fri Mar 9 19:22:31 2012 (r232743) +++ head/sys/i386/include/intr_machdep.h Fri Mar 9 19:42:48 2012 (r232744) @@ -123,6 +123,9 @@ struct trapframe; extern struct mtx icu_lock; extern int elcr_found; +#ifndef DEV_ATPIC +void atpic_reset(void); +#endif /* XXX: The elcr_* prototypes probably belong somewhere else. */ int elcr_probe(void); enum intr_trigger elcr_read_trigger(u_int irq); From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 20:34:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DFFA01065674; Fri, 9 Mar 2012 20:34:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B17C98FC0C; Fri, 9 Mar 2012 20:34:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q29KYVxm024018; Fri, 9 Mar 2012 20:34:31 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q29KYVjv024014; Fri, 9 Mar 2012 20:34:31 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201203092034.q29KYVjv024014@svn.freebsd.org> From: Dimitry Andric Date: Fri, 9 Mar 2012 20:34:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232745 - in head/sys: powerpc/include sparc64/include x86/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 20:34:32 -0000 Author: dim Date: Fri Mar 9 20:34:31 2012 New Revision: 232745 URL: http://svn.freebsd.org/changeset/base/232745 Log: Add casts to __uint16_t to the __bswap16() macros on all arches which didn't already have them. This is because the ternary expression will return int, due to the Usual Arithmetic Conversions. Such casts are not needed for the 32 and 64 bit variants. While here, add additional parentheses around the x86 variant, to protect against unintended consequences. MFC after: 2 weeks Modified: head/sys/powerpc/include/endian.h head/sys/sparc64/include/endian.h head/sys/x86/include/endian.h Modified: head/sys/powerpc/include/endian.h ============================================================================== --- head/sys/powerpc/include/endian.h Fri Mar 9 19:42:48 2012 (r232744) +++ head/sys/powerpc/include/endian.h Fri Mar 9 20:34:31 2012 (r232745) @@ -124,8 +124,8 @@ __bswap64_var(__uint64_t _x) ((_x << 40) & ((__uint64_t)0xff << 48)) | ((_x << 56))); } -#define __bswap16(x) (__is_constant(x) ? __bswap16_const(x) : \ - __bswap16_var(x)) +#define __bswap16(x) ((__uint16_t)(__is_constant(x) ? __bswap16_const(x) : \ + __bswap16_var(x))) #define __bswap32(x) (__is_constant(x) ? __bswap32_const(x) : \ __bswap32_var(x)) #define __bswap64(x) (__is_constant(x) ? __bswap64_const(x) : \ Modified: head/sys/sparc64/include/endian.h ============================================================================== --- head/sys/sparc64/include/endian.h Fri Mar 9 19:42:48 2012 (r232744) +++ head/sys/sparc64/include/endian.h Fri Mar 9 20:34:31 2012 (r232745) @@ -109,8 +109,8 @@ __bswap64_var(__uint64_t _x) ((_x << 40) & ((__uint64_t)0xff << 48)) | ((_x << 56))); } -#define __bswap16(x) (__is_constant(x) ? __bswap16_const(x) : \ - __bswap16_var(x)) +#define __bswap16(x) ((__uint16_t)(__is_constant(x) ? __bswap16_const(x) : \ + __bswap16_var(x))) #define __bswap32(x) (__is_constant(x) ? __bswap32_const(x) : \ __bswap32_var(x)) #define __bswap64(x) (__is_constant(x) ? __bswap64_const(x) : \ Modified: head/sys/x86/include/endian.h ============================================================================== --- head/sys/x86/include/endian.h Fri Mar 9 19:42:48 2012 (r232744) +++ head/sys/x86/include/endian.h Fri Mar 9 20:34:31 2012 (r232745) @@ -71,8 +71,8 @@ #ifdef __GNUCLIKE_BUILTIN_CONSTANT_P #define __bswap16(x) \ - (__uint16_t)(__builtin_constant_p(x) ? \ - __bswap16_gen((__uint16_t)(x)) : __bswap16_var(x)) + ((__uint16_t)(__builtin_constant_p(x) ? \ + __bswap16_gen((__uint16_t)(x)) : __bswap16_var(x))) #define __bswap32(x) \ (__builtin_constant_p(x) ? \ __bswap32_gen((__uint32_t)(x)) : __bswap32_var(x)) From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 20:43:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9C01C106564A; Fri, 9 Mar 2012 20:43:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 85DBA8FC18; Fri, 9 Mar 2012 20:43:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q29KhUZe024378; Fri, 9 Mar 2012 20:43:30 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q29KhUWF024372; Fri, 9 Mar 2012 20:43:30 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201203092043.q29KhUWF024372@svn.freebsd.org> From: John Baldwin Date: Fri, 9 Mar 2012 20:43:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232747 - in head/sys: amd64/amd64 conf i386/i386 x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 20:43:30 -0000 Author: jhb Date: Fri Mar 9 20:43:29 2012 New Revision: 232747 URL: http://svn.freebsd.org/changeset/base/232747 Log: Move i386's intr_machdep.c to the x86 tree and share it with amd64. Added: head/sys/x86/x86/intr_machdep.c - copied, changed from r232744, head/sys/i386/i386/intr_machdep.c Deleted: head/sys/amd64/amd64/intr_machdep.c head/sys/i386/i386/intr_machdep.c Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/files.pc98 Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Fri Mar 9 20:41:42 2012 (r232746) +++ head/sys/conf/files.amd64 Fri Mar 9 20:43:29 2012 (r232747) @@ -112,7 +112,6 @@ amd64/amd64/gdb_machdep.c optional gdb amd64/amd64/identcpu.c standard amd64/amd64/in_cksum.c optional inet | inet6 amd64/amd64/initcpu.c standard -amd64/amd64/intr_machdep.c standard amd64/amd64/io.c optional io amd64/amd64/legacy.c standard amd64/amd64/locore.S standard no-obj @@ -475,6 +474,7 @@ x86/pci/pci_bus.c optional pci x86/pci/qpi.c optional pci x86/x86/busdma_machdep.c standard x86/x86/dump_machdep.c standard +x86/x86/intr_machdep.c standard x86/x86/io_apic.c standard x86/x86/local_apic.c standard x86/x86/mca.c standard Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Fri Mar 9 20:41:42 2012 (r232746) +++ head/sys/conf/files.i386 Fri Mar 9 20:43:29 2012 (r232747) @@ -405,7 +405,6 @@ i386/i386/i686_mem.c optional mem i386/i386/identcpu.c standard i386/i386/in_cksum.c optional inet | inet6 i386/i386/initcpu.c standard -i386/i386/intr_machdep.c standard i386/i386/io.c optional io i386/i386/k6_mem.c optional mem i386/i386/legacy.c optional native @@ -527,6 +526,7 @@ x86/pci/pci_bus.c optional pci x86/pci/qpi.c optional pci x86/x86/busdma_machdep.c standard x86/x86/dump_machdep.c standard +x86/x86/intr_machdep.c standard x86/x86/io_apic.c optional apic x86/x86/local_apic.c optional apic x86/x86/mca.c standard Modified: head/sys/conf/files.pc98 ============================================================================== --- head/sys/conf/files.pc98 Fri Mar 9 20:41:42 2012 (r232746) +++ head/sys/conf/files.pc98 Fri Mar 9 20:43:29 2012 (r232747) @@ -144,7 +144,6 @@ i386/i386/i686_mem.c optional mem i386/i386/identcpu.c standard i386/i386/in_cksum.c optional inet | inet6 i386/i386/initcpu.c standard -i386/i386/intr_machdep.c standard i386/i386/io.c optional io i386/i386/k6_mem.c optional mem i386/i386/legacy.c standard @@ -251,6 +250,7 @@ x86/isa/isa.c optional isa x86/pci/pci_bus.c optional pci x86/x86/busdma_machdep.c standard x86/x86/dump_machdep.c standard +x86/x86/intr_machdep.c standard x86/x86/io_apic.c optional apic x86/x86/local_apic.c optional apic x86/x86/mca.c standard Copied and modified: head/sys/x86/x86/intr_machdep.c (from r232744, head/sys/i386/i386/intr_machdep.c) ============================================================================== --- head/sys/i386/i386/intr_machdep.c Fri Mar 9 19:42:48 2012 (r232744, copy source) +++ head/sys/x86/x86/intr_machdep.c Fri Mar 9 20:43:29 2012 (r232747) @@ -30,7 +30,7 @@ */ /* - * Machine dependent interrupt code for i386. For the i386, we have to + * Machine dependent interrupt code for x86. For x86, we have to * deal with different PICs. Thus, we use the passed in vector to lookup * an interrupt source associated with that vector. The interrupt source * describes which PIC the source belongs to and includes methods to handle From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 20:50:16 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57C43106566C; Fri, 9 Mar 2012 20:50:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4425A8FC0C; Fri, 9 Mar 2012 20:50:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q29KoGNN024710; Fri, 9 Mar 2012 20:50:16 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q29KoGHI024708; Fri, 9 Mar 2012 20:50:16 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201203092050.q29KoGHI024708@svn.freebsd.org> From: Dimitry Andric Date: Fri, 9 Mar 2012 20:50:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232748 - head/usr.bin/netstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 20:50:16 -0000 Author: dim Date: Fri Mar 9 20:50:15 2012 New Revision: 232748 URL: http://svn.freebsd.org/changeset/base/232748 Log: After r232745, which makes sure __bswap16(), ntohs() and htons() return __uint16_t, we can partially undo r228668. Note the remark "Work around a clang false positive with format string warnings and ntohs macros (see LLVM PR 11313)" was actually incorrect. Before r232745, on some arches, the ntohs() macros did in fact return int, not uint16_t, so clang was right in warning about the %hu format string. MFC after: 2 weeks Modified: head/usr.bin/netstat/Makefile Modified: head/usr.bin/netstat/Makefile ============================================================================== --- head/usr.bin/netstat/Makefile Fri Mar 9 20:43:29 2012 (r232747) +++ head/usr.bin/netstat/Makefile Fri Mar 9 20:50:15 2012 (r232748) @@ -8,9 +8,6 @@ SRCS= if.c inet.c main.c mbuf.c mroute.c unix.c atalk.c mroute6.c ipsec.c bpf.c pfkey.c sctp.c WARNS?= 3 -# XXX: Work around a clang false positive with format string warnings -# and ntohs macros (see LLVM PR 11313). -NO_WFORMAT.clang= CFLAGS+=-fno-strict-aliasing CFLAGS+=-DIPSEC From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 21:02:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1B244106566B; Fri, 9 Mar 2012 21:02:40 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 076768FC12; Fri, 9 Mar 2012 21:02:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q29L2dj9025157; Fri, 9 Mar 2012 21:02:39 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q29L2d3T025154; Fri, 9 Mar 2012 21:02:39 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201203092102.q29L2d3T025154@svn.freebsd.org> From: Dimitry Andric Date: Fri, 9 Mar 2012 21:02:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232749 - head/sbin/fsdb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 21:02:40 -0000 Author: dim Date: Fri Mar 9 21:02:39 2012 New Revision: 232749 URL: http://svn.freebsd.org/changeset/base/232749 Log: Partially undo r228693, by removing NO_WFORMAT.clang in fsdb's Makefile, and fixing the format string in sbin/fsdb/fsdbutil.c instead. Note the remark "Work around a problem with format string warnings and ntohs macros" was actually incorrect. The DIP(dp, di_nlink) macro invocation actually returned an int, due to its ternary expression, even though the di_nlink members of struct ufs1_dinode and struct ufs2_dinode are both defined as int16_t. MFC after: 2 weeks Modified: head/sbin/fsdb/Makefile head/sbin/fsdb/fsdbutil.c Modified: head/sbin/fsdb/Makefile ============================================================================== --- head/sbin/fsdb/Makefile Fri Mar 9 20:50:15 2012 (r232748) +++ head/sbin/fsdb/Makefile Fri Mar 9 21:02:39 2012 (r232749) @@ -9,8 +9,6 @@ SRCS= fsdb.c fsdbutil.c \ pass5.c setup.c utilities.c ffs_subr.c ffs_tables.c CFLAGS+= -I${.CURDIR}/../fsck_ffs WARNS?= 2 -# Work around a problem with format string warnings and ntohs macros. -NO_WFORMAT.clang= LDADD= -ledit -ltermcap DPADD= ${LIBEDIT} ${LIBTERMCAP} .PATH: ${.CURDIR}/../fsck_ffs ${.CURDIR}/../../sys/ufs/ffs Modified: head/sbin/fsdb/fsdbutil.c ============================================================================== --- head/sbin/fsdb/fsdbutil.c Fri Mar 9 20:50:15 2012 (r232748) +++ head/sbin/fsdb/fsdbutil.c Fri Mar 9 21:02:39 2012 (r232749) @@ -193,7 +193,7 @@ printstat(const char *cp, ino_t inum, un blocks = DIP(dp, di_blocks); gen = DIP(dp, di_gen); - printf("LINKCNT=%hd FLAGS=%#x BLKCNT=%jx GEN=%jx\n", DIP(dp, di_nlink), + printf("LINKCNT=%d FLAGS=%#x BLKCNT=%jx GEN=%jx\n", DIP(dp, di_nlink), DIP(dp, di_flags), (intmax_t)blocks, (intmax_t)gen); } From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 21:31:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 683D21065670; Fri, 9 Mar 2012 21:31:13 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 540278FC17; Fri, 9 Mar 2012 21:31:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q29LVD3w026113; Fri, 9 Mar 2012 21:31:13 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q29LVDBa026111; Fri, 9 Mar 2012 21:31:13 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201203092131.q29LVDBa026111@svn.freebsd.org> From: Peter Holm Date: Fri, 9 Mar 2012 21:31:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232750 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 21:31:13 -0000 Author: pho Date: Fri Mar 9 21:31:12 2012 New Revision: 232750 URL: http://svn.freebsd.org/changeset/base/232750 Log: Perform the parameter validation before assigning it to a signed int variable. This fixes the problem seen with readdir(3) fuzzing. Submitted by: bde MFC after: 1 week Modified: head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Fri Mar 9 21:02:39 2012 (r232749) +++ head/sys/kern/vfs_syscalls.c Fri Mar 9 21:31:12 2012 (r232750) @@ -4153,9 +4153,9 @@ kern_getdirentries(struct thread *td, in int error, eofflag; AUDIT_ARG_FD(fd); - auio.uio_resid = count; - if (auio.uio_resid > IOSIZE_MAX) + if (count > IOSIZE_MAX) return (EINVAL); + auio.uio_resid = count; if ((error = getvnode(td->td_proc->p_fd, fd, CAP_READ | CAP_SEEK, &fp)) != 0) return (error); From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 21:34:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BC91106564A; Fri, 9 Mar 2012 21:34:41 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id B830E8FC08; Fri, 9 Mar 2012 21:34:40 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id AA7A725D3A05; Fri, 9 Mar 2012 21:34:39 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id E6844BDD0CF; Fri, 9 Mar 2012 21:34:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id gAZIYddTgI7N; Fri, 9 Mar 2012 21:34:37 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 9C592BDD0CE; Fri, 9 Mar 2012 21:34:37 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201203091605.q29G5B5i014414@svn.freebsd.org> Date: Fri, 9 Mar 2012 21:34:36 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <81876B03-323E-43FC-BB99-4F1BECECD9AD@lists.zabbadoz.net> References: <201203091605.q29G5B5i014414@svn.freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232727 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 21:34:41 -0000 On 9. Mar 2012, at 16:05 , John Baldwin wrote: > Author: jhb > Date: Fri Mar 9 16:05:11 2012 > New Revision: 232727 > URL: http://svn.freebsd.org/changeset/base/232727 >=20 > Log: > Remove PAE special-case 2GB DMA boundary and always use a 4GB = boundary > now that DMA tags in PAE kernels support 4GB boundaries. >=20 > Reviewed by: yongari >=20 > Modified: > head/sys/dev/bge/if_bgereg.h >=20 ie63 XEN and PAE at least failed. /scratch/tmp/bz/head.svn/sys/modules/bge/../../dev/bge/if_bge.c: In = function 'bge_dma_alloc': /scratch/tmp/bz/head.svn/sys/modules/bge/../../dev/bge/if_bge.c:2607: = warning: large integer implicitly truncated to unsigned type = [-Woverflow] > Modified: head/sys/dev/bge/if_bgereg.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/bge/if_bgereg.h Fri Mar 9 15:42:47 2012 = (r232726) > +++ head/sys/dev/bge/if_bgereg.h Fri Mar 9 16:05:11 2012 = (r232727) > @@ -2691,15 +2691,11 @@ struct bge_gib { > #define BGE_DMA_MAXADDR 0xFFFFFFFFFF > #endif >=20 > -#ifdef PAE > -#define BGE_DMA_BNDRY 0x80000000 > -#else > #if (BUS_SPACE_MAXADDR > 0xFFFFFFFF) > #define BGE_DMA_BNDRY 0x100000000 > #else > #define BGE_DMA_BNDRY 0 > #endif > -#endif >=20 > /* > * Ring structures. Most of these reside in host memory and we tell --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 22:30:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 744161065672; Fri, 9 Mar 2012 22:30:55 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5F71D8FC17; Fri, 9 Mar 2012 22:30:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q29MUtnB027919; Fri, 9 Mar 2012 22:30:55 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q29MUttU027917; Fri, 9 Mar 2012 22:30:55 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203092230.q29MUttU027917@svn.freebsd.org> From: Juli Mallett Date: Fri, 9 Mar 2012 22:30:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232751 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 22:30:55 -0000 Author: jmallett Date: Fri Mar 9 22:30:54 2012 New Revision: 232751 URL: http://svn.freebsd.org/changeset/base/232751 Log: Export intrcnt correctly when running under 32-bit compatibility. Reviewed by: gonzo, nwhitehorn Modified: head/sys/kern/kern_intr.c Modified: head/sys/kern/kern_intr.c ============================================================================== --- head/sys/kern/kern_intr.c Fri Mar 9 21:31:12 2012 (r232750) +++ head/sys/kern/kern_intr.c Fri Mar 9 22:30:54 2012 (r232751) @@ -1881,6 +1881,24 @@ SYSCTL_PROC(_hw, OID_AUTO, intrnames, CT static int sysctl_intrcnt(SYSCTL_HANDLER_ARGS) { +#ifdef SCTL_MASK32 + uint32_t *intrcnt32; + unsigned i; + int error; + + if (req->flags & SCTL_MASK32) { + if (!req->oldptr) + return (sysctl_handle_opaque(oidp, NULL, sintrcnt / 2, req)); + intrcnt32 = malloc(sintrcnt / 2, M_TEMP, M_NOWAIT); + if (intrcnt32 == NULL) + return (ENOMEM); + for (i = 0; i < sintrcnt / sizeof (u_long); i++) + intrcnt32[i] = intrcnt[i]; + error = sysctl_handle_opaque(oidp, intrcnt32, sintrcnt / 2, req); + free(intrcnt32, M_TEMP); + return (error); + } +#endif return (sysctl_handle_opaque(oidp, intrcnt, sintrcnt, req)); } From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 22:35:06 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5CA1106564A; Fri, 9 Mar 2012 22:35:06 +0000 (UTC) (envelope-from decke@FreeBSD.org) Received: from groupware.itac.at (groupware.itac.at [91.205.172.99]) by mx1.freebsd.org (Postfix) with ESMTP id 6DB8A8FC19; Fri, 9 Mar 2012 22:35:06 +0000 (UTC) Received: from home.bluelife.at (93.104.210.95) by groupware.itac.at (Axigen) with (AES256-SHA encrypted) ESMTPSA id 358E0C; Fri, 9 Mar 2012 23:20:11 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 09 Mar 2012 23:19:59 +0100 From: Bernhard Froehlich To: Tijl Coosemans In-Reply-To: <201203051350.09141.tijl@freebsd.org> References: <201202281838.q1SIcYhE082928@svn.freebsd.org> <201203041351.22847.jhb@freebsd.org> <4F53DF10.5080303@gmail.com> <201203051350.09141.tijl@freebsd.org> Message-ID: <5e7563232fffb2ad1181f8d942a5b585@bluelife.at> X-Sender: decke@FreeBSD.org User-Agent: Roundcube Webmail/0.7.1 X-AxigenSpam-Level: 1 X-CTCH-RefID: str=0001.0A0B020B.4F5A820F.008C,ss=1,fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown Cc: svn-src-head@freebsd.org, Andrey Kosachenko , svn-src-all@freebsd.org, emulation@freebsd.org, src-committers@freebsd.org Subject: Re: virtualbox fix for recent current (was Re: svn commit: r232264 - in head/sys: amd64/include i386/include pc98/include x86/include) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 22:35:07 -0000 On 05.03.2012 13:50, Tijl Coosemans wrote: >> >> -Wp,-MD,/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/out/freebsd.amd64/release/obj/tstVMStructRC/tstVMStructRC.o.dep >> >> -Wp,-MT,/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/out/freebsd.amd64/release/obj/tstVMStructRC/tstVMStructRC.o >> -Wp,-MP -o >> >> /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/out/freebsd.amd64/release/obj/tstVMStructRC/tstVMStructRC.o >> >> /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/src/VBox/VMM/testcase/tstVMStructRC.cpp >> kmk: *** Waiting for unfinished jobs.... >> kmk: *** Exiting with status 2 >> *** [do-build] Error code 2 >> >> Stop in /usr/ports/emulators/virtualbox-ose. >> *** [build] Error code 1 >> >> Stop in /usr/ports/emulators/virtualbox-ose. >> --- Thanks! The patch has been committed now. -- Bernhard Froehlich http://www.bluelife.at/ From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 22:41:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46EEC1065674; Fri, 9 Mar 2012 22:41:10 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 31DAD8FC14; Fri, 9 Mar 2012 22:41:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q29MfAZs028347; Fri, 9 Mar 2012 22:41:10 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q29Mf9V1028345; Fri, 9 Mar 2012 22:41:09 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201203092241.q29Mf9V1028345@svn.freebsd.org> From: Adrian Chadd Date: Fri, 9 Mar 2012 22:41:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232752 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 22:41:10 -0000 Author: adrian Date: Fri Mar 9 22:41:09 2012 New Revision: 232752 URL: http://svn.freebsd.org/changeset/base/232752 Log: Should the mcast queue be locked here? In case more multicast traffic comes along? This commit was brought to you via an Atheros AR5210, associated to an 3x3 HT40 11na access point. Yes, this driver still works with it. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Fri Mar 9 22:30:54 2012 (r232751) +++ head/sys/dev/ath/if_ath.c Fri Mar 9 22:41:09 2012 (r232752) @@ -3059,7 +3059,9 @@ ath_beacon_generate(struct ath_softc *sc */ bf = avp->av_bcbuf; m = bf->bf_m; + /* XXX lock mcastq? */ nmcastq = avp->av_mcastq.axq_depth; + if (ieee80211_beacon_update(bf->bf_node, &avp->av_boff, m, nmcastq)) { /* XXX too conservative? */ bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap); From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 22:58:35 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8203B106566C; Fri, 9 Mar 2012 22:58:35 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 542A58FC08; Fri, 9 Mar 2012 22:58:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q29MwZBn028904; Fri, 9 Mar 2012 22:58:35 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q29MwZBX028902; Fri, 9 Mar 2012 22:58:35 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201203092258.q29MwZBX028902@svn.freebsd.org> From: Adrian Chadd Date: Fri, 9 Mar 2012 22:58:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232753 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 22:58:35 -0000 Author: adrian Date: Fri Mar 9 22:58:34 2012 New Revision: 232753 URL: http://svn.freebsd.org/changeset/base/232753 Log: Document that we may end up with some suboptimal handling of data frames with stations in power saving mode. I'm not (yet) sure how to handle TX'ing aggregates frames to stations that are in power saving mode, or whether that's even a feasible thing to do. So in order to (mostly) not forget, leave a couple of comments in the code. The code presently assumes that the aggregation TID state for an ath_node is locked not by the ath_node lock or a node+TID lock, but behind the hardware queue said TID maps to. This assumption is going to be incorrect for stations in power saving mode as we'll be TX'ing frames on the multicast queue. In any case, I'm afraid its a "later problem". :/ Modified: head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Fri Mar 9 22:41:09 2012 (r232752) +++ head/sys/dev/ath/if_ath_tx.c Fri Mar 9 22:58:34 2012 (r232753) @@ -1162,6 +1162,11 @@ ath_tx_normal_setup(struct ath_softc *sc * (or) if there is some mcast data waiting on the mcast * queue (to prevent out of order delivery) multicast * frames must be buffered until after the beacon. + * + * XXX This likely means that if there's a station in power + * save mode, we won't be doing any kind of aggregation towards + * anyone. This is likely a very suboptimal way of dealing + * with things. */ if (ismcast && (vap->iv_ps_sta || avp->av_mcastq.axq_depth)) txq = &avp->av_mcastq; @@ -1409,6 +1414,12 @@ ath_tx_start(struct ath_softc *sc, struc if (ismcast) txq = &avp->av_mcastq; + /* + * XXX This likely means that if there's a station in power + * save mode, we won't be doing any kind of aggregation towards + * anyone. This is likely a very suboptimal way of dealing + * with things. + */ if ((! is_ampdu) && (vap->iv_ps_sta || avp->av_mcastq.axq_depth)) txq = &avp->av_mcastq; From owner-svn-src-all@FreeBSD.ORG Fri Mar 9 23:30:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4A971065670; Fri, 9 Mar 2012 23:30:30 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A3F278FC0A; Fri, 9 Mar 2012 23:30:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q29NUU64029982; Fri, 9 Mar 2012 23:30:30 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q29NUUWl029979; Fri, 9 Mar 2012 23:30:30 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201203092330.q29NUUWl029979@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 9 Mar 2012 23:30:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232754 - in head: share/mk sys/boot/i386/boot2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2012 23:30:30 -0000 Author: jkim Date: Fri Mar 9 23:30:30 2012 New Revision: 232754 URL: http://svn.freebsd.org/changeset/base/232754 Log: Make boot2 build with Clang again. Submitted by: dim (bsd.sys.mk) Reviewed by: dim, jhb Modified: head/share/mk/bsd.sys.mk head/sys/boot/i386/boot2/boot2.c Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Fri Mar 9 22:58:34 2012 (r232753) +++ head/share/mk/bsd.sys.mk Fri Mar 9 23:30:30 2012 (r232754) @@ -100,8 +100,10 @@ CWARNFLAGS += -Wno-unknown-pragmas .if ${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang" CLANG_NO_IAS = -no-integrated-as -CLANG_OPT_SMALL = -mllvm -stack-alignment=8 -mllvm -inline-threshold=3 \ - -mllvm -enable-load-pre=false +CLANG_OPT_SMALL = -mllvm -stack-alignment=8 \ + -mllvm -inline-threshold=3 \ + -mllvm -enable-load-pre=false \ + -mllvm -simplifycfg-dup-ret .endif .if ${MK_SSP} != "no" && ${MACHINE_CPUARCH} != "ia64" && \ Modified: head/sys/boot/i386/boot2/boot2.c ============================================================================== --- head/sys/boot/i386/boot2/boot2.c Fri Mar 9 22:58:34 2012 (r232753) +++ head/sys/boot/i386/boot2/boot2.c Fri Mar 9 23:30:30 2012 (r232754) @@ -129,8 +129,8 @@ static struct dsk { int init; } dsk; static char cmd[512], cmddup[512], knamebuf[1024]; -static const char *kname; -static uint32_t opts; +static const char *kname = NULL; +static uint32_t opts = 0; static int comspeed = SIOSPD; static struct bootinfo bootinfo; static uint8_t ioctrl = IO_KEYBOARD; @@ -225,8 +225,6 @@ main(void) ino_t ino; size_t nbyte; - opts = 0; - kname = NULL; dmadat = (void *)(roundup2(__base + (int32_t)&_end, 0x10000) - __base); v86.ctl = V86_FLAGS; v86.efl = PSL_RESERVED_DEFAULT | PSL_I; From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 02:26:12 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D655B106566B; Sat, 10 Mar 2012 02:26:12 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C50358FC12; Sat, 10 Mar 2012 02:26:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2A2QCfK035329; Sat, 10 Mar 2012 02:26:12 GMT (envelope-from rstone@svn.freebsd.org) Received: (from rstone@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2A2QCkL035327; Sat, 10 Mar 2012 02:26:12 GMT (envelope-from rstone@svn.freebsd.org) Message-Id: <201203100226.q2A2QCkL035327@svn.freebsd.org> From: Ryan Stone Date: Sat, 10 Mar 2012 02:26:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232756 - stable/9/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 02:26:13 -0000 Author: rstone Date: Sat Mar 10 02:26:12 2012 New Revision: 232756 URL: http://svn.freebsd.org/changeset/base/232756 Log: MFC r230984: Whenever a new kernel thread is spawned, explicitly clear any CPU affinity set on the new thread. This prevents the thread from inadvertently inheriting affinity from a random sibling. Modified: stable/9/sys/kern/kern_kthread.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_kthread.c ============================================================================== --- stable/9/sys/kern/kern_kthread.c Sat Mar 10 01:36:42 2012 (r232755) +++ stable/9/sys/kern/kern_kthread.c Sat Mar 10 02:26:12 2012 (r232756) @@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -117,6 +118,9 @@ kproc_create(void (*func)(void *), void /* call the processes' main()... */ cpu_set_fork_handler(td, func, arg); + + /* Avoid inheriting affinity from a random parent. */ + cpuset_setthread(td->td_tid, cpuset_root); thread_lock(td); TD_SET_CAN_RUN(td); sched_prio(td, PVM); @@ -299,6 +303,9 @@ kthread_add(void (*func)(void *), void * tidhash_add(newtd); + /* Avoid inheriting affinity from a random parent. */ + cpuset_setthread(newtd->td_tid, cpuset_root); + /* Delay putting it on the run queue until now. */ if (!(flags & RFSTOPPED)) { thread_lock(newtd); From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 02:27:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10A09106567B; Sat, 10 Mar 2012 02:27:05 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ED05E8FC1A; Sat, 10 Mar 2012 02:27:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2A2R4eU035392; Sat, 10 Mar 2012 02:27:04 GMT (envelope-from rstone@svn.freebsd.org) Received: (from rstone@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2A2R4GN035390; Sat, 10 Mar 2012 02:27:04 GMT (envelope-from rstone@svn.freebsd.org) Message-Id: <201203100227.q2A2R4GN035390@svn.freebsd.org> From: Ryan Stone Date: Sat, 10 Mar 2012 02:27:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232757 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 02:27:05 -0000 Author: rstone Date: Sat Mar 10 02:27:04 2012 New Revision: 232757 URL: http://svn.freebsd.org/changeset/base/232757 Log: MFC r230984: Whenever a new kernel thread is spawned, explicitly clear any CPU affinity set on the new thread. This prevents the thread from inadvertently inheriting affinity from a random sibling. Modified: stable/8/sys/kern/kern_kthread.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/kern/kern_kthread.c ============================================================================== --- stable/8/sys/kern/kern_kthread.c Sat Mar 10 02:26:12 2012 (r232756) +++ stable/8/sys/kern/kern_kthread.c Sat Mar 10 02:27:04 2012 (r232757) @@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -116,6 +117,9 @@ kproc_create(void (*func)(void *), void /* call the processes' main()... */ cpu_set_fork_handler(td, func, arg); + + /* Avoid inheriting affinity from a random parent. */ + cpuset_setthread(td->td_tid, cpuset_root); thread_lock(td); TD_SET_CAN_RUN(td); sched_prio(td, PVM); @@ -300,6 +304,9 @@ kthread_add(void (*func)(void *), void * PROC_UNLOCK(p); + /* Avoid inheriting affinity from a random parent. */ + cpuset_setthread(newtd->td_tid, cpuset_root); + /* Delay putting it on the run queue until now. */ if (!(flags & RFSTOPPED)) { thread_lock(newtd); From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 04:02:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D4F831065670; Sat, 10 Mar 2012 04:02:52 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C46C68FC0C; Sat, 10 Mar 2012 04:02:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2A42qVv038832; Sat, 10 Mar 2012 04:02:52 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2A42qwA038830; Sat, 10 Mar 2012 04:02:52 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201203100402.q2A42qwA038830@svn.freebsd.org> From: Adrian Chadd Date: Sat, 10 Mar 2012 04:02:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232763 - head/sys/dev/wtap X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 04:02:52 -0000 Author: adrian Date: Sat Mar 10 04:02:52 2012 New Revision: 232763 URL: http://svn.freebsd.org/changeset/base/232763 Log: Enforce that wtap requires VIMAGE to be useful. Modified: head/sys/dev/wtap/if_wtap.c Modified: head/sys/dev/wtap/if_wtap.c ============================================================================== --- head/sys/dev/wtap/if_wtap.c Sat Mar 10 02:58:15 2012 (r232762) +++ head/sys/dev/wtap/if_wtap.c Sat Mar 10 04:02:52 2012 (r232763) @@ -40,6 +40,13 @@ #include #include "if_medium.h" +/* + * This _requires_ vimage to be useful. + */ +#ifndef VIMAGE +#error if_wtap requires VIMAGE. +#endif /* VIMAGE */ + /* device for IOCTL and read/write for debuggin purposes */ /* Function prototypes */ static d_open_t wtap_node_open; From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 04:14:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9B363106564A; Sat, 10 Mar 2012 04:14:04 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 89CBE8FC19; Sat, 10 Mar 2012 04:14:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2A4E4FN039201; Sat, 10 Mar 2012 04:14:04 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2A4E4n5039195; Sat, 10 Mar 2012 04:14:04 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201203100414.q2A4E4n5039195@svn.freebsd.org> From: Adrian Chadd Date: Sat, 10 Mar 2012 04:14:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232764 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 04:14:04 -0000 Author: adrian Date: Sat Mar 10 04:14:04 2012 New Revision: 232764 URL: http://svn.freebsd.org/changeset/base/232764 Log: Don't flood the cabq/mcastq with frames. In a very noisy 2.4GHz environment (with HT/40 enabled, making it worse) I saw the following occur: * the air was considered "busy" a lot of the time; * the cabq time is quite short due to staggered beacons being enabled; * it just wasn't able to keep up TX'ing CABQ frames; * .. and the cabq would swallow up all the TX ath_buf's. This patch introduces a twiddle which allows the maximum cabq depth to be set, forcing further frames to be dropped. It defaults to the TX buffer count at the moment, so the default behaviour isn't changed. I've also started fleshing out a similar setup for the data path, so it doesn't swallow up all the available TX buffers and preventing management frames (such as ADDBA) out. PR: kern/165895 Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_ath_sysctl.c head/sys/dev/ath/if_ath_tx.c head/sys/dev/ath/if_athioctl.h head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Sat Mar 10 04:02:52 2012 (r232763) +++ head/sys/dev/ath/if_ath.c Sat Mar 10 04:14:04 2012 (r232764) @@ -637,6 +637,19 @@ ath_attach(u_int16_t devid, struct ath_s #endif /* + * TODO: enforce that at least this many frames are available + * in the txbuf list before allowing data frames (raw or + * otherwise) to be transmitted. + */ + sc->sc_txq_data_minfree = 10; + /* + * Leave this as default to maintain legacy behaviour. + * Shortening the cabq/mcastq may end up causing some + * undesirable behaviour. + */ + sc->sc_txq_mcastq_maxdepth = ath_txbuf; + + /* * Allow the TX and RX chainmasks to be overridden by * environment variables and/or device.hints. * Modified: head/sys/dev/ath/if_ath_sysctl.c ============================================================================== --- head/sys/dev/ath/if_ath_sysctl.c Sat Mar 10 04:02:52 2012 (r232763) +++ head/sys/dev/ath/if_ath_sysctl.c Sat Mar 10 04:14:04 2012 (r232764) @@ -605,6 +605,17 @@ ath_sysctlattach(struct ath_softc *sc) "tid_hwq_hi", CTLFLAG_RW, &sc->sc_tid_hwq_hi, 0, ""); +#if 0 + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "txq_data_minfree", CTLFLAG_RW, &sc->sc_txq_data_minfree, + 0, "Minimum free buffers before adding a data frame" + " to the TX queue"); +#endif + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "txq_mcastq_maxdepth", CTLFLAG_RW, + &sc->sc_txq_mcastq_maxdepth, 0, + "Maximum buffer depth for multicast/broadcast frames"); + #ifdef IEEE80211_SUPPORT_TDMA if (ath_hal_macversion(ah) > 0x78) { sc->sc_tdmadbaprep = 2; @@ -885,7 +896,10 @@ ath_sysctl_stats_attach(struct ath_softc &sc->sc_stats.ast_rx_intr, 0, "RX interrupts"); SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_intr", CTLFLAG_RD, &sc->sc_stats.ast_tx_intr, 0, "TX interrupts"); - + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_mcastq_overflow", + CTLFLAG_RD, &sc->sc_stats.ast_tx_mcastq_overflow, 0, + "Number of multicast frames exceeding maximum mcast queue depth"); + /* Attach the RX phy error array */ ath_sysctl_stats_attach_rxphyerr(sc, child); } Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Sat Mar 10 04:02:52 2012 (r232763) +++ head/sys/dev/ath/if_ath_tx.c Sat Mar 10 04:14:04 2012 (r232764) @@ -1369,7 +1369,7 @@ ath_tx_start(struct ath_softc *sc, struc { struct ieee80211vap *vap = ni->ni_vap; struct ath_vap *avp = ATH_VAP(vap); - int r; + int r = 0; u_int pri; int tid; struct ath_txq *txq; @@ -1402,6 +1402,30 @@ ath_tx_start(struct ath_softc *sc, struc type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; subtype = wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK; + /* + * Enforce how deep the multicast queue can grow. + * + * XXX duplicated in ath_raw_xmit(). + */ + if (IEEE80211_IS_MULTICAST(wh->i_addr1)) { + ATH_TXQ_LOCK(sc->sc_cabq); + ATH_TXQ_LOCK(&avp->av_mcastq); + + if ((sc->sc_cabq->axq_depth + avp->av_mcastq.axq_depth) > + sc->sc_txq_mcastq_maxdepth) { + sc->sc_stats.ast_tx_mcastq_overflow++; + r = ENOBUFS; + } + + ATH_TXQ_UNLOCK(&avp->av_mcastq); + ATH_TXQ_UNLOCK(sc->sc_cabq); + + if (r != 0) { + m_freem(m0); + return r; + } + } + /* A-MPDU TX */ is_ampdu_tx = ath_tx_ampdu_running(sc, ATH_NODE(ni), tid); is_ampdu_pending = ath_tx_ampdu_pending(sc, ATH_NODE(ni), tid); @@ -1734,7 +1758,10 @@ ath_raw_xmit(struct ieee80211_node *ni, struct ifnet *ifp = ic->ic_ifp; struct ath_softc *sc = ifp->if_softc; struct ath_buf *bf; - int error; + struct ieee80211_frame *wh = mtod(m, struct ieee80211_frame *); + struct ieee80211vap *vap = ni->ni_vap; + struct ath_vap *avp = ATH_VAP(vap); + int error = 0; ATH_PCU_LOCK(sc); if (sc->sc_inreset_cnt > 0) { @@ -1755,6 +1782,31 @@ ath_raw_xmit(struct ieee80211_node *ni, error = ENETDOWN; goto bad; } + + /* + * Enforce how deep the multicast queue can grow. + * + * XXX duplicated in ath_tx_start(). + */ + if (IEEE80211_IS_MULTICAST(wh->i_addr1)) { + ATH_TXQ_LOCK(sc->sc_cabq); + ATH_TXQ_LOCK(&avp->av_mcastq); + + if ((sc->sc_cabq->axq_depth + avp->av_mcastq.axq_depth) > + sc->sc_txq_mcastq_maxdepth) { + sc->sc_stats.ast_tx_mcastq_overflow++; + error = ENOBUFS; + } + + ATH_TXQ_UNLOCK(&avp->av_mcastq); + ATH_TXQ_UNLOCK(sc->sc_cabq); + + if (error != 0) { + m_freem(m); + goto bad; + } + } + /* * Grab a TX buffer and associated resources. */ Modified: head/sys/dev/ath/if_athioctl.h ============================================================================== --- head/sys/dev/ath/if_athioctl.h Sat Mar 10 04:02:52 2012 (r232763) +++ head/sys/dev/ath/if_athioctl.h Sat Mar 10 04:14:04 2012 (r232764) @@ -155,7 +155,8 @@ struct ath_stats { u_int32_t ast_rx_intr; u_int32_t ast_tx_aggr_ok; /* aggregate TX ok */ u_int32_t ast_tx_aggr_fail; /* aggregate TX failed */ - u_int32_t ast_pad[2]; + u_int32_t ast_tx_mcastq_overflow; /* multicast queue overflow */ + u_int32_t ast_pad[1]; }; #define SIOCGATHSTATS _IOWR('i', 137, struct ifreq) Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Sat Mar 10 04:02:52 2012 (r232763) +++ head/sys/dev/ath/if_athvar.h Sat Mar 10 04:14:04 2012 (r232764) @@ -530,6 +530,31 @@ struct ath_softc { int sc_txchainmask; /* currently configured TX chainmask */ int sc_rxchainmask; /* currently configured RX chainmask */ + /* Queue limits */ + + /* + * To avoid queue starvation in congested conditions, + * these parameters tune the maximum number of frames + * queued to the data/mcastq before they're dropped. + * + * This is to prevent: + * + a single destination overwhelming everything, including + * management/multicast frames; + * + multicast frames overwhelming everything (when the + * air is sufficiently busy that cabq can't drain.) + * + * These implement: + * + data_minfree is the maximum number of free buffers + * overall to successfully allow a data frame. + * + * + mcastq_maxdepth is the maximum depth allowe dof the avp+cabq + * queue. The avp is included in each comparison just to be + * a little overly conservative and this may end up being + * unhelpful with multiple VAPs. + */ + int sc_txq_data_minfree; + int sc_txq_mcastq_maxdepth; + /* * Aggregation twiddles * From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 05:38:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BBB54106566B; Sat, 10 Mar 2012 05:38:04 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AA8848FC14; Sat, 10 Mar 2012 05:38:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2A5c4HX041838; Sat, 10 Mar 2012 05:38:04 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2A5c4XF041836; Sat, 10 Mar 2012 05:38:04 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203100538.q2A5c4XF041836@svn.freebsd.org> From: Juli Mallett Date: Sat, 10 Mar 2012 05:38:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232765 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 05:38:04 -0000 Author: jmallett Date: Sat Mar 10 05:38:04 2012 New Revision: 232765 URL: http://svn.freebsd.org/changeset/base/232765 Log: o) Bump INTRCOUNT_COUNT to 256, since Octeon already has >128. XXX It would be good to use a better way to size intrcnt. o) Fix literal 4s that are supposed to be sizeof (u_long). XXX Why the * 2 here? Is this an artifact of a different system that this code came from? We seem to allocate twice as much space for intrcnt as we admit to in sintrcnt. Modified: head/sys/mips/mips/exception.S Modified: head/sys/mips/mips/exception.S ============================================================================== --- head/sys/mips/mips/exception.S Sat Mar 10 04:14:04 2012 (r232764) +++ head/sys/mips/mips/exception.S Sat Mar 10 05:38:04 2012 (r232765) @@ -71,7 +71,7 @@ /* * Reasonable limit */ -#define INTRCNT_COUNT 128 +#define INTRCNT_COUNT 256 /* @@ -1188,14 +1188,14 @@ sintrnames: .int INTRCNT_COUNT * (MAXCOMLEN + 1) * 2 #endif - .align 4 + .align (_MIPS_SZLONG / 8) intrcnt: - .space INTRCNT_COUNT * 4 * 2 + .space INTRCNT_COUNT * (_MIPS_SZLONG / 8) * 2 sintrcnt: #ifdef __mips_n64 - .quad INTRCNT_COUNT * 4 * 2 + .quad INTRCNT_COUNT * (_MIPS_SZLONG / 8) * 2 #else - .int INTRCNT_COUNT * 4 * 2 + .int INTRCNT_COUNT * (_MIPS_SZLONG / 8) * 2 #endif From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 06:12:14 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7410106568B; Sat, 10 Mar 2012 06:12:14 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A5EE48FC15; Sat, 10 Mar 2012 06:12:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2A6CEb0042892; Sat, 10 Mar 2012 06:12:14 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2A6CE1I042889; Sat, 10 Mar 2012 06:12:14 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201203100612.q2A6CE1I042889@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 10 Mar 2012 06:12:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232766 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 06:12:14 -0000 Author: yongari Date: Sat Mar 10 06:12:14 2012 New Revision: 232766 URL: http://svn.freebsd.org/changeset/base/232766 Log: After r232403, DMA transactions does not cross 4GB boundary for all PCI devices. Remove driver workaround for 4GB boundary issue. Modified: head/sys/dev/bge/if_bge.c head/sys/dev/bge/if_bgereg.h Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Sat Mar 10 05:38:04 2012 (r232765) +++ head/sys/dev/bge/if_bge.c Sat Mar 10 06:12:14 2012 (r232766) @@ -2457,14 +2457,10 @@ bge_dma_ring_alloc(struct bge_softc *sc, bus_addr_t *paddr, const char *msg) { struct bge_dmamap_arg ctx; - bus_addr_t lowaddr; - bus_size_t ring_end; int error; - lowaddr = BUS_SPACE_MAXADDR; -again: error = bus_dma_tag_create(sc->bge_cdata.bge_parent_tag, - alignment, 0, lowaddr, BUS_SPACE_MAXADDR, NULL, + alignment, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, maxsize, 1, maxsize, 0, NULL, NULL, tag); if (error != 0) { device_printf(sc->bge_dev, @@ -2489,25 +2485,6 @@ again: return (ENOMEM); } *paddr = ctx.bge_busaddr; - ring_end = *paddr + maxsize; - if ((sc->bge_flags & BGE_FLAG_4G_BNDRY_BUG) != 0 && - BGE_ADDR_HI(*paddr) != BGE_ADDR_HI(ring_end)) { - /* - * 4GB boundary crossed. Limit maximum allowable DMA - * address space to 32bit and try again. - */ - bus_dmamap_unload(*tag, *map); - bus_dmamem_free(*tag, *ring, *map); - bus_dma_tag_destroy(*tag); - if (bootverbose) - device_printf(sc->bge_dev, "4GB boundary crossed, " - "limit DMA address space to 32bit for %s\n", msg); - *ring = NULL; - *tag = NULL; - *map = NULL; - lowaddr = BUS_SPACE_MAXADDR_32BIT; - goto again; - } return (0); } @@ -2515,7 +2492,7 @@ static int bge_dma_alloc(struct bge_softc *sc) { bus_addr_t lowaddr; - bus_size_t boundary, sbsz, rxmaxsegsz, txsegsz, txmaxsegsz; + bus_size_t rxmaxsegsz, sbsz, txsegsz, txmaxsegsz; int i, error; lowaddr = BUS_SPACE_MAXADDR; @@ -2602,9 +2579,7 @@ bge_dma_alloc(struct bge_softc *sc) } /* Create parent tag for buffers. */ - boundary = 0; if ((sc->bge_flags & BGE_FLAG_4G_BNDRY_BUG) != 0) { - boundary = BGE_DMA_BNDRY; /* * XXX * watchdog timeout issue was observed on BCM5704 which @@ -2615,10 +2590,10 @@ bge_dma_alloc(struct bge_softc *sc) if (sc->bge_flags & BGE_FLAG_PCIX) lowaddr = BUS_SPACE_MAXADDR_32BIT; } - error = bus_dma_tag_create(bus_get_dma_tag(sc->bge_dev), - 1, boundary, lowaddr, BUS_SPACE_MAXADDR, NULL, - NULL, BUS_SPACE_MAXSIZE_32BIT, 0, BUS_SPACE_MAXSIZE_32BIT, - 0, NULL, NULL, &sc->bge_cdata.bge_buffer_tag); + error = bus_dma_tag_create(bus_get_dma_tag(sc->bge_dev), 1, 0, lowaddr, + BUS_SPACE_MAXADDR, NULL, NULL, BUS_SPACE_MAXSIZE_32BIT, 0, + BUS_SPACE_MAXSIZE_32BIT, 0, NULL, NULL, + &sc->bge_cdata.bge_buffer_tag); if (error != 0) { device_printf(sc->bge_dev, "could not allocate buffer dma tag\n"); Modified: head/sys/dev/bge/if_bgereg.h ============================================================================== --- head/sys/dev/bge/if_bgereg.h Sat Mar 10 05:38:04 2012 (r232765) +++ head/sys/dev/bge/if_bgereg.h Sat Mar 10 06:12:14 2012 (r232766) @@ -2691,12 +2691,6 @@ struct bge_gib { #define BGE_DMA_MAXADDR 0xFFFFFFFFFF #endif -#if (BUS_SPACE_MAXADDR > 0xFFFFFFFF) -#define BGE_DMA_BNDRY 0x100000000 -#else -#define BGE_DMA_BNDRY 0 -#endif - /* * Ring structures. Most of these reside in host memory and we tell * the NIC where they are via the ring control blocks. The exceptions From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 06:31:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E3E61065672; Sat, 10 Mar 2012 06:31:29 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F17708FC0C; Sat, 10 Mar 2012 06:31:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2A6VSpi043549; Sat, 10 Mar 2012 06:31:28 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2A6VS0t043547; Sat, 10 Mar 2012 06:31:28 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203100631.q2A6VS0t043547@svn.freebsd.org> From: Juli Mallett Date: Sat, 10 Mar 2012 06:31:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232767 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 06:31:29 -0000 Author: jmallett Date: Sat Mar 10 06:31:28 2012 New Revision: 232767 URL: http://svn.freebsd.org/changeset/base/232767 Log: Reduce diffs with freebsd32_sysarch. Modified: head/sys/mips/mips/sys_machdep.c Modified: head/sys/mips/mips/sys_machdep.c ============================================================================== --- head/sys/mips/mips/sys_machdep.c Sat Mar 10 06:12:14 2012 (r232766) +++ head/sys/mips/mips/sys_machdep.c Sat Mar 10 06:31:28 2012 (r232767) @@ -53,25 +53,21 @@ struct sysarch_args { #endif int -sysarch(td, uap) - struct thread *td; - register struct sysarch_args *uap; +sysarch(struct thread *td, struct sysarch_args *uap) { int error; void *tlsbase; switch (uap->op) { - case MIPS_SET_TLS : - td->td_md.md_tls = (void*)uap->parms; - error = 0; - break; - - case MIPS_GET_TLS : + case MIPS_SET_TLS: + td->td_md.md_tls = uap->parms; + return (0); + case MIPS_GET_TLS: tlsbase = td->td_md.md_tls; error = copyout(&tlsbase, uap->parms, sizeof(tlsbase)); - break; + return (error); default: - error = EINVAL; + break; } - return (error); + return (EINVAL); } From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 06:43:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AB4C1065673; Sat, 10 Mar 2012 06:43:42 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 19F168FC12; Sat, 10 Mar 2012 06:43:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2A6hf67043940; Sat, 10 Mar 2012 06:43:41 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2A6hfEp043938; Sat, 10 Mar 2012 06:43:41 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203100643.q2A6hfEp043938@svn.freebsd.org> From: Juli Mallett Date: Sat, 10 Mar 2012 06:43:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232768 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 06:43:42 -0000 Author: jmallett Date: Sat Mar 10 06:43:41 2012 New Revision: 232768 URL: http://svn.freebsd.org/changeset/base/232768 Log: Don't truncate physical addresses to 32-bits. Modified: head/sys/mips/mips/nexus.c Modified: head/sys/mips/mips/nexus.c ============================================================================== --- head/sys/mips/mips/nexus.c Sat Mar 10 06:31:28 2012 (r232767) +++ head/sys/mips/mips/nexus.c Sat Mar 10 06:43:41 2012 (r232768) @@ -383,11 +383,11 @@ nexus_activate_resource(device_t bus, de struct resource *r) { void *vaddr; - u_int32_t paddr, psize; - + vm_paddr_t paddr; + vm_size_t psize; + /* - * If this is a memory resource, track the direct mapping - * in the uncached MIPS KSEG1 segment. + * If this is a memory resource, use pmap_mapdev to map it. */ if (type == SYS_RES_MEMORY) { paddr = rman_get_start(r); From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 06:45:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2D201106566B; Sat, 10 Mar 2012 06:45:22 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C14F8FC14; Sat, 10 Mar 2012 06:45:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2A6jMaR044069; Sat, 10 Mar 2012 06:45:22 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2A6jLXd044067; Sat, 10 Mar 2012 06:45:22 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203100645.q2A6jLXd044067@svn.freebsd.org> From: Juli Mallett Date: Sat, 10 Mar 2012 06:45:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232769 - in head/sys: conf mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 06:45:22 -0000 Author: jmallett Date: Sat Mar 10 06:45:21 2012 New Revision: 232769 URL: http://svn.freebsd.org/changeset/base/232769 Log: Get rid of mainbus.c. The version in nexus.c is being used and is perfectly-sufficient and equally-crufty. Deleted: head/sys/mips/mips/mainbus.c Modified: head/sys/conf/files.mips Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Sat Mar 10 06:43:41 2012 (r232768) +++ head/sys/conf/files.mips Sat Mar 10 06:45:21 2012 (r232769) @@ -30,7 +30,6 @@ mips/mips/cpu.c standard mips/mips/elf_machdep.c standard mips/mips/exception.S standard mips/mips/gdb_machdep.c standard -# mips/mips/mainbus.c standard mips/mips/pmap.c standard mips/mips/trap.c standard mips/mips/vm_machdep.c standard From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 06:54:37 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8E791065676; Sat, 10 Mar 2012 06:54:37 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8EB0A8FC0C; Sat, 10 Mar 2012 06:54:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2A6sbna044400; Sat, 10 Mar 2012 06:54:37 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2A6sb8s044396; Sat, 10 Mar 2012 06:54:37 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203100654.q2A6sb8s044396@svn.freebsd.org> From: Juli Mallett Date: Sat, 10 Mar 2012 06:54:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232770 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 06:54:37 -0000 Author: jmallett Date: Sat Mar 10 06:54:37 2012 New Revision: 232770 URL: http://svn.freebsd.org/changeset/base/232770 Log: o) Remove some CPU_CNMIPS-related magical thinking about the status register's contents for user programs. o) Conditionalize the installation of an XTLB handler on ABI, not CPU family. Modified: head/sys/mips/mips/machdep.c head/sys/mips/mips/pm_machdep.c head/sys/mips/mips/vm_machdep.c Modified: head/sys/mips/mips/machdep.c ============================================================================== --- head/sys/mips/mips/machdep.c Sat Mar 10 06:45:21 2012 (r232769) +++ head/sys/mips/mips/machdep.c Sat Mar 10 06:54:37 2012 (r232770) @@ -347,8 +347,7 @@ mips_vector_init(void) bcopy(MipsTLBMiss, (void *)MIPS_UTLB_MISS_EXC_VEC, MipsTLBMissEnd - MipsTLBMiss); -#if defined(CPU_CNMIPS) || defined(CPU_RMI) || defined(CPU_NLM) -/* Fake, but sufficient, for the 32-bit with 64-bit hardware addresses */ +#ifdef __mips_n64 bcopy(MipsTLBMiss, (void *)MIPS_XTLB_MISS_EXC_VEC, MipsTLBMissEnd - MipsTLBMiss); #endif Modified: head/sys/mips/mips/pm_machdep.c ============================================================================== --- head/sys/mips/mips/pm_machdep.c Sat Mar 10 06:45:21 2012 (r232769) +++ head/sys/mips/mips/pm_machdep.c Sat Mar 10 06:54:37 2012 (r232770) @@ -491,10 +491,6 @@ exec_setregs(struct thread *td, struct i #elif defined(__mips_n64) td->td_frame->sr |= MIPS_SR_PX | MIPS_SR_UX | MIPS_SR_KX; #endif -#ifdef CPU_CNMIPS - td->td_frame->sr |= MIPS_SR_PX | MIPS_SR_UX | - MIPS_SR_KX | MIPS_SR_SX; -#endif /* * FREEBSD_DEVELOPERS_FIXME: * Setup any other CPU-Specific registers (Not MIPS Standard) Modified: head/sys/mips/mips/vm_machdep.c ============================================================================== --- head/sys/mips/mips/vm_machdep.c Sat Mar 10 06:45:21 2012 (r232769) +++ head/sys/mips/mips/vm_machdep.c Sat Mar 10 06:54:37 2012 (r232770) @@ -406,12 +406,7 @@ cpu_set_upcall(struct thread *td, struct pcb2->pcb_context[PCB_REG_S2] = (register_t)(intptr_t)td->td_frame; /* Dont set IE bit in SR. sched lock release will take care of it */ pcb2->pcb_context[PCB_REG_SR] = mips_rd_status() & - (MIPS_SR_KX | MIPS_SR_UX | MIPS_SR_INT_MASK); - -#ifdef CPU_CNMIPS - pcb2->pcb_context[PCB_REG_SR] |= MIPS_SR_COP_0_BIT | - MIPS_SR_PX | MIPS_SR_UX | MIPS_SR_KX | MIPS_SR_SX; -#endif + (MIPS_SR_PX | MIPS_SR_KX | MIPS_SR_UX | MIPS_SR_INT_MASK); /* * FREEBSD_DEVELOPERS_FIXME: @@ -475,10 +470,6 @@ cpu_set_upcall_kse(struct thread *td, vo #elif defined(__mips_n64) td->td_frame->sr |= MIPS_SR_PX | MIPS_SR_UX | MIPS_SR_KX; #endif -#ifdef CPU_CNMIPS - tf->sr |= MIPS_SR_INT_IE | MIPS_SR_COP_0_BIT | MIPS_SR_PX | MIPS_SR_UX | - MIPS_SR_KX; -#endif /* tf->sr |= (ALL_INT_MASK & idle_mask) | SR_INT_ENAB; */ /**XXX the above may now be wrong -- mips2 implements this as panic */ /* From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 07:54:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 38F02106566C; Sat, 10 Mar 2012 07:54:42 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 282648FC1A; Sat, 10 Mar 2012 07:54:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2A7sgZG046246; Sat, 10 Mar 2012 07:54:42 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2A7sgHC046244; Sat, 10 Mar 2012 07:54:42 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203100754.q2A7sgHC046244@svn.freebsd.org> From: Juli Mallett Date: Sat, 10 Mar 2012 07:54:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232773 - head/sys/mips/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 07:54:42 -0000 Author: jmallett Date: Sat Mar 10 07:54:41 2012 New Revision: 232773 URL: http://svn.freebsd.org/changeset/base/232773 Log: Use ABI to determine bus_addr_t for cnMIPS. Modified: head/sys/mips/include/_bus.h Modified: head/sys/mips/include/_bus.h ============================================================================== --- head/sys/mips/include/_bus.h Sat Mar 10 07:09:05 2012 (r232772) +++ head/sys/mips/include/_bus.h Sat Mar 10 07:54:41 2012 (r232773) @@ -35,7 +35,7 @@ * Bus address and size types */ #include "opt_cputype.h" -#if !(defined(CPU_CNMIPS) && defined(ISA_MIPS32)) +#if defined(CPU_CNMIPS) && !defined(__mips_n64) typedef uintptr_t bus_addr_t; #else typedef uint64_t bus_addr_t; From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 08:25:49 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB8E8106564A; Sat, 10 Mar 2012 08:25:49 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CA3E08FC0A; Sat, 10 Mar 2012 08:25:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2A8Pn9B047309; Sat, 10 Mar 2012 08:25:49 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2A8PndK047307; Sat, 10 Mar 2012 08:25:49 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201203100825.q2A8PndK047307@svn.freebsd.org> From: Jaakko Heinonen Date: Sat, 10 Mar 2012 08:25:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232774 - stable/9/usr.sbin/wake X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 08:25:50 -0000 Author: jh Date: Sat Mar 10 08:25:49 2012 New Revision: 232774 URL: http://svn.freebsd.org/changeset/base/232774 Log: MFC r232101: style(9). Modified: stable/9/usr.sbin/wake/wake.c Directory Properties: stable/9/usr.sbin/wake/ (props changed) Modified: stable/9/usr.sbin/wake/wake.c ============================================================================== --- stable/9/usr.sbin/wake/wake.c Sat Mar 10 07:54:41 2012 (r232773) +++ stable/9/usr.sbin/wake/wake.c Sat Mar 10 08:25:49 2012 (r232774) @@ -78,7 +78,7 @@ wake(int bpf, const char *host) if (get_ether(host, &macaddr) == -1) return (-1); - return send_wakeup(bpf, &macaddr); + return (send_wakeup(bpf, &macaddr)); } static int @@ -111,10 +111,10 @@ find_ether(char *dst, size_t len) int nifs; if (dst == NULL || len == 0) - return 0; + return (0); if (getifaddrs(&ifap) != 0) - return -1; + return (-1); /* XXX also check the link state */ for (nifs = 0, ifa = ifap; ifa; ifa = ifa->ifa_next) @@ -128,7 +128,7 @@ find_ether(char *dst, size_t len) } freeifaddrs(ifap); - return nifs == 1 ? 0 : -1; + return (nifs == 1 ? 0 : -1); } static int From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 08:27:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 014E8106564A; Sat, 10 Mar 2012 08:27:38 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E43CA8FC0C; Sat, 10 Mar 2012 08:27:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2A8RbTx047412; Sat, 10 Mar 2012 08:27:37 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2A8Rbwi047410; Sat, 10 Mar 2012 08:27:37 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201203100827.q2A8Rbwi047410@svn.freebsd.org> From: Jaakko Heinonen Date: Sat, 10 Mar 2012 08:27:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232775 - stable/9/usr.sbin/wake X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 08:27:38 -0000 Author: jh Date: Sat Mar 10 08:27:37 2012 New Revision: 232775 URL: http://svn.freebsd.org/changeset/base/232775 Log: MFC r232102: Exit with proper status when wake() fails. PR: bin/153527 Modified: stable/9/usr.sbin/wake/wake.c Directory Properties: stable/9/usr.sbin/wake/ (props changed) Modified: stable/9/usr.sbin/wake/wake.c ============================================================================== --- stable/9/usr.sbin/wake/wake.c Sat Mar 10 08:25:49 2012 (r232774) +++ stable/9/usr.sbin/wake/wake.c Sat Mar 10 08:27:37 2012 (r232775) @@ -183,7 +183,7 @@ send_wakeup(int bpf, struct ether_addr c int main(int argc, char *argv[]) { - int bpf, n; + int bpf, n, rval; char ifname[IF_NAMESIZE]; if (argc < 2) @@ -204,10 +204,13 @@ main(int argc, char *argv[]) if (n >= argc) usage(); - for (; n < argc; n++) - if (wake(bpf, argv[n])) + rval = 0; + for (; n < argc; n++) { + if (wake(bpf, argv[n]) != 0) { + rval = 1; warn("Cannot send Wake on LAN frame over `%s' to `%s'", ifname, argv[n]); - - return (0); + } + } + exit(rval); } From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 08:48:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FC25106566C; Sat, 10 Mar 2012 08:48:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F4398FC0C; Sat, 10 Mar 2012 08:48:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2A8mqwd048116; Sat, 10 Mar 2012 08:48:52 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2A8mqLp048114; Sat, 10 Mar 2012 08:48:52 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203100848.q2A8mqLp048114@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 10 Mar 2012 08:48:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232776 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 08:48:52 -0000 Author: kib Date: Sat Mar 10 08:48:52 2012 New Revision: 232776 URL: http://svn.freebsd.org/changeset/base/232776 Log: Add brackets around bare '-1' used as the macro body. Noted by: bde MFC after: 1 week Modified: head/sys/sys/unistd.h Modified: head/sys/sys/unistd.h ============================================================================== --- head/sys/sys/unistd.h Sat Mar 10 08:27:37 2012 (r232775) +++ head/sys/sys/unistd.h Sat Mar 10 08:48:52 2012 (r232776) @@ -52,34 +52,34 @@ #define _POSIX_ADVISORY_INFO 200112L #define _POSIX_ASYNCHRONOUS_IO 0 #define _POSIX_CHOWN_RESTRICTED 1 -#define _POSIX_CLOCK_SELECTION -1 -#define _POSIX_CPUTIME -1 +#define _POSIX_CLOCK_SELECTION (-1) +#define _POSIX_CPUTIME (-1) #define _POSIX_FSYNC 200112L #define _POSIX_IPV6 0 #define _POSIX_JOB_CONTROL 1 #define _POSIX_MAPPED_FILES 200112L -#define _POSIX_MEMLOCK -1 +#define _POSIX_MEMLOCK (-1) #define _POSIX_MEMLOCK_RANGE 200112L #define _POSIX_MEMORY_PROTECTION 200112L #define _POSIX_MESSAGE_PASSING 200112L #define _POSIX_MONOTONIC_CLOCK 200112L #define _POSIX_NO_TRUNC 1 -#define _POSIX_PRIORITIZED_IO -1 +#define _POSIX_PRIORITIZED_IO (-1) #define _POSIX_PRIORITY_SCHEDULING 200112L #define _POSIX_RAW_SOCKETS 200112L #define _POSIX_REALTIME_SIGNALS 200112L #define _POSIX_SEMAPHORES 200112L #define _POSIX_SHARED_MEMORY_OBJECTS 200112L -#define _POSIX_SPORADIC_SERVER -1 -#define _POSIX_SYNCHRONIZED_IO -1 +#define _POSIX_SPORADIC_SERVER (-1) +#define _POSIX_SYNCHRONIZED_IO (-1) #define _POSIX_TIMEOUTS 200112L #define _POSIX_TIMERS 200112L -#define _POSIX_TYPED_MEMORY_OBJECTS -1 +#define _POSIX_TYPED_MEMORY_OBJECTS (-1) #define _POSIX_VDISABLE 0xff #if __XSI_VISIBLE #define _XOPEN_SHM 1 -#define _XOPEN_STREAMS -1 +#define _XOPEN_STREAMS (-1) #endif /* From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 08:49:45 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EA25106566C; Sat, 10 Mar 2012 08:49:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 448378FC1A; Sat, 10 Mar 2012 08:49:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2A8njeC048176; Sat, 10 Mar 2012 08:49:45 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2A8njJb048174; Sat, 10 Mar 2012 08:49:45 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203100849.q2A8njJb048174@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 10 Mar 2012 08:49:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232777 - head/libexec/rtld-elf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 08:49:45 -0000 Author: kib Date: Sat Mar 10 08:49:44 2012 New Revision: 232777 URL: http://svn.freebsd.org/changeset/base/232777 Log: Optimize tls_get_addr_common(). The change provides around 30% speedup for TLS microbenchmark using global-dynamic TLS model on amd64 (which is default for PIC dso objects). Split the slow path into tls_get_addr_slow(), for which inlining is disabled. This prevents the registers spill on tls_get_addr_common() entry. Provide static branch hint to the compiler, indicating that slow path is not likely to be taken. While there, do some minimal style adjustments. Reported and tested by: davidxu MFC after: 1 week Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Sat Mar 10 08:48:52 2012 (r232776) +++ head/libexec/rtld-elf/rtld.c Sat Mar 10 08:49:44 2012 (r232777) @@ -3507,17 +3507,17 @@ unref_dag(Obj_Entry *root) /* * Common code for MD __tls_get_addr(). */ -void * -tls_get_addr_common(Elf_Addr** dtvp, int index, size_t offset) +static void *tls_get_addr_slow(Elf_Addr **, int, size_t) __noinline; +static void * +tls_get_addr_slow(Elf_Addr **dtvp, int index, size_t offset) { - Elf_Addr* dtv = *dtvp; + Elf_Addr *newdtv, *dtv; RtldLockState lockstate; + int to_copy; + dtv = *dtvp; /* Check dtv generation in case new modules have arrived */ if (dtv[0] != tls_dtv_generation) { - Elf_Addr* newdtv; - int to_copy; - wlock_acquire(rtld_bind_lock, &lockstate); newdtv = calloc(1, (tls_max_index + 2) * sizeof(Elf_Addr)); to_copy = dtv[1]; @@ -3532,14 +3532,27 @@ tls_get_addr_common(Elf_Addr** dtvp, int } /* Dynamically allocate module TLS if necessary */ - if (!dtv[index + 1]) { + if (dtv[index + 1] == 0) { /* Signal safe, wlock will block out signals. */ - wlock_acquire(rtld_bind_lock, &lockstate); + wlock_acquire(rtld_bind_lock, &lockstate); if (!dtv[index + 1]) dtv[index + 1] = (Elf_Addr)allocate_module_tls(index); lock_release(rtld_bind_lock, &lockstate); } - return (void*) (dtv[index + 1] + offset); + return ((void *)(dtv[index + 1] + offset)); +} + +void * +tls_get_addr_common(Elf_Addr **dtvp, int index, size_t offset) +{ + Elf_Addr *dtv; + + dtv = *dtvp; + /* Check dtv generation in case new modules have arrived */ + if (__predict_true(dtv[0] == tls_dtv_generation && + dtv[index + 1] != 0)) + return ((void *)(dtv[index + 1] + offset)); + return (tls_get_addr_slow(dtvp, index, offset)); } #if defined(__arm__) || defined(__ia64__) || defined(__mips__) || defined(__powerpc__) From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 09:09:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DE158106566B; Sat, 10 Mar 2012 09:09:58 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id BA3988FC0A; Sat, 10 Mar 2012 09:09:58 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 2E70646B3B; Sat, 10 Mar 2012 04:09:58 -0500 (EST) Date: Sat, 10 Mar 2012 09:09:57 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Juli Mallett In-Reply-To: <201203100654.q2A6sb8s044396@svn.freebsd.org> Message-ID: References: <201203100654.q2A6sb8s044396@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232770 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 09:09:59 -0000 On Sat, 10 Mar 2012, Juli Mallett wrote: > Log: > o) Remove some CPU_CNMIPS-related magical thinking about the status register's > contents for user programs. > o) Conditionalize the installation of an XTLB handler on ABI, not CPU family. This all makes the FreeBSD/CHERI port much more sensible, thanks for doing this cleanup! Robert From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 10:54:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADAD9106566B; Sat, 10 Mar 2012 10:54:52 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C9438FC08; Sat, 10 Mar 2012 10:54:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2AAsqlp053369; Sat, 10 Mar 2012 10:54:52 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2AAsqRV053366; Sat, 10 Mar 2012 10:54:52 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201203101054.q2AAsqRV053366@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 10 Mar 2012 10:54:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232778 - head/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 10:54:52 -0000 Author: trasz Date: Sat Mar 10 10:54:52 2012 New Revision: 232778 URL: http://svn.freebsd.org/changeset/base/232778 Log: Cross-reference sigqueue(2) and kill(2). Modified: head/lib/libc/sys/kill.2 head/lib/libc/sys/sigqueue.2 Modified: head/lib/libc/sys/kill.2 ============================================================================== --- head/lib/libc/sys/kill.2 Sat Mar 10 08:49:44 2012 (r232777) +++ head/lib/libc/sys/kill.2 Sat Mar 10 10:54:52 2012 (r232778) @@ -28,7 +28,7 @@ .\" @(#)kill.2 8.3 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd April 19, 1994 +.Dd March 10, 2012 .Dt KILL 2 .Os .Sh NAME @@ -137,6 +137,7 @@ of the group could not be signaled. .Xr getpid 2 , .Xr killpg 2 , .Xr sigaction 2 , +.Xr sigqueue 2 , .Xr raise 3 , .Xr init 8 .Sh STANDARDS Modified: head/lib/libc/sys/sigqueue.2 ============================================================================== --- head/lib/libc/sys/sigqueue.2 Sat Mar 10 08:49:44 2012 (r232777) +++ head/lib/libc/sys/sigqueue.2 Sat Mar 10 10:54:52 2012 (r232778) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 11, 2005 +.Dd March 10, 2012 .Dt SIGQUEUE 2 .Os .Sh NAME @@ -126,6 +126,7 @@ The process does not exist. .El .Sh SEE ALSO +.Xr kill 2 , .Xr sigaction 2 , .Xr sigpending 2 , .Xr sigqueue 2 , From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 11:25:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 88B08106564A; Sat, 10 Mar 2012 11:25:54 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 777748FC13; Sat, 10 Mar 2012 11:25:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2ABPs1w054320; Sat, 10 Mar 2012 11:25:54 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2ABPsX4054317; Sat, 10 Mar 2012 11:25:54 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201203101125.q2ABPsX4054317@svn.freebsd.org> From: Gavin Atkinson Date: Sat, 10 Mar 2012 11:25:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232779 - head/contrib/tnftp/src X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 11:25:54 -0000 Author: gavin Date: Sat Mar 10 11:25:53 2012 New Revision: 232779 URL: http://svn.freebsd.org/changeset/base/232779 Log: Move determination of socket buffer sizes from startup to the first time a socket is used. The previous code structure assumed that AF_INET sockets were always available, which is an invalid assumption on IPv6-only systems. This merges the fololowing revisions from NetBSD: src/usr.bin/ftp/main.c 1.120 src/usr.bin/ftp/util.c 1.156 PR: bin/162661 Tested by: bz Obtained from: NetBSD MFC after: 1 week Modified: head/contrib/tnftp/src/main.c head/contrib/tnftp/src/util.c Modified: head/contrib/tnftp/src/main.c ============================================================================== --- head/contrib/tnftp/src/main.c Sat Mar 10 10:54:52 2012 (r232778) +++ head/contrib/tnftp/src/main.c Sat Mar 10 11:25:53 2012 (r232779) @@ -146,9 +146,8 @@ main(int volatile argc, char **volatile struct passwd *pw; char *cp, *ep, *anonpass, *upload_path, *src_addr; const char *anonuser; - int dumbterm, s, isupload; + int dumbterm, isupload; size_t len; - socklen_t slen; tzset(); #if 0 /* tnftp */ /* XXX */ @@ -213,35 +212,6 @@ main(int volatile argc, char **volatile if (cp != NULL && strlcpy(netrc, cp, sizeof(netrc)) >= sizeof(netrc)) errx(1, "$NETRC `%s': %s", cp, strerror(ENAMETOOLONG)); - /* - * Get the default socket buffer sizes if we don't already have them. - * It doesn't matter which socket we do this to, because on the first - * call no socket buffer sizes will have been modified, so we are - * guaranteed to get the system defaults. - */ - s = socket(AF_INET, SOCK_STREAM, 0); - if (s == -1) - err(1, "Can't create socket to determine default socket sizes"); - slen = sizeof(rcvbuf_size); - if (getsockopt(s, SOL_SOCKET, SO_RCVBUF, - (void *)&rcvbuf_size, &slen) == -1) - err(1, "Unable to get default rcvbuf size"); - slen = sizeof(sndbuf_size); - if (getsockopt(s, SOL_SOCKET, SO_SNDBUF, - (void *)&sndbuf_size, &slen) == -1) - err(1, "Unable to get default sndbuf size"); - (void)close(s); - /* sanity check returned buffer sizes */ - if (rcvbuf_size <= 0) - rcvbuf_size = 8 * 1024; - if (sndbuf_size <= 0) - sndbuf_size = 8 * 1024; - - if (sndbuf_size > 8 * 1024 * 1024) - sndbuf_size = 8 * 1024 * 1024; - if (rcvbuf_size > 8 * 1024 * 1024) - rcvbuf_size = 8 * 1024 * 1024; - marg_sl = ftp_sl_init(); if ((tmpdir = getenv("TMPDIR")) == NULL) tmpdir = _PATH_TMP; Modified: head/contrib/tnftp/src/util.c ============================================================================== --- head/contrib/tnftp/src/util.c Sat Mar 10 10:54:52 2012 (r232778) +++ head/contrib/tnftp/src/util.c Sat Mar 10 11:25:53 2012 (r232779) @@ -1060,6 +1060,32 @@ strsuftoi(const char *arg) void setupsockbufsize(int sock) { + socklen_t slen; + + if (0 == rcvbuf_size) { + slen = sizeof(rcvbuf_size); + if (getsockopt(sock, SOL_SOCKET, SO_RCVBUF, + (void *)&rcvbuf_size, &slen) == -1) + err(1, "Unable to determine rcvbuf size"); + if (rcvbuf_size <= 0) + rcvbuf_size = 8 * 1024; + if (rcvbuf_size > 8 * 1024 * 1024) + rcvbuf_size = 8 * 1024 * 1024; + DPRINTF("setupsockbufsize: rcvbuf_size determined as %d\n", + rcvbuf_size); + } + if (0 == sndbuf_size) { + slen = sizeof(sndbuf_size); + if (getsockopt(sock, SOL_SOCKET, SO_SNDBUF, + (void *)&sndbuf_size, &slen) == -1) + err(1, "Unable to determine sndbuf size"); + if (sndbuf_size <= 0) + sndbuf_size = 8 * 1024; + if (sndbuf_size > 8 * 1024 * 1024) + sndbuf_size = 8 * 1024 * 1024; + DPRINTF("setupsockbufsize: sndbuf_size determined as %d\n", + sndbuf_size); + } if (setsockopt(sock, SOL_SOCKET, SO_SNDBUF, (void *)&sndbuf_size, sizeof(sndbuf_size)) == -1) From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 14:35:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 461A5106564A; Sat, 10 Mar 2012 14:35:10 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 306E28FC12; Sat, 10 Mar 2012 14:35:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2AEZAVd060231; Sat, 10 Mar 2012 14:35:10 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2AEZ9Em060229; Sat, 10 Mar 2012 14:35:09 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201203101435.q2AEZ9Em060229@svn.freebsd.org> From: Ed Schouten Date: Sat, 10 Mar 2012 14:35:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232780 - head/usr.sbin/watch X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 14:35:10 -0000 Author: ed Date: Sat Mar 10 14:35:09 2012 New Revision: 232780 URL: http://svn.freebsd.org/changeset/base/232780 Log: Fix whitespace. MFC after: 1 week Modified: head/usr.sbin/watch/watch.c Modified: head/usr.sbin/watch/watch.c ============================================================================== --- head/usr.sbin/watch/watch.c Sat Mar 10 11:25:53 2012 (r232779) +++ head/usr.sbin/watch/watch.c Sat Mar 10 14:35:09 2012 (r232780) @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #define MSG_CHANGE "Snoop device change by user request." #define MSG_NOWRITE "Snoop device change due to write failure." - #define DEV_NAME_LEN 1024 /* for /dev/ttyXX++ */ #define MIN_SIZE 256 @@ -65,27 +64,26 @@ static void detach_snp(void); static void set_dev(const char *); static void ask_dev(char *, const char *); -int opt_reconn_close = 0; -int opt_reconn_oflow = 0; -int opt_interactive = 1; -int opt_timestamp = 0; +int opt_reconn_close = 0; +int opt_reconn_oflow = 0; +int opt_interactive = 1; +int opt_timestamp = 0; int opt_write = 0; int opt_no_switch = 0; const char *opt_snpdev; -char dev_name[DEV_NAME_LEN]; -int snp_io; -int std_in = 0, std_out = 1; - - -int clear_ok = 0; -struct termios otty; -char tbuf[1024], gbuf[1024]; - +char dev_name[DEV_NAME_LEN]; +int snp_io; +int std_in = 0, std_out = 1; + +int clear_ok = 0; +struct termios otty; +char tbuf[1024], gbuf[1024]; static void clear(void) { + if (clear_ok) tputs(gbuf, 1, putchar); fflush(stdout); @@ -94,8 +92,9 @@ clear(void) static void timestamp(const char *buf) { - time_t t; - char btmp[1024]; + time_t t; + char btmp[1024]; + clear(); printf("\n---------------------------------------------\n"); t = time(NULL); @@ -109,11 +108,11 @@ timestamp(const char *buf) static void set_tty(void) { - struct termios ntty; + struct termios ntty; tcgetattr (std_in, &otty); ntty = otty; - ntty.c_lflag &= ~ICANON; /* disable canonical operation */ + ntty.c_lflag &= ~ICANON; /* disable canonical operation */ ntty.c_lflag &= ~ECHO; #ifdef FLUSHO ntty.c_lflag &= ~FLUSHO; @@ -124,11 +123,11 @@ set_tty(void) #ifdef IEXTEN ntty.c_lflag &= ~IEXTEN; #endif - ntty.c_cc[VMIN] = 1; /* minimum of one character */ - ntty.c_cc[VTIME] = 0; /* timeout value */ + ntty.c_cc[VMIN] = 1; /* minimum of one character */ + ntty.c_cc[VTIME] = 0; /* timeout value */ - ntty.c_cc[VINTR] = 07; /* ^G */ - ntty.c_cc[VQUIT] = 07; /* ^G */ + ntty.c_cc[VINTR] = 07; /* ^G */ + ntty.c_cc[VQUIT] = 07; /* ^G */ tcsetattr (std_in, TCSANOW, &ntty); } @@ -138,7 +137,6 @@ unset_tty(void) tcsetattr (std_in, TCSANOW, &otty); } - static void fatal(int error, const char *buf) { @@ -169,7 +167,6 @@ open_snp(void) return (f); } - static void cleanup(int signo __unused) { @@ -180,7 +177,6 @@ cleanup(int signo __unused) exit(EX_OK); } - static void usage(void) { @@ -191,7 +187,8 @@ usage(void) static void setup_scr(void) { - char *cbuf = gbuf, *term; + char *cbuf = gbuf, *term; + if (!opt_interactive) return; if ((term = getenv("TERM"))) @@ -226,11 +223,10 @@ attach_snp(void) timestamp("Logging Started."); } - static void set_dev(const char *name) { - char buf[DEV_NAME_LEN]; + char buf[DEV_NAME_LEN]; struct stat sb; if (strlen(name) > 5 && !strncmp(name, _PATH_DEV, sizeof _PATH_DEV - 1)) { @@ -256,8 +252,8 @@ set_dev(const char *name) void ask_dev(char *dbuf, const char *msg) { - char buf[DEV_NAME_LEN]; - int len; + char buf[DEV_NAME_LEN]; + int len; clear(); unset_tty(); @@ -284,10 +280,10 @@ ask_dev(char *dbuf, const char *msg) int main(int ac, char *av[]) { - int ch, res, rv, nread; + int ch, res, rv, nread; size_t b_size = MIN_SIZE; - char *buf, chb[READB_LEN]; - fd_set fd_s; + char *buf, chb[READB_LEN]; + fd_set fd_s; (void) setlocale(LC_TIME, ""); @@ -296,7 +292,6 @@ main(int ac, char *av[]) else opt_interactive = 0; - while ((ch = getopt(ac, av, "Wciotnf:")) != -1) switch (ch) { case 'W': @@ -382,7 +377,7 @@ main(int ac, char *av[]) detach_snp(); if (opt_no_switch) fatal(EX_IOERR, - "write failed"); + "write failed"); ask_dev(dev_name, MSG_NOWRITE); set_dev(dev_name); } @@ -439,4 +434,3 @@ main(int ac, char *av[]) } /* While */ return(0); } - From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 14:38:34 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BFD31065670; Sat, 10 Mar 2012 14:38:34 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 87E8F8FC12; Sat, 10 Mar 2012 14:38:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2AEcYdl060367; Sat, 10 Mar 2012 14:38:34 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2AEcYDS060365; Sat, 10 Mar 2012 14:38:34 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201203101438.q2AEcYDS060365@svn.freebsd.org> From: Ed Schouten Date: Sat, 10 Mar 2012 14:38:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232781 - head/usr.sbin/watch X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 14:38:34 -0000 Author: ed Date: Sat Mar 10 14:38:34 2012 New Revision: 232781 URL: http://svn.freebsd.org/changeset/base/232781 Log: Perform even more style changes. - Remove unneeded whitespace for function calls. - Add empty line at the top of functions without local variables. - Change while (1) to for (;;). MFC after: 1 week Modified: head/usr.sbin/watch/watch.c Modified: head/usr.sbin/watch/watch.c ============================================================================== --- head/usr.sbin/watch/watch.c Sat Mar 10 14:35:09 2012 (r232780) +++ head/usr.sbin/watch/watch.c Sat Mar 10 14:38:34 2012 (r232781) @@ -110,7 +110,7 @@ set_tty(void) { struct termios ntty; - tcgetattr (std_in, &otty); + tcgetattr(std_in, &otty); ntty = otty; ntty.c_lflag &= ~ICANON; /* disable canonical operation */ ntty.c_lflag &= ~ECHO; @@ -128,18 +128,20 @@ set_tty(void) ntty.c_cc[VINTR] = 07; /* ^G */ ntty.c_cc[VQUIT] = 07; /* ^G */ - tcsetattr (std_in, TCSANOW, &ntty); + tcsetattr(std_in, TCSANOW, &ntty); } static void unset_tty(void) { - tcsetattr (std_in, TCSANOW, &otty); + + tcsetattr(std_in, TCSANOW, &otty); } static void fatal(int error, const char *buf) { + unset_tty(); if (buf) errx(error, "fatal: %s", buf); @@ -170,6 +172,7 @@ open_snp(void) static void cleanup(int signo __unused) { + if (opt_timestamp) timestamp("Logging Exited."); close(snp_io); @@ -180,6 +183,7 @@ cleanup(int signo __unused) static void usage(void) { + fprintf(stderr, "usage: watch [-ciotnW] [tty name]\n"); exit(EX_USAGE); } @@ -344,7 +348,7 @@ main(int ac, char *av[]) FD_ZERO(&fd_s); - while (1) { + for (;;) { if (opt_interactive) FD_SET(std_in, &fd_s); FD_SET(snp_io, &fd_s); From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 14:38:50 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 983711065703; Sat, 10 Mar 2012 14:38:50 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8347B8FC15; Sat, 10 Mar 2012 14:38:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2AEcocr060409; Sat, 10 Mar 2012 14:38:50 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2AEcobJ060407; Sat, 10 Mar 2012 14:38:50 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201203101438.q2AEcobJ060407@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 10 Mar 2012 14:38:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232782 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 14:38:50 -0000 Author: trasz Date: Sat Mar 10 14:38:49 2012 New Revision: 232782 URL: http://svn.freebsd.org/changeset/base/232782 Log: Remove useless thread_{lock,unlock}() in raccd. Modified: head/sys/kern/kern_racct.c Modified: head/sys/kern/kern_racct.c ============================================================================== --- head/sys/kern/kern_racct.c Sat Mar 10 14:38:34 2012 (r232781) +++ head/sys/kern/kern_racct.c Sat Mar 10 14:38:49 2012 (r232782) @@ -730,11 +730,8 @@ racctd(void) timevalsub(&wallclock, &p->p_stats->p_start); PROC_LOCK(p); PROC_SLOCK(p); - FOREACH_THREAD_IN_PROC(p, td) { + FOREACH_THREAD_IN_PROC(p, td) ruxagg(p, td); - thread_lock(td); - thread_unlock(td); - } runtime = cputick2usec(p->p_rux.rux_runtime); PROC_SUNLOCK(p); #ifdef notyet From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 14:57:22 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 72FB010656A8; Sat, 10 Mar 2012 14:57:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 53B1E8FC13; Sat, 10 Mar 2012 14:57:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2AEvMwp061027; Sat, 10 Mar 2012 14:57:22 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2AEvM81061023; Sat, 10 Mar 2012 14:57:22 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201203101457.q2AEvM81061023@svn.freebsd.org> From: Alexander Motin Date: Sat, 10 Mar 2012 14:57:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232783 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 14:57:22 -0000 Author: mav Date: Sat Mar 10 14:57:21 2012 New Revision: 232783 URL: http://svn.freebsd.org/changeset/base/232783 Log: Idle ticks optimization: - Pass number of events to the statclock() and profclock() functions same as to hardclock() before to not call them many times in a loop. - Rename them into statclock_cnt() and profclock_cnt(). - Turn statclock() and profclock() into compatibility wrappers, still needed for arm. - Rename hardclock_anycpu() into hardclock_cnt() for unification. MFC after: 1 week Modified: head/sys/kern/kern_clock.c head/sys/kern/kern_clocksource.c head/sys/sys/systm.h Modified: head/sys/kern/kern_clock.c ============================================================================== --- head/sys/kern/kern_clock.c Sat Mar 10 14:38:49 2012 (r232782) +++ head/sys/kern/kern_clock.c Sat Mar 10 14:57:21 2012 (r232783) @@ -483,7 +483,7 @@ hardclock(int usermode, uintfptr_t pc) } void -hardclock_anycpu(int cnt, int usermode) +hardclock_cnt(int cnt, int usermode) { struct pstats *pstats; struct thread *td = curthread; @@ -688,6 +688,13 @@ stopprofclock(p) void statclock(int usermode) { + + statclock_cnt(1, usermode); +} + +void +statclock_cnt(int cnt, int usermode) +{ struct rusage *ru; struct vmspace *vm; struct thread *td; @@ -703,11 +710,11 @@ statclock(int usermode) /* * Charge the time as appropriate. */ - td->td_uticks++; + td->td_uticks += cnt; if (p->p_nice > NZERO) - cp_time[CP_NICE]++; + cp_time[CP_NICE] += cnt; else - cp_time[CP_USER]++; + cp_time[CP_USER] += cnt; } else { /* * Came from kernel mode, so we were: @@ -723,15 +730,15 @@ statclock(int usermode) */ if ((td->td_pflags & TDP_ITHREAD) || td->td_intr_nesting_level >= 2) { - td->td_iticks++; - cp_time[CP_INTR]++; + td->td_iticks += cnt; + cp_time[CP_INTR] += cnt; } else { - td->td_pticks++; - td->td_sticks++; + td->td_pticks += cnt; + td->td_sticks += cnt; if (!TD_IS_IDLETHREAD(td)) - cp_time[CP_SYS]++; + cp_time[CP_SYS] += cnt; else - cp_time[CP_IDLE]++; + cp_time[CP_IDLE] += cnt; } } @@ -739,22 +746,30 @@ statclock(int usermode) MPASS(p->p_vmspace != NULL); vm = p->p_vmspace; ru = &td->td_ru; - ru->ru_ixrss += pgtok(vm->vm_tsize); - ru->ru_idrss += pgtok(vm->vm_dsize); - ru->ru_isrss += pgtok(vm->vm_ssize); + ru->ru_ixrss += pgtok(vm->vm_tsize) * cnt; + ru->ru_idrss += pgtok(vm->vm_dsize) * cnt; + ru->ru_isrss += pgtok(vm->vm_ssize) * cnt; rss = pgtok(vmspace_resident_count(vm)); if (ru->ru_maxrss < rss) ru->ru_maxrss = rss; KTR_POINT2(KTR_SCHED, "thread", sched_tdname(td), "statclock", "prio:%d", td->td_priority, "stathz:%d", (stathz)?stathz:hz); thread_lock_flags(td, MTX_QUIET); - sched_clock(td); + for ( ; cnt > 0; cnt--) + sched_clock(td); thread_unlock(td); } void profclock(int usermode, uintfptr_t pc) { + + profclock_cnt(1, usermode, pc); +} + +void +profclock_cnt(int cnt, int usermode, uintfptr_t pc) +{ struct thread *td; #ifdef GPROF struct gmonparam *g; @@ -770,7 +785,7 @@ profclock(int usermode, uintfptr_t pc) * bother trying to count it. */ if (td->td_proc->p_flag & P_PROFIL) - addupc_intr(td, pc, 1); + addupc_intr(td, pc, cnt); } #ifdef GPROF else { @@ -781,7 +796,7 @@ profclock(int usermode, uintfptr_t pc) if (g->state == GMON_PROF_ON && pc >= g->lowpc) { i = PC_TO_I(g, pc); if (i < g->textsize) { - KCOUNT(g, i)++; + KCOUNT(g, i) += cnt; } } } Modified: head/sys/kern/kern_clocksource.c ============================================================================== --- head/sys/kern/kern_clocksource.c Sat Mar 10 14:38:49 2012 (r232782) +++ head/sys/kern/kern_clocksource.c Sat Mar 10 14:57:21 2012 (r232783) @@ -195,28 +195,34 @@ handleevents(struct bintime *now, int fa pc = TRAPF_PC(frame); } - runs = 0; state = DPCPU_PTR(timerstate); + runs = 0; while (bintime_cmp(now, &state->nexthard, >=)) { bintime_add(&state->nexthard, &hardperiod); runs++; } if (runs && fake < 2) { - hardclock_anycpu(runs, usermode); + hardclock_cnt(runs, usermode); done = 1; } + runs = 0; while (bintime_cmp(now, &state->nextstat, >=)) { - if (fake < 2) - statclock(usermode); bintime_add(&state->nextstat, &statperiod); + runs++; + } + if (runs && fake < 2) { + statclock_cnt(runs, usermode); done = 1; } if (profiling) { + runs = 0; while (bintime_cmp(now, &state->nextprof, >=)) { - if (!fake) - profclock(usermode, pc); bintime_add(&state->nextprof, &profperiod); + runs++; + } + if (runs && !fake) { + profclock_cnt(runs, usermode, pc); done = 1; } } else Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Sat Mar 10 14:38:49 2012 (r232782) +++ head/sys/sys/systm.h Sat Mar 10 14:57:21 2012 (r232783) @@ -247,12 +247,14 @@ void realitexpire(void *); int sysbeep(int hertz, int period); void hardclock(int usermode, uintfptr_t pc); -void hardclock_anycpu(int cnt, int usermode); +void hardclock_cnt(int cnt, int usermode); void hardclock_cpu(int usermode); void hardclock_sync(int cpu); void softclock(void *); void statclock(int usermode); +void statclock_cnt(int cnt, int usermode); void profclock(int usermode, uintfptr_t pc); +void profclock_cnt(int cnt, int usermode, uintfptr_t pc); int hardclockintr(void); From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 15:08:38 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2BF4E106566C; Sat, 10 Mar 2012 15:08:38 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B8B198FC12; Sat, 10 Mar 2012 15:08:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2AF8bKH061404; Sat, 10 Mar 2012 15:08:37 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2AF8bo0061402; Sat, 10 Mar 2012 15:08:37 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <201203101508.q2AF8bo0061402@svn.freebsd.org> From: Takahashi Yoshihiro Date: Sat, 10 Mar 2012 15:08:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232784 - head/sys/boot/pc98/boot2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 15:08:38 -0000 Author: nyan Date: Sat Mar 10 15:08:37 2012 New Revision: 232784 URL: http://svn.freebsd.org/changeset/base/232784 Log: MFi386: revisions 232570 and 232754 Fix boot2 to handle boot config files that only contain a custom path to a loader or kernel. Modified: head/sys/boot/pc98/boot2/boot2.c Modified: head/sys/boot/pc98/boot2/boot2.c ============================================================================== --- head/sys/boot/pc98/boot2/boot2.c Sat Mar 10 14:57:21 2012 (r232783) +++ head/sys/boot/pc98/boot2/boot2.c Sat Mar 10 15:08:37 2012 (r232784) @@ -130,9 +130,9 @@ static struct dsk { unsigned part; unsigned start; } dsk; -static char cmd[512], cmddup[512]; +static char cmd[512], cmddup[512], knamebuf[1024]; static const char *kname = NULL; -static uint32_t opts; +static uint32_t opts = 0; static int comspeed = SIOSPD; static struct bootinfo bootinfo; static uint8_t ioctrl = IO_KEYBOARD; @@ -352,6 +352,7 @@ main(void) #endif uint8_t autoboot; ino_t ino; + size_t nbyte; dmadat = (void *)(roundup2(__base + (int32_t)&_end, 0x10000) - __base); v86.ctl = V86_FLAGS; @@ -378,8 +379,10 @@ main(void) autoboot = 1; if ((ino = lookup(PATH_CONFIG)) || - (ino = lookup(PATH_DOTCONFIG))) - fsread(ino, cmd, sizeof(cmd)); + (ino = lookup(PATH_DOTCONFIG))) { + nbyte = fsread(ino, cmd, sizeof(cmd) - 1); + cmd[nbyte] = '\0'; + } if (*cmd) { memcpy(cmddup, cmd, sizeof(cmd)); @@ -396,9 +399,9 @@ main(void) * or in case of failure, try to load a kernel directly instead. */ - if (autoboot && !kname) { + if (!kname) { kname = PATH_BOOT3; - if (!keyhit(3*SECOND)) { + if (autoboot && !keyhit(3*SECOND)) { load(); kname = PATH_KERNEL; } @@ -595,7 +598,12 @@ parse() dsk.daua = dsk.disk | dsk.unit; dsk_meta = 0; } - kname = arg; + if ((i = ep - arg)) { + if ((size_t)i >= sizeof(knamebuf)) + return -1; + memcpy(knamebuf, arg, i + 1); + kname = knamebuf; + } } arg = p; } From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 17:08:58 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 237CC106566C; Sat, 10 Mar 2012 17:08:58 +0000 (UTC) (envelope-from iwasaki@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E6C08FC12; Sat, 10 Mar 2012 17:08:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2AH8vF5065242; Sat, 10 Mar 2012 17:08:57 GMT (envelope-from iwasaki@svn.freebsd.org) Received: (from iwasaki@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2AH8vIJ065240; Sat, 10 Mar 2012 17:08:57 GMT (envelope-from iwasaki@svn.freebsd.org) Message-Id: <201203101708.q2AH8vIJ065240@svn.freebsd.org> From: Mitsuru IWASAKI Date: Sat, 10 Mar 2012 17:08:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232785 - head/sys/dev/iwi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 17:08:58 -0000 Author: iwasaki Date: Sat Mar 10 17:08:57 2012 New Revision: 232785 URL: http://svn.freebsd.org/changeset/base/232785 Log: Fix wrong asresp frame parsing in iwi_checkforqos(). After 8.0-RELEASE, iwi(4) doesn't send any data frames in infrastructure mode. Bacause of the condition `while (frm < efrm)', IEEE80211_VERIFY_LENGTH() was checking item length beyond the ieee80211_frame region, and returned from iwi_checkforqos() without setting flags, capinfo and associd. In infrastructure mode associd is required, so this problem causes discarding mbuf in ieee80211_start(). PR: kern/165819 Tested/Reviewed/Supported by: bschmidt and adrian MFC after: 1 week Modified: head/sys/dev/iwi/if_iwi.c Modified: head/sys/dev/iwi/if_iwi.c ============================================================================== --- head/sys/dev/iwi/if_iwi.c Sat Mar 10 15:08:37 2012 (r232784) +++ head/sys/dev/iwi/if_iwi.c Sat Mar 10 17:08:57 2012 (r232785) @@ -1357,8 +1357,8 @@ iwi_checkforqos(struct ieee80211vap *vap frm += 2; wme = NULL; - while (frm < efrm) { - IEEE80211_VERIFY_LENGTH(efrm - frm, frm[1], return); + while (efrm - frm > 1) { + IEEE80211_VERIFY_LENGTH(efrm - frm, frm[1] + 2, return); switch (*frm) { case IEEE80211_ELEMID_VENDOR: if (iswmeoui(frm)) From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 17:47:44 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 516A9106566B; Sat, 10 Mar 2012 17:47:44 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 38F208FC08; Sat, 10 Mar 2012 17:47:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2AHliID066534; Sat, 10 Mar 2012 17:47:44 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2AHlhiM066523; Sat, 10 Mar 2012 17:47:43 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201203101747.q2AHlhiM066523@svn.freebsd.org> From: Gavin Atkinson Date: Sat, 10 Mar 2012 17:47:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232786 - in stable/9: sbin/ifconfig sbin/ipfw share/man/man4 sys/conf sys/dev/ath sys/dev/siba sys/ia64/ia64 sys/mips/rt305x X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 17:47:44 -0000 Author: gavin Date: Sat Mar 10 17:47:43 2012 New Revision: 232786 URL: http://svn.freebsd.org/changeset/base/232786 Log: Merge r232250 from head: Correct capitalization of "Hz" in user-visible text (manpages, printf(), etc). Modified: stable/9/sbin/ifconfig/ifconfig.8 stable/9/sbin/ipfw/ipfw.8 stable/9/share/man/man4/ath.4 stable/9/share/man/man4/net80211.4 stable/9/sys/conf/NOTES stable/9/sys/dev/ath/if_ath_sysctl.c stable/9/sys/dev/siba/siba_core.c stable/9/sys/ia64/ia64/machdep.c stable/9/sys/mips/rt305x/rt305x_sysctl.c Directory Properties: stable/9/sbin/ifconfig/ (props changed) stable/9/sbin/ipfw/ (props changed) stable/9/share/man/man4/ (props changed) stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) Modified: stable/9/sbin/ifconfig/ifconfig.8 ============================================================================== --- stable/9/sbin/ifconfig/ifconfig.8 Sat Mar 10 17:08:57 2012 (r232785) +++ stable/9/sbin/ifconfig/ifconfig.8 Sat Mar 10 17:47:43 2012 (r232786) @@ -1036,7 +1036,7 @@ Enable Dynamic Frequency Selection (DFS) DFS embodies several facilities including detection of overlapping radar signals, dynamic transmit power control, and channel selection according to a least-congested criteria. -DFS support is mandatory for some 5Ghz frequencies in certain +DFS support is mandatory for some 5GHz frequencies in certain locales (e.g. ETSI). By default DFS is enabled according to the regulatory definitions specified in /etc/regdomain.xml and the current country code, regdomain, Modified: stable/9/sbin/ipfw/ipfw.8 ============================================================================== --- stable/9/sbin/ipfw/ipfw.8 Sat Mar 10 17:08:57 2012 (r232785) +++ stable/9/sbin/ipfw/ipfw.8 Sat Mar 10 17:47:43 2012 (r232786) @@ -2233,7 +2233,7 @@ specifies the scheduling algorithm to us is just a FIFO scheduler (which means that all packets are stored in the same queue as they arrive to the scheduler). FIFO has O(1) per-packet time complexity, with very low -constants (estimate 60-80ns on a 2Ghz desktop machine) +constants (estimate 60-80ns on a 2GHz desktop machine) but gives no service guarantees. .It Cm wf2qp implements the WF2Q+ algorithm, which is a Weighted Fair Queueing Modified: stable/9/share/man/man4/ath.4 ============================================================================== --- stable/9/share/man/man4/ath.4 Sat Mar 10 17:08:57 2012 (r232785) +++ stable/9/share/man/man4/ath.4 Sat Mar 10 17:47:43 2012 (r232786) @@ -95,8 +95,8 @@ with transmit speeds appropriate to each AR5416-class devices are capable of 802.11n operation but are supported only in legacy modes (802.11a, 11b, 11g). Most chips also support an Atheros Turbo Mode (TM) that operates in -the 5Ghz frequency range with 2x the transmit speeds. -Some chips also support Turbo mode in the 2.4Ghz range with 802.11g +the 5GHz frequency range with 2x the transmit speeds. +Some chips also support Turbo mode in the 2.4GHz range with 802.11g though this support is not presently available due to regulatory requirements. (Note that Turbo modes are, however, only interoperable with other Atheros-based devices.) Modified: stable/9/share/man/man4/net80211.4 ============================================================================== --- stable/9/share/man/man4/net80211.4 Sat Mar 10 17:08:57 2012 (r232785) +++ stable/9/share/man/man4/net80211.4 Sat Mar 10 17:47:43 2012 (r232786) @@ -280,7 +280,7 @@ Return whether or not Dynamic Frequency DFS embodies several facilities including detection of overlapping radar signals, dynamic transmit power control, and channel selection according to a least-congested criteria. -DFS support is mandatory for some 5Ghz frequencies in certain +DFS support is mandatory for some 5GHz frequencies in certain locales (e.g. ETSI). By default DFS is enabled according to the regulatory definitions and the current country code, regdomain, and channel. Modified: stable/9/sys/conf/NOTES ============================================================================== --- stable/9/sys/conf/NOTES Sat Mar 10 17:08:57 2012 (r232785) +++ stable/9/sys/conf/NOTES Sat Mar 10 17:47:43 2012 (r232786) @@ -2406,11 +2406,11 @@ device cmx # or # options BROOKTREE_SYSTEM_DEFAULT=BROOKTREE_NTSC # Specifies the default video capture mode. -# This is required for Dual Crystal (28&35Mhz) boards where PAL is used +# This is required for Dual Crystal (28&35MHz) boards where PAL is used # to prevent hangs during initialisation, e.g. VideoLogic Captivator PCI. # # options BKTR_USE_PLL -# This is required for PAL or SECAM boards with a 28Mhz crystal and no 35Mhz +# This is required for PAL or SECAM boards with a 28MHz crystal and no 35MHz # crystal, e.g. some new Bt878 cards. # # options BKTR_GPIO_ACCESS Modified: stable/9/sys/dev/ath/if_ath_sysctl.c ============================================================================== --- stable/9/sys/dev/ath/if_ath_sysctl.c Sat Mar 10 17:08:57 2012 (r232785) +++ stable/9/sys/dev/ath/if_ath_sysctl.c Sat Mar 10 17:47:43 2012 (r232786) @@ -756,7 +756,7 @@ ath_sysctl_hal_attach(struct ath_softc * sc->sc_ah->ah_config.ah_ar5416_biasadj = 0; SYSCTL_ADD_INT(ctx, child, OID_AUTO, "ar5416_biasadj", CTLFLAG_RW, &sc->sc_ah->ah_config.ah_ar5416_biasadj, 0, - "Enable 2ghz AR5416 direction sensitivity bias adjust"); + "Enable 2GHz AR5416 direction sensitivity bias adjust"); sc->sc_ah->ah_config.ah_dma_beacon_response_time = 2; SYSCTL_ADD_INT(ctx, child, OID_AUTO, "dma_brt", CTLFLAG_RW, Modified: stable/9/sys/dev/siba/siba_core.c ============================================================================== --- stable/9/sys/dev/siba/siba_core.c Sat Mar 10 17:08:57 2012 (r232785) +++ stable/9/sys/dev/siba/siba_core.c Sat Mar 10 17:47:43 2012 (r232786) @@ -1207,7 +1207,7 @@ siba_cc_pmu0_pll0_init(struct siba_cc *s if (((pmu & SIBA_CC_PMUCTL_XF) >> 2) == e->xf) return; - DPRINTF(siba, SIBA_DEBUG_PLL, "change PLL value to %u.%03u mhz\n", + DPRINTF(siba, SIBA_DEBUG_PLL, "change PLL value to %u.%03u MHz\n", (xtalfreq / 1000), (xtalfreq % 1000)); KASSERT(siba->siba_chipid == 0x4328 || siba->siba_chipid == 0x5354, Modified: stable/9/sys/ia64/ia64/machdep.c ============================================================================== --- stable/9/sys/ia64/ia64/machdep.c Sat Mar 10 17:08:57 2012 (r232785) +++ stable/9/sys/ia64/ia64/machdep.c Sat Mar 10 17:47:43 2012 (r232786) @@ -245,7 +245,7 @@ identifycpu(void) printf("CPU: %s (", model_name); if (cpu_freq) - printf("%u Mhz ", cpu_freq); + printf("%u MHz ", cpu_freq); printf("%s)\n", family_name); printf(" Origin = \"%s\" Revision = %d\n", vendor, revision); printf(" Features = 0x%b\n", (u_int32_t) features, Modified: stable/9/sys/mips/rt305x/rt305x_sysctl.c ============================================================================== --- stable/9/sys/mips/rt305x/rt305x_sysctl.c Sat Mar 10 17:08:57 2012 (r232785) +++ stable/9/sys/mips/rt305x/rt305x_sysctl.c Sat Mar 10 17:47:43 2012 (r232786) @@ -84,7 +84,7 @@ rt305x_sysctl_dump_config(device_t dev) if ( val & SYSCTL_SYSCFG_BIG_ENDIAN) printf("\tBig Endian\n"); if ( val & SYSCTL_SYSCFG_CPU_CLK_SEL_384MHZ) - printf("\tClock is 384Mhz\n"); + printf("\tClock is 384MHz\n"); printf("\tBoot from %u\n", ((val & SYSCTL_SYSCFG_BOOT_FROM_MASK) >> SYSCTL_SYSCFG_BOOT_FROM_SHIFT)); @@ -109,7 +109,7 @@ rt305x_sysctl_dump_config(device_t dev) printf("\tI2S clock is enabled\n"); printf("\tI2S clock is %s\n", (val & SYSCTL_CLKCFG1_I2S_CLK_SEL_EXT)? - "external":"internal 15.625Mhz"); + "external":"internal 15.625MHz"); printf("\tI2S clock divider %u\n", ((val & SYSCTL_CLKCFG1_I2S_CLK_DIV_MASK) >> SYSCTL_CLKCFG1_I2S_CLK_DIV_SHIFT)); @@ -118,7 +118,7 @@ rt305x_sysctl_dump_config(device_t dev) printf("\tPCM clock is %s\n", (val & SYSCTL_CLKCFG1_PCM_CLK_SEL_EXT)? - "external":"internal 15.625Mhz"); + "external":"internal 15.625MHz"); printf("\tPCM clock divider %u\n", ((val & SYSCTL_CLKCFG1_PCM_CLK_DIV_MASK) >> SYSCTL_CLKCFG1_PCM_CLK_DIV_SHIFT)); From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 17:55:59 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7FF01106566B; Sat, 10 Mar 2012 17:55:59 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5FC728FC12; Sat, 10 Mar 2012 17:55:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2AHtxw7066882; Sat, 10 Mar 2012 17:55:59 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2AHtxSF066874; Sat, 10 Mar 2012 17:55:59 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201203101755.q2AHtxSF066874@svn.freebsd.org> From: Gavin Atkinson Date: Sat, 10 Mar 2012 17:55:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232787 - in stable/8: sbin/ifconfig sbin/ipfw share/man/man4 sys/conf sys/dev/siba sys/ia64/ia64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 17:55:59 -0000 Author: gavin Date: Sat Mar 10 17:55:58 2012 New Revision: 232787 URL: http://svn.freebsd.org/changeset/base/232787 Log: Merge r232250 from head: Correct capitalization of "Hz" in user-visible text (manpages, printf(), etc). Modified: stable/8/sbin/ifconfig/ifconfig.8 stable/8/sbin/ipfw/ipfw.8 stable/8/share/man/man4/ath.4 stable/8/share/man/man4/net80211.4 stable/8/sys/conf/NOTES stable/8/sys/dev/siba/siba_core.c stable/8/sys/ia64/ia64/machdep.c Directory Properties: stable/8/sbin/ifconfig/ (props changed) stable/8/sbin/ipfw/ (props changed) stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) Modified: stable/8/sbin/ifconfig/ifconfig.8 ============================================================================== --- stable/8/sbin/ifconfig/ifconfig.8 Sat Mar 10 17:47:43 2012 (r232786) +++ stable/8/sbin/ifconfig/ifconfig.8 Sat Mar 10 17:55:58 2012 (r232787) @@ -993,7 +993,7 @@ Enable Dynamic Frequency Selection (DFS) DFS embodies several facilities including detection of overlapping radar signals, dynamic transmit power control, and channel selection according to a least-congested criteria. -DFS support is mandatory for some 5Ghz frequencies in certain +DFS support is mandatory for some 5GHz frequencies in certain locales (e.g. ETSI). By default DFS is enabled according to the regulatory definitions specified in /etc/regdomain.xml and the curent country code, regdomain, Modified: stable/8/sbin/ipfw/ipfw.8 ============================================================================== --- stable/8/sbin/ipfw/ipfw.8 Sat Mar 10 17:47:43 2012 (r232786) +++ stable/8/sbin/ipfw/ipfw.8 Sat Mar 10 17:55:58 2012 (r232787) @@ -2219,7 +2219,7 @@ specifies the scheduling algorithm to us is just a FIFO scheduler (which means that all packets are stored in the same queue as they arrive to the scheduler). FIFO has O(1) per-packet time complexity, with very low -constants (estimate 60-80ns on a 2Ghz desktop machine) +constants (estimate 60-80ns on a 2GHz desktop machine) but gives no service guarantees. .It Cm wf2qp implements the WF2Q+ algorithm, which is a Weighted Fair Queueing Modified: stable/8/share/man/man4/ath.4 ============================================================================== --- stable/8/share/man/man4/ath.4 Sat Mar 10 17:47:43 2012 (r232786) +++ stable/8/share/man/man4/ath.4 Sat Mar 10 17:55:58 2012 (r232787) @@ -80,8 +80,8 @@ with transmit speeds appropriate to each AR5416-class devices are capable of 802.11n operation but are supported only in legacy modes (802.11a, 11b, 11g). Most chips also support an Atheros Turbo Mode (TM) that operates in -the 5Ghz frequency range with 2x the transmit speeds. -Some chips also support Turbo mode in the 2.4Ghz range with 802.11g +the 5GHz frequency range with 2x the transmit speeds. +Some chips also support Turbo mode in the 2.4GHz range with 802.11g though this support is not presently available due to regulatory requirements. (Note that Turbo modes are, however, only interoperable with other Atheros-based devices.) Modified: stable/8/share/man/man4/net80211.4 ============================================================================== --- stable/8/share/man/man4/net80211.4 Sat Mar 10 17:47:43 2012 (r232786) +++ stable/8/share/man/man4/net80211.4 Sat Mar 10 17:55:58 2012 (r232787) @@ -280,7 +280,7 @@ Return whether or not Dynamic Frequency DFS embodies several facilities including detection of overlapping radar signals, dynamic transmit power control, and channel selection according to a least-congested criteria. -DFS support is mandatory for some 5Ghz frequencies in certain +DFS support is mandatory for some 5GHz frequencies in certain locales (e.g. ETSI). By default DFS is enabled according to the regulatory definitions and the curent country code, regdomain, and channel. Modified: stable/8/sys/conf/NOTES ============================================================================== --- stable/8/sys/conf/NOTES Sat Mar 10 17:47:43 2012 (r232786) +++ stable/8/sys/conf/NOTES Sat Mar 10 17:55:58 2012 (r232787) @@ -2339,11 +2339,11 @@ device cmx # or # options BROOKTREE_SYSTEM_DEFAULT=BROOKTREE_NTSC # Specifies the default video capture mode. -# This is required for Dual Crystal (28&35Mhz) boards where PAL is used +# This is required for Dual Crystal (28&35MHz) boards where PAL is used # to prevent hangs during initialisation, e.g. VideoLogic Captivator PCI. # # options BKTR_USE_PLL -# This is required for PAL or SECAM boards with a 28Mhz crystal and no 35Mhz +# This is required for PAL or SECAM boards with a 28MHz crystal and no 35MHz # crystal, e.g. some new Bt878 cards. # # options BKTR_GPIO_ACCESS Modified: stable/8/sys/dev/siba/siba_core.c ============================================================================== --- stable/8/sys/dev/siba/siba_core.c Sat Mar 10 17:47:43 2012 (r232786) +++ stable/8/sys/dev/siba/siba_core.c Sat Mar 10 17:55:58 2012 (r232787) @@ -1215,7 +1215,7 @@ siba_cc_pmu0_pll0_init(struct siba_cc *s if (((pmu & SIBA_CC_PMUCTL_XF) >> 2) == e->xf) return; - DPRINTF(siba, SIBA_DEBUG_PLL, "change PLL value to %u.%03u mhz\n", + DPRINTF(siba, SIBA_DEBUG_PLL, "change PLL value to %u.%03u MHz\n", (xtalfreq / 1000), (xtalfreq % 1000)); KASSERT(siba->siba_chipid == 0x4328 || siba->siba_chipid == 0x5354, Modified: stable/8/sys/ia64/ia64/machdep.c ============================================================================== --- stable/8/sys/ia64/ia64/machdep.c Sat Mar 10 17:47:43 2012 (r232786) +++ stable/8/sys/ia64/ia64/machdep.c Sat Mar 10 17:55:58 2012 (r232787) @@ -242,7 +242,7 @@ identifycpu(void) printf("CPU: %s (", model_name); if (cpu_freq) - printf("%u Mhz ", cpu_freq); + printf("%u MHz ", cpu_freq); printf("%s)\n", family_name); printf(" Origin = \"%s\" Revision = %d\n", vendor, revision); printf(" Features = 0x%b\n", (u_int32_t) features, From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 18:26:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3433A1065673; Sat, 10 Mar 2012 18:26:26 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1ED0C8FC08; Sat, 10 Mar 2012 18:26:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2AIQPeB069805; Sat, 10 Mar 2012 18:26:25 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2AIQPVV069802; Sat, 10 Mar 2012 18:26:25 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201203101826.q2AIQPVV069802@svn.freebsd.org> From: Eitan Adler Date: Sat, 10 Mar 2012 18:26:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232788 - stable/8/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 18:26:26 -0000 Author: eadler Date: Sat Mar 10 18:26:25 2012 New Revision: 232788 URL: http://svn.freebsd.org/changeset/base/232788 Log: MFC r227626, r227642: - be more precise about the unit of measurement Approved by: cperciva Modified: stable/8/sys/dev/acpica/acpi_thermal.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/acpica/acpi_thermal.c ============================================================================== --- stable/8/sys/dev/acpica/acpi_thermal.c Sat Mar 10 17:55:58 2012 (r232787) +++ stable/8/sys/dev/acpica/acpi_thermal.c Sat Mar 10 18:26:25 2012 (r232788) @@ -246,7 +246,7 @@ acpi_tz_attach(device_t dev) SYSCTL_ADD_INT(&acpi_tz_sysctl_ctx, SYSCTL_CHILDREN(acpi_tz_sysctl_tree), OID_AUTO, "polling_rate", CTLFLAG_RW, - &acpi_tz_polling_rate, 0, "monitor polling rate"); + &acpi_tz_polling_rate, 0, "monitor polling interval in seconds"); SYSCTL_ADD_INT(&acpi_tz_sysctl_ctx, SYSCTL_CHILDREN(acpi_tz_sysctl_tree), OID_AUTO, "user_override", CTLFLAG_RW, &acpi_tz_override, 0, From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 18:35:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 80367106566C; Sat, 10 Mar 2012 18:35:39 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6B1748FC0C; Sat, 10 Mar 2012 18:35:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2AIZdWq070658; Sat, 10 Mar 2012 18:35:39 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2AIZdR5070656; Sat, 10 Mar 2012 18:35:39 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203101835.q2AIZdR5070656@svn.freebsd.org> From: Juli Mallett Date: Sat, 10 Mar 2012 18:35:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232789 - head/sys/mips/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 18:35:39 -0000 Author: jmallett Date: Sat Mar 10 18:35:38 2012 New Revision: 232789 URL: http://svn.freebsd.org/changeset/base/232789 Log: Fix reversed logic in previous commit that broke build and earned me quite the pointy hat. Submitted by: bz Modified: head/sys/mips/include/_bus.h Modified: head/sys/mips/include/_bus.h ============================================================================== --- head/sys/mips/include/_bus.h Sat Mar 10 18:26:25 2012 (r232788) +++ head/sys/mips/include/_bus.h Sat Mar 10 18:35:38 2012 (r232789) @@ -36,9 +36,9 @@ */ #include "opt_cputype.h" #if defined(CPU_CNMIPS) && !defined(__mips_n64) -typedef uintptr_t bus_addr_t; -#else typedef uint64_t bus_addr_t; +#else +typedef uintptr_t bus_addr_t; #endif typedef uintptr_t bus_size_t; From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 18:36:13 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82EAC1065686; Sat, 10 Mar 2012 18:36:13 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6DCA08FC13; Sat, 10 Mar 2012 18:36:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2AIaDWV070747; Sat, 10 Mar 2012 18:36:13 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2AIaD9E070745; Sat, 10 Mar 2012 18:36:13 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201203101836.q2AIaD9E070745@svn.freebsd.org> From: Eitan Adler Date: Sat, 10 Mar 2012 18:36:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232790 - stable/9/usr.bin/indent X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 18:36:13 -0000 Author: eadler Date: Sat Mar 10 18:36:12 2012 New Revision: 232790 URL: http://svn.freebsd.org/changeset/base/232790 Log: MFC r232471: Document the [n]eei and [n]bacc options PR: docs/165009 Approved by: bcr Modified: stable/9/usr.bin/indent/indent.1 Directory Properties: stable/9/usr.bin/indent/ (props changed) Modified: stable/9/usr.bin/indent/indent.1 ============================================================================== --- stable/9/usr.bin/indent/indent.1 Sat Mar 10 18:35:38 2012 (r232789) +++ stable/9/usr.bin/indent/indent.1 Sat Mar 10 18:36:12 2012 (r232790) @@ -34,7 +34,7 @@ .\" @(#)indent.1 8.1 (Berkeley) 7/1/93 .\" $FreeBSD$ .\" -.Dd June 29, 2004 +.Dd March 3, 2012 .Dt INDENT 1 .Os .Sh NAME @@ -43,9 +43,12 @@ .Sh SYNOPSIS .Nm .Op Ar input-file Op Ar output-file +.Op Fl bacc | Fl nbacc .Op Fl bad | Fl nbad .Op Fl bap | Fl nbap .Bk -words +.Op Fl ei | Fl ei +.Op Fl eei | Fl eei .Op Fl bbb | Fl nbbb .Ek .Op Fl \&bc | Fl nbc @@ -126,6 +129,15 @@ checks to make sure that it is different The options listed below control the formatting style imposed by .Nm . .Bl -tag -width Op +.It Fl bacc , nbacc +If +.Fl bacc +is specified, a blank line is forced around every conditional +compilation block. +For example, in front of every #ifdef and after every #endif. +Other blank lines surrounding such blocks will be swallowed. +Default: +.Fl nbacc . .It Fl bad , nbad If .Fl bad @@ -267,6 +279,16 @@ will have the same indentation as the pr statement. The default is .Fl ei . +.It Fl eei , neei +Enables (disables) extra indentation on continuation lines of +the expression part of +.Ic if +and +.Ic while +statements. +These continuation lines will be indented one extra level. +The default is +.Fl neei . .It Fl fbs , nfbs Enables (disables) splitting the function declaration and opening brace across two lines. From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 18:36:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 93C2E1065680; Sat, 10 Mar 2012 18:36:40 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7EB5C8FC12; Sat, 10 Mar 2012 18:36:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2AIae0N070815; Sat, 10 Mar 2012 18:36:40 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2AIaeLi070813; Sat, 10 Mar 2012 18:36:40 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201203101836.q2AIaeLi070813@svn.freebsd.org> From: Eitan Adler Date: Sat, 10 Mar 2012 18:36:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232791 - stable/8/usr.bin/indent X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 18:36:40 -0000 Author: eadler Date: Sat Mar 10 18:36:40 2012 New Revision: 232791 URL: http://svn.freebsd.org/changeset/base/232791 Log: MFC r232471: Document the [n]eei and [n]bacc options PR: docs/165009 Approved by: bcr Modified: stable/8/usr.bin/indent/indent.1 Directory Properties: stable/8/usr.bin/indent/ (props changed) Modified: stable/8/usr.bin/indent/indent.1 ============================================================================== --- stable/8/usr.bin/indent/indent.1 Sat Mar 10 18:36:12 2012 (r232790) +++ stable/8/usr.bin/indent/indent.1 Sat Mar 10 18:36:40 2012 (r232791) @@ -34,7 +34,7 @@ .\" @(#)indent.1 8.1 (Berkeley) 7/1/93 .\" $FreeBSD$ .\" -.Dd June 29, 2004 +.Dd March 3, 2012 .Dt INDENT 1 .Os .Sh NAME @@ -43,9 +43,12 @@ .Sh SYNOPSIS .Nm .Op Ar input-file Op Ar output-file +.Op Fl bacc | Fl nbacc .Op Fl bad | Fl nbad .Op Fl bap | Fl nbap .Bk -words +.Op Fl ei | Fl ei +.Op Fl eei | Fl eei .Op Fl bbb | Fl nbbb .Ek .Op Fl \&bc | Fl nbc @@ -126,6 +129,15 @@ checks to make sure that it is different The options listed below control the formatting style imposed by .Nm . .Bl -tag -width Op +.It Fl bacc , nbacc +If +.Fl bacc +is specified, a blank line is forced around every conditional +compilation block. +For example, in front of every #ifdef and after every #endif. +Other blank lines surrounding such blocks will be swallowed. +Default: +.Fl nbacc . .It Fl bad , nbad If .Fl bad @@ -267,6 +279,16 @@ will have the same indentation as the pr statement. The default is .Fl ei . +.It Fl eei , neei +Enables (disables) extra indentation on continuation lines of +the expression part of +.Ic if +and +.Ic while +statements. +These continuation lines will be indented one extra level. +The default is +.Fl neei . .It Fl fbs , nfbs Enables (disables) splitting the function declaration and opening brace across two lines. From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 18:37:01 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE1DB1065686; Sat, 10 Mar 2012 18:37:01 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A80338FC17; Sat, 10 Mar 2012 18:37:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2AIb14n070888; Sat, 10 Mar 2012 18:37:01 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2AIb1Jq070886; Sat, 10 Mar 2012 18:37:01 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201203101837.q2AIb1Jq070886@svn.freebsd.org> From: Eitan Adler Date: Sat, 10 Mar 2012 18:37:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232792 - stable/7/usr.bin/indent X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 18:37:01 -0000 Author: eadler Date: Sat Mar 10 18:37:01 2012 New Revision: 232792 URL: http://svn.freebsd.org/changeset/base/232792 Log: MFC r232471: Document the [n]eei and [n]bacc options PR: docs/165009 Approved by: bcr Modified: stable/7/usr.bin/indent/indent.1 Directory Properties: stable/7/usr.bin/indent/ (props changed) Modified: stable/7/usr.bin/indent/indent.1 ============================================================================== --- stable/7/usr.bin/indent/indent.1 Sat Mar 10 18:36:40 2012 (r232791) +++ stable/7/usr.bin/indent/indent.1 Sat Mar 10 18:37:01 2012 (r232792) @@ -34,7 +34,7 @@ .\" @(#)indent.1 8.1 (Berkeley) 7/1/93 .\" $FreeBSD$ .\" -.Dd June 29, 2004 +.Dd March 3, 2012 .Dt INDENT 1 .Os .Sh NAME @@ -43,9 +43,12 @@ .Sh SYNOPSIS .Nm .Op Ar input-file Op Ar output-file +.Op Fl bacc | Fl nbacc .Op Fl bad | Fl nbad .Op Fl bap | Fl nbap .Bk -words +.Op Fl ei | Fl ei +.Op Fl eei | Fl eei .Op Fl bbb | Fl nbbb .Ek .Op Fl \&bc | Fl nbc @@ -126,6 +129,15 @@ checks to make sure that it is different The options listed below control the formatting style imposed by .Nm . .Bl -tag -width Op +.It Fl bacc , nbacc +If +.Fl bacc +is specified, a blank line is forced around every conditional +compilation block. +For example, in front of every #ifdef and after every #endif. +Other blank lines surrounding such blocks will be swallowed. +Default: +.Fl nbacc . .It Fl bad , nbad If .Fl bad @@ -267,6 +279,16 @@ will have the same indentation as the pr statement. The default is .Fl ei . +.It Fl eei , neei +Enables (disables) extra indentation on continuation lines of +the expression part of +.Ic if +and +.Ic while +statements. +These continuation lines will be indented one extra level. +The default is +.Fl neei . .It Fl fbs , nfbs Enables (disables) splitting the function declaration and opening brace across two lines. From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 18:52:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 584521065672; Sat, 10 Mar 2012 18:52:39 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id D5F438FC15; Sat, 10 Mar 2012 18:52:38 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 950F925D39FF; Sat, 10 Mar 2012 18:52:36 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id C3755BDD1CE; Sat, 10 Mar 2012 18:52:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id 82wZfzkpR1PI; Sat, 10 Mar 2012 18:52:34 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 96656BDD1CD; Sat, 10 Mar 2012 18:52:34 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201203101835.q2AIZdR5070656@svn.freebsd.org> Date: Sat, 10 Mar 2012 18:52:33 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <92D61AD7-B586-4523-B583-2F8945AD35FD@FreeBSD.org> References: <201203101835.q2AIZdR5070656@svn.freebsd.org> To: Juli Mallett X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r232789 - head/sys/mips/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 18:52:39 -0000 On 10. Mar 2012, at 18:35 , Juli Mallett wrote: > Author: jmallett > Date: Sat Mar 10 18:35:38 2012 > New Revision: 232789 > URL: http://svn.freebsd.org/changeset/base/232789 >=20 > Log: > Fix reversed logic in previous commit that broke build and earned me = quite the > pointy hat. >=20 > Submitted by: bz Just Reported by:, I didn't do the fix but thanks to you for doing so! > Modified: > head/sys/mips/include/_bus.h >=20 > Modified: head/sys/mips/include/_bus.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/mips/include/_bus.h Sat Mar 10 18:26:25 2012 = (r232788) > +++ head/sys/mips/include/_bus.h Sat Mar 10 18:35:38 2012 = (r232789) > @@ -36,9 +36,9 @@ > */ > #include "opt_cputype.h"=20 > #if defined(CPU_CNMIPS) && !defined(__mips_n64) > -typedef uintptr_t bus_addr_t; > -#else > typedef uint64_t bus_addr_t; > +#else > +typedef uintptr_t bus_addr_t; > #endif > typedef uintptr_t bus_size_t; >=20 --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 18:56:17 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 20B85106564A; Sat, 10 Mar 2012 18:56:17 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0167A8FC20; Sat, 10 Mar 2012 18:56:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2AIuGXk072787; Sat, 10 Mar 2012 18:56:16 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2AIuGt4072785; Sat, 10 Mar 2012 18:56:16 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201203101856.q2AIuGt4072785@svn.freebsd.org> From: Alexander Motin Date: Sat, 10 Mar 2012 18:56:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232793 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 18:56:17 -0000 Author: mav Date: Sat Mar 10 18:56:16 2012 New Revision: 232793 URL: http://svn.freebsd.org/changeset/base/232793 Log: Revert r175376 and tune cpufreq(4) frequency comparison logic instead. Instead of using 25MHz equality threshold, look for the nearest value when handling dev.cpu.0.freq sysctl and for exact match when it is expected. ACPI may report extra level with frequency 1MHz above the nominal to control Intel Turbo Boost operation. It is not a bug, but feature: dev.cpu.0.freq_levels: 2934/106000 2933/95000 2800/82000 ... In this case value 2933 means 2.93GHz, but 2934 means 3.2-3.6GHz. I've found that my Core i7-870 based system has Intel Turbo Boost disabled by default and without this change it was absolutely invisible and hard to control. MFC after: 2 weeks Modified: head/sys/kern/kern_cpu.c Modified: head/sys/kern/kern_cpu.c ============================================================================== --- head/sys/kern/kern_cpu.c Sat Mar 10 18:37:01 2012 (r232792) +++ head/sys/kern/kern_cpu.c Sat Mar 10 18:56:16 2012 (r232793) @@ -312,7 +312,7 @@ cf_set_method(device_t dev, const struct } /* If already at this level, just return. */ - if (CPUFREQ_CMP(sc->curr_level.total_set.freq, level->total_set.freq)) { + if (sc->curr_level.total_set.freq == level->total_set.freq) { CF_DEBUG("skipping freq %d, same as current level %d\n", level->total_set.freq, sc->curr_level.total_set.freq); goto skip; @@ -471,7 +471,7 @@ cf_get_method(device_t dev, struct cf_le if (CPUFREQ_DRV_GET(devs[n], &set) != 0) continue; for (i = 0; i < count; i++) { - if (CPUFREQ_CMP(set.freq, levels[i].total_set.freq)) { + if (set.freq == levels[i].total_set.freq) { sc->curr_level = levels[i]; break; } @@ -627,16 +627,6 @@ cf_levels_method(device_t dev, struct cf /* Finally, output the list of levels. */ i = 0; TAILQ_FOREACH(lev, &sc->all_levels, link) { - /* - * Skip levels that are too close in frequency to the - * previous levels. Some systems report bogus duplicate - * settings (i.e., for acpi_perf). - */ - if (i > 0 && CPUFREQ_CMP(lev->total_set.freq, - levels[i - 1].total_set.freq)) { - sc->all_count--; - continue; - } /* Skip levels that have a frequency that is too low. */ if (lev->total_set.freq < cf_lowest_freq) { @@ -870,7 +860,7 @@ cpufreq_curr_sysctl(SYSCTL_HANDLER_ARGS) { struct cpufreq_softc *sc; struct cf_level *levels; - int count, devcount, error, freq, i, n; + int best, count, diff, bdiff, devcount, error, freq, i, n; device_t *devs; devs = NULL; @@ -902,17 +892,16 @@ cpufreq_curr_sysctl(SYSCTL_HANDLER_ARGS) "cpufreq: need to increase CF_MAX_LEVELS\n"); break; } + best = 0; + bdiff = 1 << 30; for (i = 0; i < count; i++) { - if (CPUFREQ_CMP(levels[i].total_set.freq, freq)) { - error = CPUFREQ_SET(devs[n], &levels[i], - CPUFREQ_PRIO_USER); - break; + diff = abs(levels[i].total_set.freq - freq); + if (diff < bdiff) { + bdiff = diff; + best = i; } } - if (i == count) { - error = EINVAL; - break; - } + error = CPUFREQ_SET(devs[n], &levels[best], CPUFREQ_PRIO_USER); } out: From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 19:58:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2A915106566C; Sat, 10 Mar 2012 19:58:24 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F070D8FC16; Sat, 10 Mar 2012 19:58:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2AJwNWj075899; Sat, 10 Mar 2012 19:58:23 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2AJwN9M075897; Sat, 10 Mar 2012 19:58:23 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201203101958.q2AJwN9M075897@svn.freebsd.org> From: Adrian Chadd Date: Sat, 10 Mar 2012 19:58:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232794 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 19:58:24 -0000 Author: adrian Date: Sat Mar 10 19:58:23 2012 New Revision: 232794 URL: http://svn.freebsd.org/changeset/base/232794 Log: Fix a panic introduced in a previous commit - non-beaconing modes (eg STA) don't setup the avp mcast queue. This is a bit annoying though - it turns out the mcast queue isn't initialised for STA mode but it's then touched to see whether anything is in it. That should be fixed in a subsequent commit. Noticed by: gperez@entel.upc.edu PR: kern/165895 Modified: head/sys/dev/ath/if_ath_tx.c head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Sat Mar 10 18:56:16 2012 (r232793) +++ head/sys/dev/ath/if_ath_tx.c Sat Mar 10 19:58:23 2012 (r232794) @@ -1409,15 +1409,12 @@ ath_tx_start(struct ath_softc *sc, struc */ if (IEEE80211_IS_MULTICAST(wh->i_addr1)) { ATH_TXQ_LOCK(sc->sc_cabq); - ATH_TXQ_LOCK(&avp->av_mcastq); - if ((sc->sc_cabq->axq_depth + avp->av_mcastq.axq_depth) > - sc->sc_txq_mcastq_maxdepth) { + if (sc->sc_cabq->axq_depth > sc->sc_txq_mcastq_maxdepth) { sc->sc_stats.ast_tx_mcastq_overflow++; r = ENOBUFS; } - ATH_TXQ_UNLOCK(&avp->av_mcastq); ATH_TXQ_UNLOCK(sc->sc_cabq); if (r != 0) { @@ -1759,8 +1756,6 @@ ath_raw_xmit(struct ieee80211_node *ni, struct ath_softc *sc = ifp->if_softc; struct ath_buf *bf; struct ieee80211_frame *wh = mtod(m, struct ieee80211_frame *); - struct ieee80211vap *vap = ni->ni_vap; - struct ath_vap *avp = ATH_VAP(vap); int error = 0; ATH_PCU_LOCK(sc); @@ -1790,15 +1785,12 @@ ath_raw_xmit(struct ieee80211_node *ni, */ if (IEEE80211_IS_MULTICAST(wh->i_addr1)) { ATH_TXQ_LOCK(sc->sc_cabq); - ATH_TXQ_LOCK(&avp->av_mcastq); - if ((sc->sc_cabq->axq_depth + avp->av_mcastq.axq_depth) > - sc->sc_txq_mcastq_maxdepth) { + if (sc->sc_cabq->axq_depth > sc->sc_txq_mcastq_maxdepth) { sc->sc_stats.ast_tx_mcastq_overflow++; error = ENOBUFS; } - ATH_TXQ_UNLOCK(&avp->av_mcastq); ATH_TXQ_UNLOCK(sc->sc_cabq); if (error != 0) { Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Sat Mar 10 18:56:16 2012 (r232793) +++ head/sys/dev/ath/if_athvar.h Sat Mar 10 19:58:23 2012 (r232794) @@ -547,10 +547,7 @@ struct ath_softc { * + data_minfree is the maximum number of free buffers * overall to successfully allow a data frame. * - * + mcastq_maxdepth is the maximum depth allowe dof the avp+cabq - * queue. The avp is included in each comparison just to be - * a little overly conservative and this may end up being - * unhelpful with multiple VAPs. + * + mcastq_maxdepth is the maximum depth allowed of the cabq. */ int sc_txq_data_minfree; int sc_txq_mcastq_maxdepth; From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 20:09:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95FE4106564A; Sat, 10 Mar 2012 20:09:03 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 77C268FC08; Sat, 10 Mar 2012 20:09:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2AK938E076266; Sat, 10 Mar 2012 20:09:03 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2AK933r076264; Sat, 10 Mar 2012 20:09:03 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201203102009.q2AK933r076264@svn.freebsd.org> From: Adrian Chadd Date: Sat, 10 Mar 2012 20:09:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232795 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 20:09:03 -0000 Author: adrian Date: Sat Mar 10 20:09:02 2012 New Revision: 232795 URL: http://svn.freebsd.org/changeset/base/232795 Log: Stick the if_drv_flags access (check and modify) behind the ifq lock. Although access to the flags to check/set OACTIVE is racy due to how the default if_start() function works, this should remove any races with read/modify/write between threads. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Sat Mar 10 19:58:23 2012 (r232794) +++ head/sys/dev/ath/if_ath.c Sat Mar 10 20:09:02 2012 (r232795) @@ -2160,8 +2160,9 @@ ath_reset(struct ifnet *ifp, ATH_RESET_T * set this once it detected a concurrent TX was going on. * So, clear it. */ - /* XXX do this inside of IF_LOCK? */ + IF_LOCK(&ifp->if_snd); ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + IF_UNLOCK(&ifp->if_snd); /* Handle any frames in the TX queue */ /* @@ -2293,15 +2294,16 @@ ath_getbuf(struct ath_softc *sc) ATH_TXBUF_LOCK(sc); bf = _ath_getbuf_locked(sc); + ATH_TXBUF_UNLOCK(sc); if (bf == NULL) { struct ifnet *ifp = sc->sc_ifp; DPRINTF(sc, ATH_DEBUG_XMIT, "%s: stop queue\n", __func__); sc->sc_stats.ast_tx_qstop++; - /* XXX do this inside of IF_LOCK? */ + IF_LOCK(&ifp->if_snd); ifp->if_drv_flags |= IFF_DRV_OACTIVE; + IF_UNLOCK(&ifp->if_snd); } - ATH_TXBUF_UNLOCK(sc); return bf; } @@ -2322,9 +2324,10 @@ ath_start(struct ifnet *ifp) if (sc->sc_inreset_cnt > 0) { device_printf(sc->sc_dev, "%s: sc_inreset_cnt > 0; bailing\n", __func__); - /* XXX do this inside of IF_LOCK? */ - ifp->if_drv_flags |= IFF_DRV_OACTIVE; ATH_PCU_UNLOCK(sc); + IF_LOCK(&ifp->if_snd); + ifp->if_drv_flags |= IFF_DRV_OACTIVE; + IF_UNLOCK(&ifp->if_snd); return; } sc->sc_txstart_cnt++; @@ -5008,8 +5011,9 @@ ath_tx_proc_q0(void *arg, int npending) sc->sc_lastrx = ath_hal_gettsf64(sc->sc_ah); if (TXQACTIVE(txqs, sc->sc_cabq->axq_qnum)) ath_tx_processq(sc, sc->sc_cabq, 1); - /* XXX check this inside of IF_LOCK? */ + IF_LOCK(&ifp->if_snd); ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + IF_UNLOCK(&ifp->if_snd); sc->sc_wd_timer = 0; if (sc->sc_softled) @@ -5057,8 +5061,9 @@ ath_tx_proc_q0123(void *arg, int npendin if (nacked) sc->sc_lastrx = ath_hal_gettsf64(sc->sc_ah); - /* XXX check this inside of IF_LOCK? */ + IF_LOCK(&ifp->if_snd); ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + IF_UNLOCK(&ifp->if_snd); sc->sc_wd_timer = 0; if (sc->sc_softled) @@ -5099,7 +5104,9 @@ ath_tx_proc(void *arg, int npending) sc->sc_lastrx = ath_hal_gettsf64(sc->sc_ah); /* XXX check this inside of IF_LOCK? */ + IF_LOCK(&ifp->if_snd); ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + IF_UNLOCK(&ifp->if_snd); sc->sc_wd_timer = 0; if (sc->sc_softled) @@ -5315,8 +5322,9 @@ ath_draintxq(struct ath_softc *sc, ATH_R } } #endif /* ATH_DEBUG */ - /* XXX check this inside of IF_LOCK? */ + IF_LOCK(&ifp->if_snd); ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + IF_UNLOCK(&ifp->if_snd); sc->sc_wd_timer = 0; } @@ -5522,8 +5530,9 @@ finish: ath_hal_intrset(ah, sc->sc_imask); ATH_PCU_UNLOCK(sc); - /* XXX do this inside of IF_LOCK? */ + IF_LOCK(&ifp->if_snd); ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + IF_UNLOCK(&ifp->if_snd); ath_txrx_start(sc); /* XXX ath_start? */ From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 21:08:07 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E3CD1106564A; Sat, 10 Mar 2012 21:08:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CE8218FC17; Sat, 10 Mar 2012 21:08:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2AL87OU078243; Sat, 10 Mar 2012 21:08:07 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2AL8734078240; Sat, 10 Mar 2012 21:08:07 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201203102108.q2AL8734078240@svn.freebsd.org> From: Alexander Motin Date: Sat, 10 Mar 2012 21:08:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232797 - head/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 21:08:08 -0000 Author: mav Date: Sat Mar 10 21:08:07 2012 New Revision: 232797 URL: http://svn.freebsd.org/changeset/base/232797 Log: ServerWorks HT1000 HPET reported to have problems with IRQs >= 16. Lower (ISA) IRQs are working, but allowed mask is not set correctly. Block both by default to allow HP BL465c G6 blade system to boot. Reported by: Attila Nagy MFC after: 1 week Modified: head/sys/dev/acpica/acpi_hpet.c Modified: head/sys/dev/acpica/acpi_hpet.c ============================================================================== --- head/sys/dev/acpica/acpi_hpet.c Sat Mar 10 20:15:40 2012 (r232796) +++ head/sys/dev/acpica/acpi_hpet.c Sat Mar 10 21:08:07 2012 (r232797) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #define HPET_VENDID_AMD 0x4353 #define HPET_VENDID_INTEL 0x8086 #define HPET_VENDID_NVIDIA 0x10de +#define HPET_VENDID_SW 0x1166 ACPI_SERIAL_DECL(hpet, "ACPI HPET support"); @@ -513,6 +514,13 @@ hpet_attach(device_t dev) if (vendor == HPET_VENDID_NVIDIA && rev <= 0x01) sc->allowed_irqs = 0x00000000; /* + * ServerWorks HT1000 reported to have problems with IRQs >= 16. + * Lower IRQs are working, but allowed mask is not set correctly. + * Legacy_route mode works fine. + */ + if (vendor == HPET_VENDID_SW && rev <= 0x01) + sc->allowed_irqs = 0x00000000; + /* * Neither QEMU nor VirtualBox report supported IRQs correctly. * The only way to use HPET there is to specify IRQs manually * and/or use legacy_route. Legacy_route mode works on both. From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 21:58:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0351E106564A; Sat, 10 Mar 2012 21:58:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE3A08FC0A; Sat, 10 Mar 2012 21:58:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2ALw80E080435; Sat, 10 Mar 2012 21:58:08 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2ALw89R080428; Sat, 10 Mar 2012 21:58:08 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201203102158.q2ALw89R080428@svn.freebsd.org> From: Alexander Motin Date: Sat, 10 Mar 2012 21:58:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232798 - in stable/9: share/man/man4 sys/conf sys/dev/sound/pci/hda sys/dev/sound/pcm sys/modules/sound/driver/hda X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 21:58:09 -0000 Author: mav Date: Sat Mar 10 21:58:08 2012 New Revision: 232798 URL: http://svn.freebsd.org/changeset/base/232798 Log: MFC r230130, r230181, r230312, r230326, r230331, r230451, r230465, r230488, r230507, r230511, r230513, r230532, r230537, r230551, r230554, r230571, r230574, r230585, r230641, r230768, r230807, r231024: Sync snd_hda(4) driver with HEAD. This includes major code refactoring, HDMI support, new volume control, automatic recording source selection, runtime reconfigureation, support for more then 4 PCM devices on controller, multichannel recording, additional playback/record streams, higher bandwidths support, more informative device names and many other things. Sponsored by: iXsystems, Inc. Added: stable/9/sys/dev/sound/pci/hda/hdaa.c - copied, changed from r230130, head/sys/dev/sound/pci/hda/hdaa.c stable/9/sys/dev/sound/pci/hda/hdaa.h - copied, changed from r230130, head/sys/dev/sound/pci/hda/hdaa.h stable/9/sys/dev/sound/pci/hda/hdaa_patches.c - copied, changed from r230130, head/sys/dev/sound/pci/hda/hdaa_patches.c stable/9/sys/dev/sound/pci/hda/hdac_if.m - copied, changed from r230130, head/sys/dev/sound/pci/hda/hdac_if.m stable/9/sys/dev/sound/pci/hda/hdacc.c - copied, changed from r230130, head/sys/dev/sound/pci/hda/hdacc.c Modified: stable/9/share/man/man4/snd_hda.4 stable/9/sys/conf/files stable/9/sys/conf/kmod.mk stable/9/sys/dev/sound/pci/hda/hda_reg.h stable/9/sys/dev/sound/pci/hda/hdac.c stable/9/sys/dev/sound/pci/hda/hdac.h stable/9/sys/dev/sound/pci/hda/hdac_private.h stable/9/sys/dev/sound/pci/hda/hdac_reg.h stable/9/sys/dev/sound/pcm/channel.c stable/9/sys/modules/sound/driver/hda/Makefile Directory Properties: stable/9/share/man/man4/ (props changed) stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) Modified: stable/9/share/man/man4/snd_hda.4 ============================================================================== --- stable/9/share/man/man4/snd_hda.4 Sat Mar 10 21:08:07 2012 (r232797) +++ stable/9/share/man/man4/snd_hda.4 Sat Mar 10 21:58:08 2012 (r232798) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 22, 2010 +.Dd January 25, 2012 .Dt SND_HDA 4 .Os .Sh NAME @@ -53,8 +53,9 @@ support for several logical audio device .Pp The .Nm -driver is a HDA bus controller driver and HDA codecs audio functions bridge -driver that allows the generic audio driver, +driver includes HDA bus controller driver (hdac), HDA codec driver (hdacc) +and HDA codecs audio functions bridge driver (hdaa) that allows +the generic audio driver, .Xr sound 4 , to be used with this hardware. Only audio functions are supported by @@ -77,7 +78,9 @@ For example, one device for main rear 7. for independent headset connectors at front and one device for SPDIF or HDMI audio input/output. The assignment of audio inputs and outputs may be tuned with -.Xr device.hints 5 . +.Xr device.hints 5 +or +.Xr sysctl 8 . The driver's verbose boot messages provide a lot of information about the operation of the driver and present audio setup. .Pp @@ -92,19 +95,26 @@ The following variables are available at file: .Bl -tag -width ".Va hint.hdac.%d.config"-offset indent .It Va hint.hdac.%d.config -Configures a range of possible options. +Configures a range of possible controller options. Possible values are: +.Dq Li 64bit , .Dq Li dmapos , +.Dq Li msi . +An option prefixed with +.Dq Li no , +such as +.Dq Li nomsi , +will do the opposite and takes precedence. +Options can be separated by whitespace and commas. +.It Va hint.hdac.%d.msi +Controls MSI (Message Signaled Interrupts) support. +.It Va hint.hdac.%d.cad%d.nid%d.config +Same as +.Va hint.hdaa.%d.nid%d.config +.It Va hint.hdaa.%d.config +Configures a range of possible audio function options. +Possible values are: .Dq Li eapdinv , -.Dq Li gpio0 , -.Dq Li gpio1 , -.Dq Li gpio2 , -.Dq Li gpio3 , -.Dq Li gpio4 , -.Dq Li gpio5 , -.Dq Li gpio6 , -.Dq Li gpio7 , -.Dq Li gpioflush , .Dq Li ivref , .Dq Li ivref50 , .Dq Li ivref80 , @@ -126,27 +136,64 @@ such as will do the opposite and takes precedence. Options can be separated by whitespace and commas. .Pp +The +.Dq Li eapdinv +option inverts External Amplifier Power Down signal. +The +.Dq Li fixedrate +denies all sampling rates except 48KHz. +The +.Dq Li forcestereo +denies mono playback/recording. +The +.Dq Li senseinv +option inverts jack sensing logic. +The +.Dq Li ivref Ns Ar X +and +.Dq Li ovref Ns Ar X +options control the voltage used to power external microphones. +.It Va hint.hdaa.%d.gpio_config +Overrides audio function GPIO pins configuration set by BIOS. +May be specified as a set of space-separated +.Dq Ar num Ns = Ns Ar value +pairs, where +.Ar num +is GPIO line number, and +.Ar value +is one of: +.Dq Li keep , +.Dq Li set , +.Dq Li clear , +.Dq Li disable +and +.Dq Li input . +.Pp .Dq Li GPIO Ns s are a codec's General Purpose I/O pins which system integrators sometimes use to control external muters, amplifiers and so on. If you have no sound, or sound volume is not adequate, you may have to experiment a bit with the GPIO setup to find the optimal setup for your system. -.Pp -The -.Dq Li ivref Ns Ar X -and -.Dq Li ovref Ns Ar X -options control the voltage used to power external microphones. -.It Va hint.hdac.%d.msi -Controls MSI (Message Signaled Interrupts) support. -.It Va hint.hdac.%d.cad%d.nid%d.config -Overrides codec pin configuration set by BIOS. +.It Va hint.hdaa.%d.nid%d.config +Overrides audio function pin configuration set by BIOS. May be specified as a 32-bit hexadecimal value with a leading .Dq 0x , or as a set of space-separated .Dq Ar option Ns = Ns Ar value pairs. +.It Va hint.pcm.%d.rec.autosrc +Controls automatic recording source feature: +.Bl -tag -compact +.It 0 +disabled, +.It 1 +once on attach, +.It 2 +enabled. +.El +When enabled, driver will automatically set recording source of the mixer to +connected input using jack presence detection statuses. .El .Pp Pin configuration is the UAA driver's main source of information about codec @@ -165,7 +212,7 @@ The following options are supported: Association number. Associations are used to group individual pins to form a complex multi-pin device. -For example, to group 4 connectors for 7.1 output, or to treat several +For example, to group 4 connectors for 7.1 input/output, or to treat several input connectors as sources for the same input device. Association numbers can be specified as numeric values from 0 to 15. A value of 0 means disabled pin. @@ -180,16 +227,22 @@ A unique, per-association number used to particular association. Sequence numbers can be specified as numeric values from 0 to 15. .Pp -For output assotiations sequence numbers encode speaker pairs positions: -0 - Front, 1 - Center/LFE, 2 - Back, 3 - Front Wide Center, 4 - Side. -Standard combinations are: (0) - Stereo; (0, 2), (0, 4) - Quadro; -(0, 1, 2), (0, 1, 4) - 5.1; (0, 1, 2, 4) - 7.1. -.Pp The sequence number 15 has a special meaning for output associations. Output pins with this number and device type .Dq Ar Headphones will duplicate (with automatic mute if jack detection is supported) the first pin in that association. +.Pp +The sequence numbers 14 and 15 has a special meaning for input associations. +Their presence in association defines it as multiplexed or mixed respectively. +If none of them present and there are more then one pin in association, +the association will provide multichannel input. +.Pp +For multichannel input/output assotiations sequence numbers encode +channel pairs positions: +0 - Front, 1 - Center/LFE, 2 - Back, 3 - Front Wide Center, 4 - Side. +Standard combinations are: (0) - Stereo; (0, 2), (0, 4) - Quadro; +(0, 1, 2), (0, 1, 4) - 5.1; (0, 1, 2, 4) - 7.1. .It Va device Device type. Can be specified as a number from 0 to 15 or as a name: @@ -278,7 +331,11 @@ The following variables are available in addition to those available to all .Xr sound 4 devices: -.Bl -tag -width ".Va dev.hdac.%d.polling" -offset indent +.Bl -tag -width ".Va dev.hdaa.%d.nid%d_original" -offset indent +.It Va dev.hdac.%d.pindump +Setting this to a non-zero value dumps the current pin configuration, main +capabilities and jack sense status of all audio functions on the controller +to console and syslog. .It Va dev.hdac.%d.polling Enables polling mode. In this mode the driver operates by querying the device state on timer @@ -288,11 +345,40 @@ instead of interrupts. Polling is disabled by default. Do not enable it unless you are facing weird interrupt problems or if the device cannot generate interrupts at all. -.It Va dev.hdac.%d.polling_interval -Controller/Jack Sense polling interval (1-1000 ms) -.It Va dev.hdac.%d.pindump -Setting this to a non-zero value dumps the current pin configuration, main -capabilities and jack sense status to console and syslog. +.It Va dev.hdaa.%d.config +Run-time equivalent of the +.Va hint.hdaa.%d.config +tunable. +.It Va dev.hdaa.%d.gpi_state +Current state of GPI lines. +.It Va dev.hdaa.%d.gpio_state +Current state of GPIO lines. +.It Va dev.hdaa.%d.gpio_config +Run-time equivalent of the +.Va hint.hdaa.%d.gpio.config +tunable. +.It Va dev.hdaa.%d.gpo_state +Current state of GPO lines. +.It Va dev.hdaa.%d.nid%d_config +Run-time equivalent of the +.Va hint.hdaa.%d.nid%d.config +tunable. +.It Va dev.hdaa.%d.nid%d_original +Original pin configuration written by BIOS. +.It Va dev.hdaa.%d.reconfig +Setting this to a non-zero value makes driver to destroy existing pcm devices +and process new pins configuration set via +.Va dev.hdaa.%d.nid%d_config. +.It Va dev.pcm.%d.play.32bit , dev.pcm.%d.rec.32bit +HDA controller uses 32bit representation for all samples of more then 16 bits. +These variables allow to specify how many bits of these 32 should be +used by CODEC. +Depending on codec capabilities, possible values are 20, 24 and 32 bit. +The default value is 24. +.It Va dev.pcm.%d.rec.autosrc +Run-time equivalent of the +.Va hint.pcm.%d.rec.autosrc +tunable. .El .Sh EXAMPLES Taking HP Compaq DX2300 with Realtek ALC888 HDA codec for example. @@ -307,22 +393,23 @@ So high codec uniformity and flexibility different ways, depending on requested pins usage described by pins configuration. The driver reports such default pin configuration when verbose messages enabled: .Bd -literal -hdac0: nid 20 0x01014020 as 2 seq 0 Line-out Jack jack 1 loc 1 color Green misc 0 -hdac0: nid 21 0x99130110 as 1 seq 0 Speaker Fixed jack 3 loc 25 color Unknown misc 1 -hdac0: nid 22 0x411111f0 as 15 seq 0 Speaker None jack 1 loc 1 color Black misc 1 -hdac0: nid 23 0x411111f0 as 15 seq 0 Speaker None jack 1 loc 1 color Black misc 1 -hdac0: nid 24 0x01a19830 as 3 seq 0 Mic Jack jack 1 loc 1 color Pink misc 8 -hdac0: nid 25 0x02a1983f as 3 seq 15 Mic Jack jack 1 loc 2 color Pink misc 8 -hdac0: nid 26 0x01813031 as 3 seq 1 Line-in Jack jack 1 loc 1 color Blue misc 0 -hdac0: nid 27 0x0221401f as 1 seq 15 Headphones Jack jack 1 loc 2 color Green misc 0 -hdac0: nid 28 0x411111f0 as 15 seq 0 Speaker None jack 1 loc 1 color Black misc 1 -hdac0: nid 30 0x411111f0 as 15 seq 0 Speaker None jack 1 loc 1 color Black misc 1 -hdac0: nid 31 0x411111f0 as 15 seq 0 Speaker None jack 1 loc 1 color Black misc 1 +hdaa0: nid 0x as seq device conn jack loc color misc +hdaa0: 20 01014020 2 0 Line-out Jack 1/8 Rear Green 0 +hdaa0: 21 99130110 1 0 Speaker Fixed ATAPI Onboard Unknown 1 +hdaa0: 22 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA +hdaa0: 23 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA +hdaa0: 24 01a19830 3 0 Mic Jack 1/8 Rear Pink 8 +hdaa0: 25 02a1983f 3 15 Mic Jack 1/8 Front Pink 8 +hdaa0: 26 01813031 3 1 Line-in Jack 1/8 Rear Blue 0 +hdaa0: 27 0221401f 1 15 Headphones Jack 1/8 Front Green 0 +hdaa0: 28 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA +hdaa0: 30 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA +hdaa0: 31 411111f0 15 0 Speaker None 1/8 Rear Black 1 DISA .Ed .Pp Here we can see, that the nodes with ID (nid) 25 and 27 are front panel -connectors (Jack, loc 2), nids 20, 24 and 26 are rear panel connectors -(Jack, loc 1) and nid 21 is a built-in speaker (Fixed, loc 25). +connectors (Jack, Front), nids 20, 24 and 26 are rear panel connectors +(Jack, Rear) and nid 21 is a built-in speaker (Fixed, Onboard). Pins with nids 22, 23, 28, 30 and 31 will be disabled by driver due to "None" connectivity. So the pin count and description matches to connectors that we have. @@ -330,15 +417,15 @@ we have. Using association (as) and sequence (seq) fields values pins are grouped into 3 associations: .Bd -literal -hdac0: Association 0 (1) out: -hdac0: Pin nid=21 seq=0 -hdac0: Pin nid=27 seq=15 -hdac0: Association 1 (2) out: -hdac0: Pin nid=20 seq=0 -hdac0: Association 2 (3) in: -hdac0: Pin nid=24 seq=0 -hdac0: Pin nid=26 seq=1 -hdac0: Pin nid=25 seq=15 +hdaa0: Association 0 (1) out: +hdaa0: Pin nid=21 seq=0 +hdaa0: Pin nid=27 seq=15 +hdaa0: Association 1 (2) out: +hdaa0: Pin nid=20 seq=0 +hdaa0: Association 2 (3) in: +hdaa0: Pin nid=24 seq=0 +hdaa0: Pin nid=26 seq=1 +hdaa0: Pin nid=25 seq=15 .Ed .Pp Each @@ -497,148 +584,14 @@ Most of controls use logarithmic scale. .Sh HARDWARE The .Nm -driver supports many Intel HDA compatible audio chipsets including the -following: +driver supports controllers having PCI class 4 (multimedia) and +subclass 3 (HDA), compatible with Intel HDA specification. .Pp -.Bl -bullet -compact -.It -ATI SB450 -.It -ATI SB600 -.It -Intel 631x/632xESB -.It -Intel 82801F (ICH6) -.It -Intel 82801G (ICH7) -.It -Intel 82801H (ICH8) -.It -Intel 82801I (ICH9) -.It -Intel 82801J (ICH10) -.It -Intel US15W (SCH) -.It -nVidia MCP51 -.It -nVidia MCP55 -.It -nVidia MCP61A -.It -nVidia MCP61B -.It -nVidia MCP63 -.It -nVidia MCP65A -.It -nVidia MCP65B -.It -nVidia MCP67A -.It -nVidia MCP67B -.It -nVidia MCP68 -.It -nVidia MCP69 -.It -nVidia MCP73 -.It -nVidia MCP78 -.It -nVidia MCP79 -.It -nVidia MCP89 -.It -SiS 966 -.It -VIA VT8251/8237A -.El -.Pp -The following and many other codecs have been verified to work: -.Pp -.Bl -bullet -compact -.It -Analog Devices AD1981HD -.It -Analog Devices AD1983 -.It -Analog Devices AD1984 -.It -Analog Devices AD1986A -.It -Analog Devices AD1988 -.It -Analog Devices AD1988B -.It -CMedia CMI9880 -.It -Conexant CX20549 (Venice) -.It -Conexant CX20551 (Waikiki) -.It -Conexant CX20561 (Hermosa) -.It -Realtek ALC260 -.It -Realtek ALC262 -.It -Realtek ALC268 -.It -Realtek ALC660 -.It -Realtek ALC861 -.It -Realtek ALC861VD -.It -Realtek ALC880 -.It -Realtek ALC882 -.It -Realtek ALC883 -.It -Realtek ALC885 -.It -Realtek ALC888 -.It -Realtek ALC889 -.It -Sigmatel STAC9205 -.It -Sigmatel STAC9220 -.It -Sigmatel STAC9220D / 9223D -.It -Sigmatel STAC9221 -.It -Sigmatel STAC9221D -.It -Sigmatel STAC9227D -.It -Sigmatel STAC9227X -.It -Sigmatel STAC9228D -.It -Sigmatel STAC9228X -.It -Sigmatel STAC9229D -.It -Sigmatel STAC9229X -.It -Sigmatel STAC9230D -.It -Sigmatel STAC9230X -.It -Sigmatel STAC9271D -.It -Sigmatel STAC9872AK -.It -VIA VT1708 -.It -VIA VT1708B -.It -VIA VT1709 -.El +The +.Nm +driver supports more then two hundred different controllers and CODECs. +There is no sense to list all of them here, as in most cases specific CODEC +configuration and wiring are more important then type of the CODEC itself. .Sh SEE ALSO .Xr sound 4 , .Xr snd_ich 4 , @@ -665,19 +618,17 @@ This manual page was written by and .An Giorgos Keramidas Aq keramida@FreeBSD.org . .Sh BUGS -A few Hardware/OEM vendors tend to screw up BIOS settings, thus -rendering the -.Nm -driver useless. -This usually results in a state where the +Some Hardware/OEM vendors tend to screw up BIOS settings or use custom +unusual CODEC wiring that create problems to the driver. +This may result in missing pcm devices, or a state where the .Nm driver seems to attach and work, but no sound is played. Some cases can be solved by tuning .Pa loader.conf variables. -Before trying to fix problem that way, make sure that there really is a problem -and that the PCM audio device in use really corresponds to the expected -audio connector. +But before trying to fix problem that way, make sure that there really is +a problem and that the PCM audio device in use really corresponds to the +expected audio connector. .Pp Some vendors use non-standardized General Purpose I/O (GPIO) pins of the codec to control external amplifiers. Modified: stable/9/sys/conf/files ============================================================================== --- stable/9/sys/conf/files Sat Mar 10 21:08:07 2012 (r232797) +++ stable/9/sys/conf/files Sat Mar 10 21:58:08 2012 (r232798) @@ -1749,7 +1749,11 @@ dev/sound/pci/t4dwave.c optional snd_t4 dev/sound/pci/via8233.c optional snd_via8233 pci dev/sound/pci/via82c686.c optional snd_via82c686 pci dev/sound/pci/vibes.c optional snd_vibes pci +dev/sound/pci/hda/hdaa.c optional snd_hda pci +dev/sound/pci/hda/hdaa_patches.c optional snd_hda pci dev/sound/pci/hda/hdac.c optional snd_hda pci +dev/sound/pci/hda/hdac_if.m optional snd_hda pci +dev/sound/pci/hda/hdacc.c optional snd_hda pci dev/sound/pcm/ac97.c optional sound dev/sound/pcm/ac97_if.m optional sound dev/sound/pcm/ac97_patch.c optional sound Modified: stable/9/sys/conf/kmod.mk ============================================================================== --- stable/9/sys/conf/kmod.mk Sat Mar 10 21:08:07 2012 (r232797) +++ stable/9/sys/conf/kmod.mk Sat Mar 10 21:58:08 2012 (r232798) @@ -348,6 +348,7 @@ MFILES?= dev/acpica/acpi_if.m dev/acpi_s dev/mii/miibus_if.m dev/mvs/mvs_if.m dev/ofw/ofw_bus_if.m \ dev/pccard/card_if.m dev/pccard/power_if.m dev/pci/pci_if.m \ dev/pci/pcib_if.m dev/ppbus/ppbus_if.m dev/smbus/smbus_if.m \ + dev/sound/pci/hda/hdac_if.m \ dev/sound/pcm/ac97_if.m dev/sound/pcm/channel_if.m \ dev/sound/pcm/feeder_if.m dev/sound/pcm/mixer_if.m \ dev/sound/midi/mpu_if.m dev/sound/midi/mpufoi_if.m \ Modified: stable/9/sys/dev/sound/pci/hda/hda_reg.h ============================================================================== --- stable/9/sys/dev/sound/pci/hda/hda_reg.h Sat Mar 10 21:08:07 2012 (r232797) +++ stable/9/sys/dev/sound/pci/hda/hda_reg.h Sat Mar 10 21:58:08 2012 (r232798) @@ -400,7 +400,7 @@ HDA_CMD_GET_UNSOLICITED_RESPONSE_TAG_SHIFT) #define HDA_CMD_SET_UNSOLICITED_RESPONSE_ENABLE 0x80 -#define HDA_CMD_SET_UNSOLICITED_RESPONSE_TAG_MASK 0x1f +#define HDA_CMD_SET_UNSOLICITED_RESPONSE_TAG_MASK 0x3f #define HDA_CMD_SET_UNSOLICITED_RESPONSE_TAG_SHIFT 0 #define HDA_CMD_SET_UNSOLICITED_RESPONSE_TAG(param) \ @@ -418,14 +418,11 @@ (HDA_CMD_12BIT((cad), (nid), \ HDA_CMD_VERB_SET_PIN_SENSE, (payload))) -#define HDA_CMD_GET_PIN_SENSE_PRESENCE_DETECT_MASK 0x80000000 -#define HDA_CMD_GET_PIN_SENSE_PRESENCE_DETECT_SHIFT 31 +#define HDA_CMD_GET_PIN_SENSE_PRESENCE_DETECT 0x80000000 +#define HDA_CMD_GET_PIN_SENSE_ELD_VALID 0x40000000 #define HDA_CMD_GET_PIN_SENSE_IMP_SENSE_MASK 0x7fffffff #define HDA_CMD_GET_PIN_SENSE_IMP_SENSE_SHIFT 0 -#define HDA_CMD_GET_PIN_SENSE_PRESENCE_DETECT(rsp) \ - (((rsp) & HDA_CMD_GET_PIN_SENSE_PRESENCE_DETECT_MASK) >> \ - HDA_CMD_GET_PIN_SENSE_PRESENCE_DETECT_SHIFT) #define HDA_CMD_GET_PIN_SENSE_IMP_SENSE(rsp) \ (((rsp) & HDA_CMD_GET_PIN_SENSE_IMP_SENSE_MASK) >> \ HDA_CMD_GET_PIN_SENSE_IMP_SENSE_SHIFT) @@ -679,17 +676,47 @@ HDA_CMD_VERB_SET_CONV_CHAN_COUNT, (payload))) #define HDA_CMD_VERB_GET_HDMI_DIP_SIZE 0xf2e + +#define HDA_CMD_GET_HDMI_DIP_SIZE(cad, nid, arg) \ + (HDA_CMD_12BIT((cad), (nid), \ + HDA_CMD_VERB_GET_HDMI_DIP_SIZE, (arg))) + #define HDA_CMD_VERB_GET_HDMI_ELDD 0xf2f +#define HDA_CMD_GET_HDMI_ELDD(cad, nid, off) \ + (HDA_CMD_12BIT((cad), (nid), \ + HDA_CMD_VERB_GET_HDMI_ELDD, (off))) + #define HDA_CMD_VERB_GET_HDMI_DIP_INDEX 0xf30 #define HDA_CMD_VERB_SET_HDMI_DIP_INDEX 0x730 +#define HDA_CMD_GET_HDMI_DIP_INDEX(cad, nid) \ + (HDA_CMD_12BIT((cad), (nid), \ + HDA_CMD_VERB_GET_HDMI_DIP_INDEX, 0x0)) +#define HDA_CMD_SET_HDMI_DIP_INDEX(cad, nid, payload) \ + (HDA_CMD_12BIT((cad), (nid), \ + HDA_CMD_VERB_SET_HDMI_DIP_INDEX, (payload))) + #define HDA_CMD_VERB_GET_HDMI_DIP_DATA 0xf31 #define HDA_CMD_VERB_SET_HDMI_DIP_DATA 0x731 +#define HDA_CMD_GET_HDMI_DIP_DATA(cad, nid) \ + (HDA_CMD_12BIT((cad), (nid), \ + HDA_CMD_VERB_GET_HDMI_DIP_DATA, 0x0)) +#define HDA_CMD_SET_HDMI_DIP_DATA(cad, nid, payload) \ + (HDA_CMD_12BIT((cad), (nid), \ + HDA_CMD_VERB_SET_HDMI_DIP_DATA, (payload))) + #define HDA_CMD_VERB_GET_HDMI_DIP_XMIT 0xf32 #define HDA_CMD_VERB_SET_HDMI_DIP_XMIT 0x732 +#define HDA_CMD_GET_HDMI_DIP_XMIT(cad, nid) \ + (HDA_CMD_12BIT((cad), (nid), \ + HDA_CMD_VERB_GET_HDMI_DIP_XMIT, 0x0)) +#define HDA_CMD_SET_HDMI_DIP_XMIT(cad, nid, payload) \ + (HDA_CMD_12BIT((cad), (nid), \ + HDA_CMD_VERB_SET_HDMI_DIP_XMIT, (payload))) + #define HDA_CMD_VERB_GET_HDMI_CP_CTRL 0xf33 #define HDA_CMD_VERB_SET_HDMI_CP_CTRL 0x733 @@ -703,6 +730,23 @@ (HDA_CMD_12BIT((cad), (nid), \ HDA_CMD_VERB_SET_HDMI_CHAN_SLOT, (payload))) +#define HDA_HDMI_CODING_TYPE_REF_STREAM_HEADER 0 +#define HDA_HDMI_CODING_TYPE_LPCM 1 +#define HDA_HDMI_CODING_TYPE_AC3 2 +#define HDA_HDMI_CODING_TYPE_MPEG1 3 +#define HDA_HDMI_CODING_TYPE_MP3 4 +#define HDA_HDMI_CODING_TYPE_MPEG2 5 +#define HDA_HDMI_CODING_TYPE_AACLC 6 +#define HDA_HDMI_CODING_TYPE_DTS 7 +#define HDA_HDMI_CODING_TYPE_ATRAC 8 +#define HDA_HDMI_CODING_TYPE_SACD 9 +#define HDA_HDMI_CODING_TYPE_EAC3 10 +#define HDA_HDMI_CODING_TYPE_DTS_HD 11 +#define HDA_HDMI_CODING_TYPE_MLP 12 +#define HDA_HDMI_CODING_TYPE_DST 13 +#define HDA_HDMI_CODING_TYPE_WMAPRO 14 +#define HDA_HDMI_CODING_TYPE_REF_CTX 15 + /* Function Reset */ #define HDA_CMD_VERB_FUNCTION_RESET 0x7ff Copied and modified: stable/9/sys/dev/sound/pci/hda/hdaa.c (from r230130, head/sys/dev/sound/pci/hda/hdaa.c) ============================================================================== --- head/sys/dev/sound/pci/hda/hdaa.c Sun Jan 15 13:21:36 2012 (r230130, copy source) +++ stable/9/sys/dev/sound/pci/hda/hdaa.c Sat Mar 10 21:58:08 2012 (r232798) @@ -74,17 +74,6 @@ static const struct { #define HDAA_QUIRKS_TAB_LEN \ (sizeof(hdaa_quirks_tab) / sizeof(hdaa_quirks_tab[0])) -#define HDA_BDL_MIN 2 -#define HDA_BDL_MAX 256 -#define HDA_BDL_DEFAULT HDA_BDL_MIN - -#define HDA_BLK_MIN HDA_DMA_ALIGNMENT -#define HDA_BLK_ALIGN (~(HDA_BLK_MIN - 1)) - -#define HDA_BUFSZ_MIN 4096 -#define HDA_BUFSZ_MAX 65536 -#define HDA_BUFSZ_DEFAULT 16384 - #define HDA_PARSE_MAXDEPTH 10 MALLOC_DEFINE(M_HDAA, "hdaa", "HDA Audio"); @@ -116,6 +105,12 @@ const char *HDA_LOCS[64] = { const char *HDA_GPIO_ACTIONS[8] = { "keep", "set", "clear", "disable", "input", "0x05", "0x06", "0x07"}; +const char *HDA_HDMI_CODING_TYPES[18] = { + "undefined", "LPCM", "AC-3", "MPEG1", "MP3", "MPEG2", "AAC-LC", "DTS", + "ATRAC", "DSD", "E-AC-3", "DTS-HD", "MLP", "DST", "WMAPro", "HE-AAC", + "HE-AACv2", "MPEG-Surround" +}; + /* Default */ static uint32_t hdaa_fmt[] = { SND_FORMAT(AFMT_S16_LE, 2, 0), @@ -169,6 +164,8 @@ static const struct { }; #define HDA_RATE_TAB_LEN (sizeof(hda_rate_tab) / sizeof(hda_rate_tab[0])) +const static char *ossnames[] = SOUND_DEVICE_NAMES; + /**************************************************************************** * Function prototypes ****************************************************************************/ @@ -187,7 +184,6 @@ static void hdaa_dump_pin_config(struct static char * hdaa_audio_ctl_ossmixer_mask2allname(uint32_t mask, char *buf, size_t len) { - static char *ossname[] = SOUND_DEVICE_NAMES; int i, first = 1; bzero(buf, len); @@ -195,7 +191,7 @@ hdaa_audio_ctl_ossmixer_mask2allname(uin if (mask & (1 << i)) { if (first == 0) strlcat(buf, ", ", len); - strlcat(buf, ossname[i], len); + strlcat(buf, ossnames[i], len); first = 0; } } @@ -243,49 +239,30 @@ hdaa_audio_ctl_amp_get(struct hdaa_devin } /* - * Jack detection (Speaker/HP redirection) event handler. + * Headphones redirection change handler. */ static void -hdaa_hp_switch_handler(struct hdaa_devinfo *devinfo, int asid) +hdaa_hpredir_handler(struct hdaa_widget *w) { - struct hdaa_audio_as *as; - struct hdaa_widget *w; + struct hdaa_devinfo *devinfo = w->devinfo; + struct hdaa_audio_as *as = &devinfo->as[w->bindas]; + struct hdaa_widget *w1; struct hdaa_audio_ctl *ctl; - uint32_t val, res; - int j; - - as = &devinfo->as[asid]; - if (as->hpredir < 0) - return; - - w = hdaa_widget_get(devinfo, as->pins[15]); - if (w == NULL || w->enable == 0 || w->type != - HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) - return; - - res = hda_command(devinfo->dev, - HDA_CMD_GET_PIN_SENSE(0, as->pins[15])); - - HDA_BOOTVERBOSE( - device_printf(devinfo->dev, - "Pin sense: nid=%d sence=0x%08x", - as->pins[15], res); - ); - - res = (res & HDA_CMD_GET_PIN_SENSE_PRESENCE_DETECT) != 0; - if (devinfo->quirks & HDAA_QUIRK_SENSEINV) - res ^= 1; + uint32_t val; + int j, connected = w->wclass.pin.connected; HDA_BOOTVERBOSE( - printf(" %sconnected\n", res == 0 ? "dis" : ""); + device_printf((as->pdevinfo && as->pdevinfo->dev) ? + as->pdevinfo->dev : devinfo->dev, + "Redirect output to: %s\n", + connected ? "headphones": "main"); ); - /* (Un)Mute headphone pin. */ ctl = hdaa_audio_ctl_amp_get(devinfo, - as->pins[15], HDAA_CTL_IN, -1, 1); + w->nid, HDAA_CTL_IN, -1, 1); if (ctl != NULL && ctl->mute) { /* If pin has muter - use it. */ - val = (res != 0) ? 0 : 1; + val = connected ? 0 : 1; if (val != ctl->forcemute) { ctl->forcemute = val; hdaa_audio_ctl_amp_set(ctl, @@ -294,21 +271,17 @@ hdaa_hp_switch_handler(struct hdaa_devin } } else { /* If there is no muter - disable pin output. */ - w = hdaa_widget_get(devinfo, as->pins[15]); - if (w != NULL && w->type == - HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) { - if (res != 0) - val = w->wclass.pin.ctrl | - HDA_CMD_SET_PIN_WIDGET_CTRL_OUT_ENABLE; - else - val = w->wclass.pin.ctrl & - ~HDA_CMD_SET_PIN_WIDGET_CTRL_OUT_ENABLE; - if (val != w->wclass.pin.ctrl) { - w->wclass.pin.ctrl = val; - hda_command(devinfo->dev, - HDA_CMD_SET_PIN_WIDGET_CTRL(0, - w->nid, w->wclass.pin.ctrl)); - } + if (connected) + val = w->wclass.pin.ctrl | + HDA_CMD_SET_PIN_WIDGET_CTRL_OUT_ENABLE; + else + val = w->wclass.pin.ctrl & + ~HDA_CMD_SET_PIN_WIDGET_CTRL_OUT_ENABLE; + if (val != w->wclass.pin.ctrl) { + w->wclass.pin.ctrl = val; + hda_command(devinfo->dev, + HDA_CMD_SET_PIN_WIDGET_CTRL(0, + w->nid, w->wclass.pin.ctrl)); } } /* (Un)Mute other pins. */ @@ -319,7 +292,7 @@ hdaa_hp_switch_handler(struct hdaa_devin as->pins[j], HDAA_CTL_IN, -1, 1); if (ctl != NULL && ctl->mute) { /* If pin has muter - use it. */ - val = (res != 0) ? 1 : 0; + val = connected ? 1 : 0; if (val == ctl->forcemute) continue; ctl->forcemute = val; @@ -329,32 +302,142 @@ hdaa_hp_switch_handler(struct hdaa_devin continue; } /* If there is no muter - disable pin output. */ - w = hdaa_widget_get(devinfo, as->pins[j]); - if (w != NULL && w->type == - HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) { - if (res != 0) - val = w->wclass.pin.ctrl & + w1 = hdaa_widget_get(devinfo, as->pins[j]); + if (w1 != NULL) { + if (connected) + val = w1->wclass.pin.ctrl & ~HDA_CMD_SET_PIN_WIDGET_CTRL_OUT_ENABLE; else - val = w->wclass.pin.ctrl | + val = w1->wclass.pin.ctrl | HDA_CMD_SET_PIN_WIDGET_CTRL_OUT_ENABLE; - if (val != w->wclass.pin.ctrl) { - w->wclass.pin.ctrl = val; + if (val != w1->wclass.pin.ctrl) { + w1->wclass.pin.ctrl = val; hda_command(devinfo->dev, HDA_CMD_SET_PIN_WIDGET_CTRL(0, - w->nid, w->wclass.pin.ctrl)); + w1->nid, w1->wclass.pin.ctrl)); } } } } /* - * Callback for poll based jack detection. + * Recording source change handler. + */ +static void +hdaa_autorecsrc_handler(struct hdaa_audio_as *as, struct hdaa_widget *w) +{ + struct hdaa_pcm_devinfo *pdevinfo = as->pdevinfo; + struct hdaa_devinfo *devinfo; + struct hdaa_widget *w1; + int i, mask, fullmask, prio, bestprio; + char buf[128]; + + if (!as->mixed || pdevinfo == NULL || pdevinfo->mixer == NULL) + return; + /* Don't touch anything if we asked not to. */ + if (pdevinfo->autorecsrc == 0 || + (pdevinfo->autorecsrc == 1 && w != NULL)) + return; + /* Don't touch anything if "mix" or "speaker" selected. */ + if (pdevinfo->recsrc & (SOUND_MASK_IMIX | SOUND_MASK_SPEAKER)) + return; + /* Don't touch anything if several selected. */ + if (ffs(pdevinfo->recsrc) != fls(pdevinfo->recsrc)) + return; + devinfo = pdevinfo->devinfo; + mask = fullmask = 0; + bestprio = 0; + for (i = 0; i < 16; i++) { + if (as->pins[i] <= 0) + continue; + w1 = hdaa_widget_get(devinfo, as->pins[i]); + if (w1 == NULL || w1->enable == 0) + continue; + if (w1->wclass.pin.connected == 0) + continue; + prio = (w1->wclass.pin.connected == 1) ? 2 : 1; + if (prio < bestprio) + continue; + if (prio > bestprio) { + mask = 0; + bestprio = prio; + } + mask |= (1 << w1->ossdev); + fullmask |= (1 << w1->ossdev); + } + if (mask == 0) + return; + /* Prefer newly connected input. */ + if (w != NULL && (mask & (1 << w->ossdev))) + mask = (1 << w->ossdev); + /* Prefer previously selected input */ + if (mask & pdevinfo->recsrc) + mask &= pdevinfo->recsrc; + /* Prefer mic. */ + if (mask & SOUND_MASK_MIC) + mask = SOUND_MASK_MIC; + /* Prefer monitor (2nd mic). */ + if (mask & SOUND_MASK_MONITOR) + mask = SOUND_MASK_MONITOR; + /* Just take first one. */ + mask = (1 << (ffs(mask) - 1)); + HDA_BOOTVERBOSE( + hdaa_audio_ctl_ossmixer_mask2allname(mask, buf, sizeof(buf)); + device_printf(pdevinfo->dev, + "Automatically set rec source to: %s\n", buf); + ); + hdaa_unlock(devinfo); + mix_setrecsrc(pdevinfo->mixer, mask); + hdaa_lock(devinfo); +} + +/* + * Jack presence detection event handler. + */ +static void +hdaa_presence_handler(struct hdaa_widget *w) +{ + struct hdaa_devinfo *devinfo = w->devinfo; + struct hdaa_audio_as *as; + uint32_t res; + int connected; + + if (w->enable == 0 || w->type != + HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) + return; + + if (HDA_PARAM_PIN_CAP_PRESENCE_DETECT_CAP(w->wclass.pin.cap) == 0 || + (HDA_CONFIG_DEFAULTCONF_MISC(w->wclass.pin.config) & 1) != 0) + return; + + res = hda_command(devinfo->dev, HDA_CMD_GET_PIN_SENSE(0, w->nid)); + connected = (res & HDA_CMD_GET_PIN_SENSE_PRESENCE_DETECT) != 0; + if (devinfo->quirks & HDAA_QUIRK_SENSEINV) + connected = !connected; + if (connected == w->wclass.pin.connected) + return; + w->wclass.pin.connected = connected; + HDA_BOOTVERBOSE( + device_printf(devinfo->dev, + "Pin sense: nid=%d sence=0x%08x (%sconnected)\n", + w->nid, res, !w->wclass.pin.connected ? "dis" : ""); + ); + + as = &devinfo->as[w->bindas]; + if (as->hpredir >= 0 && as->pins[15] == w->nid) + hdaa_hpredir_handler(w); + if (as->dir == HDAA_CTL_IN) + hdaa_autorecsrc_handler(as, w); +} + +/* + * Callback for poll based presence detection. */ static void hdaa_jack_poll_callback(void *arg) { struct hdaa_devinfo *devinfo = arg; + struct hdaa_widget *w; int i; hdaa_lock(devinfo); @@ -365,56 +448,203 @@ hdaa_jack_poll_callback(void *arg) for (i = 0; i < devinfo->ascnt; i++) { if (devinfo->as[i].hpredir < 0) continue; - hdaa_hp_switch_handler(devinfo, i); + w = hdaa_widget_get(devinfo, devinfo->as[i].pins[15]); + if (w == NULL || w->enable == 0 || w->type != + HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) + continue; + hdaa_presence_handler(w); } callout_reset(&devinfo->poll_jack, devinfo->poll_ival, hdaa_jack_poll_callback, devinfo); hdaa_unlock(devinfo); } +static void +hdaa_eld_dump(struct hdaa_widget *w) +{ + struct hdaa_devinfo *devinfo = w->devinfo; + device_t dev = devinfo->dev; + uint8_t *sad; + int len, mnl, i, sadc, fmt; + + if (w->eld == NULL || w->eld_len < 4) + return; + device_printf(dev, + "ELD nid=%d: ELD_Ver=%u Baseline_ELD_Len=%u\n", + w->nid, w->eld[0] >> 3, w->eld[2]); + if ((w->eld[0] >> 3) != 0x02) + return; + len = min(w->eld_len, (u_int)w->eld[2] * 4); + mnl = w->eld[4] & 0x1f; + device_printf(dev, + "ELD nid=%d: CEA_EDID_Ver=%u MNL=%u\n", + w->nid, w->eld[4] >> 5, mnl); + sadc = w->eld[5] >> 4; + device_printf(dev, + "ELD nid=%d: SAD_Count=%u Conn_Type=%u S_AI=%u HDCP=%u\n", + w->nid, sadc, (w->eld[5] >> 2) & 0x3, + (w->eld[5] >> 1) & 0x1, w->eld[5] & 0x1); + device_printf(dev, + "ELD nid=%d: Aud_Synch_Delay=%ums\n", + w->nid, w->eld[6] * 2); + device_printf(dev, + "ELD nid=%d: Channels=0x%b\n", + w->nid, w->eld[7], + "\020\07RLRC\06FLRC\05RC\04RLR\03FC\02LFE\01FLR"); + device_printf(dev, + "ELD nid=%d: Port_ID=0x%02x%02x%02x%02x%02x%02x%02x%02x\n", + w->nid, w->eld[8], w->eld[9], w->eld[10], w->eld[11], + w->eld[12], w->eld[13], w->eld[14], w->eld[15]); + device_printf(dev, + "ELD nid=%d: Manufacturer_Name=0x%02x%02x\n", + w->nid, w->eld[16], w->eld[17]); + device_printf(dev, + "ELD nid=%d: Product_Code=0x%02x%02x\n", + w->nid, w->eld[18], w->eld[19]); + device_printf(dev, + "ELD nid=%d: Monitor_Name_String='%.*s'\n", + w->nid, mnl, &w->eld[20]); + for (i = 0; i < sadc; i++) { + sad = &w->eld[20 + mnl + i * 3]; + fmt = (sad[0] >> 3) & 0x0f; + if (fmt == HDA_HDMI_CODING_TYPE_REF_CTX) { + fmt = (sad[2] >> 3) & 0x1f; + if (fmt < 1 || fmt > 3) + fmt = 0; + else + fmt += 14; + } + device_printf(dev, + "ELD nid=%d: %s %dch freqs=0x%b", *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 23:10:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21E571065675; Sat, 10 Mar 2012 23:10:19 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 09DEF8FC1A; Sat, 10 Mar 2012 23:10:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2ANAIX5082719; Sat, 10 Mar 2012 23:10:18 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2ANAI9U082714; Sat, 10 Mar 2012 23:10:18 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <201203102310.q2ANAI9U082714@svn.freebsd.org> From: Alexander Leidinger Date: Sat, 10 Mar 2012 23:10:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232799 - in head/sys: amd64/linux32 i386/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 23:10:19 -0000 Author: netchild Date: Sat Mar 10 23:10:18 2012 New Revision: 232799 URL: http://svn.freebsd.org/changeset/base/232799 Log: - add comments to syscalls.master and linux(32)_dummy about which linux kernel version introduced the sysctl (based upon a linux man-page) - add comments to sscalls.master regarding some names of sysctls which are different than the linux-names (based upon the linux unistd.h) - add some dummy sysctls - name an unimplemented sysctl MFC after: 1 month Modified: head/sys/amd64/linux32/linux32_dummy.c head/sys/amd64/linux32/syscalls.master head/sys/i386/linux/linux_dummy.c head/sys/i386/linux/syscalls.master Modified: head/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- head/sys/amd64/linux32/linux32_dummy.c Sat Mar 10 21:58:08 2012 (r232798) +++ head/sys/amd64/linux32/linux32_dummy.c Sat Mar 10 23:10:18 2012 (r232799) @@ -82,22 +82,69 @@ DUMMY(mq_notify); DUMMY(mq_getsetattr); DUMMY(kexec_load); DUMMY(waitid); +/* linux 2.6.11: */ DUMMY(add_key); DUMMY(request_key); DUMMY(keyctl); +/* linux 2.6.13: */ DUMMY(ioprio_set); DUMMY(ioprio_get); DUMMY(inotify_init); DUMMY(inotify_add_watch); DUMMY(inotify_rm_watch); +/* linux 2.6.16: */ DUMMY(migrate_pages); DUMMY(pselect6); DUMMY(ppoll); DUMMY(unshare); +/* linux 2.6.17: */ DUMMY(splice); DUMMY(sync_file_range); DUMMY(tee); DUMMY(vmsplice); +/* linux 2.6.18: */ +DUMMY(move_pages); +/* linux 2.6.19: */ +DUMMY(getcpu); +DUMMY(epoll_pwait); +/* linux 2.6.22: */ +DUMMY(utimensat); +DUMMY(signalfd); +DUMMY(timerfd_create); +DUMMY(eventfd); +/* linux 2.6.23: */ +DUMMY(fallocate); +/* linux 2.6.25: */ +DUMMY(timerfd_settime); +DUMMY(timerfd_gettime); +/* linux 2.6.27: */ +DUMMY(signalfd4); +DUMMY(eventfd2); +DUMMY(epoll_create1); +DUMMY(dup3); +DUMMY(pipe2); +DUMMY(inotify_init1); +/* linux 2.6.30: */ +DUMMY(preadv); +DUMMY(pwritev); +/* linux 2.6.31: */ +DUMMY(rt_tsigqueueinfo); +DUMMY(perf_event_open); +/* linux 2.6.33: */ +DUMMY(recvmmsg); +DUMMY(fanotify_init); +DUMMY(fanotify_mark); +/* linux 2.6.36: */ +DUMMY(prlimit64); +/* later: */ +DUMMY(name_to_handle_at); +DUMMY(open_by_handle_at); +DUMMY(clock_adjtime); +DUMMY(syncfs); +DUMMY(sendmmsg); +DUMMY(setns); +DUMMY(process_vm_readv); +DUMMY(process_vm_writev); #define DUMMY_XATTR(s) \ int \ Modified: head/sys/amd64/linux32/syscalls.master ============================================================================== --- head/sys/amd64/linux32/syscalls.master Sat Mar 10 21:58:08 2012 (r232798) +++ head/sys/amd64/linux32/syscalls.master Sat Mar 10 23:10:18 2012 (r232799) @@ -157,6 +157,7 @@ 82 AUE_SELECT STD { int linux_old_select( \ struct l_old_select_argv *ptr); } 83 AUE_SYMLINK STD { int linux_symlink(char *path, char *to); } +; 84: oldlstat 84 AUE_LSTAT STD { int linux_lstat(char *path, struct linux_lstat *up); } 85 AUE_READLINK STD { int linux_readlink(char *name, char *buf, \ l_int count); } @@ -164,8 +165,10 @@ 87 AUE_SWAPON NOPROTO { int swapon(char *name); } 88 AUE_REBOOT STD { int linux_reboot(l_int magic1, \ l_int magic2, l_uint cmd, void *arg); } +; 89: old_readdir 89 AUE_GETDIRENTRIES STD { int linux_readdir(l_uint fd, \ struct l_dirent *dent, l_uint count); } +; 90: old_mmap 90 AUE_MMAP STD { int linux_mmap(struct l_mmap_argv *ptr); } 91 AUE_MUNMAP NOPROTO { int munmap(caddr_t addr, int len); } 92 AUE_TRUNCATE STD { int linux_truncate(char *path, \ @@ -197,6 +200,7 @@ struct l_newstat *buf); } 108 AUE_FSTAT STD { int linux_newfstat(l_uint fd, \ struct l_newstat *buf); } +; 109: olduname 109 AUE_NULL STD { int linux_uname(void); } 110 AUE_NULL STD { int linux_iopl(l_ulong level); } 111 AUE_NULL STD { int linux_vhangup(void); } @@ -244,6 +248,7 @@ l_uint whence); } 141 AUE_GETDIRENTRIES STD { int linux_getdents(l_uint fd, void *dent, \ l_uint count); } +; 142: newselect 142 AUE_SELECT STD { int linux_select(l_int nfds, \ l_fd_set *readfds, l_fd_set *writefds, \ l_fd_set *exceptfds, \ @@ -336,6 +341,7 @@ 188 AUE_GETPMSG UNIMPL getpmsg 189 AUE_PUTPMSG UNIMPL putpmsg 190 AUE_VFORK STD { int linux_vfork(void); } +; 191: ugetrlimit 191 AUE_GETRLIMIT STD { int linux_getrlimit(l_uint resource, \ struct l_rlimit *rlim); } 192 AUE_MMAP STD { int linux_mmap2(l_ulong addr, l_ulong len, \ @@ -447,10 +453,11 @@ 272 AUE_NULL STD { int linux_fadvise64_64(int fd, \ l_loff_t offset, l_loff_t len, \ int advice); } -273 AUE_NULL UNIMPL +273 AUE_NULL UNIMPL vserver 274 AUE_NULL STD { int linux_mbind(void); } 275 AUE_NULL STD { int linux_get_mempolicy(void); } 276 AUE_NULL STD { int linux_set_mempolicy(void); } +; linux 2.6.6: 277 AUE_NULL STD { int linux_mq_open(void); } 278 AUE_NULL STD { int linux_mq_unlink(void); } 279 AUE_NULL STD { int linux_mq_timedsend(void); } @@ -460,14 +467,17 @@ 283 AUE_NULL STD { int linux_kexec_load(void); } 284 AUE_NULL STD { int linux_waitid(void); } 285 AUE_NULL UNIMPL +; linux 2.6.11: 286 AUE_NULL STD { int linux_add_key(void); } 287 AUE_NULL STD { int linux_request_key(void); } 288 AUE_NULL STD { int linux_keyctl(void); } +; linux 2.6.13: 289 AUE_NULL STD { int linux_ioprio_set(void); } 290 AUE_NULL STD { int linux_ioprio_get(void); } 291 AUE_NULL STD { int linux_inotify_init(void); } 292 AUE_NULL STD { int linux_inotify_add_watch(void); } 293 AUE_NULL STD { int linux_inotify_rm_watch(void); } +; linux 2.6.16: 294 AUE_NULL STD { int linux_migrate_pages(void); } 295 AUE_OPEN_RWTC STD { int linux_openat(l_int dfd, const char *filename, \ l_int flags, l_int mode); } @@ -497,6 +507,7 @@ 308 AUE_NULL STD { int linux_pselect6(void); } 309 AUE_NULL STD { int linux_ppoll(void); } 310 AUE_NULL STD { int linux_unshare(void); } +; linux 2.6.17: 311 AUE_NULL STD { int linux_set_robust_list(struct linux_robust_list_head *head, \ l_size_t len); } 312 AUE_NULL STD { int linux_get_robust_list(l_int pid, struct linux_robust_list_head *head, \ @@ -505,3 +516,46 @@ 314 AUE_NULL STD { int linux_sync_file_range(void); } 315 AUE_NULL STD { int linux_tee(void); } 316 AUE_NULL STD { int linux_vmsplice(void); } +; linux 2.6.18: +317 AUE_NULL STD { int linux_move_pages(void); } +; linux 2.6.19: +318 AUE_NULL STD { int linux_getcpu(void); } +319 AUE_NULL STD { int linux_epoll_pwait(void); } +; linux 2.6.22: +320 AUE_NULL STD { int linux_utimensat(void); } +321 AUE_NULL STD { int linux_signalfd(void); } +322 AUE_NULL STD { int linux_timerfd_create(void); } +323 AUE_NULL STD { int linux_eventfd(void); } +; linux 2.6.23: +324 AUE_NULL STD { int linux_fallocate(void); } +; linux 2.6.25: +325 AUE_NULL STD { int linux_timerfd_settime(void); } +326 AUE_NULL STD { int linux_timerfd_gettime(void); } +; linux 2.6.27: +327 AUE_NULL STD { int linux_signalfd4(void); } +328 AUE_NULL STD { int linux_eventfd2(void); } +329 AUE_NULL STD { int linux_epoll_create1(void); } +330 AUE_NULL STD { int linux_dup3(void); } +331 AUE_NULL STD { int linux_pipe2(void); } +332 AUE_NULL STD { int linux_inotify_init1(void); } +; linux 2.6.30: +333 AUE_NULL STD { int linux_preadv(void); } +334 AUE_NULL STD { int linux_pwritev(void); } +; linux 2.6.31: +335 AUE_NULL STD { int linux_rt_tsigqueueinfo(void); } +336 AUE_NULL STD { int linux_perf_event_open(void); } +; linux 2.6.33: +337 AUE_NULL STD { int linux_recvmmsg(void); } +338 AUE_NULL STD { int linux_fanotify_init(void); } +339 AUE_NULL STD { int linux_fanotify_mark(void); } +; linux 2.6.36: +340 AUE_NULL STD { int linux_prlimit64(void); } +; later: +341 AUE_NULL STD { int linux_name_to_handle_at(void); } +342 AUE_NULL STD { int linux_open_by_handle_at(void); } +343 AUE_NULL STD { int linux_clock_adjtime(void); } +344 AUE_NULL STD { int linux_syncfs(void); } +345 AUE_NULL STD { int linux_sendmmsg(void); } +346 AUE_NULL STD { int linux_setns(void); } +347 AUE_NULL STD { int linux_process_vm_readv(void); } +348 AUE_NULL STD { int linux_process_vm_writev(void); } Modified: head/sys/i386/linux/linux_dummy.c ============================================================================== --- head/sys/i386/linux/linux_dummy.c Sat Mar 10 21:58:08 2012 (r232798) +++ head/sys/i386/linux/linux_dummy.c Sat Mar 10 23:10:18 2012 (r232799) @@ -73,22 +73,69 @@ DUMMY(get_mempolicy); DUMMY(set_mempolicy); DUMMY(kexec_load); DUMMY(waitid); +/* linux 2.6.11: */ DUMMY(add_key); DUMMY(request_key); DUMMY(keyctl); +/* linux 2.6.13: */ DUMMY(ioprio_set); DUMMY(ioprio_get); DUMMY(inotify_init); DUMMY(inotify_add_watch); DUMMY(inotify_rm_watch); +/* linux 2.6.16: */ DUMMY(migrate_pages); DUMMY(pselect6); DUMMY(ppoll); DUMMY(unshare); +/* linux 2.6.17: */ DUMMY(splice); DUMMY(sync_file_range); DUMMY(tee); DUMMY(vmsplice); +/* linux 2.6.18: */ +DUMMY(move_pages); +/* linux 2.6.19: */ +DUMMY(getcpu); +DUMMY(epoll_pwait); +/* linux 2.6.22: */ +DUMMY(utimensat); +DUMMY(signalfd); +DUMMY(timerfd_create); +DUMMY(eventfd); +/* linux 2.6.23: */ +DUMMY(fallocate); +/* linux 2.6.25: */ +DUMMY(timerfd_settime); +DUMMY(timerfd_gettime); +/* linux 2.6.27: */ +DUMMY(signalfd4); +DUMMY(eventfd2); +DUMMY(epoll_create1); +DUMMY(dup3); +DUMMY(pipe2); +DUMMY(inotify_init1); +/* linux 2.6.30: */ +DUMMY(preadv); +DUMMY(pwritev); +/* linux 2.6.31 */ +DUMMY(rt_tsigqueueinfo); +DUMMY(perf_event_open); +/* linux 2.6.33: */ +DUMMY(recvmmsg); +DUMMY(fanotify_init); +DUMMY(fanotify_mark); +/* linux 2.6.36: */ +DUMMY(prlimit64); +/* later: */ +DUMMY(name_to_handle_at); +DUMMY(open_by_handle_at); +DUMMY(clock_adjtime); +DUMMY(syncfs); +DUMMY(sendmmsg); +DUMMY(setns); +DUMMY(process_vm_readv); +DUMMY(process_vm_writev); #define DUMMY_XATTR(s) \ int \ Modified: head/sys/i386/linux/syscalls.master ============================================================================== --- head/sys/i386/linux/syscalls.master Sat Mar 10 21:58:08 2012 (r232798) +++ head/sys/i386/linux/syscalls.master Sat Mar 10 23:10:18 2012 (r232799) @@ -157,6 +157,7 @@ 82 AUE_SELECT STD { int linux_old_select( \ struct l_old_select_argv *ptr); } 83 AUE_SYMLINK STD { int linux_symlink(char *path, char *to); } +; 84: oldlstat 84 AUE_LSTAT STD { int linux_lstat(char *path, struct ostat *up); } 85 AUE_READLINK STD { int linux_readlink(char *name, char *buf, \ l_int count); } @@ -164,8 +165,10 @@ 87 AUE_SWAPON NOPROTO { int swapon(char *name); } 88 AUE_REBOOT STD { int linux_reboot(l_int magic1, \ l_int magic2, l_uint cmd, void *arg); } +; 89: old_readdir 89 AUE_GETDIRENTRIES STD { int linux_readdir(l_uint fd, \ struct l_dirent *dent, l_uint count); } +; 90: old_mmap 90 AUE_MMAP STD { int linux_mmap(struct l_mmap_argv *ptr); } 91 AUE_MUNMAP NOPROTO { int munmap(caddr_t addr, int len); } 92 AUE_TRUNCATE STD { int linux_truncate(char *path, \ @@ -198,6 +201,7 @@ struct l_newstat *buf); } 108 AUE_FSTAT STD { int linux_newfstat(l_uint fd, \ struct l_newstat *buf); } +; 109: olduname 109 AUE_NULL STD { int linux_uname(void); } 110 AUE_NULL STD { int linux_iopl(l_ulong level); } 111 AUE_NULL STD { int linux_vhangup(void); } @@ -246,6 +250,7 @@ l_uint whence); } 141 AUE_GETDIRENTRIES STD { int linux_getdents(l_uint fd, \ void *dent, l_uint count); } +; 142: newselect 142 AUE_SELECT STD { int linux_select(l_int nfds, \ l_fd_set *readfds, l_fd_set *writefds, \ l_fd_set *exceptfds, \ @@ -338,6 +343,7 @@ 188 AUE_GETPMSG UNIMPL getpmsg 189 AUE_PUTPMSG UNIMPL putpmsg 190 AUE_VFORK STD { int linux_vfork(void); } +; 191: ugetrlimit 191 AUE_GETRLIMIT STD { int linux_getrlimit(l_uint resource, \ struct l_rlimit *rlim); } 192 AUE_MMAP STD { int linux_mmap2(l_ulong addr, l_ulong len, \ @@ -451,10 +457,11 @@ 272 AUE_NULL STD { int linux_fadvise64_64(int fd, \ l_loff_t offset, l_loff_t len, \ int advice); } -273 AUE_NULL UNIMPL +273 AUE_NULL UNIMPL vserver 274 AUE_NULL STD { int linux_mbind(void); } 275 AUE_NULL STD { int linux_get_mempolicy(void); } 276 AUE_NULL STD { int linux_set_mempolicy(void); } +; linux 2.6.6: 277 AUE_NULL STD { int linux_mq_open(const char *name, int oflag, mode_t mode, \ struct mq_attr *attr); } 278 AUE_NULL STD { int linux_mq_unlink(const char *name); } @@ -470,14 +477,17 @@ 283 AUE_NULL STD { int linux_kexec_load(void); } 284 AUE_NULL STD { int linux_waitid(void); } 285 AUE_NULL UNIMPL +; linux 2.6.11: 286 AUE_NULL STD { int linux_add_key(void); } 287 AUE_NULL STD { int linux_request_key(void); } 288 AUE_NULL STD { int linux_keyctl(void); } +; linux 2.6.13: 289 AUE_NULL STD { int linux_ioprio_set(void); } 290 AUE_NULL STD { int linux_ioprio_get(void); } 291 AUE_NULL STD { int linux_inotify_init(void); } 292 AUE_NULL STD { int linux_inotify_add_watch(void); } 293 AUE_NULL STD { int linux_inotify_rm_watch(void); } +; linux 2.6.16: 294 AUE_NULL STD { int linux_migrate_pages(void); } 295 AUE_OPEN_RWTC STD { int linux_openat(l_int dfd, const char *filename, \ l_int flags, l_int mode); } @@ -507,6 +517,7 @@ 308 AUE_NULL STD { int linux_pselect6(void); } 309 AUE_NULL STD { int linux_ppoll(void); } 310 AUE_NULL STD { int linux_unshare(void); } +; linux 2.6.17: 311 AUE_NULL STD { int linux_set_robust_list(struct linux_robust_list_head *head, \ l_size_t len); } 312 AUE_NULL STD { int linux_get_robust_list(l_int pid, struct linux_robust_list_head **head, \ @@ -515,3 +526,46 @@ 314 AUE_NULL STD { int linux_sync_file_range(void); } 315 AUE_NULL STD { int linux_tee(void); } 316 AUE_NULL STD { int linux_vmsplice(void); } +; linux 2.6.18: +317 AUE_NULL STD { int linux_move_pages(void); } +; linux 2.6.19: +318 AUE_NULL STD { int linux_getcpu(void); } +319 AUE_NULL STD { int linux_epoll_pwait(void); } +; linux 2.6.22: +320 AUE_NULL STD { int linux_utimensat(void); } +321 AUE_NULL STD { int linux_signalfd(void); } +322 AUE_NULL STD { int linux_timerfd_create(void); } +323 AUE_NULL STD { int linux_eventfd(void); } +; linux 2.6.23: +324 AUE_NULL STD { int linux_fallocate(void); } +; linux 2.6.25: +325 AUE_NULL STD { int linux_timerfd_settime(void); } +326 AUE_NULL STD { int linux_timerfd_gettime(void); } +; linux 2.6.27: +327 AUE_NULL STD { int linux_signalfd4(void); } +328 AUE_NULL STD { int linux_eventfd2(void); } +329 AUE_NULL STD { int linux_epoll_create1(void); } +330 AUE_NULL STD { int linux_dup3(void); } +331 AUE_NULL STD { int linux_pipe2(void); } +332 AUE_NULL STD { int linux_inotify_init1(void); } +; linux 2.6.30: +333 AUE_NULL STD { int linux_preadv(void); } +334 AUE_NULL STD { int linux_pwritev(void); } +; linux 2.6.31: +335 AUE_NULL STD { int linux_rt_tsigqueueinfo(void); } +336 AUE_NULL STD { int linux_perf_event_open(void); } +; linux 2.6.33: +337 AUE_NULL STD { int linux_recvmmsg(void); } +338 AUE_NULL STD { int linux_fanotify_init(void); } +339 AUE_NULL STD { int linux_fanotify_mark(void); } +; linux 2.6.36: +340 AUE_NULL STD { int linux_prlimit64(void); } +; later: +341 AUE_NULL STD { int linux_name_to_handle_at(void); } +342 AUE_NULL STD { int linux_open_by_handle_at(void); } +343 AUE_NULL STD { int linux_clock_adjtime(void); } +344 AUE_NULL STD { int linux_syncfs(void); } +345 AUE_NULL STD { int linux_sendmmsg(void); } +346 AUE_NULL STD { int linux_setns(void); } +347 AUE_NULL STD { int linux_process_vm_readv(void); } +348 AUE_NULL STD { int linux_process_vm_writev(void); } From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 23:11:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C805C1065674; Sat, 10 Mar 2012 23:11:21 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B0DC88FC22; Sat, 10 Mar 2012 23:11:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2ANBLxw082805; Sat, 10 Mar 2012 23:11:21 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2ANBLqF082794; Sat, 10 Mar 2012 23:11:21 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <201203102311.q2ANBLqF082794@svn.freebsd.org> From: Alexander Leidinger Date: Sat, 10 Mar 2012 23:11:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232800 - in head/sys: amd64/linux32 i386/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 23:11:21 -0000 Author: netchild Date: Sat Mar 10 23:11:21 2012 New Revision: 232800 URL: http://svn.freebsd.org/changeset/base/232800 Log: regen Modified: head/sys/amd64/linux32/linux32_proto.h head/sys/amd64/linux32/linux32_syscall.h head/sys/amd64/linux32/linux32_syscalls.c head/sys/amd64/linux32/linux32_sysent.c head/sys/amd64/linux32/linux32_systrace_args.c head/sys/i386/linux/linux_proto.h head/sys/i386/linux/linux_syscall.h head/sys/i386/linux/linux_syscalls.c head/sys/i386/linux/linux_sysent.c head/sys/i386/linux/linux_systrace_args.c Modified: head/sys/amd64/linux32/linux32_proto.h ============================================================================== --- head/sys/amd64/linux32/linux32_proto.h Sat Mar 10 23:10:18 2012 (r232799) +++ head/sys/amd64/linux32/linux32_proto.h Sat Mar 10 23:11:21 2012 (r232800) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 228957 2011-12-29 15:34:59Z jhb + * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 232799 2012-03-10 23:10:18Z netchild */ #ifndef _LINUX_SYSPROTO_H_ @@ -1003,6 +1003,102 @@ struct linux_tee_args { struct linux_vmsplice_args { register_t dummy; }; +struct linux_move_pages_args { + register_t dummy; +}; +struct linux_getcpu_args { + register_t dummy; +}; +struct linux_epoll_pwait_args { + register_t dummy; +}; +struct linux_utimensat_args { + register_t dummy; +}; +struct linux_signalfd_args { + register_t dummy; +}; +struct linux_timerfd_create_args { + register_t dummy; +}; +struct linux_eventfd_args { + register_t dummy; +}; +struct linux_fallocate_args { + register_t dummy; +}; +struct linux_timerfd_settime_args { + register_t dummy; +}; +struct linux_timerfd_gettime_args { + register_t dummy; +}; +struct linux_signalfd4_args { + register_t dummy; +}; +struct linux_eventfd2_args { + register_t dummy; +}; +struct linux_epoll_create1_args { + register_t dummy; +}; +struct linux_dup3_args { + register_t dummy; +}; +struct linux_pipe2_args { + register_t dummy; +}; +struct linux_inotify_init1_args { + register_t dummy; +}; +struct linux_preadv_args { + register_t dummy; +}; +struct linux_pwritev_args { + register_t dummy; +}; +struct linux_rt_tsigqueueinfo_args { + register_t dummy; +}; +struct linux_perf_event_open_args { + register_t dummy; +}; +struct linux_recvmmsg_args { + register_t dummy; +}; +struct linux_fanotify_init_args { + register_t dummy; +}; +struct linux_fanotify_mark_args { + register_t dummy; +}; +struct linux_prlimit64_args { + register_t dummy; +}; +struct linux_name_to_handle_at_args { + register_t dummy; +}; +struct linux_open_by_handle_at_args { + register_t dummy; +}; +struct linux_clock_adjtime_args { + register_t dummy; +}; +struct linux_syncfs_args { + register_t dummy; +}; +struct linux_sendmmsg_args { + register_t dummy; +}; +struct linux_setns_args { + register_t dummy; +}; +struct linux_process_vm_readv_args { + register_t dummy; +}; +struct linux_process_vm_writev_args { + register_t dummy; +}; #define nosys linux_nosys int linux_fork(struct thread *, struct linux_fork_args *); int linux_open(struct thread *, struct linux_open_args *); @@ -1246,6 +1342,38 @@ int linux_splice(struct thread *, struct int linux_sync_file_range(struct thread *, struct linux_sync_file_range_args *); int linux_tee(struct thread *, struct linux_tee_args *); int linux_vmsplice(struct thread *, struct linux_vmsplice_args *); +int linux_move_pages(struct thread *, struct linux_move_pages_args *); +int linux_getcpu(struct thread *, struct linux_getcpu_args *); +int linux_epoll_pwait(struct thread *, struct linux_epoll_pwait_args *); +int linux_utimensat(struct thread *, struct linux_utimensat_args *); +int linux_signalfd(struct thread *, struct linux_signalfd_args *); +int linux_timerfd_create(struct thread *, struct linux_timerfd_create_args *); +int linux_eventfd(struct thread *, struct linux_eventfd_args *); +int linux_fallocate(struct thread *, struct linux_fallocate_args *); +int linux_timerfd_settime(struct thread *, struct linux_timerfd_settime_args *); +int linux_timerfd_gettime(struct thread *, struct linux_timerfd_gettime_args *); +int linux_signalfd4(struct thread *, struct linux_signalfd4_args *); +int linux_eventfd2(struct thread *, struct linux_eventfd2_args *); +int linux_epoll_create1(struct thread *, struct linux_epoll_create1_args *); +int linux_dup3(struct thread *, struct linux_dup3_args *); +int linux_pipe2(struct thread *, struct linux_pipe2_args *); +int linux_inotify_init1(struct thread *, struct linux_inotify_init1_args *); +int linux_preadv(struct thread *, struct linux_preadv_args *); +int linux_pwritev(struct thread *, struct linux_pwritev_args *); +int linux_rt_tsigqueueinfo(struct thread *, struct linux_rt_tsigqueueinfo_args *); +int linux_perf_event_open(struct thread *, struct linux_perf_event_open_args *); +int linux_recvmmsg(struct thread *, struct linux_recvmmsg_args *); +int linux_fanotify_init(struct thread *, struct linux_fanotify_init_args *); +int linux_fanotify_mark(struct thread *, struct linux_fanotify_mark_args *); +int linux_prlimit64(struct thread *, struct linux_prlimit64_args *); +int linux_name_to_handle_at(struct thread *, struct linux_name_to_handle_at_args *); +int linux_open_by_handle_at(struct thread *, struct linux_open_by_handle_at_args *); +int linux_clock_adjtime(struct thread *, struct linux_clock_adjtime_args *); +int linux_syncfs(struct thread *, struct linux_syncfs_args *); +int linux_sendmmsg(struct thread *, struct linux_sendmmsg_args *); +int linux_setns(struct thread *, struct linux_setns_args *); +int linux_process_vm_readv(struct thread *, struct linux_process_vm_readv_args *); +int linux_process_vm_writev(struct thread *, struct linux_process_vm_writev_args *); #ifdef COMPAT_43 @@ -1516,6 +1644,38 @@ int linux_vmsplice(struct thread *, stru #define LINUX_SYS_AUE_linux_sync_file_range AUE_NULL #define LINUX_SYS_AUE_linux_tee AUE_NULL #define LINUX_SYS_AUE_linux_vmsplice AUE_NULL +#define LINUX_SYS_AUE_linux_move_pages AUE_NULL +#define LINUX_SYS_AUE_linux_getcpu AUE_NULL +#define LINUX_SYS_AUE_linux_epoll_pwait AUE_NULL +#define LINUX_SYS_AUE_linux_utimensat AUE_NULL +#define LINUX_SYS_AUE_linux_signalfd AUE_NULL +#define LINUX_SYS_AUE_linux_timerfd_create AUE_NULL +#define LINUX_SYS_AUE_linux_eventfd AUE_NULL +#define LINUX_SYS_AUE_linux_fallocate AUE_NULL +#define LINUX_SYS_AUE_linux_timerfd_settime AUE_NULL +#define LINUX_SYS_AUE_linux_timerfd_gettime AUE_NULL +#define LINUX_SYS_AUE_linux_signalfd4 AUE_NULL +#define LINUX_SYS_AUE_linux_eventfd2 AUE_NULL +#define LINUX_SYS_AUE_linux_epoll_create1 AUE_NULL +#define LINUX_SYS_AUE_linux_dup3 AUE_NULL +#define LINUX_SYS_AUE_linux_pipe2 AUE_NULL +#define LINUX_SYS_AUE_linux_inotify_init1 AUE_NULL +#define LINUX_SYS_AUE_linux_preadv AUE_NULL +#define LINUX_SYS_AUE_linux_pwritev AUE_NULL +#define LINUX_SYS_AUE_linux_rt_tsigqueueinfo AUE_NULL +#define LINUX_SYS_AUE_linux_perf_event_open AUE_NULL +#define LINUX_SYS_AUE_linux_recvmmsg AUE_NULL +#define LINUX_SYS_AUE_linux_fanotify_init AUE_NULL +#define LINUX_SYS_AUE_linux_fanotify_mark AUE_NULL +#define LINUX_SYS_AUE_linux_prlimit64 AUE_NULL +#define LINUX_SYS_AUE_linux_name_to_handle_at AUE_NULL +#define LINUX_SYS_AUE_linux_open_by_handle_at AUE_NULL +#define LINUX_SYS_AUE_linux_clock_adjtime AUE_NULL +#define LINUX_SYS_AUE_linux_syncfs AUE_NULL +#define LINUX_SYS_AUE_linux_sendmmsg AUE_NULL +#define LINUX_SYS_AUE_linux_setns AUE_NULL +#define LINUX_SYS_AUE_linux_process_vm_readv AUE_NULL +#define LINUX_SYS_AUE_linux_process_vm_writev AUE_NULL #undef PAD_ #undef PADL_ Modified: head/sys/amd64/linux32/linux32_syscall.h ============================================================================== --- head/sys/amd64/linux32/linux32_syscall.h Sat Mar 10 23:10:18 2012 (r232799) +++ head/sys/amd64/linux32/linux32_syscall.h Sat Mar 10 23:11:21 2012 (r232800) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 228957 2011-12-29 15:34:59Z jhb + * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 232799 2012-03-10 23:10:18Z netchild */ #define LINUX_SYS_exit 1 @@ -289,4 +289,36 @@ #define LINUX_SYS_linux_sync_file_range 314 #define LINUX_SYS_linux_tee 315 #define LINUX_SYS_linux_vmsplice 316 -#define LINUX_SYS_MAXSYSCALL 317 +#define LINUX_SYS_linux_move_pages 317 +#define LINUX_SYS_linux_getcpu 318 +#define LINUX_SYS_linux_epoll_pwait 319 +#define LINUX_SYS_linux_utimensat 320 +#define LINUX_SYS_linux_signalfd 321 +#define LINUX_SYS_linux_timerfd_create 322 +#define LINUX_SYS_linux_eventfd 323 +#define LINUX_SYS_linux_fallocate 324 +#define LINUX_SYS_linux_timerfd_settime 325 +#define LINUX_SYS_linux_timerfd_gettime 326 +#define LINUX_SYS_linux_signalfd4 327 +#define LINUX_SYS_linux_eventfd2 328 +#define LINUX_SYS_linux_epoll_create1 329 +#define LINUX_SYS_linux_dup3 330 +#define LINUX_SYS_linux_pipe2 331 +#define LINUX_SYS_linux_inotify_init1 332 +#define LINUX_SYS_linux_preadv 333 +#define LINUX_SYS_linux_pwritev 334 +#define LINUX_SYS_linux_rt_tsigqueueinfo 335 +#define LINUX_SYS_linux_perf_event_open 336 +#define LINUX_SYS_linux_recvmmsg 337 +#define LINUX_SYS_linux_fanotify_init 338 +#define LINUX_SYS_linux_fanotify_mark 339 +#define LINUX_SYS_linux_prlimit64 340 +#define LINUX_SYS_linux_name_to_handle_at 341 +#define LINUX_SYS_linux_open_by_handle_at 342 +#define LINUX_SYS_linux_clock_adjtime 343 +#define LINUX_SYS_linux_syncfs 344 +#define LINUX_SYS_linux_sendmmsg 345 +#define LINUX_SYS_linux_setns 346 +#define LINUX_SYS_linux_process_vm_readv 347 +#define LINUX_SYS_linux_process_vm_writev 348 +#define LINUX_SYS_MAXSYSCALL 349 Modified: head/sys/amd64/linux32/linux32_syscalls.c ============================================================================== --- head/sys/amd64/linux32/linux32_syscalls.c Sat Mar 10 23:10:18 2012 (r232799) +++ head/sys/amd64/linux32/linux32_syscalls.c Sat Mar 10 23:11:21 2012 (r232800) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 228957 2011-12-29 15:34:59Z jhb + * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 232799 2012-03-10 23:10:18Z netchild */ const char *linux_syscallnames[] = { @@ -281,7 +281,7 @@ const char *linux_syscallnames[] = { "linux_tgkill", /* 270 = linux_tgkill */ "linux_utimes", /* 271 = linux_utimes */ "linux_fadvise64_64", /* 272 = linux_fadvise64_64 */ - "#273", /* 273 = */ + "#273", /* 273 = vserver */ "linux_mbind", /* 274 = linux_mbind */ "linux_get_mempolicy", /* 275 = linux_get_mempolicy */ "linux_set_mempolicy", /* 276 = linux_set_mempolicy */ @@ -325,4 +325,36 @@ const char *linux_syscallnames[] = { "linux_sync_file_range", /* 314 = linux_sync_file_range */ "linux_tee", /* 315 = linux_tee */ "linux_vmsplice", /* 316 = linux_vmsplice */ + "linux_move_pages", /* 317 = linux_move_pages */ + "linux_getcpu", /* 318 = linux_getcpu */ + "linux_epoll_pwait", /* 319 = linux_epoll_pwait */ + "linux_utimensat", /* 320 = linux_utimensat */ + "linux_signalfd", /* 321 = linux_signalfd */ + "linux_timerfd_create", /* 322 = linux_timerfd_create */ + "linux_eventfd", /* 323 = linux_eventfd */ + "linux_fallocate", /* 324 = linux_fallocate */ + "linux_timerfd_settime", /* 325 = linux_timerfd_settime */ + "linux_timerfd_gettime", /* 326 = linux_timerfd_gettime */ + "linux_signalfd4", /* 327 = linux_signalfd4 */ + "linux_eventfd2", /* 328 = linux_eventfd2 */ + "linux_epoll_create1", /* 329 = linux_epoll_create1 */ + "linux_dup3", /* 330 = linux_dup3 */ + "linux_pipe2", /* 331 = linux_pipe2 */ + "linux_inotify_init1", /* 332 = linux_inotify_init1 */ + "linux_preadv", /* 333 = linux_preadv */ + "linux_pwritev", /* 334 = linux_pwritev */ + "linux_rt_tsigqueueinfo", /* 335 = linux_rt_tsigqueueinfo */ + "linux_perf_event_open", /* 336 = linux_perf_event_open */ + "linux_recvmmsg", /* 337 = linux_recvmmsg */ + "linux_fanotify_init", /* 338 = linux_fanotify_init */ + "linux_fanotify_mark", /* 339 = linux_fanotify_mark */ + "linux_prlimit64", /* 340 = linux_prlimit64 */ + "linux_name_to_handle_at", /* 341 = linux_name_to_handle_at */ + "linux_open_by_handle_at", /* 342 = linux_open_by_handle_at */ + "linux_clock_adjtime", /* 343 = linux_clock_adjtime */ + "linux_syncfs", /* 344 = linux_syncfs */ + "linux_sendmmsg", /* 345 = linux_sendmmsg */ + "linux_setns", /* 346 = linux_setns */ + "linux_process_vm_readv", /* 347 = linux_process_vm_readv */ + "linux_process_vm_writev", /* 348 = linux_process_vm_writev */ }; Modified: head/sys/amd64/linux32/linux32_sysent.c ============================================================================== --- head/sys/amd64/linux32/linux32_sysent.c Sat Mar 10 23:10:18 2012 (r232799) +++ head/sys/amd64/linux32/linux32_sysent.c Sat Mar 10 23:11:21 2012 (r232800) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 228957 2011-12-29 15:34:59Z jhb + * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 232799 2012-03-10 23:10:18Z netchild */ #include "opt_compat.h" @@ -292,7 +292,7 @@ struct sysent linux_sysent[] = { { AS(linux_tgkill_args), (sy_call_t *)linux_tgkill, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 270 = linux_tgkill */ { AS(linux_utimes_args), (sy_call_t *)linux_utimes, AUE_UTIMES, NULL, 0, 0, 0, SY_THR_STATIC }, /* 271 = linux_utimes */ { AS(linux_fadvise64_64_args), (sy_call_t *)linux_fadvise64_64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 272 = linux_fadvise64_64 */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 273 = */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 273 = vserver */ { 0, (sy_call_t *)linux_mbind, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 274 = linux_mbind */ { 0, (sy_call_t *)linux_get_mempolicy, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 275 = linux_get_mempolicy */ { 0, (sy_call_t *)linux_set_mempolicy, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 276 = linux_set_mempolicy */ @@ -336,4 +336,36 @@ struct sysent linux_sysent[] = { { 0, (sy_call_t *)linux_sync_file_range, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 314 = linux_sync_file_range */ { 0, (sy_call_t *)linux_tee, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 315 = linux_tee */ { 0, (sy_call_t *)linux_vmsplice, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 316 = linux_vmsplice */ + { 0, (sy_call_t *)linux_move_pages, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 317 = linux_move_pages */ + { 0, (sy_call_t *)linux_getcpu, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 318 = linux_getcpu */ + { 0, (sy_call_t *)linux_epoll_pwait, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 319 = linux_epoll_pwait */ + { 0, (sy_call_t *)linux_utimensat, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 320 = linux_utimensat */ + { 0, (sy_call_t *)linux_signalfd, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 321 = linux_signalfd */ + { 0, (sy_call_t *)linux_timerfd_create, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 322 = linux_timerfd_create */ + { 0, (sy_call_t *)linux_eventfd, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 323 = linux_eventfd */ + { 0, (sy_call_t *)linux_fallocate, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 324 = linux_fallocate */ + { 0, (sy_call_t *)linux_timerfd_settime, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 325 = linux_timerfd_settime */ + { 0, (sy_call_t *)linux_timerfd_gettime, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 326 = linux_timerfd_gettime */ + { 0, (sy_call_t *)linux_signalfd4, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 327 = linux_signalfd4 */ + { 0, (sy_call_t *)linux_eventfd2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 328 = linux_eventfd2 */ + { 0, (sy_call_t *)linux_epoll_create1, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 329 = linux_epoll_create1 */ + { 0, (sy_call_t *)linux_dup3, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 330 = linux_dup3 */ + { 0, (sy_call_t *)linux_pipe2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 331 = linux_pipe2 */ + { 0, (sy_call_t *)linux_inotify_init1, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 332 = linux_inotify_init1 */ + { 0, (sy_call_t *)linux_preadv, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 333 = linux_preadv */ + { 0, (sy_call_t *)linux_pwritev, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 334 = linux_pwritev */ + { 0, (sy_call_t *)linux_rt_tsigqueueinfo, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 335 = linux_rt_tsigqueueinfo */ + { 0, (sy_call_t *)linux_perf_event_open, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 336 = linux_perf_event_open */ + { 0, (sy_call_t *)linux_recvmmsg, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 337 = linux_recvmmsg */ + { 0, (sy_call_t *)linux_fanotify_init, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 338 = linux_fanotify_init */ + { 0, (sy_call_t *)linux_fanotify_mark, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 339 = linux_fanotify_mark */ + { 0, (sy_call_t *)linux_prlimit64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 340 = linux_prlimit64 */ + { 0, (sy_call_t *)linux_name_to_handle_at, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 341 = linux_name_to_handle_at */ + { 0, (sy_call_t *)linux_open_by_handle_at, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 342 = linux_open_by_handle_at */ + { 0, (sy_call_t *)linux_clock_adjtime, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 343 = linux_clock_adjtime */ + { 0, (sy_call_t *)linux_syncfs, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 344 = linux_syncfs */ + { 0, (sy_call_t *)linux_sendmmsg, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 345 = linux_sendmmsg */ + { 0, (sy_call_t *)linux_setns, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 346 = linux_setns */ + { 0, (sy_call_t *)linux_process_vm_readv, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 347 = linux_process_vm_readv */ + { 0, (sy_call_t *)linux_process_vm_writev, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 348 = linux_process_vm_writev */ }; Modified: head/sys/amd64/linux32/linux32_systrace_args.c ============================================================================== --- head/sys/amd64/linux32/linux32_systrace_args.c Sat Mar 10 23:10:18 2012 (r232799) +++ head/sys/amd64/linux32/linux32_systrace_args.c Sat Mar 10 23:11:21 2012 (r232800) @@ -2100,6 +2100,166 @@ systrace_args(int sysnum, void *params, *n_args = 0; break; } + /* linux_move_pages */ + case 317: { + *n_args = 0; + break; + } + /* linux_getcpu */ + case 318: { + *n_args = 0; + break; + } + /* linux_epoll_pwait */ + case 319: { + *n_args = 0; + break; + } + /* linux_utimensat */ + case 320: { + *n_args = 0; + break; + } + /* linux_signalfd */ + case 321: { + *n_args = 0; + break; + } + /* linux_timerfd_create */ + case 322: { + *n_args = 0; + break; + } + /* linux_eventfd */ + case 323: { + *n_args = 0; + break; + } + /* linux_fallocate */ + case 324: { + *n_args = 0; + break; + } + /* linux_timerfd_settime */ + case 325: { + *n_args = 0; + break; + } + /* linux_timerfd_gettime */ + case 326: { + *n_args = 0; + break; + } + /* linux_signalfd4 */ + case 327: { + *n_args = 0; + break; + } + /* linux_eventfd2 */ + case 328: { + *n_args = 0; + break; + } + /* linux_epoll_create1 */ + case 329: { + *n_args = 0; + break; + } + /* linux_dup3 */ + case 330: { + *n_args = 0; + break; + } + /* linux_pipe2 */ + case 331: { + *n_args = 0; + break; + } + /* linux_inotify_init1 */ + case 332: { + *n_args = 0; + break; + } + /* linux_preadv */ + case 333: { + *n_args = 0; + break; + } + /* linux_pwritev */ + case 334: { + *n_args = 0; + break; + } + /* linux_rt_tsigqueueinfo */ + case 335: { + *n_args = 0; + break; + } + /* linux_perf_event_open */ + case 336: { + *n_args = 0; + break; + } + /* linux_recvmmsg */ + case 337: { + *n_args = 0; + break; + } + /* linux_fanotify_init */ + case 338: { + *n_args = 0; + break; + } + /* linux_fanotify_mark */ + case 339: { + *n_args = 0; + break; + } + /* linux_prlimit64 */ + case 340: { + *n_args = 0; + break; + } + /* linux_name_to_handle_at */ + case 341: { + *n_args = 0; + break; + } + /* linux_open_by_handle_at */ + case 342: { + *n_args = 0; + break; + } + /* linux_clock_adjtime */ + case 343: { + *n_args = 0; + break; + } + /* linux_syncfs */ + case 344: { + *n_args = 0; + break; + } + /* linux_sendmmsg */ + case 345: { + *n_args = 0; + break; + } + /* linux_setns */ + case 346: { + *n_args = 0; + break; + } + /* linux_process_vm_readv */ + case 347: { + *n_args = 0; + break; + } + /* linux_process_vm_writev */ + case 348: { + *n_args = 0; + break; + } default: *n_args = 0; break; @@ -5164,6 +5324,102 @@ systrace_entry_setargdesc(int sysnum, in /* linux_vmsplice */ case 316: break; + /* linux_move_pages */ + case 317: + break; + /* linux_getcpu */ + case 318: + break; + /* linux_epoll_pwait */ + case 319: + break; + /* linux_utimensat */ + case 320: + break; + /* linux_signalfd */ + case 321: + break; + /* linux_timerfd_create */ + case 322: + break; + /* linux_eventfd */ + case 323: + break; + /* linux_fallocate */ + case 324: + break; + /* linux_timerfd_settime */ + case 325: + break; + /* linux_timerfd_gettime */ + case 326: + break; + /* linux_signalfd4 */ + case 327: + break; + /* linux_eventfd2 */ + case 328: + break; + /* linux_epoll_create1 */ + case 329: + break; + /* linux_dup3 */ + case 330: + break; + /* linux_pipe2 */ + case 331: + break; + /* linux_inotify_init1 */ + case 332: + break; + /* linux_preadv */ + case 333: + break; + /* linux_pwritev */ + case 334: + break; + /* linux_rt_tsigqueueinfo */ + case 335: + break; + /* linux_perf_event_open */ + case 336: + break; + /* linux_recvmmsg */ + case 337: + break; + /* linux_fanotify_init */ + case 338: + break; + /* linux_fanotify_mark */ + case 339: + break; + /* linux_prlimit64 */ + case 340: + break; + /* linux_name_to_handle_at */ + case 341: + break; + /* linux_open_by_handle_at */ + case 342: + break; + /* linux_clock_adjtime */ + case 343: + break; + /* linux_syncfs */ + case 344: + break; + /* linux_sendmmsg */ + case 345: + break; + /* linux_setns */ + case 346: + break; + /* linux_process_vm_readv */ + case 347: + break; + /* linux_process_vm_writev */ + case 348: + break; default: break; }; @@ -6335,6 +6591,70 @@ systrace_return_setargdesc(int sysnum, i case 315: /* linux_vmsplice */ case 316: + /* linux_move_pages */ + case 317: + /* linux_getcpu */ + case 318: + /* linux_epoll_pwait */ + case 319: + /* linux_utimensat */ + case 320: + /* linux_signalfd */ + case 321: + /* linux_timerfd_create */ + case 322: + /* linux_eventfd */ + case 323: + /* linux_fallocate */ + case 324: + /* linux_timerfd_settime */ + case 325: + /* linux_timerfd_gettime */ + case 326: + /* linux_signalfd4 */ + case 327: + /* linux_eventfd2 */ + case 328: + /* linux_epoll_create1 */ + case 329: + /* linux_dup3 */ + case 330: + /* linux_pipe2 */ + case 331: + /* linux_inotify_init1 */ + case 332: + /* linux_preadv */ + case 333: + /* linux_pwritev */ + case 334: + /* linux_rt_tsigqueueinfo */ + case 335: + /* linux_perf_event_open */ + case 336: + /* linux_recvmmsg */ + case 337: + /* linux_fanotify_init */ + case 338: + /* linux_fanotify_mark */ + case 339: + /* linux_prlimit64 */ + case 340: + /* linux_name_to_handle_at */ + case 341: + /* linux_open_by_handle_at */ + case 342: + /* linux_clock_adjtime */ + case 343: + /* linux_syncfs */ + case 344: + /* linux_sendmmsg */ + case 345: + /* linux_setns */ + case 346: + /* linux_process_vm_readv */ + case 347: + /* linux_process_vm_writev */ + case 348: default: break; }; Modified: head/sys/i386/linux/linux_proto.h ============================================================================== --- head/sys/i386/linux/linux_proto.h Sat Mar 10 23:10:18 2012 (r232799) +++ head/sys/i386/linux/linux_proto.h Sat Mar 10 23:11:21 2012 (r232800) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/linux/syscalls.master 228957 2011-12-29 15:34:59Z jhb + * created from FreeBSD: head/sys/i386/linux/syscalls.master 232799 2012-03-10 23:10:18Z netchild */ #ifndef _LINUX_SYSPROTO_H_ @@ -1022,6 +1022,102 @@ struct linux_tee_args { struct linux_vmsplice_args { register_t dummy; }; +struct linux_move_pages_args { + register_t dummy; +}; +struct linux_getcpu_args { + register_t dummy; +}; +struct linux_epoll_pwait_args { + register_t dummy; +}; +struct linux_utimensat_args { + register_t dummy; +}; +struct linux_signalfd_args { + register_t dummy; +}; +struct linux_timerfd_create_args { + register_t dummy; +}; +struct linux_eventfd_args { + register_t dummy; +}; +struct linux_fallocate_args { + register_t dummy; +}; +struct linux_timerfd_settime_args { + register_t dummy; +}; +struct linux_timerfd_gettime_args { + register_t dummy; +}; +struct linux_signalfd4_args { + register_t dummy; +}; +struct linux_eventfd2_args { + register_t dummy; +}; +struct linux_epoll_create1_args { + register_t dummy; +}; +struct linux_dup3_args { + register_t dummy; +}; +struct linux_pipe2_args { + register_t dummy; +}; +struct linux_inotify_init1_args { + register_t dummy; +}; +struct linux_preadv_args { + register_t dummy; +}; +struct linux_pwritev_args { + register_t dummy; +}; +struct linux_rt_tsigqueueinfo_args { + register_t dummy; +}; +struct linux_perf_event_open_args { + register_t dummy; +}; +struct linux_recvmmsg_args { + register_t dummy; +}; +struct linux_fanotify_init_args { + register_t dummy; +}; +struct linux_fanotify_mark_args { + register_t dummy; +}; +struct linux_prlimit64_args { + register_t dummy; +}; +struct linux_name_to_handle_at_args { + register_t dummy; +}; +struct linux_open_by_handle_at_args { + register_t dummy; +}; +struct linux_clock_adjtime_args { + register_t dummy; +}; +struct linux_syncfs_args { + register_t dummy; +}; +struct linux_sendmmsg_args { + register_t dummy; +}; +struct linux_setns_args { + register_t dummy; +}; +struct linux_process_vm_readv_args { + register_t dummy; +}; +struct linux_process_vm_writev_args { + register_t dummy; +}; #define nosys linux_nosys int linux_fork(struct thread *, struct linux_fork_args *); int linux_open(struct thread *, struct linux_open_args *); @@ -1266,6 +1362,38 @@ int linux_splice(struct thread *, struct int linux_sync_file_range(struct thread *, struct linux_sync_file_range_args *); int linux_tee(struct thread *, struct linux_tee_args *); int linux_vmsplice(struct thread *, struct linux_vmsplice_args *); +int linux_move_pages(struct thread *, struct linux_move_pages_args *); +int linux_getcpu(struct thread *, struct linux_getcpu_args *); +int linux_epoll_pwait(struct thread *, struct linux_epoll_pwait_args *); +int linux_utimensat(struct thread *, struct linux_utimensat_args *); +int linux_signalfd(struct thread *, struct linux_signalfd_args *); +int linux_timerfd_create(struct thread *, struct linux_timerfd_create_args *); +int linux_eventfd(struct thread *, struct linux_eventfd_args *); +int linux_fallocate(struct thread *, struct linux_fallocate_args *); +int linux_timerfd_settime(struct thread *, struct linux_timerfd_settime_args *); +int linux_timerfd_gettime(struct thread *, struct linux_timerfd_gettime_args *); +int linux_signalfd4(struct thread *, struct linux_signalfd4_args *); +int linux_eventfd2(struct thread *, struct linux_eventfd2_args *); +int linux_epoll_create1(struct thread *, struct linux_epoll_create1_args *); +int linux_dup3(struct thread *, struct linux_dup3_args *); +int linux_pipe2(struct thread *, struct linux_pipe2_args *); +int linux_inotify_init1(struct thread *, struct linux_inotify_init1_args *); +int linux_preadv(struct thread *, struct linux_preadv_args *); +int linux_pwritev(struct thread *, struct linux_pwritev_args *); +int linux_rt_tsigqueueinfo(struct thread *, struct linux_rt_tsigqueueinfo_args *); +int linux_perf_event_open(struct thread *, struct linux_perf_event_open_args *); +int linux_recvmmsg(struct thread *, struct linux_recvmmsg_args *); +int linux_fanotify_init(struct thread *, struct linux_fanotify_init_args *); +int linux_fanotify_mark(struct thread *, struct linux_fanotify_mark_args *); +int linux_prlimit64(struct thread *, struct linux_prlimit64_args *); +int linux_name_to_handle_at(struct thread *, struct linux_name_to_handle_at_args *); +int linux_open_by_handle_at(struct thread *, struct linux_open_by_handle_at_args *); +int linux_clock_adjtime(struct thread *, struct linux_clock_adjtime_args *); +int linux_syncfs(struct thread *, struct linux_syncfs_args *); +int linux_sendmmsg(struct thread *, struct linux_sendmmsg_args *); +int linux_setns(struct thread *, struct linux_setns_args *); +int linux_process_vm_readv(struct thread *, struct linux_process_vm_readv_args *); +int linux_process_vm_writev(struct thread *, struct linux_process_vm_writev_args *); #ifdef COMPAT_43 @@ -1537,6 +1665,38 @@ int linux_vmsplice(struct thread *, stru #define LINUX_SYS_AUE_linux_sync_file_range AUE_NULL #define LINUX_SYS_AUE_linux_tee AUE_NULL #define LINUX_SYS_AUE_linux_vmsplice AUE_NULL +#define LINUX_SYS_AUE_linux_move_pages AUE_NULL +#define LINUX_SYS_AUE_linux_getcpu AUE_NULL +#define LINUX_SYS_AUE_linux_epoll_pwait AUE_NULL +#define LINUX_SYS_AUE_linux_utimensat AUE_NULL +#define LINUX_SYS_AUE_linux_signalfd AUE_NULL +#define LINUX_SYS_AUE_linux_timerfd_create AUE_NULL +#define LINUX_SYS_AUE_linux_eventfd AUE_NULL +#define LINUX_SYS_AUE_linux_fallocate AUE_NULL +#define LINUX_SYS_AUE_linux_timerfd_settime AUE_NULL +#define LINUX_SYS_AUE_linux_timerfd_gettime AUE_NULL +#define LINUX_SYS_AUE_linux_signalfd4 AUE_NULL +#define LINUX_SYS_AUE_linux_eventfd2 AUE_NULL +#define LINUX_SYS_AUE_linux_epoll_create1 AUE_NULL +#define LINUX_SYS_AUE_linux_dup3 AUE_NULL +#define LINUX_SYS_AUE_linux_pipe2 AUE_NULL +#define LINUX_SYS_AUE_linux_inotify_init1 AUE_NULL +#define LINUX_SYS_AUE_linux_preadv AUE_NULL +#define LINUX_SYS_AUE_linux_pwritev AUE_NULL +#define LINUX_SYS_AUE_linux_rt_tsigqueueinfo AUE_NULL +#define LINUX_SYS_AUE_linux_perf_event_open AUE_NULL +#define LINUX_SYS_AUE_linux_recvmmsg AUE_NULL +#define LINUX_SYS_AUE_linux_fanotify_init AUE_NULL +#define LINUX_SYS_AUE_linux_fanotify_mark AUE_NULL +#define LINUX_SYS_AUE_linux_prlimit64 AUE_NULL +#define LINUX_SYS_AUE_linux_name_to_handle_at AUE_NULL +#define LINUX_SYS_AUE_linux_open_by_handle_at AUE_NULL +#define LINUX_SYS_AUE_linux_clock_adjtime AUE_NULL +#define LINUX_SYS_AUE_linux_syncfs AUE_NULL +#define LINUX_SYS_AUE_linux_sendmmsg AUE_NULL +#define LINUX_SYS_AUE_linux_setns AUE_NULL +#define LINUX_SYS_AUE_linux_process_vm_readv AUE_NULL +#define LINUX_SYS_AUE_linux_process_vm_writev AUE_NULL #undef PAD_ #undef PADL_ Modified: head/sys/i386/linux/linux_syscall.h ============================================================================== --- head/sys/i386/linux/linux_syscall.h Sat Mar 10 23:10:18 2012 (r232799) +++ head/sys/i386/linux/linux_syscall.h Sat Mar 10 23:11:21 2012 (r232800) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/linux/syscalls.master 228957 2011-12-29 15:34:59Z jhb + * created from FreeBSD: head/sys/i386/linux/syscalls.master 232799 2012-03-10 23:10:18Z netchild */ #define LINUX_SYS_exit 1 @@ -296,4 +296,36 @@ #define LINUX_SYS_linux_sync_file_range 314 #define LINUX_SYS_linux_tee 315 #define LINUX_SYS_linux_vmsplice 316 -#define LINUX_SYS_MAXSYSCALL 317 +#define LINUX_SYS_linux_move_pages 317 +#define LINUX_SYS_linux_getcpu 318 +#define LINUX_SYS_linux_epoll_pwait 319 +#define LINUX_SYS_linux_utimensat 320 +#define LINUX_SYS_linux_signalfd 321 +#define LINUX_SYS_linux_timerfd_create 322 +#define LINUX_SYS_linux_eventfd 323 +#define LINUX_SYS_linux_fallocate 324 +#define LINUX_SYS_linux_timerfd_settime 325 +#define LINUX_SYS_linux_timerfd_gettime 326 +#define LINUX_SYS_linux_signalfd4 327 +#define LINUX_SYS_linux_eventfd2 328 +#define LINUX_SYS_linux_epoll_create1 329 +#define LINUX_SYS_linux_dup3 330 +#define LINUX_SYS_linux_pipe2 331 +#define LINUX_SYS_linux_inotify_init1 332 +#define LINUX_SYS_linux_preadv 333 +#define LINUX_SYS_linux_pwritev 334 +#define LINUX_SYS_linux_rt_tsigqueueinfo 335 +#define LINUX_SYS_linux_perf_event_open 336 +#define LINUX_SYS_linux_recvmmsg 337 +#define LINUX_SYS_linux_fanotify_init 338 +#define LINUX_SYS_linux_fanotify_mark 339 +#define LINUX_SYS_linux_prlimit64 340 +#define LINUX_SYS_linux_name_to_handle_at 341 +#define LINUX_SYS_linux_open_by_handle_at 342 +#define LINUX_SYS_linux_clock_adjtime 343 +#define LINUX_SYS_linux_syncfs 344 +#define LINUX_SYS_linux_sendmmsg 345 +#define LINUX_SYS_linux_setns 346 +#define LINUX_SYS_linux_process_vm_readv 347 +#define LINUX_SYS_linux_process_vm_writev 348 +#define LINUX_SYS_MAXSYSCALL 349 Modified: head/sys/i386/linux/linux_syscalls.c ============================================================================== --- head/sys/i386/linux/linux_syscalls.c Sat Mar 10 23:10:18 2012 (r232799) +++ head/sys/i386/linux/linux_syscalls.c Sat Mar 10 23:11:21 2012 (r232800) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/linux/syscalls.master 228957 2011-12-29 15:34:59Z jhb + * created from FreeBSD: head/sys/i386/linux/syscalls.master 232799 2012-03-10 23:10:18Z netchild */ const char *linux_syscallnames[] = { @@ -281,7 +281,7 @@ const char *linux_syscallnames[] = { "linux_tgkill", /* 270 = linux_tgkill */ "linux_utimes", /* 271 = linux_utimes */ "linux_fadvise64_64", /* 272 = linux_fadvise64_64 */ - "#273", /* 273 = */ + "#273", /* 273 = vserver */ "linux_mbind", /* 274 = linux_mbind */ "linux_get_mempolicy", /* 275 = linux_get_mempolicy */ "linux_set_mempolicy", /* 276 = linux_set_mempolicy */ @@ -325,4 +325,36 @@ const char *linux_syscallnames[] = { "linux_sync_file_range", /* 314 = linux_sync_file_range */ "linux_tee", /* 315 = linux_tee */ "linux_vmsplice", /* 316 = linux_vmsplice */ + "linux_move_pages", /* 317 = linux_move_pages */ + "linux_getcpu", /* 318 = linux_getcpu */ + "linux_epoll_pwait", /* 319 = linux_epoll_pwait */ + "linux_utimensat", /* 320 = linux_utimensat */ + "linux_signalfd", /* 321 = linux_signalfd */ + "linux_timerfd_create", /* 322 = linux_timerfd_create */ + "linux_eventfd", /* 323 = linux_eventfd */ + "linux_fallocate", /* 324 = linux_fallocate */ + "linux_timerfd_settime", /* 325 = linux_timerfd_settime */ + "linux_timerfd_gettime", /* 326 = linux_timerfd_gettime */ + "linux_signalfd4", /* 327 = linux_signalfd4 */ + "linux_eventfd2", /* 328 = linux_eventfd2 */ + "linux_epoll_create1", /* 329 = linux_epoll_create1 */ + "linux_dup3", /* 330 = linux_dup3 */ + "linux_pipe2", /* 331 = linux_pipe2 */ + "linux_inotify_init1", /* 332 = linux_inotify_init1 */ + "linux_preadv", /* 333 = linux_preadv */ + "linux_pwritev", /* 334 = linux_pwritev */ + "linux_rt_tsigqueueinfo", /* 335 = linux_rt_tsigqueueinfo */ + "linux_perf_event_open", /* 336 = linux_perf_event_open */ + "linux_recvmmsg", /* 337 = linux_recvmmsg */ + "linux_fanotify_init", /* 338 = linux_fanotify_init */ + "linux_fanotify_mark", /* 339 = linux_fanotify_mark */ + "linux_prlimit64", /* 340 = linux_prlimit64 */ + "linux_name_to_handle_at", /* 341 = linux_name_to_handle_at */ + "linux_open_by_handle_at", /* 342 = linux_open_by_handle_at */ + "linux_clock_adjtime", /* 343 = linux_clock_adjtime */ + "linux_syncfs", /* 344 = linux_syncfs */ + "linux_sendmmsg", /* 345 = linux_sendmmsg */ + "linux_setns", /* 346 = linux_setns */ + "linux_process_vm_readv", /* 347 = linux_process_vm_readv */ + "linux_process_vm_writev", /* 348 = linux_process_vm_writev */ }; Modified: head/sys/i386/linux/linux_sysent.c ============================================================================== --- head/sys/i386/linux/linux_sysent.c Sat Mar 10 23:10:18 2012 (r232799) +++ head/sys/i386/linux/linux_sysent.c Sat Mar 10 23:11:21 2012 (r232800) @@ -3,7 +3,7 @@ * *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Mar 10 23:27:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 974991065672; Sat, 10 Mar 2012 23:27:04 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 696FF8FC08; Sat, 10 Mar 2012 23:27:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2ANR4J4083340; Sat, 10 Mar 2012 23:27:04 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2ANR4wv083339; Sat, 10 Mar 2012 23:27:04 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201203102327.q2ANR4wv083339@svn.freebsd.org> From: Juli Mallett Date: Sat, 10 Mar 2012 23:27:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232801 - head/sys/mips/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2012 23:27:04 -0000 Author: jmallett Date: Sat Mar 10 23:27:03 2012 New Revision: 232801 URL: http://svn.freebsd.org/changeset/base/232801 Log: Remove some headers not used by kernel or world and which are not present in other ports. Deleted: head/sys/mips/include/bswap.h head/sys/mips/include/clockvar.h head/sys/mips/include/cputypes.h head/sys/mips/include/iodev.h head/sys/mips/include/mp_watchdog.h head/sys/mips/include/pci_cfgreg.h head/sys/mips/include/ppireg.h head/sys/mips/include/timerreg.h