From owner-svn-src-all@FreeBSD.ORG Sun Oct 21 03:30: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 DA41455D; Sun, 21 Oct 2012 03:30:36 +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 BFB008FC0C; Sun, 21 Oct 2012 03:30: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 q9L3UaYm073763; Sun, 21 Oct 2012 03:30:36 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9L3UaY5073760; Sun, 21 Oct 2012 03:30:36 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210210330.q9L3UaY5073760@svn.freebsd.org> From: Eitan Adler Date: Sun, 21 Oct 2012 03:30:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241793 - in head/sys/dev/usb: . net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2012 03:30:36 -0000 Author: eadler Date: Sun Oct 21 03:30:36 2012 New Revision: 241793 URL: http://svn.freebsd.org/changeset/base/241793 Log: Add support for iPhone 5 tethering. PR: usb/172172 Submitted by: Ali Mashtizadeh Approved by: cperciva MFC after: 1 week Modified: head/sys/dev/usb/net/if_ipheth.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/net/if_ipheth.c ============================================================================== --- head/sys/dev/usb/net/if_ipheth.c Sun Oct 21 01:09:02 2012 (r241792) +++ head/sys/dev/usb/net/if_ipheth.c Sun Oct 21 03:30:36 2012 (r241793) @@ -161,6 +161,9 @@ static const STRUCT_USB_HOST_ID ipheth_d {IPHETH_ID(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPHONE_4, IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS, IPHETH_USBINTF_PROTO)}, + {IPHETH_ID(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPHONE_5, + IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS, + IPHETH_USBINTF_PROTO)}, }; static int Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Sun Oct 21 01:09:02 2012 (r241792) +++ head/sys/dev/usb/usbdevs Sun Oct 21 03:30:36 2012 (r241793) @@ -1078,6 +1078,7 @@ product APPLE IPOD_TOUCH 0x1291 iPod Tou product APPLE IPHONE_3G 0x1292 iPhone 3G product APPLE IPHONE_3GS 0x1294 iPhone 3GS product APPLE IPHONE_4 0x1297 iPhone 4 +product APPLE IPHONE_5 0x12a8 iPhone 5 product APPLE IPAD 0x129a iPad product APPLE ETHERNET 0x1402 Ethernet A1277 From owner-svn-src-all@FreeBSD.ORG Sun Oct 21 04:02: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 057CA9EE; Sun, 21 Oct 2012 04:02:35 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E26D68FC08; Sun, 21 Oct 2012 04:02: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 q9L42YrG080148; Sun, 21 Oct 2012 04:02:34 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9L42Y1F080146; Sun, 21 Oct 2012 04:02:34 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201210210402.q9L42Y1F080146@svn.freebsd.org> From: Rui Paulo Date: Sun, 21 Oct 2012 04:02:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241794 - head/sys/powerpc/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2012 04:02:35 -0000 Author: rpaulo Date: Sun Oct 21 04:02:34 2012 New Revision: 241794 URL: http://svn.freebsd.org/changeset/base/241794 Log: Add "options WII". Modified: head/sys/powerpc/conf/NOTES Modified: head/sys/powerpc/conf/NOTES ============================================================================== --- head/sys/powerpc/conf/NOTES Sun Oct 21 03:30:36 2012 (r241793) +++ head/sys/powerpc/conf/NOTES Sun Oct 21 04:02:34 2012 (r241794) @@ -24,6 +24,7 @@ options POWERMAC #NewWorld Apple Power #options PS3 #Sony Playstation 3 options PSIM #GDB PSIM ppc simulator options MAMBO #IBM Mambo Full System Simulator +#options WII #Nintendo Wii options SC_OFWFB # OFW frame buffer From owner-svn-src-all@FreeBSD.ORG Sun Oct 21 04:50: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 BBE4E7AE; Sun, 21 Oct 2012 04:50:02 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail04.syd.optusnet.com.au (mail04.syd.optusnet.com.au [211.29.132.185]) by mx1.freebsd.org (Postfix) with ESMTP id 31DA18FC08; Sun, 21 Oct 2012 04:50:01 +0000 (UTC) Received: from c122-106-175-26.carlnfd1.nsw.optusnet.com.au (c122-106-175-26.carlnfd1.nsw.optusnet.com.au [122.106.175.26]) by mail04.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q9L4nvsc016612 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 21 Oct 2012 15:49:59 +1100 Date: Sun, 21 Oct 2012 15:49:57 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Marcel Moolenaar Subject: Re: svn commit: r241790 - head/share/mk In-Reply-To: <201210202244.q9KMiMer023523@svn.freebsd.org> Message-ID: <20121021151723.D926@besplex.bde.org> References: <201210202244.q9KMiMer023523@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-Cloudmark-Score: 0 X-Optus-Cloudmark-Analysis: v=2.0 cv=IbXfwhWa c=1 sm=1 a=lPAooKO-k10A:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=wq_FEnq2wwYA:10 a=ZK8GlRZVlntSAGWKRaQA:9 a=CjuIK1q_8ugA:10 a=bxQHXO5Py4tHmhUgaywp5w==:117 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2012 04:50:02 -0000 On Sat, 20 Oct 2012, Marcel Moolenaar wrote: > Log: > Revert r241752. The claim that it's more correct while at the same time > causing a build breakage is interesting to say the least. Does it work to do: > Modified: head/share/mk/bsd.dep.mk > ============================================================================== > --- head/share/mk/bsd.dep.mk Sat Oct 20 19:38:22 2012 (r241789) > +++ head/share/mk/bsd.dep.mk Sat Oct 20 22:44:22 2012 (r241790) > @@ -95,17 +95,16 @@ CLEANFILES+= ${_LC} > SRCS:= ${SRCS:S/${_YSRC}/${_YC}/} > CLEANFILES+= ${_YC} > .if !empty(YFLAGS:M-d) && !empty(SRCS:My.tab.h) > -y.tab.h: ${_YSRC} > +.ORDER: ${_YC} y.tab.h (1) Change the order of the files here, so that it is expected that ${_YC} ends up newer than y.tab.h. > +${_YC} y.tab.h: ${_YSRC} > ${YACC} ${YFLAGS} ${.ALLSRC} > -${_YC}: y.tab.h > cp y.tab.c ${_YC} (2) After the cp, add "sleep 0.1; touch ${_YC}" to try to ensure that the file that is expected to be newer actually is newer. Shouldn't be needed after (1). Without (1), touch y.tab.h instead, but it seems more natural for the .c file to end up newer. > CLEANFILES+= y.tab.c y.tab.h > .elif !empty(YFLAGS:M-d) > .for _YH in ${_YC:R}.h > -${_YH}: ${_YSRC} > +${_YH}: ${_YC} > +${_YC}: ${_YSRC} > ${YACC} ${YFLAGS} -o ${_YC} ${.ALLSRC} > -${_YC}: ${_YH} > - @touch ${.TARGET} This only reverts to the previous buggy version. It is still missing the .ORDER directive and just shuffles the order in the bogus dependency chain. (3) After restoring the .ORDER directive, reverse the order of the files in it. (4) After the yacc command, add "sleep 0.1; touch ${_YSRC}". Now there is no cp to touch the .c file, so we must do something to try to ensure that it is newer. We could also append an empty line to it and not have to sleep for a while to ensure that clock used by touch(1) is in advance of the clock used by the kernel for timestamps (appending the empty line uses the kernel timestamp clock, which is the same as the one used for setting the mtime for y.tab.h, except in exotic cases like someone changing vfs.timestamp.precision or stepping the clock backwards underneath us. Otherwise, the sleep might even need to be N + 0.1 seconds, where N is the file system granularity in seconds and 0.1 is a safety margin for incoherent clocks (enugh for HZ = 10). N != 0 would be needed if we needed a time strictly later, but I think make only needs non-strictly later. > SRCS+= ${_YH} > CLEANFILES+= ${_YH} > .endfor > Bruce From owner-svn-src-all@FreeBSD.ORG Sun Oct 21 07:20: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 51B2660C; Sun, 21 Oct 2012 07:20:54 +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 6B1B88FC0A; Sun, 21 Oct 2012 07:20:52 +0000 (UTC) Received: from c122-106-175-26.carlnfd1.nsw.optusnet.com.au (c122-106-175-26.carlnfd1.nsw.optusnet.com.au [122.106.175.26]) by mail03.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q9L7KfXt024145 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 21 Oct 2012 18:20:42 +1100 Date: Sun, 21 Oct 2012 18:20:41 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "Simon J. Gerraty" Subject: Re: svn commit: r241298 - in head: . gnu/usr.bin/cc/cc_int gnu/usr.bin/cc/include kerberos5 kerberos5/tools/asn1_compile kerberos5/tools/slc lib/clang/include share/mk tools/build/make_check usr.sbin/c... In-Reply-To: <20121020181822.A6C6C58094@chaos.jnpr.net> Message-ID: <20121021172847.N1824@besplex.bde.org> References: <201210062001.q96K16Or030755@svn.freebsd.org> <20121007161440.C7605@besplex.bde.org> <81CB9A3A-4BFF-41B2-A1F9-3721A40F6260@xcllnt.net> <20121008165228.F7997@besplex.bde.org> <965E2363-6866-4A10-A7B1-C428B3C78925@xcllnt.net> <20121020205008.C1781@besplex.bde.org> <20121020181822.A6C6C58094@chaos.jnpr.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-Cloudmark-Score: 0 X-Optus-Cloudmark-Analysis: v=2.0 cv=Up07rJMB c=1 sm=1 a=LFdMy-NRfKoA:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=Qs8lTao0p00A:10 a=cZds6CABXkSaZCioNQMA:9 a=CjuIK1q_8ugA:10 a=bxQHXO5Py4tHmhUgaywp5w==:117 Cc: "svn-src-head@FreeBSD.org" , "svn-src-all@FreeBSD.org" , "src-committers@FreeBSD.org" , Bruce Evans , Marcel Moolenaar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2012 07:20:54 -0000 On Sat, 20 Oct 2012, Simon J. Gerraty wrote: > On Sat, 20 Oct 2012 21:13:36 +1100 (EST), Bruce Evans writes: >> Back to the old thread. Followup to the new commit thread. > > I seem to have missed a bit of the conversation, so sorry if some of > this has been done to death already. > > First some background: > > I believe the reason for the original change (which was wrong btw, > I had stared at that diff many times and saw it as what I expected it to > be - which I think Marcel has now committed), > is that .ORDER does not work in jobs mode in the presence of explicit > dependencies (see below). > > Since we auto collect dependencies during the build, we've learned to > avoid .ORDER, it is often responsible for introducing cycles in the > dependency graph. That seems to be a bug in the dependency collection. .ORDER expresses a requirement that is similar to a dependency requirement, and any dependency that conflicts with that is a bug. In the yacc directives it expresses the requirement more clearly than a fake dependency -- '.ORDER: a b' was replaced by 'b: a' (or perhaps the reverse, since the order can be either), but there is no real dependency, only a sequential requirement. Buggy auto-generation of depencies would cause essentially the same cycle if it genrated 'a: b'. But old make didn't detect cycles due to .ORDER. > Given the makefile: > > --------------------8<-------------------- > .MAIN: all > > ALPHA=a b c d e f g h i j k l m n o p q r s t u v w x y z > > SECS?=1 > > ${ALPHA}: > @echo "`date +%s` $@..."; sleep ${SECS} > > .NOPATH: ${ALPHA} > .PHONY: ${ALPHA} > > ALL=r a l p h i s g i t > > .ifdef ORDER > x!= echo .ORDER: r a l p h >&2; echo > .ORDER: r a l p h > .endif > > all: ${ALL} > > .ifdef DEPS_A > x!= echo a: p e >&2; echo > a: p e > .endif > --------------------8<-------------------- > > The following is using FreeBSD make from 10.x (though it doesn't make > any difference): > > First compat mode: > > $ fmake -r -f /home/sjg/make-tests/order > 1350755164 r... > 1350755165 a... > 1350755166 l... > 1350755168 p... > 1350755169 h... > 1350755170 i... > 1350755171 s... > 1350755172 g... > 1350755173 t... > $ > > Looks as you would expect, as does jobs mode: > > $ fmake -r -f /home/sjg/make-tests/order -j3 > 1350755240 r... > 1350755240 l... > 1350755240 a... > 1350755241 p... > 1350755241 h... > 1350755241 i... > 1350755242 s... > 1350755242 g... > 1350755242 t... > $ > > Ie. the order is no longer as listed, but we haven't introduce .ORDER yet. > When we throw .ORDER in: > > $ fmake -r -f /home/sjg/make-tests/order -j3 -DORDER > .ORDER: r a l p h > 1350755270 s... > 1350755270 i... > 1350755270 r... > 1350755271 g... > 1350755271 t... > 1350755271 a... > 1350755272 l... > 1350755273 p... > 1350755275 h... > $ > > This is again what we should expect, the order is not as listed but > the sequence r a l p h is correctly ordered. > > However, as soon as we thrown in an explicit dependency - not even one > that would conflict: > > $ fmake -r -f /home/sjg/make-tests/order -j3 -DORDER -DDEPS_A > .ORDER: r a l p h > a: p e > 1350755349 r... > 1350755350 i... > 1350755350 s... > 1350755351 g... > 1350755351 t... > 1350755351 e... > $ > > That is simply incorrect. The dependency conflicts with the ordering requirement, so it should be about make like a cycle does. It says that p must be built before a, but the ordering requirement says that a must be built before p. > Even if we go back to compat mode: > > $ fmake -r -f /home/sjg/make-tests/order -DORDER -DDEPS_A > .ORDER: r a l p h > a: p e > 1350755881 r... > 1350755882 p... > 1350755883 e... > 1350755884 a... > 1350755885 l... > 1350755887 h... > 1350755888 i... > 1350755889 s... > 1350755890 g... > 1350755891 t... > $ > > This is not correct either, but you can see that the dependency takes > precedence over .ORDER. The opposite precedence would break things faster, but there is no correct choice. Everthing works unsurprisingly with the dependency "p: a" that is consistent with the order. > The results with bmake are more spectaclular since it detects that it is > lost a spews its complaints: > > $ bmake -r -f /home/sjg/make-tests/order -DORDER -DDEPS_A -j3 > .ORDER: r a l p h > a: p e > --- r --- > 1350756420 r... > `p' was not built (made 1, flags 2009, type b030001)! > `p' has .ORDER dependency against l (made 0, flags 9, type b030001) > `e' was not built (made 0, flags 2009, type b030001)! > `l' was not built (made 0, flags 2009, type b030001)! > `l' has .ORDER dependency against a (made 1, flags 3019, type > b030001) > `h' was not built (made 0, flags 2009, type b030001)! > `h' has .ORDER dependency against p (made 1, flags 2009, type > b030001) > `i' was not built (made 0, flags 2009, type b030001)! > `s' was not built (made 0, flags 2009, type b030001)! > `g' was not built (made 0, flags 2009, type b030001)! > `t' was not built (made 0, flags 2009, type b030001)! > $ > > This is actually handy since you can check build logs for that sort of > thing and know you have an issue. It should detect the problem as an inconsistent makefile earlier (not its problem). The requirement for building yacc files would be even more clearly expressed by a .SEQUENTIAL directive than a .ORDER one, since we don't care about the precise order. Then there would be no pseudo- dependency and make would have to choose an order permitted by the real dependencies. make already has the .NOTPARALLEL directive, but it applies to the whole makefile. > The current logic does (for the interesting case - assuming yacc -d etc) > > parser.h: parser.y > yacc etc > > parser.c: parser.h > touch ${.TARGET} > > the only downside of this, is that if parser.c is removed > but parser.h is left alone, and empty parser.c will be produced. > This is actually a safe failure mode (build will fail), for what is > essentially a corner case. > > In all other respects the above is preferable because it works reliably > in jobs mode and it avoids any risk of running yacc multiple times to do > the same thing, and will not conflict with any auto collected > dependencies (assuming parser.c includes parser.h) Any dependency of parser.c on parser.h is a bug, whether it is in the makefile auto-collected. parser.c can't be compiled until parser.h is created, but this isn't a dependency of parser.c on parser.h; it is a dependency of the object file on both. Was the original bug just this buggy dependency? The .ORDER statement gives the opposite pseudo-dependency, so the bug might be detected accidentally as a pseudo-cycle. Bruce From owner-svn-src-all@FreeBSD.ORG Sun Oct 21 08:38: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 06EABB9D; Sun, 21 Oct 2012 08:38:56 +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 E1B108FC14; Sun, 21 Oct 2012 08:38: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 q9L8ctvS028133; Sun, 21 Oct 2012 08:38:55 GMT (envelope-from andreast@svn.freebsd.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9L8ctmr028131; Sun, 21 Oct 2012 08:38:55 GMT (envelope-from andreast@svn.freebsd.org) Message-Id: <201210210838.q9L8ctmr028131@svn.freebsd.org> From: Andreas Tobler Date: Sun, 21 Oct 2012 08:38:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241797 - head/usr.bin/m4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2012 08:38:56 -0000 Author: andreast Date: Sun Oct 21 08:38:55 2012 New Revision: 241797 URL: http://svn.freebsd.org/changeset/base/241797 Log: Fix build. Modified: head/usr.bin/m4/Makefile Modified: head/usr.bin/m4/Makefile ============================================================================== --- head/usr.bin/m4/Makefile Sun Oct 21 08:29:58 2012 (r241796) +++ head/usr.bin/m4/Makefile Sun Oct 21 08:38:55 2012 (r241797) @@ -5,7 +5,7 @@ # if you want the paste & spaste macros. PROG= m4 -CFLAGS+=-DEXTENDED -I${.CURDIR}/lib +CFLAGS+=-DEXTENDED -I${.CURDIR} -I${.CURDIR}/lib LDADD= -ly -ll -lm # clang needs 1 while with gcc we can use 2 #WARNS= 1 From owner-svn-src-all@FreeBSD.ORG Sun Oct 21 09:28: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 6E3FFD69; Sun, 21 Oct 2012 09:28:47 +0000 (UTC) (envelope-from edschouten@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id EF7078FC0C; Sun, 21 Oct 2012 09:28:46 +0000 (UTC) Received: by mail-ob0-f182.google.com with SMTP id wc20so2181884obb.13 for ; Sun, 21 Oct 2012 02:28:46 -0700 (PDT) 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; bh=uB3hyF9EIoSO5A6IJ3M2T1T3Gopr6MJTPycLdOhzCoc=; b=ntzQF/IT4q+HfG56DA5cne2nQmVJoTSoc2tQiZKMnfXcT6UI5A6Aklsy40hQbR0GZ2 ozTmqpZBZ6o4zmHScYnB0mO9p1i/BI5DmJn197YGlHQ7nA1jHHQUoJO3K7fanOC6z++Q A+wCTWvwyKoE6VZNA5qhjV6ppK+QrUNMT3otnPQvNAh+0a3PgrNdrFFexRxb9ujTMv5M rp28c+dPqipNpGO1ITn99aHCNG10UdHceup6Z5Y2637YbVgEBXSJbaROBCGTiC1OiZBL J5Wk5GM+Tw8XNUM25uHIuLs1C2hqeVsDHpvS+gogHkf3Bkm77LjsAc1ZWnMVc2T3xNCM IQCQ== MIME-Version: 1.0 Received: by 10.182.108.69 with SMTP id hi5mr4543418obb.43.1350811726117; Sun, 21 Oct 2012 02:28:46 -0700 (PDT) Sender: edschouten@gmail.com Received: by 10.76.151.39 with HTTP; Sun, 21 Oct 2012 02:28:46 -0700 (PDT) In-Reply-To: <5082C595.3040504@FreeBSD.org> References: <201210201033.q9KAXGRm007583@svn.freebsd.org> <5082C595.3040504@FreeBSD.org> Date: Sun, 21 Oct 2012 11:28:46 +0200 X-Google-Sender-Auth: B0R3Pqdn-a0-TrTAz8e2_XhLx4s Message-ID: Subject: Re: svn commit: r241777 - in head: bin/dd libexec/rpc.rusersd libexec/talkd usr.bin/cksum usr.bin/m4 usr.sbin/mtree usr.sbin/newsyslog usr.sbin/services_mkdb From: Ed Schouten To: Andreas Tobler Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2012 09:28:47 -0000 Hi Andreas, 2012/10/20 Andreas Tobler : > I get the same failures (on amd64/powerpc64) as the TB on mips for example: > > /src/usr.bin/m4/parser.y:26:18: error: mdef.h: No such file or directory > /src/usr.bin/m4/parser.y:27:20: error: extern.h: No such file or directory > > Is this the right fix? > > [...] Yes! Sorry for the breakage and thanks for fixing/committing it. -- Ed Schouten From owner-svn-src-all@FreeBSD.ORG Sun Oct 21 09:31: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 7CCA5F72; Sun, 21 Oct 2012 09:31:49 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5DAD28FC0C; Sun, 21 Oct 2012 09:31: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 q9L9VnMD038035; Sun, 21 Oct 2012 09:31:49 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9L9Vn50038033; Sun, 21 Oct 2012 09:31:49 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201210210931.q9L9Vn50038033@svn.freebsd.org> From: Brooks Davis Date: Sun, 21 Oct 2012 09:31:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241799 - stable/9/share/mk X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2012 09:31:49 -0000 Author: brooks Date: Sun Oct 21 09:31:48 2012 New Revision: 241799 URL: http://svn.freebsd.org/changeset/base/241799 Log: MFC r228120: Allow NO_FOO to override WITH_FOO that could be specified in /etc/src.conf. This is required to override knobs (e.g. WITH_PROFILE) during buildworld stages in Makefile.inc1 (otherwise the build is stopped due to both WITH_FOO and WITHOUT_FOO defined). PR: misc/172873 Modified: stable/9/share/mk/bsd.own.mk Directory Properties: stable/9/share/mk/ (props changed) Modified: stable/9/share/mk/bsd.own.mk ============================================================================== --- stable/9/share/mk/bsd.own.mk Sun Oct 21 08:46:15 2012 (r241798) +++ stable/9/share/mk/bsd.own.mk Sun Oct 21 09:31:48 2012 (r241799) @@ -208,6 +208,13 @@ COMPRESS_EXT?= .gz MAN \ PROFILE .if defined(NO_${var}) +.if defined(WITH_${var}) +.warning unsetting WITH_${var} +.undef WITH_${var} +.if defined(WITH_${var}) +.error wtf +.endif +.endif WITHOUT_${var}= .endif .endfor From owner-svn-src-all@FreeBSD.ORG Sun Oct 21 10:19:08 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 4A7D5F50; Sun, 21 Oct 2012 10:19:08 +0000 (UTC) (envelope-from kuriyama@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 288938FC08; Sun, 21 Oct 2012 10:19: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 q9LAJ8cN047063; Sun, 21 Oct 2012 10:19:08 GMT (envelope-from kuriyama@svn.freebsd.org) Received: (from kuriyama@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9LAJ7bM047060; Sun, 21 Oct 2012 10:19:07 GMT (envelope-from kuriyama@svn.freebsd.org) Message-Id: <201210211019.q9LAJ7bM047060@svn.freebsd.org> From: Jun Kuriyama Date: Sun, 21 Oct 2012 10:19:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241801 - in stable/9/etc: defaults rc.d X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2012 10:19:08 -0000 Author: kuriyama Date: Sun Oct 21 10:19:07 2012 New Revision: 241801 URL: http://svn.freebsd.org/changeset/base/241801 Log: MFC r239382: - Allow to pass extra parameters for each jails. - To achieve above, convert jail(8) invocation to use new style command line "-c" flag. Modified: stable/9/etc/defaults/rc.conf stable/9/etc/rc.d/jail Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/defaults/rc.conf ============================================================================== --- stable/9/etc/defaults/rc.conf Sun Oct 21 09:46:02 2012 (r241800) +++ stable/9/etc/defaults/rc.conf Sun Oct 21 10:19:07 2012 (r241801) @@ -702,6 +702,7 @@ jail_sysvipc_allow="NO" # Allow SystemV #jail_example_mount_enable="NO" # mount/umount jail's fs #jail_example_fstab="" # fstab(5) for mount/umount #jail_example_flags="-l -U root" # flags for jail(8) +#jail_example_parameters="allow.raw_sockets=1" # extra parameters for this jail ############################################################## ### Define source_rc_confs, the mechanism used by /etc/rc.* ## Modified: stable/9/etc/rc.d/jail ============================================================================== --- stable/9/etc/rc.d/jail Sun Oct 21 09:46:02 2012 (r241800) +++ stable/9/etc/rc.d/jail Sun Oct 21 10:19:07 2012 (r241801) @@ -115,6 +115,8 @@ init_variables() [ -z "${_flags}" ] && _flags="-l -U root" eval _consolelog=\"\${jail_${_j}_consolelog:-${jail_consolelog}}\" [ -z "${_consolelog}" ] && _consolelog="/var/log/jail_${_j}_console.log" + eval _parameters=\"\${jail_${_j}_parameters:-${jail_parameters}}\" + [ -z "${_parameters}" ] && _parameters="" eval _fib=\"\${jail_${_j}_fib:-${jail_fib}}\" # Debugging aid @@ -193,6 +195,7 @@ init_variables() debug "$_j flags: $_flags" debug "$_j consolelog: $_consolelog" + debug "$_j parameters: $_parameters" if [ -z "${_hostname}" ]; then err 3 "$name: No hostname has been defined for ${_j}" @@ -484,9 +487,19 @@ jail_handle_ips_option() esac # Append address to list of addresses for the jail command. - case "${_addrl}" in - "") _addrl="${_addr}" ;; - *) _addrl="${_addrl},${_addr}" ;; + case "${_type}" in + inet) + case "${_addrl}" in + "") _addrl="${_addr}" ;; + *) _addrl="${_addrl},${_addr}" ;; + esac + ;; + inet6) + case "${_addr6l}" in + "") _addr6l="${_addr}" ;; + *) _addr6l="${_addr6l},${_addr}" ;; + esac + ;; esac # Configure interface alias if requested by a given interface @@ -576,6 +589,7 @@ jail_start() continue; fi _addrl="" + _addr6l="" jail_ips "add" if [ -n "${_fib}" ]; then _setfib="setfib -F '${_fib}'" @@ -641,8 +655,8 @@ jail_start() i=$((i + 1)) done - eval ${_setfib} jail -n ${_jail} ${_flags} -i ${_rootdir} ${_hostname} \ - \"${_addrl}\" ${_exec_start} > ${_tmp_jail} 2>&1 \ + eval ${_setfib} jail -n ${_jail} ${_flags} -i -c path=${_rootdir} host.hostname=${_hostname} \ + ip4.addr=\"${_addrl}\" ip6.addr=\"${_addr6l}\" ${_parameters} command=${_exec_start} > ${_tmp_jail} 2>&1 \ 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 543DB6A1; Sun, 21 Oct 2012 11:43:44 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 21EC48FC08; Sun, 21 Oct 2012 11:43: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 q9LBhhUJ064873; Sun, 21 Oct 2012 11:43:43 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9LBhhDn064871; Sun, 21 Oct 2012 11:43:43 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201210211143.q9LBhhDn064871@svn.freebsd.org> From: Marius Strobl Date: Sun, 21 Oct 2012 11:43:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241803 - stable/9/sys/dev/iicbus X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2012 11:43:44 -0000 Author: marius Date: Sun Oct 21 11:43:43 2012 New Revision: 241803 URL: http://svn.freebsd.org/changeset/base/241803 Log: MFC: r241679 It turns out that as documented, PCF8563_R_SECOND_VL (i.e. battery low) doesn't automatically clear when VDD rises above Vlow again and needs to be cleared manually. However, apparently this needs all of the time registers to be set, i.e. pcf8563_settime(), and not just PCF8563_R_SECOND in order for PCF8563_R_SECOND_VL to stick. Thus, we just issue a warning during pcf8563_attach() rather than failing with ENXIO in case it is set. Modified: stable/9/sys/dev/iicbus/pcf8563.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/iicbus/pcf8563.c ============================================================================== --- stable/9/sys/dev/iicbus/pcf8563.c Sun Oct 21 11:16:16 2012 (r241802) +++ stable/9/sys/dev/iicbus/pcf8563.c Sun Oct 21 11:43:43 2012 (r241803) @@ -83,6 +83,16 @@ pcf8563_attach(device_t dev) if (sc->sc_addr == 0) sc->sc_addr = PCF8563_ADDR; + /* + * NB: PCF8563_R_SECOND_VL doesn't automatically clear when VDD + * rises above Vlow again and needs to be cleared manually. + * However, apparently this needs all of the time registers to be + * set, i.e. pcf8563_settime(), and not just PCF8563_R_SECOND in + * order for PCF8563_R_SECOND_VL to stick. Thus, we just issue a + * warning here rather than failing with ENXIO in case it is set. + * Note that pcf8563_settime() will also clear PCF8563_R_SECOND_VL + * as a side-effect. + */ msgs[0].slave = msgs[1].slave = sc->sc_addr; error = iicbus_transfer(device_get_parent(dev), msgs, sizeof(msgs) / sizeof(*msgs)); @@ -90,10 +100,8 @@ pcf8563_attach(device_t dev) device_printf(dev, "%s: cannot read RTC\n", __func__); return (error); } - if ((val & PCF8563_R_SECOND_VL) != 0) { + if ((val & PCF8563_R_SECOND_VL) != 0) device_printf(dev, "%s: battery low\n", __func__); - return (ENXIO); - } sc->sc_year0 = 1900; clock_register(dev, 1000000); /* 1 second resolution */ From owner-svn-src-all@FreeBSD.ORG Sun Oct 21 11:43: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 CC21B6A5; Sun, 21 Oct 2012 11:43:47 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9A75E8FC17; Sun, 21 Oct 2012 11:43: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 q9LBhlM1064917; Sun, 21 Oct 2012 11:43:47 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9LBhlu3064915; Sun, 21 Oct 2012 11:43:47 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201210211143.q9LBhlu3064915@svn.freebsd.org> From: Marius Strobl Date: Sun, 21 Oct 2012 11:43:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r241804 - stable/8/sys/dev/iicbus X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2012 11:43:47 -0000 Author: marius Date: Sun Oct 21 11:43:47 2012 New Revision: 241804 URL: http://svn.freebsd.org/changeset/base/241804 Log: MFC: r241679 It turns out that as documented, PCF8563_R_SECOND_VL (i.e. battery low) doesn't automatically clear when VDD rises above Vlow again and needs to be cleared manually. However, apparently this needs all of the time registers to be set, i.e. pcf8563_settime(), and not just PCF8563_R_SECOND in order for PCF8563_R_SECOND_VL to stick. Thus, we just issue a warning during pcf8563_attach() rather than failing with ENXIO in case it is set. Modified: stable/8/sys/dev/iicbus/pcf8563.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/iicbus/ (props changed) Modified: stable/8/sys/dev/iicbus/pcf8563.c ============================================================================== --- stable/8/sys/dev/iicbus/pcf8563.c Sun Oct 21 11:43:43 2012 (r241803) +++ stable/8/sys/dev/iicbus/pcf8563.c Sun Oct 21 11:43:47 2012 (r241804) @@ -83,6 +83,16 @@ pcf8563_attach(device_t dev) if (sc->sc_addr == 0) sc->sc_addr = PCF8563_ADDR; + /* + * NB: PCF8563_R_SECOND_VL doesn't automatically clear when VDD + * rises above Vlow again and needs to be cleared manually. + * However, apparently this needs all of the time registers to be + * set, i.e. pcf8563_settime(), and not just PCF8563_R_SECOND in + * order for PCF8563_R_SECOND_VL to stick. Thus, we just issue a + * warning here rather than failing with ENXIO in case it is set. + * Note that pcf8563_settime() will also clear PCF8563_R_SECOND_VL + * as a side-effect. + */ msgs[0].slave = msgs[1].slave = sc->sc_addr; error = iicbus_transfer(device_get_parent(dev), msgs, sizeof(msgs) / sizeof(*msgs)); @@ -90,10 +100,8 @@ pcf8563_attach(device_t dev) device_printf(dev, "%s: cannot read RTC\n", __func__); return (error); } - if ((val & PCF8563_R_SECOND_VL) != 0) { + if ((val & PCF8563_R_SECOND_VL) != 0) device_printf(dev, "%s: battery low\n", __func__); - return (ENXIO); - } sc->sc_year0 = 1900; clock_register(dev, 1000000); /* 1 second resolution */ From owner-svn-src-all@FreeBSD.ORG Sun Oct 21 12:01: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 22FF9145; Sun, 21 Oct 2012 12:01:12 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 085F58FC1A; Sun, 21 Oct 2012 12:01: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 q9LC1BOk068538; Sun, 21 Oct 2012 12:01:11 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9LC1B5S068529; Sun, 21 Oct 2012 12:01:11 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201210211201.q9LC1B5S068529@svn.freebsd.org> From: Ulrich Spoerlein Date: Sun, 21 Oct 2012 12:01:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241806 - in head/sbin: fsck fsck_msdosfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2012 12:01:12 -0000 Author: uqs Date: Sun Oct 21 12:01:11 2012 New Revision: 241806 URL: http://svn.freebsd.org/changeset/base/241806 Log: sbin/fsck: s/perror/perr/ to avoid shadowing - rename some other vars too - merge NetBSD license changes Obtained from: NetBSD PR: bin/139802 Reviewed by: ed Modified: head/sbin/fsck/fsck.c head/sbin/fsck/fsutil.c head/sbin/fsck/fsutil.h head/sbin/fsck/preen.c head/sbin/fsck_msdosfs/boot.c head/sbin/fsck_msdosfs/check.c head/sbin/fsck_msdosfs/dir.c head/sbin/fsck_msdosfs/fat.c Modified: head/sbin/fsck/fsck.c ============================================================================== --- head/sbin/fsck/fsck.c Sun Oct 21 11:52:16 2012 (r241805) +++ head/sbin/fsck/fsck.c Sun Oct 21 12:01:11 2012 (r241806) @@ -1,4 +1,4 @@ -/* $NetBSD: fsck.c,v 1.21 1999/04/22 04:20:53 abs Exp $ */ +/* $NetBSD: fsck.c,v 1.30 2003/08/07 10:04:15 agc Exp $ */ /* * Copyright (c) 1996 Christos Zoulas. All rights reserved. @@ -13,11 +13,7 @@ * 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 + * 3. 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. * @@ -35,7 +31,7 @@ * * From: @(#)mount.c 8.19 (Berkeley) 4/19/94 * From: $NetBSD: mount.c,v 1.24 1995/11/18 03:34:29 cgd Exp - * $NetBSD: fsck.c,v 1.21 1999/04/22 04:20:53 abs Exp $ + * $NetBSD: fsck.c,v 1.30 2003/08/07 10:04:15 agc Exp $ */ #include @@ -315,7 +311,7 @@ checkfs(const char *pvfstype, const char */ vfstype = strdup(pvfstype); if (vfstype == NULL) - perror("strdup(pvfstype)"); + perr("strdup(pvfstype)"); for (i = 0; i < strlen(vfstype); i++) { vfstype[i] = tolower(vfstype[i]); if (vfstype[i] == ' ') @@ -502,7 +498,7 @@ catopt(char **sp, const char *o) static void -mangle(char *options, int *argcp, const char ***argvp, int *maxargcp) +mangle(char *opts, int *argcp, const char ***argvp, int *maxargcp) { char *p, *s; int argc, maxargc; @@ -512,7 +508,7 @@ mangle(char *options, int *argcp, const argv = *argvp; maxargc = *maxargcp; - for (s = options; (p = strsep(&s, ",")) != NULL;) { + for (s = opts; (p = strsep(&s, ",")) != NULL;) { /* Always leave space for one more argument and the NULL. */ if (argc >= maxargc - 3) { maxargc <<= 1; Modified: head/sbin/fsck/fsutil.c ============================================================================== --- head/sbin/fsck/fsutil.c Sun Oct 21 11:52:16 2012 (r241805) +++ head/sbin/fsck/fsutil.c Sun Oct 21 12:01:11 2012 (r241806) @@ -1,4 +1,4 @@ -/* $NetBSD: fsutil.c,v 1.7 1998/07/30 17:41:03 thorpej Exp $ */ +/* $NetBSD: fsutil.c,v 1.15 2006/06/05 16:52:05 christos Exp $ */ /* * Copyright (c) 1990, 1993 @@ -12,7 +12,7 @@ * 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 + * 3. 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. * @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: fsutil.c,v 1.7 1998/07/30 17:41:03 thorpej Exp $"); +__RCSID("$NetBSD: fsutil.c,v 1.15 2006/06/05 16:52:05 christos Exp $"); #endif /* not lint */ __FBSDID("$FreeBSD$"); @@ -110,9 +110,13 @@ pwarn(const char *fmt, ...) } void -perror(const char *s) +perr(const char *fmt, ...) { - pfatal("%s (%s)", s, strerror(errno)); + va_list ap; + + va_start(ap, fmt); + vmsg(1, fmt, ap); + va_end(ap); } void @@ -132,18 +136,15 @@ devcheck(const char *origname) struct stat stslash, stchar; if (stat("/", &stslash) < 0) { - perror("/"); - printf("Can't stat root\n"); + perr("Can't stat `/'"); return (origname); } if (stat(origname, &stchar) < 0) { - perror(origname); - printf("Can't stat %s\n", origname); + perr("Can't stat %s\n", origname); return (origname); } if (!S_ISCHR(stchar.st_mode)) { - perror(origname); - printf("%s is not a char device\n", origname); + perr("%s is not a char device\n", origname); } return (origname); } @@ -156,7 +157,7 @@ getmntpt(const char *name) { struct stat devstat, mntdevstat; char device[sizeof(_PATH_DEV) - 1 + MNAMELEN]; - char *devname; + char *dev_name; struct statfs *mntbuf, *statfsp; int i, mntsize, isdev; @@ -169,10 +170,10 @@ getmntpt(const char *name) mntsize = getmntinfo(&mntbuf, MNT_NOWAIT); for (i = 0; i < mntsize; i++) { statfsp = &mntbuf[i]; - devname = statfsp->f_mntfromname; - if (*devname != '/') { + dev_name = statfsp->f_mntfromname; + if (*dev_name != '/') { strcpy(device, _PATH_DEV); - strcat(device, devname); + strcat(device, dev_name); strcpy(statfsp->f_mntfromname, device); } if (isdev == 0) { @@ -180,7 +181,7 @@ getmntpt(const char *name) continue; return (statfsp); } - if (stat(devname, &mntdevstat) == 0 && + if (stat(dev_name, &mntdevstat) == 0 && mntdevstat.st_rdev == devstat.st_rdev) return (statfsp); } Modified: head/sbin/fsck/fsutil.h ============================================================================== --- head/sbin/fsck/fsutil.h Sun Oct 21 11:52:16 2012 (r241805) +++ head/sbin/fsck/fsutil.h Sun Oct 21 12:01:11 2012 (r241806) @@ -1,4 +1,4 @@ -/* $NetBSD: fsutil.h,v 1.4 1998/07/26 20:02:36 mycroft Exp $ */ +/* $NetBSD: fsutil.h,v 1.114 2009/10/21 01:07:46 snj Exp $ */ /* * Copyright (c) 1996 Christos Zoulas. All rights reserved. @@ -11,11 +11,6 @@ * 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 Christos Zoulas. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -31,9 +26,9 @@ * $FreeBSD$ */ -void perror(const char *); void pfatal(const char *, ...) __printflike(1, 2); void pwarn(const char *, ...) __printflike(1, 2); +void perr(const char *, ...) __printflike(1, 2); void panic(const char *, ...) __dead2 __printflike(1, 2); const char *devcheck(const char *); const char *cdevname(void); Modified: head/sbin/fsck/preen.c ============================================================================== --- head/sbin/fsck/preen.c Sun Oct 21 11:52:16 2012 (r241805) +++ head/sbin/fsck/preen.c Sun Oct 21 12:01:11 2012 (r241806) @@ -295,19 +295,19 @@ printpart(void) static void -addpart(const char *type, const char *devname, const char *mntpt) +addpart(const char *type, const char *dev, const char *mntpt) { - struct diskentry *d = finddisk(devname); + struct diskentry *d = finddisk(dev); struct partentry *p; TAILQ_FOREACH(p, &d->d_part, p_entries) - if (strcmp(p->p_devname, devname) == 0) { - warnx("%s in fstab more than once!\n", devname); + if (strcmp(p->p_devname, dev) == 0) { + warnx("%s in fstab more than once!\n", dev); return; } p = emalloc(sizeof(*p)); - p->p_devname = estrdup(devname); + p->p_devname = estrdup(dev); p->p_mntpt = estrdup(mntpt); p->p_type = estrdup(type); Modified: head/sbin/fsck_msdosfs/boot.c ============================================================================== --- head/sbin/fsck_msdosfs/boot.c Sun Oct 21 11:52:16 2012 (r241805) +++ head/sbin/fsck_msdosfs/boot.c Sun Oct 21 12:01:11 2012 (r241806) @@ -26,7 +26,7 @@ #include #ifndef lint -__RCSID("$NetBSD: boot.c,v 1.9 2003/07/24 19:25:46 ws Exp $"); +__RCSID("$NetBSD: boot.c,v 1.11 2006/06/05 16:51:18 christos Exp "); static const char rcsid[] = "$FreeBSD$"; #endif /* not lint */ @@ -49,7 +49,7 @@ readboot(int dosfs, struct bootblock *bo int i; if (read(dosfs, block, sizeof block) != sizeof block) { - perror("could not read boot block"); + perr("could not read boot block"); return FSFATAL; } @@ -103,7 +103,7 @@ readboot(int dosfs, struct bootblock *bo if (lseek(dosfs, boot->bpbFSInfo * boot->bpbBytesPerSec, SEEK_SET) != boot->bpbFSInfo * boot->bpbBytesPerSec || read(dosfs, fsinfo, sizeof fsinfo) != sizeof fsinfo) { - perror("could not read fsinfo block"); + perr("could not read fsinfo block"); return FSFATAL; } if (memcmp(fsinfo, "RRaA", 4) @@ -131,7 +131,7 @@ readboot(int dosfs, struct bootblock *bo != boot->bpbFSInfo * boot->bpbBytesPerSec || write(dosfs, fsinfo, sizeof fsinfo) != sizeof fsinfo) { - perror("Unable to write bpbFSInfo"); + perr("Unable to write bpbFSInfo"); return FSFATAL; } ret = FSBOOTMOD; @@ -151,7 +151,7 @@ readboot(int dosfs, struct bootblock *bo SEEK_SET) != boot->bpbBackup * boot->bpbBytesPerSec || read(dosfs, backup, sizeof backup) != sizeof backup) { - perror("could not read backup bootblock"); + perr("could not read backup bootblock"); return FSFATAL; } backup[65] = block[65]; /* XXX */ @@ -242,7 +242,7 @@ writefsinfo(int dosfs, struct bootblock if (lseek(dosfs, boot->bpbFSInfo * boot->bpbBytesPerSec, SEEK_SET) != boot->bpbFSInfo * boot->bpbBytesPerSec || read(dosfs, fsinfo, sizeof fsinfo) != sizeof fsinfo) { - perror("could not read fsinfo block"); + perr("could not read fsinfo block"); return FSFATAL; } fsinfo[0x1e8] = (u_char)boot->FSFree; @@ -257,7 +257,7 @@ writefsinfo(int dosfs, struct bootblock != boot->bpbFSInfo * boot->bpbBytesPerSec || write(dosfs, fsinfo, sizeof fsinfo) != sizeof fsinfo) { - perror("Unable to write bpbFSInfo"); + perr("Unable to write bpbFSInfo"); return FSFATAL; } /* Modified: head/sbin/fsck_msdosfs/check.c ============================================================================== --- head/sbin/fsck_msdosfs/check.c Sun Oct 21 11:52:16 2012 (r241805) +++ head/sbin/fsck_msdosfs/check.c Sun Oct 21 12:01:11 2012 (r241806) @@ -26,7 +26,7 @@ #include #ifndef lint -__RCSID("$NetBSD: check.c,v 1.10 2000/04/25 23:02:51 jdolecek Exp $"); +__RCSID("$NetBSD: check.c,v 1.14 2006/06/05 16:51:18 christos Exp $"); static const char rcsid[] = "$FreeBSD$"; #endif /* not lint */ @@ -67,7 +67,7 @@ checkfilesys(const char *fname) printf("\n"); if (dosfs < 0) { - perror("Can't open"); + perr("Can't open `%s'", fname); return 8; } Modified: head/sbin/fsck_msdosfs/dir.c ============================================================================== --- head/sbin/fsck_msdosfs/dir.c Sun Oct 21 11:52:16 2012 (r241805) +++ head/sbin/fsck_msdosfs/dir.c Sun Oct 21 12:01:11 2012 (r241806) @@ -28,7 +28,7 @@ #include #ifndef lint -__RCSID("$NetBSD: dir.c,v 1.14 1998/08/25 19:18:15 ross Exp $"); +__RCSID("$NetBSD: dir.c,v 1.20 2006/06/05 16:51:18 christos Exp $"); static const char rcsid[] = "$FreeBSD$"; #endif /* not lint */ @@ -218,25 +218,26 @@ resetDosDirSection(struct bootblock *boo int b1, b2; cl_t cl; int ret = FSOK; + size_t len; b1 = boot->bpbRootDirEnts * 32; b2 = boot->bpbSecPerClust * boot->bpbBytesPerSec; - if ((buffer = malloc( b1 > b2 ? b1 : b2)) == NULL) { - perror("No space for directory buffer"); + if ((buffer = malloc(len = b1 > b2 ? b1 : b2)) == NULL) { + perr("No space for directory buffer (%zu)", len); return FSFATAL; } - if ((delbuf = malloc(b2)) == NULL) { + if ((delbuf = malloc(len = b2)) == NULL) { free(buffer); - perror("No space for directory delbuf"); + perr("No space for directory delbuf (%zu)", len); return FSFATAL; } if ((rootDir = newDosDirEntry()) == NULL) { free(buffer); free(delbuf); - perror("No space for directory entry"); + perr("No space for directory entry"); return FSFATAL; } @@ -328,7 +329,7 @@ delete(int f, struct bootblock *boot, st off *= boot->bpbBytesPerSec; if (lseek(f, off, SEEK_SET) != off || read(f, delbuf, clsz) != clsz) { - perror("Unable to read directory"); + perr("Unable to read directory"); return FSFATAL; } while (s < e) { @@ -337,7 +338,7 @@ delete(int f, struct bootblock *boot, st } if (lseek(f, off, SEEK_SET) != off || write(f, delbuf, clsz) != clsz) { - perror("Unable to write directory"); + perr("Unable to write directory"); return FSFATAL; } if (startcl == endcl) @@ -475,7 +476,7 @@ readDosDirSection(int f, struct bootbloc off *= boot->bpbBytesPerSec; if (lseek(f, off, SEEK_SET) != off || read(f, buffer, last) != last) { - perror("Unable to read directory"); + perr("Unable to read directory"); return FSFATAL; } last /= 32; @@ -821,7 +822,7 @@ readDosDirSection(int f, struct bootbloc /* create directory tree node */ if (!(d = newDosDirEntry())) { - perror("No space for directory"); + perr("No space for directory"); return FSFATAL; } memcpy(d, &dirent, sizeof(struct dosDirEntry)); @@ -830,7 +831,7 @@ readDosDirSection(int f, struct bootbloc /* Enter this directory into the todo list */ if (!(n = newDirTodo())) { - perror("No space for todo list"); + perr("No space for todo list"); return FSFATAL; } n->next = pendingDirectories; @@ -851,7 +852,7 @@ readDosDirSection(int f, struct bootbloc last *= 32; if (lseek(f, off, SEEK_SET) != off || write(f, buffer, last) != last) { - perror("Unable to write directory"); + perr("Unable to write directory"); return FSFATAL; } mod &= ~THISMOD; @@ -870,7 +871,7 @@ readDosDirSection(int f, struct bootbloc last *= 32; if (lseek(f, off, SEEK_SET) != off || write(f, buffer, last) != last) { - perror("Unable to write directory"); + perr("Unable to write directory"); return FSFATAL; } mod &= ~THISMOD; @@ -941,7 +942,7 @@ reconnect(int dosfs, struct bootblock *b if (!lfbuf) { lfbuf = malloc(boot->ClusterSize); if (!lfbuf) { - perror("No space for buffer"); + perr("No space for buffer"); return FSFATAL; } p = NULL; @@ -965,7 +966,7 @@ reconnect(int dosfs, struct bootblock *b + boot->ClusterOffset * boot->bpbBytesPerSec; if (lseek(dosfs, lfoff, SEEK_SET) != lfoff || (size_t)read(dosfs, lfbuf, boot->ClusterSize) != boot->ClusterSize) { - perror("could not read LOST.DIR"); + perr("could not read LOST.DIR"); return FSFATAL; } p = lfbuf; @@ -995,7 +996,7 @@ reconnect(int dosfs, struct bootblock *b fat[head].flags |= FAT_USED; if (lseek(dosfs, lfoff, SEEK_SET) != lfoff || (size_t)write(dosfs, lfbuf, boot->ClusterSize) != boot->ClusterSize) { - perror("could not write LOST.DIR"); + perr("could not write LOST.DIR"); return FSFATAL; } return FSDIRMOD; Modified: head/sbin/fsck_msdosfs/fat.c ============================================================================== --- head/sbin/fsck_msdosfs/fat.c Sun Oct 21 11:52:16 2012 (r241805) +++ head/sbin/fsck_msdosfs/fat.c Sun Oct 21 12:01:11 2012 (r241806) @@ -26,7 +26,7 @@ #include #ifndef lint -__RCSID("$NetBSD: fat.c,v 1.12 2000/10/10 20:24:52 is Exp $"); +__RCSID("$NetBSD: fat.c,v 1.18 2006/06/05 16:51:18 christos Exp $"); static const char rcsid[] = "$FreeBSD$"; #endif /* not lint */ @@ -69,6 +69,7 @@ checkdirty(int fs, struct bootblock *boo off_t off; u_char *buffer; int ret = 0; + size_t len; if (boot->ClustMask != CLUST16_MASK && boot->ClustMask != CLUST32_MASK) return 0; @@ -76,20 +77,20 @@ checkdirty(int fs, struct bootblock *boo off = boot->bpbResSectors; off *= boot->bpbBytesPerSec; - buffer = malloc(boot->bpbBytesPerSec); + buffer = malloc(len = boot->bpbBytesPerSec); if (buffer == NULL) { - perror("No space for FAT"); + perr("No space for FAT sectors (%zu)", len); return 1; } if (lseek(fs, off, SEEK_SET) != off) { - perror("Unable to read FAT"); + perr("Unable to read FAT"); goto err; } if ((size_t)read(fs, buffer, boot->bpbBytesPerSec) != boot->bpbBytesPerSec) { - perror("Unable to read FAT"); + perr("Unable to read FAT"); goto err; } @@ -163,10 +164,11 @@ static int _readfat(int fs, struct bootblock *boot, u_int no, u_char **buffer) { off_t off; + size_t len; - *buffer = malloc(boot->FATsecs * boot->bpbBytesPerSec); + *buffer = malloc(len = boot->FATsecs * boot->bpbBytesPerSec); if (*buffer == NULL) { - perror("No space for FAT"); + perr("No space for FAT sectors (%zu)", len); return 0; } @@ -174,13 +176,13 @@ _readfat(int fs, struct bootblock *boot, off *= boot->bpbBytesPerSec; if (lseek(fs, off, SEEK_SET) != off) { - perror("Unable to read FAT"); + perr("Unable to read FAT"); goto err; } if ((size_t)read(fs, *buffer, boot->FATsecs * boot->bpbBytesPerSec) != boot->FATsecs * boot->bpbBytesPerSec) { - perror("Unable to read FAT"); + perr("Unable to read FAT"); goto err; } @@ -207,10 +209,10 @@ readfat(int fs, struct bootblock *boot, if (!_readfat(fs, boot, no, &buffer)) return FSFATAL; - + fat = malloc(len = boot->NumClusters * sizeof(struct fatEntry)); if (fat == NULL) { - perror("No space for FAT"); + perr("No space for FAT clusters (%zu)", len); free(buffer); return FSFATAL; } @@ -428,13 +430,13 @@ clearchain(struct bootblock *boot, struc } int -tryclear(struct bootblock *boot, struct fatEntry *fat, cl_t head, cl_t *trunc) +tryclear(struct bootblock *boot, struct fatEntry *fat, cl_t head, cl_t *truncp) { if (ask(0, "Clear chain starting at %u", head)) { clearchain(boot, fat, head); return FSFATMOD; } else if (ask(0, "Truncate")) { - *trunc = CLUST_EOF; + *truncp = CLUST_EOF; return FSFATMOD; } else return FSERROR; @@ -549,7 +551,7 @@ writefat(int fs, struct bootblock *boot, buffer = malloc(fatsz = boot->FATsecs * boot->bpbBytesPerSec); if (buffer == NULL) { - perror("No space for FAT"); + perr("No space for FAT sectors (%zu)", fatsz); return FSFATAL; } memset(buffer, 0, fatsz); @@ -598,7 +600,7 @@ writefat(int fs, struct bootblock *boot, free(old_fat); p += count; } - + for (cl = CLUST_FIRST; cl < boot->NumClusters; cl++) { switch (boot->ClustMask) { case CLUST32_MASK: @@ -634,7 +636,7 @@ writefat(int fs, struct bootblock *boot, off *= boot->bpbBytesPerSec; if (lseek(fs, off, SEEK_SET) != off || (size_t)write(fs, buffer, fatsz) != fatsz) { - perror("Unable to write FAT"); + perr("Unable to write FAT"); ret = FSFATAL; /* Return immediately? XXX */ } } From owner-svn-src-all@FreeBSD.ORG Sun Oct 21 12:01: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 2E05727D; Sun, 21 Oct 2012 12:01:20 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 15DAD8FC14; Sun, 21 Oct 2012 12:01: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 q9LC1J3c068610; Sun, 21 Oct 2012 12:01:19 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9LC1JiD068601; Sun, 21 Oct 2012 12:01:19 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201210211201.q9LC1JiD068601@svn.freebsd.org> From: Ulrich Spoerlein Date: Sun, 21 Oct 2012 12:01:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241807 - in head/sbin: fsck fsck_msdosfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2012 12:01:20 -0000 Author: uqs Date: Sun Oct 21 12:01:19 2012 New Revision: 241807 URL: http://svn.freebsd.org/changeset/base/241807 Log: Make fsck and fsck_msdosfs WARNS=6 clean - sprinkle const - add volatile qualifier to avoid vfork clobbering Inspired by: NetBSD PR: bin/139802 Reviewed by: ed Modified: head/sbin/fsck/Makefile head/sbin/fsck/fsck.c head/sbin/fsck/fsutil.h head/sbin/fsck/preen.c head/sbin/fsck_msdosfs/Makefile head/sbin/fsck_msdosfs/boot.c head/sbin/fsck_msdosfs/ext.h head/sbin/fsck_msdosfs/fat.c Modified: head/sbin/fsck/Makefile ============================================================================== --- head/sbin/fsck/Makefile Sun Oct 21 12:01:11 2012 (r241806) +++ head/sbin/fsck/Makefile Sun Oct 21 12:01:19 2012 (r241807) @@ -3,7 +3,6 @@ PROG= fsck SRCS= fsck.c fsutil.c preen.c -WARNS?= 2 MAN= fsck.8 .include Modified: head/sbin/fsck/fsck.c ============================================================================== --- head/sbin/fsck/fsck.c Sun Oct 21 12:01:11 2012 (r241806) +++ head/sbin/fsck/fsck.c Sun Oct 21 12:01:19 2012 (r241807) @@ -73,14 +73,14 @@ static char *options = NULL; static int flags = 0; static int forceflag = 0; -static int checkfs(const char *, const char *, const char *, char *, pid_t *); +static int checkfs(const char *, const char *, const char *, const char *, pid_t *); static int selected(const char *); static void addoption(char *); static const char *getoptions(const char *); static void addentry(struct fstypelist *, const char *, const char *); static void maketypelist(char *); static void catopt(char **, const char *); -static void mangle(char *, int *, const char ***, int *); +static void mangle(char *, int *, const char ** volatile *, int *); static const char *getfslab(const char *); static void usage(void) __dead2; static int isok(struct fstab *); @@ -187,6 +187,7 @@ main(int argc, char *argv[]) char device[MAXPATHLEN]; struct statfs *mntp; + mntpt = NULL; spec = *argv; cp = strrchr(spec, '/'); if (cp == 0) { @@ -285,9 +286,9 @@ isok(struct fstab *fs) static int checkfs(const char *pvfstype, const char *spec, const char *mntpt, - char *auxopt, pid_t *pidp) + const char *auxopt, pid_t *pidp) { - const char **argv; + const char ** volatile argv; pid_t pid; int argc, i, status, maxargc; char *optbuf, execbase[MAXPATHLEN]; @@ -312,7 +313,7 @@ checkfs(const char *pvfstype, const char vfstype = strdup(pvfstype); if (vfstype == NULL) perr("strdup(pvfstype)"); - for (i = 0; i < strlen(vfstype); i++) { + for (i = 0; i < (int)strlen(vfstype); i++) { vfstype[i] = tolower(vfstype[i]); if (vfstype[i] == ' ') vfstype[i] = '_'; @@ -361,7 +362,7 @@ checkfs(const char *pvfstype, const char _exit(0); /* Go find an executable. */ - execvP(execbase, _PATH_SYSPATH, (char * const *)argv); + execvP(execbase, _PATH_SYSPATH, __DECONST(char * const *, argv)); if (spec) warn("exec %s for %s in %s", execbase, spec, _PATH_SYSPATH); else @@ -498,7 +499,7 @@ catopt(char **sp, const char *o) static void -mangle(char *opts, int *argcp, const char ***argvp, int *maxargcp) +mangle(char *opts, int *argcp, const char ** volatile *argvp, int *maxargcp) { char *p, *s; int argc, maxargc; @@ -535,7 +536,7 @@ mangle(char *opts, int *argcp, const cha } -const static char * +static const char * getfslab(const char *str) { struct disklabel dl; Modified: head/sbin/fsck/fsutil.h ============================================================================== --- head/sbin/fsck/fsutil.h Sun Oct 21 12:01:11 2012 (r241806) +++ head/sbin/fsck/fsutil.h Sun Oct 21 12:01:19 2012 (r241807) @@ -47,4 +47,4 @@ char *estrdup(const char *); struct fstab; int checkfstab(int, int (*)(struct fstab *), - int (*) (const char *, const char *, const char *, char *, pid_t *)); + int (*) (const char *, const char *, const char *, const char *, pid_t *)); Modified: head/sbin/fsck/preen.c ============================================================================== --- head/sbin/fsck/preen.c Sun Oct 21 12:01:11 2012 (r241806) +++ head/sbin/fsck/preen.c Sun Oct 21 12:01:19 2012 (r241807) @@ -78,12 +78,12 @@ static int nrun = 0, ndisks = 0; static struct diskentry *finddisk(const char *); static void addpart(const char *, const char *, const char *); static int startdisk(struct diskentry *, - int (*)(const char *, const char *, const char *, char *, pid_t *)); + int (*)(const char *, const char *, const char *, const char *, pid_t *)); static void printpart(void); int checkfstab(int flags, int (*docheck)(struct fstab *), - int (*checkit)(const char *, const char *, const char *, char *, pid_t *)) + int (*checkit)(const char *, const char *, const char *, const char *, pid_t *)) { struct fstab *fs; struct diskentry *d, *nextdisk; @@ -317,7 +317,7 @@ addpart(const char *type, const char *de static int startdisk(struct diskentry *d, int (*checkit)(const char *, const char *, - const char *, char *, pid_t *)) + const char *, const char *, pid_t *)) { struct partentry *p = TAILQ_FIRST(&d->d_part); int rv; Modified: head/sbin/fsck_msdosfs/Makefile ============================================================================== --- head/sbin/fsck_msdosfs/Makefile Sun Oct 21 12:01:11 2012 (r241806) +++ head/sbin/fsck_msdosfs/Makefile Sun Oct 21 12:01:19 2012 (r241807) @@ -9,6 +9,5 @@ MAN= fsck_msdosfs.8 SRCS= main.c check.c boot.c fat.c dir.c fsutil.c CFLAGS+= -I${FSCK} -WARNS?= 2 .include Modified: head/sbin/fsck_msdosfs/boot.c ============================================================================== --- head/sbin/fsck_msdosfs/boot.c Sun Oct 21 12:01:11 2012 (r241806) +++ head/sbin/fsck_msdosfs/boot.c Sun Oct 21 12:01:19 2012 (r241807) @@ -48,7 +48,7 @@ readboot(int dosfs, struct bootblock *bo int ret = FSOK; int i; - if (read(dosfs, block, sizeof block) != sizeof block) { + if ((size_t)read(dosfs, block, sizeof block) != sizeof block) { perr("could not read boot block"); return FSFATAL; } Modified: head/sbin/fsck_msdosfs/ext.h ============================================================================== --- head/sbin/fsck_msdosfs/ext.h Sun Oct 21 12:01:11 2012 (r241806) +++ head/sbin/fsck_msdosfs/ext.h Sun Oct 21 12:01:19 2012 (r241807) @@ -133,7 +133,7 @@ void finishlf(void); /* * Return the type of a reserved cluster as text */ -char *rsrvdcltype(cl_t); +const char *rsrvdcltype(cl_t); /* * Clear a cluster chain in a FAT Modified: head/sbin/fsck_msdosfs/fat.c ============================================================================== --- head/sbin/fsck_msdosfs/fat.c Sun Oct 21 12:01:11 2012 (r241806) +++ head/sbin/fsck_msdosfs/fat.c Sun Oct 21 12:01:19 2012 (r241807) @@ -320,7 +320,7 @@ readfat(int fs, struct bootblock *boot, /* * Get type of reserved cluster */ -char * +const char * rsrvdcltype(cl_t cl) { if (cl == CLUST_FREE) From owner-svn-src-all@FreeBSD.ORG Sun Oct 21 12:14: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 87B2CA1F; Sun, 21 Oct 2012 12:14:59 +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 634238FC0A; Sun, 21 Oct 2012 12:14: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 q9LCExfT071586; Sun, 21 Oct 2012 12:14:59 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9LCExqi071578; Sun, 21 Oct 2012 12:14:59 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201210211214.q9LCExqi071578@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Sun, 21 Oct 2012 12:14:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241809 - in head/sys/boot: common i386/libi386 uboot/lib userboot/userboot X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2012 12:14:59 -0000 Author: ae Date: Sun Oct 21 12:14:58 2012 New Revision: 241809 URL: http://svn.freebsd.org/changeset/base/241809 Log: Add the flags parameter to the disk_open() function and DISK_F_NOCACHE flag, that disables the caching of partition tables metadata. Use this flag for floppies in the libi386/biosdisk driver. Modified: head/sys/boot/common/disk.c head/sys/boot/common/disk.h head/sys/boot/i386/libi386/biosdisk.c head/sys/boot/uboot/lib/disk.c head/sys/boot/userboot/userboot/userboot_disk.c Modified: head/sys/boot/common/disk.c ============================================================================== --- head/sys/boot/common/disk.c Sun Oct 21 12:12:22 2012 (r241808) +++ head/sys/boot/common/disk.c Sun Oct 21 12:14:58 2012 (r241809) @@ -47,6 +47,7 @@ struct open_disk { struct ptable *table; off_t mediasize; u_int sectorsize; + u_int flags; int rcnt; }; @@ -232,16 +233,20 @@ disk_print(struct disk_devdesc *dev, cha } int -disk_open(struct disk_devdesc *dev, off_t mediasize, u_int sectorsize) +disk_open(struct disk_devdesc *dev, off_t mediasize, u_int sectorsize, + u_int flags) { struct open_disk *od; struct ptable *table; struct ptable_entry part; int rc, slice, partition; - rc = disk_lookup(dev); - if (rc == 0) - return (0); + rc = 0; + if ((flags & DISK_F_NOCACHE) == 0) { + rc = disk_lookup(dev); + if (rc == 0) + return (0); + } /* * While we are reading disk metadata, make sure we do it relative * to the start of the disk @@ -267,11 +272,12 @@ disk_open(struct disk_devdesc *dev, off_ DEBUG("no memory"); return (ENOMEM); } + dev->d_opendata = od; + od->rcnt = 0; } - dev->d_opendata = od; od->mediasize = mediasize; od->sectorsize = sectorsize; - od->rcnt = 0; + od->flags = flags; DEBUG("%s unit %d, slice %d, partition %d => %p", disk_fmtdev(dev), dev->d_unit, dev->d_slice, dev->d_partition, od); @@ -348,7 +354,8 @@ out: } DEBUG("%s could not open", disk_fmtdev(dev)); } else { - disk_insert(dev); + if ((flags & DISK_F_NOCACHE) == 0) + disk_insert(dev); /* Save the slice and partition number to the dev */ dev->d_slice = slice; dev->d_partition = partition; @@ -361,12 +368,14 @@ out: int disk_close(struct disk_devdesc *dev) { -#if DISK_DEBUG struct open_disk *od; od = (struct open_disk *)dev->d_opendata; DEBUG("%s closed => %p [%d]", disk_fmtdev(dev), od, od->rcnt); -#endif + if (od->flags & DISK_F_NOCACHE) { + ptable_close(od->table); + free(od); + } return (0); } Modified: head/sys/boot/common/disk.h ============================================================================== --- head/sys/boot/common/disk.h Sun Oct 21 12:12:22 2012 (r241808) +++ head/sys/boot/common/disk.h Sun Oct 21 12:14:58 2012 (r241809) @@ -93,7 +93,8 @@ struct disk_devdesc * Parse disk metadata and initialise dev->d_offset. */ extern int disk_open(struct disk_devdesc *dev, off_t mediasize, - u_int sectorsize); + u_int sectorsize, u_int flags); +#define DISK_F_NOCACHE 0x0001 /* Do not use metadata caching */ extern int disk_close(struct disk_devdesc *dev); extern void disk_cleanup(const struct devsw *d_dev); Modified: head/sys/boot/i386/libi386/biosdisk.c ============================================================================== --- head/sys/boot/i386/libi386/biosdisk.c Sun Oct 21 12:12:22 2012 (r241808) +++ head/sys/boot/i386/libi386/biosdisk.c Sun Oct 21 12:14:58 2012 (r241809) @@ -276,7 +276,9 @@ bd_print(int verbose) dev.d_partition = -1; if (disk_open(&dev, bdinfo[i].bd_sectorsize * bdinfo[i].bd_sectors, - bdinfo[i].bd_sectorsize) == 0) { + bdinfo[i].bd_sectorsize, + (bdinfo[i].bd_flags & BD_FLOPPY) ? + DISK_F_NOCACHE: 0) == 0) { sprintf(line, " disk%d", i); disk_print(&dev, line, verbose); disk_close(&dev); @@ -308,7 +310,8 @@ bd_open(struct open_file *f, ...) return (EIO); return (disk_open(dev, BD(dev).bd_sectors * BD(dev).bd_sectorsize, - BD(dev).bd_sectorsize)); + BD(dev).bd_sectorsize, (BD(dev).bd_flags & BD_FLOPPY) ? + DISK_F_NOCACHE: 0)); } static int @@ -645,7 +648,8 @@ bd_getdev(struct i386_devdesc *d) if (biosdev == -1) /* not a BIOS device */ return(-1); if (disk_open(dev, BD(dev).bd_sectors * BD(dev).bd_sectorsize, - BD(dev).bd_sectorsize) != 0) /* oops, not a viable device */ + BD(dev).bd_sectorsize,(BD(dev).bd_flags & BD_FLOPPY) ? + DISK_F_NOCACHE: 0) != 0) /* oops, not a viable device */ return (-1); else disk_close(dev); Modified: head/sys/boot/uboot/lib/disk.c ============================================================================== --- head/sys/boot/uboot/lib/disk.c Sun Oct 21 12:12:22 2012 (r241808) +++ head/sys/boot/uboot/lib/disk.c Sun Oct 21 12:14:58 2012 (r241809) @@ -205,7 +205,7 @@ stor_opendev(struct disk_devdesc *dev) SI(dev).opened++; } return (disk_open(dev, SI(dev).blocks * SI(dev).bsize, - SI(dev).bsize)); + SI(dev).bsize, 0)); } static int Modified: head/sys/boot/userboot/userboot/userboot_disk.c ============================================================================== --- head/sys/boot/userboot/userboot/userboot_disk.c Sun Oct 21 12:12:22 2012 (r241808) +++ head/sys/boot/userboot/userboot/userboot_disk.c Sun Oct 21 12:14:58 2012 (r241809) @@ -125,7 +125,7 @@ userdisk_print(int verbose) dev.d_slice = -1; dev.d_partition = -1; if (disk_open(&dev, ud_info[i].mediasize, - ud_info[i].sectorsize) == 0) { + ud_info[i].sectorsize, 0) == 0) { sprintf(line, " disk%d", i); disk_print(&dev, line, verbose); disk_close(&dev); @@ -150,7 +150,7 @@ userdisk_open(struct open_file *f, ...) return (EIO); return (disk_open(dev, ud_info[dev->d_unit].mediasize, - ud_info[dev->d_unit].sectorsize)); + ud_info[dev->d_unit].sectorsize, 0)); } static int From owner-svn-src-all@FreeBSD.ORG Sun Oct 21 12:15: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 346FBB96; Sun, 21 Oct 2012 12:15:59 +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 1B0A98FC08; Sun, 21 Oct 2012 12:15: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 q9LCFwiW071828; Sun, 21 Oct 2012 12:15:58 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9LCFwdL071826; Sun, 21 Oct 2012 12:15:58 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201210211215.q9LCFwdL071826@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 21 Oct 2012 12:15:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241810 - stable/9/sys/amd64/amd64 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2012 12:15:59 -0000 Author: kib Date: Sun Oct 21 12:15:58 2012 New Revision: 241810 URL: http://svn.freebsd.org/changeset/base/241810 Log: MFC r241549: Print the %rip value for uprintf_signal. Modified: stable/9/sys/amd64/amd64/trap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/trap.c ============================================================================== --- stable/9/sys/amd64/amd64/trap.c Sun Oct 21 12:14:58 2012 (r241809) +++ stable/9/sys/amd64/amd64/trap.c Sun Oct 21 12:15:58 2012 (r241810) @@ -617,8 +617,10 @@ trap(struct trapframe *frame) ksi.ksi_addr = (void *)addr; if (uprintf_signal) { uprintf("pid %d comm %s: signal %d err %lx code %d type %d " - "addr 0x%lx <%02x %02x %02x %02x %02x %02x %02x %02x>\n", + "addr 0x%lx rip 0x%lx " + "<%02x %02x %02x %02x %02x %02x %02x %02x>\n", p->p_pid, p->p_comm, i, frame->tf_err, ucode, type, addr, + frame->tf_rip, fubyte((void *)(frame->tf_rip + 0)), fubyte((void *)(frame->tf_rip + 1)), fubyte((void *)(frame->tf_rip + 2)), From owner-svn-src-all@FreeBSD.ORG Sun Oct 21 12:17: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 C536EDCD; Sun, 21 Oct 2012 12:17:22 +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 ABCF08FC12; Sun, 21 Oct 2012 12:17: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 q9LCHMSb072227; Sun, 21 Oct 2012 12:17:22 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9LCHMjM072225; Sun, 21 Oct 2012 12:17:22 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201210211217.q9LCHMjM072225@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 21 Oct 2012 12:17:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241811 - stable/9/sys/i386/i386 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2012 12:17:22 -0000 Author: kib Date: Sun Oct 21 12:17:22 2012 New Revision: 241811 URL: http://svn.freebsd.org/changeset/base/241811 Log: MFC r241550: MFamd64: add machdep.uprintf_signal. Modified: stable/9/sys/i386/i386/trap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/i386/i386/trap.c ============================================================================== --- stable/9/sys/i386/i386/trap.c Sun Oct 21 12:15:58 2012 (r241810) +++ stable/9/sys/i386/i386/trap.c Sun Oct 21 12:17:22 2012 (r241811) @@ -195,6 +195,10 @@ TUNABLE_INT("machdep.panic_on_nmi", &pan static int prot_fault_translation = 0; SYSCTL_INT(_machdep, OID_AUTO, prot_fault_translation, CTLFLAG_RW, &prot_fault_translation, 0, "Select signal to deliver on protection fault"); +static int uprintf_signal; +SYSCTL_INT(_machdep, OID_AUTO, uprintf_signal, CTLFLAG_RW, + &uprintf_signal, 0, + "Print debugging information on trap signal to ctty"); /* * Exception, fault, and trap interface to the FreeBSD kernel. @@ -760,6 +764,21 @@ trap(struct trapframe *frame) ksi.ksi_code = ucode; ksi.ksi_addr = (void *)addr; ksi.ksi_trapno = type; + if (uprintf_signal) { + uprintf("pid %d comm %s: signal %d err %x code %d type %d " + "addr 0x%x eip 0x%08x " + "<%02x %02x %02x %02x %02x %02x %02x %02x>\n", + p->p_pid, p->p_comm, i, frame->tf_err, ucode, type, addr, + frame->tf_eip, + fubyte((void *)(frame->tf_eip + 0)), + fubyte((void *)(frame->tf_eip + 1)), + fubyte((void *)(frame->tf_eip + 2)), + fubyte((void *)(frame->tf_eip + 3)), + fubyte((void *)(frame->tf_eip + 4)), + fubyte((void *)(frame->tf_eip + 5)), + fubyte((void *)(frame->tf_eip + 6)), + fubyte((void *)(frame->tf_eip + 7))); + } trapsignal(td, &ksi); #ifdef DEBUG From owner-svn-src-all@FreeBSD.ORG Sun Oct 21 12:33: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 C677C3A7; Sun, 21 Oct 2012 12:33: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 AC9988FC0A; Sun, 21 Oct 2012 12:33: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 q9LCXcuw075723; Sun, 21 Oct 2012 12:33:38 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9LCXcu2075717; Sun, 21 Oct 2012 12:33:38 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201210211233.q9LCXcu2075717@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 21 Oct 2012 12:33:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241812 - in stable/9/sys: kern sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2012 12:33:39 -0000 Author: kib Date: Sun Oct 21 12:33:38 2012 New Revision: 241812 URL: http://svn.freebsd.org/changeset/base/241812 Log: MFC r241556: Add a KPI to allow to reserve some amount of space in the numvnodes counter, without actually allocating the vnodes. For KBI stability, the td_vp_reserv was moved to the end of struct thread. Modified: stable/9/sys/kern/kern_thread.c stable/9/sys/kern/subr_trap.c stable/9/sys/kern/vfs_subr.c stable/9/sys/sys/proc.h stable/9/sys/sys/vnode.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_thread.c ============================================================================== --- stable/9/sys/kern/kern_thread.c Sun Oct 21 12:17:22 2012 (r241811) +++ stable/9/sys/kern/kern_thread.c Sun Oct 21 12:33:38 2012 (r241812) @@ -207,6 +207,7 @@ thread_init(void *mem, int size, int fla td->td_sleepqueue = sleepq_alloc(); td->td_turnstile = turnstile_alloc(); td->td_rlqe = NULL; + td->td_vp_reserv = 0; EVENTHANDLER_INVOKE(thread_init, td); td->td_sched = (struct td_sched *)&td[1]; umtx_thread_init(td); Modified: stable/9/sys/kern/subr_trap.c ============================================================================== --- stable/9/sys/kern/subr_trap.c Sun Oct 21 12:17:22 2012 (r241811) +++ stable/9/sys/kern/subr_trap.c Sun Oct 21 12:33:38 2012 (r241812) @@ -139,6 +139,8 @@ userret(struct thread *td, struct trapfr sched_userret(td); KASSERT(td->td_locks == 0, ("userret: Returning with %d locks held.", td->td_locks)); + KASSERT(td->td_vp_reserv == 0, + ("userret: Returning while holding vnode reservation")); #ifdef VIMAGE /* Unfortunately td_vnet_lpush needs VNET_DEBUG. */ VNET_ASSERT(curvnet == NULL, Modified: stable/9/sys/kern/vfs_subr.c ============================================================================== --- stable/9/sys/kern/vfs_subr.c Sun Oct 21 12:17:22 2012 (r241811) +++ stable/9/sys/kern/vfs_subr.c Sun Oct 21 12:33:38 2012 (r241812) @@ -935,34 +935,22 @@ vtryrecycle(struct vnode *vp) } /* - * Return the next vnode from the free list. + * Wait for available vnodes. */ -int -getnewvnode(const char *tag, struct mount *mp, struct vop_vector *vops, - struct vnode **vpp) +static int +getnewvnode_wait(int suspended) { - struct vnode *vp = NULL; - struct bufobj *bo; - CTR3(KTR_VFS, "%s: mp %p with tag %s", __func__, mp, tag); - mtx_lock(&vnode_free_list_mtx); - /* - * Lend our context to reclaim vnodes if they've exceeded the max. - */ - if (freevnodes > wantfreevnodes) - vnlru_free(1); - /* - * Wait for available vnodes. - */ + mtx_assert(&vnode_free_list_mtx, MA_OWNED); if (numvnodes > desiredvnodes) { - if (mp != NULL && (mp->mnt_kern_flag & MNTK_SUSPEND)) { + if (suspended) { /* * File system is beeing suspended, we cannot risk a * deadlock here, so allocate new vnode anyway. */ if (freevnodes > wantfreevnodes) vnlru_free(freevnodes - wantfreevnodes); - goto alloc; + return (0); } if (vnlruproc_sig == 0) { vnlruproc_sig = 1; /* avoid unnecessary wakeups */ @@ -970,16 +958,76 @@ getnewvnode(const char *tag, struct moun } msleep(&vnlruproc_sig, &vnode_free_list_mtx, PVFS, "vlruwk", hz); -#if 0 /* XXX Not all VFS_VGET/ffs_vget callers check returns. */ - if (numvnodes > desiredvnodes) { - mtx_unlock(&vnode_free_list_mtx); - return (ENFILE); + } + return (numvnodes > desiredvnodes ? ENFILE : 0); +} + +void +getnewvnode_reserve(u_int count) +{ + struct thread *td; + + td = curthread; + mtx_lock(&vnode_free_list_mtx); + while (count > 0) { + if (getnewvnode_wait(0) == 0) { + count--; + td->td_vp_reserv++; + numvnodes++; } -#endif } -alloc: + mtx_unlock(&vnode_free_list_mtx); +} + +void +getnewvnode_drop_reserve(void) +{ + struct thread *td; + + td = curthread; + mtx_lock(&vnode_free_list_mtx); + KASSERT(numvnodes >= td->td_vp_reserv, ("reserve too large")); + numvnodes -= td->td_vp_reserv; + mtx_unlock(&vnode_free_list_mtx); + td->td_vp_reserv = 0; +} + +/* + * Return the next vnode from the free list. + */ +int +getnewvnode(const char *tag, struct mount *mp, struct vop_vector *vops, + struct vnode **vpp) +{ + struct vnode *vp; + struct bufobj *bo; + struct thread *td; + int error; + + CTR3(KTR_VFS, "%s: mp %p with tag %s", __func__, mp, tag); + vp = NULL; + td = curthread; + if (td->td_vp_reserv > 0) { + td->td_vp_reserv -= 1; + goto alloc; + } + mtx_lock(&vnode_free_list_mtx); + /* + * Lend our context to reclaim vnodes if they've exceeded the max. + */ + if (freevnodes > wantfreevnodes) + vnlru_free(1); + error = getnewvnode_wait(mp != NULL && (mp->mnt_kern_flag & + MNTK_SUSPEND)); +#if 0 /* XXX Not all VFS_VGET/ffs_vget callers check returns. */ + if (error != 0) { + mtx_unlock(&vnode_free_list_mtx); + return (error); + } +#endif numvnodes++; mtx_unlock(&vnode_free_list_mtx); +alloc: vp = (struct vnode *) uma_zalloc(vnode_zone, M_WAITOK|M_ZERO); /* * Setup locks. Modified: stable/9/sys/sys/proc.h ============================================================================== --- stable/9/sys/sys/proc.h Sun Oct 21 12:17:22 2012 (r241811) +++ stable/9/sys/sys/proc.h Sun Oct 21 12:33:38 2012 (r241812) @@ -316,6 +316,7 @@ struct thread { struct vm_page **td_ma; /* (k) uio pages held */ int td_ma_cnt; /* (k) size of *td_ma */ struct rl_q_entry *td_rlqe; /* (k) Associated range lock entry. */ + u_int td_vp_reserv; /* (k) Count of reserved vnodes. */ }; struct mtx *thread_lock_block(struct thread *); Modified: stable/9/sys/sys/vnode.h ============================================================================== --- stable/9/sys/sys/vnode.h Sun Oct 21 12:17:22 2012 (r241811) +++ stable/9/sys/sys/vnode.h Sun Oct 21 12:33:38 2012 (r241812) @@ -603,6 +603,8 @@ void cvtstat(struct stat *st, struct ost void cvtnstat(struct stat *sb, struct nstat *nsb); int getnewvnode(const char *tag, struct mount *mp, struct vop_vector *vops, struct vnode **vpp); +void getnewvnode_reserve(u_int count); +void getnewvnode_drop_reserve(void); int insmntque1(struct vnode *vp, struct mount *mp, void (*dtr)(struct vnode *, void *), void *dtr_arg); int insmntque(struct vnode *vp, struct mount *mp); From owner-svn-src-all@FreeBSD.ORG Sun Oct 21 12:53: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 AA4CD82A; Sun, 21 Oct 2012 12:53:34 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 693BE8FC0A; Sun, 21 Oct 2012 12:53: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 q9LCrYK4079471; Sun, 21 Oct 2012 12:53:34 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9LCrYSo079469; Sun, 21 Oct 2012 12:53:34 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201210211253.q9LCrYSo079469@svn.freebsd.org> From: Marius Strobl Date: Sun, 21 Oct 2012 12:53:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r241813 - releng/9.1/sys/dev/iicbus X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2012 12:53:34 -0000 Author: marius Date: Sun Oct 21 12:53:33 2012 New Revision: 241813 URL: http://svn.freebsd.org/changeset/base/241813 Log: MFC: r241679 It turns out that as documented, PCF8563_R_SECOND_VL (i.e. battery low) doesn't automatically clear when VDD rises above Vlow again and needs to be cleared manually. However, apparently this needs all of the time registers to be set, i.e. pcf8563_settime(), and not just PCF8563_R_SECOND in order for PCF8563_R_SECOND_VL to stick. Thus, we just issue a warning during pcf8563_attach() rather than failing with ENXIO in case it is set. Approved by: re (kib) Modified: releng/9.1/sys/dev/iicbus/pcf8563.c Directory Properties: releng/9.1/sys/ (props changed) releng/9.1/sys/dev/ (props changed) Modified: releng/9.1/sys/dev/iicbus/pcf8563.c ============================================================================== --- releng/9.1/sys/dev/iicbus/pcf8563.c Sun Oct 21 12:33:38 2012 (r241812) +++ releng/9.1/sys/dev/iicbus/pcf8563.c Sun Oct 21 12:53:33 2012 (r241813) @@ -83,6 +83,16 @@ pcf8563_attach(device_t dev) if (sc->sc_addr == 0) sc->sc_addr = PCF8563_ADDR; + /* + * NB: PCF8563_R_SECOND_VL doesn't automatically clear when VDD + * rises above Vlow again and needs to be cleared manually. + * However, apparently this needs all of the time registers to be + * set, i.e. pcf8563_settime(), and not just PCF8563_R_SECOND in + * order for PCF8563_R_SECOND_VL to stick. Thus, we just issue a + * warning here rather than failing with ENXIO in case it is set. + * Note that pcf8563_settime() will also clear PCF8563_R_SECOND_VL + * as a side-effect. + */ msgs[0].slave = msgs[1].slave = sc->sc_addr; error = iicbus_transfer(device_get_parent(dev), msgs, sizeof(msgs) / sizeof(*msgs)); @@ -90,10 +100,8 @@ pcf8563_attach(device_t dev) device_printf(dev, "%s: cannot read RTC\n", __func__); return (error); } - if ((val & PCF8563_R_SECOND_VL) != 0) { + if ((val & PCF8563_R_SECOND_VL) != 0) device_printf(dev, "%s: battery low\n", __func__); - return (ENXIO); - } sc->sc_year0 = 1900; clock_register(dev, 1000000); /* 1 second resolution */ From owner-svn-src-all@FreeBSD.ORG Sun Oct 21 18:10:24 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id AB73611B; Sun, 21 Oct 2012 18:10:24 +0000 (UTC) Date: Sun, 21 Oct 2012 18:10:24 +0000 From: Alexey Dokuchaev To: Devin Teske Subject: Re: svn commit: r241701 - in head/usr.sbin/bsdconfig: . include share Message-ID: <20121021181024.GE92674@FreeBSD.org> References: <201210181843.q9IIhs6N099621@svn.freebsd.org> <20121019055442.GA9108@FreeBSD.org> <20121019170216.GB92674@FreeBSD.org> <44662B32-966F-4573-987D-EEE8A07C5A16@fisglobal.com> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <44662B32-966F-4573-987D-EEE8A07C5A16@fisglobal.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2012 18:10:24 -0000 On Fri, Oct 19, 2012 at 11:36:04AM -0700, Devin Teske wrote: > On Oct 19, 2012, at 10:02 AM, Alexey Dokuchaev wrote: > > Ah, I guess it might explain the shitty colors I see on newish FreeBSD > > screenshots of dialog(1). > > I actually prefer the colors in cdialog (more specifically, I prefer the > lack-of-yellow!). > > I'm curious about how others feel about the use of yellow (specifically > that old dialog(1)/libdialog used it a lot and new cdialog-based dialog(1)/ > libdialog doesn't use it hardly at all). While you probably know my opinion at this point, I'd like to remark that our original dialog(1) colors seem like one of our distinctive features (similar to e.g. RedHat's or Debian's text-based installers) that had been around for years and are immediately recognizable. It is sad to loose them. > It is possible to change the colorings by first creating (if you don't > already have one) a ~/.dialogrc by executing the below command: > > dialog --create-rc ~/.dialogrc > > followed by editing said file. > > So while the default look and feel has changed, it's possible to customize > it to your liking. I would wholeheartedly prefer us to have original colors by default, and to provide alternative color scheme for those how experience some difficulties with them (e.g. MacOSX users), not the other way around. ./danfe From owner-svn-src-all@FreeBSD.ORG Sun Oct 21 18:18:10 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 49CD34BC; Sun, 21 Oct 2012 18:18:10 +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 2A42D8FC08; Sun, 21 Oct 2012 18:18: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 q9LIIA4H030998; Sun, 21 Oct 2012 18:18:10 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9LII95d030989; Sun, 21 Oct 2012 18:18:09 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201210211818.q9LII95d030989@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 21 Oct 2012 18:18:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r241816 - in vendor/dialog/dist: . package package/debian po samples samples/copifuncs X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2012 18:18:10 -0000 Author: nwhitehorn Date: Sun Oct 21 18:18:09 2012 New Revision: 241816 URL: http://svn.freebsd.org/changeset/base/241816 Log: Import dialog-1.1-20120706 Added: vendor/dialog/dist/samples/dft-cancel (contents, props changed) vendor/dialog/dist/samples/dft-extra (contents, props changed) vendor/dialog/dist/samples/dft-help (contents, props changed) vendor/dialog/dist/samples/dft-no (contents, props changed) vendor/dialog/dist/samples/fselect0 (contents, props changed) vendor/dialog/dist/samples/with-dquotes (contents, props changed) vendor/dialog/dist/samples/with-squotes (contents, props changed) Deleted: vendor/dialog/dist/samples/dselect vendor/dialog/dist/samples/valgrind.log Modified: vendor/dialog/dist/CHANGES vendor/dialog/dist/VERSION vendor/dialog/dist/aclocal.m4 vendor/dialog/dist/arrows.c vendor/dialog/dist/buttons.c vendor/dialog/dist/calendar.c vendor/dialog/dist/checklist.c vendor/dialog/dist/columns.c vendor/dialog/dist/configure vendor/dialog/dist/configure.in vendor/dialog/dist/dialog.1 vendor/dialog/dist/dialog.3 vendor/dialog/dist/dialog.c vendor/dialog/dist/dialog.h vendor/dialog/dist/dlg_colors.h vendor/dialog/dist/dlg_keys.c vendor/dialog/dist/dlg_keys.h vendor/dialog/dist/editbox.c vendor/dialog/dist/formbox.c vendor/dialog/dist/fselect.c vendor/dialog/dist/guage.c vendor/dialog/dist/headers-sh.in vendor/dialog/dist/inputbox.c vendor/dialog/dist/inputstr.c vendor/dialog/dist/makefile.in vendor/dialog/dist/menubox.c vendor/dialog/dist/mixedform.c vendor/dialog/dist/mixedgauge.c vendor/dialog/dist/msgbox.c vendor/dialog/dist/package/debian/changelog vendor/dialog/dist/package/dialog.spec vendor/dialog/dist/pause.c vendor/dialog/dist/po/cs.po vendor/dialog/dist/po/el.po vendor/dialog/dist/po/hr.po vendor/dialog/dist/po/sr.po vendor/dialog/dist/prgbox.c vendor/dialog/dist/progressbox.c vendor/dialog/dist/rc.c vendor/dialog/dist/samples/copifuncs/admin.funcs vendor/dialog/dist/samples/copifuncs/common.funcs vendor/dialog/dist/samples/copifuncs/copi.funcs vendor/dialog/dist/samples/copifuncs/copi.ifman2 vendor/dialog/dist/samples/copifuncs/copi.ifpoll2 vendor/dialog/dist/samples/copifuncs/copi.ifreq2 vendor/dialog/dist/samples/copifuncs/copi.sendifm1 vendor/dialog/dist/samples/copifuncs/copi.wheel vendor/dialog/dist/samples/copismall vendor/dialog/dist/samples/debian.rc vendor/dialog/dist/samples/dialog.py vendor/dialog/dist/samples/form1 vendor/dialog/dist/samples/inputmenu vendor/dialog/dist/samples/inputmenu-stdout vendor/dialog/dist/samples/inputmenu1 vendor/dialog/dist/samples/inputmenu2 vendor/dialog/dist/samples/inputmenu3 vendor/dialog/dist/samples/inputmenu4 vendor/dialog/dist/samples/killall vendor/dialog/dist/samples/prgbox vendor/dialog/dist/samples/prgbox2 vendor/dialog/dist/samples/report-button vendor/dialog/dist/samples/report-edit vendor/dialog/dist/samples/report-string vendor/dialog/dist/samples/report-tempfile vendor/dialog/dist/samples/report-yesno vendor/dialog/dist/samples/setup-edit vendor/dialog/dist/samples/setup-tempfile vendor/dialog/dist/samples/setup-utf8 vendor/dialog/dist/samples/setup-vars vendor/dialog/dist/samples/slackware.rc vendor/dialog/dist/samples/sourcemage.rc vendor/dialog/dist/samples/suse.rc vendor/dialog/dist/samples/tailboxbg vendor/dialog/dist/samples/tailboxbg1 vendor/dialog/dist/samples/tailboxbg2 vendor/dialog/dist/samples/testdata-8bit vendor/dialog/dist/samples/wheel vendor/dialog/dist/samples/whiptail.rc vendor/dialog/dist/tailbox.c vendor/dialog/dist/textbox.c vendor/dialog/dist/timebox.c vendor/dialog/dist/trace.c vendor/dialog/dist/ui_getc.c vendor/dialog/dist/util.c vendor/dialog/dist/yesno.c Modified: vendor/dialog/dist/CHANGES ============================================================================== --- vendor/dialog/dist/CHANGES Sun Oct 21 13:42:38 2012 (r241815) +++ vendor/dialog/dist/CHANGES Sun Oct 21 18:18:09 2012 (r241816) @@ -1,9 +1,172 @@ --- $Id: CHANGES,v 1.360 2011/07/07 23:35:10 tom Exp $ +-- $Id: CHANGES,v 1.419 2012/07/06 18:18:48 tom Exp $ -- Thomas E. Dickey This version of dialog was originally from a Debian snapshot. I've done this to it: +2012/07/06 + + modify samples/setup-tempfile to work with Tru64's shell. + + modify inputmenu sample scripts to make them more portable: + + use "id" rather than "$GROUPS", use sed to work with Solaris. + + use sed to split-up the rename results to work with HPUX. + + fix regression in msgbox (ArchLinux #30574) + +2012/07/03 + + modify prgbox widget to work with --extra-button, etc. + + add case values to several widgets to allow for mouse-clicks with + "--extra-button" and "--help-button" additions. + + correct timebox widget's exit code for "--extra-button" when handing + the "enter" key. + + modify msgbox widget to honor "--extra-button". + + corrected processing of "--trace" option, which did not update the + index into command-line to point past its value. + + add a check in dialog program for valid characters used in option, + e.g., to generate an error if a script attempts to add option value + using "=" rather than with whitespace. + + add new command-line option --default-button and library function + dlg_default_button() to retrieve the value set by the option + to provide a way to set the default button directly rather than + by combining --nook, etc. (patch by Zoltan Kelemen). + + amend include of unctrl.h to apply only to the case where curses.h + is included, to avoid conflict of ncurses' unctrl.h with a system + implementation (report by Martin Roedlach) + + add limit-check to dlg_toupper() in non-wide curses mode to work + when non-character values such as arrow-key codes are passed to + it (patch by Zoltan Kelemen). + + override timeout value, e.g., as set via --timeout command-line + option in pause widget because that interferes with pause's behavior + (report by Jan Spitalnik). + + modify samples/inputmenu* to allow ":" in renamed text (report by + Andreas Stoewing). + + modify double-quoting to make it more consistent, i.e., checklist + output is quoted only when needed. This fixes the case where + single-quotes were used whether or not needed, but also modifies + older checklist behavior for double-quoting which always added those + (Debian #663664). + + correct exit-code used in inputmenu for "rename" button (Debian + #673041, forwarded from Ubuntu #333909, patch by Lebedev Vadim). + + update el.po and hr.po from + http://translationproject.org/latest/dialog/ + + use checkbashisms to clean up sample scripts. + +2012/02/15 + + modify menubox.c to use the same improvement as in checklist.c + + improve auto width computation for checklist widget by using + dlg_calc_list_width as in the non-auto case (Edho Arief). + + eliminate some bashisms in the sample scripts (Pedro Giffuni). + + makefile fixes from FreeBSD ports (Li-Wen Hsu): + + make --with-package option of configure script work. + + get LIBTOOL_VERSION from configure script, needed by + ${LIBTOOL_VERSION} in LIBTOOL_CREATE (LIB_CREATE in configure and + aclocal.m4) + + update cs.po and sr.po from + http://translationproject.org/latest/dialog/ + + updated configure script macros, improving CF_XOPEN_SOURCE among + other fixes. + +2011/10/20 + + fix --analyze warnings for clang versions 2.8, 2.9. + + add configure check for lint program. + + add check in dlg_getc() in case its window is freed as a side effect + of removing callbacks. + + fix logic in freeing subwindows (report by xDog Walker). + + fix a regression in logic distinguishing between inputmenu and menu + widgets (report by xDog Walker). + + minor fixes to library manpage. + +2011/10/18 + + modify header-sh.in to work around limit on sed script length on + HPUX. + + add a special case of parameter parsing for "--trace" to the + initialization done before calling init_dialog(), to allow users to + capture the initial state of the parameter list before any options + are processed and removed. This is only done if "--trace" is the + first option, otherwise it is handled in the common options as before + (report by xDog Walker). + + modify samples/testdata-8bit, discarding $1 from the parameter list + if it was used, so that the source'ing scripts can consistently use + "$@" to insert parameters before the widget, e.g., as an alternative + to using $DIALOGOPTS (report by xDog Walker). + + modify treatment of function pointers in menubox.c, make + dlg_renamed_menutext() and dlg_dummy_menutext() visible to library + users (request by xDog Walker). + + add dlg_count_real_columns(), use to modify centering for "--hline" + text to account for "\Z"s (report by xDog Walker). + + improve check in dlg_draw_arrows2() for conflict between the window + title and up-arrow marker to take into account that the given window + may not be the top-level window of the widget. + + change width of page up/down mouse areas in fselect panes to use the + full width of the panes rather than only the portion from the left + margin to the up/down arrow. + + add/use dlg_draw_box2() and dlg_draw_bottom_box2() to use the + secondary borders. + + modify rc-file read/write to accept/generate color values that refer + to previously-processed items in the color table. This reduces the + number of distinct colors that must be specified to set up a color + scheme. + + add color table entries for secondary borders, i.e., the ones that + are normally drawn with the dialog's text-colors (Debian #641168). + + modify fselect.c to scan the current directory if the input field + happens to be empty (Debian #640905). + + repeated the discussion of environment variables that can override + the exit-status values in the manpage's return-codes section + (Debian #642105). + + add an example to the manpage showing how to override the form + widget's keys used for field/button traversal (Debian #642108). + + modify call to dlg_register_window() in formbox.c so that the editing + bindings are attached to the form sub-window rather than the + top-level dialog window. Also change the name by which the editing + bindings are bound for editbox.c, fselect.c and inputbox.c, so that + the editing and navigation bindings can be different. + + correct logic in dlg_lookup_key() so that it matches the widget name + before using a binding from .dialogrc, allowing the inner/outer + windows of form and other editing widgets to have different bindings. + + modify dlg_register_window() to call dlg_dump_window_keys() after + its updates, via the --trace output, to supplement the manpage + description of key bindings (Debian #642108). + + add DLGK_FORM_PREV and DLGK_FORM_NEXT key-bindings to form.c, to + allow binding a single key to traverse both form-fields and buttons + (Debian #642108). + + modify dlg_parse_rc() to check for error return from + dlg_parse_bindkey(). + + add function dlg_dump_window_keys(), to help with debugging widgets. + + add CR, LF, TAB, FF and ESC to table of curses names to help make + key bindings more readable. + + update table of dialog key-names so that helpfile and trace are + dumped properly. + + correct dlg_dump_keys(), which was showing only the first item in + the matched binding table. + + save/restore window current position in dlg_update_mixedgauge(). + + pass return-code from pause_for_ok() from dlg_progressbox() when + pauseopt is set, rather than only DLG_OK. + + call setlocale() in init_dialog() rather than relying on on-demand + use within inputstr.c, since there are paths in textbox widget which + do not exercise the latter (report by xDog Walker). + + fix some places where checks for "\Z" were done without also checking + dialog_vars.colors (report by Moray Henderson). + + correct logic for DIALOGOPTS parsing so that the parse happens only + once unless memory leak checking is enabled (report by xDog Walker). + + remove an incorrect free() call in dlg_free_gauge() (report by xDog + Walker). + + modify dlg_trace_win() to log wide-characters (report by xDog Walker). + + make traces shorter by skipping repeated ERR's, but showing the + number skipped (report by xDog Walker). + + improve description in manpage to distinguish program box and + progress box from tailboxes (adapted from email by xDog Walker). + + modify dlg_trace_win() so that it looks for the topmost window in a + dialog. Because subwindows share space with the top window, tracing + the latter shows the whole widget (report by xDog Walker). + + expand tracing so that each window is traced before soliciting input, + making the ^T feature to print a window on demand partly redundant + (suggested by xDog Walker). + + cosmetic change in dialog.h to avoid "*/*" strings from comments next + to "*" (report by xDog Walker). + + ensure result from dlg_align_columns() has trailing null on each + string. Analysis was hindered by libc6's continuance of libc5's + early-1990s misfeature of clearing the result from malloc, noting + that libc6's documentation incorrectly claims that it does not do + this (report by xDog Walker). + 2011/07/07 + modify util.c to work better with old versions of ncurses: + suppress use of wchgat() before fix in 20060715 which is needed @@ -87,7 +250,7 @@ to it: + CF_XOPEN_SOURCE, workaround for cygwin to get ncurses' configure script to define _XOPEN_SOURCE_EXTENDED (cygwin's features.h doesn't do anything, so it needs a crutch). - + updated config.guess, config.sub + + update config.guess, config.sub 2011/03/02 + add --prgbox and --programbox (adapted from patch by David Boyd). @@ -155,7 +318,7 @@ to it: CF_ADD_LIBDIR for the curses-directory here, from CF_NCURSES_CPPFLAGS and CF_NCURSES_LDFLAGS, so it will work even with the default checking, e.g., no --with-ncurses, etc. - + updated config.guess, config.sub + + update config.guess, config.sub 2010/04/28 + several improvements to configure script: @@ -250,7 +413,7 @@ to it: libutf8 and libiconv. + update da.po, ru.po from http://translationproject.org/latest/dialog/ - + updated config.guess, config.sub + + update config.guess, config.sub 2008/08/19 + amend changes to quoting; by default, the checklist widget quotes its @@ -333,7 +496,7 @@ to it: ESC to be returned, quitting dialog (report by Reiner Huober). + add extern "C" declarations to dlg_keys.h so the corresponding function declarations are exported to C++ as C symbols. - + updated config.guess, config.sub + + update config.guess, config.sub 2007/06/04 + fix a memory leak in editbox.c @@ -436,7 +599,7 @@ to it: CF_CURSES_LIBS, CF_INCLUDE_DIRS, CF_LARGEFILE, CF_MAKEFLAGS, CF_PATH_SYNTAX, CF_SUBDIR_PATH, CF_SUBST, CF_WITH_DBMALLOC, CF_WITH_DMALLOC, CF_WITH_LIBTOOL and CF_XOPEN_SOURCE. - + updated config.guess, config.sub + + update config.guess, config.sub > adapted fixes from SuSE package (Werner Fink): + add some limit-checks in dlg_draw_shadow(). + make shadows resizable, using new dlg_move_window() in msgbox.c Modified: vendor/dialog/dist/VERSION ============================================================================== --- vendor/dialog/dist/VERSION Sun Oct 21 13:42:38 2012 (r241815) +++ vendor/dialog/dist/VERSION Sun Oct 21 18:18:09 2012 (r241816) @@ -1 +1 @@ -10:0:0 1.1 20110707 +10:4:0 1.1 20120706 Modified: vendor/dialog/dist/aclocal.m4 ============================================================================== --- vendor/dialog/dist/aclocal.m4 Sun Oct 21 13:42:38 2012 (r241815) +++ vendor/dialog/dist/aclocal.m4 Sun Oct 21 18:18:09 2012 (r241816) @@ -1,7 +1,7 @@ dnl macros used for DIALOG configure script -dnl $Id: aclocal.m4,v 1.82 2011/06/28 22:48:31 tom Exp $ +dnl $Id: aclocal.m4,v 1.87 2012/02/16 02:11:26 tom Exp $ dnl --------------------------------------------------------------------------- -dnl Copyright 1999-2010,2011 -- Thomas E. Dickey +dnl Copyright 1999-2011,2012 -- Thomas E. Dickey dnl dnl Permission is hereby granted, free of charge, to any person obtaining a dnl copy of this software and associated documentation files (the @@ -592,6 +592,31 @@ changequote([,])dnl AC_SUBST(GENCAT) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_ACVERSION_CHECK version: 2 updated: 2011/05/08 11:22:03 +dnl ------------------ +dnl Conditionally generate script according to whether we're using a given autoconf. +dnl +dnl $1 = version to compare against +dnl $2 = code to use if AC_ACVERSION is at least as high as $1. +dnl $3 = code to use if AC_ACVERSION is older than $1. +define(CF_ACVERSION_CHECK, +[ +ifdef([m4_version_compare], +[m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1, [$3], [$2])], +[CF_ACVERSION_COMPARE( +AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), +AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)), AC_ACVERSION, [$2], [$3])])])dnl +dnl --------------------------------------------------------------------------- +dnl CF_ACVERSION_COMPARE version: 2 updated: 2011/04/14 20:56:50 +dnl -------------------- +dnl CF_ACVERSION_COMPARE(MAJOR1, MINOR1, TERNARY1, +dnl MAJOR2, MINOR2, TERNARY2, +dnl PRINTABLE2, not FOUND, FOUND) +define(CF_ACVERSION_COMPARE, +[ifelse(builtin([eval], [$2 < $5]), 1, +[ifelse([$8], , ,[$8])], +[ifelse([$9], , ,[$9])])])dnl +dnl --------------------------------------------------------------------------- dnl CF_AC_PREREQ version: 2 updated: 1997/09/06 13:24:56 dnl ------------ dnl Conditionally generate script according to whether we're using the release @@ -1227,7 +1252,7 @@ fi AC_CHECK_HEADERS($cf_cv_ncurses_header) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_LIBS version: 34 updated: 2011/04/09 14:51:08 +dnl CF_CURSES_LIBS version: 35 updated: 2011/08/09 21:06:37 dnl -------------- dnl Look for the curses libraries. Older curses implementations may require dnl termcap/termlib to be linked as well. Call CF_CURSES_CPPFLAGS first. @@ -1307,7 +1332,7 @@ if test ".$ac_cv_func_initscr" != .yes ; # Check for library containing tgoto. Do this before curses library # because it may be needed to link the test-case for initscr. AC_CHECK_FUNC(tgoto,[cf_term_lib=predefined],[ - for cf_term_lib in $cf_check_list termcap termlib unknown + for cf_term_lib in $cf_check_list otermcap termcap termlib unknown do AC_CHECK_LIB($cf_term_lib,tgoto,[break]) done @@ -1533,6 +1558,30 @@ fi test "$cf_cv_curses_wacs_symbols" != no && AC_DEFINE(CURSES_WACS_SYMBOLS) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_CURSES_WGETPARENT version: 2 updated: 2011/10/17 20:12:04 +dnl -------------------- +dnl Check for curses support for directly determining the parent of a given +dnl window. Some implementations make this difficult, so we provide for +dnl defining an application-specific function that gives this functionality. +dnl +dnl $1 = name of function to use if the feature is missing +AC_DEFUN([CF_CURSES_WGETPARENT],[ +CF_CURSES_FUNCS(wgetparent) +if test "x$cf_cv_func_wgetparent" != xyes +then + AC_MSG_CHECKING(if WINDOW has _parent member) + AC_TRY_COMPILE([#include <${cf_cv_ncurses_header:-curses.h}>], + [WINDOW *p = stdscr->_parent], + [cf_window__parent=yes], + [cf_window__parent=no]) + AC_MSG_RESULT($cf_window__parent) + if test "$cf_window__parent" = yes + then + AC_DEFINE(HAVE_WINDOW__PARENT) + fi +fi +])dnl +dnl --------------------------------------------------------------------------- dnl CF_DIRNAME version: 4 updated: 2002/12/21 19:25:52 dnl ---------- dnl "dirname" is not portable, so we fake it with a shell script. @@ -2337,7 +2386,7 @@ ifdef([AC_FUNC_FSEEKO],[ ]) ]) dnl --------------------------------------------------------------------------- -dnl CF_LD_RPATH_OPT version: 4 updated: 2011/06/04 20:09:13 +dnl CF_LD_RPATH_OPT version: 5 updated: 2011/07/17 14:48:41 dnl --------------- dnl For the given system and compiler, find the compiler flags to pass to the dnl loader to use the "rpath" feature. @@ -2361,7 +2410,7 @@ linux*|gnu*|k*bsd*-gnu) #(vi openbsd[[2-9]].*|mirbsd*) #(vi LD_RPATH_OPT="-Wl,-rpath," ;; -freebsd*) #(vi +dragonfly*|freebsd*) #(vi LD_RPATH_OPT="-rpath " ;; netbsd*) #(vi @@ -2420,11 +2469,11 @@ CF_SUBDIR_PATH($1,$2,lib) $1="$cf_library_path_list [$]$1" ])dnl dnl --------------------------------------------------------------------------- -dnl CF_LIB_PREFIX version: 8 updated: 2008/09/13 11:34:16 +dnl CF_LIB_PREFIX version: 9 updated: 2012/01/21 19:28:10 dnl ------------- dnl Compute the library-prefix for the given host system dnl $1 = variable to set -AC_DEFUN([CF_LIB_PREFIX], +define([CF_LIB_PREFIX], [ case $cf_cv_system_name in #(vi OS/2*|os2*) #(vi @@ -2645,7 +2694,7 @@ printf("old\n"); ,[$1=no]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_NCURSES_CONFIG version: 8 updated: 2010/07/08 05:17:30 +dnl CF_NCURSES_CONFIG version: 9 updated: 2011/11/26 15:42:05 dnl ----------------- dnl Tie together the configure-script macros for ncurses. dnl Prefer the "-config" script from ncurses 6.x, to simplify analysis. @@ -2657,7 +2706,10 @@ AC_DEFUN([CF_NCURSES_CONFIG], cf_ncuconfig_root=ifelse($1,,ncurses,$1) echo "Looking for ${cf_ncuconfig_root}-config" -AC_PATH_PROGS(NCURSES_CONFIG,${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config,none) + +CF_ACVERSION_CHECK(2.52, + [AC_CHECK_TOOLS(NCURSES_CONFIG, ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config, none)], + [AC_PATH_PROGS(NCURSES_CONFIG, ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config, none)]) if test "$NCURSES_CONFIG" != none ; then @@ -3171,6 +3223,14 @@ AC_SUBST(PROG_EXT) test -n "$PROG_EXT" && AC_DEFINE_UNQUOTED(PROG_EXT,"$PROG_EXT") ])dnl dnl --------------------------------------------------------------------------- +dnl CF_PROG_LINT version: 2 updated: 2009/08/12 04:43:14 +dnl ------------ +AC_DEFUN([CF_PROG_LINT], +[ +AC_CHECK_PROGS(LINT, tdlint lint alint splint lclint) +AC_SUBST(LINT_OPTS) +])dnl +dnl --------------------------------------------------------------------------- dnl CF_REMOVE_DEFINE version: 3 updated: 2010/01/09 11:05:50 dnl ---------------- dnl Remove all -U and -D options that refer to the given symbol from a list @@ -3418,6 +3478,45 @@ ncursesw/term.h) esac ])dnl dnl --------------------------------------------------------------------------- +dnl CF_TRY_XOPEN_SOURCE version: 1 updated: 2011/10/30 17:09:50 +dnl ------------------- +dnl If _XOPEN_SOURCE is not defined in the compile environment, check if we +dnl can define it successfully. +AC_DEFUN([CF_TRY_XOPEN_SOURCE],[ +AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[ + AC_TRY_COMPILE([ +#include +#include +#include +],[ +#ifndef _XOPEN_SOURCE +make an error +#endif], + [cf_cv_xopen_source=no], + [cf_save="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" + AC_TRY_COMPILE([ +#include +#include +#include +],[ +#ifdef _XOPEN_SOURCE +make an error +#endif], + [cf_cv_xopen_source=no], + [cf_cv_xopen_source=$cf_XOPEN_SOURCE]) + CPPFLAGS="$cf_save" + ]) +]) + +if test "$cf_cv_xopen_source" != no ; then + CF_REMOVE_DEFINE(CFLAGS,$CFLAGS,_XOPEN_SOURCE) + CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,_XOPEN_SOURCE) + cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source" + CF_ADD_CFLAGS($cf_temp_xopen_source) +fi +]) +dnl --------------------------------------------------------------------------- dnl CF_UNION_WAIT version: 5 updated: 1997/11/23 14:49:44 dnl ------------- dnl Check to see if the BSD-style union wait is declared. Some platforms may @@ -3680,7 +3779,7 @@ if test "$with_dmalloc" = yes ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_LIBTOOL version: 27 updated: 2011/06/28 18:45:38 +dnl CF_WITH_LIBTOOL version: 28 updated: 2011/07/02 15:40:32 dnl --------------- dnl Provide a configure option to incorporate libtool. Define several useful dnl symbols for the makefile rules. @@ -3781,7 +3880,7 @@ ifdef([AC_PROG_LIBTOOL],[ # special hack to add -no-undefined (which libtool should do for itself) LT_UNDEF= case "$cf_cv_system_name" in #(vi - cygwin*|mingw32*|uwin*|aix[[456]]) #(vi + cygwin*|mingw32*|uwin*|aix[[4-7]]) #(vi LT_UNDEF=-no-undefined ;; esac @@ -3950,7 +4049,7 @@ AC_TRY_LINK([ test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED" ])dnl dnl --------------------------------------------------------------------------- -dnl CF_XOPEN_SOURCE version: 35 updated: 2011/02/20 20:37:37 +dnl CF_XOPEN_SOURCE version: 42 updated: 2012/01/07 08:26:49 dnl --------------- dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions, dnl or adapt to the vendor's definitions to get equivalent functionality, @@ -3966,7 +4065,7 @@ cf_POSIX_C_SOURCE=ifelse([$2],,199506L,[ cf_xopen_source= case $host_os in #(vi -aix[[456]]*) #(vi +aix[[4-7]]*) #(vi cf_xopen_source="-D_ALL_SOURCE" ;; cygwin) #(vi @@ -3977,6 +4076,7 @@ darwin[[0-8]].*) #(vi ;; darwin*) #(vi cf_xopen_source="-D_DARWIN_C_SOURCE" + cf_XOPEN_SOURCE= ;; freebsd*|dragonfly*) #(vi # 5.x headers associate @@ -3994,15 +4094,23 @@ hpux*) #(vi ;; irix[[56]].*) #(vi cf_xopen_source="-D_SGI_SOURCE" + cf_XOPEN_SOURCE= ;; linux*|gnu*|mint*|k*bsd*-gnu) #(vi CF_GNU_SOURCE ;; mirbsd*) #(vi - # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks + # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks and other headers which use u_int / u_short types + cf_XOPEN_SOURCE= + CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE) ;; netbsd*) #(vi - # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw + cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw + ;; +openbsd[[4-9]]*) #(vi + # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw + cf_xopen_source="-D_BSD_SOURCE" + cf_XOPEN_SOURCE=600 ;; openbsd*) #(vi # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw @@ -4016,36 +4124,11 @@ nto-qnx*) #(vi sco*) #(vi # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer ;; -solaris2.1[[0-9]]) #(vi - cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" - ;; -solaris2.[[1-9]]) #(vi +solaris2.*) #(vi cf_xopen_source="-D__EXTENSIONS__" ;; *) - AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[ - AC_TRY_COMPILE([#include ],[ -#ifndef _XOPEN_SOURCE -make an error -#endif], - [cf_cv_xopen_source=no], - [cf_save="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" - AC_TRY_COMPILE([#include ],[ -#ifdef _XOPEN_SOURCE -make an error -#endif], - [cf_cv_xopen_source=no], - [cf_cv_xopen_source=$cf_XOPEN_SOURCE]) - CPPFLAGS="$cf_save" - ]) -]) - if test "$cf_cv_xopen_source" != no ; then - CF_REMOVE_DEFINE(CFLAGS,$CFLAGS,_XOPEN_SOURCE) - CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,_XOPEN_SOURCE) - cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source" - CF_ADD_CFLAGS($cf_temp_xopen_source) - fi + CF_TRY_XOPEN_SOURCE CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE) ;; esac @@ -4053,6 +4136,35 @@ esac if test -n "$cf_xopen_source" ; then CF_ADD_CFLAGS($cf_xopen_source) fi + +dnl In anything but the default case, we may have system-specific setting +dnl which is still not guaranteed to provide all of the entrypoints that +dnl _XOPEN_SOURCE would yield. +if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then + AC_MSG_CHECKING(if _XOPEN_SOURCE really is set) + AC_TRY_COMPILE([#include ],[ +#ifndef _XOPEN_SOURCE +make an error +#endif], + [cf_XOPEN_SOURCE_set=yes], + [cf_XOPEN_SOURCE_set=no]) + AC_MSG_RESULT($cf_XOPEN_SOURCE_set) + if test $cf_XOPEN_SOURCE_set = yes + then + AC_TRY_COMPILE([#include ],[ +#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE +make an error +#endif], + [cf_XOPEN_SOURCE_set_ok=yes], + [cf_XOPEN_SOURCE_set_ok=no]) + if test $cf_XOPEN_SOURCE_set_ok = no + then + AC_MSG_WARN(_XOPEN_SOURCE is lower than requested) + fi + else + CF_TRY_XOPEN_SOURCE + fi +fi ]) dnl --------------------------------------------------------------------------- dnl CF__CURSES_HEAD version: 2 updated: 2010/10/23 15:54:49 Modified: vendor/dialog/dist/arrows.c ============================================================================== --- vendor/dialog/dist/arrows.c Sun Oct 21 13:42:38 2012 (r241815) +++ vendor/dialog/dist/arrows.c Sun Oct 21 18:18:09 2012 (r241816) @@ -1,5 +1,5 @@ /* - * $Id: arrows.c,v 1.36 2011/06/27 09:13:56 tom Exp $ + * $Id: arrows.c,v 1.41 2011/10/20 23:37:17 tom Exp $ * * arrows.c -- draw arrows to indicate end-of-range for lists * @@ -79,9 +79,9 @@ dlg_draw_helpline(WINDOW *win, bool deco const int *cols = dlg_index_columns(dialog_vars.help_line); int other = decorations ? (ON_LEFT + ON_RIGHT) : 0; int avail = (getmaxx(win) - other - 2); - int limit = dlg_limit_columns(dialog_vars.help_line, avail, 0); + int limit = dlg_count_real_columns(dialog_vars.help_line) + 2; - if (limit > 0) { + if (limit < avail) { getyx(win, cur_y, cur_x); other = decorations ? ON_LEFT : 0; (void) wmove(win, bottom, other + (avail - limit) / 2); @@ -107,13 +107,14 @@ dlg_draw_arrows2(WINDOW *win, int cur_x, cur_y; int limit_x = getmaxx(win); bool draw_top = TRUE; + bool is_toplevel = (wgetparent(win) == stdscr); getyx(win, cur_y, cur_x); /* * If we're drawing a centered title, do not overwrite with the arrows. */ - if (dialog_vars.title) { + if (dialog_vars.title && is_toplevel && (top - getbegy(win)) < MARGIN) { int have = (limit_x - dlg_count_columns(dialog_vars.title)) / 2; int need = x + 5; if (need > have) @@ -123,11 +124,11 @@ dlg_draw_arrows2(WINDOW *win, if (draw_top) { (void) wmove(win, top, x); if (top_arrow) { - wattrset(win, merge_colors(uarrow_attr, attr)); + (void) wattrset(win, merge_colors(uarrow_attr, attr)); (void) add_acs(win, ACS_UARROW); (void) waddstr(win, "(-)"); } else { - wattrset(win, attr); + (void) wattrset(win, attr); (void) whline(win, dlg_boxchar(ACS_HLINE), ON_LEFT); } } @@ -135,11 +136,11 @@ dlg_draw_arrows2(WINDOW *win, (void) wmove(win, bottom, x); if (bottom_arrow) { - wattrset(win, merge_colors(darrow_attr, attr)); + (void) wattrset(win, merge_colors(darrow_attr, attr)); (void) add_acs(win, ACS_DARROW); (void) waddstr(win, "(+)"); } else { - wattrset(win, borderattr); + (void) wattrset(win, borderattr); (void) whline(win, dlg_boxchar(ACS_HLINE), ON_LEFT); } mouse_mkbutton(bottom, x - 1, 6, KEY_NPAGE); @@ -147,7 +148,7 @@ dlg_draw_arrows2(WINDOW *win, (void) wmove(win, cur_y, cur_x); wrefresh(win); - wattrset(win, save); + (void) wattrset(win, save); } void @@ -166,14 +167,13 @@ dlg_draw_scrollbar(WINDOW *win, char buffer[80]; int percent; int len; - int oldy, oldx, maxy, maxx; + int oldy, oldx; chtype save = dlg_get_attrs(win); int top_arrow = (first_data != 0); int bottom_arrow = (next_data < total_data); getyx(win, oldy, oldx); - getmaxyx(win, maxy, maxx); dlg_draw_helpline(win, TRUE); if (bottom_arrow || top_arrow || dialog_state.use_scrollbar) { @@ -187,12 +187,12 @@ dlg_draw_scrollbar(WINDOW *win, else if (percent > 100) percent = 100; - wattrset(win, position_indicator_attr); + (void) wattrset(win, position_indicator_attr); (void) sprintf(buffer, "%d%%", percent); (void) wmove(win, bottom, right - 7); (void) waddstr(win, buffer); if ((len = dlg_count_columns(buffer)) < 4) { - wattrset(win, border_attr); + (void) wattrset(win, border_attr); whline(win, dlg_boxchar(ACS_HLINE), 4 - len); } } @@ -212,7 +212,7 @@ dlg_draw_scrollbar(WINDOW *win, if (bar_high < all_high) { wmove(win, top + 1, right); - wattrset(win, save); + (void) wattrset(win, save); wvline(win, ACS_VLINE | A_REVERSE, all_high); bar_y = BARSIZE(this_data); @@ -221,7 +221,7 @@ dlg_draw_scrollbar(WINDOW *win, wmove(win, top + 1 + bar_y, right); - wattrset(win, position_indicator_attr); + (void) wattrset(win, position_indicator_attr); wattron(win, A_REVERSE); wvline(win, ACS_BLOCK, bar_high); } @@ -236,7 +236,7 @@ dlg_draw_scrollbar(WINDOW *win, attr, borderattr); - wattrset(win, save); + (void) wattrset(win, save); wmove(win, oldy, oldx); } @@ -255,6 +255,6 @@ dlg_draw_arrows(WINDOW *win, x, top, bottom, - menubox_attr, + menubox_border2_attr, menubox_border_attr); } Modified: vendor/dialog/dist/buttons.c ============================================================================== --- vendor/dialog/dist/buttons.c Sun Oct 21 13:42:38 2012 (r241815) +++ vendor/dialog/dist/buttons.c Sun Oct 21 18:18:09 2012 (r241816) @@ -1,9 +1,9 @@ /* - * $Id: buttons.c,v 1.86 2011/06/28 10:46:46 tom Exp $ + * $Id: buttons.c,v 1.90 2012/07/01 20:42:05 tom Exp $ * * buttons.c -- draw buttons, e.g., OK/Cancel * - * Copyright 2000-2010,2011 Thomas E. Dickey + * Copyright 2000-2011,2012 Thomas E. Dickey * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License, version 2.1 @@ -104,11 +104,11 @@ print_button(WINDOW *win, char *label, i : button_label_inactive_attr); (void) wmove(win, y, x); - wattrset(win, selected - ? button_active_attr - : button_inactive_attr); + (void) wattrset(win, selected + ? button_active_attr + : button_inactive_attr); (void) waddstr(win, "<"); - wattrset(win, label_attr); + (void) wattrset(win, label_attr); for (i = 0; i < limit; ++i) { int first = indx[i]; int last = indx[i + 1]; @@ -120,14 +120,14 @@ print_button(WINDOW *win, char *label, i const char *temp = (label + first); int cmp = string_to_char(&temp); if (dlg_isupper(cmp)) { - wattrset(win, key_attr); + (void) wattrset(win, key_attr); state = 1; } break; } #endif if (dlg_isupper(UCH(label[first]))) { - wattrset(win, key_attr); + (void) wattrset(win, key_attr); state = 1; } break; @@ -138,9 +138,9 @@ print_button(WINDOW *win, char *label, i } waddnstr(win, label + first, last - first); } - wattrset(win, selected - ? button_active_attr - : button_inactive_attr); + (void) wattrset(win, selected + ? button_active_attr + : button_inactive_attr); (void) waddstr(win, ">"); (void) wmove(win, y, x + ((int) strspn(label, " ")) + 1); } @@ -310,7 +310,7 @@ dlg_draw_buttons(WINDOW *win, (void) wmove(win, final_y, final_x); wrefresh(win); free(buffer); - wattrset(win, save); + (void) wattrset(win, save); } /* @@ -488,10 +488,12 @@ dlg_exit_buttoncode(int button) const char ** dlg_ok_label(void) { - static const char *labels[3]; + static const char *labels[4]; int n = 0; labels[n++] = my_ok_label(); + if (dialog_vars.extra_button) + labels[n++] = my_extra_label(); if (dialog_vars.help_button) labels[n++] = my_help_label(); labels[n] = 0; @@ -537,6 +539,7 @@ dlg_ok_buttoncode(int button) } else if (dialog_vars.help_button && (button == n)) { result = DLG_EXIT_HELP; } + dlg_trace_msg("# dlg_ok_buttoncode(%d) = %d\n", button, result); return result; } @@ -575,7 +578,7 @@ dlg_prev_ok_buttonindex(int current, int /* * Find the button-index for the "OK" or "Cancel" button, according to * whether --defaultno is given. If --nocancel was given, we always return - * the index for "OK". + * the index for the first button (usually "OK" unless --nook was used). */ int dlg_defaultno_button(void) @@ -586,6 +589,30 @@ dlg_defaultno_button(void) while (dlg_ok_buttoncode(result) != DLG_EXIT_CANCEL) ++result; } + dlg_trace_msg("# dlg_defaultno_button() = %d\n", result); + return result; +} + +/* + * Find the button-index for a button named with --default-button. If the + * option was not specified, or if the selected button does not exist, return + * the index of the first button (usually "OK" unless --nook was used). + */ +int +dlg_default_button(void) +{ + int i, n; + int result = 0; + + if (dialog_vars.default_button >= 0) { + for (i = 0; (n = dlg_ok_buttoncode(i)) >= 0; i++) { + if (n == dialog_vars.default_button) { + result = i; + break; + } + } + } + dlg_trace_msg("# dlg_default_button() = %d\n", result); return result; } Modified: vendor/dialog/dist/calendar.c ============================================================================== --- vendor/dialog/dist/calendar.c Sun Oct 21 13:42:38 2012 (r241815) +++ vendor/dialog/dist/calendar.c Sun Oct 21 18:18:09 2012 (r241816) @@ -1,9 +1,9 @@ /* - * $Id: calendar.c,v 1.62 2011/06/29 09:47:06 tom Exp $ + * $Id: calendar.c,v 1.66 2012/07/01 18:13:07 Zoltan.Kelemen Exp $ * * calendar.c -- implements the calendar box * - * Copyright 2001-2010,2011 Thomas E. Dickey + * Copyright 2001-2011,2012 Thomas E. Dickey * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License, version 2.1 @@ -225,12 +225,14 @@ draw_day(BOX * data, struct tm *current) int prev = days_in_month(current, -1); werase(data->window); - dlg_draw_box(data->parent, - data->y - MARGIN, data->x - MARGIN, - data->height + (2 * MARGIN), data->width + (2 * MARGIN), - menubox_border_attr, menubox_attr); /* border of daybox */ + dlg_draw_box2(data->parent, + data->y - MARGIN, data->x - MARGIN, + data->height + (2 * MARGIN), data->width + (2 * MARGIN), + menubox_attr, + menubox_border_attr, + menubox_border2_attr); - wattrset(data->window, menubox_attr); /* daynames headline */ + (void) wattrset(data->window, menubox_attr); /* daynames headline */ for (x = 0; x < 7; x++) { mvwprintw(data->window, 0, (x + 1) * cell_wide, "%*.*s ", @@ -246,7 +248,7 @@ draw_day(BOX * data, struct tm *current) week = (current->tm_yday + 6 + mday - current->tm_mday) / 7; for (y = 1; mday < last; y++) { - wattrset(data->window, menubox_attr); /* weeknumbers headline */ + (void) wattrset(data->window, menubox_attr); /* weeknumbers headline */ mvwprintw(data->window, y, 0, "%*d ", @@ -257,9 +259,9 @@ draw_day(BOX * data, struct tm *current) ++mday; if (wmove(data->window, y, this_x) == ERR) continue; - wattrset(data->window, item_attr); /* not selected days */ + (void) wattrset(data->window, item_attr); /* not selected days */ if (mday == day) { - wattrset(data->window, item_selected_attr); /* selected day */ + (void) wattrset(data->window, item_selected_attr); /* selected day */ save_y = y; save_x = this_x; } @@ -294,13 +296,15 @@ draw_month(BOX * data, struct tm *curren month = current->tm_mon + 1; - wattrset(data->parent, dialog_attr); /* Headline "Month" */ + (void) wattrset(data->parent, dialog_attr); /* Headline "Month" */ (void) mvwprintw(data->parent, data->y - 2, data->x - 1, _("Month")); - dlg_draw_box(data->parent, - data->y - 1, data->x - 1, - data->height + 2, data->width + 2, - menubox_border_attr, menubox_attr); /* borders of monthbox */ - wattrset(data->window, item_attr); /* color the month selection */ + dlg_draw_box2(data->parent, + data->y - 1, data->x - 1, + data->height + 2, data->width + 2, + menubox_attr, + menubox_border_attr, + menubox_border2_attr); + (void) wattrset(data->window, item_attr); /* color the month selection */ mvwprintw(data->window, 0, 0, "%s", nameOfMonth(month - 1)); wmove(data->window, 0, 0); return 0; @@ -314,13 +318,15 @@ draw_year(BOX * data, struct tm *current { int year = current->tm_year + 1900; - wattrset(data->parent, dialog_attr); /* Headline "Year" */ + (void) wattrset(data->parent, dialog_attr); /* Headline "Year" */ (void) mvwprintw(data->parent, data->y - 2, data->x - 1, _("Year")); - dlg_draw_box(data->parent, - data->y - 1, data->x - 1, - data->height + 2, data->width + 2, - menubox_border_attr, menubox_attr); /* borders of yearbox */ - wattrset(data->window, item_attr); /* color the year selection */ + dlg_draw_box2(data->parent, + data->y - 1, data->x - 1, + data->height + 2, data->width + 2, + menubox_attr, + menubox_border_attr, + menubox_border2_attr); + (void) wattrset(data->window, item_attr); /* color the year selection */ mvwprintw(data->window, 0, 0, "%4d", year); wmove(data->window, 0, 0); return 0; @@ -430,7 +436,7 @@ dialog_calendar(const char *title, WINDOW *dialog; time_t now_time = time((time_t *) 0); struct tm current; - int state = dlg_defaultno_button(); + int state = dlg_default_button(); const char **buttons = dlg_ok_labels(); char *prompt = dlg_strclone(subtitle); int mincols = MIN_WIDE; @@ -491,11 +497,11 @@ dialog_calendar(const char *title, dlg_register_buttons(dialog, "calendar", buttons); /* mainbox */ - dlg_draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr); - dlg_draw_bottom_box(dialog); + dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr); + dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr); dlg_draw_title(dialog, title); - wattrset(dialog, dialog_attr); /* text mainbox */ + (void) wattrset(dialog, dialog_attr); /* text mainbox */ dlg_print_autowrap(dialog, prompt, height, width); /* compute positions of day, month and year boxes */ @@ -539,6 +545,7 @@ dialog_calendar(const char *title, return CleanupResult(DLG_EXIT_ERROR, dialog, prompt, &save_vars); } + dlg_trace_win(dialog); while (result == DLG_EXIT_UNKNOWN) { BOX *obj = (state == sDAY ? &dy_box : (state == sMONTH ? &mn_box : Modified: vendor/dialog/dist/checklist.c ============================================================================== --- vendor/dialog/dist/checklist.c Sun Oct 21 13:42:38 2012 (r241815) +++ vendor/dialog/dist/checklist.c Sun Oct 21 18:18:09 2012 (r241816) @@ -1,9 +1,9 @@ /* - * $Id: checklist.c,v 1.127 2011/06/29 23:04:09 tom Exp $ + * $Id: checklist.c,v 1.135 2012/07/01 16:30:04 Zoltan.Kelemen Exp $ * * checklist.c -- implements the checklist box * - * Copyright 2000-2010,2011 Thomas E. Dickey + * Copyright 2000-2011,2012 Thomas E. Dickey * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License, version 2.1 @@ -58,7 +58,7 @@ print_arrows(WINDOW *win, box_x + list_width, box_y, box_y + list_height + 1, - menubox_attr, + menubox_border2_attr, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Oct 21 18:18: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 05B22715; Sun, 21 Oct 2012 18:18:50 +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 C6E428FC16; Sun, 21 Oct 2012 18:18: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 q9LIInap031131; Sun, 21 Oct 2012 18:18:49 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9LIInHB031130; Sun, 21 Oct 2012 18:18:49 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201210211818.q9LIInHB031130@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 21 Oct 2012 18:18:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r241817 - vendor/dialog/dialog-1.1-20120706 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2012 18:18:50 -0000 Author: nwhitehorn Date: Sun Oct 21 18:18:49 2012 New Revision: 241817 URL: http://svn.freebsd.org/changeset/base/241817 Log: Tag dialog-1.1-20120706 Added: vendor/dialog/dialog-1.1-20120706/ - copied from r241816, vendor/dialog/dist/ From owner-svn-src-all@FreeBSD.ORG Sun Oct 21 18:25: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 A2034B22; Sun, 21 Oct 2012 18:25:13 +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 802808FC0A; Sun, 21 Oct 2012 18:25: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 q9LIPDQI032373; Sun, 21 Oct 2012 18:25:13 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9LIPDRm032364; Sun, 21 Oct 2012 18:25:13 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201210211825.q9LIPDRm032364@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 21 Oct 2012 18:25:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241818 - in head: contrib/dialog contrib/dialog/package contrib/dialog/package/debian contrib/dialog/po contrib/dialog/samples contrib/dialog/samples/copifuncs gnu/lib/libdialog X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2012 18:25:13 -0000 Author: nwhitehorn Date: Sun Oct 21 18:25:12 2012 New Revision: 241818 URL: http://svn.freebsd.org/changeset/base/241818 Log: Update dialog to 20120706: includes minor useability enhancements and fixes for warnings encountered with clang. Added: head/contrib/dialog/samples/dft-cancel - copied unchanged from r241817, vendor/dialog/dist/samples/dft-cancel head/contrib/dialog/samples/dft-extra - copied unchanged from r241817, vendor/dialog/dist/samples/dft-extra head/contrib/dialog/samples/dft-help - copied unchanged from r241817, vendor/dialog/dist/samples/dft-help head/contrib/dialog/samples/dft-no - copied unchanged from r241817, vendor/dialog/dist/samples/dft-no head/contrib/dialog/samples/fselect0 - copied unchanged from r241817, vendor/dialog/dist/samples/fselect0 head/contrib/dialog/samples/with-dquotes - copied unchanged from r241817, vendor/dialog/dist/samples/with-dquotes head/contrib/dialog/samples/with-squotes - copied unchanged from r241817, vendor/dialog/dist/samples/with-squotes Deleted: head/contrib/dialog/samples/dselect head/contrib/dialog/samples/valgrind.log Modified: head/contrib/dialog/CHANGES head/contrib/dialog/VERSION head/contrib/dialog/aclocal.m4 head/contrib/dialog/arrows.c head/contrib/dialog/buttons.c head/contrib/dialog/calendar.c head/contrib/dialog/checklist.c head/contrib/dialog/columns.c head/contrib/dialog/configure head/contrib/dialog/configure.in head/contrib/dialog/dialog.1 head/contrib/dialog/dialog.3 head/contrib/dialog/dialog.c head/contrib/dialog/dialog.h head/contrib/dialog/dlg_colors.h head/contrib/dialog/dlg_keys.c head/contrib/dialog/dlg_keys.h head/contrib/dialog/editbox.c head/contrib/dialog/formbox.c head/contrib/dialog/fselect.c head/contrib/dialog/guage.c head/contrib/dialog/headers-sh.in head/contrib/dialog/inputbox.c head/contrib/dialog/inputstr.c head/contrib/dialog/makefile.in head/contrib/dialog/menubox.c head/contrib/dialog/mixedform.c head/contrib/dialog/mixedgauge.c head/contrib/dialog/msgbox.c head/contrib/dialog/package/debian/changelog head/contrib/dialog/package/dialog.spec head/contrib/dialog/pause.c head/contrib/dialog/po/cs.po head/contrib/dialog/po/el.po head/contrib/dialog/po/hr.po head/contrib/dialog/po/sr.po head/contrib/dialog/prgbox.c head/contrib/dialog/progressbox.c head/contrib/dialog/rc.c head/contrib/dialog/samples/copifuncs/admin.funcs head/contrib/dialog/samples/copifuncs/common.funcs head/contrib/dialog/samples/copifuncs/copi.funcs head/contrib/dialog/samples/copifuncs/copi.ifman2 head/contrib/dialog/samples/copifuncs/copi.ifpoll2 head/contrib/dialog/samples/copifuncs/copi.ifreq2 head/contrib/dialog/samples/copifuncs/copi.sendifm1 head/contrib/dialog/samples/copifuncs/copi.wheel head/contrib/dialog/samples/copismall head/contrib/dialog/samples/debian.rc head/contrib/dialog/samples/dialog.py head/contrib/dialog/samples/form1 head/contrib/dialog/samples/inputmenu head/contrib/dialog/samples/inputmenu-stdout head/contrib/dialog/samples/inputmenu1 head/contrib/dialog/samples/inputmenu2 head/contrib/dialog/samples/inputmenu3 head/contrib/dialog/samples/inputmenu4 head/contrib/dialog/samples/killall head/contrib/dialog/samples/prgbox head/contrib/dialog/samples/prgbox2 head/contrib/dialog/samples/report-button head/contrib/dialog/samples/report-edit head/contrib/dialog/samples/report-string head/contrib/dialog/samples/report-tempfile head/contrib/dialog/samples/report-yesno head/contrib/dialog/samples/setup-edit head/contrib/dialog/samples/setup-tempfile head/contrib/dialog/samples/setup-utf8 head/contrib/dialog/samples/setup-vars head/contrib/dialog/samples/slackware.rc head/contrib/dialog/samples/sourcemage.rc head/contrib/dialog/samples/suse.rc head/contrib/dialog/samples/tailboxbg head/contrib/dialog/samples/tailboxbg1 head/contrib/dialog/samples/tailboxbg2 head/contrib/dialog/samples/testdata-8bit head/contrib/dialog/samples/wheel head/contrib/dialog/samples/whiptail.rc head/contrib/dialog/tailbox.c head/contrib/dialog/textbox.c head/contrib/dialog/timebox.c head/contrib/dialog/trace.c head/contrib/dialog/ui_getc.c head/contrib/dialog/util.c head/contrib/dialog/yesno.c head/gnu/lib/libdialog/dlg_config.h Directory Properties: head/contrib/dialog/ (props changed) Modified: head/contrib/dialog/CHANGES ============================================================================== --- head/contrib/dialog/CHANGES Sun Oct 21 18:18:49 2012 (r241817) +++ head/contrib/dialog/CHANGES Sun Oct 21 18:25:12 2012 (r241818) @@ -1,9 +1,172 @@ --- $Id: CHANGES,v 1.360 2011/07/07 23:35:10 tom Exp $ +-- $Id: CHANGES,v 1.419 2012/07/06 18:18:48 tom Exp $ -- Thomas E. Dickey This version of dialog was originally from a Debian snapshot. I've done this to it: +2012/07/06 + + modify samples/setup-tempfile to work with Tru64's shell. + + modify inputmenu sample scripts to make them more portable: + + use "id" rather than "$GROUPS", use sed to work with Solaris. + + use sed to split-up the rename results to work with HPUX. + + fix regression in msgbox (ArchLinux #30574) + +2012/07/03 + + modify prgbox widget to work with --extra-button, etc. + + add case values to several widgets to allow for mouse-clicks with + "--extra-button" and "--help-button" additions. + + correct timebox widget's exit code for "--extra-button" when handing + the "enter" key. + + modify msgbox widget to honor "--extra-button". + + corrected processing of "--trace" option, which did not update the + index into command-line to point past its value. + + add a check in dialog program for valid characters used in option, + e.g., to generate an error if a script attempts to add option value + using "=" rather than with whitespace. + + add new command-line option --default-button and library function + dlg_default_button() to retrieve the value set by the option + to provide a way to set the default button directly rather than + by combining --nook, etc. (patch by Zoltan Kelemen). + + amend include of unctrl.h to apply only to the case where curses.h + is included, to avoid conflict of ncurses' unctrl.h with a system + implementation (report by Martin Roedlach) + + add limit-check to dlg_toupper() in non-wide curses mode to work + when non-character values such as arrow-key codes are passed to + it (patch by Zoltan Kelemen). + + override timeout value, e.g., as set via --timeout command-line + option in pause widget because that interferes with pause's behavior + (report by Jan Spitalnik). + + modify samples/inputmenu* to allow ":" in renamed text (report by + Andreas Stoewing). + + modify double-quoting to make it more consistent, i.e., checklist + output is quoted only when needed. This fixes the case where + single-quotes were used whether or not needed, but also modifies + older checklist behavior for double-quoting which always added those + (Debian #663664). + + correct exit-code used in inputmenu for "rename" button (Debian + #673041, forwarded from Ubuntu #333909, patch by Lebedev Vadim). + + update el.po and hr.po from + http://translationproject.org/latest/dialog/ + + use checkbashisms to clean up sample scripts. + +2012/02/15 + + modify menubox.c to use the same improvement as in checklist.c + + improve auto width computation for checklist widget by using + dlg_calc_list_width as in the non-auto case (Edho Arief). + + eliminate some bashisms in the sample scripts (Pedro Giffuni). + + makefile fixes from FreeBSD ports (Li-Wen Hsu): + + make --with-package option of configure script work. + + get LIBTOOL_VERSION from configure script, needed by + ${LIBTOOL_VERSION} in LIBTOOL_CREATE (LIB_CREATE in configure and + aclocal.m4) + + update cs.po and sr.po from + http://translationproject.org/latest/dialog/ + + updated configure script macros, improving CF_XOPEN_SOURCE among + other fixes. + +2011/10/20 + + fix --analyze warnings for clang versions 2.8, 2.9. + + add configure check for lint program. + + add check in dlg_getc() in case its window is freed as a side effect + of removing callbacks. + + fix logic in freeing subwindows (report by xDog Walker). + + fix a regression in logic distinguishing between inputmenu and menu + widgets (report by xDog Walker). + + minor fixes to library manpage. + +2011/10/18 + + modify header-sh.in to work around limit on sed script length on + HPUX. + + add a special case of parameter parsing for "--trace" to the + initialization done before calling init_dialog(), to allow users to + capture the initial state of the parameter list before any options + are processed and removed. This is only done if "--trace" is the + first option, otherwise it is handled in the common options as before + (report by xDog Walker). + + modify samples/testdata-8bit, discarding $1 from the parameter list + if it was used, so that the source'ing scripts can consistently use + "$@" to insert parameters before the widget, e.g., as an alternative + to using $DIALOGOPTS (report by xDog Walker). + + modify treatment of function pointers in menubox.c, make + dlg_renamed_menutext() and dlg_dummy_menutext() visible to library + users (request by xDog Walker). + + add dlg_count_real_columns(), use to modify centering for "--hline" + text to account for "\Z"s (report by xDog Walker). + + improve check in dlg_draw_arrows2() for conflict between the window + title and up-arrow marker to take into account that the given window + may not be the top-level window of the widget. + + change width of page up/down mouse areas in fselect panes to use the + full width of the panes rather than only the portion from the left + margin to the up/down arrow. + + add/use dlg_draw_box2() and dlg_draw_bottom_box2() to use the + secondary borders. + + modify rc-file read/write to accept/generate color values that refer + to previously-processed items in the color table. This reduces the + number of distinct colors that must be specified to set up a color + scheme. + + add color table entries for secondary borders, i.e., the ones that + are normally drawn with the dialog's text-colors (Debian #641168). + + modify fselect.c to scan the current directory if the input field + happens to be empty (Debian #640905). + + repeated the discussion of environment variables that can override + the exit-status values in the manpage's return-codes section + (Debian #642105). + + add an example to the manpage showing how to override the form + widget's keys used for field/button traversal (Debian #642108). + + modify call to dlg_register_window() in formbox.c so that the editing + bindings are attached to the form sub-window rather than the + top-level dialog window. Also change the name by which the editing + bindings are bound for editbox.c, fselect.c and inputbox.c, so that + the editing and navigation bindings can be different. + + correct logic in dlg_lookup_key() so that it matches the widget name + before using a binding from .dialogrc, allowing the inner/outer + windows of form and other editing widgets to have different bindings. + + modify dlg_register_window() to call dlg_dump_window_keys() after + its updates, via the --trace output, to supplement the manpage + description of key bindings (Debian #642108). + + add DLGK_FORM_PREV and DLGK_FORM_NEXT key-bindings to form.c, to + allow binding a single key to traverse both form-fields and buttons + (Debian #642108). + + modify dlg_parse_rc() to check for error return from + dlg_parse_bindkey(). + + add function dlg_dump_window_keys(), to help with debugging widgets. + + add CR, LF, TAB, FF and ESC to table of curses names to help make + key bindings more readable. + + update table of dialog key-names so that helpfile and trace are + dumped properly. + + correct dlg_dump_keys(), which was showing only the first item in + the matched binding table. + + save/restore window current position in dlg_update_mixedgauge(). + + pass return-code from pause_for_ok() from dlg_progressbox() when + pauseopt is set, rather than only DLG_OK. + + call setlocale() in init_dialog() rather than relying on on-demand + use within inputstr.c, since there are paths in textbox widget which + do not exercise the latter (report by xDog Walker). + + fix some places where checks for "\Z" were done without also checking + dialog_vars.colors (report by Moray Henderson). + + correct logic for DIALOGOPTS parsing so that the parse happens only + once unless memory leak checking is enabled (report by xDog Walker). + + remove an incorrect free() call in dlg_free_gauge() (report by xDog + Walker). + + modify dlg_trace_win() to log wide-characters (report by xDog Walker). + + make traces shorter by skipping repeated ERR's, but showing the + number skipped (report by xDog Walker). + + improve description in manpage to distinguish program box and + progress box from tailboxes (adapted from email by xDog Walker). + + modify dlg_trace_win() so that it looks for the topmost window in a + dialog. Because subwindows share space with the top window, tracing + the latter shows the whole widget (report by xDog Walker). + + expand tracing so that each window is traced before soliciting input, + making the ^T feature to print a window on demand partly redundant + (suggested by xDog Walker). + + cosmetic change in dialog.h to avoid "*/*" strings from comments next + to "*" (report by xDog Walker). + + ensure result from dlg_align_columns() has trailing null on each + string. Analysis was hindered by libc6's continuance of libc5's + early-1990s misfeature of clearing the result from malloc, noting + that libc6's documentation incorrectly claims that it does not do + this (report by xDog Walker). + 2011/07/07 + modify util.c to work better with old versions of ncurses: + suppress use of wchgat() before fix in 20060715 which is needed @@ -87,7 +250,7 @@ to it: + CF_XOPEN_SOURCE, workaround for cygwin to get ncurses' configure script to define _XOPEN_SOURCE_EXTENDED (cygwin's features.h doesn't do anything, so it needs a crutch). - + updated config.guess, config.sub + + update config.guess, config.sub 2011/03/02 + add --prgbox and --programbox (adapted from patch by David Boyd). @@ -155,7 +318,7 @@ to it: CF_ADD_LIBDIR for the curses-directory here, from CF_NCURSES_CPPFLAGS and CF_NCURSES_LDFLAGS, so it will work even with the default checking, e.g., no --with-ncurses, etc. - + updated config.guess, config.sub + + update config.guess, config.sub 2010/04/28 + several improvements to configure script: @@ -250,7 +413,7 @@ to it: libutf8 and libiconv. + update da.po, ru.po from http://translationproject.org/latest/dialog/ - + updated config.guess, config.sub + + update config.guess, config.sub 2008/08/19 + amend changes to quoting; by default, the checklist widget quotes its @@ -333,7 +496,7 @@ to it: ESC to be returned, quitting dialog (report by Reiner Huober). + add extern "C" declarations to dlg_keys.h so the corresponding function declarations are exported to C++ as C symbols. - + updated config.guess, config.sub + + update config.guess, config.sub 2007/06/04 + fix a memory leak in editbox.c @@ -436,7 +599,7 @@ to it: CF_CURSES_LIBS, CF_INCLUDE_DIRS, CF_LARGEFILE, CF_MAKEFLAGS, CF_PATH_SYNTAX, CF_SUBDIR_PATH, CF_SUBST, CF_WITH_DBMALLOC, CF_WITH_DMALLOC, CF_WITH_LIBTOOL and CF_XOPEN_SOURCE. - + updated config.guess, config.sub + + update config.guess, config.sub > adapted fixes from SuSE package (Werner Fink): + add some limit-checks in dlg_draw_shadow(). + make shadows resizable, using new dlg_move_window() in msgbox.c Modified: head/contrib/dialog/VERSION ============================================================================== --- head/contrib/dialog/VERSION Sun Oct 21 18:18:49 2012 (r241817) +++ head/contrib/dialog/VERSION Sun Oct 21 18:25:12 2012 (r241818) @@ -1 +1 @@ -10:0:0 1.1 20110707 +10:4:0 1.1 20120706 Modified: head/contrib/dialog/aclocal.m4 ============================================================================== --- head/contrib/dialog/aclocal.m4 Sun Oct 21 18:18:49 2012 (r241817) +++ head/contrib/dialog/aclocal.m4 Sun Oct 21 18:25:12 2012 (r241818) @@ -1,7 +1,7 @@ dnl macros used for DIALOG configure script -dnl $Id: aclocal.m4,v 1.82 2011/06/28 22:48:31 tom Exp $ +dnl $Id: aclocal.m4,v 1.87 2012/02/16 02:11:26 tom Exp $ dnl --------------------------------------------------------------------------- -dnl Copyright 1999-2010,2011 -- Thomas E. Dickey +dnl Copyright 1999-2011,2012 -- Thomas E. Dickey dnl dnl Permission is hereby granted, free of charge, to any person obtaining a dnl copy of this software and associated documentation files (the @@ -592,6 +592,31 @@ changequote([,])dnl AC_SUBST(GENCAT) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_ACVERSION_CHECK version: 2 updated: 2011/05/08 11:22:03 +dnl ------------------ +dnl Conditionally generate script according to whether we're using a given autoconf. +dnl +dnl $1 = version to compare against +dnl $2 = code to use if AC_ACVERSION is at least as high as $1. +dnl $3 = code to use if AC_ACVERSION is older than $1. +define(CF_ACVERSION_CHECK, +[ +ifdef([m4_version_compare], +[m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1, [$3], [$2])], +[CF_ACVERSION_COMPARE( +AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), +AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)), AC_ACVERSION, [$2], [$3])])])dnl +dnl --------------------------------------------------------------------------- +dnl CF_ACVERSION_COMPARE version: 2 updated: 2011/04/14 20:56:50 +dnl -------------------- +dnl CF_ACVERSION_COMPARE(MAJOR1, MINOR1, TERNARY1, +dnl MAJOR2, MINOR2, TERNARY2, +dnl PRINTABLE2, not FOUND, FOUND) +define(CF_ACVERSION_COMPARE, +[ifelse(builtin([eval], [$2 < $5]), 1, +[ifelse([$8], , ,[$8])], +[ifelse([$9], , ,[$9])])])dnl +dnl --------------------------------------------------------------------------- dnl CF_AC_PREREQ version: 2 updated: 1997/09/06 13:24:56 dnl ------------ dnl Conditionally generate script according to whether we're using the release @@ -1227,7 +1252,7 @@ fi AC_CHECK_HEADERS($cf_cv_ncurses_header) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_LIBS version: 34 updated: 2011/04/09 14:51:08 +dnl CF_CURSES_LIBS version: 35 updated: 2011/08/09 21:06:37 dnl -------------- dnl Look for the curses libraries. Older curses implementations may require dnl termcap/termlib to be linked as well. Call CF_CURSES_CPPFLAGS first. @@ -1307,7 +1332,7 @@ if test ".$ac_cv_func_initscr" != .yes ; # Check for library containing tgoto. Do this before curses library # because it may be needed to link the test-case for initscr. AC_CHECK_FUNC(tgoto,[cf_term_lib=predefined],[ - for cf_term_lib in $cf_check_list termcap termlib unknown + for cf_term_lib in $cf_check_list otermcap termcap termlib unknown do AC_CHECK_LIB($cf_term_lib,tgoto,[break]) done @@ -1533,6 +1558,30 @@ fi test "$cf_cv_curses_wacs_symbols" != no && AC_DEFINE(CURSES_WACS_SYMBOLS) ])dnl dnl --------------------------------------------------------------------------- +dnl CF_CURSES_WGETPARENT version: 2 updated: 2011/10/17 20:12:04 +dnl -------------------- +dnl Check for curses support for directly determining the parent of a given +dnl window. Some implementations make this difficult, so we provide for +dnl defining an application-specific function that gives this functionality. +dnl +dnl $1 = name of function to use if the feature is missing +AC_DEFUN([CF_CURSES_WGETPARENT],[ +CF_CURSES_FUNCS(wgetparent) +if test "x$cf_cv_func_wgetparent" != xyes +then + AC_MSG_CHECKING(if WINDOW has _parent member) + AC_TRY_COMPILE([#include <${cf_cv_ncurses_header:-curses.h}>], + [WINDOW *p = stdscr->_parent], + [cf_window__parent=yes], + [cf_window__parent=no]) + AC_MSG_RESULT($cf_window__parent) + if test "$cf_window__parent" = yes + then + AC_DEFINE(HAVE_WINDOW__PARENT) + fi +fi +])dnl +dnl --------------------------------------------------------------------------- dnl CF_DIRNAME version: 4 updated: 2002/12/21 19:25:52 dnl ---------- dnl "dirname" is not portable, so we fake it with a shell script. @@ -2337,7 +2386,7 @@ ifdef([AC_FUNC_FSEEKO],[ ]) ]) dnl --------------------------------------------------------------------------- -dnl CF_LD_RPATH_OPT version: 4 updated: 2011/06/04 20:09:13 +dnl CF_LD_RPATH_OPT version: 5 updated: 2011/07/17 14:48:41 dnl --------------- dnl For the given system and compiler, find the compiler flags to pass to the dnl loader to use the "rpath" feature. @@ -2361,7 +2410,7 @@ linux*|gnu*|k*bsd*-gnu) #(vi openbsd[[2-9]].*|mirbsd*) #(vi LD_RPATH_OPT="-Wl,-rpath," ;; -freebsd*) #(vi +dragonfly*|freebsd*) #(vi LD_RPATH_OPT="-rpath " ;; netbsd*) #(vi @@ -2420,11 +2469,11 @@ CF_SUBDIR_PATH($1,$2,lib) $1="$cf_library_path_list [$]$1" ])dnl dnl --------------------------------------------------------------------------- -dnl CF_LIB_PREFIX version: 8 updated: 2008/09/13 11:34:16 +dnl CF_LIB_PREFIX version: 9 updated: 2012/01/21 19:28:10 dnl ------------- dnl Compute the library-prefix for the given host system dnl $1 = variable to set -AC_DEFUN([CF_LIB_PREFIX], +define([CF_LIB_PREFIX], [ case $cf_cv_system_name in #(vi OS/2*|os2*) #(vi @@ -2645,7 +2694,7 @@ printf("old\n"); ,[$1=no]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_NCURSES_CONFIG version: 8 updated: 2010/07/08 05:17:30 +dnl CF_NCURSES_CONFIG version: 9 updated: 2011/11/26 15:42:05 dnl ----------------- dnl Tie together the configure-script macros for ncurses. dnl Prefer the "-config" script from ncurses 6.x, to simplify analysis. @@ -2657,7 +2706,10 @@ AC_DEFUN([CF_NCURSES_CONFIG], cf_ncuconfig_root=ifelse($1,,ncurses,$1) echo "Looking for ${cf_ncuconfig_root}-config" -AC_PATH_PROGS(NCURSES_CONFIG,${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config,none) + +CF_ACVERSION_CHECK(2.52, + [AC_CHECK_TOOLS(NCURSES_CONFIG, ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config, none)], + [AC_PATH_PROGS(NCURSES_CONFIG, ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config, none)]) if test "$NCURSES_CONFIG" != none ; then @@ -3171,6 +3223,14 @@ AC_SUBST(PROG_EXT) test -n "$PROG_EXT" && AC_DEFINE_UNQUOTED(PROG_EXT,"$PROG_EXT") ])dnl dnl --------------------------------------------------------------------------- +dnl CF_PROG_LINT version: 2 updated: 2009/08/12 04:43:14 +dnl ------------ +AC_DEFUN([CF_PROG_LINT], +[ +AC_CHECK_PROGS(LINT, tdlint lint alint splint lclint) +AC_SUBST(LINT_OPTS) +])dnl +dnl --------------------------------------------------------------------------- dnl CF_REMOVE_DEFINE version: 3 updated: 2010/01/09 11:05:50 dnl ---------------- dnl Remove all -U and -D options that refer to the given symbol from a list @@ -3418,6 +3478,45 @@ ncursesw/term.h) esac ])dnl dnl --------------------------------------------------------------------------- +dnl CF_TRY_XOPEN_SOURCE version: 1 updated: 2011/10/30 17:09:50 +dnl ------------------- +dnl If _XOPEN_SOURCE is not defined in the compile environment, check if we +dnl can define it successfully. +AC_DEFUN([CF_TRY_XOPEN_SOURCE],[ +AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[ + AC_TRY_COMPILE([ +#include +#include +#include +],[ +#ifndef _XOPEN_SOURCE +make an error +#endif], + [cf_cv_xopen_source=no], + [cf_save="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" + AC_TRY_COMPILE([ +#include +#include +#include +],[ +#ifdef _XOPEN_SOURCE +make an error +#endif], + [cf_cv_xopen_source=no], + [cf_cv_xopen_source=$cf_XOPEN_SOURCE]) + CPPFLAGS="$cf_save" + ]) +]) + +if test "$cf_cv_xopen_source" != no ; then + CF_REMOVE_DEFINE(CFLAGS,$CFLAGS,_XOPEN_SOURCE) + CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,_XOPEN_SOURCE) + cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source" + CF_ADD_CFLAGS($cf_temp_xopen_source) +fi +]) +dnl --------------------------------------------------------------------------- dnl CF_UNION_WAIT version: 5 updated: 1997/11/23 14:49:44 dnl ------------- dnl Check to see if the BSD-style union wait is declared. Some platforms may @@ -3680,7 +3779,7 @@ if test "$with_dmalloc" = yes ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_LIBTOOL version: 27 updated: 2011/06/28 18:45:38 +dnl CF_WITH_LIBTOOL version: 28 updated: 2011/07/02 15:40:32 dnl --------------- dnl Provide a configure option to incorporate libtool. Define several useful dnl symbols for the makefile rules. @@ -3781,7 +3880,7 @@ ifdef([AC_PROG_LIBTOOL],[ # special hack to add -no-undefined (which libtool should do for itself) LT_UNDEF= case "$cf_cv_system_name" in #(vi - cygwin*|mingw32*|uwin*|aix[[456]]) #(vi + cygwin*|mingw32*|uwin*|aix[[4-7]]) #(vi LT_UNDEF=-no-undefined ;; esac @@ -3950,7 +4049,7 @@ AC_TRY_LINK([ test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED" ])dnl dnl --------------------------------------------------------------------------- -dnl CF_XOPEN_SOURCE version: 35 updated: 2011/02/20 20:37:37 +dnl CF_XOPEN_SOURCE version: 42 updated: 2012/01/07 08:26:49 dnl --------------- dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions, dnl or adapt to the vendor's definitions to get equivalent functionality, @@ -3966,7 +4065,7 @@ cf_POSIX_C_SOURCE=ifelse([$2],,199506L,[ cf_xopen_source= case $host_os in #(vi -aix[[456]]*) #(vi +aix[[4-7]]*) #(vi cf_xopen_source="-D_ALL_SOURCE" ;; cygwin) #(vi @@ -3977,6 +4076,7 @@ darwin[[0-8]].*) #(vi ;; darwin*) #(vi cf_xopen_source="-D_DARWIN_C_SOURCE" + cf_XOPEN_SOURCE= ;; freebsd*|dragonfly*) #(vi # 5.x headers associate @@ -3994,15 +4094,23 @@ hpux*) #(vi ;; irix[[56]].*) #(vi cf_xopen_source="-D_SGI_SOURCE" + cf_XOPEN_SOURCE= ;; linux*|gnu*|mint*|k*bsd*-gnu) #(vi CF_GNU_SOURCE ;; mirbsd*) #(vi - # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks + # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks and other headers which use u_int / u_short types + cf_XOPEN_SOURCE= + CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE) ;; netbsd*) #(vi - # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw + cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw + ;; +openbsd[[4-9]]*) #(vi + # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw + cf_xopen_source="-D_BSD_SOURCE" + cf_XOPEN_SOURCE=600 ;; openbsd*) #(vi # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw @@ -4016,36 +4124,11 @@ nto-qnx*) #(vi sco*) #(vi # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer ;; -solaris2.1[[0-9]]) #(vi - cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" - ;; -solaris2.[[1-9]]) #(vi +solaris2.*) #(vi cf_xopen_source="-D__EXTENSIONS__" ;; *) - AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[ - AC_TRY_COMPILE([#include ],[ -#ifndef _XOPEN_SOURCE -make an error -#endif], - [cf_cv_xopen_source=no], - [cf_save="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" - AC_TRY_COMPILE([#include ],[ -#ifdef _XOPEN_SOURCE -make an error -#endif], - [cf_cv_xopen_source=no], - [cf_cv_xopen_source=$cf_XOPEN_SOURCE]) - CPPFLAGS="$cf_save" - ]) -]) - if test "$cf_cv_xopen_source" != no ; then - CF_REMOVE_DEFINE(CFLAGS,$CFLAGS,_XOPEN_SOURCE) - CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,_XOPEN_SOURCE) - cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source" - CF_ADD_CFLAGS($cf_temp_xopen_source) - fi + CF_TRY_XOPEN_SOURCE CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE) ;; esac @@ -4053,6 +4136,35 @@ esac if test -n "$cf_xopen_source" ; then CF_ADD_CFLAGS($cf_xopen_source) fi + +dnl In anything but the default case, we may have system-specific setting +dnl which is still not guaranteed to provide all of the entrypoints that +dnl _XOPEN_SOURCE would yield. +if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then + AC_MSG_CHECKING(if _XOPEN_SOURCE really is set) + AC_TRY_COMPILE([#include ],[ +#ifndef _XOPEN_SOURCE +make an error +#endif], + [cf_XOPEN_SOURCE_set=yes], + [cf_XOPEN_SOURCE_set=no]) + AC_MSG_RESULT($cf_XOPEN_SOURCE_set) + if test $cf_XOPEN_SOURCE_set = yes + then + AC_TRY_COMPILE([#include ],[ +#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE +make an error +#endif], + [cf_XOPEN_SOURCE_set_ok=yes], + [cf_XOPEN_SOURCE_set_ok=no]) + if test $cf_XOPEN_SOURCE_set_ok = no + then + AC_MSG_WARN(_XOPEN_SOURCE is lower than requested) + fi + else + CF_TRY_XOPEN_SOURCE + fi +fi ]) dnl --------------------------------------------------------------------------- dnl CF__CURSES_HEAD version: 2 updated: 2010/10/23 15:54:49 Modified: head/contrib/dialog/arrows.c ============================================================================== --- head/contrib/dialog/arrows.c Sun Oct 21 18:18:49 2012 (r241817) +++ head/contrib/dialog/arrows.c Sun Oct 21 18:25:12 2012 (r241818) @@ -1,5 +1,5 @@ /* - * $Id: arrows.c,v 1.36 2011/06/27 09:13:56 tom Exp $ + * $Id: arrows.c,v 1.41 2011/10/20 23:37:17 tom Exp $ * * arrows.c -- draw arrows to indicate end-of-range for lists * @@ -79,9 +79,9 @@ dlg_draw_helpline(WINDOW *win, bool deco const int *cols = dlg_index_columns(dialog_vars.help_line); int other = decorations ? (ON_LEFT + ON_RIGHT) : 0; int avail = (getmaxx(win) - other - 2); - int limit = dlg_limit_columns(dialog_vars.help_line, avail, 0); + int limit = dlg_count_real_columns(dialog_vars.help_line) + 2; - if (limit > 0) { + if (limit < avail) { getyx(win, cur_y, cur_x); other = decorations ? ON_LEFT : 0; (void) wmove(win, bottom, other + (avail - limit) / 2); @@ -107,13 +107,14 @@ dlg_draw_arrows2(WINDOW *win, int cur_x, cur_y; int limit_x = getmaxx(win); bool draw_top = TRUE; + bool is_toplevel = (wgetparent(win) == stdscr); getyx(win, cur_y, cur_x); /* * If we're drawing a centered title, do not overwrite with the arrows. */ - if (dialog_vars.title) { + if (dialog_vars.title && is_toplevel && (top - getbegy(win)) < MARGIN) { int have = (limit_x - dlg_count_columns(dialog_vars.title)) / 2; int need = x + 5; if (need > have) @@ -123,11 +124,11 @@ dlg_draw_arrows2(WINDOW *win, if (draw_top) { (void) wmove(win, top, x); if (top_arrow) { - wattrset(win, merge_colors(uarrow_attr, attr)); + (void) wattrset(win, merge_colors(uarrow_attr, attr)); (void) add_acs(win, ACS_UARROW); (void) waddstr(win, "(-)"); } else { - wattrset(win, attr); + (void) wattrset(win, attr); (void) whline(win, dlg_boxchar(ACS_HLINE), ON_LEFT); } } @@ -135,11 +136,11 @@ dlg_draw_arrows2(WINDOW *win, (void) wmove(win, bottom, x); if (bottom_arrow) { - wattrset(win, merge_colors(darrow_attr, attr)); + (void) wattrset(win, merge_colors(darrow_attr, attr)); (void) add_acs(win, ACS_DARROW); (void) waddstr(win, "(+)"); } else { - wattrset(win, borderattr); + (void) wattrset(win, borderattr); (void) whline(win, dlg_boxchar(ACS_HLINE), ON_LEFT); } mouse_mkbutton(bottom, x - 1, 6, KEY_NPAGE); @@ -147,7 +148,7 @@ dlg_draw_arrows2(WINDOW *win, (void) wmove(win, cur_y, cur_x); wrefresh(win); - wattrset(win, save); + (void) wattrset(win, save); } void @@ -166,14 +167,13 @@ dlg_draw_scrollbar(WINDOW *win, char buffer[80]; int percent; int len; - int oldy, oldx, maxy, maxx; + int oldy, oldx; chtype save = dlg_get_attrs(win); int top_arrow = (first_data != 0); int bottom_arrow = (next_data < total_data); getyx(win, oldy, oldx); - getmaxyx(win, maxy, maxx); dlg_draw_helpline(win, TRUE); if (bottom_arrow || top_arrow || dialog_state.use_scrollbar) { @@ -187,12 +187,12 @@ dlg_draw_scrollbar(WINDOW *win, else if (percent > 100) percent = 100; - wattrset(win, position_indicator_attr); + (void) wattrset(win, position_indicator_attr); (void) sprintf(buffer, "%d%%", percent); (void) wmove(win, bottom, right - 7); (void) waddstr(win, buffer); if ((len = dlg_count_columns(buffer)) < 4) { - wattrset(win, border_attr); + (void) wattrset(win, border_attr); whline(win, dlg_boxchar(ACS_HLINE), 4 - len); } } @@ -212,7 +212,7 @@ dlg_draw_scrollbar(WINDOW *win, if (bar_high < all_high) { wmove(win, top + 1, right); - wattrset(win, save); + (void) wattrset(win, save); wvline(win, ACS_VLINE | A_REVERSE, all_high); bar_y = BARSIZE(this_data); @@ -221,7 +221,7 @@ dlg_draw_scrollbar(WINDOW *win, wmove(win, top + 1 + bar_y, right); - wattrset(win, position_indicator_attr); + (void) wattrset(win, position_indicator_attr); wattron(win, A_REVERSE); wvline(win, ACS_BLOCK, bar_high); } @@ -236,7 +236,7 @@ dlg_draw_scrollbar(WINDOW *win, attr, borderattr); - wattrset(win, save); + (void) wattrset(win, save); wmove(win, oldy, oldx); } @@ -255,6 +255,6 @@ dlg_draw_arrows(WINDOW *win, x, top, bottom, - menubox_attr, + menubox_border2_attr, menubox_border_attr); } Modified: head/contrib/dialog/buttons.c ============================================================================== --- head/contrib/dialog/buttons.c Sun Oct 21 18:18:49 2012 (r241817) +++ head/contrib/dialog/buttons.c Sun Oct 21 18:25:12 2012 (r241818) @@ -1,9 +1,9 @@ /* - * $Id: buttons.c,v 1.86 2011/06/28 10:46:46 tom Exp $ + * $Id: buttons.c,v 1.90 2012/07/01 20:42:05 tom Exp $ * * buttons.c -- draw buttons, e.g., OK/Cancel * - * Copyright 2000-2010,2011 Thomas E. Dickey + * Copyright 2000-2011,2012 Thomas E. Dickey * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License, version 2.1 @@ -104,11 +104,11 @@ print_button(WINDOW *win, char *label, i : button_label_inactive_attr); (void) wmove(win, y, x); - wattrset(win, selected - ? button_active_attr - : button_inactive_attr); + (void) wattrset(win, selected + ? button_active_attr + : button_inactive_attr); (void) waddstr(win, "<"); - wattrset(win, label_attr); + (void) wattrset(win, label_attr); for (i = 0; i < limit; ++i) { int first = indx[i]; int last = indx[i + 1]; @@ -120,14 +120,14 @@ print_button(WINDOW *win, char *label, i const char *temp = (label + first); int cmp = string_to_char(&temp); if (dlg_isupper(cmp)) { - wattrset(win, key_attr); + (void) wattrset(win, key_attr); state = 1; } break; } #endif if (dlg_isupper(UCH(label[first]))) { - wattrset(win, key_attr); + (void) wattrset(win, key_attr); state = 1; } break; @@ -138,9 +138,9 @@ print_button(WINDOW *win, char *label, i } waddnstr(win, label + first, last - first); } - wattrset(win, selected - ? button_active_attr - : button_inactive_attr); + (void) wattrset(win, selected + ? button_active_attr + : button_inactive_attr); (void) waddstr(win, ">"); (void) wmove(win, y, x + ((int) strspn(label, " ")) + 1); } @@ -310,7 +310,7 @@ dlg_draw_buttons(WINDOW *win, (void) wmove(win, final_y, final_x); wrefresh(win); free(buffer); - wattrset(win, save); + (void) wattrset(win, save); } /* @@ -488,10 +488,12 @@ dlg_exit_buttoncode(int button) const char ** dlg_ok_label(void) { - static const char *labels[3]; + static const char *labels[4]; int n = 0; labels[n++] = my_ok_label(); + if (dialog_vars.extra_button) + labels[n++] = my_extra_label(); if (dialog_vars.help_button) labels[n++] = my_help_label(); labels[n] = 0; @@ -537,6 +539,7 @@ dlg_ok_buttoncode(int button) } else if (dialog_vars.help_button && (button == n)) { result = DLG_EXIT_HELP; } + dlg_trace_msg("# dlg_ok_buttoncode(%d) = %d\n", button, result); return result; } @@ -575,7 +578,7 @@ dlg_prev_ok_buttonindex(int current, int /* * Find the button-index for the "OK" or "Cancel" button, according to * whether --defaultno is given. If --nocancel was given, we always return - * the index for "OK". + * the index for the first button (usually "OK" unless --nook was used). */ int dlg_defaultno_button(void) @@ -586,6 +589,30 @@ dlg_defaultno_button(void) while (dlg_ok_buttoncode(result) != DLG_EXIT_CANCEL) ++result; } + dlg_trace_msg("# dlg_defaultno_button() = %d\n", result); + return result; +} + +/* + * Find the button-index for a button named with --default-button. If the + * option was not specified, or if the selected button does not exist, return + * the index of the first button (usually "OK" unless --nook was used). + */ +int +dlg_default_button(void) +{ + int i, n; + int result = 0; + + if (dialog_vars.default_button >= 0) { + for (i = 0; (n = dlg_ok_buttoncode(i)) >= 0; i++) { + if (n == dialog_vars.default_button) { + result = i; + break; + } + } + } + dlg_trace_msg("# dlg_default_button() = %d\n", result); return result; } Modified: head/contrib/dialog/calendar.c ============================================================================== --- head/contrib/dialog/calendar.c Sun Oct 21 18:18:49 2012 (r241817) +++ head/contrib/dialog/calendar.c Sun Oct 21 18:25:12 2012 (r241818) @@ -1,9 +1,9 @@ /* - * $Id: calendar.c,v 1.62 2011/06/29 09:47:06 tom Exp $ + * $Id: calendar.c,v 1.66 2012/07/01 18:13:07 Zoltan.Kelemen Exp $ * * calendar.c -- implements the calendar box * - * Copyright 2001-2010,2011 Thomas E. Dickey + * Copyright 2001-2011,2012 Thomas E. Dickey * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License, version 2.1 @@ -225,12 +225,14 @@ draw_day(BOX * data, struct tm *current) int prev = days_in_month(current, -1); werase(data->window); - dlg_draw_box(data->parent, - data->y - MARGIN, data->x - MARGIN, - data->height + (2 * MARGIN), data->width + (2 * MARGIN), - menubox_border_attr, menubox_attr); /* border of daybox */ + dlg_draw_box2(data->parent, + data->y - MARGIN, data->x - MARGIN, + data->height + (2 * MARGIN), data->width + (2 * MARGIN), + menubox_attr, + menubox_border_attr, + menubox_border2_attr); - wattrset(data->window, menubox_attr); /* daynames headline */ + (void) wattrset(data->window, menubox_attr); /* daynames headline */ for (x = 0; x < 7; x++) { mvwprintw(data->window, 0, (x + 1) * cell_wide, "%*.*s ", @@ -246,7 +248,7 @@ draw_day(BOX * data, struct tm *current) week = (current->tm_yday + 6 + mday - current->tm_mday) / 7; for (y = 1; mday < last; y++) { - wattrset(data->window, menubox_attr); /* weeknumbers headline */ + (void) wattrset(data->window, menubox_attr); /* weeknumbers headline */ mvwprintw(data->window, y, 0, "%*d ", @@ -257,9 +259,9 @@ draw_day(BOX * data, struct tm *current) ++mday; if (wmove(data->window, y, this_x) == ERR) continue; - wattrset(data->window, item_attr); /* not selected days */ + (void) wattrset(data->window, item_attr); /* not selected days */ if (mday == day) { - wattrset(data->window, item_selected_attr); /* selected day */ + (void) wattrset(data->window, item_selected_attr); /* selected day */ save_y = y; save_x = this_x; } @@ -294,13 +296,15 @@ draw_month(BOX * data, struct tm *curren month = current->tm_mon + 1; - wattrset(data->parent, dialog_attr); /* Headline "Month" */ + (void) wattrset(data->parent, dialog_attr); /* Headline "Month" */ (void) mvwprintw(data->parent, data->y - 2, data->x - 1, _("Month")); - dlg_draw_box(data->parent, - data->y - 1, data->x - 1, - data->height + 2, data->width + 2, - menubox_border_attr, menubox_attr); /* borders of monthbox */ - wattrset(data->window, item_attr); /* color the month selection */ + dlg_draw_box2(data->parent, + data->y - 1, data->x - 1, + data->height + 2, data->width + 2, + menubox_attr, + menubox_border_attr, + menubox_border2_attr); + (void) wattrset(data->window, item_attr); /* color the month selection */ mvwprintw(data->window, 0, 0, "%s", nameOfMonth(month - 1)); wmove(data->window, 0, 0); return 0; @@ -314,13 +318,15 @@ draw_year(BOX * data, struct tm *current { int year = current->tm_year + 1900; - wattrset(data->parent, dialog_attr); /* Headline "Year" */ + (void) wattrset(data->parent, dialog_attr); /* Headline "Year" */ (void) mvwprintw(data->parent, data->y - 2, data->x - 1, _("Year")); - dlg_draw_box(data->parent, - data->y - 1, data->x - 1, - data->height + 2, data->width + 2, - menubox_border_attr, menubox_attr); /* borders of yearbox */ - wattrset(data->window, item_attr); /* color the year selection */ + dlg_draw_box2(data->parent, + data->y - 1, data->x - 1, + data->height + 2, data->width + 2, + menubox_attr, + menubox_border_attr, + menubox_border2_attr); + (void) wattrset(data->window, item_attr); /* color the year selection */ mvwprintw(data->window, 0, 0, "%4d", year); wmove(data->window, 0, 0); return 0; @@ -430,7 +436,7 @@ dialog_calendar(const char *title, WINDOW *dialog; time_t now_time = time((time_t *) 0); struct tm current; - int state = dlg_defaultno_button(); + int state = dlg_default_button(); const char **buttons = dlg_ok_labels(); char *prompt = dlg_strclone(subtitle); int mincols = MIN_WIDE; @@ -491,11 +497,11 @@ dialog_calendar(const char *title, dlg_register_buttons(dialog, "calendar", buttons); /* mainbox */ - dlg_draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr); - dlg_draw_bottom_box(dialog); + dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr); + dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr); dlg_draw_title(dialog, title); - wattrset(dialog, dialog_attr); /* text mainbox */ + (void) wattrset(dialog, dialog_attr); /* text mainbox */ dlg_print_autowrap(dialog, prompt, height, width); /* compute positions of day, month and year boxes */ @@ -539,6 +545,7 @@ dialog_calendar(const char *title, return CleanupResult(DLG_EXIT_ERROR, dialog, prompt, &save_vars); } + dlg_trace_win(dialog); while (result == DLG_EXIT_UNKNOWN) { BOX *obj = (state == sDAY ? &dy_box : (state == sMONTH ? &mn_box : Modified: head/contrib/dialog/checklist.c ============================================================================== --- head/contrib/dialog/checklist.c Sun Oct 21 18:18:49 2012 (r241817) +++ head/contrib/dialog/checklist.c Sun Oct 21 18:25:12 2012 (r241818) @@ -1,9 +1,9 @@ /* - * $Id: checklist.c,v 1.127 2011/06/29 23:04:09 tom Exp $ + * $Id: checklist.c,v 1.135 2012/07/01 16:30:04 Zoltan.Kelemen Exp $ * * checklist.c -- implements the checklist box * - * Copyright 2000-2010,2011 Thomas E. Dickey + * Copyright 2000-2011,2012 Thomas E. Dickey * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License, version 2.1 @@ -58,7 +58,7 @@ print_arrows(WINDOW *win, box_x + list_width, box_y, box_y + list_height + 1, - menubox_attr, + menubox_border2_attr, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Oct 21 21:47: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 9CDB2EBF; Sun, 21 Oct 2012 21:47:59 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7777B8FC08; Sun, 21 Oct 2012 21:47: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 q9LLlxBw063507; Sun, 21 Oct 2012 21:47:59 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9LLlxDL063504; Sun, 21 Oct 2012 21:47:59 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201210212147.q9LLlxDL063504@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 21 Oct 2012 21:47:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241819 - stable/9/usr.bin/touch X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2012 21:47:59 -0000 Author: jilles Date: Sun Oct 21 21:47:58 2012 New Revision: 241819 URL: http://svn.freebsd.org/changeset/base/241819 Log: MFC r236852: touch: Add the -d option from POSIX.1-2008. This is much like -t but with a different format which is ISO8601-like and allows fractions of a second. The precision is limited to microseconds because of utimes() and friends, even though stat() returns nanoseconds. Modified: stable/9/usr.bin/touch/touch.1 stable/9/usr.bin/touch/touch.c Directory Properties: stable/9/usr.bin/touch/ (props changed) Modified: stable/9/usr.bin/touch/touch.1 ============================================================================== --- stable/9/usr.bin/touch/touch.1 Sun Oct 21 18:25:12 2012 (r241818) +++ stable/9/usr.bin/touch/touch.1 Sun Oct 21 21:47:58 2012 (r241819) @@ -31,7 +31,7 @@ .\" @(#)touch.1 8.3 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd April 28, 1995 +.Dd June 10, 2012 .Dt TOUCH 1 .Os .Sh NAME @@ -43,6 +43,7 @@ .Op Fl acfhm .Op Fl r Ar file .Op Fl t Ar [[CC]YY]MMDDhhmm[.SS] +.Op Fl d Ar YYYY-MM-DDThh:mm:SS[.frac][tz] .Ar .Sh DESCRIPTION The @@ -61,8 +62,10 @@ individually. Selecting both is equivalent to the default. By default, the timestamps are set to the current time. The +.Fl d +and .Fl t -flag explicitly specifies a different time, and the +flags explicitly specify a different time, and the .Fl r flag specifies to set the times those of the specified file. The @@ -112,6 +115,41 @@ No error messages are displayed and the .It Fl f Attempt to force the update, even if the file permissions do not currently permit it. +.It Fl d +Change the access and modification times to the specified time instead +of the current time of day. +The argument is of the form +.Dq YYYY-MM-DDThh:mm:SS[.frac][tz] +where the letters represent the following: +.Bl -tag -width Ds -compact -offset indent +.It Ar YYYY +The year. +.It Ar MM +The month of the year, from 01 to 12. +.It Ar DD +The day of the month, from 01 to 31. +.It Ar T +The letter +.Li T +or a space. +.It Ar hh +The hour of the day, from 00 to 23. +.It Ar mm +The minute of the hour, from 00 to 59. +.It Ar SS +The second of the minute, from 00 to 61. +.It Ar .frac +An optional fraction, +consisting of a period or a comma followed by one or more digits. +The number of significant digits depends on the kernel configuration and +the filesystem, and may be zero. +.It Ar tz +An optional letter +.Li Z +indicating the time is in +.Tn UTC . +Otherwise, the time is assumed to be in local time. +.El .It Fl h If the file is a symbolic link, change the times of the link itself rather than the file that the link points to. Modified: stable/9/usr.bin/touch/touch.c ============================================================================== --- stable/9/usr.bin/touch/touch.c Sun Oct 21 18:25:12 2012 (r241818) +++ stable/9/usr.bin/touch/touch.c Sun Oct 21 21:47:58 2012 (r241819) @@ -45,6 +45,7 @@ static const char sccsid[] = "@(#)touch. #include #include +#include #include #include #include @@ -58,6 +59,7 @@ static const char sccsid[] = "@(#)touch. int rw(char *, struct stat *, int); void stime_arg1(char *, struct timeval *); void stime_arg2(char *, int, struct timeval *); +void stime_darg(char *, struct timeval *); void stime_file(char *, struct timeval *); int timeoffset(char *); void usage(char *); @@ -80,7 +82,7 @@ main(int argc, char *argv[]) if (gettimeofday(&tv[0], NULL)) err(1, "gettimeofday"); - while ((ch = getopt(argc, argv, "A:acfhmr:t:")) != -1) + while ((ch = getopt(argc, argv, "A:acd:fhmr:t:")) != -1) switch(ch) { case 'A': Aflag = timeoffset(optarg); @@ -91,6 +93,10 @@ main(int argc, char *argv[]) case 'c': cflag = 1; break; + case 'd': + timeset = 1; + stime_darg(optarg, tv); + break; case 'f': fflag = 1; break; @@ -327,6 +333,50 @@ stime_arg2(char *arg, int year, struct t tvp[0].tv_usec = tvp[1].tv_usec = 0; } +void +stime_darg(char *arg, struct timeval *tvp) +{ + struct tm t = { .tm_sec = 0 }; + const char *fmt, *colon; + char *p; + int val, isutc = 0; + + tvp[0].tv_usec = 0; + t.tm_isdst = -1; + colon = strchr(arg, ':'); + if (colon == NULL || strchr(colon + 1, ':') == NULL) + goto bad; + fmt = strchr(arg, 'T') != NULL ? "%Y-%m-%dT%H:%M:%S" : + "%Y-%m-%d %H:%M:%S"; + p = strptime(arg, fmt, &t); + if (p == NULL) + goto bad; + /* POSIX: must have at least one digit after dot */ + if ((*p == '.' || *p == ',') && isdigit((unsigned char)p[1])) { + p++; + val = 100000; + while (isdigit((unsigned char)*p)) { + tvp[0].tv_usec += val * (*p - '0'); + p++; + val /= 10; + } + } + if (*p == 'Z') { + isutc = 1; + p++; + } + if (*p != '\0') + goto bad; + + tvp[0].tv_sec = isutc ? timegm(&t) : mktime(&t); + + tvp[1] = tvp[0]; + return; + +bad: + errx(1, "out of range or illegal time specification: YYYY-MM-DDThh:mm:SS[.frac][tz]"); +} + /* Calculate a time offset in seconds, given an arg of the format [-]HHMMSS. */ int timeoffset(char *arg) @@ -420,7 +470,9 @@ err: rval = 1; void usage(char *myname) { - fprintf(stderr, "usage:\n" "%s [-A [-][[hh]mm]SS] [-acfhm] [-r file] " - "[-t [[CC]YY]MMDDhhmm[.SS]] file ...\n", myname); + fprintf(stderr, "usage: %s [-A [-][[hh]mm]SS] [-acfhm] [-r file] " + "[-t [[CC]YY]MMDDhhmm[.SS]]\n" + " [-d YYYY-MM-DDThh:mm:SS[.frac][tz]] " + "file ...\n", myname); exit(1); } From owner-svn-src-all@FreeBSD.ORG Sun Oct 21 22:24: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 43987ABC; Sun, 21 Oct 2012 22:24:29 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F6C28FC17; Sun, 21 Oct 2012 22:24: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 q9LMOSEO069253; Sun, 21 Oct 2012 22:24:28 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9LMOSgw069251; Sun, 21 Oct 2012 22:24:28 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201210212224.q9LMOSgw069251@svn.freebsd.org> From: Rui Paulo Date: Sun, 21 Oct 2012 22:24:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241820 - head/sys/powerpc/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2012 22:24:29 -0000 Author: rpaulo Date: Sun Oct 21 22:24:28 2012 New Revision: 241820 URL: http://svn.freebsd.org/changeset/base/241820 Log: Add a config file for the Wii. Added: head/sys/powerpc/conf/WII (contents, props changed) Added: head/sys/powerpc/conf/WII ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/conf/WII Sun Oct 21 22:24:28 2012 (r241820) @@ -0,0 +1,115 @@ +# +# GENERIC -- Generic kernel configuration file for the Nintendo Wii. +# +# $FreeBSD$ + +cpu AIM +ident WII +machine powerpc powerpc + +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols + +options WII + +options SCHED_ULE #ULE scheduler +options PREEMPTION #Enable kernel thread preemption +options INET #InterNETworking +options INET6 #IPv6 communications protocols +options SCTP #Stream Control Transmission Protocol +options FFS #Berkeley Fast Filesystem +options SOFTUPDATES #Enable FFS soft updates support +options UFS_ACL #Support for access control lists +options UFS_DIRHASH #Improve performance on big directories +options UFS_GJOURNAL #Enable gjournal-based UFS journaling +options MD_ROOT #MD is a potential root device +options NFSCL #New Network Filesystem Client +options NFSD #New Network Filesystem Server +options NFSLOCKD #Network Lock Manager +options NFS_ROOT #NFS usable as root device +options MSDOSFS #MSDOS Filesystem +options CD9660 #ISO 9660 Filesystem +options PROCFS #Process filesystem (requires PSEUDOFS) +options PSEUDOFS #Pseudo-filesystem framework +options GEOM_PART_GPT #GUID Partition Tables. +options GEOM_LABEL #Provides labelization +options COMPAT_FREEBSD4 #Keep this for a while +options COMPAT_FREEBSD5 #Compatible with FreeBSD5 +options COMPAT_FREEBSD6 #Compatible with FreeBSD6 +options COMPAT_FREEBSD7 #Compatible with FreeBSD7 +options SCSI_DELAY=5000 #Delay (in ms) before probing SCSI +options KTRACE #ktrace(1) syscall trace support +options STACK #stack(9) support +options SYSVSHM #SYSV-style shared memory +options SYSVMSG #SYSV-style message queues +options SYSVSEM #SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +#options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) +options AUDIT # Security event auditing +options CAPABILITY_MODE # Capsicum capability mode +options CAPABILITIES # Capsicum capabilities +options MAC # TrustedBSD MAC Framework +options INCLUDE_CONFIG_FILE # Include this file in kernel + +# Debugging support. Always need this: +options KDB # Enable kernel debugger support. +# For minimum debugger support (stable branch) use: +options KDB_TRACE # Print a stack trace for a panic. +# For full debugger support use this instead: +options DDB #Support DDB +#options DEADLKRES #Enable the deadlock resolver +options INVARIANTS #Enable calls of extra sanity checking +options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +options WITNESS #Enable checks to detect deadlocks and cycles +options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones + +# ATA/SCSI peripherals +device scbus # SCSI bus (required for ATA/SCSI) +device da # Direct Access (disks) + +# syscons is the default console driver, resembling an SCO console +device sc +device kbdmux +options SC_DFLT_FONT # compile font in +makeoptions SC_DFLT_FONT=cp437 + +# Pseudo devices. +device loop # Network loopback +device random # Entropy device +device ether # Ethernet support +device vlan # 802.1Q VLAN support +device tun # Packet tunnel. +device md # Memory "disks" +device gif # IPv6 and IPv4 tunneling +device faith # IPv6-to-IPv4 relaying/(translation) +device firmware # firmware assist module + + +# The `bpf' device enables the Berkeley Packet Filter. +# Be aware of the administrative consequences of enabling this! +# Note that 'bpf' is required for DHCP. +device bpf #Berkeley packet filter + +# USB support +options USB_DEBUG # enable debug msgs +device uhci # UHCI PCI->USB interface +device ohci # OHCI PCI->USB interface +device ehci # EHCI PCI->USB interface +device usb # USB Bus (required) +device uhid # "Human Interface Devices" +device ukbd # Keyboard +options KBD_INSTALL_CDEV # install a CDEV entry in /dev +device ulpt # Printer +device umass # Disks/Mass storage - Requires scbus and da0 +device ums # Mouse +# USB Ethernet +device miibus # MII bus support +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 + +# GPIO +device gpio +device wiigpio From owner-svn-src-all@FreeBSD.ORG Sun Oct 21 22:27: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 A3019C4A; Sun, 21 Oct 2012 22:27:22 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 72B3D8FC12; Sun, 21 Oct 2012 22:27: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 q9LMRMEW069782; Sun, 21 Oct 2012 22:27:22 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9LMRMSn069780; Sun, 21 Oct 2012 22:27:22 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201210212227.q9LMRMSn069780@svn.freebsd.org> From: Rui Paulo Date: Sun, 21 Oct 2012 22:27:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241821 - head/sys/powerpc/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2012 22:27:22 -0000 Author: rpaulo Date: Sun Oct 21 22:27:21 2012 New Revision: 241821 URL: http://svn.freebsd.org/changeset/base/241821 Log: Fix the top comment. Modified: head/sys/powerpc/conf/WII Modified: head/sys/powerpc/conf/WII ============================================================================== --- head/sys/powerpc/conf/WII Sun Oct 21 22:24:28 2012 (r241820) +++ head/sys/powerpc/conf/WII Sun Oct 21 22:27:21 2012 (r241821) @@ -1,5 +1,5 @@ # -# GENERIC -- Generic kernel configuration file for the Nintendo Wii. +# Custom kernel for the Nintendo Wii. # # $FreeBSD$ From owner-svn-src-all@FreeBSD.ORG Sun Oct 21 22:27: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 DB85CDC9; Sun, 21 Oct 2012 22:27:55 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C3ADD8FC16; Sun, 21 Oct 2012 22:27: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 q9LMRt44069922; Sun, 21 Oct 2012 22:27:55 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9LMRt97069920; Sun, 21 Oct 2012 22:27:55 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201210212227.q9LMRt97069920@svn.freebsd.org> From: Rui Paulo Date: Sun, 21 Oct 2012 22:27:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241822 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 21 Oct 2012 22:27:55 -0000 Author: rpaulo Date: Sun Oct 21 22:27:55 2012 New Revision: 241822 URL: http://svn.freebsd.org/changeset/base/241822 Log: Make the Wii GPIO driver a separate device. Modified: head/sys/conf/files.powerpc Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Sun Oct 21 22:27:21 2012 (r241821) +++ head/sys/conf/files.powerpc Sun Oct 21 22:27:55 2012 (r241822) @@ -232,7 +232,7 @@ powerpc/wii/platform_wii.c optional wii powerpc/wii/wii_bus.c optional wii powerpc/wii/wii_pic.c optional wii powerpc/wii/wii_fb.c optional wii -powerpc/wii/wii_gpio.c optional wii +powerpc/wii/wii_gpio.c optional wiigpio powerpc/wii/wii_ipc.c optional wii compat/freebsd32/freebsd32_ioctl.c optional compat_freebsd32 From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 01:18: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 7CCED961; Mon, 22 Oct 2012 01:18:42 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5E9C18FC08; Mon, 22 Oct 2012 01:18: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 q9M1IgAN098892; Mon, 22 Oct 2012 01:18:42 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M1Ifh5098857; Mon, 22 Oct 2012 01:18:41 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201210220118.q9M1Ifh5098857@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 22 Oct 2012 01:18:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241823 - in head: . etc etc/atf etc/mtree lib lib/atf lib/atf/libatf-c lib/atf/libatf-c++ libexec libexec/atf libexec/atf/atf-check share share/atf share/doc share/doc/atf share/exampl... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 01:18:42 -0000 Author: marcel Date: Mon Oct 22 01:18:41 2012 New Revision: 241823 URL: http://svn.freebsd.org/changeset/base/241823 Log: Add ATF to the build. This is may be a bit rought around the egdes, but committing it helps to get everyone on the same page and makes sure we make progress. Tinderbox breakages that are the result of this commit are entirely the committer's fault -- in other words: buildworld testing on amd64 only. Credits follow: Submitted by: Garrett Cooper Sponsored by: Isilon Systems Based on work by: keramida@ Thanks to: gnn@, mdf@, mlaier@, sjg@ Special thanks to: keramida@ Added: head/etc/atf/ head/etc/atf/FreeBSD.conf (contents, props changed) head/etc/atf/Makefile (contents, props changed) head/etc/atf/common.conf (contents, props changed) head/lib/atf/ head/lib/atf/Makefile (contents, props changed) head/lib/atf/Makefile.inc (contents, props changed) head/lib/atf/libatf-c/ head/lib/atf/libatf-c++/ head/lib/atf/libatf-c++/Makefile (contents, props changed) head/lib/atf/libatf-c/Makefile (contents, props changed) head/libexec/atf/ head/libexec/atf/Makefile (contents, props changed) head/libexec/atf/Makefile.inc (contents, props changed) head/libexec/atf/atf-check/ head/libexec/atf/atf-check/Makefile (contents, props changed) head/share/atf/ head/share/atf/Makefile (contents, props changed) head/share/doc/atf/ head/share/doc/atf/Makefile (contents, props changed) head/share/examples/atf/ head/share/examples/atf/Makefile (contents, props changed) head/share/mk/bsd.progs.mk (contents, props changed) head/share/xml/ head/share/xml/Makefile (contents, props changed) head/share/xml/Makefile.inc (contents, props changed) head/share/xml/atf/ head/share/xml/atf/Makefile (contents, props changed) head/share/xsl/ head/share/xsl/Makefile (contents, props changed) head/share/xsl/Makefile.inc (contents, props changed) head/share/xsl/atf/ head/share/xsl/atf/Makefile (contents, props changed) head/tools/build/options/WITHOUT_ATF (contents, props changed) head/usr.bin/atf/ head/usr.bin/atf/Makefile (contents, props changed) head/usr.bin/atf/Makefile.inc (contents, props changed) head/usr.bin/atf/atf-config/ head/usr.bin/atf/atf-config/Makefile (contents, props changed) head/usr.bin/atf/atf-report/ head/usr.bin/atf/atf-report/Makefile (contents, props changed) head/usr.bin/atf/atf-run/ head/usr.bin/atf/atf-run/Makefile (contents, props changed) head/usr.bin/atf/atf-sh/ head/usr.bin/atf/atf-sh/Makefile (contents, props changed) head/usr.bin/atf/atf-version/ head/usr.bin/atf/atf-version/Makefile (contents, props changed) Modified: head/Makefile.inc1 head/etc/Makefile head/etc/group head/etc/master.passwd head/etc/mtree/BSD.include.dist head/etc/mtree/BSD.root.dist head/etc/mtree/BSD.usr.dist head/lib/Makefile head/libexec/Makefile head/share/Makefile head/share/doc/Makefile head/share/examples/Makefile head/share/man/man1/Makefile head/share/man/man4/Makefile head/share/man/man5/Makefile head/share/man/man7/Makefile head/share/mk/bsd.libnames.mk head/share/mk/bsd.own.mk head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.bin/Makefile Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sun Oct 21 22:27:55 2012 (r241822) +++ head/Makefile.inc1 Mon Oct 22 01:18:41 2012 (r241823) @@ -1285,6 +1285,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 ${_kerberos5_lib_libhx509} ${_kerberos5_lib_libkrb5} \ ${_kerberos5_lib_libroken} \ ${_kerberos5_lib_libwind} \ + ${_lib_atf_libatf_c} \ lib/libbz2 ${_libcom_err} lib/libcrypt \ lib/libexpat \ ${_lib_libgssapi} ${_lib_libipx} \ @@ -1297,6 +1298,10 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 ${_secure_lib_libcrypto} ${_secure_lib_libssh} \ ${_secure_lib_libssl} +.if ${MK_ATF} != "no" +_lib_atf_libatf_c= lib/atf/libatf-c +.endif + .if ${MK_LIBTHR} != "no" _lib_libthr= lib/libthr .endif Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Sun Oct 21 22:27:55 2012 (r241822) +++ head/etc/Makefile Mon Oct 22 01:18:41 2012 (r241823) @@ -198,6 +198,9 @@ distribution: .endif pwd_mkdb ${PWD_MKDB_ENDIAN} -i -p -d ${DESTDIR}/etc \ ${DESTDIR}/etc/master.passwd +.if ${MK_ATF} != "no" + ${_+_}cd ${.CURDIR}/atf; ${MAKE} install +.endif .if ${MK_BLUETOOTH} != "no" ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install .endif Added: head/etc/atf/FreeBSD.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/atf/FreeBSD.conf Mon Oct 22 01:18:41 2012 (r241823) @@ -0,0 +1,12 @@ +# $FreeBSD$ +Content-Type: application/X-atf-config; version="1" + +# +# Configuration file for the FreeBSD test suite. +# +# See atf-formats(5) for details on the syntax of this file and tests(7) for +# details on the FreeBSD test suite. +# + +#variable1 = value1 +#variable2 = value2 Added: head/etc/atf/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/atf/Makefile Mon Oct 22 01:18:41 2012 (r241823) @@ -0,0 +1,39 @@ +#- +# Copyright (c) 2011 Google, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE 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$ + +ATF= ${.CURDIR}/../../contrib/atf + +.PATH: ${ATF}/atf-run/sample + +NO_OBJ= + +FILESGROUPS= ETC + +ETCDIR= /etc/atf +ETC= FreeBSD.conf atf-run.hooks common.conf + +.include Added: head/etc/atf/common.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/atf/common.conf Mon Oct 22 01:18:41 2012 (r241823) @@ -0,0 +1,12 @@ +# $FreeBSD$ +Content-Type: application/X-atf-config; version="1" + +# +# Sample configuration file for properties affecting all test suites. +# + +# When running the test suite as root, some tests require to switch to +# an unprivileged user to perform extra checks. Set this variable to +# the user you want to use in those cases. If not set, those tests will +# be skipped. +unprivileged-user = "_atf" Modified: head/etc/group ============================================================================== --- head/etc/group Sun Oct 21 22:27:55 2012 (r241822) +++ head/etc/group Mon Oct 22 01:18:41 2012 (r241823) @@ -16,6 +16,7 @@ staff:*:20: sshd:*:22: smmsp:*:25: mailnull:*:26: +_atf:*:27: guest:*:31: bind:*:53: proxy:*:62: Modified: head/etc/master.passwd ============================================================================== --- head/etc/master.passwd Sun Oct 21 22:27:55 2012 (r241822) +++ head/etc/master.passwd Mon Oct 22 01:18:41 2012 (r241823) @@ -13,6 +13,7 @@ man:*:9:9::0:0:Mister Man Pages:/usr/sha sshd:*:22:22::0:0:Secure Shell Daemon:/var/empty:/usr/sbin/nologin smmsp:*:25:25::0:0:Sendmail Submission User:/var/spool/clientmqueue:/usr/sbin/nologin mailnull:*:26:26::0:0:Sendmail Default User:/var/spool/mqueue:/usr/sbin/nologin +_atf:*:27:27::0:0:& pseudo-user:/nonexistent:/usr/sbin/nologin bind:*:53:53::0:0:Bind Sandbox:/:/usr/sbin/nologin proxy:*:62:62::0:0:Packet Filter pseudo-user:/nonexistent:/usr/sbin/nologin _pflogd:*:64:64::0:0:pflogd privsep user:/var/empty:/usr/sbin/nologin Modified: head/etc/mtree/BSD.include.dist ============================================================================== --- head/etc/mtree/BSD.include.dist Sun Oct 21 22:27:55 2012 (r241822) +++ head/etc/mtree/BSD.include.dist Mon Oct 22 01:18:41 2012 (r241823) @@ -9,6 +9,10 @@ .. arpa .. + atf-c + .. + atf-c++ + .. bsm .. bsnmp Modified: head/etc/mtree/BSD.root.dist ============================================================================== --- head/etc/mtree/BSD.root.dist Sun Oct 21 22:27:55 2012 (r241822) +++ head/etc/mtree/BSD.root.dist Mon Oct 22 01:18:41 2012 (r241823) @@ -24,6 +24,8 @@ etc X11 .. + atf + .. bluetooth .. defaults Modified: head/etc/mtree/BSD.usr.dist ============================================================================== --- head/etc/mtree/BSD.usr.dist Sun Oct 21 22:27:55 2012 (r241822) +++ head/etc/mtree/BSD.usr.dist Mon Oct 22 01:18:41 2012 (r241823) @@ -58,6 +58,8 @@ sbin .. share + atf + .. calendar de_DE.ISO8859-1 .. @@ -77,6 +79,8 @@ doc IPv6 .. + atf + .. atm .. bind9 @@ -211,6 +215,8 @@ .. IPv6 .. + atf + .. bootforth .. csh @@ -1324,6 +1330,14 @@ catalog .. .. + xml + atf + .. + .. + xsl + atf + .. + .. zoneinfo Africa .. @@ -1361,4 +1375,6 @@ .. src nochange .. + tests + .. .. Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Sun Oct 21 22:27:55 2012 (r241822) +++ head/lib/Makefile Mon Oct 22 01:18:41 2012 (r241823) @@ -118,6 +118,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ libwrap \ liby \ libz \ + ${_atf} \ ${_bind} \ ${_clang} @@ -133,6 +134,10 @@ _csu=csu # NB: keep these sorted by MK_* knobs +.if ${MK_ATF} != "no" +_atf= atf +.endif + .if ${MK_ATM} != "no" _libngatm= libngatm .endif Added: head/lib/atf/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/atf/Makefile Mon Oct 22 01:18:41 2012 (r241823) @@ -0,0 +1,36 @@ +#- +# Copyright (c) 2011 Google, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE 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$ + +.include + +SUBDIR= \ + libatf-c \ + libatf-c++ + +.ORDER: ${SUBDIR} + +.include Added: head/lib/atf/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/atf/Makefile.inc Mon Oct 22 01:18:41 2012 (r241823) @@ -0,0 +1,54 @@ +#- +# Copyright (c) 2011 Google, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE 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$ + +ATF= ${.CURDIR}/../../../contrib/atf + +_CFLAGS:= ${CFLAGS} +_CPPFLAGS:= ${CPPFLAGS} +_CXXFLAGS:= ${CXXFLAGS} + +CFLAGS+= -DHAVE_CONFIG_H +CFLAGS+= -DATF_ARCH='"${MACHINE}"' +CFLAGS+= -DATF_BUILD_CC='"${CC}"' +CFLAGS+= -DATF_BUILD_CFLAGS='"${_CFLAGS}"' +CFLAGS+= -DATF_BUILD_CPP='"${CPP}"' +CFLAGS+= -DATF_BUILD_CPPFLAGS='"${_CPPFLAGS}"' +CFLAGS+= -DATF_BUILD_CXX='"${CXX}"' +CFLAGS+= -DATF_BUILD_CXXFLAGS='"${_CXXFLAGS}"' +CFLAGS+= -DATF_CONFDIR='"${CONFDIR}/atf"' +CFLAGS+= -DATF_INCLUDEDIR='"${INCLUDEDIR}"' +CFLAGS+= -DATF_LIBDIR='"${LIBDIR}"' +CFLAGS+= -DATF_LIBEXECDIR='"${LIBEXECDIR}"' +CFLAGS+= -DATF_MACHINE='"${MACHINE_ARCH}"' +CFLAGS+= -DATF_M4='"/usr/bin/m4"' +CFLAGS+= -DATF_PKGDATADIR='"${SHAREDIR}/atf"' +CFLAGS+= -DATF_SHELL='"/bin/sh"' +CFLAGS+= -DATF_WORKDIR='"/tmp"' + +WARNS?= 3 + +# vim: syntax=make Added: head/lib/atf/libatf-c++/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/atf/libatf-c++/Makefile Mon Oct 22 01:18:41 2012 (r241823) @@ -0,0 +1,74 @@ +#- +# Copyright (c) 2011 Google, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE 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$ + +.include + +LIB= atf-c++ +SHLIB_MAJOR= 1 + +# libatf-c++ depends on the C version of the ATF library to build. +DPADD= ${LIBATFC} +LDADD= -L${.OBJDIR}/../libatf-c -latf-c + +.PATH: ${ATF} +.PATH: ${ATF}/atf-c++ +.PATH: ${ATF}/atf-c++/detail + +CFLAGS+= -I${ATF} +CFLAGS+= -I${.CURDIR}/../libatf-c +CFLAGS+= -I. + +CFLAGS+= -DHAVE_CONFIG_H + +SRCS= application.cpp \ + build.cpp \ + check.cpp \ + config.cpp \ + env.cpp \ + exceptions.cpp \ + expand.cpp \ + fs.cpp \ + parser.cpp \ + process.cpp \ + tests.cpp \ + text.cpp \ + ui.cpp + +INCS= build.hpp \ + check.hpp \ + config.hpp \ + macros.hpp \ + tests.hpp \ + utils.hpp +INCSDIR= ${INCLUDEDIR}/atf-c++ + +INCS+= atf-c++.hpp +INCSDIR_atf-c++.hpp= ${INCLUDEDIR} + +MAN= atf-c++-api.3 + +.include Added: head/lib/atf/libatf-c/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/atf/libatf-c/Makefile Mon Oct 22 01:18:41 2012 (r241823) @@ -0,0 +1,76 @@ +#- +# Copyright (c) 2011 Google, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE 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$ + +.include + +LIB= atf-c +SHLIB_MAJOR= 1 + +.PATH: ${ATF} +.PATH: ${ATF}/atf-c +.PATH: ${ATF}/atf-c/detail + +CFLAGS+= -I${ATF} +CFLAGS+= -I${.CURDIR} +CFLAGS+= -I. + +SRCS= build.c \ + check.c \ + config.c \ + dynstr.c \ + env.c \ + error.c \ + fs.c \ + list.c \ + map.c \ + process.c \ + sanity.c \ + text.c \ + user.c \ + utils.c \ + tc.c \ + tp.c \ + tp_main.c + +INCS= build.h \ + check.h \ + config.h \ + defs.h \ + error.h \ + error_fwd.h \ + macros.h \ + tc.h \ + tp.h \ + utils.h +INCSDIR= ${INCLUDEDIR}/atf-c + +INCS+= atf-c.h +INCSDIR_atf-c.h= ${INCLUDEDIR} + +MAN= atf-c-api.3 + +.include Modified: head/libexec/Makefile ============================================================================== --- head/libexec/Makefile Sun Oct 21 22:27:55 2012 (r241822) +++ head/libexec/Makefile Mon Oct 22 01:18:41 2012 (r241823) @@ -3,7 +3,8 @@ .include -SUBDIR= ${_atrun} \ +SUBDIR= ${_atf} \ + ${_atrun} \ bootpd \ ${_comsat} \ fingerd \ @@ -32,6 +33,10 @@ SUBDIR= ${_atrun} \ ulog-helper \ ${_ypxfr} +.if ${MK_ATF} != "no" +_atf= atf +.endif + .if ${MK_AT} != "no" _atrun= atrun .endif Added: head/libexec/atf/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/atf/Makefile Mon Oct 22 01:18:41 2012 (r241823) @@ -0,0 +1,30 @@ +#- +# Copyright (c) 2011 Google, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE 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$ + +SUBDIR= atf-check + +.include Added: head/libexec/atf/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/atf/Makefile.inc Mon Oct 22 01:18:41 2012 (r241823) @@ -0,0 +1,32 @@ +#- +# Copyright (c) 2011 Google, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE 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$ + +ATF = ${.CURDIR}/../../../contrib/atf + +CFLAGS+= -DHAVE_CONFIG_H + +WARNS?= 3 Added: head/libexec/atf/atf-check/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/libexec/atf/atf-check/Makefile Mon Oct 22 01:18:41 2012 (r241823) @@ -0,0 +1,45 @@ +#- +# Copyright (c) 2011 Google, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE 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$ + +.include + +.PATH: ${ATF}/atf-sh + +BINDIR= /usr/libexec +PROG_CXX= atf-check +SRCS= atf-check.cpp +MAN= atf-check.1 + +CFLAGS+= -I${ATF} + +DPADD+= ${LIBATF_CXX} ${LIBATF_C} + +LDFLAGS+= -L${.OBJDIR}/../../../lib/atf/libatf-c++ +LDFLAGS+= -L${.OBJDIR}/../../../lib/atf/libatf-c +LDADD+= -latf-c++ -latf-c + +.include Modified: head/share/Makefile ============================================================================== --- head/share/Makefile Sun Oct 21 22:27:55 2012 (r241822) +++ head/share/Makefile Mon Oct 22 01:18:41 2012 (r241823) @@ -5,7 +5,8 @@ # Do not include `info' in the SUBDIR list, it is handled separately. -SUBDIR= ${_colldef} \ +SUBDIR= ${_atf} \ + ${_colldef} \ ${_dict} \ ${_doc} \ dtrace \ @@ -26,10 +27,16 @@ SUBDIR= ${_colldef} \ tabset \ termcap \ ${_timedef} \ + xml \ + xsl \ ${_zoneinfo} # NB: keep these sorted by MK_* knobs +.if ${MK_ATF} != "no" +_atf= atf +.endif + .if ${MK_BSNMP} != "no" _snmp= snmp .endif Added: head/share/atf/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/atf/Makefile Mon Oct 22 01:18:41 2012 (r241823) @@ -0,0 +1,37 @@ +#- +# Copyright (c) 2012 EMC Corporation. +# 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$ + +ATF= ${.CURDIR}/../../contrib/atf + +.PATH: ${ATF}/atf-run/sample + +NO_OBJ= + +FILESDIR= ${SHAREDIR}/atf +FILES= atf-run.hooks + +.include Modified: head/share/doc/Makefile ============================================================================== --- head/share/doc/Makefile Sun Oct 21 22:27:55 2012 (r241822) +++ head/share/doc/Makefile Mon Oct 22 01:18:41 2012 (r241823) @@ -3,7 +3,16 @@ .include -SUBDIR= ${_bind9} IPv6 legal ${_llvm} ${_roffdocs} +SUBDIR= ${_IPv6} \ + ${_atf} \ + ${_bind9} \ + legal \ + ${_llvm} \ + ${_roffdocs} + +.if ${MK_ATF} != "no" +_atf= atf +.endif .if ${MK_BIND} != "no" _bind9= bind9 @@ -13,6 +22,10 @@ _bind9= bind9 _llvm= llvm .endif +.if ${MK_INET6} != "no" +_IPv6= IPv6 +.endif + # FIXME this is not a real solution ... .if ${MK_GROFF} != "no" _roffdocs= papers psd smm usd Added: head/share/doc/atf/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/doc/atf/Makefile Mon Oct 22 01:18:41 2012 (r241823) @@ -0,0 +1,39 @@ +#- +# Copyright (c) 2011 Google, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE 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$ + +ATF= ${.CURDIR}/../../../contrib/atf +.PATH: ${ATF} +.PATH: ${ATF}/doc + +NO_OBJ= + +FILESGROUPS= TOP + +TOPDIR= ${SHAREDIR}/doc/atf +TOP= AUTHORS COPYING NEWS README + +.include Modified: head/share/examples/Makefile ============================================================================== --- head/share/examples/Makefile Sun Oct 21 22:27:55 2012 (r241822) +++ head/share/examples/Makefile Mon Oct 22 01:18:41 2012 (r241823) @@ -242,6 +242,9 @@ etc-examples: .endif .if ${SHARED} != "symlinks" +.if ${MK_ATF} != "no" +SUBDIR+=atf +.endif .if ${MK_IPFILTER} != "no" SUBDIR+=ipfilter .endif Added: head/share/examples/atf/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/examples/atf/Makefile Mon Oct 22 01:18:41 2012 (r241823) @@ -0,0 +1,39 @@ +#- +# Copyright (c) 2011 Google, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE 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$ + +ATF= ${.CURDIR}/../../../contrib/atf + +.PATH: ${ATF}/atf-report +.PATH: ${ATF}/atf-run/sample + +NO_OBJ= + +FILESDIR= ${SHAREDIR}/examples/atf +FILES= atf-run.hooks \ + tests-results.css + +.include Modified: head/share/man/man1/Makefile ============================================================================== --- head/share/man/man1/Makefile Sun Oct 21 22:27:55 2012 (r241822) +++ head/share/man/man1/Makefile Mon Oct 22 01:18:41 2012 (r241823) @@ -1,8 +1,16 @@ # @(#)Makefile 8.1 (Berkeley) 6/5/93 # $FreeBSD$ +.include + MAN= builtin.1 intro.1 +.if ${MK_ATF} != "no" +ATF= ${.CURDIR}/../../../contrib/atf +.PATH: ${ATF}/doc +MAN+= atf-test-program.1 +.endif + # Create MLINKS for Shell built in commands for which there are no userland # utilities of the same name: MLINKS= builtin.1 alias.1 \ Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Sun Oct 21 22:27:55 2012 (r241822) +++ head/share/man/man4/Makefile Mon Oct 22 01:18:41 2012 (r241823) @@ -60,6 +60,7 @@ MAN= aac.4 \ atkbd.4 \ atkbdc.4 \ ${_atp.4} \ + ${_atf_test_case.4} \ ${_atrtc.4} \ ${_attimer.4} \ audit.4 \ @@ -805,6 +806,12 @@ _nvram2env.4= nvram2env.4 SUBDIR= man4.${MACHINE_CPUARCH} .endif +.if ${MK_ATF} != "no" +ATF= ${.CURDIR}/../../../contrib/atf +.PATH: ${ATF}/doc +_atf_test_case.4= atf-test-case.4 +.endif + .if ${MK_PF} != "no" _pf.4= pf.4 _pflog.4= pflog.4 Modified: head/share/man/man5/Makefile ============================================================================== --- head/share/man/man5/Makefile Sun Oct 21 22:27:55 2012 (r241822) +++ head/share/man/man5/Makefile Mon Oct 22 01:18:41 2012 (r241823) @@ -6,6 +6,7 @@ #MISSING: dump.5 plot.5 MAN= acct.5 \ ar.5 \ + ${_atf_formats.5} \ a.out.5 \ bluetooth.device.conf.5 \ bluetooth.hosts.5 \ @@ -80,6 +81,12 @@ MLINKS+=quota.user.5 quota.group.5 MLINKS+=rc.conf.5 rc.conf.local.5 MLINKS+=resolver.5 resolv.conf.5 +.if ${MK_ATF} != "no" +ATF= ${.CURDIR}/../../../contrib/atf +.PATH: ${ATF}/doc +_atf_formats.5= atf-formats.5 +.endif + .if ${MK_HESIOD} != "no" MAN+= hesiod.conf.5 .endif Modified: head/share/man/man7/Makefile ============================================================================== --- head/share/man/man7/Makefile Sun Oct 21 22:27:55 2012 (r241822) +++ head/share/man/man7/Makefile Mon Oct 22 01:18:41 2012 (r241823) @@ -1,6 +1,8 @@ # @(#)Makefile 8.1 (Berkeley) 6/5/93 # $FreeBSD$ +.include + #MISSING: eqnchar.7 ms.7 term.7 MAN= adding_user.7 \ ascii.7 \ @@ -34,4 +36,17 @@ MLINKS+= c99.7 c78.7 MLINKS+= c99.7 c89.7 MLINKS+= c99.7 c90.7 +.if ${MK_ATF} != "no" +ATF= ${.CURDIR}/../../../contrib/atf +.PATH: ${ATF}/doc +MAN+= atf.7 + +CLEANFILES+= atf.7 atf.7.tmp +atf.7: atf.7.in + sed -e 's,__DOCDIR__,${DOCDIR}/atf,g' \ + -e 's,__TESTSDIR__,${TESTSBASE},g' \ + < ${.ALLSRC} > ${.TARGET}.tmp + mv ${.TARGET}.tmp ${.TARGET} +.endif + .include Modified: head/share/mk/bsd.libnames.mk ============================================================================== --- head/share/mk/bsd.libnames.mk Sun Oct 21 22:27:55 2012 (r241822) +++ head/share/mk/bsd.libnames.mk Mon Oct 22 01:18:41 2012 (r241823) @@ -13,6 +13,8 @@ LIBCRT0?= ${DESTDIR}${LIBDIR}/crt0.o LIBALIAS?= ${DESTDIR}${LIBDIR}/libalias.a LIBARCHIVE?= ${DESTDIR}${LIBDIR}/libarchive.a LIBASN1?= ${DESTDIR}${LIBDIR}/libasn1.a +LIBATF_C?= ${DESTDIR}${LIBDIR}/libatf-c.a +LIBATF_CXX?= ${DESTDIR}${LIBDIR}/libatf-c++.a LIBATM?= ${DESTDIR}${LIBDIR}/libatm.a LIBAUDITD?= ${DESTDIR}${LIBDIR}/libauditd.a LIBAVL?= ${DESTDIR}${LIBDIR}/libavl.a Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Sun Oct 21 22:27:55 2012 (r241822) +++ head/share/mk/bsd.own.mk Mon Oct 22 01:18:41 2012 (r241823) @@ -306,6 +306,7 @@ __DEFAULT_YES_OPTIONS = \ APM \ ASSERT_DEBUG \ AT \ + ATF \ ATM \ AUDIT \ AUTHPF \ Added: head/share/mk/bsd.progs.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/mk/bsd.progs.mk Mon Oct 22 01:18:41 2012 (r241823) @@ -0,0 +1,350 @@ +# from: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91 +# $FreeBSD$ + +.include + +.SUFFIXES: .out .o .c .cc .cpp .cxx .C .m .y .l .ln .s .S .asm + +.if ${MK_MAN} == "no" +NO_MAN= +.endif + +# Legacy knobs +.if defined(PROG) || defined(PROG_CXX) +. if defined(PROG) +PROGS= ${PROG} +. endif +. if defined(PROG_CXX) +PROGS= ${PROG_CXX} +PROGS_CXX= ${PROG_CXX} +. endif +# Loop once to keep pattern and avoid namespace pollution +. for _P in ${PROGS} +. if defined(INTERNALPROG) +INTERNALPROG.${_P}= +. endif +. if !defined(NO_MAN) +. if defined(MAN) +MAN.${_P}= ${MAN} +. else +. for sect in 1 1aout 2 3 4 5 6 7 8 9 +. if defined(MAN${sect}) +MAN.${_P}= ${MAN${sect}} +. endif +. endfor +. endif +. endif # defined(NO_MAN) +. if defined(NLSNAME) && !empty(NLSNAME) +NLSNAME.${P}:= ${NLSNAME} +. endif +. if defined(OBJS) +OBJS.${_P}:= ${OBJS} +. endif +. if defined(PRECIOUSPROG) +PRECIOUSPROG.${_P}= +. endif +. if defined(PROGNAME) +PROGNAME.${_P}= ${PROGNAME} +. endif +. if defined(SRCS) +SRCS.${_P}:= ${SRCS} +. endif +. endfor +.else # !defined(PROG) && !defined(PROG_CXX) +. if defined(PROGS_CXX) && !empty(PROGS_CXX) +PROGS+= ${PROGS_CXX} +. endif +.endif # defined(PROG) || defined(PROG_CXX) + +.if defined(PROGS_CXX) && !empty(PROGS_CXX) +. for _P in ${PROGS_CXX} +PROG_CXX.${_P}= +. endfor +.endif + +# Avoid recursive variables +.undef NLSNAME + +.if defined(COPTS) +CFLAGS+=${COPTS} +.endif + +.if defined(DEBUG_FLAGS) +. if ${MK_CTF} != "no" && ${DEBUG_FLAGS:M-g} != "" +CTFFLAGS+= -g *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 02:05:10 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 248322CB; Mon, 22 Oct 2012 02:05:10 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B4758FC0A; Mon, 22 Oct 2012 02:05: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 q9M259UR006696; Mon, 22 Oct 2012 02:05:09 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M259PV006693; Mon, 22 Oct 2012 02:05:09 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201210220205.q9M259PV006693@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 22 Oct 2012 02:05:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241824 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 02:05:10 -0000 Author: marcel Date: Mon Oct 22 02:05:09 2012 New Revision: 241824 URL: http://svn.freebsd.org/changeset/base/241824 Log: Update after adding WITHOUT_ATF. Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Mon Oct 22 01:18:41 2012 (r241823) +++ head/share/man/man5/src.conf.5 Mon Oct 22 02:05:09 2012 (r241824) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 236279 2012-05-30 02:37:20Z gjb .\" $FreeBSD$ -.Dd October 13, 2012 +.Dd October 21, 2012 .Dt SRC.CONF 5 .Os .Sh NAME @@ -110,6 +110,9 @@ checks. Set to not build .Xr at 1 and related utilities. +.It Va WITHOUT_ATF +.\" from FreeBSD: head/tools/build/options/WITHOUT_ATF 241823 2012-10-22 01:18:41Z marcel +Set to not build programs and libraries related to the ATF testing framework. .It Va WITHOUT_ATM .\" from FreeBSD: head/tools/build/options/WITHOUT_ATM 156932 2006-03-21 07:50:50Z ru Set to not build @@ -745,10 +748,6 @@ and related support files. .It Va WITH_NAND .\" from FreeBSD: head/tools/build/options/WITH_NAND 235537 2012-05-17 10:11:18Z gber Set to build the NAND Flash components. -.It Va WITHOUT_NCP -.\" from FreeBSD: head/tools/build/options/WITHOUT_NCP 156932 2006-03-21 07:50:50Z ru -Set to not build programs, libraries, and kernel modules -related to NetWare Core protocol. .It Va WITHOUT_NDIS .\" from FreeBSD: head/tools/build/options/WITHOUT_NDIS 183242 2008-09-21 22:02:26Z sam Set to not build programs and libraries From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 02:11: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 BA29548A; Mon, 22 Oct 2012 02:11:58 +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 9C5958FC0C; Mon, 22 Oct 2012 02:11: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 q9M2BwMD007819; Mon, 22 Oct 2012 02:11:58 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M2BwS8007817; Mon, 22 Oct 2012 02:11:58 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220211.q9M2BwS8007817@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 02:11:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241825 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 02:11:59 -0000 Author: eadler Date: Mon Oct 22 02:11:57 2012 New Revision: 241825 URL: http://svn.freebsd.org/changeset/base/241825 Log: Print flags as hex instead of an integer. PR: kern/168210 Submitted by: linimon Reviewed by: alc Approved by: cperciva MFC after: 3 days Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Mon Oct 22 02:05:09 2012 (r241824) +++ head/sys/vm/uma_core.c Mon Oct 22 02:11:57 2012 (r241825) @@ -1391,7 +1391,7 @@ keg_ctor(void *mem, int size, void *udat hash_alloc(&keg->uk_hash); #ifdef UMA_DEBUG - printf("UMA: %s(%p) size %d(%d) flags %d ipers %d ppera %d out %d free %d\n", + printf("UMA: %s(%p) size %d(%d) flags %#x ipers %d ppera %d out %d free %d\n", zone->uz_name, zone, keg->uk_size, keg->uk_rsize, keg->uk_flags, keg->uk_ipers, keg->uk_ppera, (keg->uk_ipers * keg->uk_pages) - keg->uk_free, keg->uk_free); @@ -3154,7 +3154,7 @@ uma_print_keg(uma_keg_t keg) { uma_slab_t slab; - printf("keg: %s(%p) size %d(%d) flags %d ipers %d ppera %d " + printf("keg: %s(%p) size %d(%d) flags %#x ipers %d ppera %d " "out %d free %d limit %d\n", keg->uk_name, keg, keg->uk_size, keg->uk_rsize, keg->uk_flags, keg->uk_ipers, keg->uk_ppera, @@ -3178,7 +3178,7 @@ uma_print_zone(uma_zone_t zone) uma_klink_t kl; int i; - printf("zone: %s(%p) size %d flags %d\n", + printf("zone: %s(%p) size %d flags %#x\n", zone->uz_name, zone, zone->uz_size, zone->uz_flags); LIST_FOREACH(kl, &zone->uz_kegs, kl_link) uma_print_keg(kl->kl_keg); From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 02:12: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 4F9BD48B; Mon, 22 Oct 2012 02:12:03 +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 3887C8FC08; Mon, 22 Oct 2012 02:12: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 q9M2C30t007875; Mon, 22 Oct 2012 02:12:03 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M2C3pM007872; Mon, 22 Oct 2012 02:12:03 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220212.q9M2C3pM007872@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 02:12:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241826 - head/tools/test/hwpmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 02:12:03 -0000 Author: eadler Date: Mon Oct 22 02:12:02 2012 New Revision: 241826 URL: http://svn.freebsd.org/changeset/base/241826 Log: Covert to python 3 Approved by: cperciva MFC after: 3 days Modified: head/tools/test/hwpmc/pmctest.py Modified: head/tools/test/hwpmc/pmctest.py ============================================================================== --- head/tools/test/hwpmc/pmctest.py Mon Oct 22 02:11:57 2012 (r241825) +++ head/tools/test/hwpmc/pmctest.py Mon Oct 22 02:12:02 2012 (r241826) @@ -68,14 +68,14 @@ def main(): (options, args) = parser.parse_args() if (options.program == None): - print "specify program, such as ls, with -p/--program" + print("specify program, such as ls, with -p/--program") sys.exit() p = subprocess.Popen(["pmccontrol", "-L"], stdout=PIPE) counters = p.communicate()[0] if len(counters) <= 0: - print "no counters found" + print("no counters found") sys.exit() for counter in counters.split(): @@ -84,10 +84,10 @@ def main(): p = subprocess.Popen(["pmcstat", "-p", counter, options.program], stdout=PIPE) result = p.communicate()[0] - print result + print(result) if (options.wait == True): try: - value = raw_input("next?") + value = input("next?") except EOFError: sys.exit() From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 02:12: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 53C1F5A1; Mon, 22 Oct 2012 02:12:07 +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 3CBC18FC12; Mon, 22 Oct 2012 02:12: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 q9M2C77o007927; Mon, 22 Oct 2012 02:12:07 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M2C70L007925; Mon, 22 Oct 2012 02:12:07 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220212.q9M2C70L007925@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 02:12:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241827 - head/usr.bin/ar X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 02:12:07 -0000 Author: eadler Date: Mon Oct 22 02:12:06 2012 New Revision: 241827 URL: http://svn.freebsd.org/changeset/base/241827 Log: Mark bsdar_errc as __dead2 to help code analysis tools. PR: bin/172636 Submitted by: Erik Cederstrand Approved by: cperciva MFC after: 3 days Modified: head/usr.bin/ar/ar.h Modified: head/usr.bin/ar/ar.h ============================================================================== --- head/usr.bin/ar/ar.h Mon Oct 22 02:12:02 2012 (r241826) +++ head/usr.bin/ar/ar.h Mon Oct 22 02:12:06 2012 (r241827) @@ -111,7 +111,7 @@ struct bsdar { }; void bsdar_errc(struct bsdar *, int _eval, int _code, - const char *fmt, ...); + const char *fmt, ...) __dead2; void bsdar_warnc(struct bsdar *, int _code, const char *fmt, ...); void ar_mode_d(struct bsdar *bsdar); void ar_mode_m(struct bsdar *bsdar); From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 02:12: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 068C36F3; Mon, 22 Oct 2012 02:12:12 +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 D916E8FC08; Mon, 22 Oct 2012 02:12: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 q9M2CBIt007981; Mon, 22 Oct 2012 02:12:11 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M2CB4r007975; Mon, 22 Oct 2012 02:12:11 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220212.q9M2CB4r007975@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 02:12:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241828 - in head: . sys/modules/3dfx sys/modules/cmx sys/modules/filemon tools/tools/sysdoc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 02:12:12 -0000 Author: eadler Date: Mon Oct 22 02:12:11 2012 New Revision: 241828 URL: http://svn.freebsd.org/changeset/base/241828 Log: Finish migration of MAINTAINER entries Approved by: cperciva MFC after: 3 days Modified: head/MAINTAINERS head/sys/modules/3dfx/Makefile head/sys/modules/cmx/Makefile head/sys/modules/filemon/Makefile head/tools/tools/sysdoc/Makefile Modified: head/MAINTAINERS ============================================================================== --- head/MAINTAINERS Mon Oct 22 02:12:06 2012 (r241827) +++ head/MAINTAINERS Mon Oct 22 02:12:11 2012 (r241828) @@ -120,16 +120,7 @@ lib/libc/stdtime edwin Heads-up apprec is maintained by a third party source. sbin/routed bms Pre-commit review; notify vendor at rhyolite.com isci(4) jimharris Pre-commit review requested. - -Following are the entries from the Makefiles, and a few other sources. -Please remove stale entries from both their origin, and this file. - -Please also consider removing the lines from the files listed below and -stating your preferences here instead. - -List below generated with: -$ cd /usr/src; find */* -type f|xargs egrep 'MAINTAINER[ ]*=' - -sys/modules/3dfx/Makefile:MAINTAINER= cokane@FreeBSD.org -sys/modules/urio/Makefile:MAINTAINER= Iwasa Kazmi -tools/tools/sysdoc/Makefile:MAINTAINER= trhodes@FreeBSD.org +3dfx cokane Pre-commit review preferred. +cmx daniel@roe.ch Pre-commit review preferred. +fileman obrien Pre-commit review preferred. +sysdoc trhodes Pre-commit review preferred. Modified: head/sys/modules/3dfx/Makefile ============================================================================== --- head/sys/modules/3dfx/Makefile Mon Oct 22 02:12:06 2012 (r241827) +++ head/sys/modules/3dfx/Makefile Mon Oct 22 02:12:11 2012 (r241828) @@ -1,7 +1,5 @@ # $FreeBSD$ -MAINTAINER= cokane@FreeBSD.org - .PATH: $(.CURDIR)/../../dev/tdfx KMOD= 3dfx Modified: head/sys/modules/cmx/Makefile ============================================================================== --- head/sys/modules/cmx/Makefile Mon Oct 22 02:12:06 2012 (r241827) +++ head/sys/modules/cmx/Makefile Mon Oct 22 02:12:11 2012 (r241828) @@ -1,7 +1,5 @@ # $FreeBSD$ # -MAINTAINER= daniel@roe.ch - .PATH: ${.CURDIR}/../../dev/cmx KMOD= cmx Modified: head/sys/modules/filemon/Makefile ============================================================================== --- head/sys/modules/filemon/Makefile Mon Oct 22 02:12:06 2012 (r241827) +++ head/sys/modules/filemon/Makefile Mon Oct 22 02:12:11 2012 (r241828) @@ -1,7 +1,5 @@ # $FreeBSD$ -MAINTAINER= obrien@FreeBSD.org - .PATH: ${.CURDIR}/../../dev/filemon KMOD= filemon Modified: head/tools/tools/sysdoc/Makefile ============================================================================== --- head/tools/tools/sysdoc/Makefile Mon Oct 22 02:12:06 2012 (r241827) +++ head/tools/tools/sysdoc/Makefile Mon Oct 22 02:12:11 2012 (r241828) @@ -1,7 +1,5 @@ # $FreeBSD$ -MAINTAINER= trhodes@FreeBSD.org - sysctl.5: sh ${.CURDIR}/sysdoc.sh -k /boot/kernel From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 02:12: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 968277F3; Mon, 22 Oct 2012 02:12:16 +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 0D9B08FC17; Mon, 22 Oct 2012 02: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 q9M2CF9p008029; Mon, 22 Oct 2012 02:12:15 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M2CFpn008027; Mon, 22 Oct 2012 02:12:15 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220212.q9M2CFpn008027@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 02:12:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241829 - head/usr.sbin/memcontrol X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 02:12:17 -0000 Author: eadler Date: Mon Oct 22 02:12:15 2012 New Revision: 241829 URL: http://svn.freebsd.org/changeset/base/241829 Log: Fix conditional expression: previously a bit vector was being operated on by a logical not instead of the entire expression. Approved by: cperciva MFC after: 3 days Modified: head/usr.sbin/memcontrol/memcontrol.c Modified: head/usr.sbin/memcontrol/memcontrol.c ============================================================================== --- head/usr.sbin/memcontrol/memcontrol.c Mon Oct 22 02:12:11 2012 (r241828) +++ head/usr.sbin/memcontrol/memcontrol.c Mon Oct 22 02:12:15 2012 (r241829) @@ -233,7 +233,7 @@ setfunc(int memfd, int argc, char *argv[ while(argc--) { for (i = 0; attrnames[i].name != NULL; i++) { if (!strcmp(attrnames[i].name, argv[0])) { - if (!attrnames[i].kind & MDF_SETTABLE) + if (!(attrnames[i].kind & MDF_SETTABLE)) help("flags"); mrd.mr_flags |= attrnames[i].val; break; From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 02:12: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 E79DC848; Mon, 22 Oct 2012 02:12:20 +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 CD7488FC16; Mon, 22 Oct 2012 02:12: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 q9M2CKLY008079; Mon, 22 Oct 2012 02:12:20 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M2CKKP008069; Mon, 22 Oct 2012 02:12:20 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220212.q9M2CKKP008069@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 02:12:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241830 - in head/usr.sbin/pkg_install: add create delete info lib updating version X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 02:12:21 -0000 Author: eadler Date: Mon Oct 22 02:12:20 2012 New Revision: 241830 URL: http://svn.freebsd.org/changeset/base/241830 Log: Warn users when using pkg tools if it looks like they be be pkgng users. Reviewed by: bapt (earlier version) Reviewed by: kwm Approved by: cperciva MFC after: 3 days Added: head/usr.sbin/pkg_install/lib/pkgng.c (contents, props changed) Modified: head/usr.sbin/pkg_install/add/main.c head/usr.sbin/pkg_install/create/main.c head/usr.sbin/pkg_install/delete/main.c head/usr.sbin/pkg_install/info/main.c head/usr.sbin/pkg_install/lib/Makefile head/usr.sbin/pkg_install/lib/lib.h head/usr.sbin/pkg_install/updating/main.c head/usr.sbin/pkg_install/version/main.c Modified: head/usr.sbin/pkg_install/add/main.c ============================================================================== --- head/usr.sbin/pkg_install/add/main.c Mon Oct 22 02:12:15 2012 (r241829) +++ head/usr.sbin/pkg_install/add/main.c Mon Oct 22 02:12:20 2012 (r241830) @@ -135,6 +135,7 @@ main(int argc, char **argv) static char temppackageroot[MAXPATHLEN]; static char pkgaddpath[MAXPATHLEN]; + warnpkgng(); if (*argv[0] != '/' && strchr(argv[0], '/') != NULL) PkgAddCmd = realpath(argv[0], pkgaddpath); else Modified: head/usr.sbin/pkg_install/create/main.c ============================================================================== --- head/usr.sbin/pkg_install/create/main.c Mon Oct 22 02:12:15 2012 (r241829) +++ head/usr.sbin/pkg_install/create/main.c Mon Oct 22 02:12:20 2012 (r241830) @@ -72,6 +72,7 @@ main(int argc, char **argv) int ch; char **pkgs, **start, *tmp; + warnpkgng(); pkgs = start = argv; while ((ch = getopt_long(argc, argv, opts, longopts, NULL)) != -1) switch(ch) { Modified: head/usr.sbin/pkg_install/delete/main.c ============================================================================== --- head/usr.sbin/pkg_install/delete/main.c Mon Oct 22 02:12:15 2012 (r241829) +++ head/usr.sbin/pkg_install/delete/main.c Mon Oct 22 02:12:20 2012 (r241830) @@ -67,6 +67,7 @@ main(int argc, char **argv) const char *tmp; struct stat stat_s; + warnpkgng(); pkgs = start = argv; while ((ch = getopt_long(argc, argv, opts, longopts, NULL)) != -1) switch(ch) { Modified: head/usr.sbin/pkg_install/info/main.c ============================================================================== --- head/usr.sbin/pkg_install/info/main.c Mon Oct 22 02:12:15 2012 (r241829) +++ head/usr.sbin/pkg_install/info/main.c Mon Oct 22 02:12:20 2012 (r241830) @@ -68,6 +68,7 @@ main(int argc, char **argv) char **pkgs, **start; char *pkgs_split; + warnpkgng(); whead = malloc(sizeof(struct which_head)); if (whead == NULL) err(2, NULL); Modified: head/usr.sbin/pkg_install/lib/Makefile ============================================================================== --- head/usr.sbin/pkg_install/lib/Makefile Mon Oct 22 02:12:15 2012 (r241829) +++ head/usr.sbin/pkg_install/lib/Makefile Mon Oct 22 02:12:20 2012 (r241830) @@ -3,7 +3,7 @@ LIB= install INTERNALLIB= SRCS= file.c msg.c plist.c str.c exec.c global.c pen.c match.c \ - deps.c version.c pkgwrap.c url.c + deps.c version.c pkgwrap.c url.c pkgng.c WARNS?= 3 WFORMAT?= 1 Modified: head/usr.sbin/pkg_install/lib/lib.h ============================================================================== --- head/usr.sbin/pkg_install/lib/lib.h Mon Oct 22 02:12:15 2012 (r241829) +++ head/usr.sbin/pkg_install/lib/lib.h Mon Oct 22 02:12:20 2012 (r241830) @@ -157,6 +157,7 @@ const char *make_playpen(char *, off_t); char *where_playpen(void); int leave_playpen(void); off_t min_free(const char *); +void warnpkgng(void); /* String */ char *get_dash_string(char **); Added: head/usr.sbin/pkg_install/lib/pkgng.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/pkg_install/lib/pkgng.c Mon Oct 22 02:12:20 2012 (r241830) @@ -0,0 +1,38 @@ +/* + * FreeBSD install - a package for the installation and maintenance + * of non-core utilities. + * + * 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. + * + * Eitan Adler + * + * detect pkgng's existence and warn + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "lib.h" +#include + +void warnpkgng(void) { + char pkgngpath[MAXPATHLEN]; + char *pkgngdir; + + pkgngdir = getenv("PKG_DBDIR"); + if (pkgngdir == NULL) + pkgngdir = "/var/db/pkg"; + strcpy(pkgngpath, pkgngdir); + strcat(pkgngpath, "/local.sqlite"); + + if (access(pkgngpath, F_OK) == 0) + warnx("Don't use the pkg_ tools if you are using pkgng"); +} Modified: head/usr.sbin/pkg_install/updating/main.c ============================================================================== --- head/usr.sbin/pkg_install/updating/main.c Mon Oct 22 02:12:15 2012 (r241829) +++ head/usr.sbin/pkg_install/updating/main.c Mon Oct 22 02:12:20 2012 (r241830) @@ -87,6 +87,7 @@ main(int argc, char *argv[]) DIR *dir; FILE *fd; + warnpkgng(); while ((ch = getopt_long(argc, argv, opts, longopts, NULL)) != -1) { switch (ch) { case 'd': Modified: head/usr.sbin/pkg_install/version/main.c ============================================================================== --- head/usr.sbin/pkg_install/version/main.c Mon Oct 22 02:12:15 2012 (r241829) +++ head/usr.sbin/pkg_install/version/main.c Mon Oct 22 02:12:20 2012 (r241830) @@ -58,6 +58,7 @@ main(int argc, char **argv) { int ch, cmp = 0; + warnpkgng(); if (argc == 4 && !strcmp(argv[1], "-t")) { cmp = version_cmp(argv[2], argv[3]); printf(cmp > 0 ? ">\n" : (cmp < 0 ? "<\n" : "=\n")); From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 02:28: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 27C9CE2F; Mon, 22 Oct 2012 02:28:49 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0D14A8FC12; Mon, 22 Oct 2012 02:28: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 q9M2Sm34010759; Mon, 22 Oct 2012 02:28:48 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M2SmfK010756; Mon, 22 Oct 2012 02:28:48 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201210220228.q9M2SmfK010756@svn.freebsd.org> From: Tim Kientzle Date: Mon, 22 Oct 2012 02:28:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241831 - head/sys/arm/ti/cpsw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 02:28:49 -0000 Author: kientzle Date: Mon Oct 22 02:28:48 2012 New Revision: 241831 URL: http://svn.freebsd.org/changeset/base/241831 Log: Don't repeat the POSTREAD dma sync. Modified: head/sys/arm/ti/cpsw/if_cpsw.c Modified: head/sys/arm/ti/cpsw/if_cpsw.c ============================================================================== --- head/sys/arm/ti/cpsw/if_cpsw.c Mon Oct 22 02:12:20 2012 (r241830) +++ head/sys/arm/ti/cpsw/if_cpsw.c Mon Oct 22 02:28:48 2012 (r241831) @@ -800,6 +800,7 @@ cpsw_intr_rx_locked(void *arg) cpsw_write_4(CPSW_CPDMA_RX_CP(0), cpsw_cpdma_rxbd_paddr(i)); bus_dmamap_sync(sc->mbuf_dtag, sc->rx_dmamap[i], BUS_DMASYNC_POSTREAD); + bus_dmamap_unload(sc->mbuf_dtag, sc->rx_dmamap[i]); /* Fill mbuf */ sc->rx_mbuf[i]->m_hdr.mh_data += bd.bufoff; @@ -817,11 +818,6 @@ cpsw_intr_rx_locked(void *arg) } } - bus_dmamap_sync(sc->mbuf_dtag, - sc->rx_dmamap[i], - BUS_DMASYNC_POSTREAD); - bus_dmamap_unload(sc->mbuf_dtag, sc->rx_dmamap[i]); - /* Handover packet */ CPSW_RX_UNLOCK(sc); (*ifp->if_input)(ifp, sc->rx_mbuf[i]); From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 02:29: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 4D322FA6; Mon, 22 Oct 2012 02:29: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 339938FC08; Mon, 22 Oct 2012 02:29: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 q9M2Tjh2010936; Mon, 22 Oct 2012 02:29:45 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M2Tjh8010934; Mon, 22 Oct 2012 02:29:45 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220229.q9M2Tjh8010934@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 02:29:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241832 - head/tools/regression/netinet/ip_id_period X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 02:29:45 -0000 Author: eadler Date: Mon Oct 22 02:29:44 2012 New Revision: 241832 URL: http://svn.freebsd.org/changeset/base/241832 Log: Covert regression test to python 3 Approved by: cperciva MFC after: 3 days Modified: head/tools/regression/netinet/ip_id_period/ip_id_period.py Modified: head/tools/regression/netinet/ip_id_period/ip_id_period.py ============================================================================== --- head/tools/regression/netinet/ip_id_period/ip_id_period.py Mon Oct 22 02:28:48 2012 (r241831) +++ head/tools/regression/netinet/ip_id_period/ip_id_period.py Mon Oct 22 02:29:44 2012 (r241832) @@ -51,26 +51,26 @@ id_minperiod = {} count = 0 for line in open('results.txt').readlines(): id = int(line.split(' id ')[1].split(',')[0]) - if id_lastseen.has_key(id): + if id in id_lastseen: period = count - id_lastseen[id] - if not id_minperiod.has_key(id) or period < id_minperiod[id]: + if id not in id_minperiod or period < id_minperiod[id]: id_minperiod[id] = period id_lastseen[id] = count count += 1 -sorted_minperiod = zip(*reversed(zip(*id_minperiod.items()))) +sorted_minperiod = list(zip(*reversed(list(zip(*list(id_minperiod.items())))))) sorted_minperiod.sort() -print "Lowest 10 ID periods detected:" +print("Lowest 10 ID periods detected:") x = 0 while x < 10: id_tuple = sorted_minperiod.pop(0) - print "id: %d period: %d" % (id_tuple[1], id_tuple[0]) + print("id: %d period: %d" % (id_tuple[1], id_tuple[0])) x += 1 -print "Highest 10 ID periods detected:" +print("Highest 10 ID periods detected:") x = 0 while x < 10: id_tuple = sorted_minperiod.pop() - print "id: %d period: %d" % (id_tuple[1], id_tuple[0]) + print("id: %d period: %d" % (id_tuple[1], id_tuple[0])) x += 1 From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 02:29: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 A8589135; Mon, 22 Oct 2012 02:29:53 +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 9144B8FC12; Mon, 22 Oct 2012 02:29: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 q9M2Trg6010996; Mon, 22 Oct 2012 02:29:53 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M2TrS5010993; Mon, 22 Oct 2012 02:29:53 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220229.q9M2TrS5010993@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 02:29:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241833 - head/sys/xen/interface/foreign X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 02:29:53 -0000 Author: eadler Date: Mon Oct 22 02:29:53 2012 New Revision: 241833 URL: http://svn.freebsd.org/changeset/base/241833 Log: Make xen python scripts work with python3 Approved by: cperciva MFC after: 3 days Modified: head/sys/xen/interface/foreign/mkheader.py Modified: head/sys/xen/interface/foreign/mkheader.py ============================================================================== --- head/sys/xen/interface/foreign/mkheader.py Mon Oct 22 02:29:44 2012 (r241832) +++ head/sys/xen/interface/foreign/mkheader.py Mon Oct 22 02:29:53 2012 (r241833) @@ -155,7 +155,7 @@ for struct in structs: output = re.sub("\\b(%s)_t\\b" % struct, "\\1_%s_t" % arch, output); # replace: integer types -integers = inttypes[arch].keys(); +integers = list(inttypes[arch].keys()); integers.sort(lambda a, b: cmp(len(b),len(a))); for type in integers: output = re.sub("\\b%s\\b" % type, inttypes[arch][type], output); From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 02:29: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 49320181; Mon, 22 Oct 2012 02:29:57 +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 314DE8FC14; Mon, 22 Oct 2012 02:29: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 q9M2TvxD011040; Mon, 22 Oct 2012 02:29:57 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M2TuEE011038; Mon, 22 Oct 2012 02:29:56 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220229.q9M2TuEE011038@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 02:29:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241834 - head/games/fortune/tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 02:29:57 -0000 Author: eadler Date: Mon Oct 22 02:29:56 2012 New Revision: 241834 URL: http://svn.freebsd.org/changeset/base/241834 Log: Make do_uniq work with python3 Approved by: cperciva MFC after: 3 days Modified: head/games/fortune/tools/do_uniq.py Modified: head/games/fortune/tools/do_uniq.py ============================================================================== --- head/games/fortune/tools/do_uniq.py Mon Oct 22 02:29:53 2012 (r241833) +++ head/games/fortune/tools/do_uniq.py Mon Oct 22 02:29:56 2012 (r241834) @@ -34,26 +34,26 @@ def edit(datfile): for line in file(datfile): if line == "%\n": key = hash(fortune) - if not dups.has_key(key): + if key not in dups: dups[key] = [] dups[key].append(fortune) fortunes.append(fortune) fortune = "" else: fortune += line - for key in dups.keys(): + for key in list(dups.keys()): if len(dups[key]) == 1: del dups[key] o = file(datfile + '~', "w") for fortune in fortunes: key = hash(fortune) if key in dups: - print '\n' * 50 + print('\n' * 50) for f in dups[key]: if f != fortune: - print f, '%' - print fortune, '%' - if raw_input("Remove last fortune? ") == 'y': + print(f, '%') + print(fortune, '%') + if input("Remove last fortune? ") == 'y': del dups[key] continue o.write(fortune + "%\n") From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 02:59: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 407108F1; Mon, 22 Oct 2012 02:59: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 278708FC18; Mon, 22 Oct 2012 02: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 q9M2xjWF015794; Mon, 22 Oct 2012 02: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 q9M2xiwS015791; Mon, 22 Oct 2012 02:59:44 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220259.q9M2xiwS015791@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 02:59:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241835 - head/usr.bin/csup X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 02:59:45 -0000 Author: eadler Date: Mon Oct 22 02:59:44 2012 New Revision: 241835 URL: http://svn.freebsd.org/changeset/base/241835 Log: Fix conditional expression: previously a bitvector would be operated on by a logical not. Approved by: cperciva MFC after: 3 days Modified: head/usr.bin/csup/lister.c Modified: head/usr.bin/csup/lister.c ============================================================================== --- head/usr.bin/csup/lister.c Mon Oct 22 02:29:56 2012 (r241834) +++ head/usr.bin/csup/lister.c Mon Oct 22 02:59:44 2012 (r241835) @@ -530,7 +530,7 @@ lister_dorcsdead(struct lister *l, struc return (0); config = l->config; wr = l->wr; - if (!coll->co_options & CO_TRUSTSTATUSFILE) { + if (!(coll->co_options & CO_TRUSTSTATUSFILE)) { path = cvspath(coll->co_prefix, sr->sr_file, 1); if (path == NULL) { spath = coll_statuspath(coll); From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 02:59: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 A6A7A8F2; Mon, 22 Oct 2012 02:59:50 +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 8F4988FC08; Mon, 22 Oct 2012 02:59: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 q9M2xoa4015847; Mon, 22 Oct 2012 02:59:50 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M2xo3F015844; Mon, 22 Oct 2012 02:59:50 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220259.q9M2xo3F015844@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 02:59:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241836 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 02:59:50 -0000 Author: eadler Date: Mon Oct 22 02:59:49 2012 New Revision: 241836 URL: http://svn.freebsd.org/changeset/base/241836 Log: Remove {harp,hfa,idt} man pages as they were removed in r179308. PR: docs/171234 Submitted by: Martin Birgmeier Reviewed by: rwatson Approved by: cperciva MFC after: 3 days Deleted: head/share/man/man4/harp.4 head/share/man/man4/hfa.4 head/share/man/man4/idt.4 Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Mon Oct 22 02:59:44 2012 (r241835) +++ head/share/man/man4/Makefile Mon Oct 22 02:59:49 2012 (r241836) @@ -154,9 +154,7 @@ MAN= aac.4 \ gpib.4 \ gre.4 \ h_ertt.4 \ - harp.4 \ hatm.4 \ - hfa.4 \ hifn.4 \ hme.4 \ hpet.4 \ @@ -170,7 +168,6 @@ MAN= aac.4 \ icmp.4 \ icmp6.4 \ ida.4 \ - idt.4 \ ifmib.4 \ igb.4 \ igmp.4 \ From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 02:59: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 D78D5A1F; Mon, 22 Oct 2012 02:59:55 +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 C0B728FC0C; Mon, 22 Oct 2012 02:59: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 q9M2xtMl015901; Mon, 22 Oct 2012 02:59:55 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M2xt0P015898; Mon, 22 Oct 2012 02:59:55 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220259.q9M2xt0P015898@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 02:59:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241837 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 02:59:55 -0000 Author: eadler Date: Mon Oct 22 02:59:55 2012 New Revision: 241837 URL: http://svn.freebsd.org/changeset/base/241837 Log: Fix build if COMPAT_43 is defined without one of COMPAT_FREEBSD[4567] Approved by: cperciva Modified: head/sys/sys/ipc.h Modified: head/sys/sys/ipc.h ============================================================================== --- head/sys/sys/ipc.h Mon Oct 22 02:59:49 2012 (r241836) +++ head/sys/sys/ipc.h Mon Oct 22 02:59:55 2012 (r241837) @@ -70,7 +70,8 @@ typedef __uid_t uid_t; #endif #if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ - defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) + defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) || \ + defined(COMPAT_43) struct ipc_perm_old { unsigned short cuid; /* creator user id */ unsigned short cgid; /* creator group id */ From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 03:00: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 1900AB6E; Mon, 22 Oct 2012 03:00:00 +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 F3E098FC12; Mon, 22 Oct 2012 02:59: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 q9M2xxiP015952; Mon, 22 Oct 2012 02:59:59 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M2xxlZ015950; Mon, 22 Oct 2012 02:59:59 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220259.q9M2xxlZ015950@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 02:59:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241838 - head/usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 03:00:00 -0000 Author: eadler Date: Mon Oct 22 02:59:59 2012 New Revision: 241838 URL: http://svn.freebsd.org/changeset/base/241838 Log: Remove unused variable. Newer versions of gcc care. Submitted by: Sascha Wildner Approved by: cperciva MFC after: 3 days Modified: head/usr.bin/netstat/route.c Modified: head/usr.bin/netstat/route.c ============================================================================== --- head/usr.bin/netstat/route.c Mon Oct 22 02:59:55 2012 (r241837) +++ head/usr.bin/netstat/route.c Mon Oct 22 02:59:59 2012 (r241838) @@ -1104,10 +1104,8 @@ ipx_phost(struct sockaddr *sa) struct sockaddr_ipx work; static union ipx_net ipx_zeronet; char *p; - struct ipx_addr in; work = *sipx; - in = work.sipx_addr; work.sipx_addr.x_port = 0; work.sipx_addr.x_net = ipx_zeronet; From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 03:00: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 27204CC9; Mon, 22 Oct 2012 03:00:05 +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 10E8B8FC1A; Mon, 22 Oct 2012 03:00:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9M304mj016084; Mon, 22 Oct 2012 03:00:04 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M304ZK016082; Mon, 22 Oct 2012 03:00:04 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220300.q9M304ZK016082@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 03:00:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241839 - head/lib/libfetch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 03:00:05 -0000 Author: eadler Date: Mon Oct 22 03:00:04 2012 New Revision: 241839 URL: http://svn.freebsd.org/changeset/base/241839 Log: Be a bit more lenient in the maximum number of redirects allowed. Chrome and Firefox have a limit of 20. IE has a limit of 8. Reviewed by: des Approved by: cperciva MFC after: 3 days Modified: head/lib/libfetch/http.c Modified: head/lib/libfetch/http.c ============================================================================== --- head/lib/libfetch/http.c Mon Oct 22 02:59:59 2012 (r241838) +++ head/lib/libfetch/http.c Mon Oct 22 03:00:04 2012 (r241839) @@ -94,7 +94,7 @@ __FBSDID("$FreeBSD$"); #include "httperr.h" /* Maximum number of redirects to follow */ -#define MAX_REDIRECT 5 +#define MAX_REDIRECT 20 /* Symbolic names for reply codes we care about */ #define HTTP_OK 200 From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 03:00:10 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 C7206DE6; Mon, 22 Oct 2012 03:00:10 +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 976AD8FC17; Mon, 22 Oct 2012 03:00: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 q9M30AGx016144; Mon, 22 Oct 2012 03:00:10 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M30ArX016141; Mon, 22 Oct 2012 03:00:10 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220300.q9M30ArX016141@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 03:00:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241840 - head/lib/libfetch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 03:00:10 -0000 Author: eadler Date: Mon Oct 22 03:00:10 2012 New Revision: 241840 URL: http://svn.freebsd.org/changeset/base/241840 Log: Don't deny non-temporary redirects if the -A option is set (per the man page) [0] While here add support for draft-reschke-http-status-308-07 PR: 172451 [0] Submitted by: gcooper [0] Reviewed by: des Approved by: cperciva MFC after: 1 week Modified: head/lib/libfetch/http.c head/lib/libfetch/http.errors Modified: head/lib/libfetch/http.c ============================================================================== --- head/lib/libfetch/http.c Mon Oct 22 03:00:04 2012 (r241839) +++ head/lib/libfetch/http.c Mon Oct 22 03:00:10 2012 (r241840) @@ -104,6 +104,7 @@ __FBSDID("$FreeBSD$"); #define HTTP_SEE_OTHER 303 #define HTTP_NOT_MODIFIED 304 #define HTTP_TEMP_REDIRECT 307 +#define HTTP_PERM_REDIRECT 308 #define HTTP_NEED_AUTH 401 #define HTTP_NEED_PROXY_AUTH 407 #define HTTP_BAD_RANGE 416 @@ -1524,8 +1525,7 @@ http_request(struct url *URL, const char /* try the provided URL first */ url = URL; - /* if the A flag is set, we only get one try */ - n = noredirect ? 1 : MAX_REDIRECT; + n = MAX_REDIRECT; i = 0; e = HTTP_PROTOCOL_ERROR; @@ -1772,6 +1772,16 @@ http_request(struct url *URL, const char case hdr_location: if (!HTTP_REDIRECT(conn->err)) break; + /* + * if the A flag is set, we don't follow + * temporary redirects. + */ + if (noredirect && + conn->err != HTTP_MOVED_PERM && + conn->err != HTTP_PERM_REDIRECT) { + n = 1; + break; + } if (new) free(new); if (verbose) Modified: head/lib/libfetch/http.errors ============================================================================== --- head/lib/libfetch/http.errors Mon Oct 22 03:00:04 2012 (r241839) +++ head/lib/libfetch/http.errors Mon Oct 22 03:00:10 2012 (r241840) @@ -18,6 +18,7 @@ 304 OK Not Modified 305 INFO Use Proxy 307 MOVED Temporary Redirect +308 MOVED Permanent Redirect 400 PROTO Bad Request 401 AUTH Unauthorized 402 AUTH Payment Required From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 03:00: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 3A114F2C; Mon, 22 Oct 2012 03:00:16 +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 0197F8FC08; Mon, 22 Oct 2012 03:00: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 q9M30FDX016201; Mon, 22 Oct 2012 03:00:15 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M30FlX016199; Mon, 22 Oct 2012 03:00:15 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220300.q9M30FlX016199@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 03:00:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241841 - head/lib/libfetch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 03:00:16 -0000 Author: eadler Date: Mon Oct 22 03:00:15 2012 New Revision: 241841 URL: http://svn.freebsd.org/changeset/base/241841 Log: Implement HTTP 305 redirect handling. PR: 172452 Submitted by: gcooper Reviewed by: des Approved by: cperciva MFC after: 1 week Modified: head/lib/libfetch/http.c Modified: head/lib/libfetch/http.c ============================================================================== --- head/lib/libfetch/http.c Mon Oct 22 03:00:10 2012 (r241840) +++ head/lib/libfetch/http.c Mon Oct 22 03:00:15 2012 (r241841) @@ -103,6 +103,7 @@ __FBSDID("$FreeBSD$"); #define HTTP_MOVED_TEMP 302 #define HTTP_SEE_OTHER 303 #define HTTP_NOT_MODIFIED 304 +#define HTTP_USE_PROXY 305 #define HTTP_TEMP_REDIRECT 307 #define HTTP_PERM_REDIRECT 308 #define HTTP_NEED_AUTH 401 @@ -113,6 +114,7 @@ __FBSDID("$FreeBSD$"); #define HTTP_REDIRECT(xyz) ((xyz) == HTTP_MOVED_PERM \ || (xyz) == HTTP_MOVED_TEMP \ || (xyz) == HTTP_TEMP_REDIRECT \ + || (xyz) == HTTP_USE_PROXY \ || (xyz) == HTTP_SEE_OTHER) #define HTTP_ERROR(xyz) ((xyz) > 400 && (xyz) < 599) @@ -1697,6 +1699,7 @@ http_request(struct url *URL, const char case HTTP_MOVED_PERM: case HTTP_MOVED_TEMP: case HTTP_SEE_OTHER: + case HTTP_USE_PROXY: /* * Not so fine, but we still have to read the * headers to get the new location. @@ -1778,7 +1781,8 @@ http_request(struct url *URL, const char */ if (noredirect && conn->err != HTTP_MOVED_PERM && - conn->err != HTTP_PERM_REDIRECT) { + conn->err != HTTP_PERM_REDIRECT && + conn->err != HTTP_USE_PROXY) { n = 1; break; } From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 03:00: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 D3C1FCA; Mon, 22 Oct 2012 03:00: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 594FE8FC12; Mon, 22 Oct 2012 03:00: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 q9M30LC4016252; Mon, 22 Oct 2012 03:00:21 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M30LCr016249; Mon, 22 Oct 2012 03:00:21 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220300.q9M30LCr016249@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 03:00:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241842 - head/sbin/dumpfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 03:00:21 -0000 Author: eadler Date: Mon Oct 22 03:00:20 2012 New Revision: 241842 URL: http://svn.freebsd.org/changeset/base/241842 Log: Add support for gjournal to dumpfs PR: 165821 Submitted by: Andreas Longwitz Approved by: cperciva MFC after: 3 days Modified: head/sbin/dumpfs/dumpfs.c Modified: head/sbin/dumpfs/dumpfs.c ============================================================================== --- head/sbin/dumpfs/dumpfs.c Mon Oct 22 03:00:15 2012 (r241841) +++ head/sbin/dumpfs/dumpfs.c Mon Oct 22 03:00:20 2012 (r241842) @@ -419,6 +419,8 @@ marshal(const char *name) /* -i is dumb */ if (fs->fs_flags & FS_SUJ) printf("-j "); + if (fs->fs_flags & FS_GJOURNAL) + printf("-J "); /* -k..l unimplemented */ printf("-m %d ", fs->fs_minfree); /* -n unimplemented */ From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 03:00: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 012501D7; Mon, 22 Oct 2012 03:00: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 01CC98FC18; Mon, 22 Oct 2012 03:00: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 q9M30PSv016303; Mon, 22 Oct 2012 03:00:25 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M30PD6016301; Mon, 22 Oct 2012 03:00:25 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220300.q9M30PD6016301@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 03:00:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241843 - head/sys/dev/usb/input X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 03:00:27 -0000 Author: eadler Date: Mon Oct 22 03:00:25 2012 New Revision: 241843 URL: http://svn.freebsd.org/changeset/base/241843 Log: Make uhid attach to devices that look like keyboards or mice if the quirk which prevents higher level drivers from attaching is set. PR: usb/172458 Submitted by: Vitaly Magerya Reviewed by: hselasky Approved by: cperciva MFC after: 1 week Modified: head/sys/dev/usb/input/uhid.c Modified: head/sys/dev/usb/input/uhid.c ============================================================================== --- head/sys/dev/usb/input/uhid.c Mon Oct 22 03:00:20 2012 (r241842) +++ head/sys/dev/usb/input/uhid.c Mon Oct 22 03:00:25 2012 (r241843) @@ -691,10 +691,11 @@ uhid_probe(device_t dev) */ if ((uaa->info.bInterfaceClass == UICLASS_HID) && (uaa->info.bInterfaceSubClass == UISUBCLASS_BOOT) && - ((uaa->info.bInterfaceProtocol == UIPROTO_BOOT_KEYBOARD) || - (uaa->info.bInterfaceProtocol == UIPROTO_MOUSE))) { + (((uaa->info.bInterfaceProtocol == UIPROTO_BOOT_KEYBOARD) && + !usb_test_quirk(uaa, UQ_KBD_IGNORE)) || + ((uaa->info.bInterfaceProtocol == UIPROTO_MOUSE) && + !usb_test_quirk(uaa, UQ_UMS_IGNORE)))) return (ENXIO); - } return (BUS_PROBE_GENERIC); } From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 03:00: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 DCCE048E; Mon, 22 Oct 2012 03:00:38 +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 852C28FC0A; Mon, 22 Oct 2012 03:00: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 q9M30c9o016408; Mon, 22 Oct 2012 03:00:38 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M30bfL016377; Mon, 22 Oct 2012 03:00:37 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220300.q9M30bfL016377@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 03:00:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241844 - in head: lib/libc/net lib/libdwarf lib/libpam/modules/pam_krb5 sbin/ddb sbin/natd sys/arm/broadcom/bcm2835 sys/arm/ti/am335x sys/cam/ctl sys/cam/scsi sys/dev/ahci sys/dev/cxgb... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 03:00:39 -0000 Author: eadler Date: Mon Oct 22 03:00:37 2012 New Revision: 241844 URL: http://svn.freebsd.org/changeset/base/241844 Log: remove duplicate semicolons where possible. Approved by: cperciva MFC after: 1 week Modified: head/lib/libc/net/ip6opt.c head/lib/libdwarf/dwarf_init.c head/lib/libpam/modules/pam_krb5/pam_krb5.c head/sbin/ddb/ddb.c head/sbin/natd/natd.c head/sys/arm/broadcom/bcm2835/bcm2835_systimer.c head/sys/arm/ti/am335x/am335x_dmtimer.c head/sys/cam/ctl/ctl.c head/sys/cam/scsi/scsi_enc_ses.c head/sys/dev/ahci/ahciem.c head/sys/dev/cxgb/cxgb_main.c head/sys/dev/e1000/if_lem.c head/sys/dev/hpt27xx/os_bsd.c head/sys/dev/isf/isf.c head/sys/dev/mps/mps_sas.c head/sys/dev/mps/mps_user.c head/sys/dev/oce/oce_if.c head/sys/dev/sound/pci/hda/hdaa.c head/sys/dev/usb/net/if_smsc.c head/sys/fs/nandfs/nandfs_subr.c head/sys/kern/sched_ule.c head/sys/mips/rmi/xlr_i2c.c head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_multicast.c head/sys/ofed/drivers/net/mlx4/en_netdev.c head/sys/ofed/drivers/net/mlx4/en_rx.c head/tools/regression/lib/libc/nss/test-gethostby.c head/tools/regression/sockets/unix_cmsg/unix_cmsg.c head/usr.sbin/diskinfo/diskinfo.c head/usr.sbin/ppp/radius.c Modified: head/lib/libc/net/ip6opt.c ============================================================================== --- head/lib/libc/net/ip6opt.c Mon Oct 22 03:00:25 2012 (r241843) +++ head/lib/libc/net/ip6opt.c Mon Oct 22 03:00:37 2012 (r241844) @@ -461,7 +461,7 @@ inet6_opt_append(void *extbuf, socklen_t int inet6_opt_finish(void *extbuf, socklen_t extlen, int offset) { - int updatelen = offset > 0 ? (1 + ((offset - 1) | 7)) : 0;; + int updatelen = offset > 0 ? (1 + ((offset - 1) | 7)) : 0; if (extbuf) { u_int8_t *padp; Modified: head/lib/libdwarf/dwarf_init.c ============================================================================== --- head/lib/libdwarf/dwarf_init.c Mon Oct 22 03:00:25 2012 (r241843) +++ head/lib/libdwarf/dwarf_init.c Mon Oct 22 03:00:37 2012 (r241844) @@ -551,7 +551,7 @@ dwarf_init_info(Dwarf_Debug dbg, Dwarf_E Dwarf_Attribute at; Dwarf_Die die; uint64_t abnum; - uint64_t die_offset = offset;; + uint64_t die_offset = offset; abnum = dwarf_read_uleb128(&d, &offset); Modified: head/lib/libpam/modules/pam_krb5/pam_krb5.c ============================================================================== --- head/lib/libpam/modules/pam_krb5/pam_krb5.c Mon Oct 22 03:00:25 2012 (r241843) +++ head/lib/libpam/modules/pam_krb5/pam_krb5.c Mon Oct 22 03:00:37 2012 (r241844) @@ -650,7 +650,7 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int if (krbret != 0) { PAM_LOG_KRB5_ERR(pam_context, krbret, "Error krb5_cc_get_principal()"); - retval = PAM_PERM_DENIED;; + retval = PAM_PERM_DENIED; goto cleanup; } Modified: head/sbin/ddb/ddb.c ============================================================================== --- head/sbin/ddb/ddb.c Mon Oct 22 03:00:25 2012 (r241843) +++ head/sbin/ddb/ddb.c Mon Oct 22 03:00:37 2012 (r241844) @@ -80,7 +80,7 @@ ddb_readfile(char *filename) argc++; spn = strcspn(argv[0], WHITESP); - argv[1] = argv[0] + spn + strspn(argv[0] + spn, WHITESP);; + argv[1] = argv[0] + spn + strspn(argv[0] + spn, WHITESP); argv[0][spn] = '\0'; if (*argv[1] != '\0') argc++; Modified: head/sbin/natd/natd.c ============================================================================== --- head/sbin/natd/natd.c Mon Oct 22 03:00:25 2012 (r241843) +++ head/sbin/natd/natd.c Mon Oct 22 03:00:37 2012 (r241844) @@ -1509,7 +1509,7 @@ static void ParseOption (const char* opt break; case LogIpfwDenied: - logIpfwDenied = yesNoValue;; + logIpfwDenied = yesNoValue; break; case PidFile: Modified: head/sys/arm/broadcom/bcm2835/bcm2835_systimer.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_systimer.c Mon Oct 22 03:00:25 2012 (r241843) +++ head/sys/arm/broadcom/bcm2835/bcm2835_systimer.c Mon Oct 22 03:00:37 2012 (r241844) @@ -1,4 +1,4 @@ -/*- +/* * Copyright (c) 2012 Oleksandr Tymoshenko * Copyright (c) 2012 Damjan Marion * All rights reserved. @@ -280,7 +280,7 @@ DELAY(int usec) } /* Get the number of times to count */ - counts = usec * ((bcm_systimer_tc.tc_frequency / 1000000) + 1);; + counts = usec * ((bcm_systimer_tc.tc_frequency / 1000000) + 1); first = bcm_systimer_tc_read_4(SYSTIMER_CLO); Modified: head/sys/arm/ti/am335x/am335x_dmtimer.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_dmtimer.c Mon Oct 22 03:00:25 2012 (r241843) +++ head/sys/arm/ti/am335x/am335x_dmtimer.c Mon Oct 22 03:00:37 2012 (r241844) @@ -368,7 +368,7 @@ DELAY(int usec) } /* Get the number of times to count */ - counts = usec * ((am335x_dmtimer_tc.tc_frequency / 1000000) + 1);; + counts = usec * ((am335x_dmtimer_tc.tc_frequency / 1000000) + 1); first = am335x_dmtimer_tc_read_4(DMTIMER_TCRR); Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Mon Oct 22 03:00:25 2012 (r241843) +++ head/sys/cam/ctl/ctl.c Mon Oct 22 03:00:37 2012 (r241844) @@ -480,7 +480,7 @@ ctl_isc_handler_finish_xfer(struct ctl_s memcpy(&ctsio->sense_data, &msg_info->scsi.sense_data, sizeof(ctsio->sense_data)); memcpy(&ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes, - &msg_info->scsi.lbalen, sizeof(msg_info->scsi.lbalen));; + &msg_info->scsi.lbalen, sizeof(msg_info->scsi.lbalen)); STAILQ_INSERT_TAIL(&ctl_softc->isc_queue, &ctsio->io_hdr, links); ctl_wakeup_thread(); } @@ -12593,7 +12593,7 @@ ctl_process_done(union ctl_io *io, int h */ memcpy(&msg.scsi.lbalen, &io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN].bytes, - sizeof(msg.scsi.lbalen));; + sizeof(msg.scsi.lbalen)); if (ctl_ha_msg_send(CTL_HA_CHAN_CTL, &msg, sizeof(msg), 0) > CTL_HA_STATUS_SUCCESS) { Modified: head/sys/cam/scsi/scsi_enc_ses.c ============================================================================== --- head/sys/cam/scsi/scsi_enc_ses.c Mon Oct 22 03:00:25 2012 (r241843) +++ head/sys/cam/scsi/scsi_enc_ses.c Mon Oct 22 03:00:37 2012 (r241844) @@ -1323,7 +1323,7 @@ ses_process_config(enc_softc_t *enc, str enc_cache = &enc->enc_daemon_cache; ses_cache = enc_cache->private; buf = *bufp; - err = -1;; + err = -1; if (error != 0) { err = error; Modified: head/sys/dev/ahci/ahciem.c ============================================================================== --- head/sys/dev/ahci/ahciem.c Mon Oct 22 03:00:25 2012 (r241843) +++ head/sys/dev/ahci/ahciem.c Mon Oct 22 03:00:37 2012 (r241844) @@ -87,7 +87,7 @@ ahci_em_attach(device_t dev) if (!(enc->r_memc = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE))) return (ENXIO); - enc->capsem = ATA_INL(enc->r_memc, 0);; + enc->capsem = ATA_INL(enc->r_memc, 0); rid = 1; if (!(enc->r_memt = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE))) { Modified: head/sys/dev/cxgb/cxgb_main.c ============================================================================== --- head/sys/dev/cxgb/cxgb_main.c Mon Oct 22 03:00:25 2012 (r241843) +++ head/sys/dev/cxgb/cxgb_main.c Mon Oct 22 03:00:37 2012 (r241844) @@ -2984,7 +2984,7 @@ cxgb_extension_ioctl(struct cdev *dev, u break; } case CHELSIO_SET_FILTER: { - struct ch_filter *f = (struct ch_filter *)data;; + struct ch_filter *f = (struct ch_filter *)data; struct filter_info *p; unsigned int nfilters = sc->params.mc5.nfilters; Modified: head/sys/dev/e1000/if_lem.c ============================================================================== --- head/sys/dev/e1000/if_lem.c Mon Oct 22 03:00:25 2012 (r241843) +++ head/sys/dev/e1000/if_lem.c Mon Oct 22 03:00:37 2012 (r241844) @@ -3425,7 +3425,7 @@ lem_free_receive_structures(struct adapt static bool lem_rxeof(struct adapter *adapter, int count, int *done) { - struct ifnet *ifp = adapter->ifp;; + struct ifnet *ifp = adapter->ifp; struct mbuf *mp; u8 status = 0, accept_frame = 0, eop = 0; u16 len, desc_len, prev_len_adj; Modified: head/sys/dev/hpt27xx/os_bsd.c ============================================================================== --- head/sys/dev/hpt27xx/os_bsd.c Mon Oct 22 03:00:25 2012 (r241843) +++ head/sys/dev/hpt27xx/os_bsd.c Mon Oct 22 03:00:37 2012 (r241844) @@ -133,7 +133,7 @@ HPT_U8 pcicfg_read_byte (HPT_U8 bus, HPT } HPT_U32 pcicfg_read_dword(HPT_U8 bus, HPT_U8 dev, HPT_U8 func, HPT_U8 reg) { - return (HPT_U32)pci_cfgregread(bus, dev, func, reg, 4);; + return (HPT_U32)pci_cfgregread(bus, dev, func, reg, 4); } void pcicfg_write_byte (HPT_U8 bus, HPT_U8 dev, HPT_U8 func, HPT_U8 reg, HPT_U8 v) { Modified: head/sys/dev/isf/isf.c ============================================================================== --- head/sys/dev/isf/isf.c Mon Oct 22 03:00:25 2012 (r241843) +++ head/sys/dev/isf/isf.c Mon Oct 22 03:00:37 2012 (r241844) @@ -498,7 +498,7 @@ isf_disk_ioctl(struct disk *disk, u_long static void isf_disk_strategy(struct bio *bp) { - struct isf_softc *sc = bp->bio_disk->d_drv1;; + struct isf_softc *sc = bp->bio_disk->d_drv1; /* * We advertise a block size and maximum I/O size up the stack; catch Modified: head/sys/dev/mps/mps_sas.c ============================================================================== --- head/sys/dev/mps/mps_sas.c Mon Oct 22 03:00:25 2012 (r241843) +++ head/sys/dev/mps/mps_sas.c Mon Oct 22 03:00:37 2012 (r241844) @@ -2020,7 +2020,7 @@ mpssas_scsiio_complete(struct mps_softc if (cm->cm_flags & MPS_CM_FLAGS_DATAIN) dir = BUS_DMASYNC_POSTREAD; else if (cm->cm_flags & MPS_CM_FLAGS_DATAOUT) - dir = BUS_DMASYNC_POSTWRITE;; + dir = BUS_DMASYNC_POSTWRITE; bus_dmamap_sync(sc->buffer_dmat, cm->cm_dmamap, dir); bus_dmamap_unload(sc->buffer_dmat, cm->cm_dmamap); } Modified: head/sys/dev/mps/mps_user.c ============================================================================== --- head/sys/dev/mps/mps_user.c Mon Oct 22 03:00:25 2012 (r241843) +++ head/sys/dev/mps/mps_user.c Mon Oct 22 03:00:37 2012 (r241844) @@ -1000,7 +1000,7 @@ mps_user_pass_thru(struct mps_softc *sc, if (cm->cm_flags & MPS_CM_FLAGS_DATAIN) dir = BUS_DMASYNC_POSTREAD; else if (cm->cm_flags & MPS_CM_FLAGS_DATAOUT) - dir = BUS_DMASYNC_POSTWRITE;; + dir = BUS_DMASYNC_POSTWRITE; bus_dmamap_sync(sc->buffer_dmat, cm->cm_dmamap, dir); bus_dmamap_unload(sc->buffer_dmat, cm->cm_dmamap); Modified: head/sys/dev/oce/oce_if.c ============================================================================== --- head/sys/dev/oce/oce_if.c Mon Oct 22 03:00:25 2012 (r241843) +++ head/sys/dev/oce/oce_if.c Mon Oct 22 03:00:37 2012 (r241844) @@ -248,7 +248,7 @@ oce_attach(device_t dev) rc = oce_hw_start(sc); if (rc) - goto lro_free;; + goto lro_free; sc->vlan_attach = EVENTHANDLER_REGISTER(vlan_config, oce_add_vlan, sc, EVENTHANDLER_PRI_FIRST); Modified: head/sys/dev/sound/pci/hda/hdaa.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdaa.c Mon Oct 22 03:00:25 2012 (r241843) +++ head/sys/dev/sound/pci/hda/hdaa.c Mon Oct 22 03:00:37 2012 (r241844) @@ -1148,7 +1148,7 @@ hdaa_widget_parse(struct hdaa_widget *w) w->wclass.pin.config = hda_command(dev, HDA_CMD_GET_CONFIGURATION_DEFAULT(0, w->nid)); w->wclass.pin.cap = hda_command(dev, - HDA_CMD_GET_PARAMETER(0, w->nid, HDA_PARAM_PIN_CAP));; + HDA_CMD_GET_PARAMETER(0, w->nid, HDA_PARAM_PIN_CAP)); w->wclass.pin.ctrl = hda_command(dev, HDA_CMD_GET_PIN_WIDGET_CTRL(0, nid)); if (HDA_PARAM_PIN_CAP_EAPD_CAP(w->wclass.pin.cap)) { Modified: head/sys/dev/usb/net/if_smsc.c ============================================================================== --- head/sys/dev/usb/net/if_smsc.c Mon Oct 22 03:00:25 2012 (r241843) +++ head/sys/dev/usb/net/if_smsc.c Mon Oct 22 03:00:37 2012 (r241844) @@ -1179,7 +1179,7 @@ static void smsc_tick(struct usb_ether *ue) { struct smsc_softc *sc = uether_getsc(ue); - struct mii_data *mii = uether_getmii(&sc->sc_ue);; + struct mii_data *mii = uether_getmii(&sc->sc_ue); SMSC_LOCK_ASSERT(sc, MA_OWNED); Modified: head/sys/fs/nandfs/nandfs_subr.c ============================================================================== --- head/sys/fs/nandfs/nandfs_subr.c Mon Oct 22 03:00:25 2012 (r241843) +++ head/sys/fs/nandfs/nandfs_subr.c Mon Oct 22 03:00:37 2012 (r241844) @@ -58,7 +58,7 @@ __FBSDID("$FreeBSD$"); #include "nandfs.h" #include "nandfs_subr.h" -MALLOC_DEFINE(M_NANDFSMNT, "nandfs_mount", "NANDFS mount");; +MALLOC_DEFINE(M_NANDFSMNT, "nandfs_mount", "NANDFS mount"); MALLOC_DEFINE(M_NANDFSTEMP, "nandfs_tmt", "NANDFS tmp"); uma_zone_t nandfs_node_zone; Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Mon Oct 22 03:00:25 2012 (r241843) +++ head/sys/kern/sched_ule.c Mon Oct 22 03:00:37 2012 (r241844) @@ -202,7 +202,7 @@ static struct td_sched td_sched0; */ static int sched_interact = SCHED_INTERACT_THRESH; static int realstathz = 127; -static int tickincr = 8 << SCHED_TICK_SHIFT;; +static int tickincr = 8 << SCHED_TICK_SHIFT; static int sched_slice = 12; #ifdef PREEMPTION #ifdef FULL_PREEMPTION Modified: head/sys/mips/rmi/xlr_i2c.c ============================================================================== --- head/sys/mips/rmi/xlr_i2c.c Mon Oct 22 03:00:25 2012 (r241843) +++ head/sys/mips/rmi/xlr_i2c.c Mon Oct 22 03:00:37 2012 (r241844) @@ -332,7 +332,7 @@ retry: continue; if (pos >= len) - break;; + break; } *sent = len - 1; return 0; Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_multicast.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_multicast.c Mon Oct 22 03:00:25 2012 (r241843) +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_multicast.c Mon Oct 22 03:00:37 2012 (r241844) @@ -723,7 +723,7 @@ void ipoib_mcast_restart_task(struct wor void ipoib_mcast_restart(struct ipoib_dev_priv *priv) { struct ifnet *dev = priv->dev; - struct ifmultiaddr *ifma;; + struct ifmultiaddr *ifma; struct ipoib_mcast *mcast, *tmcast; LIST_HEAD(remove_list); struct ib_sa_mcmember_rec rec; Modified: head/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_netdev.c Mon Oct 22 03:00:25 2012 (r241843) +++ head/sys/ofed/drivers/net/mlx4/en_netdev.c Mon Oct 22 03:00:37 2012 (r241844) @@ -101,7 +101,7 @@ u64 mlx4_en_mac_to_u64(u8 *addr) static int mlx4_en_cache_mclist(struct net_device *dev, u64 **mcaddrp) { - struct ifmultiaddr *ifma;; + struct ifmultiaddr *ifma; u64 *mcaddr; int cnt; int i; Modified: head/sys/ofed/drivers/net/mlx4/en_rx.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_rx.c Mon Oct 22 03:00:25 2012 (r241843) +++ head/sys/ofed/drivers/net/mlx4/en_rx.c Mon Oct 22 03:00:37 2012 (r241844) @@ -405,7 +405,7 @@ static inline int invalid_cqe(struct mlx } if (unlikely(cqe->badfcs_enc & MLX4_CQE_BAD_FCS)) { en_dbg(RX_ERR, priv, "Accepted frame with bad FCS\n"); - return 1;; + return 1; } return 0; Modified: head/tools/regression/lib/libc/nss/test-gethostby.c ============================================================================== --- head/tools/regression/lib/libc/nss/test-gethostby.c Mon Oct 22 03:00:25 2012 (r241843) +++ head/tools/regression/lib/libc/nss/test-gethostby.c Mon Oct 22 03:00:37 2012 (r241844) @@ -565,7 +565,7 @@ hostent_read_snapshot_addr(char *addr, u static int hostent_read_snapshot_func(struct hostent *ht, char *line) { - StringList *sl1, *sl2;; + StringList *sl1, *sl2; char *s, *ps, *ts; int i, rv; Modified: head/tools/regression/sockets/unix_cmsg/unix_cmsg.c ============================================================================== --- head/tools/regression/sockets/unix_cmsg/unix_cmsg.c Mon Oct 22 03:00:25 2012 (r241843) +++ head/tools/regression/sockets/unix_cmsg/unix_cmsg.c Mon Oct 22 03:00:37 2012 (r241844) @@ -1513,7 +1513,7 @@ t_timestamp_server(int fd1) msg.msg_iov = iov; msg.msg_iovlen = 1; msg.msg_control = control_un.control; - msg.msg_controllen = sizeof control_un.control;; + msg.msg_controllen = sizeof control_un.control; msg.msg_flags = 0; if (recvmsg_timeout(fd2, &msg, sizeof buf) < 0) Modified: head/usr.sbin/diskinfo/diskinfo.c ============================================================================== --- head/usr.sbin/diskinfo/diskinfo.c Mon Oct 22 03:00:25 2012 (r241843) +++ head/usr.sbin/diskinfo/diskinfo.c Mon Oct 22 03:00:37 2012 (r241844) @@ -339,7 +339,7 @@ speeddisk(int fd, off_t mediasize, u_int TR(bulk * 1024); printf("\tinside: "); - b0 = sectorcount - bulk * (1024*1024 / sectorsize) - 1;; + b0 = sectorcount - bulk * (1024*1024 / sectorsize) - 1; rdsect(fd, b0, sectorsize); T0(); for (i = 0; i < bulk; i++) { Modified: head/usr.sbin/ppp/radius.c ============================================================================== --- head/usr.sbin/ppp/radius.c Mon Oct 22 03:00:25 2012 (r241843) +++ head/usr.sbin/ppp/radius.c Mon Oct 22 03:00:37 2012 (r241844) @@ -784,7 +784,7 @@ radius_Init(struct radius *r) r->mppe.recvkeylen = 0; r->mppe.sendkey = NULL; r->mppe.sendkeylen = 0; - *r->cfg.file = '\0';; + *r->cfg.file = '\0'; log_Printf(LogDEBUG, "Radius: radius_Init\n"); } From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 03:00: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 E2C974A3; Mon, 22 Oct 2012 03:00:43 +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 CBFDD8FC17; Mon, 22 Oct 2012 03:00: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 q9M30hCK016457; Mon, 22 Oct 2012 03:00:43 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M30h4x016455; Mon, 22 Oct 2012 03:00:43 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220300.q9M30h4x016455@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 03:00:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241845 - head/games/fortune/datfiles X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 03:00:44 -0000 Author: eadler Date: Mon Oct 22 03:00:43 2012 New Revision: 241845 URL: http://svn.freebsd.org/changeset/base/241845 Log: Sysinstall has been removed from base. Approved by: cperciva Modified: head/games/fortune/datfiles/freebsd-tips Modified: head/games/fortune/datfiles/freebsd-tips ============================================================================== --- head/games/fortune/datfiles/freebsd-tips Mon Oct 22 03:00:37 2012 (r241844) +++ head/games/fortune/datfiles/freebsd-tips Mon Oct 22 03:00:43 2012 (r241845) @@ -40,7 +40,7 @@ Having trouble using fetch through a fir variable FTP_PASSIVE_MODE to yes, and see fetch(3) for more details. % If other operating systems have damaged your Master Boot Record, you can -reinstall it either with /usr/sbin/sysinstall or with boot0cfg(8). See +reinstall it either with boot0cfg(8). See "man boot0cfg" for details. % If you accidentally end up inside vi, you can quit it by pressing Escape, colon From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 03:06: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 63AEAB26; Mon, 22 Oct 2012 03:06:54 +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 4B8EB8FC0A; Mon, 22 Oct 2012 03:06: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 q9M36sTM017722; Mon, 22 Oct 2012 03:06:54 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M36s7c017719; Mon, 22 Oct 2012 03:06:54 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220306.q9M36s7c017719@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 03:06:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241846 - in head/games: bcd caesar X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 03:06:54 -0000 Author: eadler Date: Mon Oct 22 03:06:53 2012 New Revision: 241846 URL: http://svn.freebsd.org/changeset/base/241846 Log: bcd isn't installed setuid. caesar isn't installed setuid. For the archaeologists: it seems this call originally came from NetBSD PR 5970 and 5945 PR: 172566 Submitted by: Erik Cederstrand Approved by: cperciva MFC after: 3 days Modified: head/games/bcd/bcd.c head/games/caesar/caesar.c Modified: head/games/bcd/bcd.c ============================================================================== --- head/games/bcd/bcd.c Mon Oct 22 03:00:43 2012 (r241845) +++ head/games/bcd/bcd.c Mon Oct 22 03:06:53 2012 (r241846) @@ -129,9 +129,6 @@ main(int argc, char **argv) { char cardline[80]; - /* revoke setgid privileges */ - setgid(getgid()); - /* * The original bcd prompts with a "%" when reading from stdin, * but this seems kind of silly. So this one doesn't. Modified: head/games/caesar/caesar.c ============================================================================== --- head/games/caesar/caesar.c Mon Oct 22 03:00:43 2012 (r241845) +++ head/games/caesar/caesar.c Mon Oct 22 03:06:53 2012 (r241846) @@ -82,9 +82,6 @@ main(int argc, char **argv) char *inbuf; int obs[26], try, winner; - /* revoke setgid privileges */ - setgid(getgid()); - if (argc > 1) printit(argv[1]); From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 03:06: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 BF0FAB2A; Mon, 22 Oct 2012 03:06: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 A6B868FC08; Mon, 22 Oct 2012 03:06: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 q9M36xxk017772; Mon, 22 Oct 2012 03:06:59 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M36xR5017770; Mon, 22 Oct 2012 03:06:59 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220306.q9M36xR5017770@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 03:06:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241847 - head/games/random X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 03:06:59 -0000 Author: eadler Date: Mon Oct 22 03:06:59 2012 New Revision: 241847 URL: http://svn.freebsd.org/changeset/base/241847 Log: Free buf when its no longer used. This helps eliminate a static analysis warning. PR: ports/172566 Submitted by: Erik Cederstrand Approved by: cperciva MFC after: 3 days Modified: head/games/random/randomize_fd.c Modified: head/games/random/randomize_fd.c ============================================================================== --- head/games/random/randomize_fd.c Mon Oct 22 03:06:53 2012 (r241846) +++ head/games/random/randomize_fd.c Mon Oct 22 03:06:59 2012 (r241847) @@ -207,6 +207,8 @@ randomize_fd(int fd, int type, int uniqu goto make_token; } + free(buf); + for (i = numnode; i > 0; i--) { selected = random() % numnode; From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 03:07: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 07EC7D3F; Mon, 22 Oct 2012 03:07: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 556488FC0C; Mon, 22 Oct 2012 03:07: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 q9M376s6017851; Mon, 22 Oct 2012 03:07:06 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M375PN017842; Mon, 22 Oct 2012 03:07:05 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220307.q9M375PN017842@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 03:07:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241848 - in head: libexec/tftpd sbin/ccdconfig sbin/restore usr.bin/lock usr.bin/msgs usr.bin/wall usr.sbin/edquota usr.sbin/kgmon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 03:07:07 -0000 Author: eadler Date: Mon Oct 22 03:07:05 2012 New Revision: 241848 URL: http://svn.freebsd.org/changeset/base/241848 Log: Check the return error of set[e][ug]id. While this can never fail in the current version of FreeBSD, this isn't guarenteed by the API. Custom security modules, or future implementations of the setuid and setgid may fail. Submitted by: Erik Cederstrand Approved by: cperciva MFC after: 3 days Modified: head/libexec/tftpd/tftpd.c head/sbin/ccdconfig/ccdconfig.c head/sbin/restore/tape.c head/usr.bin/lock/lock.c head/usr.bin/msgs/msgs.c head/usr.bin/wall/wall.c head/usr.sbin/edquota/edquota.c head/usr.sbin/kgmon/kgmon.c Modified: head/libexec/tftpd/tftpd.c ============================================================================== --- head/libexec/tftpd/tftpd.c Mon Oct 22 03:06:59 2012 (r241847) +++ head/libexec/tftpd/tftpd.c Mon Oct 22 03:07:05 2012 (r241848) @@ -371,7 +371,10 @@ main(int argc, char *argv[]) } chdir("/"); setgroups(1, &nobody->pw_gid); - setuid(nobody->pw_uid); + if (setuid(nobody->pw_uid) != 0) { + tftp_log(LOG_ERR, "setuid failed"); + exit(1); + } } len = sizeof(me_sock); Modified: head/sbin/ccdconfig/ccdconfig.c ============================================================================== --- head/sbin/ccdconfig/ccdconfig.c Mon Oct 22 03:06:59 2012 (r241847) +++ head/sbin/ccdconfig/ccdconfig.c Mon Oct 22 03:07:05 2012 (r241848) @@ -288,13 +288,16 @@ do_all(int action) rval = 0; egid = getegid(); - setegid(getgid()); + if (setegid(getgid()) != 0) + err(1, "setegid failed"); if ((f = fopen(ccdconf, "r")) == NULL) { - setegid(egid); + if (setegid(egid) != 0) + err(1, "setegid failed"); warn("fopen: %s", ccdconf); return (1); } - setegid(egid); + if (setegid(egid) != 0) + err(1, "setegid failed"); while (fgets(line, sizeof(line), f) != NULL) { argc = 0; Modified: head/sbin/restore/tape.c ============================================================================== --- head/sbin/restore/tape.c Mon Oct 22 03:06:59 2012 (r241847) +++ head/sbin/restore/tape.c Mon Oct 22 03:07:05 2012 (r241848) @@ -164,7 +164,11 @@ setinput(char *source, int ispipecommand } pipein++; } - setuid(getuid()); /* no longer need or want root privileges */ + /* no longer need or want root privileges */ + if (setuid(getuid()) != 0) { + fprintf(stderr, "setuid failed\n"); + done(1); + } magtape = strdup(source); if (magtape == NULL) { fprintf(stderr, "Cannot allocate space for magtape buffer\n"); Modified: head/usr.bin/lock/lock.c ============================================================================== --- head/usr.bin/lock/lock.c Mon Oct 22 03:06:59 2012 (r241847) +++ head/usr.bin/lock/lock.c Mon Oct 22 03:07:05 2012 (r241848) @@ -129,7 +129,9 @@ main(int argc, char **argv) } timeout.tv_sec = sectimeout * 60; - setuid(getuid()); /* discard privs */ + /* discard privs */ + if (setuid(getuid()) != 0) + errx(1, "setuid failed"); if (tcgetattr(0, &tty)) /* get information for header */ exit(1); Modified: head/usr.bin/msgs/msgs.c ============================================================================== --- head/usr.bin/msgs/msgs.c Mon Oct 22 03:06:59 2012 (r241847) +++ head/usr.bin/msgs/msgs.c Mon Oct 22 03:07:05 2012 (r241848) @@ -175,7 +175,8 @@ main(int argc, char *argv[]) setlocale(LC_ALL, ""); time(&t); - setuid(uid = getuid()); + if (setuid(uid = getuid()) != 0) + err(1, "setuid failed"); ruptible = (signal(SIGINT, SIG_IGN) == SIG_DFL); if (ruptible) signal(SIGINT, SIG_DFL); Modified: head/usr.bin/wall/wall.c ============================================================================== --- head/usr.bin/wall/wall.c Mon Oct 22 03:06:59 2012 (r241847) +++ head/usr.bin/wall/wall.c Mon Oct 22 03:07:05 2012 (r241848) @@ -240,7 +240,8 @@ makemsg(char *fname) setegid(getgid()); if (freopen(fname, "r", stdin) == NULL) err(1, "can't read %s", fname); - setegid(egid); + if (setegid(egid) != 0) + err(1, "setegid failed"); } cnt = 0; while (fgetws(lbuf, sizeof(lbuf)/sizeof(wchar_t), stdin)) { Modified: head/usr.sbin/edquota/edquota.c ============================================================================== --- head/usr.sbin/edquota/edquota.c Mon Oct 22 03:06:59 2012 (r241847) +++ head/usr.sbin/edquota/edquota.c Mon Oct 22 03:07:05 2012 (r241848) @@ -453,8 +453,10 @@ editit(char *tmpf) const char *ed; sigsetmask(omask); - setgid(getgid()); - setuid(getuid()); + if (setgid(getgid()) != 0) + err(1, "setgid failed"); + if (setuid(getuid()) != 0) + err(1, "setuid failed"); if ((ed = getenv("EDITOR")) == (char *)0) ed = _PATH_VI; execlp(ed, ed, tmpf, (char *)0); Modified: head/usr.sbin/kgmon/kgmon.c ============================================================================== --- head/usr.sbin/kgmon/kgmon.c Mon Oct 22 03:06:59 2012 (r241847) +++ head/usr.sbin/kgmon/kgmon.c Mon Oct 22 03:07:05 2012 (r241848) @@ -90,7 +90,9 @@ main(int argc, char **argv) struct kvmvars kvmvars; char *system, *kmemf; - seteuid(getuid()); + if (seteuid(getuid()) != 0) { + err(1, "seteuid failed\n"); + } kmemf = NULL; system = NULL; while ((ch = getopt(argc, argv, "M:N:Bbhpr")) != -1) { From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 03:08: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 C196EFF9 for ; Mon, 22 Oct 2012 03:08:52 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ie0-f182.google.com (mail-ie0-f182.google.com [209.85.223.182]) by mx1.freebsd.org (Postfix) with ESMTP id 792678FC17 for ; Mon, 22 Oct 2012 03:08:52 +0000 (UTC) Received: by mail-ie0-f182.google.com with SMTP id k10so4037857iea.13 for ; Sun, 21 Oct 2012 20:08:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender: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=zM70rjrR1iCcqoWn4Tow9ZLKxIYDLowb8xjvSdCwmtM=; b=Q/WARaHtwPSA64HP8VN4lZJGGGYebHMSzyIdehXfT+973Cba6XNoXDiIJEARPfg7eQ TtVVPp6BayU2ChQ5OvgvZ5jdboGl4HEETBBzRhaabfexOh/G1pBJTYuw9WlK3Mj3yjQC ThYj4kuAUFNOJIMRGZ9tDHuC8MgwWc5q2Z3SaMId98ly72WT0DpdRmvW1qQg+0MSTsmq 64scriL/r2tS9VX/DRbsbbkIr9Rgj81XJEmEJuovy2DAcvLiFlRqjgeozjhpaqRfHNuJ /cBcLmwxYfS5ZcuStAI1nsHEVECxbvUQMNghde2FLvxnfhCjb5FHtcN4Qlm2w9UZBaW2 +2oA== Received: by 10.50.169.100 with SMTP id ad4mr7841649igc.50.1350875331966; Sun, 21 Oct 2012 20:08:51 -0700 (PDT) Received: from 63.imp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPS id i10sm21691453igb.12.2012.10.21.20.08.50 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 21 Oct 2012 20:08:51 -0700 (PDT) Sender: Warner Losh Subject: Re: svn commit: r241755 - head/lib/msun/src Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <20121020150917.I1095@besplex.bde.org> Date: Sun, 21 Oct 2012 21:08:49 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <18177777-6EE0-4103-98B0-272EFF98FE96@bsdimp.com> References: <201210192246.q9JMkm4R092929@svn.freebsd.org> <20121020150917.I1095@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.1084) X-Gm-Message-State: ALoCoQm4K0od6trBo+6dum0jLukd42zezFLJ/0p7pIyi/DMgM6WwznoRc61XdxI9cnQslb03vygT Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 03:08:52 -0000 Feel free to fix them however. I added the comments because the = algorithms weren't quite the same... If you have a better way, feel = free to back my stuff out on the way to it. Warner On Oct 19, 2012, at 11:43 PM, Bruce Evans wrote: > On Fri, 19 Oct 2012, Warner Losh wrote: >=20 >> Log: >> Document the methods used to compute logf. Taken and edited from the >> double version, with adaptations for the differences between it and >> the float version. >=20 > Please back this out. >=20 > This was intentionally left out. It is painful to maintain large > comments that should be identical for all precisions. Double = precision > is primary, and only comments that depend on the precision should be > given in other precisions, except for short comments to to right of > coulde whose non-duplication would just give larger diffs. If you > want to duplicate them, then they would often have to be = quadruplicated > in 4 files for the 4 supported precisions: > - double precision > - float precision > - long double with MANT_DIG =3D 64 and 16 other bits > - long double with MANT_DIG =3D 113 and 15 other bits > Only 4 now, but there could easily be variations for long doubles. >=20 > log* will be replaced by my version soon. One of the organizational > things that I'm currently struggling with is how not to duplicate the > comments in them. Currently I duplicate then in 4 files, and don't > quite duplicate then in a 5th file for optimized float precision. > Maintaining them has been very painful. They are about 3 times as = large > as the comments here, and have more and more-delicate = precision-dependent > details, so trimming them is harder than here. They do cover all of > log*(), log1p*(), log2*() and log10*() in the same file, so there is > not as much duplication as for the different e_log*.c files. >=20 > Another organizational problem is how to organize the functions. I > currently have 4 primary interfaces per file (should have a couple > more for kernels), and 1 file for each precision, and currently use > inlines and ifdefs to avoid these inlines, but the inlines are > not properly optimized for all cases of interest, and break debugging > in most cases, so I plan to switch to more macro hackery (like = multiple > #include __FILE__'s with ifdefs to select what is compiled for each > #include) . Even more macro hackery would let me put support for all > precisions in the same files, so duplicated comments would be even = less > useful, but the precision-dependent ones would be even harder to write > and read. >=20 > We are developing inverse trig functions, and handle the comments and > other things by generating code for all precisions from the double > precision case. Large comments are stripped as part of the = generation. > This is easier to write but not so good to read. This is only = feasible > because the code is not very precision-dependent. >=20 >> Modified: head/lib/msun/src/e_logf.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/msun/src/e_logf.c Fri Oct 19 22:21:01 2012 = (r241754) >> +++ head/lib/msun/src/e_logf.c Fri Oct 19 22:46:48 2012 = (r241755) >> @@ -19,6 +19,57 @@ __FBSDID("$FreeBSD$"); >> #include "math.h" >> #include "math_private.h" >>=20 >> +/* __ieee754_log(x) >=20 > Here the comment doesn't even match the code. This is = __ieee754_logf(x), > not __ieee754_log(). Technically, this is a comment that depends on = the > precision, so it should be given separately, but the differences for = type > suffixes are especially painful to maintain in comments and especially > useless to document in comments. >=20 >> + * Return the logrithm of x >=20 > This duplicates e_log.c to a fault. Fixing this spelling error would > require touching multiple files. >=20 >> + * >> + * Method : >> + * 1. Argument Reduction: find k and f such that >> + * x =3D 2^k * (1+f), >> + * where sqrt(2)/2 < 1+f < sqrt(2) . >> + * >> + * 2. Approximation of log(1+f). >> + * Let s =3D f/(2+f) ; based on log(1+f) =3D log(1+s) - = log(1-s) >> + * =3D 2s + 2/3 s**3 + 2/5 s**5 + ....., >> + * =3D 2s + s*R >=20 > Nothing new here. I don't want to see it again. >=20 >> + * We use a special Reme algorithm on [0,0.1716] to generate >> + * a polynomial of degree 8 to approximate R The maximum error >> + * of this polynomial approximation is bounded by 2**-34.24. In >> + * other words, >=20 > Lots more spelling and grammar errors. I'm not sure if the correct = spelling > is Remez or Remes, but I'm sure it isn't Reme. One sentence break is > missing a "." and the others are consistently too short. >=20 > The 2**-34.24 number is precision-dependent and is documented in more > completely below using my automatically generated comment that gives a > consistent format. (I haven't merged this improvement back into = e_log.c.) > Now there is duplication even within the same file :-(. >=20 >> + * 2 4 6 8 >> + * R(z) ~ Lg1*s +Lg2*s +Lg3*s +Lg4*s >=20 > The number of coeffs is indeed precision-dependent, but uninteresting. > My constent format for poly coeffs doesn't mention them in comments. > It is enough to spell the constants for them in a consistent way > (consistent across all sources, not just log*). >=20 >> + * (the values of Lg1 to Lg7 are listed in the program) >=20 > Here the comment doesn't even match the code. There is no Lg5 to > Lg7 for float precision. >=20 >> + * and >> + * | 2 8 | -34.24 >> + * | Lg1*s +...+Lg4*s - R(z) | <=3D 2 >> + * | | >=20 > Another excessively verbose comment duplicated. It has the magic = number > -34.24 again, so this number is now triplicated. >=20 >> + * Note that 2s =3D f - s*f =3D f - hfsq + s*hfsq, where hfsq =3D= f*f/2. >> + * In order to guarantee error in log below 1ulp, we compute = log >> + * by >> + * log(1+f) =3D f - s*(f - R) (if f is not too = large) >> + * log(1+f) =3D f - (hfsq - s*(hfsq+R)). (better = accuracy) >> + * >> + * 3. Finally, log(x) =3D k*ln2 + log(1+f). >> + * =3D = k*ln2_hi+(f-(hfsq-(s*(hfsq+R)+k*ln2_lo))) >> + * Here ln2 is split into two floating point number: >> + * ln2_hi + ln2_lo, >=20 > Nothing new here. I don't want to see it again. >=20 >> + * where n*ln2_hi is always exact for |n| < 2000. >=20 > Now just wrong. 2000 is for double precision. 2048 would be better = there. > It is what we arrange for, to go slightly above 1024.) Here we need = to > go slightly above 128, and arrange for < 256. This is one of the = points > documented better in my log*. Its documentation belongs closer to the > declaration of ln2_hi where you can see the bits being left out of it. > But my comments for this grew too large. They describe complications = like > using the same splitting for double precision as for long double = precision > (go slightly above 16384 instead of slightly abive 1024, at an = insignificant > cost of precision), and sharing ln2_hi/lo with a table value where = even > more bits sometimes have to be left out of ln2_hi, depending on = complicated > options and the precision. They described the details of why the = number > of bits chosen is needed, and gave the acceptable ranges but have been > reduced a bit closer to saying something like "ln2_hi is rounded to a > number of bits that works [to satisfy constraints explained = elsewhere". >=20 >> + * >> + * Special cases: >> + * log(x) is NaN with signal if x < 0 (including -INF) ; >> + * log(+INF) is +INF; log(0) is -INF with signal; >> + * log(NaN) is that NaN with no signal. >=20 > Nothing new here. I don't want to see it again. >=20 >> + * >> + * Accuracy: >> + * according to an error analysis, the error is always less = than >> + * 1 ulp (unit in the last place). >=20 > Actually, expf() has been exhaustively tested, so its error is known > much more precisely than the error analysis can give. The details are > too MD and unimportant to give here. >=20 > e_log.c is not the place to describe what an ulp is. Garbage should > be removed before duplicating things. >=20 >> + * >> + * Constants: >> + * The hexadecimal values are the intended ones for the following >> + * constants. The decimal values may be used, provided that the >> + * compiler will convert from decimal to binary accurately enough >> + * to produce the hexadecimal values shown. >> + */ >=20 > More non-useful boilerplate. This comment is FUD about pre-C90 = compilers, > since compilers couldn't be trusted to round correctly long ago. = After > C99, we could use hex constants to reduce rounding problems, but I = don't > want to churn the sources for this, and prefer decimal constants in = most > cases, with hex values in comments (mainly for debugging -- hex = constants > tend to be more usefull iff you are looking at hex values in a = register). >=20 >> + >> static const float >> ln2_hi =3D 6.9313812256e-01, /* 0x3f317180 */ >> ln2_lo =3D 9.0580006145e-06, /* 0x3717f7d1 */ >>=20 >=20 > This still uses fdlibm's old format in which the hex values are given = as > pseudo-literals in hex in comments. The couldn't use C99 hex literals > because C99 didn't exist. They are more readable in this form, since > C99 hex literals handle exponents poorly, so it is hard to see what = they > are in bits and you just can't express the special cases where hex is > most needed (Infs and NaNs) as C99 hex literals. But when I optimized > and otherwise improved the LgN* contants, I had not settled on a = format > and didn't even translate to the above format like I did in some other > places, so my LgN* declarations are of the form '; > /* */'. >=20 > I was also sloppy with the -34.24 constant when I did that. It seems > to be rounded in the wrong direction. I now get -34.22 (rounded to > nearest) and round it in a safe direction to -34.2. Note that this > constant doesn't quite allow the accuracy in the poly to be read off > as 34.2 bits. It is scaled relative to s, but the accuracy in bits > should be scaled relative to |log(1+s)-log(1-s)| rounded down to a > power of 2. This is ~2*s. Normally for such estimates, scaling by > s is off by a factor of at most 2 so we can read off an accuracy of > 33.2 bits, but here the factor of 2 in 2*s means that we can read off > an accuracy of 33.2 +- 1 bits. Anyway, the -34.24 has lots of spare > bits, so its minor inaccuracies don't matter and can be be found by > exhaustive checking. But it is strictly wrong when its value is given > in constants. e_log.c gives the related bound of 2**-58.45. This is > scaled by s, so it takes minor interpretation too. It seems to be > correctly rounded. >=20 > Bruce From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 03:11: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 2D996285 for ; Mon, 22 Oct 2012 03:11:16 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ie0-f182.google.com (mail-ie0-f182.google.com [209.85.223.182]) by mx1.freebsd.org (Postfix) with ESMTP id BCB0A8FC14 for ; Mon, 22 Oct 2012 03:11:15 +0000 (UTC) Received: by mail-ie0-f182.google.com with SMTP id k10so4039609iea.13 for ; Sun, 21 Oct 2012 20:11:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender: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=K1mDPAchwjUE1giMbEguuDDU5ocLMdbQvHGpgQ+d3pY=; b=S7cjymyISblWit76W5KHwKGG5H4Hqi6C2ZNJGN0h7uNdtTYwXoaap9GSxZhHJXtfHr JPV2PffF3qyyeaNwZ9IoHCMMCtcHwJ7mYDtTypsG0bPxFOicMwMbx4Jw6s48YEMEB8C4 nubOGb74eJDIi009MdwWYI3LopasZEXVgRDflmPvVy+/EDv+rBkBMbc68y0bEnFgXJxs kSb/A8RBj9s8X5CrLEOt9sSAuwtnH7LQSaoqI/pUh1wTneR5m+hIOO6kKItcROV5XsrO V1Hgs0yd9tJoVu55iE45rOg4ZXEh03sMFVpeF4dzvbenYrgYC+0OJG47oJoEvHk2ce5y x91g== Received: by 10.50.41.132 with SMTP id f4mr7792524igl.39.1350875475344; Sun, 21 Oct 2012 20:11:15 -0700 (PDT) Received: from 63.imp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPS id x5sm12472600igc.14.2012.10.21.20.11.10 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 21 Oct 2012 20:11:14 -0700 (PDT) Sender: Warner Losh Subject: Re: svn commit: r241757 - head/usr.sbin/pciconf Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <201210200830.26755.jhb@freebsd.org> Date: Sun, 21 Oct 2012 21:11:09 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <12563773-B5F9-4F48-A1A7-45E15296F9C4@bsdimp.com> References: <201210192248.q9JMmMpt093234@svn.freebsd.org> <201210200830.26755.jhb@freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1084) X-Gm-Message-State: ALoCoQl7WjChJtsq0111tNlG9YvE+tnJ1EvASBJFCCHsS4wbWhnmowuD+sd/ls6SfLM0+d5Ijkjx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 03:11:16 -0000 On Oct 20, 2012, at 6:30 AM, John Baldwin wrote: > On Friday, October 19, 2012 06:48:22 PM Warner Losh wrote: >> Author: imp >> Date: Fri Oct 19 22:48:22 2012 >> New Revision: 241757 >> URL: http://svn.freebsd.org/changeset/base/241757 >>=20 >> Log: >> Indent ecaps the same way we indent caps. >=20 > This was on purpose so the '=3D' signs line up It makes it hard to parse otherwise... Perhaps the equal lining up = should be documented? Or at least be fixed to match everything else. = When ecaps were added the broke indentation... I'm happy to fix the alignment issue. Warner > . In fact, prior to this change,=20 > all of the equal signs line up: >=20 > igb0@pci0:8:0:0: class=3D0x020000 card=3D0x10a715d9 = chip=3D0x10a78086=20 > rev=3D0x02 hdr=3D0x00 > vendor =3D 'Intel Corporation' > device =3D '82575EB Gigabit Network Connection' > class =3D network > subclass =3D ethernet > bar [10] =3D type Memory, range 32, base 0xda020000, size 131072, = enabled > bar [14] =3D type Memory, range 32, base 0xda000000, size 131072, = enabled > bar [18] =3D type I/O Port, range 32, base 0x3000, size 32, = enabled > bar [1c] =3D type Memory, range 32, base 0xda080000, size 16384, = enabled > cap 01[40] =3D powerspec 2 supports D0 D3 current D0 > cap 05[50] =3D MSI supports 1 message, 64 bit=20 > cap 11[60] =3D MSI-X supports 10 messages in map 0x1c enabled > cap 10[a0] =3D PCI-Express 2 endpoint max data 128(256) link x4(x4) > ecap 0001[100] =3D AER 1 0 fatal 0 non-fatal 1 corrected > ecap 0003[140] =3D Serial 1 003048ffff5f9170 > PCI-e errors =3D Correctable Error Detected > Unsupported Request Detected > Corrected =3D Advisory Non-Fatal Error >=20 >=20 > --=20 > John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 03:11: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 24D903F5 for ; Mon, 22 Oct 2012 03:11:35 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ia0-f182.google.com (mail-ia0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id D1FA98FC0C for ; Mon, 22 Oct 2012 03:11:34 +0000 (UTC) Received: by mail-ia0-f182.google.com with SMTP id k10so2337205iag.13 for ; Sun, 21 Oct 2012 20:11:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender: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=n5NSlsUhwEYDwDUcJlABF90gPlmnFVlh3SXWBB+LH8w=; b=fWaHp2Wtpa09uDxhq5sQcAczx9MXUzCkcp7temiqSMGJtI8t/2sWlpVb6UgvrgnDfb Q1n5utono8TJ+dvNLg1a63Df3xewBJl3ryTsJSSTMHr0xwywNgkOVMD1GqO99n1T5Ich GWyZzeHiYmagi/4BJz/SfaZUm11jo8SLgdvMYszJnMk5xLkC5ip85Sit+Jqhl91+IZVJ DnTnx5yXWrE8JrlGw5sZVqCdsG6+LyTwZ9nzHzrJyefVVJ2C7VzgkSEIoMY3NaaFdAz2 3R5mqGm4P0yyiI4n/sspHrlLUkaTO3Ikbvw7hHeu2JHF8enQ6vtpwszx+A8tyBU/qckE vvbA== Received: by 10.50.40.225 with SMTP id a1mr8699753igl.7.1350875494462; Sun, 21 Oct 2012 20:11:34 -0700 (PDT) Received: from 63.imp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPS id x5sm12472600igc.14.2012.10.21.20.11.28 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 21 Oct 2012 20:11:30 -0700 (PDT) Sender: Warner Losh Subject: Re: svn commit: r241758 - head/sys/dev/pci Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <201210200833.08542.jhb@freebsd.org> Date: Sun, 21 Oct 2012 21:11:24 -0600 Content-Transfer-Encoding: 7bit Message-Id: References: <201210192310.q9JNAt7n096894@svn.freebsd.org> <201210200833.08542.jhb@freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1084) X-Gm-Message-State: ALoCoQnXd7bVxX6bZV78Y+ctn88fjGbR4u1B6Gu80B1mno2UoqIVLDlZck+o7Ltos5AHN71uDY4F Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 03:11:35 -0000 On Oct 20, 2012, at 6:33 AM, John Baldwin wrote: > On Friday, October 19, 2012 07:10:55 PM Warner Losh wrote: >> Author: imp >> Date: Fri Oct 19 23:10:55 2012 >> New Revision: 241758 >> URL: http://svn.freebsd.org/changeset/base/241758 >> >> Log: >> Add missing Extended Capability ID Numbers from PCIe 3.0. > > Can you add these names to the switch in pciconf's cap.c? > >> +#define PCIZ_DPC 0x001d /* Downstream Porto Containment */ > > s/Porto/Port/? Sure to both. Warner From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 03:16: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 BC5895F4; Mon, 22 Oct 2012 03:16:33 +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 A3CD18FC08; Mon, 22 Oct 2012 03:16: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 q9M3GX4T019645; Mon, 22 Oct 2012 03:16:33 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M3GXYB019643; Mon, 22 Oct 2012 03:16:33 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220316.q9M3GXYB019643@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 03:16:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241849 - head/usr.sbin/nfsd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 03:16:33 -0000 Author: eadler Date: Mon Oct 22 03:16:32 2012 New Revision: 241849 URL: http://svn.freebsd.org/changeset/base/241849 Log: Fix typo in error when unable to create TCP socket PR: bin/172490 Submitted by: bdrewery Approved by: cperciva MFC after: 3 days Modified: head/usr.sbin/nfsd/nfsd.c Modified: head/usr.sbin/nfsd/nfsd.c ============================================================================== --- head/usr.sbin/nfsd/nfsd.c Mon Oct 22 03:07:05 2012 (r241848) +++ head/usr.sbin/nfsd/nfsd.c Mon Oct 22 03:16:32 2012 (r241849) @@ -590,7 +590,7 @@ main(int argc, char **argv) if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) { syslog(LOG_ERR, - "can't create tpc socket"); + "can't create tcp socket"); nfsd_exit(1); } if (setsockopt(tcpsock, SOL_SOCKET, From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 03:16: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 0CB176F4; Mon, 22 Oct 2012 03:16: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 E280C8FC0A; Mon, 22 Oct 2012 03:16: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 q9M3Gdg5019696; Mon, 22 Oct 2012 03:16:39 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M3GdQw019692; Mon, 22 Oct 2012 03:16:39 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220316.q9M3GdQw019692@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 03:16:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241850 - in head/sys: amd64/amd64 i386/i386 pc98/pc98 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 03:16:40 -0000 Author: eadler Date: Mon Oct 22 03:16:39 2012 New Revision: 241850 URL: http://svn.freebsd.org/changeset/base/241850 Log: Explain the upcoming delay by printing a message when the kernel is about to begin testing memory. Reviewed by: dteske, adri Approved by: cperciva MFC after: 1 week Modified: head/sys/amd64/amd64/machdep.c head/sys/i386/i386/machdep.c head/sys/pc98/pc98/machdep.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Mon Oct 22 03:16:32 2012 (r241849) +++ head/sys/amd64/amd64/machdep.c Mon Oct 22 03:16:39 2012 (r241850) @@ -1532,6 +1532,8 @@ getmemsize(caddr_t kmdp, u_int64_t first if (memtest == 0) goto skip_memtest; + printf("testing memory...\n"); + /* * map page into kernel: valid, read/write,non-cacheable */ Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Mon Oct 22 03:16:32 2012 (r241849) +++ head/sys/i386/i386/machdep.c Mon Oct 22 03:16:39 2012 (r241850) @@ -2459,6 +2459,8 @@ physmap_done: if (memtest == 0) goto skip_memtest; + printf("testing memory...\n"); + /* * map page into kernel: valid, read/write,non-cacheable */ Modified: head/sys/pc98/pc98/machdep.c ============================================================================== --- head/sys/pc98/pc98/machdep.c Mon Oct 22 03:16:32 2012 (r241849) +++ head/sys/pc98/pc98/machdep.c Mon Oct 22 03:16:39 2012 (r241850) @@ -2042,6 +2042,8 @@ getmemsize(int first) if (memtest == 0) goto skip_memtest; + printf("testing memory...\n"); + /* * map page into kernel: valid, read/write,non-cacheable */ From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 03:30: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 5C75F9F8; Mon, 22 Oct 2012 03:30:18 +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 40D9D8FC0A; Mon, 22 Oct 2012 03:30: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 q9M3UI7i022042; Mon, 22 Oct 2012 03:30:18 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M3UILd022037; Mon, 22 Oct 2012 03:30:18 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220330.q9M3UILd022037@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 03:30:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241851 - head/share/syscons/keymaps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 03:30:18 -0000 Author: eadler Date: Mon Oct 22 03:30:17 2012 New Revision: 241851 URL: http://svn.freebsd.org/changeset/base/241851 Log: Add Danish keyboard model for macbooks to syscons. (not verified to be accurate) PR: conf/146793 Submitted by: Erik Cederstrand Approved by: cperciva MFC after: 1 week Added: head/share/syscons/keymaps/danish.iso.macbook.kbd (contents, props changed) Modified: head/share/syscons/keymaps/INDEX.keymaps head/share/syscons/keymaps/Makefile Modified: head/share/syscons/keymaps/INDEX.keymaps ============================================================================== --- head/share/syscons/keymaps/INDEX.keymaps Mon Oct 22 03:16:39 2012 (r241850) +++ head/share/syscons/keymaps/INDEX.keymaps Mon Oct 22 03:30:17 2012 (r241851) @@ -117,6 +117,8 @@ danish.cp865.kbd:fr:Danois Code page 865 danish.cp865.kbd:pt:Dinamarquês Codepage 865 danish.cp865.kbd:es:Danés Codepage 865 +danish.iso.macbook.kbd:Danish ISO-8859-1 (macbook) + dutch.iso.acc.kbd:en:Dutch ISO keymap (accent keys) eee_nordic.kbd:en:Nordic layout on Asus eeePC Modified: head/share/syscons/keymaps/Makefile ============================================================================== --- head/share/syscons/keymaps/Makefile Mon Oct 22 03:16:39 2012 (r241850) +++ head/share/syscons/keymaps/Makefile Mon Oct 22 03:30:17 2012 (r241851) @@ -10,6 +10,7 @@ FILES= INDEX.keymaps \ cs.latin2.qwertz.kbd \ cz.iso2.kbd \ danish.iso.kbd danish.iso.acc.kbd danish.cp865.kbd \ + danish.iso.macbook.kbd \ dutch.iso.acc.kbd \ eee_nordic.kbd el.iso07.kbd \ estonian.iso.kbd estonian.iso15.kbd estonian.cp850.kbd \ Added: head/share/syscons/keymaps/danish.iso.macbook.kbd ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/syscons/keymaps/danish.iso.macbook.kbd Mon Oct 22 03:30:17 2012 (r241851) @@ -0,0 +1,117 @@ +# $FreeBSD$ +# Danish ISO 8859-1 keyboard layout for Apple MacBook keyboards. Not all +# key combinations are available in this character set yet. +# by Erik Cederstrand +# alt +# scan cntrl alt alt cntrl lock +# code base shift cntrl shift alt shift cntrl shift state +# ------------------------------------------------------------------ + 000 nop nop nop nop nop nop nop nop O + 001 esc esc esc esc esc esc debug esc O + 002 '1' '!' '1' nop 161 175 '1' '1' O + 003 '2' '"' '2' '2' nop nop '2' '2' O + 004 '3' '#' '3' '3' 167 '$' '3' '3' O + 005 '4' nop '4' '4' 163 162 '4' '4' O + 006 '5' '%' '5' '5' nop nop '5' '5' O + 007 '6' '&' '6' '6' nop nop '6' '6' O + 008 '7' '/' '7' '7' 182 '\' '7' '7' O + 009 '8' '(' '8' '8' '[' '{' '8' '8' O + 010 '9' ')' '9' '9' ']' '}' '9' '9' O + 011 '0' '=' '0' '0' nop nop '0' '0' O + 012 '+' '?' '+' '+' 177 191 '+' '+' O + 013 dacu dgra dacu dacu ''' nop dacu dacu O + 014 bs del del bs del bs susp bs O + 015 ht btab ht ht ht btab ht ht O + 016 'q' 'Q' dc1 dc1 186 nop nop nop C + 017 'w' 'W' etb etb 'w' 176 nop nop C + 018 'e' 'E' enq enq 223 nop nop nop C + 019 'r' 'R' dc2 dc2 174 nop nop nop C + 020 't' 'T' dc4 dc4 nop nop nop nop C + 021 'y' 'Y' em em 165 255 nop nop C + 022 'u' 'U' nak nak 252 nop nop nop C + 023 'i' 'I' ht ht '|' nop nop nop C + 024 'o' 'O' si si nop nop nop nop C + 025 'p' 'P' dle dle nop nop nop nop C + 026 229 nop nop nop nop nop nop nop C + 027 168 '^' nop nop '~' '^' '~' '~' O + 028 cr cr nl nl cr cr nl nl O + 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O + 030 'a' 'A' soh soh 170 nop nop nop C + 031 's' 'S' dc3 dc3 nop nop nop nop C + 032 'd' 'D' eot eot 240 nop nop nop C + 033 'f' 'F' ack ack nop nop nop nop C + 034 'g' 'G' bel bel 169 nop nop nop C + 035 'h' 'H' bs bs 171 187 nop nop C + 036 'j' 'J' nl nl nop nop nop nop C + 037 'k' 'K' vt vt nop nop nop nop C + 038 'l' 'L' ff ff 172 nop nop nop C + 039 230 nop nop nop 228 nop nop nop C + 040 248 nop nop nop 246 nop nop nop C + 041 '$' 167 '0' '0' nop ''' nop nop O + 042 lshift lshift lshift lshift lshift lshift lshift lshift O + 043 ''' '*' nop nop '@' nop nop nop O + 044 'z' 'Z' sub sub nop 184 nop nop C + 045 'x' 'X' can can nop nop nop nop C + 046 'c' 'C' etx etx 231 nop nop nop C + 047 'v' 'V' syn syn 'v' 'V' nop nop C + 048 'b' 'B' stx stx nop nop nop nop C + 049 'n' 'N' so so 241 nop nop nop C + 050 'm' 'M' cr cr 181 nop nop nop C + 051 ',' ';' ',' ',' ',' ';' ',' ',' O + 052 '.' ':' '.' '.' 183 247 '.' '.' O + 053 '-' '_' '-' '-' '-' nop '-' '-' O + 054 rshift rshift rshift rshift rshift rshift rshift rshift O + 055 '*' '*' '*' '*' '*' '*' '*' '*' O + 056 lalt lalt lalt lalt lalt lalt lalt lalt O + 057 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O + 058 clock clock clock clock clock clock clock clock O + 059 fkey01 nlock fkey25 fkey37 scr01 scr11 scr01 scr11 O + 060 fkey02 slock fkey26 fkey38 scr02 scr12 scr02 scr12 O + 061 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O + 062 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O + 063 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O + 064 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O + 065 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O + 066 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O + 067 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O + 068 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O + 069 nlock nlock nlock nlock nlock nlock nlock nlock O + 070 slock slock slock slock slock slock slock slock O + 071 '7' '7' '7' '7' '7' '7' '7' '7' N + 072 '8' '8' '8' '8' '8' '8' '8' '8' N + 073 '9' '9' '9' '9' '9' '9' '9' '9' N + 074 '-' '-' '-' '-' '-' '-' '-' '-' N + 075 '4' '4' '4' '4' '4' '4' '4' '4' N + 076 '5' '5' '5' '5' '5' '5' '5' '5' N + 077 '6' '6' '6' '6' '6' '6' '6' '6' N + 078 '+' '+' '+' '+' '+' '+' '+' '+' N + 079 '1' '1' '1' '1' '1' '1' '1' '1' N + 080 '2' '2' '2' '2' '2' '2' '2' '2' N + 081 '3' '3' '3' '3' '3' '3' '3' '3' N + 082 '0' '0' '0' '0' '0' '0' '0' '0' N + 083 ',' ',' ',' ',' ',' ',' ',' ',' N + 084 nop nop nop nop nop nop nop nop O + 085 nop nop nop nop nop nop nop nop O + 086 '<' '>' fs fs '\' '>' fs fs O + 087 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O + 088 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O + 089 cr cr nl nl cr cr nl nl O + 090 rctrl rctrl rctrl rctrl rctrl rctrl rctrl rctrl O + 091 '/' '/' '/' '/' '/' '/' '/' '/' O + 092 nscr pscr debug debug nop nop nop nop O + 093 ralt ralt ralt ralt ralt ralt ralt ralt O + 094 73 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 O + 095 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 O + 096 81 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 O + 097 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 O + 098 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 O + 099 79 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 O + 100 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 O + 101 71 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O + 102 fkey60 paste fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O + 103 del del del del del fkey61 boot fkey61 O + 104 slock saver slock saver susp nop susp nop O + 105 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 O + 106 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 O + 107 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O + 108 nop nop nop nop nop nop nop nop O From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 03:31: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 73B52B6A; Mon, 22 Oct 2012 03:31:23 +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 586EF8FC16; Mon, 22 Oct 2012 03:31: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 q9M3VNKn022277; Mon, 22 Oct 2012 03:31:23 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M3VMpT022258; Mon, 22 Oct 2012 03:31:22 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220331.q9M3VMpT022258@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 03:31:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241852 - in head: sbin/ping sbin/ping6 usr.bin/at usr.sbin/lpr/common_source usr.sbin/lpr/lpc usr.sbin/lpr/lpd usr.sbin/lpr/lpq usr.sbin/lpr/lpr usr.sbin/lpr/lprm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 03:31:23 -0000 Author: eadler Date: Mon Oct 22 03:31:22 2012 New Revision: 241852 URL: http://svn.freebsd.org/changeset/base/241852 Log: Check the return error of set[ug]id. While this can never fail in the current version of FreeBSD, this isn't guarenteed by the API. Custom security modules, or future implementations of the setuid and setgid may fail. PR: bin/172289 PR: bin/172290 PR: bin/172291 Submittud by: Erik Cederstrand Discussed by: freebsd-security Approved by: cperciva MFC after: 1 week Modified: head/sbin/ping/ping.c head/sbin/ping6/ping6.c head/usr.bin/at/privs.h head/usr.sbin/lpr/common_source/common.c head/usr.sbin/lpr/common_source/displayq.c head/usr.sbin/lpr/common_source/lp.h head/usr.sbin/lpr/common_source/net.c head/usr.sbin/lpr/common_source/rmjob.c head/usr.sbin/lpr/common_source/startdaemon.c head/usr.sbin/lpr/lpc/cmds.c head/usr.sbin/lpr/lpc/lpc.c head/usr.sbin/lpr/lpc/movejobs.c head/usr.sbin/lpr/lpd/printjob.c head/usr.sbin/lpr/lpq/lpq.c head/usr.sbin/lpr/lpr/lpr.c head/usr.sbin/lpr/lprm/lprm.c Modified: head/sbin/ping/ping.c ============================================================================== --- head/sbin/ping/ping.c Mon Oct 22 03:30:17 2012 (r241851) +++ head/sbin/ping/ping.c Mon Oct 22 03:31:22 2012 (r241852) @@ -255,7 +255,8 @@ main(int argc, char *const *argv) s = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP); sockerrno = errno; - setuid(getuid()); + if (setuid(getuid()) != 0) + err(EX_NOPERM, "setuid() failed"); uid = getuid(); alarmtimeout = df = preload = tos = 0; Modified: head/sbin/ping6/ping6.c ============================================================================== --- head/sbin/ping6/ping6.c Mon Oct 22 03:30:17 2012 (r241851) +++ head/sbin/ping6/ping6.c Mon Oct 22 03:31:22 2012 (r241852) @@ -702,8 +702,10 @@ main(int argc, char *argv[]) } /* revoke root privilege */ - seteuid(getuid()); - setuid(getuid()); + if (seteuid(getuid()) != 0) + err(1, "seteuid() failed"); + if (setuid(getuid()) != 0) + err(1, "setuid() failed"); if ((options & F_FLOOD) && (options & F_INTERVAL)) errx(1, "-f and -i incompatible options"); Modified: head/usr.bin/at/privs.h ============================================================================== --- head/usr.bin/at/privs.h Mon Oct 22 03:30:17 2012 (r241851) +++ head/usr.bin/at/privs.h Mon Oct 22 03:31:22 2012 (r241852) @@ -72,8 +72,8 @@ gid_t real_gid, effective_gid; effective_uid = geteuid(); \ real_gid = getgid(); \ effective_gid = getegid(); \ - seteuid(real_uid); \ - setegid(real_gid); \ + if (seteuid(real_uid) != 0) err(1, "seteuid failed"); \ + if (setegid(real_gid) != 0) err(1, "setegid failed"); \ } #define RELINQUISH_PRIVS_ROOT(a, b) { \ @@ -81,26 +81,26 @@ gid_t real_gid, effective_gid; effective_uid = geteuid(); \ real_gid = (b); \ effective_gid = getegid(); \ - setegid(real_gid); \ - seteuid(real_uid); \ + if (setegid(real_gid) != 0) err(1, "setegid failed"); \ + if (seteuid(real_uid) != 0) err(1, "seteuid failed"); \ } #define PRIV_START { \ - seteuid(effective_uid); \ - setegid(effective_gid); \ + if (seteuid(effective_uid) != 0) err(1, "seteuid failed"); \ + if (setegid(effective_gid) != 0) err(1, "setegid failed"); \ } #define PRIV_END { \ - setegid(real_gid); \ - seteuid(real_uid); \ + if (setegid(real_gid) != 0) err(1, "setegid failed"); \ + if (seteuid(real_uid) != 0) err(1, "seteuid failed"); \ } #define REDUCE_PRIV(a, b) { \ PRIV_START \ effective_uid = (a); \ effective_gid = (b); \ - setreuid((uid_t)-1, effective_uid); \ - setregid((gid_t)-1, effective_gid); \ + if (setreuid((uid_t)-1, effective_uid) != 0) err(1, "setreuid failed"); \ + if (setregid((gid_t)-1, effective_gid) != 0) err(1, "setregid failed"); \ PRIV_END \ } #endif Modified: head/usr.sbin/lpr/common_source/common.c ============================================================================== --- head/usr.sbin/lpr/common_source/common.c Mon Oct 22 03:30:17 2012 (r241851) +++ head/usr.sbin/lpr/common_source/common.c Mon Oct 22 03:31:22 2012 (r241852) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -125,14 +126,14 @@ getq(const struct printer *pp, struct jo DIR *dirp; int statres; - seteuid(euid); + PRIV_START if ((dirp = opendir(pp->spool_dir)) == NULL) { - seteuid(uid); + PRIV_END return (-1); } if (fstat(dirfd(dirp), &stbuf) < 0) goto errdone; - seteuid(uid); + PRIV_END /* * Estimate the array size by taking the size of the directory file @@ -149,9 +150,9 @@ getq(const struct printer *pp, struct jo while ((d = readdir(dirp)) != NULL) { if (d->d_name[0] != 'c' || d->d_name[1] != 'f') continue; /* daemon control files only */ - seteuid(euid); + PRIV_START statres = stat(d->d_name, &stbuf); - seteuid(uid); + PRIV_END if (statres < 0) continue; /* Doesn't exist */ entrysz = sizeof(struct jobqueue) - sizeof(q->job_cfname) + @@ -184,7 +185,7 @@ getq(const struct printer *pp, struct jo errdone: closedir(dirp); - seteuid(uid); + PRIV_END return (-1); } @@ -340,10 +341,10 @@ set_qstate(int action, const char *lfnam * Find what the current access-bits are. */ memset(&stbuf, 0, sizeof(stbuf)); - seteuid(euid); + PRIV_START statres = stat(lfname, &stbuf); errsav = errno; - seteuid(uid); + PRIV_END if ((statres < 0) && (errsav != ENOENT)) { printf("\tcannot stat() lock file\n"); return (SQS_STATFAIL); @@ -402,10 +403,10 @@ set_qstate(int action, const char *lfnam res = 0; if (statres >= 0) { /* The file already exists, so change the access. */ - seteuid(euid); + PRIV_START chres = chmod(lfname, chgbits); errsav = errno; - seteuid(uid); + PRIV_END res = SQS_CHGOK; if (chres < 0) res = SQS_CHGFAIL; @@ -424,10 +425,10 @@ set_qstate(int action, const char *lfnam * all the read/write bits are set as desired. */ oldmask = umask(S_IWOTH); - seteuid(euid); + PRIV_START fd = open(lfname, O_WRONLY|O_CREAT, newbits); errsav = errno; - seteuid(uid); + PRIV_END umask(oldmask); res = SQS_CREFAIL; if (fd >= 0) { Modified: head/usr.sbin/lpr/common_source/displayq.c ============================================================================== --- head/usr.sbin/lpr/common_source/displayq.c Mon Oct 22 03:30:17 2012 (r241851) +++ head/usr.sbin/lpr/common_source/displayq.c Mon Oct 22 03:31:22 2012 (r241852) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -90,7 +91,7 @@ static const char *head1 = "Total Size\ static void alarmhandler(int _signo); static void filtered_write(char *_obuffer, int _wlen, FILE *_wstream); -static void warn(const struct printer *_pp); +static void daemonwarn(const struct printer *_pp); /* * Display the current state of the queue. Format = 1 if long format. @@ -119,24 +120,24 @@ displayq(struct printer *pp, int format) * Print out local queue * Find all the control files in the spooling directory */ - seteuid(euid); + PRIV_START if (chdir(pp->spool_dir) < 0) fatal(pp, "cannot chdir to spooling directory: %s", strerror(errno)); - seteuid(uid); + PRIV_END if ((nitems = getq(pp, &queue)) < 0) fatal(pp, "cannot examine spooling area\n"); - seteuid(euid); + PRIV_START ret = stat(pp->lock_file, &statb); - seteuid(uid); + PRIV_END if (ret >= 0) { if (statb.st_mode & LFM_PRINT_DIS) { if (pp->remote) printf("%s: ", local_host); printf("Warning: %s is down: ", pp->printer); - seteuid(euid); + PRIV_START fd = open(pp->status_file, O_RDONLY|O_SHLOCK); - seteuid(uid); + PRIV_END if (fd >= 0) { while ((i = read(fd, line, sizeof(line))) > 0) (void) fwrite(line, 1, i, stdout); @@ -153,11 +154,11 @@ displayq(struct printer *pp, int format) } if (nitems) { - seteuid(euid); + PRIV_START fp = fopen(pp->lock_file, "r"); - seteuid(uid); + PRIV_END if (fp == NULL) - warn(pp); + daemonwarn(pp); else { /* get daemon pid */ cp = current; @@ -171,12 +172,12 @@ displayq(struct printer *pp, int format) if (i <= 0) { ret = -1; } else { - seteuid(euid); + PRIV_START ret = kill(i, 0); - seteuid(uid); + PRIV_END } if (ret < 0) { - warn(pp); + daemonwarn(pp); } else { /* read current file name */ cp = current; @@ -191,9 +192,9 @@ displayq(struct printer *pp, int format) */ if (pp->remote) printf("%s: ", local_host); - seteuid(euid); + PRIV_START fd = open(pp->status_file, O_RDONLY|O_SHLOCK); - seteuid(uid); + PRIV_END if (fd >= 0) { while ((i = read(fd, line, sizeof(line))) > 0) @@ -360,7 +361,7 @@ check_next: * Print a warning message if there is no daemon present. */ static void -warn(const struct printer *pp) +daemonwarn(const struct printer *pp) { if (pp->remote) printf("%s: ", local_host); @@ -391,10 +392,10 @@ inform(const struct printer *pp, char *c * There's a chance the control file has gone away * in the meantime; if this is the case just keep going */ - seteuid(euid); + PRIV_START if ((cfp = fopen(cf, "r")) == NULL) return; - seteuid(uid); + PRIV_END if (rank < 0) rank = 0; @@ -578,10 +579,10 @@ dump(const char *nfile, const char *data } first = 0; - seteuid(euid); + PRIV_START if (*datafile && !stat(datafile, &lbuf)) totsize += copies * lbuf.st_size; - seteuid(uid); + PRIV_END } /* Modified: head/usr.sbin/lpr/common_source/lp.h ============================================================================== --- head/usr.sbin/lpr/common_source/lp.h Mon Oct 22 03:30:17 2012 (r241851) +++ head/usr.sbin/lpr/common_source/lp.h Mon Oct 22 03:31:22 2012 (r241852) @@ -249,6 +249,17 @@ typedef enum { TR_SENDING, TR_RECVING, T #define CMD_SHOWQ_LONG '\4' #define CMD_RMJOB '\5' +/* + * seteuid() macros. +*/ +#define PRIV_START { \ + if (seteuid(uid) != 0) err(1, "seteuid failed"); \ +} +#define PRIV_END { \ + if (seteuid(euid) != 0) err(1, "seteuid failed"); \ +} + + #include "lp.cdefs.h" /* A cross-platform version of */ __BEGIN_DECLS Modified: head/usr.sbin/lpr/common_source/net.c ============================================================================== --- head/usr.sbin/lpr/common_source/net.c Mon Oct 22 03:30:17 2012 (r241851) +++ head/usr.sbin/lpr/common_source/net.c Mon Oct 22 03:31:22 2012 (r241852) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include /* required for lp.h, not used here */ +#include #include #include #include @@ -91,7 +92,7 @@ getport(const struct printer *pp, const { struct addrinfo hints, *res, *ai; int s, timo = 1, lport = IPPORT_RESERVED - 1; - int err, refused = 0; + int error, refused = 0; /* * Get the host address and port number to connect to. @@ -102,10 +103,10 @@ getport(const struct printer *pp, const hints.ai_family = family; hints.ai_socktype = SOCK_STREAM; hints.ai_protocol = 0; - err = getaddrinfo(rhost, (rport == 0 ? "printer" : NULL), + error = getaddrinfo(rhost, (rport == 0 ? "printer" : NULL), &hints, &res); - if (err) - fatal(pp, "%s\n", gai_strerror(err)); + if (error) + fatal(pp, "%s\n", gai_strerror(error)); if (rport != 0) ((struct sockaddr_in *) res->ai_addr)->sin_port = htons(rport); @@ -114,9 +115,9 @@ getport(const struct printer *pp, const */ ai = res; retry: - seteuid(euid); + PRIV_START s = rresvport_af(&lport, ai->ai_family); - seteuid(uid); + PRIV_END if (s < 0) { if (errno != EAGAIN) { if (ai->ai_next) { @@ -135,9 +136,9 @@ retry: return(-1); } if (connect(s, ai->ai_addr, ai->ai_addrlen) < 0) { - err = errno; + error = errno; (void) close(s); - errno = err; + errno = error; /* * This used to decrement lport, but the current semantics * of rresvport do not provide such a function (in fact, @@ -184,8 +185,8 @@ checkremote(struct printer *pp) { char lclhost[MAXHOSTNAMELEN]; struct addrinfo hints, *local_res, *remote_res, *lr, *rr; - char *err; - int ncommonaddrs, error; + char *error; + int ncommonaddrs, errno; char h1[NI_MAXHOST], h2[NI_MAXHOST]; if (!pp->rp_matches_local) { /* Remote printer doesn't match local */ @@ -205,11 +206,11 @@ checkremote(struct printer *pp) hints.ai_family = family; hints.ai_socktype = SOCK_STREAM; hints.ai_flags = AI_PASSIVE; - if ((error = getaddrinfo(lclhost, NULL, &hints, &local_res)) != 0) { - asprintf(&err, "unable to get official name " + if ((errno = getaddrinfo(lclhost, NULL, &hints, &local_res)) != 0) { + asprintf(&error, "unable to get official name " "for local machine %s: %s", - lclhost, gai_strerror(error)); - return err; + lclhost, gai_strerror(errno)); + return error; } /* get the official name of RM */ @@ -217,13 +218,13 @@ checkremote(struct printer *pp) hints.ai_family = family; hints.ai_socktype = SOCK_STREAM; hints.ai_flags = AI_PASSIVE; - if ((error = getaddrinfo(pp->remote_host, NULL, + if ((errno = getaddrinfo(pp->remote_host, NULL, &hints, &remote_res)) != 0) { - asprintf(&err, "unable to get address list for " + asprintf(&error, "unable to get address list for " "remote machine %s: %s", - pp->remote_host, gai_strerror(error)); + pp->remote_host, gai_strerror(errno)); freeaddrinfo(local_res); - return err; + return error; } ncommonaddrs = 0; Modified: head/usr.sbin/lpr/common_source/rmjob.c ============================================================================== --- head/usr.sbin/lpr/common_source/rmjob.c Mon Oct 22 03:30:17 2012 (r241851) +++ head/usr.sbin/lpr/common_source/rmjob.c Mon Oct 22 03:31:22 2012 (r241852) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -110,12 +111,12 @@ rmjob(const char *printer) person = root; } - seteuid(euid); + PRIV_START if (chdir(pp->spool_dir) < 0) fatal(pp, "cannot chdir to spool directory"); if ((nitems = scandir(".", &files, iscf, NULL)) < 0) fatal(pp, "cannot access spool directory"); - seteuid(uid); + PRIV_END if (nitems) { /* @@ -124,9 +125,9 @@ rmjob(const char *printer) * (after which we have to restart the daemon). */ if (lockchk(pp, pp->lock_file) && chk(current)) { - seteuid(euid); + PRIV_START assassinated = kill(cur_daemon, SIGINT) == 0; - seteuid(uid); + PRIV_END if (!assassinated) fatal(pp, "cannot kill printer daemon"); } @@ -156,14 +157,14 @@ lockchk(struct printer *pp, char *slockf register FILE *fp; register int i, n; - seteuid(euid); + PRIV_START if ((fp = fopen(slockf, "r")) == NULL) { if (errno == EACCES) fatal(pp, "%s: %s", slockf, strerror(errno)); else return(0); } - seteuid(uid); + PRIV_END if (!getline(fp)) { (void) fclose(fp); return(0); /* no daemon present */ @@ -195,10 +196,10 @@ process(const struct printer *pp, char * if (!chk(file)) return; - seteuid(euid); + PRIV_START if ((cfp = fopen(file, "r")) == NULL) fatal(pp, "cannot open %s", file); - seteuid(uid); + PRIV_END while (getline(cfp)) { switch (line[0]) { case 'U': /* unlink associated files */ @@ -218,9 +219,9 @@ do_unlink(char *file) if (from_host != local_host) printf("%s: ", local_host); - seteuid(euid); + PRIV_START ret = unlink(file); - seteuid(uid); + PRIV_END printf(ret ? "cannot dequeue %s\n" : "%s dequeued\n", file); } @@ -248,10 +249,10 @@ chk(char *file) /* * get the owner's name from the control file. */ - seteuid(euid); + PRIV_START if ((cfp = fopen(file, "r")) == NULL) return(0); - seteuid(uid); + PRIV_END while (getline(cfp)) { if (line[0] == 'P') break; Modified: head/usr.sbin/lpr/common_source/startdaemon.c ============================================================================== --- head/usr.sbin/lpr/common_source/startdaemon.c Mon Oct 22 03:30:17 2012 (r241851) +++ head/usr.sbin/lpr/common_source/startdaemon.c Mon Oct 22 03:31:22 2012 (r241852) @@ -74,9 +74,9 @@ startdaemon(const struct printer *pp) #ifndef SUN_LEN #define SUN_LEN(unp) (strlen((unp)->sun_path) + 2) #endif - seteuid(euid); + PRIV_START connectres = connect(s, (struct sockaddr *)&un, SUN_LEN(&un)); - seteuid(uid); + PRIV_END if (connectres < 0) { warn("Unable to connect to %s", _PATH_SOCKETNAME); warnx("Check to see if the master 'lpd' process is running."); Modified: head/usr.sbin/lpr/lpc/cmds.c ============================================================================== --- head/usr.sbin/lpr/lpc/cmds.c Mon Oct 22 03:30:17 2012 (r241851) +++ head/usr.sbin/lpr/lpc/cmds.c Mon Oct 22 03:31:22 2012 (r241852) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -288,10 +289,10 @@ kill_qtask(const char *lf) pid_t pid; int errsav, killres, lockres, res; - seteuid(euid); + PRIV_START fp = fopen(lf, "r"); errsav = errno; - seteuid(uid); + PRIV_END res = KQT_NODAEMON; if (fp == NULL) { /* @@ -329,10 +330,10 @@ kill_qtask(const char *lf) goto killdone; } - seteuid(uid); + PRIV_END killres = kill(pid, SIGTERM); errsav = errno; - seteuid(uid); + PRIV_END if (killres == 0) { res = KQT_KILLOK; printf("\tdaemon (pid %d) killed\n", pid); @@ -376,9 +377,9 @@ upstat(struct printer *pp, const char *m status_file_name(pp, statfile, sizeof statfile); umask(0); - seteuid(euid); + PRIV_START fd = open(statfile, O_WRONLY|O_CREAT|O_EXLOCK, STAT_FILE_MODE); - seteuid(uid); + PRIV_END if (fd < 0) { printf("\tcannot create status file: %s\n", strerror(errno)); return; @@ -683,9 +684,9 @@ clean_q(struct printer *pp) linerem = sizeof(line) - (lp - line); cln_foundcore = 0; - seteuid(euid); + PRIV_START nitems = scandir(pp->spool_dir, &queue, doselect, sortq); - seteuid(uid); + PRIV_END if (nitems < 0) { if (!didhead) { printf("%s:\n", pp->printer); @@ -795,9 +796,9 @@ unlinkf(char *name) * that case, we need to check the last-mod time of the symlink, and * not the file that the symlink is pointed at. */ - seteuid(euid); + PRIV_START res = lstat(name, &stbuf); - seteuid(uid); + PRIV_END if (res < 0) { printf("\terror return from stat(%s):\n", name); printf("\t %s\n", strerror(errno)); @@ -819,9 +820,9 @@ unlinkf(char *name) * symlink before unlink-ing the file itself */ if (S_ISLNK(stbuf.st_mode)) { - seteuid(euid); + PRIV_START res = readlink(name, linkbuf, sizeof(linkbuf)); - seteuid(uid); + PRIV_END if (res < 0) { printf("\terror return from readlink(%s):\n", name); printf("\t %s\n", strerror(errno)); @@ -841,9 +842,9 @@ unlinkf(char *name) printf("\t (which is a symlink to %s)\n", linkbuf); } } else { - seteuid(euid); + PRIV_START res = unlink(name); - seteuid(uid); + PRIV_END if (res < 0) printf("\tcannot remove %s (!)\n", name); else @@ -983,9 +984,9 @@ restart_q(struct printer *pp) /* make sure the queue is set to print jobs */ setres = set_qstate(SQS_STARTP, lf); - seteuid(euid); + PRIV_START startok = startdaemon(pp); - seteuid(uid); + PRIV_END if (!startok) printf("\tcouldn't restart daemon\n"); else @@ -1049,14 +1050,14 @@ start_q(struct printer *pp) setres = set_qstate(SQS_STARTP, lf); - seteuid(euid); + PRIV_START startok = startdaemon(pp); - seteuid(uid); + PRIV_END if (!startok) printf("\tcouldn't start daemon\n"); else printf("\tdaemon started\n"); - seteuid(uid); + PRIV_END } /* @@ -1178,12 +1179,12 @@ topq(int argc, char *argv[]) } printf("%s:\n", pp->printer); - seteuid(euid); + PRIV_START if (chdir(pp->spool_dir) < 0) { printf("\tcannot chdir to %s\n", pp->spool_dir); goto out; } - seteuid(uid); + PRIV_END nitems = getq(pp, &queue); if (nitems == 0) return; @@ -1207,12 +1208,12 @@ topq(int argc, char *argv[]) * Turn on the public execute bit of the lock file to * get lpd to rebuild the queue after the current job. */ - seteuid(euid); + PRIV_START if (changed && stat(pp->lock_file, &stbuf) >= 0) (void) chmod(pp->lock_file, stbuf.st_mode | LFM_RESET_QUE); out: - seteuid(uid); + PRIV_END } /* @@ -1227,9 +1228,9 @@ touch(struct jobqueue *jq) tvp[0].tv_sec = tvp[1].tv_sec = --mtime; tvp[0].tv_usec = tvp[1].tv_usec = 0; - seteuid(euid); + PRIV_START ret = utimes(jq->job_cfname, tvp); - seteuid(uid); + PRIV_END return (ret); } @@ -1286,9 +1287,9 @@ doarg(char *job) * Process item consisting of owner's name (example: henry). */ for (qq = queue + nitems; --qq >= queue; ) { - seteuid(euid); + PRIV_START fp = fopen((*qq)->job_cfname, "r"); - seteuid(uid); + PRIV_END if (fp == NULL) continue; while (getline(fp) > 0) @@ -1319,9 +1320,9 @@ up_q(struct printer *pp) setres = set_qstate(SQS_ENABLEQ+SQS_STARTP, lf); - seteuid(euid); + PRIV_START startok = startdaemon(pp); - seteuid(uid); + PRIV_END if (!startok) printf("\tcouldn't start daemon\n"); else Modified: head/usr.sbin/lpr/lpc/lpc.c ============================================================================== --- head/usr.sbin/lpr/lpc/lpc.c Mon Oct 22 03:30:17 2012 (r241851) +++ head/usr.sbin/lpr/lpc/lpc.c Mon Oct 22 03:31:22 2012 (r241852) @@ -93,7 +93,7 @@ main(int argc, char *argv[]) euid = geteuid(); uid = getuid(); - seteuid(uid); + PRIV_END progname = argv[0]; openlog("lpd", 0, LOG_LPR); @@ -405,9 +405,9 @@ setup_myprinter(char *pwanted, struct pr printf("%s:\n", pp->printer); if (sump_opts & SUMP_CHDIR_SD) { - seteuid(euid); + PRIV_START cdres = chdir(pp->spool_dir); - seteuid(uid); + PRIV_END if (cdres < 0) { printf("\tcannot chdir to %s\n", pp->spool_dir); free_printer(pp); Modified: head/usr.sbin/lpr/lpc/movejobs.c ============================================================================== --- head/usr.sbin/lpr/lpc/movejobs.c Mon Oct 22 03:30:17 2012 (r241851) +++ head/usr.sbin/lpr/lpc/movejobs.c Mon Oct 22 03:31:22 2012 (r241852) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include /* just for MAXNAMLEN, for job_cfname in lp.h! */ +#include #include #include #include @@ -147,9 +148,9 @@ touch_jqe(void *myinfo, struct jobqueue touch_info = myinfo; tvp[0].tv_sec = tvp[1].tv_sec = ++touch_info->newtime; tvp[0].tv_usec = tvp[1].tv_usec = 0; - seteuid(euid); + PRIV_START ret = utimes(jq->job_cfname, tvp); - seteuid(uid); + PRIV_END if (ret == 0) { if (jspec->matcheduser) Modified: head/usr.sbin/lpr/lpd/printjob.c ============================================================================== --- head/usr.sbin/lpr/lpd/printjob.c Mon Oct 22 03:30:17 2012 (r241851) +++ head/usr.sbin/lpr/lpd/printjob.c Mon Oct 22 03:31:22 2012 (r241852) @@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -173,7 +174,7 @@ printjob(struct printer *pp) pp->log_file); (void) open(_PATH_DEVNULL, O_WRONLY); } - setgid(getegid()); + if(setgid(getegid()) != 0) err(1, "setgid() failed"); printpid = getpid(); /* for use with lprm */ setpgrp(0, printpid); Modified: head/usr.sbin/lpr/lpq/lpq.c ============================================================================== --- head/usr.sbin/lpr/lpq/lpq.c Mon Oct 22 03:30:17 2012 (r241851) +++ head/usr.sbin/lpr/lpq/lpq.c Mon Oct 22 03:31:22 2012 (r241852) @@ -88,7 +88,7 @@ main(int argc, char **argv) printer = NULL; euid = geteuid(); uid = getuid(); - seteuid(uid); + PRIV_END progname = *argv; if (gethostname(local_host, sizeof(local_host))) err(1, "gethostname"); Modified: head/usr.sbin/lpr/lpr/lpr.c ============================================================================== --- head/usr.sbin/lpr/lpr/lpr.c Mon Oct 22 03:30:17 2012 (r241851) +++ head/usr.sbin/lpr/lpr/lpr.c Mon Oct 22 03:31:22 2012 (r241852) @@ -145,7 +145,7 @@ main(int argc, char *argv[]) printer = NULL; euid = geteuid(); uid = getuid(); - seteuid(uid); + PRIV_END if (signal(SIGHUP, SIG_IGN) != SIG_IGN) signal(SIGHUP, cleanup); if (signal(SIGINT, SIG_IGN) != SIG_IGN) @@ -326,10 +326,10 @@ main(int argc, char *argv[]) */ mktemps(pp); tfd = nfile(tfname); - seteuid(euid); + PRIV_START (void) fchown(tfd, pp->daemon_user, -1); /* owned by daemon for protection */ - seteuid(uid); + PRIV_END card('H', local_host); card('P', lpr_username); card('C', class); @@ -415,7 +415,7 @@ main(int argc, char *argv[]) * can be very significant when running services like * samba, pcnfs, CAP, et al. */ - seteuid(euid); + PRIV_START didlink = 0; /* * There are several things to check to avoid any @@ -453,11 +453,11 @@ main(int argc, char *argv[]) * safe. Otherwise, abandon the move and fall back * to the (usual) copy method. */ - seteuid(uid); + PRIV_END ret = access(dfname, R_OK); if (ret == 0) ret = unlink(arg); - seteuid(euid); + PRIV_START if (ret != 0) goto nohardlink; /* @@ -467,7 +467,7 @@ main(int argc, char *argv[]) */ chown(dfname, pp->daemon_user, getegid()); chmod(dfname, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP); - seteuid(uid); + PRIV_END if (format == 'p') card('T', title ? title : arg); for (i = 0; i < ncopies; i++) @@ -479,7 +479,7 @@ main(int argc, char *argv[]) nohardlink: if (didlink) unlink(dfname); - seteuid(uid); /* restore old uid */ + PRIV_END /* restore old uid */ } /* end: if (f) */ if ((i = open(arg, O_RDONLY)) < 0) { @@ -498,7 +498,7 @@ main(int argc, char *argv[]) /* * Touch the control file to fix position in the queue. */ - seteuid(euid); + PRIV_START if ((tfd = open(tfname, O_RDWR)) >= 0) { char touch_c; @@ -518,7 +518,7 @@ main(int argc, char *argv[]) cleanup(0); } unlink(tfname); - seteuid(uid); + PRIV_END if (qflag) /* just q things up */ exit(0); if (!startdaemon(pp)) @@ -604,9 +604,9 @@ linked(const char *file) strncat(buf, file, sizeof(buf) - strlen(buf) - 1); file = buf; } - seteuid(euid); + PRIV_START ret = symlink(file, dfname); - seteuid(uid); + PRIV_END return(ret ? NULL : file); } @@ -638,7 +638,7 @@ nfile(char *n) register int f; int oldumask = umask(0); /* should block signals */ - seteuid(euid); + PRIV_START f = open(n, O_WRONLY | O_EXCL | O_CREAT, FILMOD); (void) umask(oldumask); if (f < 0) { @@ -649,7 +649,7 @@ nfile(char *n) printf("%s: cannot chown %s\n", progname, n); cleanup(0); /* cleanup does exit */ } - seteuid(uid); + PRIV_END if (++n[inchar] > 'z') { if (++n[inchar-2] == 't') { printf("too many files - break up the job\n"); @@ -674,7 +674,7 @@ cleanup(int signo __unused) signal(SIGQUIT, SIG_IGN); signal(SIGTERM, SIG_IGN); i = inchar; - seteuid(euid); + PRIV_START if (tfname) do unlink(tfname); @@ -846,7 +846,7 @@ mktemps(const struct printer *pp) char buf[BUFSIZ]; (void) snprintf(buf, sizeof(buf), "%s/.seq", pp->spool_dir); - seteuid(euid); + PRIV_START if ((fd = open(buf, O_RDWR|O_CREAT, 0664)) < 0) { printf("%s: cannot create %s\n", progname, buf); exit(1); @@ -855,7 +855,7 @@ mktemps(const struct printer *pp) printf("%s: cannot lock %s\n", progname, buf); exit(1); } - seteuid(uid); + PRIV_END n = 0; if ((len = read(fd, buf, sizeof(buf))) > 0) { for (cp = buf; len--; ) { Modified: head/usr.sbin/lpr/lprm/lprm.c ============================================================================== --- head/usr.sbin/lpr/lprm/lprm.c Mon Oct 22 03:30:17 2012 (r241851) +++ head/usr.sbin/lpr/lprm/lprm.c Mon Oct 22 03:31:22 2012 (r241852) @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -93,7 +94,7 @@ main(int argc, char *argv[]) printer = NULL; uid = getuid(); euid = geteuid(); - seteuid(uid); /* be safe */ + PRIV_END /* be safe */ progname = argv[0]; gethostname(local_host, sizeof(local_host)); openlog("lpd", 0, LOG_LPR); From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 03:34: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 EB52DD02; Mon, 22 Oct 2012 03:34:43 +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 D106E8FC0A; Mon, 22 Oct 2012 03:34: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 q9M3Yh4I022824; Mon, 22 Oct 2012 03:34:43 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M3YhJV022822; Mon, 22 Oct 2012 03:34:43 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220334.q9M3YhJV022822@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 03:34:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241853 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 03:34:44 -0000 Author: eadler Date: Mon Oct 22 03:34:43 2012 New Revision: 241853 URL: http://svn.freebsd.org/changeset/base/241853 Log: Correct the killpg(2) return values: Return EPERM if processes were found but they were unable to be signaled. Return the first error from p_cansignal if no signal was successful. Reviewed by: jilles Approved by: cperciva MFC after: 1 week Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Mon Oct 22 03:31:22 2012 (r241852) +++ head/sys/kern/kern_sig.c Mon Oct 22 03:34:43 2012 (r241853) @@ -1599,8 +1599,10 @@ killpg1(struct thread *td, int sig, int { struct proc *p; struct pgrp *pgrp; - int nfound = 0; + int err; + int ret; + ret = ESRCH; if (all) { /* * broadcast @@ -1613,11 +1615,14 @@ killpg1(struct thread *td, int sig, int PROC_UNLOCK(p); continue; } - if (p_cansignal(td, p, sig) == 0) { - nfound++; + err = p_cansignal(td, p, sig); + if (err == 0) { if (sig) pksignal(p, sig, ksi); + ret = err; } + else if (ret == ESRCH) + ret = err; PROC_UNLOCK(p); } sx_sunlock(&allproc_lock); @@ -1644,16 +1649,20 @@ killpg1(struct thread *td, int sig, int PROC_UNLOCK(p); continue; } - if (p_cansignal(td, p, sig) == 0) { - nfound++; + err = p_cansignal(td, p, sig); + if (err == 0) { if (sig) pksignal(p, sig, ksi); } + if (err == 0) + ret = err; + else if (ret == ESRCH) + ret = err; PROC_UNLOCK(p); } PGRP_UNLOCK(pgrp); } - return (nfound ? 0 : ESRCH); + return (ret); } #ifndef _SYS_SYSPROTO_H_ From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 03:36: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 05F2AE81; Mon, 22 Oct 2012 03:36: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 E15638FC14; Mon, 22 Oct 2012 03:36: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 q9M3ai8d023174; Mon, 22 Oct 2012 03:36:44 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M3aikJ023172; Mon, 22 Oct 2012 03:36:44 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220336.q9M3aikJ023172@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 03:36:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241854 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 03:36:45 -0000 Author: eadler Date: Mon Oct 22 03:36:44 2012 New Revision: 241854 URL: http://svn.freebsd.org/changeset/base/241854 Log: Colin acked the wrong diff originally. fixed version coming soon. Approved by: cperciva (implicit) Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Mon Oct 22 03:34:43 2012 (r241853) +++ head/sys/kern/kern_sig.c Mon Oct 22 03:36:44 2012 (r241854) @@ -1599,10 +1599,8 @@ killpg1(struct thread *td, int sig, int { struct proc *p; struct pgrp *pgrp; - int err; - int ret; + int nfound = 0; - ret = ESRCH; if (all) { /* * broadcast @@ -1615,14 +1613,11 @@ killpg1(struct thread *td, int sig, int PROC_UNLOCK(p); continue; } - err = p_cansignal(td, p, sig); - if (err == 0) { + if (p_cansignal(td, p, sig) == 0) { + nfound++; if (sig) pksignal(p, sig, ksi); - ret = err; } - else if (ret == ESRCH) - ret = err; PROC_UNLOCK(p); } sx_sunlock(&allproc_lock); @@ -1649,20 +1644,16 @@ killpg1(struct thread *td, int sig, int PROC_UNLOCK(p); continue; } - err = p_cansignal(td, p, sig); - if (err == 0) { + if (p_cansignal(td, p, sig) == 0) { + nfound++; if (sig) pksignal(p, sig, ksi); } - if (err == 0) - ret = err; - else if (ret == ESRCH) - ret = err; PROC_UNLOCK(p); } PGRP_UNLOCK(pgrp); } - return (ret); + return (nfound ? 0 : ESRCH); } #ifndef _SYS_SYSPROTO_H_ From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 03:37: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 97441FE9; Mon, 22 Oct 2012 03: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 7F9068FC08; Mon, 22 Oct 2012 03: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 q9M3b1Sd023261; Mon, 22 Oct 2012 03: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 q9M3b1Iw023258; Mon, 22 Oct 2012 03:37:01 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220337.q9M3b1Iw023258@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 03:37:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241855 - in head/lib/libc: compat-43 sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 03:37:01 -0000 Author: eadler Date: Mon Oct 22 03:37:00 2012 New Revision: 241855 URL: http://svn.freebsd.org/changeset/base/241855 Log: Update the kill(2) and killpg(2) man pages to the modern permission checks. Also indicate killpg(2) is POSIX compliant. Reviewed by: jilles Reviewed by: wblock Approved by: cperciva MFC after: 3 days Modified: head/lib/libc/compat-43/killpg.2 head/lib/libc/sys/kill.2 Modified: head/lib/libc/compat-43/killpg.2 ============================================================================== --- head/lib/libc/compat-43/killpg.2 Mon Oct 22 03:36:44 2012 (r241854) +++ head/lib/libc/compat-43/killpg.2 Mon Oct 22 03:37:00 2012 (r241855) @@ -58,11 +58,9 @@ is 0, .Fn killpg sends the signal to the sending process's process group. .Pp -The sending process and members of the process group must -have the same effective user ID, or -the sender must be the super-user. -As a single special case the continue signal SIGCONT may be sent -to any process with the same session ID as the caller. +The sending process must be able to +.Fn kill +at least one process in the receiving process group. .Sh RETURN VALUES .Rv -std killpg .Sh ERRORS @@ -80,9 +78,8 @@ is not a valid signal number. No process can be found in the process group specified by .Fa pgrp . .It Bq Er EPERM -The sending process is not the super-user and one or more -of the target processes has an effective user ID different from that -of the sending process. +.Fn kill +returns EPERM for all processes in the process group. .El .Sh SEE ALSO .Xr getpgrp 2 , Modified: head/lib/libc/sys/kill.2 ============================================================================== --- head/lib/libc/sys/kill.2 Mon Oct 22 03:36:44 2012 (r241854) +++ head/lib/libc/sys/kill.2 Mon Oct 22 03:37:00 2012 (r241855) @@ -64,11 +64,19 @@ This can be used to check the validity o For a process to have permission to send a signal to a process designated by .Fa pid , -the real or effective user ID of the receiving process must match -that of the sending process or the user must have appropriate privileges -(such as given by a set-user-ID program or the user is the super-user). +the user must be the super-user, or +the real or saved user ID of the receiving process must match +the real or effective user ID of the sending process. A single exception is the signal SIGCONT, which may always be sent -to any process with the same session ID as the caller. +to any process with the same session ID as the sender. +In addition, if the +.Va security.bsd.conservative_signals +.Xr sysctl +is set to 1, the user is not a super-user, and +the receiver is set-uid, then +only job control and terminal control signals may +be sent (in particular, only SIGKILL, SIGINT, SIGTERM, SIGALRM, +SIGSTOP, SIGTTIN, SIGTTOU, SIGTSTP, SIGHUP, SIGUSR1, SIGUSR2). .Bl -tag -width Ds .It \&If Fa pid No \&is greater than zero : The @@ -124,10 +132,9 @@ is not a valid signal number. No process or process group can be found corresponding to that specified by .Fa pid . .It Bq Er EPERM -The sending process is not the super-user and its effective -user id does not match the effective user-id of the receiving process. -When signaling a process group, this error is returned if any members -of the group could not be signaled. +The sending process does not have permission to send +.Va sig +to the receiving process. .El .Sh SEE ALSO .Xr getpgrp 2 , From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 03:41: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 3764125E; Mon, 22 Oct 2012 03:41:15 +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 1B2758FC0A; Mon, 22 Oct 2012 03:41: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 q9M3fF95024031; Mon, 22 Oct 2012 03:41:15 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M3fEdu023999; Mon, 22 Oct 2012 03:41:14 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220341.q9M3fEdu023999@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 03:41:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241856 - in head/sys: arm/xscale/pxa dev/acpica dev/agp dev/amdsbwd dev/amdtemp dev/asmc dev/coretemp dev/e1000 dev/glxiic dev/ixgbe dev/kbdmux dev/sound/pci i386/acpica i386/bios x86/... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 03:41:15 -0000 Author: eadler Date: Mon Oct 22 03:41:14 2012 New Revision: 241856 URL: http://svn.freebsd.org/changeset/base/241856 Log: Now that device disabling is generic, remove extraneous code from the device drivers that used to provide this feature. Reviewed by: des Approved by: cperciva MFC after: 1 week Modified: head/sys/arm/xscale/pxa/pxa_smi.c head/sys/dev/acpica/acpi.c head/sys/dev/acpica/acpi_perf.c head/sys/dev/acpica/acpi_throttle.c head/sys/dev/agp/agp_ali.c head/sys/dev/agp/agp_amd.c head/sys/dev/agp/agp_amd64.c head/sys/dev/agp/agp_apple.c head/sys/dev/agp/agp_i810.c head/sys/dev/agp/agp_intel.c head/sys/dev/agp/agp_nvidia.c head/sys/dev/agp/agp_sis.c head/sys/dev/agp/agp_via.c head/sys/dev/amdsbwd/amdsbwd.c head/sys/dev/amdtemp/amdtemp.c head/sys/dev/asmc/asmc.c head/sys/dev/coretemp/coretemp.c head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_igb.c head/sys/dev/e1000/if_lem.c head/sys/dev/glxiic/glxiic.c head/sys/dev/ixgbe/ixgbe.c head/sys/dev/ixgbe/ixv.c head/sys/dev/kbdmux/kbdmux.c head/sys/dev/sound/pci/emu10kx.c head/sys/i386/acpica/acpi_machdep.c head/sys/i386/bios/apm.c head/sys/x86/cpufreq/est.c head/sys/x86/cpufreq/p4tcc.c head/sys/x86/isa/elcr.c Modified: head/sys/arm/xscale/pxa/pxa_smi.c ============================================================================== --- head/sys/arm/xscale/pxa/pxa_smi.c Mon Oct 22 03:37:00 2012 (r241855) +++ head/sys/arm/xscale/pxa/pxa_smi.c Mon Oct 22 03:41:14 2012 (r241856) @@ -82,9 +82,6 @@ static int pxa_smi_probe(device_t dev) { - if (resource_disabled("smi", device_get_unit(dev))) - return (ENXIO); - device_set_desc(dev, "Static Memory Interface"); return (0); } Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Mon Oct 22 03:37:00 2012 (r241855) +++ head/sys/dev/acpica/acpi.c Mon Oct 22 03:41:14 2012 (r241856) @@ -377,10 +377,6 @@ acpi_identify(void) if (!cold) return (ENXIO); - /* Check that we haven't been disabled with a hint. */ - if (resource_disabled("acpi", 0)) - return (ENXIO); - /* Check for other PM systems. */ if (power_pm_get_type() != POWER_PM_TYPE_NONE && power_pm_get_type() != POWER_PM_TYPE_ACPI) { Modified: head/sys/dev/acpica/acpi_perf.c ============================================================================== --- head/sys/dev/acpica/acpi_perf.c Mon Oct 22 03:37:00 2012 (r241855) +++ head/sys/dev/acpica/acpi_perf.c Mon Oct 22 03:41:14 2012 (r241856) @@ -175,9 +175,6 @@ acpi_perf_probe(device_t dev) ACPI_BUFFER buf; int error, rid, type; - if (resource_disabled("acpi_perf", 0)) - return (ENXIO); - /* * Check the performance state registers. If they are of type * "functional fixed hardware", we attach quietly since we will Modified: head/sys/dev/acpica/acpi_throttle.c ============================================================================== --- head/sys/dev/acpica/acpi_throttle.c Mon Oct 22 03:37:00 2012 (r241855) +++ head/sys/dev/acpica/acpi_throttle.c Mon Oct 22 03:41:14 2012 (r241856) @@ -167,9 +167,6 @@ static int acpi_throttle_probe(device_t dev) { - if (resource_disabled("acpi_throttle", 0)) - return (ENXIO); - /* * On i386 platforms at least, ACPI throttling is accomplished by * the chipset modulating the STPCLK# pin based on the duty cycle. Modified: head/sys/dev/agp/agp_ali.c ============================================================================== --- head/sys/dev/agp/agp_ali.c Mon Oct 22 03:37:00 2012 (r241855) +++ head/sys/dev/agp/agp_ali.c Mon Oct 22 03:41:14 2012 (r241856) @@ -81,8 +81,6 @@ agp_ali_probe(device_t dev) { const char *desc; - if (resource_disabled("agp", device_get_unit(dev))) - return (ENXIO); desc = agp_ali_match(dev); if (desc) { device_set_desc(dev, desc); Modified: head/sys/dev/agp/agp_amd.c ============================================================================== --- head/sys/dev/agp/agp_amd.c Mon Oct 22 03:37:00 2012 (r241855) +++ head/sys/dev/agp/agp_amd.c Mon Oct 22 03:41:14 2012 (r241856) @@ -203,8 +203,6 @@ agp_amd_probe(device_t dev) { const char *desc; - if (resource_disabled("agp", device_get_unit(dev))) - return (ENXIO); desc = agp_amd_match(dev); if (desc) { device_set_desc(dev, desc); Modified: head/sys/dev/agp/agp_amd64.c ============================================================================== --- head/sys/dev/agp/agp_amd64.c Mon Oct 22 03:37:00 2012 (r241855) +++ head/sys/dev/agp/agp_amd64.c Mon Oct 22 03:41:14 2012 (r241856) @@ -152,8 +152,6 @@ agp_amd64_probe(device_t dev) { const char *desc; - if (resource_disabled("agp", device_get_unit(dev))) - return (ENXIO); if ((desc = agp_amd64_match(dev))) { device_set_desc(dev, desc); return (BUS_PROBE_DEFAULT); Modified: head/sys/dev/agp/agp_apple.c ============================================================================== --- head/sys/dev/agp/agp_apple.c Mon Oct 22 03:37:00 2012 (r241855) +++ head/sys/dev/agp/agp_apple.c Mon Oct 22 03:41:14 2012 (r241856) @@ -71,9 +71,6 @@ static int agp_apple_probe(device_t dev) { - if (resource_disabled("agp", device_get_unit(dev))) - return (ENXIO); - if (pci_get_class(dev) != PCIC_BRIDGE || pci_get_subclass(dev) != PCIS_BRIDGE_HOST) return (ENXIO); Modified: head/sys/dev/agp/agp_i810.c ============================================================================== --- head/sys/dev/agp/agp_i810.c Mon Oct 22 03:37:00 2012 (r241855) +++ head/sys/dev/agp/agp_i810.c Mon Oct 22 03:41:14 2012 (r241856) @@ -860,8 +860,6 @@ agp_i810_probe(device_t dev) const struct agp_i810_match *match; int err; - if (resource_disabled("agp", device_get_unit(dev))) - return (ENXIO); match = agp_i810_match(dev); if (match == NULL) return (ENXIO); Modified: head/sys/dev/agp/agp_intel.c ============================================================================== --- head/sys/dev/agp/agp_intel.c Mon Oct 22 03:37:00 2012 (r241855) +++ head/sys/dev/agp/agp_intel.c Mon Oct 22 03:41:14 2012 (r241856) @@ -117,8 +117,6 @@ agp_intel_probe(device_t dev) { const char *desc; - if (resource_disabled("agp", device_get_unit(dev))) - return (ENXIO); desc = agp_intel_match(dev); if (desc) { device_set_desc(dev, desc); Modified: head/sys/dev/agp/agp_nvidia.c ============================================================================== --- head/sys/dev/agp/agp_nvidia.c Mon Oct 22 03:37:00 2012 (r241855) +++ head/sys/dev/agp/agp_nvidia.c Mon Oct 22 03:41:14 2012 (r241856) @@ -117,8 +117,6 @@ agp_nvidia_probe (device_t dev) { const char *desc; - if (resource_disabled("agp", device_get_unit(dev))) - return (ENXIO); desc = agp_nvidia_match(dev); if (desc) { device_set_desc(dev, desc); Modified: head/sys/dev/agp/agp_sis.c ============================================================================== --- head/sys/dev/agp/agp_sis.c Mon Oct 22 03:37:00 2012 (r241855) +++ head/sys/dev/agp/agp_sis.c Mon Oct 22 03:41:14 2012 (r241856) @@ -113,8 +113,6 @@ agp_sis_probe(device_t dev) { const char *desc; - if (resource_disabled("agp", device_get_unit(dev))) - return (ENXIO); desc = agp_sis_match(dev); if (desc) { device_set_desc(dev, desc); Modified: head/sys/dev/agp/agp_via.c ============================================================================== --- head/sys/dev/agp/agp_via.c Mon Oct 22 03:37:00 2012 (r241855) +++ head/sys/dev/agp/agp_via.c Mon Oct 22 03:41:14 2012 (r241856) @@ -147,8 +147,6 @@ agp_via_probe(device_t dev) { const char *desc; - if (resource_disabled("agp", device_get_unit(dev))) - return (ENXIO); desc = agp_via_match(dev); if (desc) { device_set_desc(dev, desc); Modified: head/sys/dev/amdsbwd/amdsbwd.c ============================================================================== --- head/sys/dev/amdsbwd/amdsbwd.c Mon Oct 22 03:37:00 2012 (r241855) +++ head/sys/dev/amdsbwd/amdsbwd.c Mon Oct 22 03:41:14 2012 (r241856) @@ -267,8 +267,6 @@ amdsbwd_identify(driver_t *driver, devic device_t child; device_t smb_dev; - if (resource_disabled("amdsbwd", 0)) - return; if (device_find_child(parent, "amdsbwd", -1) != NULL) return; Modified: head/sys/dev/amdtemp/amdtemp.c ============================================================================== --- head/sys/dev/amdtemp/amdtemp.c Mon Oct 22 03:37:00 2012 (r241855) +++ head/sys/dev/amdtemp/amdtemp.c Mon Oct 22 03:41:14 2012 (r241856) @@ -185,9 +185,6 @@ amdtemp_probe(device_t dev) { uint32_t family, model; - if (resource_disabled("amdtemp", 0)) - return (ENXIO); - family = CPUID_TO_FAMILY(cpu_id); model = CPUID_TO_MODEL(cpu_id); Modified: head/sys/dev/asmc/asmc.c ============================================================================== --- head/sys/dev/asmc/asmc.c Mon Oct 22 03:37:00 2012 (r241855) +++ head/sys/dev/asmc/asmc.c Mon Oct 22 03:41:14 2012 (r241856) @@ -291,8 +291,6 @@ asmc_probe(device_t dev) { struct asmc_model *model; - if (resource_disabled("asmc", 0)) - return (ENXIO); if (ACPI_ID_PROBE(device_get_parent(dev), dev, asmc_ids) == NULL) return (ENXIO); Modified: head/sys/dev/coretemp/coretemp.c ============================================================================== --- head/sys/dev/coretemp/coretemp.c Mon Oct 22 03:37:00 2012 (r241855) +++ head/sys/dev/coretemp/coretemp.c Mon Oct 22 03:41:14 2012 (r241856) @@ -138,8 +138,6 @@ coretemp_identify(driver_t *driver, devi static int coretemp_probe(device_t dev) { - if (resource_disabled("coretemp", 0)) - return (ENXIO); device_set_desc(dev, "CPU On-Die Thermal Sensors"); Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Mon Oct 22 03:37:00 2012 (r241855) +++ head/sys/dev/e1000/if_em.c Mon Oct 22 03:41:14 2012 (r241856) @@ -472,11 +472,6 @@ em_attach(device_t dev) INIT_DEBUGOUT("em_attach: begin"); - if (resource_disabled("em", device_get_unit(dev))) { - device_printf(dev, "Disabled by device hint\n"); - return (ENXIO); - } - adapter = device_get_softc(dev); adapter->dev = adapter->osdep.dev = dev; hw = &adapter->hw; Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Mon Oct 22 03:37:00 2012 (r241855) +++ head/sys/dev/e1000/if_igb.c Mon Oct 22 03:41:14 2012 (r241856) @@ -460,11 +460,6 @@ igb_attach(device_t dev) INIT_DEBUGOUT("igb_attach: begin"); - if (resource_disabled("igb", device_get_unit(dev))) { - device_printf(dev, "Disabled by device hint\n"); - return (ENXIO); - } - adapter = device_get_softc(dev); adapter->dev = adapter->osdep.dev = dev; IGB_CORE_LOCK_INIT(adapter, device_get_nameunit(dev)); Modified: head/sys/dev/e1000/if_lem.c ============================================================================== --- head/sys/dev/e1000/if_lem.c Mon Oct 22 03:37:00 2012 (r241855) +++ head/sys/dev/e1000/if_lem.c Mon Oct 22 03:41:14 2012 (r241856) @@ -390,11 +390,6 @@ lem_attach(device_t dev) INIT_DEBUGOUT("lem_attach: begin"); - if (resource_disabled("lem", device_get_unit(dev))) { - device_printf(dev, "Disabled by device hint\n"); - return (ENXIO); - } - adapter = device_get_softc(dev); adapter->dev = adapter->osdep.dev = dev; EM_CORE_LOCK_INIT(adapter, device_get_nameunit(dev)); Modified: head/sys/dev/glxiic/glxiic.c ============================================================================== --- head/sys/dev/glxiic/glxiic.c Mon Oct 22 03:37:00 2012 (r241855) +++ head/sys/dev/glxiic/glxiic.c Mon Oct 22 03:41:14 2012 (r241856) @@ -298,9 +298,6 @@ static int glxiic_probe(device_t dev) { - if (resource_disabled("glxiic", device_get_unit(dev))) - return (ENXIO); - device_set_desc(dev, "AMD Geode CS5536 SMBus controller"); return (BUS_PROBE_DEFAULT); Modified: head/sys/dev/ixgbe/ixgbe.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe.c Mon Oct 22 03:37:00 2012 (r241855) +++ head/sys/dev/ixgbe/ixgbe.c Mon Oct 22 03:41:14 2012 (r241856) @@ -401,11 +401,6 @@ ixgbe_attach(device_t dev) INIT_DEBUGOUT("ixgbe_attach: begin"); - if (resource_disabled("ixgbe", device_get_unit(dev))) { - device_printf(dev, "Disabled by device hint\n"); - return (ENXIO); - } - /* Allocate, clear, and link in our adapter structure */ adapter = device_get_softc(dev); adapter->dev = adapter->osdep.dev = dev; Modified: head/sys/dev/ixgbe/ixv.c ============================================================================== --- head/sys/dev/ixgbe/ixv.c Mon Oct 22 03:37:00 2012 (r241855) +++ head/sys/dev/ixgbe/ixv.c Mon Oct 22 03:41:14 2012 (r241856) @@ -299,11 +299,6 @@ ixv_attach(device_t dev) INIT_DEBUGOUT("ixv_attach: begin"); - if (resource_disabled("ixgbe", device_get_unit(dev))) { - device_printf(dev, "Disabled by device hint\n"); - return (ENXIO); - } - /* Allocate, clear, and link in our adapter structure */ adapter = device_get_softc(dev); adapter->dev = adapter->osdep.dev = dev; Modified: head/sys/dev/kbdmux/kbdmux.c ============================================================================== --- head/sys/dev/kbdmux/kbdmux.c Mon Oct 22 03:37:00 2012 (r241855) +++ head/sys/dev/kbdmux/kbdmux.c Mon Oct 22 03:41:14 2012 (r241856) @@ -378,8 +378,6 @@ kbdmux_configure(int flags) static int kbdmux_probe(int unit, void *arg, int flags) { - if (resource_disabled(KEYBOARD_NAME, unit)) - return (ENXIO); return (0); } Modified: head/sys/dev/sound/pci/emu10kx.c ============================================================================== --- head/sys/dev/sound/pci/emu10kx.c Mon Oct 22 03:37:00 2012 (r241855) +++ head/sys/dev/sound/pci/emu10kx.c Mon Oct 22 03:41:14 2012 (r241856) @@ -3050,11 +3050,6 @@ emu_pci_attach(device_t dev) sc = device_get_softc(dev); unit = device_get_unit(dev); - if (resource_disabled("emu10kx", unit)) { - device_printf(dev, "disabled by kernel hints\n"); - return (ENXIO); /* XXX to avoid unit reuse */ - } - /* Get configuration */ sc->ctx = device_get_sysctl_ctx(dev); Modified: head/sys/i386/acpica/acpi_machdep.c ============================================================================== --- head/sys/i386/acpica/acpi_machdep.c Mon Oct 22 03:37:00 2012 (r241855) +++ head/sys/i386/acpica/acpi_machdep.c Mon Oct 22 03:41:14 2012 (r241856) @@ -268,9 +268,6 @@ acpi_find_table(const char *sig) vm_paddr_t addr; int i, count; - if (resource_disabled("acpi", 0)) - return (0); - /* * Map in the RSDP. Since ACPI uses AcpiOsMapMemory() which in turn * calls pmap_mapbios() to find the RSDP, we assume that we can use Modified: head/sys/i386/bios/apm.c ============================================================================== --- head/sys/i386/bios/apm.c Mon Oct 22 03:37:00 2012 (r241855) +++ head/sys/i386/bios/apm.c Mon Oct 22 03:41:14 2012 (r241856) @@ -878,9 +878,6 @@ apm_identify(driver_t *driver, device_t return; } - if (resource_disabled("apm", 0)) - return; - child = BUS_ADD_CHILD(parent, 0, "apm", 0); if (child == NULL) panic("apm_identify"); Modified: head/sys/x86/cpufreq/est.c ============================================================================== --- head/sys/x86/cpufreq/est.c Mon Oct 22 03:37:00 2012 (r241855) +++ head/sys/x86/cpufreq/est.c Mon Oct 22 03:41:14 2012 (r241856) @@ -991,9 +991,6 @@ est_probe(device_t dev) uint64_t msr; int error, type; - if (resource_disabled("est", 0)) - return (ENXIO); - /* * If the ACPI perf driver has attached and is not just offering * info, let it manage things. Modified: head/sys/x86/cpufreq/p4tcc.c ============================================================================== --- head/sys/x86/cpufreq/p4tcc.c Mon Oct 22 03:37:00 2012 (r241855) +++ head/sys/x86/cpufreq/p4tcc.c Mon Oct 22 03:41:14 2012 (r241856) @@ -139,10 +139,6 @@ p4tcc_identify(driver_t *driver, device_ static int p4tcc_probe(device_t dev) { - - if (resource_disabled("p4tcc", 0)) - return (ENXIO); - device_set_desc(dev, "CPU Frequency Thermal Control"); return (0); } Modified: head/sys/x86/isa/elcr.c ============================================================================== --- head/sys/x86/isa/elcr.c Mon Oct 22 03:37:00 2012 (r241855) +++ head/sys/x86/isa/elcr.c Mon Oct 22 03:41:14 2012 (r241856) @@ -84,8 +84,6 @@ elcr_probe(void) printf(" E"); printf("\n"); } - if (resource_disabled("elcr", 0)) - return (ENXIO); elcr_found = 1; return (0); } From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 03:41: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 9AE4D260; Mon, 22 Oct 2012 03:41:20 +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 832648FC0C; Mon, 22 Oct 2012 03:41: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 q9M3fKIU024081; Mon, 22 Oct 2012 03:41:20 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M3fKSU024078; Mon, 22 Oct 2012 03:41:20 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220341.q9M3fKSU024078@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 03:41:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241857 - head/gnu/usr.bin/send-pr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 03:41:20 -0000 Author: eadler Date: Mon Oct 22 03:41:19 2012 New Revision: 241857 URL: http://svn.freebsd.org/changeset/base/241857 Log: Add support for the "&" character in usernames. Charlie & finally has his last name. PR: gnu/37910 Submitted by: Harry Newton Approved by: cperciva MFC after: 1 week Modified: head/gnu/usr.bin/send-pr/send-pr.sh Modified: head/gnu/usr.bin/send-pr/send-pr.sh ============================================================================== --- head/gnu/usr.bin/send-pr/send-pr.sh Mon Oct 22 03:41:14 2012 (r241856) +++ head/gnu/usr.bin/send-pr/send-pr.sh Mon Oct 22 03:41:19 2012 (r241857) @@ -23,7 +23,7 @@ # $FreeBSD$ # The version of this send-pr. -VERSION=3.113 +VERSION=3.114 # The submitter-id for your site. # "current-users" is the only allowable value for FreeBSD. @@ -92,11 +92,16 @@ elif [ -f $HOME/.fullname ]; then ORIGINATOR="`sed -e '1q' $HOME/.fullname`" else PTEMP=`mktemp -t p` || exit 1 + PTEMP2=`mktemp -t p` || exit 1 # Must use temp file due to incompatibilities in quoting behavior # and to protect shell metacharacters in the expansion of $LOGNAME - $PW usershow $LOGNAME | awk -F: '{ print $8 }' | sed -e 's/,.*//' > $PTEMP + $ECHON1 $LOGNAME | awk '{print toupper(substr($1,1,1))substr($1,2)}' > $PTEMP2 + ICLOGNAME="`cat $PTEMP2`" + $PW usershow $LOGNAME | awk -F: '{ print $8 }' \ + | sed -e "s/\&/$ICLOGNAME/" \ + | sed -e 's/,.*//' > $PTEMP ORIGINATOR="`cat $PTEMP`" - rm -f $PTEMP + rm -f "$PTEMP" "$PTEMP2" fi FROM="$ORIGINATOR <$LOGNAME>" From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 03:41: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 9663F377; Mon, 22 Oct 2012 03:41:25 +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 655958FC14; Mon, 22 Oct 2012 03:41: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 q9M3fPoE024129; Mon, 22 Oct 2012 03:41:25 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M3fP2R024127; Mon, 22 Oct 2012 03:41:25 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220341.q9M3fP2R024127@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 03:41:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241858 - head/sys/dev/mpt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 03:41:25 -0000 Author: eadler Date: Mon Oct 22 03:41:24 2012 New Revision: 241858 URL: http://svn.freebsd.org/changeset/base/241858 Log: Remove unused code since the 5.x days Reviewed by: des, scottl Approved by: cperciva MFC after: 1 week Modified: head/sys/dev/mpt/mpt_pci.c Modified: head/sys/dev/mpt/mpt_pci.c ============================================================================== --- head/sys/dev/mpt/mpt_pci.c Mon Oct 22 03:41:19 2012 (r241857) +++ head/sys/dev/mpt/mpt_pci.c Mon Oct 22 03:41:24 2012 (r241858) @@ -261,68 +261,6 @@ mpt_pci_probe(device_t dev) return (rval); } -#if __FreeBSD_version < 500000 -static void -mpt_set_options(struct mpt_softc *mpt) -{ - int bitmap; - - bitmap = 0; - if (getenv_int("mpt_disable", &bitmap)) { - if (bitmap & (1 << mpt->unit)) { - mpt->disabled = 1; - } - } - bitmap = 0; - if (getenv_int("mpt_debug", &bitmap)) { - if (bitmap & (1 << mpt->unit)) { - mpt->verbose = MPT_PRT_DEBUG; - } - } - bitmap = 0; - if (getenv_int("mpt_debug1", &bitmap)) { - if (bitmap & (1 << mpt->unit)) { - mpt->verbose = MPT_PRT_DEBUG1; - } - } - bitmap = 0; - if (getenv_int("mpt_debug2", &bitmap)) { - if (bitmap & (1 << mpt->unit)) { - mpt->verbose = MPT_PRT_DEBUG2; - } - } - bitmap = 0; - if (getenv_int("mpt_debug3", &bitmap)) { - if (bitmap & (1 << mpt->unit)) { - mpt->verbose = MPT_PRT_DEBUG3; - } - } - - mpt->cfg_role = MPT_ROLE_DEFAULT; - bitmap = 0; - if (getenv_int("mpt_nil_role", &bitmap)) { - if (bitmap & (1 << mpt->unit)) { - mpt->cfg_role = 0; - } - mpt->do_cfg_role = 1; - } - bitmap = 0; - if (getenv_int("mpt_tgt_role", &bitmap)) { - if (bitmap & (1 << mpt->unit)) { - mpt->cfg_role |= MPT_ROLE_TARGET; - } - mpt->do_cfg_role = 1; - } - bitmap = 0; - if (getenv_int("mpt_ini_role", &bitmap)) { - if (bitmap & (1 << mpt->unit)) { - mpt->cfg_role |= MPT_ROLE_INITIATOR; - } - mpt->do_cfg_role = 1; - } - mpt->msi_enable = 0; -} -#else static void mpt_set_options(struct mpt_softc *mpt) { @@ -354,7 +292,6 @@ mpt_set_options(struct mpt_softc *mpt) mpt->msi_enable = tval; } } -#endif static void mpt_link_peer(struct mpt_softc *mpt) From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 03:43: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 21BD96A2; Mon, 22 Oct 2012 03:43:03 +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 063DD8FC0A; Mon, 22 Oct 2012 03:43: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 q9M3h2C9024441; Mon, 22 Oct 2012 03:43:02 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M3h2Ic024439; Mon, 22 Oct 2012 03:43:02 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220343.q9M3h2Ic024439@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 03:43:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241859 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 03:43:03 -0000 Author: eadler Date: Mon Oct 22 03:43:02 2012 New Revision: 241859 URL: http://svn.freebsd.org/changeset/base/241859 Log: Correct the killpg(2) return values: Return EPERM if processes were found but they were unable to be signaled. Return the first error from p_cansignal if no signal was successful. Reviewed by: jilles Approved by: cperciva MFC after: 1 week Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Mon Oct 22 03:41:24 2012 (r241858) +++ head/sys/kern/kern_sig.c Mon Oct 22 03:43:02 2012 (r241859) @@ -1599,8 +1599,10 @@ killpg1(struct thread *td, int sig, int { struct proc *p; struct pgrp *pgrp; - int nfound = 0; + int err; + int ret; + ret = ESRCH; if (all) { /* * broadcast @@ -1613,11 +1615,14 @@ killpg1(struct thread *td, int sig, int PROC_UNLOCK(p); continue; } - if (p_cansignal(td, p, sig) == 0) { - nfound++; + err = p_cansignal(td, p, sig); + if (err == 0) { if (sig) pksignal(p, sig, ksi); + ret = err; } + else if (ret == ESRCH) + ret = err; PROC_UNLOCK(p); } sx_sunlock(&allproc_lock); @@ -1644,16 +1649,19 @@ killpg1(struct thread *td, int sig, int PROC_UNLOCK(p); continue; } - if (p_cansignal(td, p, sig) == 0) { - nfound++; + err = p_cansignal(td, p, sig); + if (err == 0) { if (sig) pksignal(p, sig, ksi); + ret = err; } + else if (ret == ESRCH) + ret = err; PROC_UNLOCK(p); } PGRP_UNLOCK(pgrp); } - return (nfound ? 0 : ESRCH); + return (ret); } #ifndef _SYS_SYSPROTO_H_ From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 03:44: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 0652F8AE; Mon, 22 Oct 2012 03:44:13 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E26EE8FC0C; Mon, 22 Oct 2012 03:44: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 q9M3iC1W024690; Mon, 22 Oct 2012 03:44:12 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M3iCfB024688; Mon, 22 Oct 2012 03:44:12 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201210220344.q9M3iCfB024688@svn.freebsd.org> From: Rui Paulo Date: Mon, 22 Oct 2012 03:44:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241860 - head/sys/powerpc/wii X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 03:44:13 -0000 Author: rpaulo Date: Mon Oct 22 03:44:12 2012 New Revision: 241860 URL: http://svn.freebsd.org/changeset/base/241860 Log: Increase the I/O memory area to 0xc20000. Modified: head/sys/powerpc/wii/wii_ipcreg.h Modified: head/sys/powerpc/wii/wii_ipcreg.h ============================================================================== --- head/sys/powerpc/wii/wii_ipcreg.h Mon Oct 22 03:43:02 2012 (r241859) +++ head/sys/powerpc/wii/wii_ipcreg.h Mon Oct 22 03:44:12 2012 (r241860) @@ -32,6 +32,6 @@ #define WIIIPC_REG_ADDR 0x0d000000 #define WIIIPC_REG_LEN 0x40 #define WIIIPC_IOH_ADDR 0x133e0000 -#define WIIIPC_IOH_LEN 0x20000 +#define WIIIPC_IOH_LEN 0xc20000 #endif /* _POWERPC_WII_WII_IPCREG_H */ From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 03:45: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 49BA9A32; Mon, 22 Oct 2012 03:45:38 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2C70A8FC08; Mon, 22 Oct 2012 03:45: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 q9M3jcIC024940; Mon, 22 Oct 2012 03:45:38 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M3jboM024938; Mon, 22 Oct 2012 03:45:37 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201210220345.q9M3jboM024938@svn.freebsd.org> From: Rui Paulo Date: Mon, 22 Oct 2012 03:45:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241861 - head/sys/powerpc/wii X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 03:45:38 -0000 Author: rpaulo Date: Mon Oct 22 03:45:37 2012 New Revision: 241861 URL: http://svn.freebsd.org/changeset/base/241861 Log: Fix the memory regions to include the 64MB DDR3 memory slot. Modified: head/sys/powerpc/wii/platform_wii.c Modified: head/sys/powerpc/wii/platform_wii.c ============================================================================== --- head/sys/powerpc/wii/platform_wii.c Mon Oct 22 03:44:12 2012 (r241860) +++ head/sys/powerpc/wii/platform_wii.c Mon Oct 22 03:45:37 2012 (r241861) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include "platform_if.h" @@ -113,7 +114,7 @@ wii_mem_regions(platform_t plat, struct { /* 24MB 1T-SRAM */ avail_regions[0].mr_start = 0x00000000; - avail_regions[0].mr_size = 0x01800000 - 0x0004000; + avail_regions[0].mr_size = 0x01800000; /* * Reserve space for the framebuffer which is located @@ -122,12 +123,19 @@ wii_mem_regions(platform_t plat, struct avail_regions[0].mr_size -= WIIFB_FB_LEN; /* 64MB GDDR3 SDRAM */ - avail_regions[1].mr_start = 0x10000000 + 0x0004000; - avail_regions[1].mr_size = 0x04000000 - 0x0004000; + avail_regions[1].mr_start = 0x10000000; + avail_regions[1].mr_size = 0x04000000; - /* XXX for now only use the first memory region */ -#undef MEM_REGIONS -#define MEM_REGIONS 1 + /* + * Reserve space for the DSP. + */ + avail_regions[1].mr_start += 0x4000; + avail_regions[1].mr_size -= 0x4000; + + /* + * Reserve space for the IOS I/O memory. + */ + avail_regions[1].mr_size -= WIIIPC_IOH_LEN + 1; *phys = *avail = avail_regions; *physsz = *availsz = MEM_REGIONS; From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 03:57: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 70802BF6; Mon, 22 Oct 2012 03:57: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 557E58FC0A; Mon, 22 Oct 2012 03:57: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 q9M3v1vE026803; Mon, 22 Oct 2012 03:57:01 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M3v18q026797; Mon, 22 Oct 2012 03:57:01 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220357.q9M3v18q026797@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 03:57:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241862 - in head/usr.bin: . ssh-copy-id X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 03:57:01 -0000 Author: eadler Date: Mon Oct 22 03:57:00 2012 New Revision: 241862 URL: http://svn.freebsd.org/changeset/base/241862 Log: Add a clean-room reimplementation of a script originally found in openssh's contrib directory. This version has more features and is better written. I intend to submit this upstream as well. Reviewed by: bapt Reviewed by: des Approved by: cperciva MFC after: 1 week Added: head/usr.bin/ssh-copy-id/ head/usr.bin/ssh-copy-id/Makefile (contents, props changed) head/usr.bin/ssh-copy-id/ssh-copy-id.1 (contents, props changed) head/usr.bin/ssh-copy-id/ssh-copy-id.sh (contents, props changed) Modified: head/usr.bin/Makefile Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Mon Oct 22 03:45:37 2012 (r241861) +++ head/usr.bin/Makefile Mon Oct 22 03:57:00 2012 (r241862) @@ -146,6 +146,7 @@ SUBDIR= alias \ sockstat \ sort \ split \ + ssh-copy-id \ stat \ stdbuf \ su \ Added: head/usr.bin/ssh-copy-id/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/ssh-copy-id/Makefile Mon Oct 22 03:57:00 2012 (r241862) @@ -0,0 +1,24 @@ +# $FreeBSD$ + +SCRIPTS= ssh-copy-id.sh +MAN= ssh-copy-id.1 + +.include +# $FreeBSD$ + +SCRIPTS= ssh-copy-id.sh +MAN= ssh-copy-id.1 + +.include +# $FreeBSD$ + +SCRIPTS= ssh-copy-id.sh +MAN= ssh-copy-id.1 + +.include +# $FreeBSD$ + +SCRIPTS= ssh-copy-id.sh +MAN= ssh-copy-id.1 + +.include Added: head/usr.bin/ssh-copy-id/ssh-copy-id.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/ssh-copy-id/ssh-copy-id.1 Mon Oct 22 03:57:00 2012 (r241862) @@ -0,0 +1,80 @@ +.\"- +.\" Copyright (c) 2012 Eitan Adler +.\" 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 October 3, 2012 +.Dt SSH-COPY-ID 1 +.Os +.Sh NAME +.Nm ssh-copy-id +.Nd copy public keys to a remote host +.Sh SYNOPSIS +.Nm +.Op Fl l +.Op Fl i Ar keyfile +.Op Fl o Ar option +.Op Fl p Ar port +.Oo Ar user Ns @ Oc Ns Ar hostname +.Sh DESCRIPTION +The +.Nm +utility copies public keys to a remote host's +.Pa authorized_keys +file. +.Pp +The following options are available: +.Bl -tag -width indent +.It Fl i Ar file +Copy the key contained in +.Ar file . +This option can be specified multiple times and can be combined with +the +.Fl l +option. +.It Fl l +Copy the keys currently held by +.Xr ssh-agent 1 . +This is the default if the +.Fl i +option was not specified. +.It Fl o Ar ssh-option +Pass this option directly to +.Xr ssh 1 . +This option can be specified multiple times. +.It Fl p Ar port +Connect to the specified port on the remote host instead of the +default. +.El +.Pp +The remaining arguments are a list of remote hosts to connect to, +each one optionally qualified by a user name. +.Sh HISTORY +The +.Nm +utility was written by +.An Eitan Adler Aq eadler@FreeBSD.org +as a drop-in replacement for an existing utility included with +OpenSSH. Added: head/usr.bin/ssh-copy-id/ssh-copy-id.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/ssh-copy-id/ssh-copy-id.sh Mon Oct 22 03:57:00 2012 (r241862) @@ -0,0 +1,105 @@ +#!/bin/sh +#- +# Copyright (c) 2012 Eitan Adler +# 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 +# in this position and unchanged. +# 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$ + +usage() { + echo "usage: ssh-copy-id [-l] [-i keyfile] [-o option] [-p port] [user@]hostname" >&2 + exit 1 +} + +sendkey() { + local h="$1" + shift 1 + local k="$@" + echo "$k" | ssh $port -S none $options "$user$h" /bin/sh -c \'' + set -e; + umask 077; + keyfile=$HOME/.ssh/authorized_keys ; + mkdir -p $HOME/.ssh/ ; + while read alg key comment ; do + if ! grep -sqwF "$key" "$keyfile"; then + echo "$alg $key $comment" | + tee -a "$keyfile" >/dev/null ; + fi ; + done + '\' +} + +agentKeys() { + keys="$(ssh-add -L | grep -v 'The agent has no identities.')$nl$keys" +} + +keys="" +host="" +hasarg="" +user="" +port="" +nl=" +" +options="" + +while getopts 'i:lo:p:' arg; do + case $arg in + i) + hasarg="x" + if [ -f "$OPTARG" ]; then + keys="$(cat $OPTARG)$nl$keys" + fi + ;; + l) + hasarg="x" + agentKeys + ;; + p) + port="-p $OPTARG" + ;; + o) + options="$options -o '$OPTARG'" + ;; + *) + usage + ;; + esac +done >&2 + +shift $((OPTIND-1)) + +if [ -z "$hasarg" ]; then + agentKeys +fi +if [ -z "$keys" -o "$keys" = "$nl" ]; then + echo "no keys found" >&2 + exit 1 +fi +if [ -z "$@" ]; then + usage +fi + +for host in "$@"; do + sendkey "$host" "$keys" +done From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 04:06: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 7CB64DCD; Mon, 22 Oct 2012 04:06:58 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) by mx1.freebsd.org (Postfix) with ESMTP id 4D53F8FC08; Mon, 22 Oct 2012 04:06:58 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.5/8.14.5) with ESMTP id q9M46pFT049677; Sun, 21 Oct 2012 21:06:51 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.5/8.14.5/Submit) id q9M46phE049676; Sun, 21 Oct 2012 21:06:51 -0700 (PDT) (envelope-from sgk) Date: Sun, 21 Oct 2012 21:06:51 -0700 From: Steve Kargl To: Warner Losh Subject: Re: svn commit: r241755 - head/lib/msun/src Message-ID: <20121022040651.GA49632@troutmask.apl.washington.edu> References: <201210192246.q9JMkm4R092929@svn.freebsd.org> <20121020150917.I1095@besplex.bde.org> <18177777-6EE0-4103-98B0-272EFF98FE96@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18177777-6EE0-4103-98B0-272EFF98FE96@bsdimp.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Warner Losh , Bruce Evans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 04:06:58 -0000 On Sun, Oct 21, 2012 at 09:08:49PM -0600, Warner Losh wrote: > Feel free to fix them however. I added the comments because > the algorithms weren't quite the same... If you have a better > way, feel free to back my stuff out on the way to it. > > Warner > Please back your commits out. Two of the three people who actually appear to be working on libm have now requested the back-out. -- Steve From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 04:18: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 A7E81172; Mon, 22 Oct 2012 04:18:17 +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 907298FC08; Mon, 22 Oct 2012 04:18: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 q9M4IHCD030370; Mon, 22 Oct 2012 04:18:17 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M4IHRK030368; Mon, 22 Oct 2012 04:18:17 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210220418.q9M4IHRK030368@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 04:18:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241863 - head/sys/dev/mpt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 04:18:17 -0000 Author: eadler Date: Mon Oct 22 04:18:17 2012 New Revision: 241863 URL: http://svn.freebsd.org/changeset/base/241863 Log: Now that device disabling is generic, remove the non-standard implementation from mpt Don't MFC this to retain backwards compatibility. Reviewed by: des, mjacob Approved by: cperciva Modified: head/sys/dev/mpt/mpt_pci.c Modified: head/sys/dev/mpt/mpt_pci.c ============================================================================== --- head/sys/dev/mpt/mpt_pci.c Mon Oct 22 03:57:00 2012 (r241862) +++ head/sys/dev/mpt/mpt_pci.c Mon Oct 22 04:18:17 2012 (r241863) @@ -268,11 +268,6 @@ mpt_set_options(struct mpt_softc *mpt) tval = 0; if (resource_int_value(device_get_name(mpt->dev), - device_get_unit(mpt->dev), "disable", &tval) == 0 && tval != 0) { - mpt->disabled = 1; - } - tval = 0; - if (resource_int_value(device_get_name(mpt->dev), device_get_unit(mpt->dev), "debug", &tval) == 0 && tval != 0) { mpt->verbose = tval; } From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 04:23: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 1A9A2351; Mon, 22 Oct 2012 04:23:27 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) by mx1.freebsd.org (Postfix) with ESMTP id E849B8FC12; Mon, 22 Oct 2012 04:23:26 +0000 (UTC) Received: from Xins-MacBook-Pro.local (c-67-188-85-47.hsd1.ca.comcast.net [67.188.85.47]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by anubis.delphij.net (Postfix) with ESMTPSA id 55D6E1B6CE; Sun, 21 Oct 2012 21:23:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=delphij.net; s=anubis; t=1350879806; bh=txfgsw5I5+PECe3TydGe7n/lzJ1eJSwDQ7sJ7CcRERQ=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=x/MPm4bIVUIpxFvILSSeg9QVixAYUqKXvlOEc5CM+lWFAOkpLZd3ZH+OthPHcG/JF Z6yPhWwjg2taC4xTHoKlZnAQWTzBPVB0aF4HbBuvA25AMbPZmgS2W57IiNnpbXChdo H99yjzB3aTpv9lwKxn1d6XoUOy3ASnMlr4no6fIg= Message-ID: <5084CA3D.2030807@delphij.net> Date: Sun, 21 Oct 2012 21:23:25 -0700 From: Xin Li Organization: The FreeBSD Project MIME-Version: 1.0 To: Eitan Adler Subject: Re: svn commit: r241862 - in head/usr.bin: . ssh-copy-id References: <201210220357.q9M3v18q026797@svn.freebsd.org> In-Reply-To: <201210220357.q9M3v18q026797@svn.freebsd.org> X-Enigmail-Version: 1.4.5 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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: d@delphij.net List-Id: "SVN commit messages 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, 22 Oct 2012 04:23:27 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 10/21/12 8:57 PM, Eitan Adler wrote: > Author: eadler Date: Mon Oct 22 03:57:00 2012 New Revision: 241862 > URL: http://svn.freebsd.org/changeset/base/241862 > > Log: Add a clean-room reimplementation of a script originally > found in openssh's contrib directory. > > This version has more features and is better written. I intend to > submit this upstream as well. > > Reviewed by: bapt Reviewed by: des Approved by: cperciva MFC > after: 1 week > > Added: head/usr.bin/ssh-copy-id/ head/usr.bin/ssh-copy-id/Makefile > (contents, props changed) head/usr.bin/ssh-copy-id/ssh-copy-id.1 > (contents, props changed) head/usr.bin/ssh-copy-id/ssh-copy-id.sh > (contents, props changed) Modified: head/usr.bin/Makefile [...] > Added: head/usr.bin/ssh-copy-id/Makefile > ============================================================================== > > > - --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/ssh-copy-id/Makefile Mon Oct 22 03:57:00 2012 > (r241862) @@ -0,0 +1,24 @@ +# $FreeBSD$ + +SCRIPTS= ssh-copy-id.sh > +MAN= ssh-copy-id.1 + +.include +# $FreeBSD$ + > +SCRIPTS= ssh-copy-id.sh +MAN= ssh-copy-id.1 + +.include > +# $FreeBSD$ + +SCRIPTS= ssh-copy-id.sh +MAN= > ssh-copy-id.1 + +.include +# $FreeBSD$ + +SCRIPTS= > ssh-copy-id.sh +MAN= ssh-copy-id.1 + +.include I think this should be just 1 versus 4 copies? Cheers, -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJQhMo9AAoJEG80Jeu8UPuznbEIAKyAYyP2YfYkckvd2vA6Xu/z BpScMKC6PdAqkwjbc4et48yzBEjdK8ptoKpGaq34OHgqLttjSgX6Wj9x9/tIP68R T6KxodV3ceFOHv+PBfrOI18GmI4MulpZgW1+hJiSEBzypiWJpPWXujPl5maWOQpm KKiMYYg5/8X0E+8ccBsb8uXEpHUl1c6432e9dHqI9inpt5WqlyWz7uz8Indm7mBi bmNCLODAqzxXBTtLkCNOBsHNisfXp/L/QNuVDDALr07IucYVl5Zb8ctwm32M52cu 4cmGHqjZFMbPyZqxhRRldMWTt+7fkBtOa6KwKoN84KReimxXIcct1VQlDnrcsw4= =7hXW -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 07:02: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 46B54483; Mon, 22 Oct 2012 07:02:28 +0000 (UTC) (envelope-from jbeich@tormail.org) Received: from outgoing.tormail.org (outgoing.tormail.org [82.221.96.22]) by mx1.freebsd.org (Postfix) with ESMTP id D34768FC0C; Mon, 22 Oct 2012 07:02:27 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=internal.tormail.org) by outgoing.tormail.org with esmtp (Exim 4.72) (envelope-from ) id 1TQC1j-0000bO-4p; Mon, 22 Oct 2012 11:02:19 +0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tormail.org; s=tm; h=Message-Id:X-TorMail-User:Content-Type:MIME-Version:References:Date:In-Reply-To:Subject:Cc:To:From; bh=Azb/7E02SSApFiIK1x42u0jWbO9X+6MyxCLa0mOXreQ=; b=WvWpCckDu0URoD3UJW6pJQvfwmTV5M1B9g8gEfvCp7f3mm0vNUE6lVUH3mT0AyeWJQQ85JFKoZXSyFOEybonnVrY+Bfdv+g9VfJPbobN8VHBUjHSCTsXtxtquR1rHEXE/yM5X0024Bq+RerWzHgwQ9LC6AaHJ9d17t9rjiZENrY=; Received: from jbeich by internal.tormail.org with local (Exim 4.63) (envelope-from ) id 1TQC0L-000AZG-Q5; Mon, 22 Oct 2012 07:00:54 +0000 From: Jan Beich To: Dimitry Andric Subject: Re: svn commit: r241823 - in head: . etc etc/atf etc/mtree lib lib/atf lib/atf/libatf-c lib/atf/libatf-c++ libexec libexec/atf libexec/atf/atf-check share share/atf share/doc share/doc/atf share/exampl... In-Reply-To: <201210220118.q9M1Ifh5098857__14926.3614825488$1350868751$gmane$org@svn.freebsd.org> (Marcel Moolenaar's message of "Mon, 22 Oct 2012 01:18:41 +0000 (UTC)") Date: Mon, 22 Oct 2012 13:00:47 +0600 References: <201210220118.q9M1Ifh5098857__14926.3614825488$1350868751$gmane$org@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain X-TorMail-User: jbeich Message-Id: <1TQC0L-000AZG-Q5@internal.tormail.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 07:02:28 -0000 Marcel Moolenaar writes: > Author: marcel > Date: Mon Oct 22 01:18:41 2012 > New Revision: 241823 > URL: http://svn.freebsd.org/changeset/base/241823 > > Log: > Add ATF to the build. This is may be a bit rought around the egdes, > but committing it helps to get everyone on the same page and makes > sure we make progress. [...] atf-run fails to link when using -stdlib=libc++. It works if I remove `throw' from check_stream(). Any clue? test-program.o: In function `(anonymous namespace)::check_stream(std::__1::basic_ostream >&)': /usr/src/usr.bin/atf/atf-run/../../../contrib/atf/atf-run/test-program.cpp:76: undefined reference to `std::__1::basic_ios >::clear(unsigned int)' clang++: error: linker command failed with exit code 1 (use -v to see invocation) From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 07:04: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 8034A61A; Mon, 22 Oct 2012 07:04:35 +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 686EE8FC12; Mon, 22 Oct 2012 07:04: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 q9M74ZJA056564; Mon, 22 Oct 2012 07:04:35 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M74Z10056562; Mon, 22 Oct 2012 07:04:35 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201210220704.q9M74Z10056562@svn.freebsd.org> From: Kevin Lo Date: Mon, 22 Oct 2012 07:04:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241864 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 07:04:35 -0000 Author: kevlo Date: Mon Oct 22 07:04:34 2012 New Revision: 241864 URL: http://svn.freebsd.org/changeset/base/241864 Log: Remove MLINK for if_idt. Spotted by: Alie Tan Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Mon Oct 22 04:18:17 2012 (r241863) +++ head/share/man/man4/Makefile Mon Oct 22 07:04:34 2012 (r241864) @@ -615,7 +615,6 @@ MLINKS+=hme.4 if_hme.4 MLINKS+=hpet.4 acpi_hpet.4 MLINKS+=${_hptrr.4} ${_rr232x.4} MLINKS+=${_attimer.4} ${_i8254.4} -MLINKS+=idt.4 if_idt.4 MLINKS+=igb.4 if_igb.4 MLINKS+=ip.4 rawip.4 MLINKS+=ipfirewall.4 ipaccounting.4 \ From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 07:18: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 13A03962; Mon, 22 Oct 2012 07:18:17 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from freefall.freebsd.org (freefall.FreeBSD.org [8.8.178.135]) by mx1.freebsd.org (Postfix) with ESMTP id E4D758FC0C; Mon, 22 Oct 2012 07:18:16 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q9M7IGRt019831; Mon, 22 Oct 2012 07:18:16 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q9M7IGnG019830; Mon, 22 Oct 2012 07:18:16 GMT (envelope-from bapt@FreeBSD.org) X-Authentication-Warning: freefall.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f Date: Mon, 22 Oct 2012 09:18:13 +0200 From: Baptiste Daroussin To: Eitan Adler Subject: Re: svn commit: r241830 - in head/usr.sbin/pkg_install: add create delete info lib updating version Message-ID: <20121022071813.GA38813@ithaqua.etoilebsd.net> References: <201210220212.q9M2CKKP008069@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3V7upXqbjpZ4EhLz" Content-Disposition: inline In-Reply-To: <201210220212.q9M2CKKP008069@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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 07:18:17 -0000 --3V7upXqbjpZ4EhLz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable hi, pkg_install are under portmgr maintainership, and we never received this pa= tch to review and validate. The patch looks ok but should have been validated by portmgr and is missing= the needed bump of the version number. Last I totally disagree on a 3 days MFC time, but would rather go for at le= ast one month or even more, so that we can really get feedback from people actu= ally using this before MFCing regards, Bapt On Mon, Oct 22, 2012 at 02:12:20AM +0000, Eitan Adler wrote: > Author: eadler > Date: Mon Oct 22 02:12:20 2012 > New Revision: 241830 > URL: http://svn.freebsd.org/changeset/base/241830 >=20 > Log: > Warn users when using pkg tools if it looks like they > be be pkgng users. > =20 > Reviewed by: bapt (earlier version) > Reviewed by: kwm > Approved by: cperciva > MFC after: 3 days >=20 > Added: > head/usr.sbin/pkg_install/lib/pkgng.c (contents, props changed) > Modified: > head/usr.sbin/pkg_install/add/main.c > head/usr.sbin/pkg_install/create/main.c > head/usr.sbin/pkg_install/delete/main.c > head/usr.sbin/pkg_install/info/main.c > head/usr.sbin/pkg_install/lib/Makefile > head/usr.sbin/pkg_install/lib/lib.h > head/usr.sbin/pkg_install/updating/main.c > head/usr.sbin/pkg_install/version/main.c >=20 > Modified: head/usr.sbin/pkg_install/add/main.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/usr.sbin/pkg_install/add/main.c Mon Oct 22 02:12:15 2012 (r24182= 9) > +++ head/usr.sbin/pkg_install/add/main.c Mon Oct 22 02:12:20 2012 (r24183= 0) > @@ -135,6 +135,7 @@ main(int argc, char **argv) > static char temppackageroot[MAXPATHLEN]; > static char pkgaddpath[MAXPATHLEN]; > =20 > + warnpkgng(); > if (*argv[0] !=3D '/' && strchr(argv[0], '/') !=3D NULL) > PkgAddCmd =3D realpath(argv[0], pkgaddpath); > else >=20 > Modified: head/usr.sbin/pkg_install/create/main.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/usr.sbin/pkg_install/create/main.c Mon Oct 22 02:12:15 2012 (r24= 1829) > +++ head/usr.sbin/pkg_install/create/main.c Mon Oct 22 02:12:20 2012 (r24= 1830) > @@ -72,6 +72,7 @@ main(int argc, char **argv) > int ch; > char **pkgs, **start, *tmp; > =20 > + warnpkgng(); > pkgs =3D start =3D argv; > while ((ch =3D getopt_long(argc, argv, opts, longopts, NULL)) !=3D -= 1) > switch(ch) { >=20 > Modified: head/usr.sbin/pkg_install/delete/main.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/usr.sbin/pkg_install/delete/main.c Mon Oct 22 02:12:15 2012 (r24= 1829) > +++ head/usr.sbin/pkg_install/delete/main.c Mon Oct 22 02:12:20 2012 (r24= 1830) > @@ -67,6 +67,7 @@ main(int argc, char **argv) > const char *tmp; > struct stat stat_s; > =20 > + warnpkgng(); > pkgs =3D start =3D argv; > while ((ch =3D getopt_long(argc, argv, opts, longopts, NULL)) !=3D -= 1) > switch(ch) { >=20 > Modified: head/usr.sbin/pkg_install/info/main.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/usr.sbin/pkg_install/info/main.c Mon Oct 22 02:12:15 2012 (r2418= 29) > +++ head/usr.sbin/pkg_install/info/main.c Mon Oct 22 02:12:20 2012 (r2418= 30) > @@ -68,6 +68,7 @@ main(int argc, char **argv) > char **pkgs, **start; > char *pkgs_split; > =20 > + warnpkgng(); > whead =3D malloc(sizeof(struct which_head)); > if (whead =3D=3D NULL) > err(2, NULL); >=20 > Modified: head/usr.sbin/pkg_install/lib/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=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.sbin/pkg_install/lib/Makefile Mon Oct 22 02:12:15 2012 (r241= 829) > +++ head/usr.sbin/pkg_install/lib/Makefile Mon Oct 22 02:12:20 2012 (r241= 830) > @@ -3,7 +3,7 @@ > LIB=3D install > INTERNALLIB=3D > SRCS=3D file.c msg.c plist.c str.c exec.c global.c pen.c match.c \ > - deps.c version.c pkgwrap.c url.c > + deps.c version.c pkgwrap.c url.c pkgng.c > =20 > WARNS?=3D 3 > WFORMAT?=3D 1 >=20 > Modified: head/usr.sbin/pkg_install/lib/lib.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/usr.sbin/pkg_install/lib/lib.h Mon Oct 22 02:12:15 2012 (r241829) > +++ head/usr.sbin/pkg_install/lib/lib.h Mon Oct 22 02:12:20 2012 (r241830) > @@ -157,6 +157,7 @@ const char *make_playpen(char *, off_t); > char *where_playpen(void); > int leave_playpen(void); > off_t min_free(const char *); > +void warnpkgng(void); > =20 > /* String */ > char *get_dash_string(char **); >=20 > Added: head/usr.sbin/pkg_install/lib/pkgng.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 > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.sbin/pkg_install/lib/pkgng.c Mon Oct 22 02:12:20 2012 (r2418= 30) > @@ -0,0 +1,38 @@ > +/* > + * FreeBSD install - a package for the installation and maintenance > + * of non-core utilities. > + * > + * 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 distributio= n. > + * > + * Eitan Adler > + * > + * detect pkgng's existence and warn > + * > + */ > + > +#include > +__FBSDID("$FreeBSD$"); > + > +#include "lib.h" > +#include > + > +void warnpkgng(void) { > + char pkgngpath[MAXPATHLEN]; > + char *pkgngdir; > + > + pkgngdir =3D getenv("PKG_DBDIR"); > + if (pkgngdir =3D=3D NULL) > + pkgngdir =3D "/var/db/pkg"; > + strcpy(pkgngpath, pkgngdir); > + strcat(pkgngpath, "/local.sqlite"); > + > + if (access(pkgngpath, F_OK) =3D=3D 0) > + warnx("Don't use the pkg_ tools if you are using pkgng"); > +} >=20 > Modified: head/usr.sbin/pkg_install/updating/main.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/usr.sbin/pkg_install/updating/main.c Mon Oct 22 02:12:15 2012 (r= 241829) > +++ head/usr.sbin/pkg_install/updating/main.c Mon Oct 22 02:12:20 2012 (r= 241830) > @@ -87,6 +87,7 @@ main(int argc, char *argv[]) > DIR *dir; > FILE *fd; > =20 > + warnpkgng(); > while ((ch =3D getopt_long(argc, argv, opts, longopts, NULL)) !=3D -1) { > switch (ch) { > case 'd': >=20 > Modified: head/usr.sbin/pkg_install/version/main.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/usr.sbin/pkg_install/version/main.c Mon Oct 22 02:12:15 2012 (r2= 41829) > +++ head/usr.sbin/pkg_install/version/main.c Mon Oct 22 02:12:20 2012 (r2= 41830) > @@ -58,6 +58,7 @@ main(int argc, char **argv) > { > int ch, cmp =3D 0; > =20 > + warnpkgng(); > if (argc =3D=3D 4 && !strcmp(argv[1], "-t")) { > cmp =3D version_cmp(argv[2], argv[3]); > printf(cmp > 0 ? ">\n" : (cmp < 0 ? "<\n" : "=3D\n")); > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" --3V7upXqbjpZ4EhLz Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlCE8zUACgkQ8kTtMUmk6EypsQCgqNcC+pnjSc63ZaTZfVIavmfE BNsAnjMrimhz4pJ/IKg9xjoImp1qIFo8 =ArH2 -----END PGP SIGNATURE----- --3V7upXqbjpZ4EhLz-- From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 07:24: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 0C059D57; Mon, 22 Oct 2012 07:24:51 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 7EB6F8FC0C; Mon, 22 Oct 2012 07:24:50 +0000 (UTC) Received: by mail-ob0-f182.google.com with SMTP id wc20so2866625obb.13 for ; Mon, 22 Oct 2012 00:24:44 -0700 (PDT) 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; bh=e9lGkccThp3K67pxWRJ+5T63ytRIFtOQLT4b82iVhA4=; b=VH09R/lCv5c3GNLgKb01f7vBZWnbRBvxV4r1dho4YPKNPC+UkDls3HFNongH0bP2Kd fhCSNfzMheSGJlXmkNSRjoB2+GeiyE4m0+AnWQ4PdSfYdKRANVZ7hOY19+sTQXdwh+ji HcKNTewSunLnD3t9yVxDYZhgIpqcRGjp46WtkxGG7eip578PiK85tvdqS0Pfr8j8e+BW u8e+PVpOwx8CM2hv2MrjiUIU2VaCVTNF3XcZUbNZjgK3aVRfVljJlwQuRCGS1XHpiRIw /rOh03J9ksfKnycA/g4TCE1Fp1ETIyhZcjmbU2acAe6IB9pOcUW6RIe7fn8VdgfnDlkv Q0tg== MIME-Version: 1.0 Received: by 10.182.172.74 with SMTP id ba10mr6228777obc.83.1350890684003; Mon, 22 Oct 2012 00:24:44 -0700 (PDT) Received: by 10.76.143.33 with HTTP; Mon, 22 Oct 2012 00:24:43 -0700 (PDT) In-Reply-To: <1TQC0L-000AZG-Q5@internal.tormail.org> References: <201210220118.q9M1Ifh5098857__14926.3614825488$1350868751$gmane$org@svn.freebsd.org> <1TQC0L-000AZG-Q5@internal.tormail.org> Date: Mon, 22 Oct 2012 00:24:43 -0700 Message-ID: Subject: Re: svn commit: r241823 - in head: . etc etc/atf etc/mtree lib lib/atf lib/atf/libatf-c lib/atf/libatf-c++ libexec libexec/atf libexec/atf/atf-check share share/atf share/doc share/doc/atf share/exampl... From: Garrett Cooper To: Jan Beich Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , Dimitry Andric , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 07:24:51 -0000 On Mon, Oct 22, 2012 at 12:00 AM, Jan Beich wrote: > Marcel Moolenaar writes: > >> Author: marcel >> Date: Mon Oct 22 01:18:41 2012 >> New Revision: 241823 >> URL: http://svn.freebsd.org/changeset/base/241823 >> >> Log: >> Add ATF to the build. This is may be a bit rought around the egdes, >> but committing it helps to get everyone on the same page and makes >> sure we make progress. > [...] > > atf-run fails to link when using -stdlib=libc++. It works if I remove > `throw' from check_stream(). Any clue? > > test-program.o: In function `(anonymous namespace)::check_stream(std::__1::basic_ostream >&)': > /usr/src/usr.bin/atf/atf-run/../../../contrib/atf/atf-run/test-program.cpp:76: undefined reference to `std::__1::basic_ios >::clear(unsigned int)' > clang++: error: linker command failed with exit code 1 (use -v to see invocation) Is it a bug in libc++ where it's doing the wrong thing inlining some values for basic_ios (my guess is based on the snippet example at: http://www.cplusplus.com/reference/iostream/ios/clear/ ): $ p4 diff -du ios --- //depot/user/gcooper/atf-head/src/contrib/libc++/include/ios 2012-05-20 04:37:04.000000000 0000 +++ /scratch/p4/user/gcooper/atf-head/src/contrib/libc++/include/ios 2012-05-20 04:37:04.000000000 0000 @@ -575,10 +575,10 @@ _LIBCPP_ALWAYS_INLINE _LIBCPP_EXPLICIT operator bool() const {return !fail();} - _LIBCPP_ALWAYS_INLINE bool operator!() const {return fail();} - _LIBCPP_ALWAYS_INLINE iostate rdstate() const {return ios_base::rdstate();} - _LIBCPP_ALWAYS_INLINE void clear(iostate __state = goodbit) {ios_base::clear(__state);} - _LIBCPP_ALWAYS_INLINE void setstate(iostate __state) {ios_base::setstate(__state);} + _LIBCPP_INLINE_VISIBILITY bool operator!() const {return fail();} + _LIBCPP_INLINE_VISIBILITY iostate rdstate() const {return ios_base::rdstate();} + void clear(iostate __state = goodbit) {ios_base::clear(__state);} + _LIBCPP_INLINE_VISIBILITY void setstate(iostate __state) {ios_base::setstate(__state);} _LIBCPP_ALWAYS_INLINE bool good() const {return ios_base::good();} _LIBCPP_ALWAYS_INLINE bool eof() const {return ios_base::eof();} _LIBCPP_ALWAYS_INLINE bool fail() const {return ios_base::fail();} I'm building clang and libc++ in my VM to confirm. Thanks! -Garrett From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 09:07: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 2D38D860; Mon, 22 Oct 2012 09:07:13 +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 14E588FC0A; Mon, 22 Oct 2012 09:07: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 q9M97CTx075958; Mon, 22 Oct 2012 09:07:12 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M97CFu075956; Mon, 22 Oct 2012 09:07:12 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201210220907.q9M97CFu075956@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 22 Oct 2012 09:07:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241865 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 09:07:13 -0000 Author: kib Date: Mon Oct 22 09:07:12 2012 New Revision: 241865 URL: http://svn.freebsd.org/changeset/base/241865 Log: MFC r241597: Acquire the rangelock for truncate(2) as well. Modified: stable/9/sys/kern/vfs_syscalls.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/vfs_syscalls.c ============================================================================== --- stable/9/sys/kern/vfs_syscalls.c Mon Oct 22 07:04:34 2012 (r241864) +++ stable/9/sys/kern/vfs_syscalls.c Mon Oct 22 09:07:12 2012 (r241865) @@ -3461,10 +3461,10 @@ kern_truncate(struct thread *td, char *p { struct mount *mp; struct vnode *vp; + void *rl_cookie; struct vattr vattr; - int error; struct nameidata nd; - int vfslocked; + int error, vfslocked; if (length < 0) return(EINVAL); @@ -3473,7 +3473,9 @@ kern_truncate(struct thread *td, char *p return (error); vfslocked = NDHASGIANT(&nd); vp = nd.ni_vp; + rl_cookie = vn_rangelock_wlock(vp, 0, OFF_MAX); if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0) { + vn_rangelock_unlock(vp, rl_cookie); vrele(vp); VFS_UNLOCK_GIANT(vfslocked); return (error); @@ -3492,8 +3494,10 @@ kern_truncate(struct thread *td, char *p vattr.va_size = length; error = VOP_SETATTR(vp, &vattr, td->td_ucred); } - vput(vp); + VOP_UNLOCK(vp, 0); vn_finished_write(mp); + vn_rangelock_unlock(vp, rl_cookie); + vrele(vp); VFS_UNLOCK_GIANT(vfslocked); return (error); } From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 09:38:08 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 4C8D718F; Mon, 22 Oct 2012 09:38:08 +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 349528FC16; Mon, 22 Oct 2012 09:38: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 q9M9c82e081225; Mon, 22 Oct 2012 09:38:08 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9M9c8Xg081223; Mon, 22 Oct 2012 09:38:08 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201210220938.q9M9c8Xg081223@svn.freebsd.org> From: Gavin Atkinson Date: Mon, 22 Oct 2012 09:38:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241866 - head/share/syscons/keymaps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 09:38:08 -0000 Author: gavin Date: Mon Oct 22 09:38:07 2012 New Revision: 241866 URL: http://svn.freebsd.org/changeset/base/241866 Log: Add German, French, Portuguese and Spanish names for the Spanish Dvorak keymap. MFC after: 1 week Modified: head/share/syscons/keymaps/INDEX.keymaps Modified: head/share/syscons/keymaps/INDEX.keymaps ============================================================================== --- head/share/syscons/keymaps/INDEX.keymaps Mon Oct 22 09:07:12 2012 (r241865) +++ head/share/syscons/keymaps/INDEX.keymaps Mon Oct 22 09:38:07 2012 (r241866) @@ -381,6 +381,10 @@ ru.koi8-r.win.kbd:es:Ruso koi8-r (winkey ru.koi8-r.win.kbd:uk:òÏÓ¦ÊÓØËÁ koi8-r (winkeys) spanish.dvorak.kbd:en:Spanish Dvorak +spanish.dvorak.kbd:de:Spanisch Dvorak +spanish.dvorak.kbd:fr:Espagnol Dvorak +spanish.dvorak.kbd:pt:Espanhol Dvorak +spanish.dvorak.kbd:es:Español Dvorak spanish.iso.kbd:en:Spanish ISO-8859-1 spanish.iso.kbd:de:Spanisch ISO-8859-1 From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 10:08: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 A6987878; Mon, 22 Oct 2012 10:08:49 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 851B58FC08; Mon, 22 Oct 2012 10:08: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 q9MA8nNT086272; Mon, 22 Oct 2012 10:08:49 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MA8nnm086269; Mon, 22 Oct 2012 10:08:49 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201210221008.q9MA8nnm086269@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 22 Oct 2012 10:08:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r241867 - vendor/tzdata/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 10:08:49 -0000 Author: edwin Date: Mon Oct 22 10:08:48 2012 New Revision: 241867 URL: http://svn.freebsd.org/changeset/base/241867 Log: Vendor import of tzdata2012g: - Fix end of DST in Gaza and Hebron - Western Samoa: DST start at 30 Septembet 2012 and finished at 7 April 2013. Obtained from: ftp://ftp.iana.org/tz/releases/ Modified: vendor/tzdata/dist/asia vendor/tzdata/dist/australasia Modified: vendor/tzdata/dist/asia ============================================================================== --- vendor/tzdata/dist/asia Mon Oct 22 09:38:07 2012 (r241866) +++ vendor/tzdata/dist/asia Mon Oct 22 10:08:48 2012 (r241867) @@ -2293,6 +2293,8 @@ Rule Palestine 2010 only - Aug 11 0:00 0 # From Arthur David Olson (2011-09-20): # 2011 transitions per http://www.timeanddate.com as of 2011-09-20. +# From Paul Eggert (2012-10-12): +# 2012 transitions per http://www.timeanddate.com as of 2012-10-12. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Gaza 2:17:52 - LMT 1900 Oct @@ -2303,7 +2305,7 @@ Zone Asia/Gaza 2:17:52 - LMT 1900 Oct 2:00 Palestine EE%sT 2011 Apr 2 12:01 2:00 1:00 EEST 2011 Aug 1 2:00 - EET 2012 Mar 30 - 2:00 1:00 EEST 2012 Sep 28 + 2:00 1:00 EEST 2012 Sep 21 1:00 2:00 - EET Zone Asia/Hebron 2:20:23 - LMT 1900 Oct @@ -2318,7 +2320,7 @@ Zone Asia/Hebron 2:20:23 - LMT 1900 Oct 2:00 - EET 2011 Aug 30 2:00 1:00 EEST 2011 Sep 30 3:00 2:00 - EET 2012 Mar 30 - 2:00 1:00 EEST 2012 Sep 28 3:00 + 2:00 1:00 EEST 2012 Sep 21 1:00 2:00 - EET # Paracel Is Modified: vendor/tzdata/dist/australasia ============================================================================== --- vendor/tzdata/dist/australasia Mon Oct 22 09:38:07 2012 (r241866) +++ vendor/tzdata/dist/australasia Mon Oct 22 10:08:48 2012 (r241867) @@ -628,6 +628,23 @@ Zone Pacific/Pago_Pago 12:37:12 - LMT 1 # Although Samoa has used Daylight Saving Time in the 2010-2011 and 2011-2012 # seasons, there is not yet any indication that this trend will continue on # a regular basis. For now, we have explicitly listed the transitions below. +# +# From Nicky (2012-09-10): +# Daylight Saving Time commences on Sunday 30th September 2012 and +# ends on Sunday 7th of April 2013. +# +# Please find link below for more information. +# http://www.mcil.gov.ws/mcil_publications.html +# +# That publication also includes dates for Summer of 2013/4 as well +# which give the impression of a pattern in selecting dates for the +# future, so for now, we will guess this will continue. + +# Western Samoa +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule WS 2012 max - Sep lastSun 3:00 1 D +Rule WS 2012 max - Apr Sun>=1 4:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Apia 12:33:04 - LMT 1879 Jul 5 -11:26:56 - LMT 1911 -11:30 - SAMT 1950 # Samoa Time @@ -635,8 +652,8 @@ Zone Pacific/Apia 12:33:04 - LMT 1879 J -11:00 1:00 WSDT 2011 Apr 2 4:00 -11:00 - WST 2011 Sep 24 3:00 -11:00 1:00 WSDT 2011 Dec 30 - 13:00 1:00 WSDT 2012 Apr 1 4:00 - 13:00 - WST + 13:00 1:00 WSDT 2012 Apr Sun>=1 4:00 + 13:00 WS WS%sT # Solomon Is # excludes Bougainville, for which see Papua New Guinea From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 10:18: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 5756FD26; Mon, 22 Oct 2012 10:18:42 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 25EC38FC0A; Mon, 22 Oct 2012 10:18: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 q9MAIgsT087834; Mon, 22 Oct 2012 10:18:42 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MAIfZJ087833; Mon, 22 Oct 2012 10:18:41 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201210221018.q9MAIfZJ087833@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 22 Oct 2012 10:18:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r241868 - vendor/tzdata/tzdata2012g X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 10:18:42 -0000 Author: edwin Date: Mon Oct 22 10:18:41 2012 New Revision: 241868 URL: http://svn.freebsd.org/changeset/base/241868 Log: Tag of tzdata2012g sources Added: vendor/tzdata/tzdata2012g/ - copied from r241867, vendor/tzdata/dist/ From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 10:20: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 4FA17EA2; Mon, 22 Oct 2012 10:20:12 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E4168FC08; Mon, 22 Oct 2012 10:20: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 q9MAKCxD088115; Mon, 22 Oct 2012 10:20:12 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MAKBtW088112; Mon, 22 Oct 2012 10:20:11 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201210221020.q9MAKBtW088112@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 22 Oct 2012 10:20:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241869 - head/contrib/tzdata X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 10:20:12 -0000 Author: edwin Date: Mon Oct 22 10:20:11 2012 New Revision: 241869 URL: http://svn.freebsd.org/changeset/base/241869 Log: MFV of r241867 Merge of tzdata2012g into head: - Fix end of DST in Gaza and Hebron - Western Samoa: DST start at 30 Septembet 2012 and finished at 7 April 2013. Modified: head/contrib/tzdata/asia head/contrib/tzdata/australasia Directory Properties: head/contrib/tzdata/ (props changed) Modified: head/contrib/tzdata/asia ============================================================================== --- head/contrib/tzdata/asia Mon Oct 22 10:18:41 2012 (r241868) +++ head/contrib/tzdata/asia Mon Oct 22 10:20:11 2012 (r241869) @@ -2293,6 +2293,8 @@ Rule Palestine 2010 only - Aug 11 0:00 0 # From Arthur David Olson (2011-09-20): # 2011 transitions per http://www.timeanddate.com as of 2011-09-20. +# From Paul Eggert (2012-10-12): +# 2012 transitions per http://www.timeanddate.com as of 2012-10-12. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Gaza 2:17:52 - LMT 1900 Oct @@ -2303,7 +2305,7 @@ Zone Asia/Gaza 2:17:52 - LMT 1900 Oct 2:00 Palestine EE%sT 2011 Apr 2 12:01 2:00 1:00 EEST 2011 Aug 1 2:00 - EET 2012 Mar 30 - 2:00 1:00 EEST 2012 Sep 28 + 2:00 1:00 EEST 2012 Sep 21 1:00 2:00 - EET Zone Asia/Hebron 2:20:23 - LMT 1900 Oct @@ -2318,7 +2320,7 @@ Zone Asia/Hebron 2:20:23 - LMT 1900 Oct 2:00 - EET 2011 Aug 30 2:00 1:00 EEST 2011 Sep 30 3:00 2:00 - EET 2012 Mar 30 - 2:00 1:00 EEST 2012 Sep 28 3:00 + 2:00 1:00 EEST 2012 Sep 21 1:00 2:00 - EET # Paracel Is Modified: head/contrib/tzdata/australasia ============================================================================== --- head/contrib/tzdata/australasia Mon Oct 22 10:18:41 2012 (r241868) +++ head/contrib/tzdata/australasia Mon Oct 22 10:20:11 2012 (r241869) @@ -628,6 +628,23 @@ Zone Pacific/Pago_Pago 12:37:12 - LMT 1 # Although Samoa has used Daylight Saving Time in the 2010-2011 and 2011-2012 # seasons, there is not yet any indication that this trend will continue on # a regular basis. For now, we have explicitly listed the transitions below. +# +# From Nicky (2012-09-10): +# Daylight Saving Time commences on Sunday 30th September 2012 and +# ends on Sunday 7th of April 2013. +# +# Please find link below for more information. +# http://www.mcil.gov.ws/mcil_publications.html +# +# That publication also includes dates for Summer of 2013/4 as well +# which give the impression of a pattern in selecting dates for the +# future, so for now, we will guess this will continue. + +# Western Samoa +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule WS 2012 max - Sep lastSun 3:00 1 D +Rule WS 2012 max - Apr Sun>=1 4:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Apia 12:33:04 - LMT 1879 Jul 5 -11:26:56 - LMT 1911 -11:30 - SAMT 1950 # Samoa Time @@ -635,8 +652,8 @@ Zone Pacific/Apia 12:33:04 - LMT 1879 J -11:00 1:00 WSDT 2011 Apr 2 4:00 -11:00 - WST 2011 Sep 24 3:00 -11:00 1:00 WSDT 2011 Dec 30 - 13:00 1:00 WSDT 2012 Apr 1 4:00 - 13:00 - WST + 13:00 1:00 WSDT 2012 Apr Sun>=1 4:00 + 13:00 WS WS%sT # Solomon Is # excludes Bougainville, for which see Papua New Guinea From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 10:20: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 76054FAD; Mon, 22 Oct 2012 10:20:33 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (unknown [IPv6:2001:610:1108:5012::107]) by mx1.freebsd.org (Postfix) with ESMTP id D397E8FC14; Mon, 22 Oct 2012 10:20:32 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 4918C1203E8; Mon, 22 Oct 2012 12:20:29 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id 3422F2848C; Mon, 22 Oct 2012 12:20:29 +0200 (CEST) Date: Mon, 22 Oct 2012 12:20:29 +0200 From: Jilles Tjoelker To: Eitan Adler Subject: Re: svn commit: r241830 - in head/usr.sbin/pkg_install: add create delete info lib updating version Message-ID: <20121022102028.GA11437@stack.nl> References: <201210220212.q9M2CKKP008069@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201210220212.q9M2CKKP008069@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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 10:20:33 -0000 On Mon, Oct 22, 2012 at 02:12:20AM +0000, Eitan Adler wrote: > Author: eadler > Date: Mon Oct 22 02:12:20 2012 > New Revision: 241830 > URL: http://svn.freebsd.org/changeset/base/241830 > Added: head/usr.sbin/pkg_install/lib/pkgng.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.sbin/pkg_install/lib/pkgng.c Mon Oct 22 02:12:20 2012 (r241830) > @@ -0,0 +1,38 @@ > +/* > + * FreeBSD install - a package for the installation and maintenance > + * of non-core utilities. > + * > + * 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. > + * > + * Eitan Adler > + * > + * detect pkgng's existence and warn > + * > + */ > + > +#include > +__FBSDID("$FreeBSD$"); > + > +#include "lib.h" > +#include > + > +void warnpkgng(void) { Style bug, the brace should be on a line by itself. > + char pkgngpath[MAXPATHLEN]; > + char *pkgngdir; > + > + pkgngdir = getenv("PKG_DBDIR"); > + if (pkgngdir == NULL) > + pkgngdir = "/var/db/pkg"; > + strcpy(pkgngpath, pkgngdir); > + strcat(pkgngpath, "/local.sqlite"); > + > + if (access(pkgngpath, F_OK) == 0) > + warnx("Don't use the pkg_ tools if you are using pkgng"); > +} There is a buffer overflow if $PKG_DBDIR is too long. Although the environment should be safe in pkg_*, I still don't like it. The easiest fix is to use asprintf(3), which also avoids hard-coding MAXPATHLEN or PATH_MAX. -- Jilles Tjoelker From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 10:29: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 5321B2EF; Mon, 22 Oct 2012 10:29:27 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 300128FC0C; Mon, 22 Oct 2012 10:29: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 q9MATRq8089529; Mon, 22 Oct 2012 10:29:27 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MATQTc089526; Mon, 22 Oct 2012 10:29:26 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201210221029.q9MATQTc089526@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 22 Oct 2012 10:29:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org Subject: svn commit: r241870 - stable/6/share/zoneinfo X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 10:29:27 -0000 Author: edwin Date: Mon Oct 22 10:29:26 2012 New Revision: 241870 URL: http://svn.freebsd.org/changeset/base/241870 Log: Merge of 241869 Import of tzdata2012g - Fix end of DST in Gaza and Hebron - Western Samoa: DST start at 30 Septembet 2012 and finished at 7 April 2013. Modified: stable/6/share/zoneinfo/asia stable/6/share/zoneinfo/australasia Directory Properties: stable/6/share/zoneinfo/ (props changed) Modified: stable/6/share/zoneinfo/asia ============================================================================== --- stable/6/share/zoneinfo/asia Mon Oct 22 10:20:11 2012 (r241869) +++ stable/6/share/zoneinfo/asia Mon Oct 22 10:29:26 2012 (r241870) @@ -2293,6 +2293,8 @@ Rule Palestine 2010 only - Aug 11 0:00 0 # From Arthur David Olson (2011-09-20): # 2011 transitions per http://www.timeanddate.com as of 2011-09-20. +# From Paul Eggert (2012-10-12): +# 2012 transitions per http://www.timeanddate.com as of 2012-10-12. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Gaza 2:17:52 - LMT 1900 Oct @@ -2303,7 +2305,7 @@ Zone Asia/Gaza 2:17:52 - LMT 1900 Oct 2:00 Palestine EE%sT 2011 Apr 2 12:01 2:00 1:00 EEST 2011 Aug 1 2:00 - EET 2012 Mar 30 - 2:00 1:00 EEST 2012 Sep 28 + 2:00 1:00 EEST 2012 Sep 21 1:00 2:00 - EET Zone Asia/Hebron 2:20:23 - LMT 1900 Oct @@ -2318,7 +2320,7 @@ Zone Asia/Hebron 2:20:23 - LMT 1900 Oct 2:00 - EET 2011 Aug 30 2:00 1:00 EEST 2011 Sep 30 3:00 2:00 - EET 2012 Mar 30 - 2:00 1:00 EEST 2012 Sep 28 3:00 + 2:00 1:00 EEST 2012 Sep 21 1:00 2:00 - EET # Paracel Is Modified: stable/6/share/zoneinfo/australasia ============================================================================== --- stable/6/share/zoneinfo/australasia Mon Oct 22 10:20:11 2012 (r241869) +++ stable/6/share/zoneinfo/australasia Mon Oct 22 10:29:26 2012 (r241870) @@ -628,6 +628,23 @@ Zone Pacific/Pago_Pago 12:37:12 - LMT 1 # Although Samoa has used Daylight Saving Time in the 2010-2011 and 2011-2012 # seasons, there is not yet any indication that this trend will continue on # a regular basis. For now, we have explicitly listed the transitions below. +# +# From Nicky (2012-09-10): +# Daylight Saving Time commences on Sunday 30th September 2012 and +# ends on Sunday 7th of April 2013. +# +# Please find link below for more information. +# http://www.mcil.gov.ws/mcil_publications.html +# +# That publication also includes dates for Summer of 2013/4 as well +# which give the impression of a pattern in selecting dates for the +# future, so for now, we will guess this will continue. + +# Western Samoa +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule WS 2012 max - Sep lastSun 3:00 1 D +Rule WS 2012 max - Apr Sun>=1 4:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Apia 12:33:04 - LMT 1879 Jul 5 -11:26:56 - LMT 1911 -11:30 - SAMT 1950 # Samoa Time @@ -635,8 +652,8 @@ Zone Pacific/Apia 12:33:04 - LMT 1879 J -11:00 1:00 WSDT 2011 Apr 2 4:00 -11:00 - WST 2011 Sep 24 3:00 -11:00 1:00 WSDT 2011 Dec 30 - 13:00 1:00 WSDT 2012 Apr 1 4:00 - 13:00 - WST + 13:00 1:00 WSDT 2012 Apr Sun>=1 4:00 + 13:00 WS WS%sT # Solomon Is # excludes Bougainville, for which see Papua New Guinea From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 10:30: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 26F81457; Mon, 22 Oct 2012 10:30:05 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 055138FC12; Mon, 22 Oct 2012 10:30:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9MAU43Z089727; Mon, 22 Oct 2012 10:30:04 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MAU46K089724; Mon, 22 Oct 2012 10:30:04 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201210221030.q9MAU46K089724@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 22 Oct 2012 10:30:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r241871 - stable/7/share/zoneinfo X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 10:30:05 -0000 Author: edwin Date: Mon Oct 22 10:30:04 2012 New Revision: 241871 URL: http://svn.freebsd.org/changeset/base/241871 Log: Merge of 241869 Import of tzdata2012g - Fix end of DST in Gaza and Hebron - Western Samoa: DST start at 30 Septembet 2012 and finished at 7 April 2013. Modified: stable/7/share/zoneinfo/asia stable/7/share/zoneinfo/australasia Directory Properties: stable/7/share/zoneinfo/ (props changed) Modified: stable/7/share/zoneinfo/asia ============================================================================== --- stable/7/share/zoneinfo/asia Mon Oct 22 10:29:26 2012 (r241870) +++ stable/7/share/zoneinfo/asia Mon Oct 22 10:30:04 2012 (r241871) @@ -2293,6 +2293,8 @@ Rule Palestine 2010 only - Aug 11 0:00 0 # From Arthur David Olson (2011-09-20): # 2011 transitions per http://www.timeanddate.com as of 2011-09-20. +# From Paul Eggert (2012-10-12): +# 2012 transitions per http://www.timeanddate.com as of 2012-10-12. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Gaza 2:17:52 - LMT 1900 Oct @@ -2303,7 +2305,7 @@ Zone Asia/Gaza 2:17:52 - LMT 1900 Oct 2:00 Palestine EE%sT 2011 Apr 2 12:01 2:00 1:00 EEST 2011 Aug 1 2:00 - EET 2012 Mar 30 - 2:00 1:00 EEST 2012 Sep 28 + 2:00 1:00 EEST 2012 Sep 21 1:00 2:00 - EET Zone Asia/Hebron 2:20:23 - LMT 1900 Oct @@ -2318,7 +2320,7 @@ Zone Asia/Hebron 2:20:23 - LMT 1900 Oct 2:00 - EET 2011 Aug 30 2:00 1:00 EEST 2011 Sep 30 3:00 2:00 - EET 2012 Mar 30 - 2:00 1:00 EEST 2012 Sep 28 3:00 + 2:00 1:00 EEST 2012 Sep 21 1:00 2:00 - EET # Paracel Is Modified: stable/7/share/zoneinfo/australasia ============================================================================== --- stable/7/share/zoneinfo/australasia Mon Oct 22 10:29:26 2012 (r241870) +++ stable/7/share/zoneinfo/australasia Mon Oct 22 10:30:04 2012 (r241871) @@ -628,6 +628,23 @@ Zone Pacific/Pago_Pago 12:37:12 - LMT 1 # Although Samoa has used Daylight Saving Time in the 2010-2011 and 2011-2012 # seasons, there is not yet any indication that this trend will continue on # a regular basis. For now, we have explicitly listed the transitions below. +# +# From Nicky (2012-09-10): +# Daylight Saving Time commences on Sunday 30th September 2012 and +# ends on Sunday 7th of April 2013. +# +# Please find link below for more information. +# http://www.mcil.gov.ws/mcil_publications.html +# +# That publication also includes dates for Summer of 2013/4 as well +# which give the impression of a pattern in selecting dates for the +# future, so for now, we will guess this will continue. + +# Western Samoa +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule WS 2012 max - Sep lastSun 3:00 1 D +Rule WS 2012 max - Apr Sun>=1 4:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Apia 12:33:04 - LMT 1879 Jul 5 -11:26:56 - LMT 1911 -11:30 - SAMT 1950 # Samoa Time @@ -635,8 +652,8 @@ Zone Pacific/Apia 12:33:04 - LMT 1879 J -11:00 1:00 WSDT 2011 Apr 2 4:00 -11:00 - WST 2011 Sep 24 3:00 -11:00 1:00 WSDT 2011 Dec 30 - 13:00 1:00 WSDT 2012 Apr 1 4:00 - 13:00 - WST + 13:00 1:00 WSDT 2012 Apr Sun>=1 4:00 + 13:00 WS WS%sT # Solomon Is # excludes Bougainville, for which see Papua New Guinea From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 10:30: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 92A7A5C2; Mon, 22 Oct 2012 10:30:44 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 705258FC0A; Mon, 22 Oct 2012 10:30: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 q9MAUi3a089871; Mon, 22 Oct 2012 10:30:44 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MAUiCM089867; Mon, 22 Oct 2012 10:30:44 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201210221030.q9MAUiCM089867@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 22 Oct 2012 10:30:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r241872 - stable/8/share/zoneinfo X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 10:30:44 -0000 Author: edwin Date: Mon Oct 22 10:30:43 2012 New Revision: 241872 URL: http://svn.freebsd.org/changeset/base/241872 Log: Merge of 241869 Import of tzdata2012g - Fix end of DST in Gaza and Hebron - Western Samoa: DST start at 30 Septembet 2012 and finished at 7 April 2013. Modified: stable/8/share/zoneinfo/asia stable/8/share/zoneinfo/australasia Directory Properties: stable/8/share/zoneinfo/ (props changed) Modified: stable/8/share/zoneinfo/asia ============================================================================== --- stable/8/share/zoneinfo/asia Mon Oct 22 10:30:04 2012 (r241871) +++ stable/8/share/zoneinfo/asia Mon Oct 22 10:30:43 2012 (r241872) @@ -2293,6 +2293,8 @@ Rule Palestine 2010 only - Aug 11 0:00 0 # From Arthur David Olson (2011-09-20): # 2011 transitions per http://www.timeanddate.com as of 2011-09-20. +# From Paul Eggert (2012-10-12): +# 2012 transitions per http://www.timeanddate.com as of 2012-10-12. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Gaza 2:17:52 - LMT 1900 Oct @@ -2303,7 +2305,7 @@ Zone Asia/Gaza 2:17:52 - LMT 1900 Oct 2:00 Palestine EE%sT 2011 Apr 2 12:01 2:00 1:00 EEST 2011 Aug 1 2:00 - EET 2012 Mar 30 - 2:00 1:00 EEST 2012 Sep 28 + 2:00 1:00 EEST 2012 Sep 21 1:00 2:00 - EET Zone Asia/Hebron 2:20:23 - LMT 1900 Oct @@ -2318,7 +2320,7 @@ Zone Asia/Hebron 2:20:23 - LMT 1900 Oct 2:00 - EET 2011 Aug 30 2:00 1:00 EEST 2011 Sep 30 3:00 2:00 - EET 2012 Mar 30 - 2:00 1:00 EEST 2012 Sep 28 3:00 + 2:00 1:00 EEST 2012 Sep 21 1:00 2:00 - EET # Paracel Is Modified: stable/8/share/zoneinfo/australasia ============================================================================== --- stable/8/share/zoneinfo/australasia Mon Oct 22 10:30:04 2012 (r241871) +++ stable/8/share/zoneinfo/australasia Mon Oct 22 10:30:43 2012 (r241872) @@ -628,6 +628,23 @@ Zone Pacific/Pago_Pago 12:37:12 - LMT 1 # Although Samoa has used Daylight Saving Time in the 2010-2011 and 2011-2012 # seasons, there is not yet any indication that this trend will continue on # a regular basis. For now, we have explicitly listed the transitions below. +# +# From Nicky (2012-09-10): +# Daylight Saving Time commences on Sunday 30th September 2012 and +# ends on Sunday 7th of April 2013. +# +# Please find link below for more information. +# http://www.mcil.gov.ws/mcil_publications.html +# +# That publication also includes dates for Summer of 2013/4 as well +# which give the impression of a pattern in selecting dates for the +# future, so for now, we will guess this will continue. + +# Western Samoa +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule WS 2012 max - Sep lastSun 3:00 1 D +Rule WS 2012 max - Apr Sun>=1 4:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Apia 12:33:04 - LMT 1879 Jul 5 -11:26:56 - LMT 1911 -11:30 - SAMT 1950 # Samoa Time @@ -635,8 +652,8 @@ Zone Pacific/Apia 12:33:04 - LMT 1879 J -11:00 1:00 WSDT 2011 Apr 2 4:00 -11:00 - WST 2011 Sep 24 3:00 -11:00 1:00 WSDT 2011 Dec 30 - 13:00 1:00 WSDT 2012 Apr 1 4:00 - 13:00 - WST + 13:00 1:00 WSDT 2012 Apr Sun>=1 4:00 + 13:00 WS WS%sT # Solomon Is # excludes Bougainville, for which see Papua New Guinea From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 10:31: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 6E23772C; Mon, 22 Oct 2012 10:31:29 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4ADE88FC0C; Mon, 22 Oct 2012 10:31: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 q9MAVTSE090039; Mon, 22 Oct 2012 10:31:29 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MAVTbE090036; Mon, 22 Oct 2012 10:31:29 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201210221031.q9MAVTbE090036@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 22 Oct 2012 10:31:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241873 - stable/9/contrib/tzdata X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 10:31:29 -0000 Author: edwin Date: Mon Oct 22 10:31:28 2012 New Revision: 241873 URL: http://svn.freebsd.org/changeset/base/241873 Log: Merge of 241869 Import of tzdata2012g - Fix end of DST in Gaza and Hebron - Western Samoa: DST start at 30 Septembet 2012 and finished at 7 April 2013. Modified: stable/9/contrib/tzdata/asia stable/9/contrib/tzdata/australasia Directory Properties: stable/9/contrib/tzdata/ (props changed) Modified: stable/9/contrib/tzdata/asia ============================================================================== --- stable/9/contrib/tzdata/asia Mon Oct 22 10:30:43 2012 (r241872) +++ stable/9/contrib/tzdata/asia Mon Oct 22 10:31:28 2012 (r241873) @@ -2293,6 +2293,8 @@ Rule Palestine 2010 only - Aug 11 0:00 0 # From Arthur David Olson (2011-09-20): # 2011 transitions per http://www.timeanddate.com as of 2011-09-20. +# From Paul Eggert (2012-10-12): +# 2012 transitions per http://www.timeanddate.com as of 2012-10-12. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Gaza 2:17:52 - LMT 1900 Oct @@ -2303,7 +2305,7 @@ Zone Asia/Gaza 2:17:52 - LMT 1900 Oct 2:00 Palestine EE%sT 2011 Apr 2 12:01 2:00 1:00 EEST 2011 Aug 1 2:00 - EET 2012 Mar 30 - 2:00 1:00 EEST 2012 Sep 28 + 2:00 1:00 EEST 2012 Sep 21 1:00 2:00 - EET Zone Asia/Hebron 2:20:23 - LMT 1900 Oct @@ -2318,7 +2320,7 @@ Zone Asia/Hebron 2:20:23 - LMT 1900 Oct 2:00 - EET 2011 Aug 30 2:00 1:00 EEST 2011 Sep 30 3:00 2:00 - EET 2012 Mar 30 - 2:00 1:00 EEST 2012 Sep 28 3:00 + 2:00 1:00 EEST 2012 Sep 21 1:00 2:00 - EET # Paracel Is Modified: stable/9/contrib/tzdata/australasia ============================================================================== --- stable/9/contrib/tzdata/australasia Mon Oct 22 10:30:43 2012 (r241872) +++ stable/9/contrib/tzdata/australasia Mon Oct 22 10:31:28 2012 (r241873) @@ -628,6 +628,23 @@ Zone Pacific/Pago_Pago 12:37:12 - LMT 1 # Although Samoa has used Daylight Saving Time in the 2010-2011 and 2011-2012 # seasons, there is not yet any indication that this trend will continue on # a regular basis. For now, we have explicitly listed the transitions below. +# +# From Nicky (2012-09-10): +# Daylight Saving Time commences on Sunday 30th September 2012 and +# ends on Sunday 7th of April 2013. +# +# Please find link below for more information. +# http://www.mcil.gov.ws/mcil_publications.html +# +# That publication also includes dates for Summer of 2013/4 as well +# which give the impression of a pattern in selecting dates for the +# future, so for now, we will guess this will continue. + +# Western Samoa +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule WS 2012 max - Sep lastSun 3:00 1 D +Rule WS 2012 max - Apr Sun>=1 4:00 0 - +# Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Apia 12:33:04 - LMT 1879 Jul 5 -11:26:56 - LMT 1911 -11:30 - SAMT 1950 # Samoa Time @@ -635,8 +652,8 @@ Zone Pacific/Apia 12:33:04 - LMT 1879 J -11:00 1:00 WSDT 2011 Apr 2 4:00 -11:00 - WST 2011 Sep 24 3:00 -11:00 1:00 WSDT 2011 Dec 30 - 13:00 1:00 WSDT 2012 Apr 1 4:00 - 13:00 - WST + 13:00 1:00 WSDT 2012 Apr Sun>=1 4:00 + 13:00 WS WS%sT # Solomon Is # excludes Bougainville, for which see Papua New Guinea From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 10:43: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 9384B961; Mon, 22 Oct 2012 10:43:00 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7863C8FC0C; Mon, 22 Oct 2012 10:43: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 q9MAh01a091796; Mon, 22 Oct 2012 10:43:00 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MAh0ZU091781; Mon, 22 Oct 2012 10:43:00 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201210221043.q9MAh0ZU091781@svn.freebsd.org> From: Marius Strobl Date: Mon, 22 Oct 2012 10:43:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241874 - head/sys/dev/mpt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 10:43:00 -0000 Author: marius Date: Mon Oct 22 10:42:59 2012 New Revision: 241874 URL: http://svn.freebsd.org/changeset/base/241874 Log: After r241858, remove the remainder of FreeBSD ~4 support from mpt(4). MFC after: 1 week Modified: head/sys/dev/mpt/mpt.c head/sys/dev/mpt/mpt.h head/sys/dev/mpt/mpt_cam.c head/sys/dev/mpt/mpt_debug.c head/sys/dev/mpt/mpt_raid.c Modified: head/sys/dev/mpt/mpt.c ============================================================================== --- head/sys/dev/mpt/mpt.c Mon Oct 22 10:31:28 2012 (r241873) +++ head/sys/dev/mpt/mpt.c Mon Oct 22 10:42:59 2012 (r241874) @@ -286,10 +286,8 @@ mpt_modevent(module_t mod, int type, voi } case MOD_SHUTDOWN: break; -#if __FreeBSD_version >= 500000 case MOD_QUIESCE: break; -#endif case MOD_UNLOAD: error = pers->unload(pers); mpt_personalities[pers->id] = NULL; @@ -1471,15 +1469,9 @@ mpt_recv_handshake_reply(struct mpt_soft */ if ((reply_len >> 1) != hdr->MsgLength && (hdr->Function != MPI_FUNCTION_IOC_FACTS)){ -#if __FreeBSD_version >= 500000 mpt_prt(mpt, "reply length does not match message length: " "got %x; expected %zx for function %x\n", hdr->MsgLength << 2, reply_len << 1, hdr->Function); -#else - mpt_prt(mpt, "reply length does not match message length: " - "got %x; expected %x for function %x\n", - hdr->MsgLength << 2, reply_len << 1, hdr->Function); -#endif } /* Get rest of the reply; but don't overflow the provided buffer */ @@ -2155,7 +2147,6 @@ mpt_disable_ints(struct mpt_softc *mpt) static void mpt_sysctl_attach(struct mpt_softc *mpt) { -#if __FreeBSD_version >= 500000 struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(mpt->dev); struct sysctl_oid *tree = device_get_sysctl_tree(mpt->dev); @@ -2170,7 +2161,6 @@ mpt_sysctl_attach(struct mpt_softc *mpt) "failure_id", CTLFLAG_RW, &mpt->failure_id, -1, "Next Target to Fail"); #endif -#endif } int Modified: head/sys/dev/mpt/mpt.h ============================================================================== --- head/sys/dev/mpt/mpt.h Mon Oct 22 10:31:28 2012 (r241873) +++ head/sys/dev/mpt/mpt.h Mon Oct 22 10:42:59 2012 (r241874) @@ -100,52 +100,34 @@ #define _MPT_H_ /********************************* OS Includes ********************************/ -#include #include #include +#include +#include #include #include -#if __FreeBSD_version < 500000 #include -#include -#include -#include -#else #include -#include -#include #include +#include #include -#include -#endif #include -#include -#include +#include +#include +#include +#include #include #include -#if __FreeBSD_version < 500000 -#include -#include -#endif - #ifdef __sparc64__ #include #include #endif -#include - -#if __FreeBSD_version < 500000 -#include -#include -#else #include #include -#endif -#include #include "opt_ddb.h" /**************************** Register Definitions ****************************/ @@ -241,7 +223,6 @@ int mpt_modevent(module_t, int, void *); #if __FreeBSD_version < 600000 #define bus_get_dma_tag(x) NULL #endif -#if __FreeBSD_version >= 501102 #define mpt_dma_tag_create(mpt, parent_tag, alignment, boundary, \ lowaddr, highaddr, filter, filterarg, \ maxsize, nsegments, maxsegsz, flags, \ @@ -251,17 +232,6 @@ int mpt_modevent(module_t, int, void *); maxsize, nsegments, maxsegsz, flags, \ busdma_lock_mutex, &(mpt)->mpt_lock, \ dma_tagp) -#else -#define mpt_dma_tag_create(mpt, parent_tag, alignment, boundary, \ - lowaddr, highaddr, filter, filterarg, \ - maxsize, nsegments, maxsegsz, flags, \ - dma_tagp) \ - bus_dma_tag_create(parent_tag, alignment, boundary, \ - lowaddr, highaddr, filter, filterarg, \ - maxsize, nsegments, maxsegsz, flags, \ - dma_tagp) -#endif - struct mpt_map_info { struct mpt_softc *mpt; int error; @@ -291,14 +261,9 @@ void mpt_map_rquest(void *, bus_dma_segm kproc_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) #define mpt_kthread_exit(status) \ kproc_exit(status) -#elif __FreeBSD_version > 500005 -#define mpt_kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) \ - kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) -#define mpt_kthread_exit(status) \ - kthread_exit(status) #else #define mpt_kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) \ - kthread_create(func, farg, proc_ptr, fmtstr, arg) + kthread_create(func, farg, proc_ptr, flags, stackpgs, fmtstr, arg) #define mpt_kthread_exit(status) \ kthread_exit(status) #endif @@ -599,13 +564,8 @@ struct mptsas_portinfo { struct mpt_softc { device_t dev; -#if __FreeBSD_version < 500000 - uint32_t mpt_islocked; - int mpt_splsaved; -#else struct mtx mpt_lock; int mpt_locksetup; -#endif uint32_t mpt_pers_mask; uint32_t : 7, @@ -676,7 +636,6 @@ struct mpt_softc { #define mpt_fcport_speed cfg.fc._port_speed } fc; } cfg; -#if __FreeBSD_version >= 500000 /* * Device config information stored up for sysctl to access */ @@ -689,7 +648,6 @@ struct mpt_softc { char wwpn[19]; } fc; } scinfo; -#endif /* Controller Info for RAID information */ CONFIG_PAGE_IOC_2 * ioc_page2; @@ -830,74 +788,6 @@ mpt_assign_serno(struct mpt_softc *mpt, } /***************************** Locking Primitives *****************************/ -#if __FreeBSD_version < 500000 -#define MPT_IFLAGS INTR_TYPE_CAM -#define MPT_LOCK(mpt) mpt_lockspl(mpt) -#define MPT_UNLOCK(mpt) mpt_unlockspl(mpt) -#define MPT_OWNED(mpt) mpt->mpt_islocked -#define MPT_LOCK_ASSERT(mpt) -#define MPTLOCK_2_CAMLOCK MPT_UNLOCK -#define CAMLOCK_2_MPTLOCK MPT_LOCK -#define MPT_LOCK_SETUP(mpt) -#define MPT_LOCK_DESTROY(mpt) - -static __inline void mpt_lockspl(struct mpt_softc *mpt); -static __inline void mpt_unlockspl(struct mpt_softc *mpt); - -static __inline void -mpt_lockspl(struct mpt_softc *mpt) -{ - int s; - - s = splcam(); - if (mpt->mpt_islocked++ == 0) { - mpt->mpt_splsaved = s; - } else { - splx(s); - panic("Recursed lock with mask: 0x%x", s); - } -} - -static __inline void -mpt_unlockspl(struct mpt_softc *mpt) -{ - if (mpt->mpt_islocked) { - if (--mpt->mpt_islocked == 0) { - splx(mpt->mpt_splsaved); - } - } else - panic("Negative lock count"); -} - -static __inline int -mpt_sleep(struct mpt_softc *mpt, void *ident, int priority, - const char *wmesg, int timo) -{ - int saved_cnt; - int saved_spl; - int error; - - KASSERT(mpt->mpt_islocked <= 1, ("Invalid lock count on tsleep")); - saved_cnt = mpt->mpt_islocked; - saved_spl = mpt->mpt_splsaved; - mpt->mpt_islocked = 0; - error = tsleep(ident, priority, wmesg, timo); - KASSERT(mpt->mpt_islocked == 0, ("Invalid lock count on wakeup")); - mpt->mpt_islocked = saved_cnt; - mpt->mpt_splsaved = saved_spl; - return (error); -} - -#define mpt_req_timeout(req, ticks, func, arg) \ - callout_reset(&(req)->callout, (ticks), (func), (arg)); -#define mpt_req_untimeout(req, func, arg) \ - callout_stop(&(req)->callout) -#define mpt_callout_init(mpt, c) \ - callout_init(c) -#define mpt_callout_drain(mpt, c) \ - callout_stop(c) - -#else #if 1 #define MPT_IFLAGS INTR_TYPE_CAM | INTR_ENTROPY | INTR_MPSAFE #define MPT_LOCK_SETUP(mpt) \ @@ -957,7 +847,6 @@ mpt_sleep(struct mpt_softc *mpt, void *i return (r); } #endif -#endif /******************************* Register Access ******************************/ static __inline void mpt_write(struct mpt_softc *, size_t, uint32_t); @@ -1098,7 +987,6 @@ enum { MPT_PRT_NONE=100 }; -#if __FreeBSD_version > 500000 #define mpt_lprt(mpt, level, ...) \ do { \ if (level <= (mpt)->verbose) \ @@ -1112,14 +1000,7 @@ do { \ mpt_prtc(mpt, __VA_ARGS__); \ } while (0) #endif -#else -void mpt_lprt(struct mpt_softc *, int, const char *, ...) - __printflike(3, 4); -#if 0 -void mpt_lprtc(struct mpt_softc *, int, const char *, ...) - __printflike(3, 4); -#endif -#endif + void mpt_prt(struct mpt_softc *, const char *, ...) __printflike(2, 3); void mpt_prtc(struct mpt_softc *, const char *, ...) Modified: head/sys/dev/mpt/mpt_cam.c ============================================================================== --- head/sys/dev/mpt/mpt_cam.c Mon Oct 22 10:31:28 2012 (r241873) +++ head/sys/dev/mpt/mpt_cam.c Mon Oct 22 10:42:59 2012 (r241874) @@ -105,11 +105,10 @@ __FBSDID("$FreeBSD$"); #include "dev/mpt/mpilib/mpi_targ.h" #include "dev/mpt/mpilib/mpi_fc.h" #include "dev/mpt/mpilib/mpi_sas.h" -#if __FreeBSD_version >= 500000 -#include -#endif + #include #include +#include #if __FreeBSD_version >= 700025 #ifndef CAM_NEW_TRAN_CODE @@ -125,7 +124,6 @@ mpt_get_spi_settings(struct mpt_softc *, static void mpt_setwidth(struct mpt_softc *, int, int); static void mpt_setsync(struct mpt_softc *, int, int, int); static int mpt_update_spi_config(struct mpt_softc *, int); -static void mpt_calc_geometry(struct ccb_calc_geometry *ccg, int extended); static mpt_reply_handler_t mpt_scsi_reply_handler; static mpt_reply_handler_t mpt_scsi_tmf_reply_handler; @@ -416,6 +414,8 @@ cleanup: static int mpt_read_config_info_fc(struct mpt_softc *mpt) { + struct sysctl_ctx_list *ctx; + struct sysctl_oid *tree; char *topology = NULL; int rv; @@ -473,33 +473,27 @@ mpt_read_config_info_fc(struct mpt_softc mpt->mpt_fcport_page0.WWPN.High, mpt->mpt_fcport_page0.WWPN.Low, mpt->mpt_fcport_speed); -#if __FreeBSD_version >= 500000 MPT_UNLOCK(mpt); - { - struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(mpt->dev); - struct sysctl_oid *tree = device_get_sysctl_tree(mpt->dev); + ctx = device_get_sysctl_ctx(mpt->dev); + tree = device_get_sysctl_tree(mpt->dev); - snprintf(mpt->scinfo.fc.wwnn, - sizeof (mpt->scinfo.fc.wwnn), "0x%08x%08x", - mpt->mpt_fcport_page0.WWNN.High, - mpt->mpt_fcport_page0.WWNN.Low); - - snprintf(mpt->scinfo.fc.wwpn, - sizeof (mpt->scinfo.fc.wwpn), "0x%08x%08x", - mpt->mpt_fcport_page0.WWPN.High, - mpt->mpt_fcport_page0.WWPN.Low); - - SYSCTL_ADD_STRING(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, - "wwnn", CTLFLAG_RD, mpt->scinfo.fc.wwnn, 0, - "World Wide Node Name"); - - SYSCTL_ADD_STRING(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, - "wwpn", CTLFLAG_RD, mpt->scinfo.fc.wwpn, 0, - "World Wide Port Name"); + snprintf(mpt->scinfo.fc.wwnn, sizeof (mpt->scinfo.fc.wwnn), + "0x%08x%08x", mpt->mpt_fcport_page0.WWNN.High, + mpt->mpt_fcport_page0.WWNN.Low); + + snprintf(mpt->scinfo.fc.wwpn, sizeof (mpt->scinfo.fc.wwpn), + "0x%08x%08x", mpt->mpt_fcport_page0.WWPN.High, + mpt->mpt_fcport_page0.WWPN.Low); + + SYSCTL_ADD_STRING(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "wwnn", CTLFLAG_RD, mpt->scinfo.fc.wwnn, 0, + "World Wide Node Name"); + + SYSCTL_ADD_STRING(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "wwpn", CTLFLAG_RD, mpt->scinfo.fc.wwpn, 0, + "World Wide Port Name"); - } MPT_LOCK(mpt); -#endif return (0); } @@ -1246,9 +1240,6 @@ mpt_timeout(void *arg) ccb = (union ccb *)arg; mpt = ccb->ccb_h.ccb_mpt_ptr; -#if __FreeBSD_version < 500000 - MPT_LOCK(mpt); -#endif MPT_LOCK_ASSERT(mpt); req = ccb->ccb_h.ccb_req_ptr; mpt_prt(mpt, "request %p:%u timed out for ccb %p (req->ccb %p)\n", req, @@ -1260,9 +1251,6 @@ mpt_timeout(void *arg) req->state |= REQ_STATE_TIMEDOUT; mpt_wakeup_recovery_thread(mpt); } -#if __FreeBSD_version < 500000 - MPT_UNLOCK(mpt); -#endif } /* @@ -3660,7 +3648,7 @@ mpt_action(struct cam_sim *sim, union cc mpt_set_ccb_status(ccb, CAM_REQ_INVALID); break; } - mpt_calc_geometry(ccg, /*extended*/1); + cam_calc_geometry(ccg, /* extended */ 1); KASSERT(ccb->ccb_h.status, ("zero ccb sts at %d", __LINE__)); break; } @@ -4022,33 +4010,6 @@ mpt_update_spi_config(struct mpt_softc * return (0); } -static void -mpt_calc_geometry(struct ccb_calc_geometry *ccg, int extended) -{ -#if __FreeBSD_version >= 500000 - cam_calc_geometry(ccg, extended); -#else - uint32_t size_mb; - uint32_t secs_per_cylinder; - - if (ccg->block_size == 0) { - ccg->ccb_h.status = CAM_REQ_INVALID; - return; - } - size_mb = ccg->volume_size / ((1024L * 1024L) / ccg->block_size); - if (size_mb > 1024 && extended) { - ccg->heads = 255; - ccg->secs_per_track = 63; - } else { - ccg->heads = 64; - ccg->secs_per_track = 32; - } - secs_per_cylinder = ccg->heads * ccg->secs_per_track; - ccg->cylinders = ccg->volume_size / secs_per_cylinder; - ccg->ccb_h.status = CAM_REQ_CMP; -#endif -} - /****************************** Timeout Recovery ******************************/ static int mpt_spawn_recovery_thread(struct mpt_softc *mpt) Modified: head/sys/dev/mpt/mpt_debug.c ============================================================================== --- head/sys/dev/mpt/mpt_debug.c Mon Oct 22 10:31:28 2012 (r241873) +++ head/sys/dev/mpt/mpt_debug.c Mon Oct 22 10:42:59 2012 (r241874) @@ -518,6 +518,7 @@ mpt_print_reply(void *vmsg) static void mpt_print_request_hdr(MSG_REQUEST_HEADER *req) { + printf("%s @ %p\n", mpt_ioc_function(req->Function), req); printf("\tChain Offset 0x%02x\n", req->ChainOffset); printf("\tMsgFlags 0x%02x\n", req->MsgFlags); @@ -841,13 +842,8 @@ mpt_dump_request(struct mpt_softc *mpt, uint32_t *pReq = req->req_vbuf; int o; -#if __FreeBSD_version >= 500000 mpt_prt(mpt, "Send Request %d (%jx):", req->index, (uintmax_t) req->req_pbuf); -#else - mpt_prt(mpt, "Send Request %d (%llx):", - req->index, (unsigned long long) req->req_pbuf); -#endif for (o = 0; o < mpt->ioc_facts.RequestFrameSize; o++) { if ((o & 0x7) == 0) { mpt_prtc(mpt, "\n"); @@ -858,33 +854,6 @@ mpt_dump_request(struct mpt_softc *mpt, mpt_prtc(mpt, "\n"); } -#if __FreeBSD_version < 500000 -void -mpt_lprt(struct mpt_softc *mpt, int level, const char *fmt, ...) -{ - va_list ap; - if (level <= mpt->verbose) { - printf("%s: ", device_get_nameunit(mpt->dev)); - va_start(ap, fmt); - vprintf(fmt, ap); - va_end(ap); - } -} - -#if 0 -void -mpt_lprtc(struct mpt_softc *mpt, int level, const char *fmt, ...) -{ - va_list ap; - if (level <= mpt->verbose) { - va_start(ap, fmt); - vprintf(fmt, ap); - va_end(ap); - } -} -#endif -#endif - void mpt_prt(struct mpt_softc *mpt, const char *fmt, ...) { Modified: head/sys/dev/mpt/mpt_raid.c ============================================================================== --- head/sys/dev/mpt/mpt_raid.c Mon Oct 22 10:31:28 2012 (r241873) +++ head/sys/dev/mpt/mpt_raid.c Mon Oct 22 10:42:59 2012 (r241874) @@ -51,15 +51,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include -#if __FreeBSD_version < 500000 -#include -#define GIANT_REQUIRED -#endif -#include - #include #include #include @@ -118,11 +113,7 @@ static void mpt_enable_vol(struct mpt_so static void mpt_verify_mwce(struct mpt_softc *, struct mpt_raid_volume *); static void mpt_adjust_queue_depth(struct mpt_softc *, struct mpt_raid_volume *, struct cam_path *); -#if __FreeBSD_version < 500000 -#define mpt_raid_sysctl_attach(x) do { } while (0) -#else static void mpt_raid_sysctl_attach(struct mpt_softc *); -#endif static const char *mpt_vol_type(struct mpt_raid_volume *vol); static const char *mpt_vol_state(struct mpt_raid_volume *vol); @@ -1520,15 +1511,9 @@ mpt_refresh_raid_data(struct mpt_softc * mpt_vol_prt(mpt, mpt_vol, "%s Priority Re-Sync\n", prio ? "High" : "Low"); } -#if __FreeBSD_version >= 500000 mpt_vol_prt(mpt, mpt_vol, "%ju of %ju " "blocks remaining\n", (uintmax_t)left, (uintmax_t)total); -#else - mpt_vol_prt(mpt, mpt_vol, "%llu of %llu " - "blocks remaining\n", (uint64_t)left, - (uint64_t)total); -#endif /* Periodically report on sync progress. */ mpt_schedule_raid_refresh(mpt); @@ -1593,14 +1578,8 @@ mpt_raid_timer(void *arg) struct mpt_softc *mpt; mpt = (struct mpt_softc *)arg; -#if __FreeBSD_version < 500000 - MPT_LOCK(mpt); -#endif MPT_LOCK_ASSERT(mpt); mpt_raid_wakeup(mpt); -#if __FreeBSD_version < 500000 - MPT_UNLOCK(mpt); -#endif } static void @@ -1644,7 +1623,6 @@ mpt_raid_free_mem(struct mpt_softc *mpt) mpt->raid_max_disks = 0; } -#if __FreeBSD_version >= 500000 static int mpt_raid_set_vol_resync_rate(struct mpt_softc *mpt, u_int rate) { @@ -1869,4 +1847,3 @@ mpt_raid_sysctl_attach(struct mpt_softc &mpt->raid_nonopt_volumes, 0, "number of nonoptimal volumes"); } -#endif From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 10:54: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 8E940C82; Mon, 22 Oct 2012 10:54:00 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 751118FC18; Mon, 22 Oct 2012 10:54: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 q9MAs0WI094896; Mon, 22 Oct 2012 10:54:00 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MAs0s6094892; Mon, 22 Oct 2012 10:54:00 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201210221054.q9MAs0s6094892@svn.freebsd.org> From: Marius Strobl Date: Mon, 22 Oct 2012 10:54:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241875 - head/sys/dev/mpt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 10:54:00 -0000 Author: marius Date: Mon Oct 22 10:53:59 2012 New Revision: 241875 URL: http://svn.freebsd.org/changeset/base/241875 Log: Remove support for using Giant for locking within mpt(4). Finer grained locking has been working fine for ~5.5 years by now. MFC after: 1 week Modified: head/sys/dev/mpt/mpt.h head/sys/dev/mpt/mpt_cam.c head/sys/dev/mpt/mpt_raid.c Modified: head/sys/dev/mpt/mpt.h ============================================================================== --- head/sys/dev/mpt/mpt.h Mon Oct 22 10:42:59 2012 (r241874) +++ head/sys/dev/mpt/mpt.h Mon Oct 22 10:53:59 2012 (r241875) @@ -788,7 +788,6 @@ mpt_assign_serno(struct mpt_softc *mpt, } /***************************** Locking Primitives *****************************/ -#if 1 #define MPT_IFLAGS INTR_TYPE_CAM | INTR_ENTROPY | INTR_MPSAFE #define MPT_LOCK_SETUP(mpt) \ mtx_init(&mpt->mpt_lock, "mpt", NULL, MTX_DEF); \ @@ -803,8 +802,6 @@ mpt_assign_serno(struct mpt_softc *mpt, #define MPT_UNLOCK(mpt) mtx_unlock(&(mpt)->mpt_lock) #define MPT_OWNED(mpt) mtx_owned(&(mpt)->mpt_lock) #define MPT_LOCK_ASSERT(mpt) mtx_assert(&(mpt)->mpt_lock, MA_OWNED) -#define MPTLOCK_2_CAMLOCK(mpt) -#define CAMLOCK_2_MPTLOCK(mpt) #define mpt_sleep(mpt, ident, priority, wmesg, timo) \ msleep(ident, &(mpt)->mpt_lock, priority, wmesg, timo) #define mpt_req_timeout(req, ticks, func, arg) \ @@ -816,38 +813,6 @@ mpt_assign_serno(struct mpt_softc *mpt, #define mpt_callout_drain(mpt, c) \ callout_drain(c) -#else - -#define MPT_IFLAGS INTR_TYPE_CAM | INTR_ENTROPY -#define MPT_LOCK_SETUP(mpt) do { } while (0) -#define MPT_LOCK_DESTROY(mpt) do { } while (0) -#define MPT_LOCK_ASSERT(mpt) mtx_assert(&Giant, MA_OWNED) -#define MPT_LOCK(mpt) mtx_lock(&Giant) -#define MPT_UNLOCK(mpt) mtx_unlock(&Giant) -#define MPTLOCK_2_CAMLOCK(mpt) -#define CAMLOCK_2_MPTLOCK(mpt) - -#define mpt_req_timeout(req, ticks, func, arg) \ - callout_reset(&(req)->callout, (ticks), (func), (arg)) -#define mpt_req_untimeout(req, func, arg) \ - callout_stop(&(req)->callout) -#define mpt_callout_init(mpt, c) \ - callout_init(c, 0) -#define mpt_callout_drain(mpt, c) \ - callout_drain(c) - -static __inline int -mpt_sleep(struct mpt_softc *, void *, int, const char *, int); - -static __inline int -mpt_sleep(struct mpt_softc *mpt, void *i, int p, const char *w, int t) -{ - int r; - r = tsleep(i, p, w, t); - return (r); -} -#endif - /******************************* Register Access ******************************/ static __inline void mpt_write(struct mpt_softc *, size_t, uint32_t); static __inline uint32_t mpt_read(struct mpt_softc *, int); Modified: head/sys/dev/mpt/mpt_cam.c ============================================================================== --- head/sys/dev/mpt/mpt_cam.c Mon Oct 22 10:42:59 2012 (r241874) +++ head/sys/dev/mpt/mpt_cam.c Mon Oct 22 10:53:59 2012 (r241875) @@ -1347,9 +1347,7 @@ bad: ccb->ccb_h.status &= ~CAM_SIM_QUEUED; KASSERT(ccb->ccb_h.status, ("zero ccb sts at %d", __LINE__)); xpt_done(ccb); - CAMLOCK_2_MPTLOCK(mpt); mpt_free_request(mpt, req); - MPTLOCK_2_CAMLOCK(mpt); return; } @@ -1583,9 +1581,7 @@ bad: if (seg < nseg && nxt_off >= MPT_REQUEST_AREA) { request_t *nrq; - CAMLOCK_2_MPTLOCK(mpt); nrq = mpt_get_request(mpt, FALSE); - MPTLOCK_2_CAMLOCK(mpt); if (nrq == NULL) { error = ENOMEM; @@ -1633,9 +1629,7 @@ out: ccb->ccb_h.status &= ~CAM_SIM_QUEUED; KASSERT(ccb->ccb_h.status, ("zero ccb sts at %d", __LINE__)); xpt_done(ccb); - CAMLOCK_2_MPTLOCK(mpt); mpt_free_request(mpt, req); - MPTLOCK_2_CAMLOCK(mpt); return; } @@ -1667,9 +1661,7 @@ out: tgt->state = TGT_STATE_MOVING_DATA; #endif } - CAMLOCK_2_MPTLOCK(mpt); mpt_send_cmd(mpt, req); - MPTLOCK_2_CAMLOCK(mpt); } static void @@ -1758,9 +1750,7 @@ bad: ccb->ccb_h.status &= ~CAM_SIM_QUEUED; KASSERT(ccb->ccb_h.status, ("zero ccb sts at %d", __LINE__)); xpt_done(ccb); - CAMLOCK_2_MPTLOCK(mpt); mpt_free_request(mpt, req); - MPTLOCK_2_CAMLOCK(mpt); return; } @@ -1978,9 +1968,7 @@ bad: if (seg < nseg && nxt_off >= MPT_REQUEST_AREA) { request_t *nrq; - CAMLOCK_2_MPTLOCK(mpt); nrq = mpt_get_request(mpt, FALSE); - MPTLOCK_2_CAMLOCK(mpt); if (nrq == NULL) { error = ENOMEM; @@ -2028,9 +2016,7 @@ out: ccb->ccb_h.status &= ~CAM_SIM_QUEUED; KASSERT(ccb->ccb_h.status, ("zero ccb sts at %d", __LINE__)); xpt_done(ccb); - CAMLOCK_2_MPTLOCK(mpt); mpt_free_request(mpt, req); - MPTLOCK_2_CAMLOCK(mpt); return; } @@ -2062,9 +2048,7 @@ out: tgt->state = TGT_STATE_MOVING_DATA; #endif } - CAMLOCK_2_MPTLOCK(mpt); mpt_send_cmd(mpt, req); - MPTLOCK_2_CAMLOCK(mpt); } static void @@ -2083,7 +2067,6 @@ mpt_start(struct cam_sim *sim, union ccb mpt = ccb->ccb_h.ccb_mpt_ptr; raid_passthru = (sim == mpt->phydisk_sim); - CAMLOCK_2_MPTLOCK(mpt); if ((req = mpt_get_request(mpt, FALSE)) == NULL) { if (mpt->outofbeer == 0) { mpt->outofbeer = 1; @@ -2092,14 +2075,12 @@ mpt_start(struct cam_sim *sim, union ccb } ccb->ccb_h.status &= ~CAM_SIM_QUEUED; mpt_set_ccb_status(ccb, CAM_REQUEUE_REQ); - MPTLOCK_2_CAMLOCK(mpt); xpt_done(ccb); return; } #ifdef INVARIANTS mpt_req_not_spcl(mpt, req, "mpt_start", __LINE__); #endif - MPTLOCK_2_CAMLOCK(mpt); if (sizeof (bus_addr_t) > 4) { cb = mpt_execute_req_a64; @@ -2121,15 +2102,12 @@ mpt_start(struct cam_sim *sim, union ccb mpt_req->Function = MPI_FUNCTION_SCSI_IO_REQUEST; if (raid_passthru) { mpt_req->Function = MPI_FUNCTION_RAID_SCSI_IO_PASSTHROUGH; - CAMLOCK_2_MPTLOCK(mpt); if (mpt_map_physdisk(mpt, ccb, &tgt) != 0) { - MPTLOCK_2_CAMLOCK(mpt); ccb->ccb_h.status &= ~CAM_SIM_QUEUED; mpt_set_ccb_status(ccb, CAM_DEV_NOT_THERE); xpt_done(ccb); return; } - MPTLOCK_2_CAMLOCK(mpt); mpt_req->Bus = 0; /* we never set bus here */ } else { tgt = ccb->ccb_h.target_id; @@ -2424,7 +2402,6 @@ mpt_cam_event(struct mpt_softc *mpt, req } else { pathid = cam_sim_path(mpt->sim); } - MPTLOCK_2_CAMLOCK(mpt); /* * Allocate a CCB, create a wildcard path for this bus, * and schedule a rescan. @@ -2432,19 +2409,16 @@ mpt_cam_event(struct mpt_softc *mpt, req ccb = xpt_alloc_ccb_nowait(); if (ccb == NULL) { mpt_prt(mpt, "unable to alloc CCB for rescan\n"); - CAMLOCK_2_MPTLOCK(mpt); break; } if (xpt_create_path(&ccb->ccb_h.path, xpt_periph, pathid, CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { - CAMLOCK_2_MPTLOCK(mpt); mpt_prt(mpt, "unable to create path for rescan\n"); xpt_free_ccb(ccb); break; } xpt_rescan(ccb); - CAMLOCK_2_MPTLOCK(mpt); break; } #else @@ -2541,13 +2515,11 @@ mpt_cam_event(struct mpt_softc *mpt, req } else { sim = mpt->sim; } - MPTLOCK_2_CAMLOCK(mpt); for (lun_id = 0; lun_id < MPT_MAX_LUNS; lun_id++) { if (xpt_create_path(&tmppath, NULL, cam_sim_path(sim), pqf->TargetID, lun_id) != CAM_REQ_CMP) { mpt_prt(mpt, "unable to create a path to send " "XPT_REL_SIMQ"); - CAMLOCK_2_MPTLOCK(mpt); break; } xpt_setup_ccb(&crs.ccb_h, tmppath, 5); @@ -2561,7 +2533,6 @@ mpt_cam_event(struct mpt_softc *mpt, req } xpt_free_path(tmppath); } - CAMLOCK_2_MPTLOCK(mpt); break; } case MPI_EVENT_IR_RESYNC_UPDATE: @@ -2583,39 +2554,32 @@ mpt_cam_event(struct mpt_softc *mpt, req sim = mpt->sim; switch(psdsc->ReasonCode) { case MPI_EVENT_SAS_DEV_STAT_RC_ADDED: - MPTLOCK_2_CAMLOCK(mpt); ccb = xpt_alloc_ccb_nowait(); if (ccb == NULL) { mpt_prt(mpt, "unable to alloc CCB for rescan\n"); - CAMLOCK_2_MPTLOCK(mpt); break; } if (xpt_create_path(&ccb->ccb_h.path, xpt_periph, cam_sim_path(sim), psdsc->TargetID, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { - CAMLOCK_2_MPTLOCK(mpt); mpt_prt(mpt, "unable to create path for rescan\n"); xpt_free_ccb(ccb); break; } xpt_rescan(ccb); - CAMLOCK_2_MPTLOCK(mpt); break; case MPI_EVENT_SAS_DEV_STAT_RC_NOT_RESPONDING: - MPTLOCK_2_CAMLOCK(mpt); if (xpt_create_path(&tmppath, NULL, cam_sim_path(sim), psdsc->TargetID, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { mpt_prt(mpt, "unable to create path for async event"); - CAMLOCK_2_MPTLOCK(mpt); break; } xpt_async(AC_LOST_DEVICE, tmppath, NULL); xpt_free_path(tmppath); - CAMLOCK_2_MPTLOCK(mpt); break; case MPI_EVENT_SAS_DEV_STAT_RC_CMPL_INTERNAL_DEV_RESET: case MPI_EVENT_SAS_DEV_STAT_RC_CMPL_TASK_ABORT_INTERNAL: @@ -2735,9 +2699,7 @@ mpt_scsi_reply_handler(struct mpt_softc req, req->serno); } KASSERT(ccb->ccb_h.status, ("zero ccb sts at %d", __LINE__)); - MPTLOCK_2_CAMLOCK(mpt); xpt_done(ccb); - CAMLOCK_2_MPTLOCK(mpt); if ((req->state & REQ_STATE_TIMEDOUT) == 0) { TAILQ_REMOVE(&mpt->request_pending_list, req, links); } else { @@ -3323,15 +3285,12 @@ mpt_action(struct cam_sim *sim, union cc ccb->ccb_h.func_code != XPT_PATH_INQ && ccb->ccb_h.func_code != XPT_RESET_BUS && ccb->ccb_h.func_code != XPT_RESET_DEV) { - CAMLOCK_2_MPTLOCK(mpt); if (mpt_map_physdisk(mpt, ccb, &tgt) != 0) { - MPTLOCK_2_CAMLOCK(mpt); ccb->ccb_h.status &= ~CAM_SIM_QUEUED; mpt_set_ccb_status(ccb, CAM_DEV_NOT_THERE); xpt_done(ccb); return; } - MPTLOCK_2_CAMLOCK(mpt); } ccb->ccb_h.ccb_mpt_ptr = mpt; @@ -3380,9 +3339,7 @@ mpt_action(struct cam_sim *sim, union cc } else { xpt_print(ccb->ccb_h.path, "reset device\n"); } - CAMLOCK_2_MPTLOCK(mpt); (void) mpt_bus_reset(mpt, tgt, lun, FALSE); - MPTLOCK_2_CAMLOCK(mpt); /* * mpt_bus_reset is always successful in that it @@ -3396,7 +3353,6 @@ mpt_action(struct cam_sim *sim, union cc case XPT_ABORT: { union ccb *accb = ccb->cab.abort_ccb; - CAMLOCK_2_MPTLOCK(mpt); switch (accb->ccb_h.func_code) { case XPT_ACCEPT_TARGET_IO: case XPT_IMMEDIATE_NOTIFY: @@ -3413,7 +3369,6 @@ mpt_action(struct cam_sim *sim, union cc ccb->ccb_h.status = CAM_REQ_INVALID; break; } - MPTLOCK_2_CAMLOCK(mpt); break; } @@ -3553,7 +3508,6 @@ mpt_action(struct cam_sim *sim, union cc period >>= MPI_SCSIDEVPAGE1_RP_SHIFT_MIN_SYNC_PERIOD; } #endif - CAMLOCK_2_MPTLOCK(mpt); if (dval & DP_DISC_ENABLE) { mpt->mpt_disc_enable |= (1 << tgt); } else if (dval & DP_DISC_DISABL) { @@ -3571,7 +3525,6 @@ mpt_action(struct cam_sim *sim, union cc mpt_setsync(mpt, tgt, period, offset); } if (dval == 0) { - MPTLOCK_2_CAMLOCK(mpt); mpt_set_ccb_status(ccb, CAM_REQ_CMP); break; } @@ -3583,7 +3536,6 @@ mpt_action(struct cam_sim *sim, union cc } else { mpt_set_ccb_status(ccb, CAM_REQ_CMP); } - MPTLOCK_2_CAMLOCK(mpt); break; } case XPT_GET_TRAN_SETTINGS: @@ -3758,14 +3710,12 @@ mpt_action(struct cam_sim *sim, union cc { int result; - CAMLOCK_2_MPTLOCK(mpt); if (ccb->cel.enable) result = mpt_enable_lun(mpt, ccb->ccb_h.target_id, ccb->ccb_h.target_lun); else result = mpt_disable_lun(mpt, ccb->ccb_h.target_id, ccb->ccb_h.target_lun); - MPTLOCK_2_CAMLOCK(mpt); if (result == 0) { mpt_set_ccb_status(ccb, CAM_REQ_CMP); } else { @@ -3795,7 +3745,6 @@ mpt_action(struct cam_sim *sim, union cc } else { trtp = &mpt->trt[lun]; } - CAMLOCK_2_MPTLOCK(mpt); if (ccb->ccb_h.func_code == XPT_ACCEPT_TARGET_IO) { mpt_lprt(mpt, MPT_PRT_DEBUG1, "Put FREE ATIO %p lun %d\n", ccb, lun); @@ -3810,13 +3759,10 @@ mpt_action(struct cam_sim *sim, union cc mpt_lprt(mpt, MPT_PRT_ALWAYS, "Got Notify ACK\n"); } mpt_set_ccb_status(ccb, CAM_REQ_INPROG); - MPTLOCK_2_CAMLOCK(mpt); return; } case XPT_CONT_TARGET_IO: - CAMLOCK_2_MPTLOCK(mpt); mpt_target_start_io(mpt, ccb); - MPTLOCK_2_CAMLOCK(mpt); return; default: @@ -3860,18 +3806,15 @@ mpt_get_spi_settings(struct mpt_softc *m CONFIG_PAGE_SCSI_DEVICE_0 tmp; dval = 0; - CAMLOCK_2_MPTLOCK(mpt); tmp = mpt->mpt_dev_page0[tgt]; rv = mpt_read_cur_cfg_page(mpt, tgt, &tmp.Header, sizeof(tmp), FALSE, 5000); if (rv) { - MPTLOCK_2_CAMLOCK(mpt); mpt_prt(mpt, "can't get tgt %d config page 0\n", tgt); return (rv); } mpt2host_config_page_scsi_device_0(&tmp); - MPTLOCK_2_CAMLOCK(mpt); mpt_lprt(mpt, MPT_PRT_DEBUG, "mpt_get_spi_settings[%d]: current NP %x Info %x\n", tgt, tmp.NegotiatedParameters, tmp.Information); @@ -4500,18 +4443,14 @@ mpt_target_start_io(struct mpt_softc *mp xpt_freeze_simq(mpt->sim, 1); ccb->ccb_h.status &= ~CAM_SIM_QUEUED; tgt->ccb->ccb_h.status |= CAM_RELEASE_SIMQ; - MPTLOCK_2_CAMLOCK(mpt); xpt_done(ccb); - CAMLOCK_2_MPTLOCK(mpt); return; default: mpt_prt(mpt, "ccb %p flags 0x%x tag 0x%08x had bad request " "starting I/O\n", ccb, csio->ccb_h.flags, csio->tag_id); mpt_tgt_dump_req_state(mpt, cmd_req); mpt_set_ccb_status(ccb, CAM_REQ_CMP_ERR); - MPTLOCK_2_CAMLOCK(mpt); xpt_done(ccb); - CAMLOCK_2_MPTLOCK(mpt); return; } @@ -4531,9 +4470,7 @@ mpt_target_start_io(struct mpt_softc *mp } ccb->ccb_h.status &= ~CAM_SIM_QUEUED; mpt_set_ccb_status(ccb, CAM_REQUEUE_REQ); - MPTLOCK_2_CAMLOCK(mpt); xpt_done(ccb); - CAMLOCK_2_MPTLOCK(mpt); return; } ccb->ccb_h.status = CAM_SIM_QUEUED | CAM_REQ_INPROG; @@ -4607,7 +4544,6 @@ mpt_target_start_io(struct mpt_softc *mp "nxtstate=%d\n", csio, csio->tag_id, csio->dxfer_len, tgt->resid, ccb->ccb_h.flags, req, req->serno, tgt->state); - MPTLOCK_2_CAMLOCK(mpt); if ((ccb->ccb_h.flags & CAM_SCATTER_VALID) == 0) { if ((ccb->ccb_h.flags & CAM_DATA_PHYS) == 0) { int error; @@ -4647,7 +4583,6 @@ mpt_target_start_io(struct mpt_softc *mp (*cb)(req, sgs, csio->sglist_cnt, 0); } } - CAMLOCK_2_MPTLOCK(mpt); } else { uint8_t *sp = NULL, sense[MPT_SENSE_SIZE]; @@ -4664,9 +4599,7 @@ mpt_target_start_io(struct mpt_softc *mp ccb->ccb_h.status, tgt->resid, tgt->bytes_xfered); mpt_set_ccb_status(ccb, CAM_REQ_CMP); ccb->ccb_h.status &= ~CAM_SIM_QUEUED; - MPTLOCK_2_CAMLOCK(mpt); xpt_done(ccb); - CAMLOCK_2_MPTLOCK(mpt); return; } if (ccb->ccb_h.flags & CAM_SEND_SENSE) { @@ -4872,9 +4805,7 @@ mpt_scsi_tgt_status(struct mpt_softc *mp if (ccb) { ccb->ccb_h.status &= ~CAM_SIM_QUEUED; mpt_set_ccb_status(ccb, CAM_REQUEUE_REQ); - MPTLOCK_2_CAMLOCK(mpt); xpt_done(ccb); - CAMLOCK_2_MPTLOCK(mpt); } else { mpt_prt(mpt, "could not allocate status request- dropping\n"); @@ -5049,9 +4980,7 @@ mpt_scsi_tgt_tsk_mgmt(struct mpt_softc * */ tgt->ccb = (union ccb *) inot; inot->ccb_h.status = CAM_MESSAGE_RECV|CAM_DEV_QFRZN; - MPTLOCK_2_CAMLOCK(mpt); xpt_done((union ccb *)inot); - CAMLOCK_2_MPTLOCK(mpt); } static void @@ -5321,9 +5250,7 @@ mpt_scsi_tgt_atio(struct mpt_softc *mpt, itag, atiop->tag_id, tgt->reply_desc, tgt->resid); } - MPTLOCK_2_CAMLOCK(mpt); xpt_done((union ccb *)atiop); - CAMLOCK_2_MPTLOCK(mpt); } static void @@ -5432,9 +5359,7 @@ mpt_scsi_tgt_reply_handler(struct mpt_so mpt->outofbeer = 0; mpt_lprt(mpt, MPT_PRT_DEBUG, "THAWQ\n"); } - MPTLOCK_2_CAMLOCK(mpt); xpt_done(ccb); - CAMLOCK_2_MPTLOCK(mpt); break; } /* @@ -5517,9 +5442,7 @@ mpt_scsi_tgt_reply_handler(struct mpt_so mpt->outofbeer = 0; mpt_lprt(mpt, MPT_PRT_DEBUG, "THAWQ\n"); } - MPTLOCK_2_CAMLOCK(mpt); xpt_done(ccb); - CAMLOCK_2_MPTLOCK(mpt); } break; } Modified: head/sys/dev/mpt/mpt_raid.c ============================================================================== --- head/sys/dev/mpt/mpt_raid.c Mon Oct 22 10:42:59 2012 (r241874) +++ head/sys/dev/mpt/mpt_raid.c Mon Oct 22 10:53:59 2012 (r241875) @@ -692,9 +692,7 @@ mpt_raid_thread(void *arg) */ if (firstrun) { firstrun = 0; - MPTLOCK_2_CAMLOCK(mpt); xpt_release_simq(mpt->phydisk_sim, TRUE); - CAMLOCK_2_MPTLOCK(mpt); } if (mpt->raid_rescan != 0) { @@ -1664,19 +1662,16 @@ mpt_raid_set_vol_queue_depth(struct mpt_ mpt->raid_rescan = 0; - MPTLOCK_2_CAMLOCK(mpt); error = xpt_create_path(&path, xpt_periph, cam_sim_path(mpt->sim), mpt_vol->config_page->VolumeID, /*lun*/0); if (error != CAM_REQ_CMP) { - CAMLOCK_2_MPTLOCK(mpt); mpt_vol_prt(mpt, mpt_vol, "Unable to allocate path!\n"); continue; } mpt_adjust_queue_depth(mpt, mpt_vol, path); xpt_free_path(path); - CAMLOCK_2_MPTLOCK(mpt); } MPT_UNLOCK(mpt); return (0); From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 11:01: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 4BB67F5C; Mon, 22 Oct 2012 11:01:44 +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 34EC18FC08; Mon, 22 Oct 2012 11:01: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 q9MB1iwp096251; Mon, 22 Oct 2012 11:01:44 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MB1hjS096249; Mon, 22 Oct 2012 11:01:44 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201210221101.q9MB1hjS096249@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 22 Oct 2012 11:01:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241876 - head/sys/boot/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 11:01:44 -0000 Author: ae Date: Mon Oct 22 11:01:43 2012 New Revision: 241876 URL: http://svn.freebsd.org/changeset/base/241876 Log: When loader tries to open GPT partition, but partition table is not GPT, then try automatically detect an appropriate partition type. PR: kern/172550 Tested by: Ralf Wenk Modified: head/sys/boot/common/disk.c Modified: head/sys/boot/common/disk.c ============================================================================== --- head/sys/boot/common/disk.c Mon Oct 22 10:53:59 2012 (r241875) +++ head/sys/boot/common/disk.c Mon Oct 22 11:01:43 2012 (r241876) @@ -310,6 +310,13 @@ opened: if (ptable_gettype(od->table) == PTABLE_GPT) { partition = 255; goto out; /* Nothing more to do */ + } else if (partition == 255) { + /* + * When we try to open GPT partition, but partition + * table isn't GPT, reset d_partition value to -1 + * and try to autodetect appropriate value. + */ + partition = -1; } /* * If d_partition < 0 and we are looking at a BSD slice, From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 11:08: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 40124699; Mon, 22 Oct 2012 11:08:00 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 11F828FC18; Mon, 22 Oct 2012 11:08: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 q9MB7xn6097322; Mon, 22 Oct 2012 11:07:59 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MB7x4t097320; Mon, 22 Oct 2012 11:07:59 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201210221107.q9MB7x4t097320@svn.freebsd.org> From: Marius Strobl Date: Mon, 22 Oct 2012 11:07:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241877 - stable/9/sys/sparc64/sparc64 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 11:08:00 -0000 Author: marius Date: Mon Oct 22 11:07:59 2012 New Revision: 241877 URL: http://svn.freebsd.org/changeset/base/241877 Log: MFC: r241734 Let SCHED_ULE give affinity to the CPU the tick interrupt triggered on when running tick_process(), similarly to what the x86 equivalents of this function do, however employing the less racy sequence also used in intr_event_handle(). Modified: stable/9/sys/sparc64/sparc64/tick.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/sparc64/sparc64/tick.c ============================================================================== --- stable/9/sys/sparc64/sparc64/tick.c Mon Oct 22 11:01:43 2012 (r241876) +++ stable/9/sys/sparc64/sparc64/tick.c Mon Oct 22 11:07:59 2012 (r241877) @@ -245,14 +245,16 @@ tick_process(struct trapframe *tf) struct trapframe *oldframe; struct thread *td; + td = curthread; + td->td_intr_nesting_level++; critical_enter(); if (tick_et.et_active) { - td = curthread; oldframe = td->td_intr_frame; td->td_intr_frame = tf; tick_et.et_event_cb(&tick_et, tick_et.et_arg); td->td_intr_frame = oldframe; } + td->td_intr_nesting_level--; critical_exit(); } From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 11:09: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 8C419A17; Mon, 22 Oct 2012 11:09:09 +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 E0EDF8FC08; Mon, 22 Oct 2012 11:09:08 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:c885:d4a7:e016:ae9d] (unknown [IPv6:2001:7b8:3a7:0:c885:d4a7:e016:ae9d]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 6FC4F5C59; Mon, 22 Oct 2012 13:09:07 +0200 (CEST) Message-ID: <50852951.5000809@FreeBSD.org> Date: Mon, 22 Oct 2012 13:09:05 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Jan Beich Subject: Re: svn commit: r241823 - in head: . etc etc/atf etc/mtree lib lib/atf lib/atf/libatf-c lib/atf/libatf-c++ libexec libexec/atf libexec/atf/atf-check share share/atf share/doc share/doc/atf share/exampl... References: <201210220118.q9M1Ifh5098857__14926.3614825488$1350868751$gmane$org@svn.freebsd.org> <1TQC0L-000AZG-Q5@internal.tormail.org> In-Reply-To: <1TQC0L-000AZG-Q5@internal.tormail.org> Content-Type: multipart/mixed; boundary="------------050005070806040103060009" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 11:09:09 -0000 This is a multi-part message in MIME format. --------------050005070806040103060009 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 2012-10-22 09:00, Jan Beich wrote: ... > atf-run fails to link when using -stdlib=libc++. It works if I remove > `throw' from check_stream(). Any clue? > > test-program.o: In function `(anonymous namespace)::check_stream(std::__1::basic_ostream >&)': > /usr/src/usr.bin/atf/atf-run/../../../contrib/atf/atf-run/test-program.cpp:76: undefined reference to `std::__1::basic_ios >::clear(unsigned int)' > clang++: error: linker command failed with exit code 1 (use -v to see invocation) Strange, for me it compiles (with a bunch of warnings, which I have fixed locally), and links just fine. However, I always use -std=c++11, which -std= flag are you using, if any? That said, I am planning on importing a new drop of libc++ soon, but I would rather see this fixed sooner than later. So I will cherry-pick a few fixes tonight. Meanwhile, here are the local diffs I have for making atf build. -Dimitry PS: As far as I can see, atf doesn't build at all with clang and libstdc++, because there are many warnings caused by -Wsystem-headers... Is there any incentive to fix these? --------------050005070806040103060009 Content-Type: text/x-diff; name="fix-atf-warns-1.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fix-atf-warns-1.diff" Index: contrib/atf/atf-report/atf-report.cpp =================================================================== --- contrib/atf/atf-report/atf-report.cpp (revision 241864) +++ contrib/atf/atf-report/atf-report.cpp (working copy) @@ -381,7 +381,6 @@ class ticker_writer : public writer { class xml_writer : public writer { ostream_ptr m_os; - size_t m_curtp, m_ntps; std::string m_tcname, m_tpname; static Index: contrib/atf/atf-run/io.hpp =================================================================== --- contrib/atf/atf-run/io.hpp (revision 241864) +++ contrib/atf/atf-run/io.hpp (working copy) @@ -378,11 +378,6 @@ class pistream : public std::istream, utils::noncopyable { //! - //! \brief The file handle managed by this stream. - //! - int m_fd; - - //! //! \brief The systembuf object used to manage this stream's data. //! systembuf m_systembuf; --------------050005070806040103060009 Content-Type: text/x-diff; name="fix-libcxx-warns-1.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fix-libcxx-warns-1.diff" Index: contrib/libc++/include/fstream =================================================================== --- contrib/libc++/include/fstream (revision 241864) +++ contrib/libc++/include/fstream (working copy) @@ -594,7 +594,6 @@ basic_filebuf<_CharT, _Traits>::underflow() size_t __nmemb = _VSTD::min(static_cast(this->egptr() - this->eback() - __unget_sz), static_cast(__extbufend_ - __extbufnext_)); codecvt_base::result __r; - state_type __svs = __st_; size_t __nr = fread((void*)__extbufnext_, 1, __nmemb, __file_); if (__nr != 0) { Index: contrib/libc++/include/locale =================================================================== --- contrib/libc++/include/locale (revision 241864) +++ contrib/libc++/include/locale (working copy) @@ -2830,9 +2830,9 @@ class _LIBCPP_VISIBLE moneypunct virtual string_type do_negative_sign() const {return string_type(1, '-');} virtual int do_frac_digits() const {return 0;} virtual pattern do_pos_format() const - {pattern __p = {symbol, sign, none, value}; return __p;} + {pattern __p = {{symbol, sign, none, value}}; return __p;} virtual pattern do_neg_format() const - {pattern __p = {symbol, sign, none, value}; return __p;} + {pattern __p = {{symbol, sign, none, value}}; return __p;} }; template @@ -3146,7 +3146,6 @@ money_get<_CharT, _InputIterator>::__do_get(iter_t bool __sb = __flags & ios_base::showbase; if (__sb || __more_needed) { - ios_base::iostate __et = ios_base::goodbit; typename string_type::const_iterator __sym_space_end = __sym.begin(); if (__p > 0 && (__pat.field[__p - 1] == money_base::none || __pat.field[__p - 1] == money_base::space)) { --------------050005070806040103060009-- From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 11:10: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 90ACFD77; Mon, 22 Oct 2012 11:10:14 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 788748FC08; Mon, 22 Oct 2012 11:10: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 q9MBAE8b097754; Mon, 22 Oct 2012 11:10:14 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MBAEMI097752; Mon, 22 Oct 2012 11:10:14 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201210221110.q9MBAEMI097752@svn.freebsd.org> From: Marius Strobl Date: Mon, 22 Oct 2012 11:10:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241878 - stable/9/sys/sparc64/sparc64 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 11:10:14 -0000 Author: marius Date: Mon Oct 22 11:10:14 2012 New Revision: 241878 URL: http://svn.freebsd.org/changeset/base/241878 Log: MFC: r241740 - Remove an unused header. - Don't waste a delay slot. Modified: stable/9/sys/sparc64/sparc64/interrupt.S Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/sparc64/sparc64/interrupt.S ============================================================================== --- stable/9/sys/sparc64/sparc64/interrupt.S Mon Oct 22 11:07:59 2012 (r241877) +++ stable/9/sys/sparc64/sparc64/interrupt.S Mon Oct 22 11:10:14 2012 (r241878) @@ -30,7 +30,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -84,13 +83,13 @@ ENTRY(intr_vector) * The 2nd word points to code to execute and the 3rd is an argument * to pass. Jump to it. */ - brnz,pt %g3, 1f + brnz,a,pt %g3, 1f + srlx %g3, 60, %g6 /* * NB: Zeus CPUs set some undocumented bits in the first data word. */ - and %g3, IV_MAX - 1, %g3 jmpl %g4, %g0 - nop + and %g3, IV_MAX - 1, %g3 /* NOTREACHED */ /* @@ -99,8 +98,7 @@ ENTRY(intr_vector) * 4 bits of the 1st data word specify a priority, and the 2nd and * 3rd a function and argument. */ -1: srlx %g3, 60, %g6 - brnz,a,pn %g6, 2f +1: brnz,a,pn %g6, 2f clr %g3 /* From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 11:10: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 5274DD79; Mon, 22 Oct 2012 11:10:16 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3A2F58FC14; Mon, 22 Oct 2012 11:10: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 q9MBAG3r097789; Mon, 22 Oct 2012 11:10:16 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MBAGcY097787; Mon, 22 Oct 2012 11:10:16 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201210221110.q9MBAGcY097787@svn.freebsd.org> From: Marius Strobl Date: Mon, 22 Oct 2012 11:10:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r241879 - stable/8/sys/sparc64/sparc64 X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 11:10:16 -0000 Author: marius Date: Mon Oct 22 11:10:15 2012 New Revision: 241879 URL: http://svn.freebsd.org/changeset/base/241879 Log: MFC: r241740 - Remove an unused header. - Don't waste a delay slot. Modified: stable/8/sys/sparc64/sparc64/interrupt.S Directory Properties: stable/8/sys/ (props changed) stable/8/sys/sparc64/ (props changed) Modified: stable/8/sys/sparc64/sparc64/interrupt.S ============================================================================== --- stable/8/sys/sparc64/sparc64/interrupt.S Mon Oct 22 11:10:14 2012 (r241878) +++ stable/8/sys/sparc64/sparc64/interrupt.S Mon Oct 22 11:10:15 2012 (r241879) @@ -30,7 +30,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -84,13 +83,13 @@ ENTRY(intr_vector) * The 2nd word points to code to execute and the 3rd is an argument * to pass. Jump to it. */ - brnz,pt %g3, 1f + brnz,a,pt %g3, 1f + srlx %g3, 60, %g6 /* * NB: Zeus CPUs set some undocumented bits in the first data word. */ - and %g3, IV_MAX - 1, %g3 jmpl %g4, %g0 - nop + and %g3, IV_MAX - 1, %g3 /* NOTREACHED */ /* @@ -99,8 +98,7 @@ ENTRY(intr_vector) * 4 bits of the 1st data word specify a priority, and the 2nd and * 3rd a function and argument. */ -1: srlx %g3, 60, %g6 - brnz,a,pn %g6, 2f +1: brnz,a,pn %g6, 2f clr %g3 /* From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 11:14: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 4D34348F; Mon, 22 Oct 2012 11:14:50 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from fallbackmx09.syd.optusnet.com.au (fallbackmx09.syd.optusnet.com.au [211.29.132.242]) by mx1.freebsd.org (Postfix) with ESMTP id 684C58FC1C; Mon, 22 Oct 2012 11:14:48 +0000 (UTC) Received: from mail34.syd.optusnet.com.au (mail34.syd.optusnet.com.au [211.29.133.218]) by fallbackmx09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q9MBEfY8012812; Mon, 22 Oct 2012 22:14:41 +1100 Received: from c122-106-175-26.carlnfd1.nsw.optusnet.com.au (c122-106-175-26.carlnfd1.nsw.optusnet.com.au [122.106.175.26]) by mail34.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q9MBEPcW009598 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 22 Oct 2012 22:14:28 +1100 Date: Mon, 22 Oct 2012 22:14:25 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Warner Losh Subject: Re: svn commit: r241755 - head/lib/msun/src In-Reply-To: <18177777-6EE0-4103-98B0-272EFF98FE96@bsdimp.com> Message-ID: <20121022213348.T1373@besplex.bde.org> References: <201210192246.q9JMkm4R092929@svn.freebsd.org> <20121020150917.I1095@besplex.bde.org> <18177777-6EE0-4103-98B0-272EFF98FE96@bsdimp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-Cloudmark-Score: 0 X-Optus-Cloudmark-Analysis: v=2.0 cv=fLlhRume c=1 sm=1 a=xI64QrV9ptIA:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=Aet6fyW9sl8A:10 a=9q-bG5jMhbND0eD7UJQA:9 a=CjuIK1q_8ugA:10 a=bxQHXO5Py4tHmhUgaywp5w==:117 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Warner Losh , Bruce Evans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 11:14:50 -0000 On Sun, 21 Oct 2012, Warner Losh wrote: > Feel free to fix them however. I added the comments because the algorithms weren't quite the same... If you have a better way, feel free to back my stuff out on the way to it. But the algorithms are identical to a fault. Inside the functions, all lines except 1 in each correspond exactly, and the exception is a style bug. Only about 30 lines in each are not lexically identical. The non-lexical differences are for things like different magic numbers. The old fdlibm comments aren't too careful about keeping magic numbers out of the algorithm description so that the algorithm description is as general as possible. The precise magic numbers are often critical to the details of the implementation of the algorithm but not really to the algorithm itself. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 11:29: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 9F3ED79B; Mon, 22 Oct 2012 11:29:56 +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 2B93B8FC0C; Mon, 22 Oct 2012 11:29:56 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:c885:d4a7:e016:ae9d] (unknown [IPv6:2001:7b8:3a7:0:c885:d4a7:e016:ae9d]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id AAD505C59; Mon, 22 Oct 2012 13:29:47 +0200 (CEST) Message-ID: <50852E29.1050905@FreeBSD.org> Date: Mon, 22 Oct 2012 13:29:45 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Garrett Cooper Subject: Re: svn commit: r241823 - in head: . etc etc/atf etc/mtree lib lib/atf lib/atf/libatf-c lib/atf/libatf-c++ libexec libexec/atf libexec/atf/atf-check share share/atf share/doc share/doc/atf share/exampl... References: <201210220118.q9M1Ifh5098857__14926.3614825488$1350868751$gmane$org@svn.freebsd.org> <1TQC0L-000AZG-Q5@internal.tormail.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcel Moolenaar , Howard Hinnant , svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-head@freebsd.org, Jan Beich X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 11:29:56 -0000 On 2012-10-22 09:24, Garrett Cooper wrote: > On Mon, Oct 22, 2012 at 12:00 AM, Jan Beich wrote: ... >> atf-run fails to link when using -stdlib=libc++. It works if I remove >> `throw' from check_stream(). Any clue? >> >> test-program.o: In function `(anonymous namespace)::check_stream(std::__1::basic_ostream >&)': >> /usr/src/usr.bin/atf/atf-run/../../../contrib/atf/atf-run/test-program.cpp:76: undefined reference to `std::__1::basic_ios >::clear(unsigned int)' >> clang++: error: linker command failed with exit code 1 (use -v to see invocation) > > Is it a bug in libc++ where it's doing the wrong thing inlining some > values for basic_ios (my guess is based on the snippet example at: > http://www.cplusplus.com/reference/iostream/ios/clear/ ): > > $ p4 diff -du ios > --- //depot/user/gcooper/atf-head/src/contrib/libc++/include/ios > 2012-05-20 04:37:04.000000000 0000 > +++ /scratch/p4/user/gcooper/atf-head/src/contrib/libc++/include/ios > 2012-05-20 04:37:04.000000000 0000 > @@ -575,10 +575,10 @@ > _LIBCPP_ALWAYS_INLINE > _LIBCPP_EXPLICIT > operator bool() const {return !fail();} > - _LIBCPP_ALWAYS_INLINE bool operator!() const {return fail();} > - _LIBCPP_ALWAYS_INLINE iostate rdstate() const {return ios_base::rdstate();} > - _LIBCPP_ALWAYS_INLINE void clear(iostate __state = goodbit) {ios_base::clear(__state);} > - _LIBCPP_ALWAYS_INLINE void setstate(iostate __state) {ios_base::setstate(__state);} > + _LIBCPP_INLINE_VISIBILITY bool operator!() const {return fail();} > + _LIBCPP_INLINE_VISIBILITY iostate rdstate() const {return ios_base::rdstate();} > + void clear(iostate __state = goodbit) {ios_base::clear(__state);} > + _LIBCPP_INLINE_VISIBILITY void setstate(iostate __state) {ios_base::setstate(__state);} > _LIBCPP_ALWAYS_INLINE bool good() const {return ios_base::good();} > _LIBCPP_ALWAYS_INLINE bool eof() const {return ios_base::eof();} > _LIBCPP_ALWAYS_INLINE bool fail() const {return ios_base::fail();} > > I'm building clang and libc++ in my VM to confirm. I don't think so, as these member functions are supposed to be always inlined. E.g. basic_ios::clear() should always be expanded inline to ios_base::clear(), which is a normal (out of line) function. However, the visibility stuff is always terribly confusing, so you might have a found a real issue. Note that in libc++ trunk, the attributes of these member functions have not changed. In any case, I cannot reproduce the link error on my system. -Dimitry From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 11:57: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 3A43FFBD; Mon, 22 Oct 2012 11:57:27 +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 0A30C8FC0A; Mon, 22 Oct 2012 11:57: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 q9MBvQ9x005063; Mon, 22 Oct 2012 11:57:26 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MBvQp9005059; Mon, 22 Oct 2012 11:57:26 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210221157.q9MBvQp9005059@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 11:57:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241880 - in head/sys: amd64/amd64 i386/i386 pc98/pc98 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 11:57:27 -0000 Author: eadler Date: Mon Oct 22 11:57:26 2012 New Revision: 241880 URL: http://svn.freebsd.org/changeset/base/241880 Log: The 'testing memory' patch gets printed too many times Approved by: cperciva (implicit) Modified: head/sys/amd64/amd64/machdep.c head/sys/i386/i386/machdep.c head/sys/pc98/pc98/machdep.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Mon Oct 22 11:10:15 2012 (r241879) +++ head/sys/amd64/amd64/machdep.c Mon Oct 22 11:57:26 2012 (r241880) @@ -1532,8 +1532,6 @@ getmemsize(caddr_t kmdp, u_int64_t first if (memtest == 0) goto skip_memtest; - printf("testing memory...\n"); - /* * map page into kernel: valid, read/write,non-cacheable */ Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Mon Oct 22 11:10:15 2012 (r241879) +++ head/sys/i386/i386/machdep.c Mon Oct 22 11:57:26 2012 (r241880) @@ -2459,8 +2459,6 @@ physmap_done: if (memtest == 0) goto skip_memtest; - printf("testing memory...\n"); - /* * map page into kernel: valid, read/write,non-cacheable */ Modified: head/sys/pc98/pc98/machdep.c ============================================================================== --- head/sys/pc98/pc98/machdep.c Mon Oct 22 11:10:15 2012 (r241879) +++ head/sys/pc98/pc98/machdep.c Mon Oct 22 11:57:26 2012 (r241880) @@ -2042,8 +2042,6 @@ getmemsize(int first) if (memtest == 0) goto skip_memtest; - printf("testing memory...\n"); - /* * map page into kernel: valid, read/write,non-cacheable */ From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 12:01: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 2A9DE4C3 for ; Mon, 22 Oct 2012 12:01:50 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by mx1.freebsd.org (Postfix) with ESMTP id E1BD68FC12 for ; Mon, 22 Oct 2012 12:01:49 +0000 (UTC) Received: by mail-pa0-f54.google.com with SMTP id bi1so1941606pad.13 for ; Mon, 22 Oct 2012 05:01:49 -0700 (PDT) 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=yeB5K7OwI8A/gyG0EVjwCALtqYmiViCYQxsKlwlcLZM=; b=Uv6Xxl9g2Z0MzP6mrKkURtxUm80nU5aPFU1BvtSFFErxImqEb7mxRKLV4B5JK5Xi/2 pnuwCFVZpoEP2GLPE3JUIE/LCjmT07KbK9XkfBEW+8LC3oRyiC8N1XJyc/cQCJsabX8r xOshR9FdBB4dtyS5bQOQ3n0GlMR0KM98AZHD8= 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:cc:content-type :x-gm-message-state; bh=yeB5K7OwI8A/gyG0EVjwCALtqYmiViCYQxsKlwlcLZM=; b=HKPRbXqvSeLjIHpLbRO3Z5tsJX6fNGjwvAxIeM/dr/W65XmFnt8EoD2B/NNdeaY3LU rGDu6ze6V9C5/6OAJUCIwcBTgRIiAfnN6IP+pA+CSDhYSFqb0XSduDaaLxfmUkUOEaSu FiklR8uwJ9T5KCh+JtmutPz5m5X5bnKpue9PsDalu/oVbYxHeEqCqaHyAPsp6uwcAS5B uS6CO994iS9uECSdrwI1Z0/5JUD72JCy3yzlJpMkMjrTXZCDE/E9KOlMRKEsONPmrBOq 2a0WohDQxqj8aj0Ph609gaMK9oZ7zyNibjVZHrqwebBw4onWAsshCeMdyTCzHvo5V2s0 jADA== Received: by 10.68.200.72 with SMTP id jq8mr29284731pbc.38.1350907309331; Mon, 22 Oct 2012 05:01:49 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.66.161.163 with HTTP; Mon, 22 Oct 2012 05:01:19 -0700 (PDT) In-Reply-To: <20121022071813.GA38813@ithaqua.etoilebsd.net> References: <201210220212.q9M2CKKP008069@svn.freebsd.org> <20121022071813.GA38813@ithaqua.etoilebsd.net> From: Eitan Adler Date: Mon, 22 Oct 2012 08:01:19 -0400 X-Google-Sender-Auth: qwh6aFstHG-Hm7RahmmLDz0e9FM Message-ID: Subject: Re: svn commit: r241830 - in head/usr.sbin/pkg_install: add create delete info lib updating version To: Baptiste Daroussin Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQm73c1bydCS33ZbKni+Yk6TRd33Rjp9GNAokLSuUs/KAKkDFDSJcswZ3zKXJkrhTn3c2bW5 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 12:01:50 -0000 On 22 October 2012 03:18, Baptiste Daroussin wrote: > > hi, > > pkg_install are under portmgr maintainership, and we never received this patch > to review and validate. We discussed an earlier version of the patch and this version is that one + your comments. > The patch looks ok but should have been validated by portmgr and is missing the > needed bump of the version number. Okay. > Last I totally disagree on a 3 days MFC time, but would rather go for at least > one month or even more, so that we can really get feedback from people actually > using this before MFCing Why? Is this likely to break things? -- Eitan Adler Source & Ports committer X11, Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 12:05: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 433A6741; Mon, 22 Oct 2012 12:05:15 +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 2B9FB8FC12; Mon, 22 Oct 2012 12:05: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 q9MC5FXh006439; Mon, 22 Oct 2012 12:05:15 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MC5EB8006437; Mon, 22 Oct 2012 12:05:14 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210221205.q9MC5EB8006437@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 12:05:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241881 - head/usr.bin/ssh-copy-id X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 12:05:15 -0000 Author: eadler Date: Mon Oct 22 12:05:14 2012 New Revision: 241881 URL: http://svn.freebsd.org/changeset/base/241881 Log: Somehow this got replicated too many times Approved by: cperciva (implicit) Modified: head/usr.bin/ssh-copy-id/Makefile Modified: head/usr.bin/ssh-copy-id/Makefile ============================================================================== --- head/usr.bin/ssh-copy-id/Makefile Mon Oct 22 11:57:26 2012 (r241880) +++ head/usr.bin/ssh-copy-id/Makefile Mon Oct 22 12:05:14 2012 (r241881) @@ -4,21 +4,3 @@ SCRIPTS= ssh-copy-id.sh MAN= ssh-copy-id.1 .include -# $FreeBSD$ - -SCRIPTS= ssh-copy-id.sh -MAN= ssh-copy-id.1 - -.include -# $FreeBSD$ - -SCRIPTS= ssh-copy-id.sh -MAN= ssh-copy-id.1 - -.include -# $FreeBSD$ - -SCRIPTS= ssh-copy-id.sh -MAN= ssh-copy-id.1 - -.include From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 12:12: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 67A35A05 for ; Mon, 22 Oct 2012 12:12:42 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 2BECB8FC0A for ; Mon, 22 Oct 2012 12:12:41 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id rp8so2011216pbb.13 for ; Mon, 22 Oct 2012 05:12:41 -0700 (PDT) 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=17prv9edYg3uPxCGRwxFhQOpp8lc0XvlzxeD/cBEdxY=; b=AZ4HDjmukaF7k/i8hazrCHrKAAvO9XQ3kiT0+LMcgMqk+io4sIvhtu42RDkFFHmCzE oqUzZ3mSq2p3X52KDNAtzim+65v/P0Lq2S3rwdvBFeBxlah2MCPJ/tui+CT4eQSXUpl8 h5dUzGwrWZCZzkEZ8r1wJIwmwUmGwsoeLz3CA= 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:cc:content-type :x-gm-message-state; bh=17prv9edYg3uPxCGRwxFhQOpp8lc0XvlzxeD/cBEdxY=; b=RPi4jHBt5y11faGjbZtIMms9/IgzJ1FwG7YvvZ4COtboE1V9x6tKYdM0QO6CZk1GVS ZTxQgDu/TYyILjRhVXQjHDD6Vs6fOxNYwLRN4HlTBOLu/AcR1pM+x4rjlZTkignkxBtI E88PYs0StGUqw4kGOzBfVgn82em+1o2D0d4dAUjRveFaiuLKJIbqc3wDaHbA4gye49Zj kUM6xhnSVfUOdiw7sXm2/GHhouy/6A0oZ5cin9eceCCUrGs/cEyQXVPTDRJPYUXX0WMw Ocsrjxa2knmarlVddcg1I+HgOv1NDXbwjOk+713Ecfbqzr5dBmSm2Zsu+BeW2MJ1O4/Z 8oOQ== Received: by 10.68.253.102 with SMTP id zz6mr29152249pbc.99.1350907961773; Mon, 22 Oct 2012 05:12:41 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.66.161.163 with HTTP; Mon, 22 Oct 2012 05:12:11 -0700 (PDT) In-Reply-To: <5084CA3D.2030807@delphij.net> References: <201210220357.q9M3v18q026797@svn.freebsd.org> <5084CA3D.2030807@delphij.net> From: Eitan Adler Date: Mon, 22 Oct 2012 08:12:11 -0400 X-Google-Sender-Auth: dflj2pp6nECxbsYhl1FzdJrJwp0 Message-ID: Subject: Re: svn commit: r241862 - in head/usr.bin: . ssh-copy-id To: d@delphij.net Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQkFsTL2IcKRnQ6DaV//+AsmefAA3rjYYY9+mS5Ni5MKsCnSd0KcAlRgz/hiq8WxAZQHEOVg Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 12:12:42 -0000 On 22 October 2012 00:23, Xin Li wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > On 10/21/12 8:57 PM, Eitan Adler wrote: >> Author: eadler Date: Mon Oct 22 03:57:00 2012 New Revision: 241862 >> URL: http://svn.freebsd.org/changeset/base/241862 >> >> Log: Add a clean-room reimplementation of a script originally >> found in openssh's contrib directory. >> >> This version has more features and is better written. I intend to >> submit this upstream as well. >> >> Reviewed by: bapt Reviewed by: des Approved by: cperciva MFC >> after: 1 week >> >> Added: head/usr.bin/ssh-copy-id/ head/usr.bin/ssh-copy-id/Makefile >> (contents, props changed) head/usr.bin/ssh-copy-id/ssh-copy-id.1 >> (contents, props changed) head/usr.bin/ssh-copy-id/ssh-copy-id.sh >> (contents, props changed) Modified: head/usr.bin/Makefile > [...] >> Added: head/usr.bin/ssh-copy-id/Makefile >> ============================================================================== >> >> >> > - --- /dev/null 00:00:00 1970 (empty, because file is newly added) >> +++ head/usr.bin/ssh-copy-id/Makefile Mon Oct 22 03:57:00 2012 >> (r241862) @@ -0,0 +1,24 @@ +# $FreeBSD$ + +SCRIPTS= ssh-copy-id.sh >> +MAN= ssh-copy-id.1 + +.include +# $FreeBSD$ + >> +SCRIPTS= ssh-copy-id.sh +MAN= ssh-copy-id.1 + +.include >> +# $FreeBSD$ + +SCRIPTS= ssh-copy-id.sh +MAN= >> ssh-copy-id.1 + +.include +# $FreeBSD$ + +SCRIPTS= >> ssh-copy-id.sh +MAN= ssh-copy-id.1 + +.include > > I think this should be just 1 versus 4 copies? Fixed. Thanks. I'm not sure how that happened. -- Eitan Adler Source & Ports committer X11, Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 12:22: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 EEE9CCA9; Mon, 22 Oct 2012 12:22:56 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D509F8FC17; Mon, 22 Oct 2012 12:22: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 q9MCMuZN009163; Mon, 22 Oct 2012 12:22:56 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MCMuSI009161; Mon, 22 Oct 2012 12:22:56 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201210221222.q9MCMuSI009161@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Mon, 22 Oct 2012 12:22:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241882 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 12:22:57 -0000 Author: melifaro Date: Mon Oct 22 12:22:56 2012 New Revision: 241882 URL: http://svn.freebsd.org/changeset/base/241882 Log: Provide example for newly-added NG_NETFLOW_V9INFO_TYPE Submitted by: Dmitry Luhtionov MFC with: r241446 Modified: head/share/man/man4/ng_netflow.4 Modified: head/share/man/man4/ng_netflow.4 ============================================================================== --- head/share/man/man4/ng_netflow.4 Mon Oct 22 12:05:14 2012 (r241881) +++ head/share/man/man4/ng_netflow.4 Mon Oct 22 12:22:56 2012 (r241882) @@ -286,6 +286,8 @@ commands are: .Qq Li "settemplate { time = %u packets = %u }" .It Dv NGM_NETFLOW_SETMTU .Qq Li "setmtu { mtu = %u }" +.It Dv NGM_NETFLOW_V9INFO +.Qq Li v9info .El .Sh SHUTDOWN This node shuts down upon receipt of a From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 12:39: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 B551CF68; Mon, 22 Oct 2012 12:39:57 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 804318FC08; Mon, 22 Oct 2012 12:39: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 q9MCdvHe011772; Mon, 22 Oct 2012 12:39:57 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MCdvkE011770; Mon, 22 Oct 2012 12:39:57 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201210221239.q9MCdvkE011770@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Mon, 22 Oct 2012 12:39:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241883 - stable/9/sbin/ipfw X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 12:39:58 -0000 Author: melifaro Date: Mon Oct 22 12:39:57 2012 New Revision: 241883 URL: http://svn.freebsd.org/changeset/base/241883 Log: Merge r240892,r240893 Permit table to be used as IPv6 address. Whitespace fixes Reported by: Serhiy Popov Modified: stable/9/sbin/ipfw/ipv6.c Directory Properties: stable/9/sbin/ (props changed) stable/9/sbin/ipfw/ (props changed) Modified: stable/9/sbin/ipfw/ipv6.c ============================================================================== --- stable/9/sbin/ipfw/ipv6.c Mon Oct 22 12:22:56 2012 (r241882) +++ stable/9/sbin/ipfw/ipv6.c Mon Oct 22 12:39:57 2012 (r241883) @@ -336,24 +336,40 @@ fill_ip6(ipfw_insn_ip6 *cmd, char *av) * Note d[1] points to struct in6_add r mask6 of cmd */ - cmd->o.len &= ~F_LEN_MASK; /* zero len */ + cmd->o.len &= ~F_LEN_MASK; /* zero len */ - if (strcmp(av, "any") == 0) - return (1); + if (strcmp(av, "any") == 0) + return (1); - if (strcmp(av, "me") == 0) { /* Set the data for "me" opt*/ - cmd->o.len |= F_INSN_SIZE(ipfw_insn); - return (1); - } + if (strcmp(av, "me") == 0) { /* Set the data for "me" opt*/ + cmd->o.len |= F_INSN_SIZE(ipfw_insn); + return (1); + } + + if (strcmp(av, "me6") == 0) { /* Set the data for "me" opt*/ + cmd->o.len |= F_INSN_SIZE(ipfw_insn); + return (1); + } - if (strcmp(av, "me6") == 0) { /* Set the data for "me" opt*/ - cmd->o.len |= F_INSN_SIZE(ipfw_insn); - return (1); - } + if (strncmp(av, "table(", 6) == 0) { + char *p = strchr(av + 6, ','); + uint32_t *dm = ((ipfw_insn_u32 *)cmd)->d; + + if (p) + *p++ = '\0'; + cmd->o.opcode = O_IP_DST_LOOKUP; + cmd->o.arg1 = strtoul(av + 6, NULL, 0); + if (p) { + cmd->o.len |= F_INSN_SIZE(ipfw_insn_u32); + dm[0] = strtoul(p, NULL, 0); + } else + cmd->o.len |= F_INSN_SIZE(ipfw_insn); + return (1); + } - av = strdup(av); - while (av) { + av = strdup(av); + while (av) { /* * After the address we can have '/' indicating a mask, * or ',' indicating another address follows. @@ -469,7 +485,11 @@ add_srcip6(ipfw_insn *cmd, char *av) { fill_ip6((ipfw_insn_ip6 *)cmd, av); - if (F_LEN(cmd) == 0) { /* any */ + if (cmd->opcode == O_IP_DST_SET) /* set */ + cmd->opcode = O_IP_SRC_SET; + else if (cmd->opcode == O_IP_DST_LOOKUP) /* table */ + cmd->opcode = O_IP_SRC_LOOKUP; + else if (F_LEN(cmd) == 0) { /* any */ } else if (F_LEN(cmd) == F_INSN_SIZE(ipfw_insn)) { /* "me" */ cmd->opcode = O_IP6_SRC_ME; } else if (F_LEN(cmd) == @@ -487,7 +507,11 @@ add_dstip6(ipfw_insn *cmd, char *av) { fill_ip6((ipfw_insn_ip6 *)cmd, av); - if (F_LEN(cmd) == 0) { /* any */ + if (cmd->opcode == O_IP_DST_SET) /* set */ + ; + else if (cmd->opcode == O_IP_DST_LOOKUP) /* table */ + ; + else if (F_LEN(cmd) == 0) { /* any */ } else if (F_LEN(cmd) == F_INSN_SIZE(ipfw_insn)) { /* "me" */ cmd->opcode = O_IP6_DST_ME; } else if (F_LEN(cmd) == From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 12:43: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 D0FC61F9; Mon, 22 Oct 2012 12:43:36 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 8B9908FC12; Mon, 22 Oct 2012 12:43:36 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E5399B91A; Mon, 22 Oct 2012 08:43:35 -0400 (EDT) From: John Baldwin To: Eitan Adler Subject: Re: svn commit: r241856 - in head/sys: arm/xscale/pxa dev/acpica dev/agp dev/amdsbwd dev/amdtemp dev/asmc dev/coretemp dev/e1000 dev/glxiic dev/ixgbe dev/kbdmux dev/sound/pci i386/acpica i386/bios x86/... Date: Mon, 22 Oct 2012 08:42:30 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <201210220341.q9M3fEdu023999@svn.freebsd.org> In-Reply-To: <201210220341.q9M3fEdu023999@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201210220842.31106.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 22 Oct 2012 08:43:36 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 12:43:37 -0000 On Sunday, October 21, 2012 11:41:14 pm Eitan Adler wrote: > Author: eadler > Date: Mon Oct 22 03:41:14 2012 > New Revision: 241856 > URL: http://svn.freebsd.org/changeset/base/241856 > > Log: > Now that device disabling is generic, remove extraneous code from the > device drivers that used to provide this feature. This isn't functionally identical. In some cases a hint to disable unit 0 would in fact disable all units. For example, disabling est0 and acpi_perf0 disabled all instances of estX and acpi_perfX, not just the first one. You should test this on a multi-CPU machine before and after to see the different effects. The one in the x86 code that handles early mapping of ACPI tables before new-bus is around is also very important (acpi_find_table()). You just broke booting on SMP systems where ACPI is disabled but that contain an MADT for example (pretty much all modern x86 SMP systems). elcr is also not a new-bus device, so removing that hint broke that psuedo-driver as well. It is only safe to remove these calls in new-bus attach (not probe!) routines that are using 'device_get_unit()' and not hardcoding the unit to 0 (unless you know for certain that there can only ever be one instance of this device such as acpi0 or asmc0). > Modified: > head/sys/arm/xscale/pxa/pxa_smi.c > head/sys/dev/acpica/acpi.c > head/sys/dev/acpica/acpi_perf.c > head/sys/dev/acpica/acpi_throttle.c > head/sys/dev/agp/agp_ali.c > head/sys/dev/agp/agp_amd.c > head/sys/dev/agp/agp_amd64.c > head/sys/dev/agp/agp_apple.c > head/sys/dev/agp/agp_i810.c > head/sys/dev/agp/agp_intel.c > head/sys/dev/agp/agp_nvidia.c > head/sys/dev/agp/agp_sis.c > head/sys/dev/agp/agp_via.c > head/sys/dev/amdsbwd/amdsbwd.c > head/sys/dev/amdtemp/amdtemp.c > head/sys/dev/asmc/asmc.c > head/sys/dev/coretemp/coretemp.c > head/sys/dev/e1000/if_em.c > head/sys/dev/e1000/if_igb.c > head/sys/dev/e1000/if_lem.c > head/sys/dev/glxiic/glxiic.c > head/sys/dev/ixgbe/ixgbe.c > head/sys/dev/ixgbe/ixv.c > head/sys/dev/kbdmux/kbdmux.c > head/sys/dev/sound/pci/emu10kx.c > head/sys/i386/acpica/acpi_machdep.c > head/sys/i386/bios/apm.c > head/sys/x86/cpufreq/est.c > head/sys/x86/cpufreq/p4tcc.c > head/sys/x86/isa/elcr.c > > Modified: head/sys/dev/acpica/acpi_perf.c > ============================================================================== > --- head/sys/dev/acpica/acpi_perf.c Mon Oct 22 03:37:00 2012 (r241855) > +++ head/sys/dev/acpica/acpi_perf.c Mon Oct 22 03:41:14 2012 (r241856) > @@ -175,9 +175,6 @@ acpi_perf_probe(device_t dev) > ACPI_BUFFER buf; > int error, rid, type; > > - if (resource_disabled("acpi_perf", 0)) > - return (ENXIO); > - > /* > * Check the performance state registers. If they are of type > * "functional fixed hardware", we attach quietly since we will > > Modified: head/sys/dev/acpica/acpi_throttle.c > ============================================================================== > --- head/sys/dev/acpica/acpi_throttle.c Mon Oct 22 03:37:00 2012 (r241855) > +++ head/sys/dev/acpica/acpi_throttle.c Mon Oct 22 03:41:14 2012 (r241856) > @@ -167,9 +167,6 @@ static int > acpi_throttle_probe(device_t dev) > { > > - if (resource_disabled("acpi_throttle", 0)) > - return (ENXIO); > - > /* > * On i386 platforms at least, ACPI throttling is accomplished by > * the chipset modulating the STPCLK# pin based on the duty cycle. > > Modified: head/sys/dev/amdsbwd/amdsbwd.c > ============================================================================== > --- head/sys/dev/amdsbwd/amdsbwd.c Mon Oct 22 03:37:00 2012 (r241855) > +++ head/sys/dev/amdsbwd/amdsbwd.c Mon Oct 22 03:41:14 2012 (r241856) > @@ -267,8 +267,6 @@ amdsbwd_identify(driver_t *driver, devic > device_t child; > device_t smb_dev; > > - if (resource_disabled("amdsbwd", 0)) > - return; > if (device_find_child(parent, "amdsbwd", -1) != NULL) > return; > > > Modified: head/sys/dev/amdtemp/amdtemp.c > ============================================================================== > --- head/sys/dev/amdtemp/amdtemp.c Mon Oct 22 03:37:00 2012 (r241855) > +++ head/sys/dev/amdtemp/amdtemp.c Mon Oct 22 03:41:14 2012 (r241856) > @@ -185,9 +185,6 @@ amdtemp_probe(device_t dev) > { > uint32_t family, model; > > - if (resource_disabled("amdtemp", 0)) > - return (ENXIO); > - > family = CPUID_TO_FAMILY(cpu_id); > model = CPUID_TO_MODEL(cpu_id); > > > Modified: head/sys/dev/coretemp/coretemp.c > ============================================================================== > --- head/sys/dev/coretemp/coretemp.c Mon Oct 22 03:37:00 2012 (r241855) > +++ head/sys/dev/coretemp/coretemp.c Mon Oct 22 03:41:14 2012 (r241856) > @@ -138,8 +138,6 @@ coretemp_identify(driver_t *driver, devi > static int > coretemp_probe(device_t dev) > { > - if (resource_disabled("coretemp", 0)) > - return (ENXIO); > > device_set_desc(dev, "CPU On-Die Thermal Sensors"); > > > Modified: head/sys/i386/acpica/acpi_machdep.c > ============================================================================== > --- head/sys/i386/acpica/acpi_machdep.c Mon Oct 22 03:37:00 2012 (r241855) > +++ head/sys/i386/acpica/acpi_machdep.c Mon Oct 22 03:41:14 2012 (r241856) > @@ -268,9 +268,6 @@ acpi_find_table(const char *sig) > vm_paddr_t addr; > int i, count; > > - if (resource_disabled("acpi", 0)) > - return (0); > - > /* > * Map in the RSDP. Since ACPI uses AcpiOsMapMemory() which in turn > * calls pmap_mapbios() to find the RSDP, we assume that we can use > > Modified: head/sys/i386/bios/apm.c > ============================================================================== > --- head/sys/i386/bios/apm.c Mon Oct 22 03:37:00 2012 (r241855) > +++ head/sys/i386/bios/apm.c Mon Oct 22 03:41:14 2012 (r241856) > @@ -878,9 +878,6 @@ apm_identify(driver_t *driver, device_t > return; > } > > - if (resource_disabled("apm", 0)) > - return; > - > child = BUS_ADD_CHILD(parent, 0, "apm", 0); > if (child == NULL) > panic("apm_identify"); > > Modified: head/sys/x86/cpufreq/est.c > ============================================================================== > --- head/sys/x86/cpufreq/est.c Mon Oct 22 03:37:00 2012 (r241855) > +++ head/sys/x86/cpufreq/est.c Mon Oct 22 03:41:14 2012 (r241856) > @@ -991,9 +991,6 @@ est_probe(device_t dev) > uint64_t msr; > int error, type; > > - if (resource_disabled("est", 0)) > - return (ENXIO); > - > /* > * If the ACPI perf driver has attached and is not just offering > * info, let it manage things. > > Modified: head/sys/x86/cpufreq/p4tcc.c > ============================================================================== > --- head/sys/x86/cpufreq/p4tcc.c Mon Oct 22 03:37:00 2012 (r241855) > +++ head/sys/x86/cpufreq/p4tcc.c Mon Oct 22 03:41:14 2012 (r241856) > @@ -139,10 +139,6 @@ p4tcc_identify(driver_t *driver, device_ > static int > p4tcc_probe(device_t dev) > { > - > - if (resource_disabled("p4tcc", 0)) > - return (ENXIO); > - > device_set_desc(dev, "CPU Frequency Thermal Control"); > return (0); > } > > Modified: head/sys/x86/isa/elcr.c > ============================================================================== > --- head/sys/x86/isa/elcr.c Mon Oct 22 03:37:00 2012 (r241855) > +++ head/sys/x86/isa/elcr.c Mon Oct 22 03:41:14 2012 (r241856) > @@ -84,8 +84,6 @@ elcr_probe(void) > printf(" E"); > printf("\n"); > } > - if (resource_disabled("elcr", 0)) > - return (ENXIO); > elcr_found = 1; > return (0); > } > -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 12:52:10 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 3EC763C9; Mon, 22 Oct 2012 12:52:10 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id AFEE08FC08; Mon, 22 Oct 2012 12:52:09 +0000 (UTC) Received: by mail-ob0-f182.google.com with SMTP id wc20so3179712obb.13 for ; Mon, 22 Oct 2012 05:52:08 -0700 (PDT) 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; bh=gonMv0TxS/FXMOoPI6Ee2IT+a0sQTs96FEUIcLkWTEY=; b=gUjtySr6yv9/t5nVBkWYBcRjvSpjt3+nWHOqU2O+LfzdXFeqt2VZzsh8++R9hmEmSN qaHju/GgbTCxcmsRtX0p5RX40zR4+Ao+7Wq7wgRhn4/Xb1QjRcFyebFvrRdrZhyFxKPe n+Atvku0qetbMyWyEcUO/ywohSGrLmHpmmN6J/ZinoQMLbITFdkARamn8l5v+b3pW+My iu4QChCCY+lrPDK+qHFGFb2J4g01JmwJumBaVlRFeBg/+oP3xl2F1NghUDZd62cT1+QV J43bsRZyv/rf14eaQIFcitruE3uXUucjsb9iyU0TdXalNfQXCL3EgqoAwaVtkNHMSJG3 twbg== MIME-Version: 1.0 Received: by 10.60.7.41 with SMTP id g9mr7815458oea.18.1350910328827; Mon, 22 Oct 2012 05:52:08 -0700 (PDT) Received: by 10.76.143.33 with HTTP; Mon, 22 Oct 2012 05:52:08 -0700 (PDT) In-Reply-To: <50852951.5000809@FreeBSD.org> References: <201210220118.q9M1Ifh5098857__14926.3614825488$1350868751$gmane$org@svn.freebsd.org> <1TQC0L-000AZG-Q5@internal.tormail.org> <50852951.5000809@FreeBSD.org> Date: Mon, 22 Oct 2012 05:52:08 -0700 Message-ID: Subject: Re: svn commit: r241823 - in head: . etc etc/atf etc/mtree lib lib/atf lib/atf/libatf-c lib/atf/libatf-c++ libexec libexec/atf libexec/atf/atf-check share share/atf share/doc share/doc/atf share/exampl... From: Garrett Cooper To: Dimitry Andric Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , src-committers@freebsd.org, Jan Beich X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 12:52:10 -0000 On Mon, Oct 22, 2012 at 4:09 AM, Dimitry Andric wrote: > On 2012-10-22 09:00, Jan Beich wrote: > ... >> >> atf-run fails to link when using -stdlib=libc++. It works if I remove >> `throw' from check_stream(). Any clue? >> >> test-program.o: In function `(anonymous >> namespace)::check_stream(std::__1::basic_ostream> std::__1::char_traits >&)': >> >> /usr/src/usr.bin/atf/atf-run/../../../contrib/atf/atf-run/test-program.cpp:76: >> undefined reference to `std::__1::basic_ios> std::__1::char_traits >::clear(unsigned int)' >> clang++: error: linker command failed with exit code 1 (use -v to see >> invocation) > > > Strange, for me it compiles (with a bunch of warnings, which I have > fixed locally), and links just fine. However, I always use -std=c++11, > which -std= flag are you using, if any? > > That said, I am planning on importing a new drop of libc++ soon, but I > would rather see this fixed sooner than later. So I will cherry-pick > a few fixes tonight. > > Meanwhile, here are the local diffs I have for making atf build. > > -Dimitry > > PS: As far as I can see, atf doesn't build at all with clang and > libstdc++, because there are many warnings caused by -Wsystem-headers... > Is there any incentive to fix these? I submitted the atf compile-time warnings patch on your behalf: http://code.google.com/p/kyua/issues/detail?id=42&thanks=42&ts=1350910277 . Thanks! -Garrett From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 12:54: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 6D06B673; Mon, 22 Oct 2012 12:54:53 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 537218FC0C; Mon, 22 Oct 2012 12:54: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 q9MCsrCH013915; Mon, 22 Oct 2012 12:54:53 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MCsr3E013913; Mon, 22 Oct 2012 12:54:53 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201210221254.q9MCsr3E013913@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Mon, 22 Oct 2012 12:54:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241884 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 12:54:53 -0000 Author: melifaro Date: Mon Oct 22 12:54:52 2012 New Revision: 241884 URL: http://svn.freebsd.org/changeset/base/241884 Log: Eliminate code checking if found IPv6 rte is dynamic. IPv6 redirects are using (different) ND-based approach described in RFC 4861. This change is similar to r241406 which conditionally skips the same check in IPv4. This change is part of bigger patch eliminating rte locking. Sponsored by: Yandex LLC. OK'd by: hrs MFC after: 2 weeks Modified: head/sys/netinet6/in6_rmx.c Modified: head/sys/netinet6/in6_rmx.c ============================================================================== --- head/sys/netinet6/in6_rmx.c Mon Oct 22 12:39:57 2012 (r241883) +++ head/sys/netinet6/in6_rmx.c Mon Oct 22 12:54:52 2012 (r241884) @@ -98,8 +98,6 @@ extern int in6_inithead(void **head, int extern int in6_detachhead(void **head, int off); #endif -#define RTPRF_OURS RTF_PROTO3 /* set on routes we manage */ - /* * Do what we need to do when inserting a route. */ @@ -170,42 +168,8 @@ in6_addroute(void *v_arg, void *n_arg, s return (ret); } -/* - * This code is the inverse of in6_clsroute: on first reference, if we - * were managing the route, stop doing so and set the expiration timer - * back off again. - */ -static struct radix_node * -in6_matroute(void *v_arg, struct radix_node_head *head) -{ - struct radix_node *rn = rn_match(v_arg, head); - struct rtentry *rt = (struct rtentry *)rn; - - if (rt) { - RT_LOCK(rt); - if (rt->rt_flags & RTPRF_OURS) { - rt->rt_flags &= ~RTPRF_OURS; - rt->rt_rmx.rmx_expire = 0; - } - RT_UNLOCK(rt); - } - return rn; -} - SYSCTL_DECL(_net_inet6_ip6); -static VNET_DEFINE(int, rtq_reallyold6) = 60*60; - /* one hour is ``really old'' */ -#define V_rtq_reallyold6 VNET(rtq_reallyold6) -SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_RTEXPIRE, rtexpire, CTLFLAG_RW, - &VNET_NAME(rtq_reallyold6) , 0, ""); - -static VNET_DEFINE(int, rtq_minreallyold6) = 10; - /* never automatically crank down to less */ -#define V_rtq_minreallyold6 VNET(rtq_minreallyold6) -SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_RTMINEXPIRE, rtminexpire, CTLFLAG_RW, - &VNET_NAME(rtq_minreallyold6) , 0, ""); - static VNET_DEFINE(int, rtq_toomany6) = 128; /* 128 cached routes is ``too many'' */ #define V_rtq_toomany6 VNET(rtq_toomany6) @@ -223,122 +187,6 @@ struct rtqk_arg { }; /* - * Get rid of old routes. When draining, this deletes everything, even when - * the timeout is not expired yet. When updating, this makes sure that - * nothing has a timeout longer than the current value of rtq_reallyold6. - */ -static int -in6_rtqkill(struct radix_node *rn, void *rock) -{ - struct rtqk_arg *ap = rock; - struct rtentry *rt = (struct rtentry *)rn; - int err; - - RADIX_NODE_HEAD_WLOCK_ASSERT(ap->rnh); - - if (rt->rt_flags & RTPRF_OURS) { - ap->found++; - - if (ap->draining || rt->rt_rmx.rmx_expire <= time_uptime) { - if (rt->rt_refcnt > 0) - panic("rtqkill route really not free"); - - err = in6_rtrequest(RTM_DELETE, - (struct sockaddr *)rt_key(rt), - rt->rt_gateway, rt_mask(rt), - rt->rt_flags|RTF_RNH_LOCKED, 0, - rt->rt_fibnum); - if (err) { - log(LOG_WARNING, "in6_rtqkill: error %d", err); - } else { - ap->killed++; - } - } else { - if (ap->updating - && (rt->rt_rmx.rmx_expire - time_uptime - > V_rtq_reallyold6)) { - rt->rt_rmx.rmx_expire = time_uptime - + V_rtq_reallyold6; - } - ap->nextstop = lmin(ap->nextstop, - rt->rt_rmx.rmx_expire); - } - } - - return 0; -} - -#define RTQ_TIMEOUT 60*10 /* run no less than once every ten minutes */ -static VNET_DEFINE(int, rtq_timeout6) = RTQ_TIMEOUT; -static VNET_DEFINE(struct callout, rtq_timer6); - -#define V_rtq_timeout6 VNET(rtq_timeout6) -#define V_rtq_timer6 VNET(rtq_timer6) - -static void -in6_rtqtimo_one(struct radix_node_head *rnh) -{ - struct rtqk_arg arg; - static time_t last_adjusted_timeout = 0; - - arg.found = arg.killed = 0; - arg.rnh = rnh; - arg.nextstop = time_uptime + V_rtq_timeout6; - arg.draining = arg.updating = 0; - RADIX_NODE_HEAD_LOCK(rnh); - rnh->rnh_walktree(rnh, in6_rtqkill, &arg); - RADIX_NODE_HEAD_UNLOCK(rnh); - - /* - * Attempt to be somewhat dynamic about this: - * If there are ``too many'' routes sitting around taking up space, - * then crank down the timeout, and see if we can't make some more - * go away. However, we make sure that we will never adjust more - * than once in rtq_timeout6 seconds, to keep from cranking down too - * hard. - */ - if ((arg.found - arg.killed > V_rtq_toomany6) - && (time_uptime - last_adjusted_timeout >= V_rtq_timeout6) - && V_rtq_reallyold6 > V_rtq_minreallyold6) { - V_rtq_reallyold6 = 2*V_rtq_reallyold6 / 3; - if (V_rtq_reallyold6 < V_rtq_minreallyold6) { - V_rtq_reallyold6 = V_rtq_minreallyold6; - } - - last_adjusted_timeout = time_uptime; -#ifdef DIAGNOSTIC - log(LOG_DEBUG, "in6_rtqtimo: adjusted rtq_reallyold6 to %d", - V_rtq_reallyold6); -#endif - arg.found = arg.killed = 0; - arg.updating = 1; - RADIX_NODE_HEAD_LOCK(rnh); - rnh->rnh_walktree(rnh, in6_rtqkill, &arg); - RADIX_NODE_HEAD_UNLOCK(rnh); - } -} - -static void -in6_rtqtimo(void *rock) -{ - CURVNET_SET_QUIET((struct vnet *) rock); - struct radix_node_head *rnh; - struct timeval atv; - u_int fibnum; - - for (fibnum = 0; fibnum < rt_numfibs; fibnum++) { - rnh = rt_tables_get_rnh(fibnum, AF_INET6); - if (rnh != NULL) - in6_rtqtimo_one(rnh); - } - - atv.tv_usec = 0; - atv.tv_sec = V_rtq_timeout6; - callout_reset(&V_rtq_timer6, tvtohz(&atv), in6_rtqtimo, rock); - CURVNET_RESTORE(); -} - -/* * Age old PMTUs. */ struct mtuex_arg { @@ -427,12 +275,9 @@ in6_inithead(void **head, int off) rnh = *head; rnh->rnh_addaddr = in6_addroute; - rnh->rnh_matchaddr = in6_matroute; if (V__in6_rt_was_here == 0) { - callout_init(&V_rtq_timer6, CALLOUT_MPSAFE); callout_init(&V_rtq_mtutimer, CALLOUT_MPSAFE); - in6_rtqtimo(curvnet); /* kick off timeout first time */ in6_mtutimo(curvnet); /* kick off timeout first time */ V__in6_rt_was_here = 1; } @@ -445,7 +290,6 @@ int in6_detachhead(void **head, int off) { - callout_drain(&V_rtq_timer6); callout_drain(&V_rtq_mtutimer); return (1); } From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 12:59: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 93187910 for ; Mon, 22 Oct 2012 12:59:14 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ia0-f182.google.com (mail-ia0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4A0E08FC12 for ; Mon, 22 Oct 2012 12:59:13 +0000 (UTC) Received: by mail-ia0-f182.google.com with SMTP id k10so2727255iag.13 for ; Mon, 22 Oct 2012 05:59:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender: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=aommPA6TXyfBh5yL1YHq98k4YAtUudmvlroo4Qu7omA=; b=j0g6yloYbs578AVzgDDZevN0KG85RwGrdMA4QpgvzJozoQCa4/BeX8nOEwaPN2Mqyx RVcdUd/5BSLYTmDMOk+Odbr+eH8SZtjGqbSI8c1y2daE+E3XmPfdRlRfqC25ZdLL1YRP HOOEd2UCx5Vnf3CQgTlSkKKiQTpvQb3Zcl5uqrqPMKORdw0o9pwbnZOWQaRJrC49gE4G A96GXDhB5obk1Epazloal16tOC2cwk0TPejiUCIa6Ygv6TIsqn35ATZg3WZHJppuhh// fzmivq0UnQ20K8C+U7pUML0etB2cKPFoJMVxFeCjUMw2vRJNW2iSPrcgmFRXeCFmQ+FZ 1img== Received: by 10.50.0.140 with SMTP id 12mr16363735ige.63.1350910753244; Mon, 22 Oct 2012 05:59:13 -0700 (PDT) Received: from 63.imp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPS id ez8sm8539718igb.17.2012.10.22.05.59.05 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 22 Oct 2012 05:59:06 -0700 (PDT) Sender: Warner Losh Subject: Re: svn commit: r241755 - head/lib/msun/src Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <20121022040651.GA49632@troutmask.apl.washington.edu> Date: Mon, 22 Oct 2012 06:59:04 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201210192246.q9JMkm4R092929@svn.freebsd.org> <20121020150917.I1095@besplex.bde.org> <18177777-6EE0-4103-98B0-272EFF98FE96@bsdimp.com> <20121022040651.GA49632@troutmask.apl.washington.edu> To: Steve Kargl X-Mailer: Apple Mail (2.1084) X-Gm-Message-State: ALoCoQmJmUyedt/EkvuZqke7Buwo47/JjD3i/BZ8eNrzxh4AF4jXoX+5FkCrc45tBzwU0DrHskHH Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Warner Losh , Bruce Evans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 12:59:14 -0000 On Oct 21, 2012, at 10:06 PM, Steve Kargl wrote: > On Sun, Oct 21, 2012 at 09:08:49PM -0600, Warner Losh wrote: >> Feel free to fix them however. I added the comments because >> the algorithms weren't quite the same... If you have a better >> way, feel free to back my stuff out on the way to it. >>=20 >> Warner >>=20 >=20 > Please back your commits out.=20 >=20 > Two of the three people who actually appear to be > working on libm have now requested the back-out. OK. While it would be just as easy for you guys to commit the new stuff = over mine, I'll revert them. Warner From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 13:04: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 E3898CD4 for ; Mon, 22 Oct 2012 13:04:21 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by mx1.freebsd.org (Postfix) with ESMTP id A28098FC1C for ; Mon, 22 Oct 2012 13:04:21 +0000 (UTC) Received: by mail-pa0-f54.google.com with SMTP id bi1so1982484pad.13 for ; Mon, 22 Oct 2012 06:04:21 -0700 (PDT) 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=M24QaonCY9RH2vgO44JYDjnLcAne7k98xjlaEQSmjLU=; b=s8ymfDq4qgk++RRGdriqXS7PvW45uRpdqyUOnrjI9ZgksXCXovgSNpfalMHPnosJ+7 8HbWVXH+LkV85OvqjU91NjLD836O1kkVgDVxlp8vjp0Tk2Rr/2fwuANBrxqICCZ6cGgF ooWYNIxGiEr2DZveQ9hAYKCPwlkpRNgaC81RE= 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:cc:content-type :x-gm-message-state; bh=M24QaonCY9RH2vgO44JYDjnLcAne7k98xjlaEQSmjLU=; b=HAkaZlro0iTKfUg/cWJZ7FZdrJXhwer4YDJ8rn6SUZ1QttyzJjZsg7gaJMqvNiQpfV /cqK9Q9tUqlqlUjjlxE7NWrjyMTKJRQ0dGkmUHrk9LryebGITlteavwi3RXqYphpJ/up TvY/N7Kvp9gQeygsXTl7pV751cgxzxvROvTe9lJlJgmDiSiM+6kwXY1PGuZPKe+uEni3 McvFTt83c/ZWsKrshNeWFNF/HJScQAlb2PBH0nO90Fvbj2aGfV3EX5rIlJw/U1BTIwjA DZA6WeJGQ1cBHnEy+UEcLH6ik5SlFPkzsPGdYSc1RldEZJNc6WzE/VbcN/UF5604AGXM tkNg== Received: by 10.68.200.231 with SMTP id jv7mr29463607pbc.140.1350911060988; Mon, 22 Oct 2012 06:04:20 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.66.161.163 with HTTP; Mon, 22 Oct 2012 06:03:50 -0700 (PDT) In-Reply-To: <201210220842.31106.jhb@freebsd.org> References: <201210220341.q9M3fEdu023999@svn.freebsd.org> <201210220842.31106.jhb@freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 09:03:50 -0400 X-Google-Sender-Auth: aQN3Gq7dKP-ROV5_ZwhM0Yfzj5Y Message-ID: Subject: Re: svn commit: r241856 - in head/sys: arm/xscale/pxa dev/acpica dev/agp dev/amdsbwd dev/amdtemp dev/asmc dev/coretemp dev/e1000 dev/glxiic dev/ixgbe dev/kbdmux dev/sound/pci i386/acpica i386/bios x86/... To: John Baldwin Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQkn78UMlbs6HEKVG4JLVRTSLmRejVVfvwm77pYinRz+dC4ar6jEzKiE6wFtiTHiut+mOMA6 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 13:04:22 -0000 On 22 October 2012 08:42, John Baldwin wrote: > On Sunday, October 21, 2012 11:41:14 pm Eitan Adler wrote: >> Author: eadler >> Date: Mon Oct 22 03:41:14 2012 >> New Revision: 241856 >> URL: http://svn.freebsd.org/changeset/base/241856 >> >> Log: >> Now that device disabling is generic, remove extraneous code from the >> device drivers that used to provide this feature. > > This isn't functionally identical. In some cases a hint to disable > unit 0 would in fact disable all units. For example, disabling est0 and > acpi_perf0 disabled all instances of estX and acpi_perfX, not just the > first one. You should test this on a multi-CPU machine before and after > to see the different effects. > > The one in the x86 code that handles early mapping of ACPI tables before > new-bus is around is also very important (acpi_find_table()). You just > broke booting on SMP systems where ACPI is disabled but that contain an > MADT for example (pretty much all modern x86 SMP systems). > > elcr is also not a new-bus device, so removing that hint broke that > psuedo-driver as well. > > It is only safe to remove these calls in new-bus attach (not probe!) > routines that are using 'device_get_unit()' and not hardcoding the > unit to 0 (unless you know for certain that there can only ever be one > instance of this device such as acpi0 or asmc0). Thanks for the information. I will revert and come up with a better patch. -- Eitan Adler Source & Ports committer X11, Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 13:06:10 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 3390AE6E; Mon, 22 Oct 2012 13:06:10 +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 102468FC08; Mon, 22 Oct 2012 13:06: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 q9MD6ALi015846; Mon, 22 Oct 2012 13:06:10 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MD69jE015811; Mon, 22 Oct 2012 13:06:09 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210221306.q9MD69jE015811@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 13:06:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241885 - in head/sys: arm/xscale/pxa dev/acpica dev/agp dev/amdsbwd dev/amdtemp dev/asmc dev/coretemp dev/e1000 dev/glxiic dev/ixgbe dev/kbdmux dev/sound/pci i386/acpica i386/bios x86/... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 13:06:10 -0000 Author: eadler Date: Mon Oct 22 13:06:09 2012 New Revision: 241885 URL: http://svn.freebsd.org/changeset/base/241885 Log: This isn't functionally identical. In some cases a hint to disable unit 0 would in fact disable all units. This reverts r241856 Approved by: cperciva (implicit) Modified: head/sys/arm/xscale/pxa/pxa_smi.c head/sys/dev/acpica/acpi.c head/sys/dev/acpica/acpi_perf.c head/sys/dev/acpica/acpi_throttle.c head/sys/dev/agp/agp_ali.c head/sys/dev/agp/agp_amd.c head/sys/dev/agp/agp_amd64.c head/sys/dev/agp/agp_apple.c head/sys/dev/agp/agp_i810.c head/sys/dev/agp/agp_intel.c head/sys/dev/agp/agp_nvidia.c head/sys/dev/agp/agp_sis.c head/sys/dev/agp/agp_via.c head/sys/dev/amdsbwd/amdsbwd.c head/sys/dev/amdtemp/amdtemp.c head/sys/dev/asmc/asmc.c head/sys/dev/coretemp/coretemp.c head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_igb.c head/sys/dev/e1000/if_lem.c head/sys/dev/glxiic/glxiic.c head/sys/dev/ixgbe/ixgbe.c head/sys/dev/ixgbe/ixv.c head/sys/dev/kbdmux/kbdmux.c head/sys/dev/sound/pci/emu10kx.c head/sys/i386/acpica/acpi_machdep.c head/sys/i386/bios/apm.c head/sys/x86/cpufreq/est.c head/sys/x86/cpufreq/p4tcc.c head/sys/x86/isa/elcr.c Modified: head/sys/arm/xscale/pxa/pxa_smi.c ============================================================================== --- head/sys/arm/xscale/pxa/pxa_smi.c Mon Oct 22 12:54:52 2012 (r241884) +++ head/sys/arm/xscale/pxa/pxa_smi.c Mon Oct 22 13:06:09 2012 (r241885) @@ -82,6 +82,9 @@ static int pxa_smi_probe(device_t dev) { + if (resource_disabled("smi", device_get_unit(dev))) + return (ENXIO); + device_set_desc(dev, "Static Memory Interface"); return (0); } Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Mon Oct 22 12:54:52 2012 (r241884) +++ head/sys/dev/acpica/acpi.c Mon Oct 22 13:06:09 2012 (r241885) @@ -377,6 +377,10 @@ acpi_identify(void) if (!cold) return (ENXIO); + /* Check that we haven't been disabled with a hint. */ + if (resource_disabled("acpi", 0)) + return (ENXIO); + /* Check for other PM systems. */ if (power_pm_get_type() != POWER_PM_TYPE_NONE && power_pm_get_type() != POWER_PM_TYPE_ACPI) { Modified: head/sys/dev/acpica/acpi_perf.c ============================================================================== --- head/sys/dev/acpica/acpi_perf.c Mon Oct 22 12:54:52 2012 (r241884) +++ head/sys/dev/acpica/acpi_perf.c Mon Oct 22 13:06:09 2012 (r241885) @@ -175,6 +175,9 @@ acpi_perf_probe(device_t dev) ACPI_BUFFER buf; int error, rid, type; + if (resource_disabled("acpi_perf", 0)) + return (ENXIO); + /* * Check the performance state registers. If they are of type * "functional fixed hardware", we attach quietly since we will Modified: head/sys/dev/acpica/acpi_throttle.c ============================================================================== --- head/sys/dev/acpica/acpi_throttle.c Mon Oct 22 12:54:52 2012 (r241884) +++ head/sys/dev/acpica/acpi_throttle.c Mon Oct 22 13:06:09 2012 (r241885) @@ -167,6 +167,9 @@ static int acpi_throttle_probe(device_t dev) { + if (resource_disabled("acpi_throttle", 0)) + return (ENXIO); + /* * On i386 platforms at least, ACPI throttling is accomplished by * the chipset modulating the STPCLK# pin based on the duty cycle. Modified: head/sys/dev/agp/agp_ali.c ============================================================================== --- head/sys/dev/agp/agp_ali.c Mon Oct 22 12:54:52 2012 (r241884) +++ head/sys/dev/agp/agp_ali.c Mon Oct 22 13:06:09 2012 (r241885) @@ -81,6 +81,8 @@ agp_ali_probe(device_t dev) { const char *desc; + if (resource_disabled("agp", device_get_unit(dev))) + return (ENXIO); desc = agp_ali_match(dev); if (desc) { device_set_desc(dev, desc); Modified: head/sys/dev/agp/agp_amd.c ============================================================================== --- head/sys/dev/agp/agp_amd.c Mon Oct 22 12:54:52 2012 (r241884) +++ head/sys/dev/agp/agp_amd.c Mon Oct 22 13:06:09 2012 (r241885) @@ -203,6 +203,8 @@ agp_amd_probe(device_t dev) { const char *desc; + if (resource_disabled("agp", device_get_unit(dev))) + return (ENXIO); desc = agp_amd_match(dev); if (desc) { device_set_desc(dev, desc); Modified: head/sys/dev/agp/agp_amd64.c ============================================================================== --- head/sys/dev/agp/agp_amd64.c Mon Oct 22 12:54:52 2012 (r241884) +++ head/sys/dev/agp/agp_amd64.c Mon Oct 22 13:06:09 2012 (r241885) @@ -152,6 +152,8 @@ agp_amd64_probe(device_t dev) { const char *desc; + if (resource_disabled("agp", device_get_unit(dev))) + return (ENXIO); if ((desc = agp_amd64_match(dev))) { device_set_desc(dev, desc); return (BUS_PROBE_DEFAULT); Modified: head/sys/dev/agp/agp_apple.c ============================================================================== --- head/sys/dev/agp/agp_apple.c Mon Oct 22 12:54:52 2012 (r241884) +++ head/sys/dev/agp/agp_apple.c Mon Oct 22 13:06:09 2012 (r241885) @@ -71,6 +71,9 @@ static int agp_apple_probe(device_t dev) { + if (resource_disabled("agp", device_get_unit(dev))) + return (ENXIO); + if (pci_get_class(dev) != PCIC_BRIDGE || pci_get_subclass(dev) != PCIS_BRIDGE_HOST) return (ENXIO); Modified: head/sys/dev/agp/agp_i810.c ============================================================================== --- head/sys/dev/agp/agp_i810.c Mon Oct 22 12:54:52 2012 (r241884) +++ head/sys/dev/agp/agp_i810.c Mon Oct 22 13:06:09 2012 (r241885) @@ -860,6 +860,8 @@ agp_i810_probe(device_t dev) const struct agp_i810_match *match; int err; + if (resource_disabled("agp", device_get_unit(dev))) + return (ENXIO); match = agp_i810_match(dev); if (match == NULL) return (ENXIO); Modified: head/sys/dev/agp/agp_intel.c ============================================================================== --- head/sys/dev/agp/agp_intel.c Mon Oct 22 12:54:52 2012 (r241884) +++ head/sys/dev/agp/agp_intel.c Mon Oct 22 13:06:09 2012 (r241885) @@ -117,6 +117,8 @@ agp_intel_probe(device_t dev) { const char *desc; + if (resource_disabled("agp", device_get_unit(dev))) + return (ENXIO); desc = agp_intel_match(dev); if (desc) { device_set_desc(dev, desc); Modified: head/sys/dev/agp/agp_nvidia.c ============================================================================== --- head/sys/dev/agp/agp_nvidia.c Mon Oct 22 12:54:52 2012 (r241884) +++ head/sys/dev/agp/agp_nvidia.c Mon Oct 22 13:06:09 2012 (r241885) @@ -117,6 +117,8 @@ agp_nvidia_probe (device_t dev) { const char *desc; + if (resource_disabled("agp", device_get_unit(dev))) + return (ENXIO); desc = agp_nvidia_match(dev); if (desc) { device_set_desc(dev, desc); Modified: head/sys/dev/agp/agp_sis.c ============================================================================== --- head/sys/dev/agp/agp_sis.c Mon Oct 22 12:54:52 2012 (r241884) +++ head/sys/dev/agp/agp_sis.c Mon Oct 22 13:06:09 2012 (r241885) @@ -113,6 +113,8 @@ agp_sis_probe(device_t dev) { const char *desc; + if (resource_disabled("agp", device_get_unit(dev))) + return (ENXIO); desc = agp_sis_match(dev); if (desc) { device_set_desc(dev, desc); Modified: head/sys/dev/agp/agp_via.c ============================================================================== --- head/sys/dev/agp/agp_via.c Mon Oct 22 12:54:52 2012 (r241884) +++ head/sys/dev/agp/agp_via.c Mon Oct 22 13:06:09 2012 (r241885) @@ -147,6 +147,8 @@ agp_via_probe(device_t dev) { const char *desc; + if (resource_disabled("agp", device_get_unit(dev))) + return (ENXIO); desc = agp_via_match(dev); if (desc) { device_set_desc(dev, desc); Modified: head/sys/dev/amdsbwd/amdsbwd.c ============================================================================== --- head/sys/dev/amdsbwd/amdsbwd.c Mon Oct 22 12:54:52 2012 (r241884) +++ head/sys/dev/amdsbwd/amdsbwd.c Mon Oct 22 13:06:09 2012 (r241885) @@ -267,6 +267,8 @@ amdsbwd_identify(driver_t *driver, devic device_t child; device_t smb_dev; + if (resource_disabled("amdsbwd", 0)) + return; if (device_find_child(parent, "amdsbwd", -1) != NULL) return; Modified: head/sys/dev/amdtemp/amdtemp.c ============================================================================== --- head/sys/dev/amdtemp/amdtemp.c Mon Oct 22 12:54:52 2012 (r241884) +++ head/sys/dev/amdtemp/amdtemp.c Mon Oct 22 13:06:09 2012 (r241885) @@ -185,6 +185,9 @@ amdtemp_probe(device_t dev) { uint32_t family, model; + if (resource_disabled("amdtemp", 0)) + return (ENXIO); + family = CPUID_TO_FAMILY(cpu_id); model = CPUID_TO_MODEL(cpu_id); Modified: head/sys/dev/asmc/asmc.c ============================================================================== --- head/sys/dev/asmc/asmc.c Mon Oct 22 12:54:52 2012 (r241884) +++ head/sys/dev/asmc/asmc.c Mon Oct 22 13:06:09 2012 (r241885) @@ -291,6 +291,8 @@ asmc_probe(device_t dev) { struct asmc_model *model; + if (resource_disabled("asmc", 0)) + return (ENXIO); if (ACPI_ID_PROBE(device_get_parent(dev), dev, asmc_ids) == NULL) return (ENXIO); Modified: head/sys/dev/coretemp/coretemp.c ============================================================================== --- head/sys/dev/coretemp/coretemp.c Mon Oct 22 12:54:52 2012 (r241884) +++ head/sys/dev/coretemp/coretemp.c Mon Oct 22 13:06:09 2012 (r241885) @@ -138,6 +138,8 @@ coretemp_identify(driver_t *driver, devi static int coretemp_probe(device_t dev) { + if (resource_disabled("coretemp", 0)) + return (ENXIO); device_set_desc(dev, "CPU On-Die Thermal Sensors"); Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Mon Oct 22 12:54:52 2012 (r241884) +++ head/sys/dev/e1000/if_em.c Mon Oct 22 13:06:09 2012 (r241885) @@ -472,6 +472,11 @@ em_attach(device_t dev) INIT_DEBUGOUT("em_attach: begin"); + if (resource_disabled("em", device_get_unit(dev))) { + device_printf(dev, "Disabled by device hint\n"); + return (ENXIO); + } + adapter = device_get_softc(dev); adapter->dev = adapter->osdep.dev = dev; hw = &adapter->hw; Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Mon Oct 22 12:54:52 2012 (r241884) +++ head/sys/dev/e1000/if_igb.c Mon Oct 22 13:06:09 2012 (r241885) @@ -460,6 +460,11 @@ igb_attach(device_t dev) INIT_DEBUGOUT("igb_attach: begin"); + if (resource_disabled("igb", device_get_unit(dev))) { + device_printf(dev, "Disabled by device hint\n"); + return (ENXIO); + } + adapter = device_get_softc(dev); adapter->dev = adapter->osdep.dev = dev; IGB_CORE_LOCK_INIT(adapter, device_get_nameunit(dev)); Modified: head/sys/dev/e1000/if_lem.c ============================================================================== --- head/sys/dev/e1000/if_lem.c Mon Oct 22 12:54:52 2012 (r241884) +++ head/sys/dev/e1000/if_lem.c Mon Oct 22 13:06:09 2012 (r241885) @@ -390,6 +390,11 @@ lem_attach(device_t dev) INIT_DEBUGOUT("lem_attach: begin"); + if (resource_disabled("lem", device_get_unit(dev))) { + device_printf(dev, "Disabled by device hint\n"); + return (ENXIO); + } + adapter = device_get_softc(dev); adapter->dev = adapter->osdep.dev = dev; EM_CORE_LOCK_INIT(adapter, device_get_nameunit(dev)); Modified: head/sys/dev/glxiic/glxiic.c ============================================================================== --- head/sys/dev/glxiic/glxiic.c Mon Oct 22 12:54:52 2012 (r241884) +++ head/sys/dev/glxiic/glxiic.c Mon Oct 22 13:06:09 2012 (r241885) @@ -298,6 +298,9 @@ static int glxiic_probe(device_t dev) { + if (resource_disabled("glxiic", device_get_unit(dev))) + return (ENXIO); + device_set_desc(dev, "AMD Geode CS5536 SMBus controller"); return (BUS_PROBE_DEFAULT); Modified: head/sys/dev/ixgbe/ixgbe.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe.c Mon Oct 22 12:54:52 2012 (r241884) +++ head/sys/dev/ixgbe/ixgbe.c Mon Oct 22 13:06:09 2012 (r241885) @@ -401,6 +401,11 @@ ixgbe_attach(device_t dev) INIT_DEBUGOUT("ixgbe_attach: begin"); + if (resource_disabled("ixgbe", device_get_unit(dev))) { + device_printf(dev, "Disabled by device hint\n"); + return (ENXIO); + } + /* Allocate, clear, and link in our adapter structure */ adapter = device_get_softc(dev); adapter->dev = adapter->osdep.dev = dev; Modified: head/sys/dev/ixgbe/ixv.c ============================================================================== --- head/sys/dev/ixgbe/ixv.c Mon Oct 22 12:54:52 2012 (r241884) +++ head/sys/dev/ixgbe/ixv.c Mon Oct 22 13:06:09 2012 (r241885) @@ -299,6 +299,11 @@ ixv_attach(device_t dev) INIT_DEBUGOUT("ixv_attach: begin"); + if (resource_disabled("ixgbe", device_get_unit(dev))) { + device_printf(dev, "Disabled by device hint\n"); + return (ENXIO); + } + /* Allocate, clear, and link in our adapter structure */ adapter = device_get_softc(dev); adapter->dev = adapter->osdep.dev = dev; Modified: head/sys/dev/kbdmux/kbdmux.c ============================================================================== --- head/sys/dev/kbdmux/kbdmux.c Mon Oct 22 12:54:52 2012 (r241884) +++ head/sys/dev/kbdmux/kbdmux.c Mon Oct 22 13:06:09 2012 (r241885) @@ -378,6 +378,8 @@ kbdmux_configure(int flags) static int kbdmux_probe(int unit, void *arg, int flags) { + if (resource_disabled(KEYBOARD_NAME, unit)) + return (ENXIO); return (0); } Modified: head/sys/dev/sound/pci/emu10kx.c ============================================================================== --- head/sys/dev/sound/pci/emu10kx.c Mon Oct 22 12:54:52 2012 (r241884) +++ head/sys/dev/sound/pci/emu10kx.c Mon Oct 22 13:06:09 2012 (r241885) @@ -3050,6 +3050,11 @@ emu_pci_attach(device_t dev) sc = device_get_softc(dev); unit = device_get_unit(dev); + if (resource_disabled("emu10kx", unit)) { + device_printf(dev, "disabled by kernel hints\n"); + return (ENXIO); /* XXX to avoid unit reuse */ + } + /* Get configuration */ sc->ctx = device_get_sysctl_ctx(dev); Modified: head/sys/i386/acpica/acpi_machdep.c ============================================================================== --- head/sys/i386/acpica/acpi_machdep.c Mon Oct 22 12:54:52 2012 (r241884) +++ head/sys/i386/acpica/acpi_machdep.c Mon Oct 22 13:06:09 2012 (r241885) @@ -268,6 +268,9 @@ acpi_find_table(const char *sig) vm_paddr_t addr; int i, count; + if (resource_disabled("acpi", 0)) + return (0); + /* * Map in the RSDP. Since ACPI uses AcpiOsMapMemory() which in turn * calls pmap_mapbios() to find the RSDP, we assume that we can use Modified: head/sys/i386/bios/apm.c ============================================================================== --- head/sys/i386/bios/apm.c Mon Oct 22 12:54:52 2012 (r241884) +++ head/sys/i386/bios/apm.c Mon Oct 22 13:06:09 2012 (r241885) @@ -878,6 +878,9 @@ apm_identify(driver_t *driver, device_t return; } + if (resource_disabled("apm", 0)) + return; + child = BUS_ADD_CHILD(parent, 0, "apm", 0); if (child == NULL) panic("apm_identify"); Modified: head/sys/x86/cpufreq/est.c ============================================================================== --- head/sys/x86/cpufreq/est.c Mon Oct 22 12:54:52 2012 (r241884) +++ head/sys/x86/cpufreq/est.c Mon Oct 22 13:06:09 2012 (r241885) @@ -991,6 +991,9 @@ est_probe(device_t dev) uint64_t msr; int error, type; + if (resource_disabled("est", 0)) + return (ENXIO); + /* * If the ACPI perf driver has attached and is not just offering * info, let it manage things. Modified: head/sys/x86/cpufreq/p4tcc.c ============================================================================== --- head/sys/x86/cpufreq/p4tcc.c Mon Oct 22 12:54:52 2012 (r241884) +++ head/sys/x86/cpufreq/p4tcc.c Mon Oct 22 13:06:09 2012 (r241885) @@ -139,6 +139,10 @@ p4tcc_identify(driver_t *driver, device_ static int p4tcc_probe(device_t dev) { + + if (resource_disabled("p4tcc", 0)) + return (ENXIO); + device_set_desc(dev, "CPU Frequency Thermal Control"); return (0); } Modified: head/sys/x86/isa/elcr.c ============================================================================== --- head/sys/x86/isa/elcr.c Mon Oct 22 12:54:52 2012 (r241884) +++ head/sys/x86/isa/elcr.c Mon Oct 22 13:06:09 2012 (r241885) @@ -84,6 +84,8 @@ elcr_probe(void) printf(" E"); printf("\n"); } + if (resource_disabled("elcr", 0)) + return (ENXIO); elcr_found = 1; return (0); } From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 13:11: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 D80FEAA; Mon, 22 Oct 2012 13:11:06 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-oa0-f54.google.com (mail-oa0-f54.google.com [209.85.219.54]) by mx1.freebsd.org (Postfix) with ESMTP id 552B38FC0C; Mon, 22 Oct 2012 13:11:05 +0000 (UTC) Received: by mail-oa0-f54.google.com with SMTP id n9so3209784oag.13 for ; Mon, 22 Oct 2012 06:11:04 -0700 (PDT) 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; bh=Ww5imUDsqJc1tT9y1arAS8N7y9yTGJDxSq9RPxe9S3E=; b=wvs98dphxuJd/ERHI3bHZPZxYiXf44A8RecZFCN5uRMQuhhPKGFsam2zmywbF20ntv xgDMD1kGXJjEFe+3pul+npN2vCWQ7M9hEjNZ3AZ6ZjSJsikOmyH183AJVq6f4Cf97oal KTc0jTlvx38WkujOUAEwjy+/8RrBmpPqBVgE6WFDQmALxge97XCG3ey+yH+e8aYE5Ky8 uUntPOo08AGsvDLcgPYTkWgG5AIs2y6f5u0y+EC7F/yH/ZbnwUUpNfin4VPLdxMqUhQ6 B8jU3VGkecPLC0iCEKUS986KZXbemM1B2GWDMoVNVabD0ES6aspTRHqREdyJiQzwK8vI yN0w== MIME-Version: 1.0 Received: by 10.60.169.170 with SMTP id af10mr8109318oec.17.1350911464445; Mon, 22 Oct 2012 06:11:04 -0700 (PDT) Received: by 10.76.143.33 with HTTP; Mon, 22 Oct 2012 06:11:04 -0700 (PDT) In-Reply-To: <50852E29.1050905@FreeBSD.org> References: <201210220118.q9M1Ifh5098857__14926.3614825488$1350868751$gmane$org@svn.freebsd.org> <1TQC0L-000AZG-Q5@internal.tormail.org> <50852E29.1050905@FreeBSD.org> Date: Mon, 22 Oct 2012 06:11:04 -0700 Message-ID: Subject: Re: svn commit: r241823 - in head: . etc etc/atf etc/mtree lib lib/atf lib/atf/libatf-c lib/atf/libatf-c++ libexec libexec/atf libexec/atf/atf-check share share/atf share/doc share/doc/atf share/exampl... From: Garrett Cooper To: Dimitry Andric Content-Type: text/plain; charset=ISO-8859-1 Cc: Marcel Moolenaar , Howard Hinnant , svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-head@freebsd.org, Jan Beich X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 13:11:06 -0000 On Mon, Oct 22, 2012 at 4:29 AM, Dimitry Andric wrote: ... > I don't think so, as these member functions are supposed to be always > inlined. E.g. basic_ios::clear() should always be expanded inline to > ios_base::clear(), which is a normal (out of line) function. > > However, the visibility stuff is always terribly confusing, so you might > have a found a real issue. Note that in libc++ trunk, the attributes of > these member functions have not changed. > > In any case, I cannot reproduce the link error on my system. Dmitry: Optimization level might be the salient point. Jan: What are your full CFLAGS/CXXFLAGS? Thanks! -Garrett From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 13:20: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 E5C4D448; Mon, 22 Oct 2012 13:20:31 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B56428FC19; Mon, 22 Oct 2012 13:20: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 q9MDKVL1018110; Mon, 22 Oct 2012 13:20:31 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MDKVTQ018108; Mon, 22 Oct 2012 13:20:31 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201210221320.q9MDKVTQ018108@svn.freebsd.org> From: Warner Losh Date: Mon, 22 Oct 2012 13:20:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241886 - head/lib/msun/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 13:20:32 -0000 Author: imp Date: Mon Oct 22 13:20:31 2012 New Revision: 241886 URL: http://svn.freebsd.org/changeset/base/241886 Log: Revert r241755 Modified: head/lib/msun/src/e_logf.c Modified: head/lib/msun/src/e_logf.c ============================================================================== --- head/lib/msun/src/e_logf.c Mon Oct 22 13:06:09 2012 (r241885) +++ head/lib/msun/src/e_logf.c Mon Oct 22 13:20:31 2012 (r241886) @@ -19,57 +19,6 @@ __FBSDID("$FreeBSD$"); #include "math.h" #include "math_private.h" -/* __ieee754_log(x) - * Return the logrithm of x - * - * Method : - * 1. Argument Reduction: find k and f such that - * x = 2^k * (1+f), - * where sqrt(2)/2 < 1+f < sqrt(2) . - * - * 2. Approximation of log(1+f). - * Let s = f/(2+f) ; based on log(1+f) = log(1+s) - log(1-s) - * = 2s + 2/3 s**3 + 2/5 s**5 + ....., - * = 2s + s*R - * We use a special Reme algorithm on [0,0.1716] to generate - * a polynomial of degree 8 to approximate R The maximum error - * of this polynomial approximation is bounded by 2**-34.24. In - * other words, - * 2 4 6 8 - * R(z) ~ Lg1*s +Lg2*s +Lg3*s +Lg4*s - * (the values of Lg1 to Lg7 are listed in the program) - * and - * | 2 8 | -34.24 - * | Lg1*s +...+Lg4*s - R(z) | <= 2 - * | | - * Note that 2s = f - s*f = f - hfsq + s*hfsq, where hfsq = f*f/2. - * In order to guarantee error in log below 1ulp, we compute log - * by - * log(1+f) = f - s*(f - R) (if f is not too large) - * log(1+f) = f - (hfsq - s*(hfsq+R)). (better accuracy) - * - * 3. Finally, log(x) = k*ln2 + log(1+f). - * = k*ln2_hi+(f-(hfsq-(s*(hfsq+R)+k*ln2_lo))) - * Here ln2 is split into two floating point number: - * ln2_hi + ln2_lo, - * where n*ln2_hi is always exact for |n| < 2000. - * - * Special cases: - * log(x) is NaN with signal if x < 0 (including -INF) ; - * log(+INF) is +INF; log(0) is -INF with signal; - * log(NaN) is that NaN with no signal. - * - * Accuracy: - * according to an error analysis, the error is always less than - * 1 ulp (unit in the last place). - * - * Constants: - * The hexadecimal values are the intended ones for the following - * constants. The decimal values may be used, provided that the - * compiler will convert from decimal to binary accurately enough - * to produce the hexadecimal values shown. - */ - static const float ln2_hi = 6.9313812256e-01, /* 0x3f317180 */ ln2_lo = 9.0580006145e-06, /* 0x3717f7d1 */ From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 13:21: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 5330B5B9; Mon, 22 Oct 2012 13:21:12 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 21F098FC0A; Mon, 22 Oct 2012 13:21: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 q9MDLBY3018262; Mon, 22 Oct 2012 13:21:11 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MDLB4p018260; Mon, 22 Oct 2012 13:21:11 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201210221321.q9MDLB4p018260@svn.freebsd.org> From: Warner Losh Date: Mon, 22 Oct 2012 13:21:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241887 - head/lib/msun/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 13:21:12 -0000 Author: imp Date: Mon Oct 22 13:21:11 2012 New Revision: 241887 URL: http://svn.freebsd.org/changeset/base/241887 Log: Revert r241756 Modified: head/lib/msun/src/e_expf.c Modified: head/lib/msun/src/e_expf.c ============================================================================== --- head/lib/msun/src/e_expf.c Mon Oct 22 13:20:31 2012 (r241886) +++ head/lib/msun/src/e_expf.c Mon Oct 22 13:21:11 2012 (r241887) @@ -21,68 +21,6 @@ __FBSDID("$FreeBSD$"); #include "math.h" #include "math_private.h" -/* __ieee754_expf - * Returns the exponential of x. - * - * Method - * 1. Argument reduction: - * Reduce x to an r so that |r| <= 0.5*ln2 ~ 0.34658. - * Given x, find r and integer k such that - * - * x = k*ln2 + r, |r| <= 0.5*ln2. - * - * Here r will be represented as r = hi-lo for better - * accuracy. - * - * 2. Approximation of exp(r) by a special rational function on - * the interval [0,0.34658]: - * Write - * R(r**2) = r*(exp(r)+1)/(exp(r)-1) = 2 + r*r/6 - r**4/360 + ... - * We use a special Remes algorithm on [0,0.34658] to generate - * a polynomial of degree 2 to approximate R. The maximum error - * of this polynomial approximation is bounded by 2**-27. In - * other words, - * R(z) ~ 2.0 + P1*z + P2*z*z - * (where z=r*r, and the values of P1 and P2 are listed below) - * and - * | 2 | -27 - * | 2.0+P1*z+P2*z - R(z) | <= 2 - * | | - * The computation of expf(r) thus becomes - * 2*r - * expf(r) = 1 + ------- - * R - r - * r*R1(r) - * = 1 + r + ----------- (for better accuracy) - * 2 - R1(r) - * where - * 2 4 - * R1(r) = r - (P1*r + P2*r) - * - * 3. Scale back to obtain expf(x): - * From step 1, we have - * expf(x) = 2^k * expf(r) - * - * Special cases: - * expf(INF) is INF, exp(NaN) is NaN; - * expf(-INF) is 0, and - * for finite argument, only exp(0)=1 is exact. - * - * Accuracy: - * according to an error analysis, the error is always less than - * 0.5013 ulp (unit in the last place). - * - * Misc. info. - * For IEEE float - * if x > 8.8721679688e+01 then exp(x) overflow - * if x < -1.0397208405e+02 then exp(x) underflow - * - * Constants: - * The hexadecimal values are the intended ones for the following - * constants. The decimal values may be used, provided that the - * compiler will convert from decimal to binary accurately enough - * to produce the hexadecimal values shown. - */ static const float one = 1.0, halF[2] = {0.5,-0.5,}, From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 13:22: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 D3FD97B4 for ; Mon, 22 Oct 2012 13:22:22 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ie0-f182.google.com (mail-ie0-f182.google.com [209.85.223.182]) by mx1.freebsd.org (Postfix) with ESMTP id 83FC18FC08 for ; Mon, 22 Oct 2012 13:22:22 +0000 (UTC) Received: by mail-ie0-f182.google.com with SMTP id k10so4780017iea.13 for ; Mon, 22 Oct 2012 06:22:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender: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=zCan+TWL0Uj6AW6ux8Waw8cQIJIeaQLyfnTw3xXflXA=; b=dTXAZQO4MaKleGEn8cvK4Di+sZk/KF3ZJcVVVqgaH2UjSj7T4dXXQO5tmaySujFrcE 2IYydxTM0pkQDddQPgnnecy71b3l3Y3q6bOUxxYN7PcUNz69DxV95wKRW1HsAAfAWv9H QweGeGuP6d49P5fIBa6RPRa1Phif2VlmRFIfgkTMe+5TI72ryX3/4Xv4K3+1CUvRoNid ftAdPp6hpiCsNOHnHq26lcXaBaDXT0asi9hxfqOrmPtQeicLSgMzp5J6iGU8HNDUJQOs fwNZ8v4IN+cy1Us9i6k1fWkdXli9GIY2bPUzlNcIxBLrhh5dchCBu5D4TKFop9Cj8trm sOMw== Received: by 10.43.92.71 with SMTP id bp7mr7550476icc.29.1350912142091; Mon, 22 Oct 2012 06:22:22 -0700 (PDT) Received: from 63.imp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPS id ce10sm5466864igb.1.2012.10.22.06.22.20 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 22 Oct 2012 06:22:21 -0700 (PDT) Sender: Warner Losh Subject: Re: svn commit: r241755 - head/lib/msun/src Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <20121022040651.GA49632@troutmask.apl.washington.edu> Date: Mon, 22 Oct 2012 07:22:18 -0600 Content-Transfer-Encoding: 7bit Message-Id: References: <201210192246.q9JMkm4R092929@svn.freebsd.org> <20121020150917.I1095@besplex.bde.org> <18177777-6EE0-4103-98B0-272EFF98FE96@bsdimp.com> <20121022040651.GA49632@troutmask.apl.washington.edu> To: Steve Kargl X-Mailer: Apple Mail (2.1084) X-Gm-Message-State: ALoCoQkuX3c9QxLEDsbF6/jyQStiIa1ZeLIuHpHafIOWQEqT0++CCYhTXD9bN12892Janr6rY/qZ Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Warner Losh , Bruce Evans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 13:22:23 -0000 On Oct 21, 2012, at 10:06 PM, Steve Kargl wrote: > On Sun, Oct 21, 2012 at 09:08:49PM -0600, Warner Losh wrote: >> Feel free to fix them however. I added the comments because >> the algorithms weren't quite the same... If you have a better >> way, feel free to back my stuff out on the way to it. >> >> Warner >> > > Please back your commits out. > > Two of the three people who actually appear to be > working on libm have now requested the back-out. Done. Have fun with whatever you have in mind to replace it. Warner From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 13:33: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 E6E23AE3; Mon, 22 Oct 2012 13:33:44 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id B6DA18FC12; Mon, 22 Oct 2012 13:33:44 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 09C51B91E; Mon, 22 Oct 2012 09:33:44 -0400 (EDT) From: John Baldwin To: Warner Losh Subject: Re: svn commit: r241757 - head/usr.sbin/pciconf Date: Mon, 22 Oct 2012 09:31:09 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <201210192248.q9JMmMpt093234@svn.freebsd.org> <201210200830.26755.jhb@freebsd.org> <12563773-B5F9-4F48-A1A7-45E15296F9C4@bsdimp.com> In-Reply-To: <12563773-B5F9-4F48-A1A7-45E15296F9C4@bsdimp.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201210220931.09563.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 22 Oct 2012 09:33:44 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 13:33:45 -0000 On Sunday, October 21, 2012 11:11:09 pm Warner Losh wrote: > > On Oct 20, 2012, at 6:30 AM, John Baldwin wrote: > > > On Friday, October 19, 2012 06:48:22 PM Warner Losh wrote: > >> Author: imp > >> Date: Fri Oct 19 22:48:22 2012 > >> New Revision: 241757 > >> URL: http://svn.freebsd.org/changeset/base/241757 > >> > >> Log: > >> Indent ecaps the same way we indent caps. > > > > This was on purpose so the '=' signs line up > > It makes it hard to parse otherwise... Perhaps the equal lining up should be documented? Or at least be fixed to match everything else. When ecaps were added the broke indentation... > > I'm happy to fix the alignment issue. Alternatively you would have to reindent everything else to allow for the larger 'ecap XXXX[XXX]' width. You could do that if you wanted to instead. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 13:33: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 D6A29AE5; Mon, 22 Oct 2012 13:33:45 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id A385B8FC16; Mon, 22 Oct 2012 13:33:45 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E7F0DB96C; Mon, 22 Oct 2012 09:33:44 -0400 (EDT) From: John Baldwin To: Eitan Adler Subject: Re: svn commit: r241856 - in head/sys: arm/xscale/pxa dev/acpica dev/agp dev/amdsbwd dev/amdtemp dev/asmc dev/coretemp dev/e1000 dev/glxiic dev/ixgbe dev/kbdmux dev/sound/pci i386/acpica i386/bios x86/... Date: Mon, 22 Oct 2012 09:33:29 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <201210220341.q9M3fEdu023999@svn.freebsd.org> <201210220842.31106.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201210220933.29998.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 22 Oct 2012 09:33:45 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 13:33:45 -0000 On Monday, October 22, 2012 9:03:50 am Eitan Adler wrote: > On 22 October 2012 08:42, John Baldwin wrote: > > On Sunday, October 21, 2012 11:41:14 pm Eitan Adler wrote: > >> Author: eadler > >> Date: Mon Oct 22 03:41:14 2012 > >> New Revision: 241856 > >> URL: http://svn.freebsd.org/changeset/base/241856 > >> > >> Log: > >> Now that device disabling is generic, remove extraneous code from the > >> device drivers that used to provide this feature. > > > > This isn't functionally identical. In some cases a hint to disable > > unit 0 would in fact disable all units. For example, disabling est0 and > > acpi_perf0 disabled all instances of estX and acpi_perfX, not just the > > first one. You should test this on a multi-CPU machine before and after > > to see the different effects. > > > > The one in the x86 code that handles early mapping of ACPI tables before > > new-bus is around is also very important (acpi_find_table()). You just > > broke booting on SMP systems where ACPI is disabled but that contain an > > MADT for example (pretty much all modern x86 SMP systems). > > > > elcr is also not a new-bus device, so removing that hint broke that > > psuedo-driver as well. > > > > It is only safe to remove these calls in new-bus attach (not probe!) > > routines that are using 'device_get_unit()' and not hardcoding the > > unit to 0 (unless you know for certain that there can only ever be one > > instance of this device such as acpi0 or asmc0). > > Thanks for the information. I will revert and come up with a better patch. I don't think you need to revert all of them. Just go back over your patch and revert the ones that aren't definitely safe. I think the ones I included in my first e-mail are the ones you need to revert, but I haven't double checked that list. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 13:38: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 DCFAC102 for ; Mon, 22 Oct 2012 13:38:36 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ie0-f182.google.com (mail-ie0-f182.google.com [209.85.223.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8729D8FC0A for ; Mon, 22 Oct 2012 13:38:36 +0000 (UTC) Received: by mail-ie0-f182.google.com with SMTP id k10so4817559iea.13 for ; Mon, 22 Oct 2012 06:38:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender: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=si9eNGSymMdnXN7xfYL/jAKFhpZivOT8ZhH7revdICY=; b=SfvzDTTyjBRxf99Lin++sdLzJuH9edimrVuXWbsqmJsZWcvji+Q92p+/t2TprE/1GL U5Kqajj7hXvizDnwEDp/rPDH+3hgR7zLzSJod56mMV1WWU/RE2GgnQd4zatzHvgsLyYN NmyauI3Yvno3AAKpGFpxkujguMGeD15zck5Xy4GEHG4zK3AZ6ekUIYqIwMafga2Hw1x3 +W8+NiYRySd5vcKO5NnXKcfL5jtoJG05zfegrKLl2DXhvix7/LAQ6YNiu9v8mPbu1ziW nIgbn2mvFlaFV3q2NGuTlAOKMQlpmv42vEQOmCdIW9pRA63YTeGp8rqByoKjI21ID+bM RHig== Received: by 10.50.171.4 with SMTP id aq4mr9198218igc.72.1350913115737; Mon, 22 Oct 2012 06:38:35 -0700 (PDT) Received: from 63.imp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPS id 7sm5500415igh.0.2012.10.22.06.38.29 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 22 Oct 2012 06:38:35 -0700 (PDT) Sender: Warner Losh Subject: Re: svn commit: r241755 - head/lib/msun/src Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <20121022213348.T1373@besplex.bde.org> Date: Mon, 22 Oct 2012 07:38:28 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <80A9038D-C84B-47D3-A137-F281449F4D88@bsdimp.com> References: <201210192246.q9JMkm4R092929@svn.freebsd.org> <20121020150917.I1095@besplex.bde.org> <18177777-6EE0-4103-98B0-272EFF98FE96@bsdimp.com> <20121022213348.T1373@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.1084) X-Gm-Message-State: ALoCoQkX1nO96vuGMZQJPUDf+iEm0lJ13EUK1QcrYYXoDzPZKSvttqAH51QnT0We8oIJlulEqe6H Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 13:38:37 -0000 On Oct 22, 2012, at 5:14 AM, Bruce Evans wrote: > On Sun, 21 Oct 2012, Warner Losh wrote: >=20 >> Feel free to fix them however. I added the comments because the = algorithms weren't quite the same... If you have a better way, feel = free to back my stuff out on the way to it. >=20 > But the algorithms are identical to a fault. Inside the functions, = all > lines except 1 in each correspond exactly, and the exception is a = style > bug. Only about 30 lines in each are not lexically identical. The > non-lexical differences are for things like different magic numbers. Except that's not true. For expf, only the first two terms of the 5 are = computed in Remes expansion. That's why I bothered to document the = difference. For logf, there are at least two additional terms in the = intermediate form. The differences here are: /* logf */ t1=3D w*(Lg2+w*Lg4);=20 t2=3D z*(Lg1+w*Lg3);=20 /* log */ t1=3D w*(Lg2+w*(Lg4+w*Lg6)); t2=3D z*(Lg1+w*(Lg3+w*(Lg5+w*Lg7))); =20 which to even the most casual observer are clearly different. > The old fdlibm comments aren't too careful about keeping magic numbers > out of the algorithm description so that the algorithm description is > as general as possible. The precise magic numbers are often critical > to the details of the implementation of the algorithm but not really > to the algorithm itself. The current code isn't careful at all about magic numbers. Which ones = are magic hex constants for IEEE stuff, and which ones are hex numbers = for the exact representation of important constants? Anyway, it is clear you guys don't want them in there so I've reverted = them. I'm totally baffled by this request because these algorithms are = similar not identical, but since you guys are the active maintainers, = I'll accede to your wishes after expressing my utter bafflement at the = justifications. Warner= From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 13:40: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 E2660377; Mon, 22 Oct 2012 13:40:14 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) by mx1.freebsd.org (Postfix) with ESMTP id 96ABD8FC0A; Mon, 22 Oct 2012 13:40:14 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.5/8.14.5) with ESMTP id q9MDe34U052178; Mon, 22 Oct 2012 06:40:13 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.5/8.14.5/Submit) id q9MDe3bu052177; Mon, 22 Oct 2012 06:40:03 -0700 (PDT) (envelope-from sgk) Date: Mon, 22 Oct 2012 06:40:03 -0700 From: Steve Kargl To: Warner Losh Subject: Re: svn commit: r241755 - head/lib/msun/src Message-ID: <20121022134003.GA52156@troutmask.apl.washington.edu> References: <201210192246.q9JMkm4R092929@svn.freebsd.org> <20121020150917.I1095@besplex.bde.org> <18177777-6EE0-4103-98B0-272EFF98FE96@bsdimp.com> <20121022040651.GA49632@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Warner Losh , Bruce Evans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 13:40:15 -0000 On Mon, Oct 22, 2012 at 06:59:04AM -0600, Warner Losh wrote: > > On Oct 21, 2012, at 10:06 PM, Steve Kargl wrote: > > > On Sun, Oct 21, 2012 at 09:08:49PM -0600, Warner Losh wrote: > >> Feel free to fix them however. I added the comments because > >> the algorithms weren't quite the same... If you have a better > >> way, feel free to back my stuff out on the way to it. > >> > >> Warner > >> > > > > Please back your commits out. > > > > Two of the three people who actually appear to be > > working on libm have now requested the back-out. > > OK. While it would be just as easy for you guys to commit the new stuff over mine, I'll revert them. > > Warner > Thanks. BTW, besides bde's technical points, your change made our sources different from OpenBSD, NetBSD, and new project openlibm. Diffing against the other trees would become cluttered. -- Steve From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 14:10: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 0F5D7CDB; Mon, 22 Oct 2012 14:10:18 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA4958FC0C; Mon, 22 Oct 2012 14:10: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 q9MEAH3p025517; Mon, 22 Oct 2012 14:10:17 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MEAH9d025513; Mon, 22 Oct 2012 14:10:17 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201210221410.q9MEAH9d025513@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Mon, 22 Oct 2012 14:10:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241888 - in head: share/man/man9 sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 14:10:18 -0000 Author: melifaro Date: Mon Oct 22 14:10:17 2012 New Revision: 241888 URL: http://svn.freebsd.org/changeset/base/241888 Log: Make PFIL use per-VNET lock instead of per-AF lock. Since most used packet filters (ipfw and PF) use the same ruleset with the same lock for both AF_INET and AF_INET6 there is no need in more fine-grade locking. However, it is possible to request personal lock by specifying PFIL_FLAG_PRIVATE_LOCK flag in pfil_head structure (see pfil.9 for more details). Export PFIL lock via rw_lock(9)/rm_lock(9)-like API permitting pfil consumers to use this lock instead of own lock. This help reducing locks on main traffic path. pfil_assert() is currently not implemented due to absense of rm_assert(). Waiting for some kind of r234648 to be merged in HEAD. This change is part of bigger patch reducing routing locking. Sponsored by: Yandex LLC Reviewed by: glebius, ae OK'd by: silence on net@ MFC after: 3 weeks Modified: head/share/man/man9/pfil.9 head/sys/net/pfil.c head/sys/net/pfil.h Modified: head/share/man/man9/pfil.9 ============================================================================== --- head/share/man/man9/pfil.9 Mon Oct 22 13:21:11 2012 (r241887) +++ head/share/man/man9/pfil.9 Mon Oct 22 14:10:17 2012 (r241888) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 6, 2012 +.Dd October 22, 2012 .Dt PFIL 9 .Os .Sh NAME @@ -39,7 +39,11 @@ .Nm pfil_hook_get , .Nm pfil_add_hook , .Nm pfil_remove_hook , -.Nm pfil_run_hooks +.Nm pfil_run_hooks , +.Nm pfil_rlock , +.Nm pfil_runlock , +.Nm pfil_wlock , +.Nm pfil_wunlock .Nd packet filter interface .Sh SYNOPSIS .In sys/param.h @@ -62,6 +66,14 @@ .Fn (*func) "void *arg" "struct mbuf **mp" "struct ifnet *" "int dir" "struct inpcb *" .Ft int .Fn pfil_run_hooks "struct pfil_head *head" "struct mbuf **mp" "struct ifnet *" "int dir" "struct inpcb *" +.Ft void +.Fn pfil_rlock "struct pfil_head *" "struct rm_priotracker *" +.Ft void +.Fn pfil_runlock "struct pfil_head *" "struct rm_priotracker *" +.Ft void +.Fn pfil_wlock "struct pfil_head *" +.Ft void +.Fn pfil_wunlock "struct pfil_head *" .Sh DESCRIPTION The .Nm @@ -86,6 +98,16 @@ The data link type is a .Xr bpf 4 DLT constant indicating what kind of header is present on the packet at the filtering point. +Each filtering point uses common per-VNET rmlock by default. +This can be changed by specifying +.Vt PFIL_FLAG_PRIVATE_LOCK +as +.Vt "flags" +field in the +.Vt pfil_head +structure. +Note that specifying private lock can break filters sharing the same +ruleset and/or state between different data link types. Filtering points may be unregistered with the .Fn pfil_head_unregister function. @@ -122,6 +144,31 @@ The filter returns an error (errno) if t if the processing is to continue. If the packet processing is to stop, it is the responsibility of the filter to free the packet. +.Pp +Every filter hook is called with +.Nm +read lock held. +All heads uses the same lock within the same VNET instance. +Packet filter can use this lock instead of own locking model to +improve performance. +Since +.Nm +uses +.Xr rmlock 9 +.Fn pfil_rlock +and +.Fn pfil_runlock +require +.Va struct rm_priotracker +to be passed as argument. +Filter can acquire and release writer lock via +.Fn pfil_wlock +and +.Fn pfil_wunlock +functions. +See +.Xr rmlock 9 +for more details. .Sh FILTERING POINTS Currently, filtering points are implemented for the following link types: .Pp @@ -157,6 +204,7 @@ might sleep! .Sh SEE ALSO .Xr bpf 4 , .Xr if_bridge 4 +.Xr rmlock 4 .Sh HISTORY The .Nm @@ -192,6 +240,9 @@ as well as be less IP-centric. .Pp Fine-grained locking was added in .Fx 5.2 . +.Nm +lock export was added in +.Fx 10.0 . .Sh BUGS The .Fn pfil_hook_get Modified: head/sys/net/pfil.c ============================================================================== --- head/sys/net/pfil.c Mon Oct 22 13:21:11 2012 (r241887) +++ head/sys/net/pfil.c Mon Oct 22 14:10:17 2012 (r241888) @@ -61,6 +61,8 @@ static int pfil_list_remove(pfil_list_t LIST_HEAD(pfilheadhead, pfil_head); VNET_DEFINE(struct pfilheadhead, pfil_head_list); #define V_pfil_head_list VNET(pfil_head_list) +VNET_DEFINE(struct rmlock, pfil_lock); +#define V_pfil_lock VNET(pfil_lock) /* * pfil_run_hooks() runs the specified packet filter hooks. @@ -91,6 +93,60 @@ pfil_run_hooks(struct pfil_head *ph, str } /* + * pfil_try_rlock() acquires rm reader lock for specified head + * if this is immediately possible, + */ +int +pfil_try_rlock(struct pfil_head *ph, struct rm_priotracker *tracker) +{ + return PFIL_TRY_RLOCK(ph, tracker); +} + +/* + * pfil_rlock() acquires rm reader lock for specified head. + */ +void +pfil_rlock(struct pfil_head *ph, struct rm_priotracker *tracker) +{ + PFIL_RLOCK(ph, tracker); +} + +/* + * pfil_runlock() releases reader lock for specified head. + */ +void +pfil_runlock(struct pfil_head *ph, struct rm_priotracker *tracker) +{ + PFIL_RUNLOCK(ph, tracker); +} + +/* + * pfil_wlock() acquires writer lock for specified head. + */ +void +pfil_wlock(struct pfil_head *ph) +{ + PFIL_WLOCK(ph); +} + +/* + * pfil_wunlock() releases writer lock for specified head. + */ +void +pfil_wunlock(struct pfil_head *ph) +{ + PFIL_WUNLOCK(ph); +} + +/* + * pfil_wowned() releases writer lock for specified head. + */ +int +pfil_wowned(struct pfil_head *ph) +{ + return PFIL_WOWNED(ph); +} +/* * pfil_head_register() registers a pfil_head with the packet filter hook * mechanism. */ @@ -295,6 +351,7 @@ vnet_pfil_init(const void *unused) { LIST_INIT(&V_pfil_head_list); + PFIL_LOCK_INIT_REAL(&V_pfil_lock, "shared"); return (0); } @@ -306,6 +363,7 @@ vnet_pfil_uninit(const void *unused) { /* XXX should panic if list is not empty */ + PFIL_LOCK_DESTROY_REAL(&V_pfil_lock); return (0); } Modified: head/sys/net/pfil.h ============================================================================== --- head/sys/net/pfil.h Mon Oct 22 13:21:11 2012 (r241887) +++ head/sys/net/pfil.h Mon Oct 22 14:10:17 2012 (r241888) @@ -64,6 +64,8 @@ typedef TAILQ_HEAD(pfil_list, packet_fil #define PFIL_TYPE_AF 1 /* key is AF_* type */ #define PFIL_TYPE_IFNET 2 /* key is ifnet pointer */ +#define PFIL_FLAG_PRIVATE_LOCK 0x01 /* Personal lock instead of global */ + struct pfil_head { pfil_list_t ph_in; pfil_list_t ph_out; @@ -72,7 +74,9 @@ struct pfil_head { #if defined( __linux__ ) || defined( _WIN32 ) rwlock_t ph_mtx; #else - struct rmlock ph_lock; + struct rmlock *ph_plock; /* Pointer to the used lock */ + struct rmlock ph_lock; /* Private lock storage */ + int flags; #endif union { u_long phu_val; @@ -90,21 +94,43 @@ int pfil_remove_hook(int (*func)(void *, int pfil_run_hooks(struct pfil_head *, struct mbuf **, struct ifnet *, int, struct inpcb *inp); +struct rm_priotracker; /* Do not require including rmlock header */ +int pfil_try_rlock(struct pfil_head *, struct rm_priotracker *); +void pfil_rlock(struct pfil_head *, struct rm_priotracker *); +void pfil_runlock(struct pfil_head *, struct rm_priotracker *); +void pfil_wlock(struct pfil_head *); +void pfil_wunlock(struct pfil_head *); +int pfil_wowned(struct pfil_head *ph); + int pfil_head_register(struct pfil_head *); int pfil_head_unregister(struct pfil_head *); struct pfil_head *pfil_head_get(int, u_long); #define PFIL_HOOKED(p) ((p)->ph_nhooks > 0) -#define PFIL_LOCK_INIT(p) \ - rm_init_flags(&(p)->ph_lock, "PFil hook read/write mutex", RM_RECURSE) -#define PFIL_LOCK_DESTROY(p) rm_destroy(&(p)->ph_lock) -#define PFIL_RLOCK(p, t) rm_rlock(&(p)->ph_lock, (t)) -#define PFIL_WLOCK(p) rm_wlock(&(p)->ph_lock) -#define PFIL_RUNLOCK(p, t) rm_runlock(&(p)->ph_lock, (t)) -#define PFIL_WUNLOCK(p) rm_wunlock(&(p)->ph_lock) -#define PFIL_LIST_LOCK() mtx_lock(&pfil_global_lock) -#define PFIL_LIST_UNLOCK() mtx_unlock(&pfil_global_lock) +#define PFIL_LOCK_INIT_REAL(l, t) \ + rm_init_flags(l, "PFil " t " rmlock", RM_RECURSE) +#define PFIL_LOCK_DESTROY_REAL(l) \ + rm_destroy(l) +#define PFIL_LOCK_INIT(p) do { \ + if ((p)->flags & PFIL_FLAG_PRIVATE_LOCK) { \ + PFIL_LOCK_INIT_REAL(&(p)->ph_lock, "private"); \ + (p)->ph_plock = &(p)->ph_lock; \ + } else \ + (p)->ph_plock = &V_pfil_lock; \ +} while (0) +#define PFIL_LOCK_DESTROY(p) do { \ + if ((p)->flags & PFIL_FLAG_PRIVATE_LOCK) \ + PFIL_LOCK_DESTROY_REAL((p)->ph_plock); \ +} while (0) +#define PFIL_TRY_RLOCK(p, t) rm_try_rlock((p)->ph_plock, (t)) +#define PFIL_RLOCK(p, t) rm_rlock((p)->ph_plock, (t)) +#define PFIL_WLOCK(p) rm_wlock((p)->ph_plock) +#define PFIL_RUNLOCK(p, t) rm_runlock((p)->ph_plock, (t)) +#define PFIL_WUNLOCK(p) rm_wunlock((p)->ph_plock) +#define PFIL_WOWNED(p) rm_wowned((p)->ph_plock) +#define PFIL_LIST_LOCK() mtx_lock(&pfil_global_lock) +#define PFIL_LIST_UNLOCK() mtx_unlock(&pfil_global_lock) static __inline struct packet_filter_hook * pfil_hook_get(int dir, struct pfil_head *ph) From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 14:18: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 A1CAA2A1; Mon, 22 Oct 2012 14:18:38 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: from freefall.freebsd.org (freefall.FreeBSD.org [8.8.178.135]) by mx1.freebsd.org (Postfix) with ESMTP id 7E68D8FC0A; Mon, 22 Oct 2012 14:18:38 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q9MEIce0063335; Mon, 22 Oct 2012 14:18:38 GMT (envelope-from bapt@freebsd.org) Received: (from bapt@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q9MEIcBA063334; Mon, 22 Oct 2012 14:18:38 GMT (envelope-from bapt@freebsd.org) X-Authentication-Warning: freefall.freebsd.org: bapt set sender to bapt@freebsd.org using -f Date: Mon, 22 Oct 2012 16:18:34 +0200 From: Baptiste Daroussin To: Eitan Adler Subject: Re: svn commit: r241830 - in head/usr.sbin/pkg_install: add create delete info lib updating version Message-ID: <20121022141833.GB38813@ithaqua.etoilebsd.net> References: <201210220212.q9M2CKKP008069@svn.freebsd.org> <20121022071813.GA38813@ithaqua.etoilebsd.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="MW5yreqqjyrRcusr" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 14:18:38 -0000 --MW5yreqqjyrRcusr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 22, 2012 at 08:01:19AM -0400, Eitan Adler wrote: > On 22 October 2012 03:18, Baptiste Daroussin wrote: > > > > hi, > > > > pkg_install are under portmgr maintainership, and we never received thi= s patch > > to review and validate. >=20 > We discussed an earlier version of the patch and this version is that > one + your comments. yes but giving me a chance to review the final version would have allowed m= e to ask you to for example: I still want to be able to do some operations without havind this warning, = like preparing a chroot or other option, thus not printing the warning in some special cases I could also have been able to discuss about it with other portmgr based on= the final patch (which is one of the reason it is maintained by portmgr) given we were 5 portmgrs in the same place for the last 5 days that wpuld h= ave fit perfectly. and I could have given you the approval which you need to commit on pkg_ins= tall bapt --MW5yreqqjyrRcusr Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlCFVbkACgkQ8kTtMUmk6ExtEQCfeoXDkA7TCaBU2V7W7gqlq90R QnkAn1z3t73iSFE04OLmtVg+atut3vzN =yI9v -----END PGP SIGNATURE----- --MW5yreqqjyrRcusr-- From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 14:35: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 5D84BBC4 for ; Mon, 22 Oct 2012 14:35:28 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id D55198FC14 for ; Mon, 22 Oct 2012 14:35:27 +0000 (UTC) Received: by mail-vc0-f182.google.com with SMTP id fw7so3806346vcb.13 for ; Mon, 22 Oct 2012 07:35:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender: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=67jgHo2W1A2U+Az1TLS1v+CA2NXyVxZxxs+nW5OQf4w=; b=YZL6hwB9wsTO7PAMtxFlPsZUzpyylp70bRpsqRofiqrfy50ToFUb/D8IEHScU6NHl6 f86fLARFbvYZkfFT6lMVli9K270+0ySLcUuh4eM5C8rYHyFwT7rQEyjmoNWFmfLukqE4 Xjm65nDEMAYYNjBW9E1MFtJpbasIKK9r8iCpiNWk0buceZSHRzmUqKovK6LEZgpKJAck z4c6TzWBH4H45YhjQMRPg7z95xncbpz+tVO9KcEHdA7BgBTmVt4kitZnq3XCxRE9R8YS PGH9qQJSHjAWk2QpJeJDy3D3J9DsqSh7uESHTYrAm5JDQ7E2IarbelnrL5UKovF+Y9H/ x1rg== Received: by 10.52.68.7 with SMTP id r7mr12146355vdt.96.1350916526905; Mon, 22 Oct 2012 07:35:26 -0700 (PDT) Received: from [10.30.101.53] ([209.117.142.2]) by mx.google.com with ESMTPS id r6sm10313123vdj.8.2012.10.22.07.35.19 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 22 Oct 2012 07:35:23 -0700 (PDT) Sender: Warner Losh Subject: Re: svn commit: r241755 - head/lib/msun/src Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <20121022134003.GA52156@troutmask.apl.washington.edu> Date: Mon, 22 Oct 2012 08:35:17 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <45589524-E249-43E3-91B7-6A78068208AD@bsdimp.com> References: <201210192246.q9JMkm4R092929@svn.freebsd.org> <20121020150917.I1095@besplex.bde.org> <18177777-6EE0-4103-98B0-272EFF98FE96@bsdimp.com> <20121022040651.GA49632@troutmask.apl.washington.edu> <20121022134003.GA52156@troutmask.apl.washington.edu> To: Steve Kargl X-Mailer: Apple Mail (2.1084) X-Gm-Message-State: ALoCoQlc0vlBQSX2ioxJJRoEHfH1472T7RPwVVBwNJS0myAZdVFz/X8F5Q9u1zxIeR2GnyCD59o4 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Warner Losh , Bruce Evans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 14:35:28 -0000 On Oct 22, 2012, at 7:40 AM, Steve Kargl wrote: > On Mon, Oct 22, 2012 at 06:59:04AM -0600, Warner Losh wrote: >>=20 >> On Oct 21, 2012, at 10:06 PM, Steve Kargl wrote: >>=20 >>> On Sun, Oct 21, 2012 at 09:08:49PM -0600, Warner Losh wrote: >>>> Feel free to fix them however. I added the comments because >>>> the algorithms weren't quite the same... If you have a better >>>> way, feel free to back my stuff out on the way to it. >>>>=20 >>>> Warner >>>>=20 >>>=20 >>> Please back your commits out.=20 >>>=20 >>> Two of the three people who actually appear to be >>> working on libm have now requested the back-out. >>=20 >> OK. While it would be just as easy for you guys to commit the new = stuff over mine, I'll revert them. >>=20 >> Warner >>=20 >=20 > Thanks. >=20 > BTW, besides bde's technical points, your change made > our sources different from OpenBSD, NetBSD, and new > project openlibm. Diffing against the other trees > would become cluttered. BDE's technical points vary in quality and are difficult to argue with = since they are so nit-picky. :( I'd be happy to work through them, but = some of the issues I just fundamentally disagree with. Since I backed = out the comments, I've decided not to spend the time arguing, but do = think that documenting the differences between the precisions would be = good. I started down this path because I thought expf was broken = because it didn't match exp exactly... However, since he's implementing a new one, wouldn't that also have = diffability issues too? Warner= From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 14:35: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 2D11ED36 for ; Mon, 22 Oct 2012 14:35:43 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id E45318FC1E for ; Mon, 22 Oct 2012 14:35:42 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id rp8so2110709pbb.13 for ; Mon, 22 Oct 2012 07:35:42 -0700 (PDT) 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=PeGjVGL0CW/kfHeWDIipccIK6SoTUkx9gCerFGA8Dro=; b=DRYf+fHaKK7+283FJQBNwmg8Jb+x3wVsS6fVz5K89rkXncQZrj+GdQ/bs87nUK56js Yx5LvGG8uLBtYZlbJLwZFkjE2h31euvSOvJyTiGlhQUxya8Wk+R3okX/dyxEkU0mt+Zz oML56RpKco8xWo5GnFTplPIyKB9qR1I66D6kA= 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:cc:content-type :x-gm-message-state; bh=PeGjVGL0CW/kfHeWDIipccIK6SoTUkx9gCerFGA8Dro=; b=Zt0pkZmuCOFVyLVpIs0nsWThBM4LAchme0TwK5t4ydH8nvf/xbl9xE84nDL1bjC+MK PYuEMD7hQVPCBK26/JHvkRdO+9zPcDseblJ7FvrM5RlgA9TvRVpYZl/5bv+bvJrV0icg NKAMYr/LzRfGynur4Cj0+UkrxmrM6xdi0cidrqHAx7g//pcvCzC4K9/Bzxko+nW1K1f6 dLUs2zNmy3GSkTauAxGLu9EwumZgw4HkLyaedHpYxmFNIBEeMPUKpuC6n1sie/QYo0LB OKa3Yoptad1k8Kz0w/3fAXZhnhpgc5QJ6upRSmxJBK3Enk6Co/DC/THLs88jxqRyNu31 Ustg== Received: by 10.66.81.103 with SMTP id z7mr26406919pax.57.1350916542028; Mon, 22 Oct 2012 07:35:42 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.66.161.163 with HTTP; Mon, 22 Oct 2012 07:35:11 -0700 (PDT) In-Reply-To: <20121022141833.GB38813@ithaqua.etoilebsd.net> References: <201210220212.q9M2CKKP008069@svn.freebsd.org> <20121022071813.GA38813@ithaqua.etoilebsd.net> <20121022141833.GB38813@ithaqua.etoilebsd.net> From: Eitan Adler Date: Mon, 22 Oct 2012 10:35:11 -0400 X-Google-Sender-Auth: EOBFseW2qseO80-hG6XnBd5UDWg Message-ID: Subject: Re: svn commit: r241830 - in head/usr.sbin/pkg_install: add create delete info lib updating version To: Baptiste Daroussin Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQmpkmmUPMQNvI7u0D3oKaXQM/2fKTq2X0Ww+essgm7EvjPIkAJ2IpAdy6suX6OTA/NUdXeX Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 14:35:43 -0000 On 22 October 2012 10:18, Baptiste Daroussin wrote: > On Mon, Oct 22, 2012 at 08:01:19AM -0400, Eitan Adler wrote: >> On 22 October 2012 03:18, Baptiste Daroussin wrote: >> > >> > hi, >> > >> > pkg_install are under portmgr maintainership, and we never received this patch >> > to review and validate. >> >> We discussed an earlier version of the patch and this version is that >> one + your comments. > > yes but giving me a chance to review the final version would have allowed me to > ask you to for example: Okay. I'll prepare some changes and send them to you for approval. I apologize for not asking for additional review for this patch. I'm not sure when I will send the patch to you, but I won't MFC this change until then. -- Eitan Adler Source & Ports committer X11, Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 14:37: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 154ACEF1; Mon, 22 Oct 2012 14:37:41 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id DA4CA8FC14; Mon, 22 Oct 2012 14:37:40 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 46D4BB91A; Mon, 22 Oct 2012 10:37:40 -0400 (EDT) From: John Baldwin To: Eitan Adler Subject: Re: svn commit: r241828 - in head: . sys/modules/3dfx sys/modules/cmx sys/modules/filemon tools/tools/sysdoc Date: Mon, 22 Oct 2012 09:36:08 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <201210220212.q9M2CB4r007975@svn.freebsd.org> In-Reply-To: <201210220212.q9M2CB4r007975@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201210220936.08670.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 22 Oct 2012 10:37:40 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 14:37:41 -0000 On Sunday, October 21, 2012 10:12:11 pm Eitan Adler wrote: > Author: eadler > Date: Mon Oct 22 02:12:11 2012 > New Revision: 241828 > URL: http://svn.freebsd.org/changeset/base/241828 > > Log: > Finish migration of MAINTAINER entries > > Approved by: cperciva > MFC after: 3 days > > Modified: > head/MAINTAINERS > head/sys/modules/3dfx/Makefile > head/sys/modules/cmx/Makefile > head/sys/modules/filemon/Makefile > head/tools/tools/sysdoc/Makefile > > Modified: head/MAINTAINERS > ============================================================================== > --- head/MAINTAINERS Mon Oct 22 02:12:06 2012 (r241827) > +++ head/MAINTAINERS Mon Oct 22 02:12:11 2012 (r241828) > @@ -120,16 +120,7 @@ lib/libc/stdtime edwin Heads-up apprec > is maintained by a third party source. > sbin/routed bms Pre-commit review; notify vendor at rhyolite.com > isci(4) jimharris Pre-commit review requested. > - > -Following are the entries from the Makefiles, and a few other sources. > -Please remove stale entries from both their origin, and this file. > - > -Please also consider removing the lines from the files listed below and > -stating your preferences here instead. > - > -List below generated with: > -$ cd /usr/src; find */* -type f|xargs egrep 'MAINTAINER[ ]*=' > - > -sys/modules/3dfx/Makefile:MAINTAINER= cokane@FreeBSD.org > -sys/modules/urio/Makefile:MAINTAINER= Iwasa Kazmi > -tools/tools/sysdoc/Makefile:MAINTAINER= trhodes@FreeBSD.org > +3dfx cokane Pre-commit review preferred. > +cmx daniel@roe.ch Pre-commit review preferred. > +fileman obrien Pre-commit review preferred. > +sysdoc trhodes Pre-commit review preferred. s/fileman/filemon/? -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 14: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 D4152289 for ; Mon, 22 Oct 2012 14:37:56 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3697A8FC0A for ; Mon, 22 Oct 2012 14:37:56 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id rp8so2112391pbb.13 for ; Mon, 22 Oct 2012 07:37:56 -0700 (PDT) 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; bh=CVqK/AsXYCT2Z/guPUdhTbdpaMx7S72KQXgrU+hwhoI=; b=kP7+9ZT4VrxH7ZizLywqBIiNBzWiQuNUMnQlP1XycwTozSzOtKOS06ZFKOON3mNUqg Tx1tc9GT+jXp2cFx+AA08ovotw1EmKJbFH5vg1S9P9cFKGltVs+OQktoTgJEH3uSv2oP mX4AfELnSAbbVOrmpT/Na4XoBtbtT3pHwFePg= 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 :x-gm-message-state; bh=CVqK/AsXYCT2Z/guPUdhTbdpaMx7S72KQXgrU+hwhoI=; b=XSN8hIHyCHCajR6tDIFzOcDx+WozlFy5ktozt2c6lNrxUnPC7f/Rgi5a58yerFAAef OmkbMNOI0SZDsJAFMLily7kRBbr+6fxm4mcGoljl3wQ0rFD9lqQ9ioLJp/w8Y9HQXhKn 3KxanMZD83o6oZGAt9U6lOuJfVulWmtiihNeW0/2IgJp39scwHlkKd+uzLDgdExRjwO4 3SumFMRfPCx5q2Gpz00qquURWV31YmZFpaboyOpEi0lVpzF5/GGfLZY8sZXqkHaowgPd nLX9fpzHZMAAljLawON6M9+UUo6HCQ36HosgJHtGM7QZZiqnHaTInSWLuD7CqdGhAWEU +V6w== Received: by 10.68.129.72 with SMTP id nu8mr30515128pbb.29.1350916675992; Mon, 22 Oct 2012 07:37:55 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.66.161.163 with HTTP; Mon, 22 Oct 2012 07:37:25 -0700 (PDT) In-Reply-To: <201210220259.q9M2xo3F015844@svn.freebsd.org> References: <201210220259.q9M2xo3F015844@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 10:37:25 -0400 X-Google-Sender-Auth: ZoiXr7gaWXGjXZxS5OM-N2o1q1M Message-ID: Subject: Re: svn commit: r241836 - head/share/man/man4 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQlHdhCizjyL/9oldFSAjU2LEQVV4/1LhJyQn9Z2E/Vytkbm54iJYf32JwJZ2HdlvrSiJ3IS X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 14:37:56 -0000 On 21 October 2012 22:59, Eitan Adler wrote: > Author: eadler > Date: Mon Oct 22 02:59:49 2012 > New Revision: 241836 > URL: http://svn.freebsd.org/changeset/base/241836 > > Log: > Remove {harp,hfa,idt} man pages as they were removed in r179308. A few people emailed me about this already, so I'll reply publicly: it seems my ObsoleteFiles.inc change got dropped from the patch I sent for approval. I shall commit this change "shortly." -- Eitan Adler Source & Ports committer X11, Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 14:48: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 609D1AE8; Mon, 22 Oct 2012 14:48:15 +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 3F8678FC17; Mon, 22 Oct 2012 14:48: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 q9MEmF0C031577; Mon, 22 Oct 2012 14:48:15 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MEmFmB031575; Mon, 22 Oct 2012 14:48:15 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210221448.q9MEmFmB031575@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 14:48:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241891 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 14:48:15 -0000 Author: eadler Date: Mon Oct 22 14:48:14 2012 New Revision: 241891 URL: http://svn.freebsd.org/changeset/base/241891 Log: Fix typo ('a' and 'o' are not the same letter apparently) Approved by: cperciva (implicit) Modified: head/MAINTAINERS Modified: head/MAINTAINERS ============================================================================== --- head/MAINTAINERS Mon Oct 22 14:23:59 2012 (r241890) +++ head/MAINTAINERS Mon Oct 22 14:48:14 2012 (r241891) @@ -122,5 +122,5 @@ sbin/routed bms Pre-commit review; notif isci(4) jimharris Pre-commit review requested. 3dfx cokane Pre-commit review preferred. cmx daniel@roe.ch Pre-commit review preferred. -fileman obrien Pre-commit review preferred. +filemon obrien Pre-commit review preferred. sysdoc trhodes Pre-commit review preferred. From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 14:48: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 5A00AC5C for ; Mon, 22 Oct 2012 14:48:59 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 185D58FC0C for ; Mon, 22 Oct 2012 14:48:58 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id rp8so2120890pbb.13 for ; Mon, 22 Oct 2012 07:48:58 -0700 (PDT) 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=Ot/nM7DI4Spjg1YiMxuM/lwCzDgbRsSwYkoDdt01H9g=; b=TeKu7WfCYLOk5E0rg5mnVpTyIR/6mSHAOyKsM1OQL0I5CApeT9WKwkfchquoYukyrf 2uGA79n3AMut9ij9vVYPFdd9/ddf/J8C7PWNGBEA+MvjWvSHlfHEA7lLZv2lCFeI9Qcg rz6LTDTMZfEqsT6YBWrvfY/dN2QyHTyIC9v0s= 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:cc:content-type :x-gm-message-state; bh=Ot/nM7DI4Spjg1YiMxuM/lwCzDgbRsSwYkoDdt01H9g=; b=HzSibwv2+L5DsvxfIGb1+qb3ZtYm5NOFlgkvcEAcxmHLGgzpJj2jyeFb1RH3UzllZT OzhRjuKqqofyYuIaTEE7NMvlC8ZTiiyHvVUJAblzs4lip1HmrJ7KzLpl0KRx2MhX6OgS NgsZgy0w7TmQ9cYJi192Q8yH5PK9nwlF7yqBnZkOSKlDy+1T9IZrtqvaDWHf7St2R2WG /cgJnz8gHoeU9zrvGrPZKLcndB23fve7Buwio9+eFHzPIARduQiNjpzNqVjg1iuH/074 xr3W32D+JwX6zPgE0D7HPpF4NzB4+dJ2Ho4nTU85Y+4VLoZIvT2uLzOLbc9hIBmmMG56 Qc3Q== Received: by 10.68.129.72 with SMTP id nu8mr30602916pbb.29.1350917338635; Mon, 22 Oct 2012 07:48:58 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.66.161.163 with HTTP; Mon, 22 Oct 2012 07:48:28 -0700 (PDT) In-Reply-To: <201210220936.08670.jhb@freebsd.org> References: <201210220212.q9M2CB4r007975@svn.freebsd.org> <201210220936.08670.jhb@freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 10:48:28 -0400 X-Google-Sender-Auth: xZoZ63UAmAY5xoi9N7zdlq0lw0I Message-ID: Subject: Re: svn commit: r241828 - in head: . sys/modules/3dfx sys/modules/cmx sys/modules/filemon tools/tools/sysdoc To: John Baldwin Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQkaBx6veUg+qfuEvfhdsC6l14rlukusFUybwc8C216E01wVV8uyQQY9TxiqdvGRZJeElE/a Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 14:48:59 -0000 On 22 October 2012 09:36, John Baldwin wrote: > s/fileman/filemon/? fixed. -- Eitan Adler Source & Ports committer X11, Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 15:04: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 2649E13D; Mon, 22 Oct 2012 15:04:24 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A9F38FC08; Mon, 22 Oct 2012 15:04: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 q9MF4NcC034145; Mon, 22 Oct 2012 15:04:23 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MF4NWt034143; Mon, 22 Oct 2012 15:04:23 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201210221504.q9MF4NWt034143@svn.freebsd.org> From: Andre Oppermann Date: Mon, 22 Oct 2012 15:04:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241892 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 15:04:24 -0000 Author: andre Date: Mon Oct 22 15:04:23 2012 New Revision: 241892 URL: http://svn.freebsd.org/changeset/base/241892 Log: Remove ZERO_COPY_SOCKETS from kernel configuration as the current COW based approach is not safe and should not be used in production. Modified: head/sys/mips/conf/RT305X Modified: head/sys/mips/conf/RT305X ============================================================================== --- head/sys/mips/conf/RT305X Mon Oct 22 14:48:14 2012 (r241891) +++ head/sys/mips/conf/RT305X Mon Oct 22 15:04:23 2012 (r241892) @@ -86,7 +86,6 @@ options SCSI_NO_OP_STRINGS options RWLOCK_NOINLINE options SX_NOINLINE options NO_SWAPPING -options ZERO_COPY_SOCKETS options MROUTING # Multicast routing options IPFIREWALL_DEFAULT_TO_ACCEPT From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 15:07: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 0B483316; Mon, 22 Oct 2012 15:07:13 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 674018FC12; Mon, 22 Oct 2012 15:07:13 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q9MF76WI077342; Mon, 22 Oct 2012 19:07:06 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q9MF76cT077341; Mon, 22 Oct 2012 19:07:06 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 22 Oct 2012 19:07:06 +0400 From: Gleb Smirnoff To: Marcel Moolenaar Subject: Re: svn commit: r241823 - in head: . etc etc/atf etc/mtree lib lib/atf lib/atf/libatf-c lib/atf/libatf-c++ libexec libexec/atf libexec/atf/atf-check share share/atf share/doc share/doc/atf share/exampl... Message-ID: <20121022150706.GD70741@FreeBSD.org> References: <201210220118.q9M1Ifh5098857@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201210220118.q9M1Ifh5098857@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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 15:07:14 -0000 On Mon, Oct 22, 2012 at 01:18:41AM +0000, Marcel Moolenaar wrote: M> Tinderbox breakages that are the result of this commit are entirely M> the committer's fault -- in other words: buildworld testing on amd64 M> only. Taking into account the fact that last couple of weeks head was usually not buildable rather than buildable, I strongly disappreciate this. It looks to me as we are again treating head/ as a pile of stuff, not as an operating system one can install and use. Now that we have a big choice of VCSes: svn user branches, git and perforce, why isn't it possible to settle things in private branch and only then commit them to the head/? -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 15:17: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 3101C76C; Mon, 22 Oct 2012 15:17:18 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 9E0BC8FC0A; Mon, 22 Oct 2012 15:17:17 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q9MFHGlr077424; Mon, 22 Oct 2012 19:17:16 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q9MFHG3X077423; Mon, 22 Oct 2012 19:17:16 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 22 Oct 2012 19:17:16 +0400 From: Gleb Smirnoff To: "Alexander V. Chernikov" Subject: Re: svn commit: r241888 - in head: share/man/man9 sys/net Message-ID: <20121022151716.GE70741@FreeBSD.org> References: <201210221410.q9MEAH9d025513@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201210221410.q9MEAH9d025513@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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 15:17:18 -0000 On Mon, Oct 22, 2012 at 02:10:17PM +0000, Alexander V. Chernikov wrote: A> Author: melifaro A> Date: Mon Oct 22 14:10:17 2012 A> New Revision: 241888 A> URL: http://svn.freebsd.org/changeset/base/241888 A> A> Log: A> Make PFIL use per-VNET lock instead of per-AF lock. Since most used packet A> filters (ipfw and PF) use the same ruleset with the same lock for both A> AF_INET and AF_INET6 there is no need in more fine-grade locking. A> However, it is possible to request personal lock by specifying A> PFIL_FLAG_PRIVATE_LOCK flag in pfil_head structure (see pfil.9 for A> more details). A> A> Export PFIL lock via rw_lock(9)/rm_lock(9)-like API permitting pfil consumers A> to use this lock instead of own lock. This help reducing locks on main A> traffic path. A> A> pfil_assert() is currently not implemented due to absense of rm_assert(). A> Waiting for some kind of r234648 to be merged in HEAD. A> A> This change is part of bigger patch reducing routing locking. A> A> Sponsored by: Yandex LLC A> Reviewed by: glebius, ae I didn't review that, we have only discussed that. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 15:21:22 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by hub.freebsd.org (Postfix) with ESMTP id 9B8F1B7B; Mon, 22 Oct 2012 15:21:22 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from dhcp170-36-red.yandex.net (freefall.FreeBSD.org [8.8.178.135]) by mx2.freebsd.org (Postfix) with ESMTP id 7D42A3B5B52; Mon, 22 Oct 2012 15:21:21 +0000 (UTC) Message-ID: <50856422.80702@FreeBSD.org> Date: Mon, 22 Oct 2012 19:20:02 +0400 From: "Alexander V. Chernikov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120627 Thunderbird/13.0.1 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r241888 - in head: share/man/man9 sys/net References: <201210221410.q9MEAH9d025513@svn.freebsd.org> <20121022151716.GE70741@FreeBSD.org> In-Reply-To: <20121022151716.GE70741@FreeBSD.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 15:21:22 -0000 On 22.10.2012 19:17, Gleb Smirnoff wrote: > On Mon, Oct 22, 2012 at 02:10:17PM +0000, Alexander V. Chernikov wrote: > A> Author: melifaro > A> Date: Mon Oct 22 14:10:17 2012 > A> New Revision: 241888 > A> URL: http://svn.freebsd.org/changeset/base/241888 > A> > A> Log: > A> Make PFIL use per-VNET lock instead of per-AF lock. Since most used packet > A> filters (ipfw and PF) use the same ruleset with the same lock for both > A> AF_INET and AF_INET6 there is no need in more fine-grade locking. > A> However, it is possible to request personal lock by specifying > A> PFIL_FLAG_PRIVATE_LOCK flag in pfil_head structure (see pfil.9 for > A> more details). > A> > A> Export PFIL lock via rw_lock(9)/rm_lock(9)-like API permitting pfil consumers > A> to use this lock instead of own lock. This help reducing locks on main > A> traffic path. > A> > A> pfil_assert() is currently not implemented due to absense of rm_assert(). > A> Waiting for some kind of r234648 to be merged in HEAD. > A> > A> This change is part of bigger patch reducing routing locking. > A> > A> Sponsored by: Yandex LLC > A> Reviewed by: glebius, ae > > I didn't review that, we have only discussed that. Ah, ok. So commit message should be read as s/Reviewed by:/Discussed with:/ > -- WBR, Alexander From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 15:28: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 91754D4C; Mon, 22 Oct 2012 15:28:20 +0000 (UTC) (envelope-from jbeich@tormail.org) Received: from outgoing.tormail.org (outgoing.tormail.org [82.221.96.22]) by mx1.freebsd.org (Postfix) with ESMTP id 263AA8FC0C; Mon, 22 Oct 2012 15:28:19 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=internal.tormail.org) by outgoing.tormail.org with esmtp (Exim 4.72) (envelope-from ) id 1TQJvN-0001YW-EG; Mon, 22 Oct 2012 19:28:17 +0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tormail.org; s=tm; h=Message-Id:X-TorMail-User:Content-Type:MIME-Version:References:Date:Subject:Cc:To:From; bh=7gxCiK9qaCYxbJr7CrG6GpUDHQgZ5nklQ9stefs///M=; b=RxzR3rZK+BDT0nHNkvIFSgbjE/PHMyfZVpykz6fL5TI3etRhOt/xdVxMzJHit4vOh94LbCtEdSzigYbyv9Bd3XbJ6oMEvyla1VTvdlLmGaZ8SMHwiDigaX3YLGZ5J5xc2Dwq2XcEg8Wq6+QuLaPNncX57yOEfuMGXyV/HvRA6/E=; Received: from jbeich by internal.tormail.org with local (Exim 4.63) (envelope-from ) id 1TQJtx-000C9z-I6; Mon, 22 Oct 2012 15:26:51 +0000 From: Jan Beich To: Dimitry Andric Subject: Re: svn commit: r241823 - in head: . etc etc/atf etc/mtree lib lib/atf lib/atf/libatf-c lib/atf/libatf-c++ libexec libexec/atf libexec/atf/atf-check share share/atf share/doc share/doc/atf share/exampl... Date: Tue, 23 Oct 2012 02:58:50 +1200 References: <201210220118.q9M1Ifh5098857__14926.3614825488$1350868751$gmane$org@svn.freebsd.org> <1TQC0L-000AZG-Q5@internal.tormail.org> <1TQFrW-0008DN-S8@internal.tormail.org> MIME-Version: 1.0 Content-Type: text/plain X-TorMail-User: jbeich Message-Id: <1TQJtx-000C9z-I6@internal.tormail.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 15:28:20 -0000 Dimitry Andric writes: > On 2012-10-22 09:00, Jan Beich wrote: > ... > >> atf-run fails to link when using -stdlib=libc++. It works if I remove >> `throw' from check_stream(). Any clue? >> >> test-program.o: In function `(anonymous >> namespace)::check_stream(std::__1::basic_ostream> std::__1::char_traits >&)': >> /usr/src/usr.bin/atf/atf-run/../../../contrib/atf/atf-run/test-program.cpp:76: >> undefined reference to `std::__1::basic_ios> std::__1::char_traits >::clear(unsigned int)' >> clang++: error: linker command failed with exit code 1 (use -v to >> see invocation) > > Strange, for me it compiles (with a bunch of warnings, which I have > fixed locally), and links just fine. However, I always use -std=c++11, > which -std= flag are you using, if any? Adding -std=c++11 doesn't help. Neither yours or Garrett's patches. Instead, removing local -finline-functions (implied by -O3) does. From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 16:09: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 78F98F40; Mon, 22 Oct 2012 16:09:39 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail36.syd.optusnet.com.au (mail36.syd.optusnet.com.au [211.29.133.76]) by mx1.freebsd.org (Postfix) with ESMTP id E98008FC08; Mon, 22 Oct 2012 16:09:38 +0000 (UTC) Received: from c122-106-175-26.carlnfd1.nsw.optusnet.com.au (c122-106-175-26.carlnfd1.nsw.optusnet.com.au [122.106.175.26]) by mail36.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q9MG9Pv5023992 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 23 Oct 2012 03:09:26 +1100 Date: Tue, 23 Oct 2012 03:09:25 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Warner Losh Subject: Re: svn commit: r241755 - head/lib/msun/src In-Reply-To: <80A9038D-C84B-47D3-A137-F281449F4D88@bsdimp.com> Message-ID: <20121023011459.G2088@besplex.bde.org> References: <201210192246.q9JMkm4R092929@svn.freebsd.org> <20121020150917.I1095@besplex.bde.org> <18177777-6EE0-4103-98B0-272EFF98FE96@bsdimp.com> <20121022213348.T1373@besplex.bde.org> <80A9038D-C84B-47D3-A137-F281449F4D88@bsdimp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-Cloudmark-Score: 0 X-Optus-Cloudmark-Analysis: v=2.0 cv=Up07rJMB c=1 sm=1 a=xI64QrV9ptIA:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=Aet6fyW9sl8A:10 a=IjXKO9rnGdwczpQha3EA:9 a=CjuIK1q_8ugA:10 a=d3D4cFlDitsIMNaX:21 a=4zsjEq_Luspm44fH:21 a=bxQHXO5Py4tHmhUgaywp5w==:117 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Warner Losh , Bruce Evans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 16:09:39 -0000 On Mon, 22 Oct 2012, Warner Losh wrote: > On Oct 22, 2012, at 5:14 AM, Bruce Evans wrote: > >> On Sun, 21 Oct 2012, Warner Losh wrote: >> >>> Feel free to fix them however. I added the comments because the algorithms weren't quite the same... If you have a better way, feel free to back my stuff out on the way to it. >> >> But the algorithms are identical to a fault. Inside the functions, all >> lines except 1 in each correspond exactly, and the exception is a style >> bug. Only about 30 lines in each are not lexically identical. The >> non-lexical differences are for things like different magic numbers. > > Except that's not true. For expf, only the first two terms of the 5 are computed in Remes expansion. That's why I bothered to document the difference. For logf, there are at least two additional terms in the intermediate form. No, they both use a Remez-type polynomial approximation. The only differences are that the approximation for logf needs _fewer_ terms, and in fact has 3 fewer (except in the Cygnus version it had the same number of terms with the lower ones useless at best), and that the grouping of the terms is different for efficiency. I say "Remez-type" because it is unclear if anyone actually uses pure Remez. I use my own idea of what it is, without having looked at documentation of the original algorithm. I probably have different tweaks than normal. fdlibm's approximations often seem to be too inaccurate to have been generated by full Remez. The ones here in the Cygnus version were generated by starting with the double precision coeffs and blindly rounding them to float precision. This is a bad non-Remez method (but pure Remez doesn't understand limited precision AFAIK). In practice it gave 6 extra bits using Lg1-Lg7, where my coeffs generated for float precision give 10 extra bits using only Lg1-Lg4. The extra coeffs tend to be actively harmful (and IIRC they were here), because when Remez generates the lower coeffs it tunes them for the lower coeffs actually working, all in infinite precision, and after rounding to finite precision the delicate tuning for this just doesn't work. The comments actually say "special Remes". Who knows what that is? :-) Even running same algorithm, there is a lot of noise in the lower bits for all except the first few coeffs, so it is hard to duplicate coeffs produced by other special versions. > The differences here are: > /* logf */ > t1= w*(Lg2+w*Lg4); > t2= z*(Lg1+w*Lg3); > /* log */ > t1= w*(Lg2+w*(Lg4+w*Lg6)); > t2= z*(Lg1+w*(Lg3+w*(Lg5+w*Lg7))); > > which to even the most casual observer are clearly different. Too casual :-). Both use a moderately efficient grouping of terms for efficiency. Both are more optimal than the simple Horner's method grouping which would look similar even to a too-casual observer: R = s*s*(Lg1+s*(Lg2+s*(...+Lg[4or7])...)) Neither is highly optimized, but the logf one is is better, mainly because a power of 2 number of terms is easiest to get right and a small number of terms is especially easy to get right. In fact, the logf one is just the log one with higher terms omitted. Simply omitting higher terms is usually too simple, but here it happens to improve the grouping. The grouping is a general polynomial evaluation technique and isn't part of Remez. The details of it aren't documented at all. In fact, the pseudo-code doesn't even mention z completely: it says R(z) ~= Lg1*s**2 + ... +Lg7*s**14 (using superscripts for the powers) where the code says t2 = z*(Lg1+w*(Lg3+...)... R = t2+t1. Many other details involve unmentioned parts of general polynymonal evaluation technique (mainly, add terms from high to low for accuracy, but violate this rule as much as possible for efficiency, and avoid underflow by filtering out small args early and by not calculating high powers directly). >> The old fdlibm comments aren't too careful about keeping magic numbers >> out of the algorithm description so that the algorithm description is >> as general as possible. The precise magic numbers are often critical >> to the details of the implementation of the algorithm but not really >> to the algorithm itself. > > The current code isn't careful at all about magic numbers. Which ones are magic hex constants for IEEE stuff, and which ones are hex numbers for the exact representation of important constants? None for the hex FP constants. Hex FP constants are for the programmer's convenience, but I are just style bugs where I use put them in e_expf.c. Decimal FP constants work with any C compiler. They are only pseudocode in comments in fdlibm, and no one every used their values from there AFAIK, since C compilers were common when fdlibm was released. The style bug is to mix C99 hex FP constants in old fdlibm (Cygnus) code. Though only in comments, it looks strange since the active code still laboriously spells out (float) casts to get float constants. Even C90 has float constants via the F suffix. But I recently decided that many of the FP constants are style bugs. When you just want to add 2 as in e_log*.c you should spell 2 as 2 and not as 2.0 for the double case, 2.0F or (float)2.0 for the float case, and maybe 2.0L or (long double)2.0 for the long double case. C's promotion rules work correctly, so the 2 in (2+f) is promoted to the same type as f in all cases. By depending in this, the code becomes independent of the precision. A more interesting case is multiplying by 0.5 or (float)0.5 or 0.5F or ... This can be written as division byi integer 2, since the compiler is permitted to turn this into multiplication by 0.5 with the correct type. gcc has done this for many uears, so there is no need to manually optimize this. > Anyway, it is clear you guys don't want them in there so I've reverted them. I'm totally baffled by this request because these algorithms are similar not identical, but since you guys are the active maintainers, I'll accede to your wishes after expressing my utter bafflement at the justifications. Well, we (I) wrote the changes in the polynomial evaluation for both e_expf.c and e_logf.c, and was careful to a fault not to change the algorithm, so I know that it is more identical in these files than in others. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 16:27: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 149AD72B; Mon, 22 Oct 2012 16:27:11 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9E8B08FC08; Mon, 22 Oct 2012 16:27:09 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id b5so2292095lbd.13 for ; Mon, 22 Oct 2012 09:27:08 -0700 (PDT) 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; bh=IsD4KB2+ujIOSZ2rbMbVVekPCKDUeAg9MwGWem7e2wg=; b=Tz6pDHhY+nTa34z/TzXBlgmF32cEiR2SjsH4SfqVw2aMxQFI1TsRb54e8IfaNRPLT1 BFb6ucH1DnLiVSo3x8mOCXABLrBFSakmRK/EEBewgZ8TsGoOAx4++mXd3IJ0XwYaRM3i D1YVjkTiwyMEA/lbPX4xWA0GHPhRBD9h+jb4x5SzJZK/lvSOzS0CzA5YADxDtRehcMP9 BBYFOsy2LauTWmh89BZtGY9lwJBkaueG/7r86m1ej5uW8c8NjpkTvvne4NO2zpkxPv46 armMDUVH9z+FEEI8tAqRcr5oXyTu8gkLNarG/8jd08Mb0JLL9KQxn0+qdZZcrENqYkmk j6zA== MIME-Version: 1.0 Received: by 10.112.98.37 with SMTP id ef5mr3929276lbb.84.1350923228166; Mon, 22 Oct 2012 09:27:08 -0700 (PDT) Received: by 10.112.43.232 with HTTP; Mon, 22 Oct 2012 09:27:08 -0700 (PDT) In-Reply-To: <1TQJtx-000C9z-I6@internal.tormail.org> References: <201210220118.q9M1Ifh5098857__14926.3614825488$1350868751$gmane$org@svn.freebsd.org> <1TQC0L-000AZG-Q5@internal.tormail.org> <1TQFrW-0008DN-S8@internal.tormail.org> <1TQJtx-000C9z-I6@internal.tormail.org> Date: Mon, 22 Oct 2012 09:27:08 -0700 Message-ID: Subject: Re: svn commit: r241823 - in head: . etc etc/atf etc/mtree lib lib/atf lib/atf/libatf-c lib/atf/libatf-c++ libexec libexec/atf libexec/atf/atf-check share share/atf share/doc share/doc/atf share/exampl... From: Garrett Cooper To: Jan Beich Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , Dimitry Andric , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 16:27:11 -0000 On Mon, Oct 22, 2012 at 7:58 AM, Jan Beich wrote: > Dimitry Andric writes: > >> On 2012-10-22 09:00, Jan Beich wrote: >> ... >> >>> atf-run fails to link when using -stdlib=libc++. It works if I remove >>> `throw' from check_stream(). Any clue? >>> >>> test-program.o: In function `(anonymous >>> namespace)::check_stream(std::__1::basic_ostream>> std::__1::char_traits >&)': >>> /usr/src/usr.bin/atf/atf-run/../../../contrib/atf/atf-run/test-program.cpp:76: >>> undefined reference to `std::__1::basic_ios>> std::__1::char_traits >::clear(unsigned int)' >>> clang++: error: linker command failed with exit code 1 (use -v to >>> see invocation) >> >> Strange, for me it compiles (with a bunch of warnings, which I have >> fixed locally), and links just fine. However, I always use -std=c++11, >> which -std= flag are you using, if any? > > Adding -std=c++11 doesn't help. Neither yours or Garrett's patches. > Instead, removing local -finline-functions (implied by -O3) does. Ok. I was on the right track, even though my solution wasn't correct... Now that we know how to repro it, we can come up with a legitimate fix, but just to be sure we have all the details could you please send us your full environment (CC/CXX/CFLAGS/CXXFLAGS)? Thanks! -Garrett From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 16:42: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 B34C7EC7; Mon, 22 Oct 2012 16:42:44 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6CC378FC16; Mon, 22 Oct 2012 16:42:43 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id e12so2241734lag.13 for ; Mon, 22 Oct 2012 09:42:42 -0700 (PDT) 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; bh=vsumpZDPJq8u3muZ8Szpv6objBGllHdqiFqANOqkIis=; b=cne8BE6CrdvQt8kacTefpBMCAjP2cIcKOo13YCoNmgZFp0TNMnnnkimnkVz7QxAJNH OcqhjugZN3OmSR74++gadpDw3NgMe/FZbgUHaqzjjaUz3Id5SFctkK63Jd+nkwJCsaee ZUvyymWRAyc2+KloyG3+pdRQrEY9FLmQtivFJB7A766QIiEkzvViUzALDc1kpcxVO/pE tKrF42XzB0b8WvG0FipEMBtvAsT6cmjtP3WexwnINjmnCNflo5nv+i/7RjnNwqfe4ILN 8nud8S2GqIKfJPc1VShCNxOIMF3EgVglOwXMrnYBIxRWCHDQLdRTWFaBrPu9PY4jJ9D+ fcSg== MIME-Version: 1.0 Received: by 10.152.104.115 with SMTP id gd19mr8870830lab.13.1350924162291; Mon, 22 Oct 2012 09:42:42 -0700 (PDT) Received: by 10.112.43.232 with HTTP; Mon, 22 Oct 2012 09:42:42 -0700 (PDT) In-Reply-To: <20121022150706.GD70741@FreeBSD.org> References: <201210220118.q9M1Ifh5098857@svn.freebsd.org> <20121022150706.GD70741@FreeBSD.org> Date: Mon, 22 Oct 2012 09:42:42 -0700 Message-ID: Subject: Re: svn commit: r241823 - in head: . etc etc/atf etc/mtree lib lib/atf lib/atf/libatf-c lib/atf/libatf-c++ libexec libexec/atf libexec/atf/atf-check share share/atf share/doc share/doc/atf share/exampl... From: Garrett Cooper To: Gleb Smirnoff Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 16:42:44 -0000 On Mon, Oct 22, 2012 at 8:07 AM, Gleb Smirnoff wrote: > On Mon, Oct 22, 2012 at 01:18:41AM +0000, Marcel Moolenaar wrote: > M> Tinderbox breakages that are the result of this commit are entirely > M> the committer's fault -- in other words: buildworld testing on amd64 > M> only. > > Taking into account the fact that last couple of weeks head was usually > not buildable rather than buildable, I strongly disappreciate this. > > It looks to me as we are again treating head/ as a pile of stuff, > not as an operating system one can install and use. > > Now that we have a big choice of VCSes: svn user branches, git and > perforce, why isn't it possible to settle things in private branch > and only then commit them to the head/? I had been checking in changes to p4 over the last 4 months and then I ditched it for a local svn checkout when preparing the final patch that I sent to Marcel; I had run the patch in svn in two different sets of VMs in a make tinderbox manner several times. All but a handful of non-build critical items made it into this commit, and the only breakage that was present was accidental and affected ATF runtime. Maintaining all these moving pieces has proved challenging (esp. because I lack the scripts to track all of the changes that I had at IronPort with p4), and even then tracking new files in p4 is entertaining compared to svn, git, etc. This unnecessary complexity plus the fact that one needs p4 in order to collaborate with the changes I'm working on is the primary reason why I'm ditching it for git. The only breakage that's occurring now we've found is people using clang/libc++ (and libc++ looks like it has bugs that would have been caught with C++ applications written in a C++ standards-compliant manner) and various optimization levels which would not have raised red flags with make tinderbox in the first place. If there was a widespread (gcc and/or standard compiler/linker flags) issue with the build a) we would have seen it be now in the tinderbox emails and b) I would have CCed the current set of mailing lists so the issue would have been resolved quickly. The fact that it wasn't caught illustrates the fact that although we're trying to pilot clang as the default compiler by next month, there's a huge gap in required testing for commits. Looking forward, the major items for ATF have been committed. The rest of the patches which will be committed will be considerably smaller, targeted to specific components, and [for the most part, minus test integration in the tinderbox builds which will only be done after extensively testing is performed] will not affect the standard build process. Thank you for the concern though and I understand where you're coming from. -Garrett From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 16:10: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 C850412E; Mon, 22 Oct 2012 16:10:29 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail.sippysoft.com (hub.sippysoft.com [174.36.24.17]) by mx1.freebsd.org (Postfix) with ESMTP id 97AE58FC12; Mon, 22 Oct 2012 16:10:29 +0000 (UTC) Received: from s173-180-43-49.bc.hsia.telus.net ([173.180.43.49] helo=[192.168.22.32]) by mail.sippysoft.com with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.80 (FreeBSD)) (envelope-from ) id 1TQKa7-000Dh9-4F; Mon, 22 Oct 2012 09:10:23 -0700 Message-ID: <50856FE9.1020807@FreeBSD.org> Date: Mon, 22 Oct 2012 09:10:17 -0700 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: svn commit: r241625 - head/usr.sbin/cron/cron References: <201210170044.q9H0iZHo055977@svn.freebsd.org> <20121017174814.GN35915@deviant.kiev.zoral.com.ua> <507F0FF8.3090602@FreeBSD.org> <20121017201811.GO35915@deviant.kiev.zoral.com.ua> In-Reply-To: <20121017201811.GO35915@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: sobomax@sippysoft.com X-ssp-trusted: yes X-Mailman-Approved-At: Mon, 22 Oct 2012 16:49:58 +0000 Cc: Ian Lepore , Adrian Chadd , src-committers@freebsd.org, Garrett Cooper , svn-src-all@freebsd.org, Pedro Giffuni , Bruce Evans , svn-src-head@freebsd.org, Xin Li X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 16:10:29 -0000 Guys, The latest version of the patch against current HEAD is available here: http://sobomax.sippysoft.com/cron.diff Any comments/suggestions are appreciated. This version should default to previous behaviour of waking up every 60 seconds unless there is @every_second entry in the cron. Konstantin, can you please put it for testing to your boxes? Please make sure to do `make clean' after applying it, as libcron is not listed as a dependency for cron, so it's possible that some changes may not be picked up. Thanks! -Maxim On 10/17/2012 1:18 PM, Konstantin Belousov wrote: > On Wed, Oct 17, 2012 at 01:07:20PM -0700, Maxim Sobolev wrote: >> On 10/17/2012 10:48 AM, Konstantin Belousov wrote: >>> The cron daemon in HEAD is not functional, i.e. no jobs are executed >>> at all. Reverting r241625 r241618 r241576 gives me the expected behaviour. >>> >>> P.S. I do not remember a single commit from you which did not failed on >>> tinderbox, or was not found buggy later. >> >> Should be fixed already in the latest HEAD. Please check and let me know >> if you still have some issues (send crontab entry which is not getting >> executed). The particular issue has been fixed in the r241618. > > Well, as I noted above, I had r241618 applied, since I needed to revert it. > For me, neither the standard entries from /etc/crontab, nor the following > user crontab: > * * * * * /usr/bin/limits -a >/tmp/1.txt > are not executing. In particular, the /tmp/1.txt file was not created, > and the cron.log was empty. > > As I said, a reversal of all three commits makes the cron(8) operate > correctly. > From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 16:35: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 05F26BDC for ; Mon, 22 Oct 2012 16:35:40 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by mx1.freebsd.org (Postfix) with ESMTP id B790E8FC17 for ; Mon, 22 Oct 2012 16:35:39 +0000 (UTC) Received: by mail-pa0-f54.google.com with SMTP id bi1so2137247pad.13 for ; Mon, 22 Oct 2012 09:35:39 -0700 (PDT) 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=gKDT/L52bQf3IjBTQWpDjpQcUcYxY/DQzvUR/YoGWkg=; b=cD//7OLC7H1XZYaudyHgHFFJDnPhEJUqIc0oeoKRlyk9INsYlEbZflCd0ONV+n3efv ONKmCOHe/T1CR4LdepKIgcVIEZlNvN+UtqEv2COChxobDDPpx/WAny4llaNaXfCfl4dm tA3EKFnkvTLPnmC9sHaDLzmIJSTGb3Ww2Z9RU= 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:cc:content-type :x-gm-message-state; bh=gKDT/L52bQf3IjBTQWpDjpQcUcYxY/DQzvUR/YoGWkg=; b=KlTdVVnRuwBA3legVYZMA79Et5wLDkrQJwIWJ+DKJe9DVyNFI1HnbpDscpFw4qwHMi 6kN+kZOUH/6bIfLVoVz/hgcBdU7orvhzQNeuoWt32LohX2eSrM3skTuHqxTwNjQeOZhd PWrPYpIT7MNtpg3o6IIGrhOYfoy1rBHCzpIDPKIQG+ABL4WuRxJOqNhEH0JdAI0h4/qW nxUAsPK8B/NTFff8V+opNEIKYu3G/6vVlrC7yWZCVkz7nkuKaD0sTSQD+s4cbqm25fJQ qc/1iOeXwLtX9J9FJ/PD7GkJv6ra1weCqavghbc5WjybAeI4v64IIKyFi5YSNYSGlkNo Zjqg== Received: by 10.68.209.170 with SMTP id mn10mr31806262pbc.11.1350923739301; Mon, 22 Oct 2012 09:35:39 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.66.161.163 with HTTP; Mon, 22 Oct 2012 09:35:09 -0700 (PDT) In-Reply-To: <50856FE9.1020807@FreeBSD.org> References: <201210170044.q9H0iZHo055977@svn.freebsd.org> <20121017174814.GN35915@deviant.kiev.zoral.com.ua> <507F0FF8.3090602@FreeBSD.org> <20121017201811.GO35915@deviant.kiev.zoral.com.ua> <50856FE9.1020807@FreeBSD.org> From: Eitan Adler Date: Mon, 22 Oct 2012 12:35:09 -0400 X-Google-Sender-Auth: IBxTJds8AlfV6TrN4GoPo_nnRTU Message-ID: Subject: Re: svn commit: r241625 - head/usr.sbin/cron/cron To: Maxim Sobolev Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQm90+BzRaRGoxy9OTbKnz1Op/NYzsX9ydjxaGqUXN50ilQO4zQ4k9wIgRwAY0qZoTM5lqrg X-Mailman-Approved-At: Mon, 22 Oct 2012 16:51:03 +0000 Cc: Ian Lepore , Adrian Chadd , src-committers@freebsd.org, Garrett Cooper , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Pedro Giffuni , Bruce Evans , Konstantin Belousov , Xin Li X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 16:35:40 -0000 On 22 October 2012 12:10, Maxim Sobolev wrote: > Please make > sure to do `make clean' after applying it, as libcron is not listed as a > dependency for cron, so it's possible that some changes may not be picked > up. Why? Can this be fixed if this is not intended? -- Eitan Adler Source & Ports committer X11, Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 16:42: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 13DD8D9D; Mon, 22 Oct 2012 16:42:03 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail.sippysoft.com (hub.sippysoft.com [174.36.24.17]) by mx1.freebsd.org (Postfix) with ESMTP id BF8288FC0A; Mon, 22 Oct 2012 16:42:01 +0000 (UTC) Received: from s173-180-43-49.bc.hsia.telus.net ([173.180.43.49] helo=[192.168.22.32]) by mail.sippysoft.com with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.80 (FreeBSD)) (envelope-from ) id 1TQL4i-000Doy-Kp; Mon, 22 Oct 2012 09:42:00 -0700 Message-ID: <50857751.9040604@FreeBSD.org> Date: Mon, 22 Oct 2012 09:41:53 -0700 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: Eitan Adler Subject: Re: svn commit: r241625 - head/usr.sbin/cron/cron References: <201210170044.q9H0iZHo055977@svn.freebsd.org> <20121017174814.GN35915@deviant.kiev.zoral.com.ua> <507F0FF8.3090602@FreeBSD.org> <20121017201811.GO35915@deviant.kiev.zoral.com.ua> <50856FE9.1020807@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: sobomax@sippysoft.com X-ssp-trusted: yes X-Mailman-Approved-At: Mon, 22 Oct 2012 16:51:40 +0000 Cc: Ian Lepore , Adrian Chadd , src-committers@freebsd.org, Garrett Cooper , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Pedro Giffuni , Bruce Evans , Konstantin Belousov , Xin Li X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 16:42:03 -0000 On 10/22/2012 9:35 AM, Eitan Adler wrote: > Why? Can this be fixed if this is not intended? Well, I see libcron in the DPADD for the cron(8), so I think as far as normal buildworld is concerned things are good. It's just that if you build the cron only manually, it's not recompiled automatically. Maybe one need to do make depend or something. -Maxim [sobomax@pioneer ~/projects/FreeBSD/head/usr.sbin/cron]$ make ===> lib (all) Warning: Object directory not changed from original /usr/home/sobomax/projects/FreeBSD/head/usr.sbin/cron/lib ===> cron (all) Warning: Object directory not changed from original /usr/home/sobomax/projects/FreeBSD/head/usr.sbin/cron/cron ===> crontab (all) Warning: Object directory not changed from original /usr/home/sobomax/projects/FreeBSD/head/usr.sbin/cron/crontab [sobomax@pioneer ~/projects/FreeBSD/head/usr.sbin/cron]$ touch lib/entry.c [sobomax@pioneer ~/projects/FreeBSD/head/usr.sbin/cron]$ make ===> lib (all) Warning: Object directory not changed from original /usr/home/sobomax/projects/FreeBSD/head/usr.sbin/cron/lib cc -O2 -pipe -I/usr/home/sobomax/projects/FreeBSD/head/usr.sbin/cron/lib/../cron -DLOGIN_CAP -DPAM -std=gnu99 -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign -c entry.c building static cron library ranlib libcron.a ===> cron (all) Warning: Object directory not changed from original /usr/home/sobomax/projects/FreeBSD/head/usr.sbin/cron/cron ===> crontab (all) Warning: Object directory not changed from original /usr/home/sobomax/projects/FreeBSD/head/usr.sbin/cron/crontab [sobomax@pioneer ~/projects/FreeBSD/head/usr.sbin/cron]$ From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 17:13: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 E59ACB30; Mon, 22 Oct 2012 17:13:15 +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 C92448FC14; Mon, 22 Oct 2012 17:13: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 q9MHDFvE053801; Mon, 22 Oct 2012 17:13:15 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MHDFo6053799; Mon, 22 Oct 2012 17:13:15 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210221713.q9MHDFo6053799@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 17:13:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241893 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 17:13:16 -0000 Author: eadler Date: Mon Oct 22 17:13:15 2012 New Revision: 241893 URL: http://svn.freebsd.org/changeset/base/241893 Log: Update re members to reality MFC after: 3 days Modified: head/share/misc/organization.dot Modified: head/share/misc/organization.dot ============================================================================== --- head/share/misc/organization.dot Mon Oct 22 15:04:23 2012 (r241892) +++ head/share/misc/organization.dot Mon Oct 22 17:13:15 2012 (r241893) @@ -32,7 +32,7 @@ doceng [label="Documentation Engineering portscommitters [label="Ports Committers\nports-committers@FreeBSD.org"] portmgr [label="Port Management Team\nportmgr@FreeBSD.org\ntabthorpe, marcus, bapt, beat,\nerwin, linimon, pav,\nitetcu, miwi"] portmgrsecretary [label="Port Management Team Secretary\nportmgr-secretary@FreeBSD.org\ntabthorpe"] -re [label="Primary Release Engineering Team\nre@FreeBSD.org\nkib, blackend, jpaetzel, hrs, kensmith,\nrwatson, bz"] +re [label="Primary Release Engineering Team\nre@FreeBSD.org\nkib, blackend, jpaetzel, hrs, kensmith"] secteam [label="Security Team\nsecteam@FreeBSD.org\nsimon, qingli, delphij,\nremko, philip, stas, cperciva,\ncsjp, rwatson, miwi, bz"] portssecteam [label="Ports Security Team\nports-secteam@FreeBSD.org\nmiwi, rea, swills, wxs,\njgh, sbz, eadler, zi, remko, simon"] secteamsecretary [label="Security Team Secretary\nsecteam-secretary@FreeBSD.org\nremko"] From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 17:34: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 F29C54E9; Mon, 22 Oct 2012 17:34:16 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from ns1.jnielsen.net (secure.freebsdsolutions.net [69.55.234.48]) by mx1.freebsd.org (Postfix) with ESMTP id CDC898FC17; Mon, 22 Oct 2012 17:34:16 +0000 (UTC) Received: from [10.10.1.32] (office.betterlinux.com [199.58.199.60]) (authenticated bits=0) by ns1.jnielsen.net (8.14.4/8.14.4) with ESMTP id q9MHY1kT095087 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Mon, 22 Oct 2012 13:34:01 -0400 (EDT) (envelope-from lists@jnielsen.net) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: svn commit: r241845 - head/games/fortune/datfiles From: John Nielsen In-Reply-To: <201210220300.q9M30h4x016455@svn.freebsd.org> Date: Mon, 22 Oct 2012 11:34:07 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201210220300.q9M30h4x016455@svn.freebsd.org> To: Eitan Adler X-Mailer: Apple Mail (2.1499) X-DCC-sonic.net-Metrics: ns1.jnielsen.net 1117; Body=4 Fuz1=4 Fuz2=4 X-Virus-Scanned: clamav-milter 0.97.5 at ns1.jnielsen.net X-Virus-Status: Clean Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 17:34:17 -0000 On Oct 21, 2012, at 9:00 PM, Eitan Adler wrote: > Author: eadler > Date: Mon Oct 22 03:00:43 2012 > New Revision: 241845 > URL: http://svn.freebsd.org/changeset/base/241845 >=20 > Log: > Sysinstall has been removed from base. >=20 > Approved by: cperciva >=20 > Modified: > head/games/fortune/datfiles/freebsd-tips >=20 > Modified: head/games/fortune/datfiles/freebsd-tips > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/games/fortune/datfiles/freebsd-tips Mon Oct 22 03:00:37 2012 = (r241844) > +++ head/games/fortune/datfiles/freebsd-tips Mon Oct 22 03:00:43 2012 = (r241845) > @@ -40,7 +40,7 @@ Having trouble using fetch through a fir > variable FTP_PASSIVE_MODE to yes, and see fetch(3) for more details. > % > If other operating systems have damaged your Master Boot Record, you = can > -reinstall it either with /usr/sbin/sysinstall or with boot0cfg(8). = See > +reinstall it either with boot0cfg(8). See Need to also drop 'either' from the above sentence: "reinstall it with = boot0cfg(8)." From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 17:47: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 4AA1CC27; Mon, 22 Oct 2012 17:47:38 +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 314398FC14; Mon, 22 Oct 2012 17:47: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 q9MHlcOb060605; Mon, 22 Oct 2012 17:47:38 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MHlbdr060603; Mon, 22 Oct 2012 17:47:37 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201210221747.q9MHlbdr060603@svn.freebsd.org> From: Dimitry Andric Date: Mon, 22 Oct 2012 17:47:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241895 - head/contrib/llvm/lib/Target/X86/MCTargetDesc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 17:47:38 -0000 Author: dim Date: Mon Oct 22 17:47:37 2012 New Revision: 241895 URL: http://svn.freebsd.org/changeset/base/241895 Log: Pull in r165878 from upstream llvm trunk: X86: Disable long nops for all cpus prior to pentiumpro/i686. This is the safest approach for now. If you think long nops matter a lot for performance, compile with -march=i686 or higher. :) MFC after: 3 days Modified: head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp Modified: head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp ============================================================================== --- head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp Mon Oct 22 17:23:32 2012 (r241894) +++ head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp Mon Oct 22 17:47:37 2012 (r241895) @@ -307,7 +307,9 @@ bool X86AsmBackend::writeNopData(uint64_ }; // This CPU doesnt support long nops. If needed add more. - if (CPU == "geode") { + // FIXME: Can we get this from the subtarget somehow? + if (CPU == "generic" || CPU == "i386" || CPU == "i486" || CPU == "i586" || + CPU == "pentium" || CPU == "pentium-mmx" || CPU == "geode") { for (uint64_t i = 0; i < Count; ++i) OW->Write8(0x90); return true; From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 17:50: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 22FB5EEA; Mon, 22 Oct 2012 17:50: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 06CF48FC0A; Mon, 22 Oct 2012 17:50: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 q9MHotND061608; Mon, 22 Oct 2012 17:50:55 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MHot26061585; Mon, 22 Oct 2012 17:50:55 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201210221750.q9MHot26061585@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 22 Oct 2012 17:50:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241896 - in head: . cddl/contrib/opensolaris/lib/libzpool/common/sys share/man/man9 sys/cam/ctl sys/cddl/compat/opensolaris/kern sys/cddl/compat/opensolaris/sys sys/cddl/contrib/openso... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 17:50:56 -0000 Author: kib Date: Mon Oct 22 17:50:54 2012 New Revision: 241896 URL: http://svn.freebsd.org/changeset/base/241896 Log: Remove the support for using non-mpsafe filesystem modules. In particular, do not lock Giant conditionally when calling into the filesystem module, remove the VFS_LOCK_GIANT() and related macros. Stop handling buffers belonging to non-mpsafe filesystems. The VFS_VERSION is bumped to indicate the interface change which does not result in the interface signatures changes. Conducted and reviewed by: attilio Tested by: pho Deleted: head/share/man/man9/VFS_LOCK_GIANT.9 Modified: head/ObsoleteFiles.inc head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h head/share/man/man9/Makefile head/share/man/man9/namei.9 head/sys/cam/ctl/ctl_backend_block.c head/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c head/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c head/sys/cddl/compat/opensolaris/sys/vnode.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c head/sys/compat/linprocfs/linprocfs.c head/sys/compat/linux/linux_file.c head/sys/compat/linux/linux_misc.c head/sys/compat/ndis/subr_ndis.c head/sys/compat/svr4/svr4_misc.c head/sys/conf/NOTES head/sys/conf/options head/sys/dev/hwpmc/hwpmc_mod.c head/sys/dev/md/md.c head/sys/dev/nand/nandsim_swap.c head/sys/dev/xen/blkback/blkback.c head/sys/fs/nfs/nfs_commonport.c head/sys/fs/nfsserver/nfs_nfsdport.c head/sys/fs/procfs/procfs_map.c head/sys/fs/unionfs/union_subr.c head/sys/geom/geom_vfs.c head/sys/geom/journal/g_journal.c head/sys/i386/ibcs2/ibcs2_misc.c head/sys/kern/imgact_elf.c head/sys/kern/kern_acct.c head/sys/kern/kern_alq.c head/sys/kern/kern_ctf.c head/sys/kern/kern_descrip.c head/sys/kern/kern_exec.c head/sys/kern/kern_exit.c head/sys/kern/kern_gzio.c head/sys/kern/kern_jail.c head/sys/kern/kern_ktrace.c head/sys/kern/kern_linker.c head/sys/kern/kern_proc.c head/sys/kern/kern_sig.c head/sys/kern/link_elf.c head/sys/kern/link_elf_obj.c head/sys/kern/sys_process.c head/sys/kern/uipc_syscalls.c head/sys/kern/uipc_usrreq.c head/sys/kern/vfs_acl.c head/sys/kern/vfs_aio.c head/sys/kern/vfs_bio.c head/sys/kern/vfs_cache.c head/sys/kern/vfs_default.c head/sys/kern/vfs_extattr.c head/sys/kern/vfs_init.c head/sys/kern/vfs_lookup.c head/sys/kern/vfs_mount.c head/sys/kern/vfs_mountroot.c head/sys/kern/vfs_subr.c head/sys/kern/vfs_syscalls.c head/sys/kern/vfs_vnops.c head/sys/nfsserver/nfs.h head/sys/nfsserver/nfs_serv.c head/sys/nfsserver/nfs_srvsubs.c head/sys/nlm/nlm_prot_impl.c head/sys/security/audit/audit_arg.c head/sys/security/audit/audit_syscalls.c head/sys/security/audit/audit_worker.c head/sys/security/mac/mac_process.c head/sys/security/mac/mac_syscalls.c head/sys/sys/buf.h head/sys/sys/bufobj.h head/sys/sys/mount.h head/sys/sys/namei.h head/sys/ufs/ffs/ffs_alloc.c head/sys/ufs/ffs/ffs_softdep.c head/sys/ufs/ufs/ufs_quota.c head/sys/vm/vm_fault.c head/sys/vm/vm_mmap.c head/sys/vm/vm_object.c head/sys/vm/vm_pageout.c head/sys/vm/vnode_pager.c Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Mon Oct 22 17:47:37 2012 (r241895) +++ head/ObsoleteFiles.inc Mon Oct 22 17:50:54 2012 (r241896) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20121022: VFS_LOCK_GIANT elimination +OLD_FILES+=usr/share/man/man9/VFS_LOCK_GIANT.9.gz # 20121004: remove incomplete unwind.h OLD_FILES+=usr/include/clang/3.2/unwind.h # 20120908: pf cleanup Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Mon Oct 22 17:47:37 2012 (r241895) +++ head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Mon Oct 22 17:50:54 2012 (r241896) @@ -430,14 +430,6 @@ extern int fop_getattr(vnode_t *vp, vatt #define vn_lock(vp, type) #define VOP_UNLOCK(vp, type) -#ifdef VFS_LOCK_GIANT -#undef VFS_LOCK_GIANT -#endif -#define VFS_LOCK_GIANT(mp) 0 -#ifdef VFS_UNLOCK_GIANT -#undef VFS_UNLOCK_GIANT -#endif -#define VFS_UNLOCK_GIANT(vfslocked) extern int vn_open(char *path, int x1, int oflags, int mode, vnode_t **vpp, int x2, int x3); Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Mon Oct 22 17:47:37 2012 (r241895) +++ head/share/man/man9/Makefile Mon Oct 22 17:50:54 2012 (r241896) @@ -280,7 +280,6 @@ MAN= accept_filter.9 \ vfs_getnewfsid.9 \ vfs_getopt.9 \ vfs_getvfs.9 \ - VFS_LOCK_GIANT.9 \ VFS_MOUNT.9 \ vfs_mount.9 \ vfs_mountedfrom.9 \ @@ -1413,7 +1412,6 @@ MLINKS+=vfs_getopt.9 vfs_copyopt.9 \ vfs_getopt.9 vfs_setopt.9 \ vfs_getopt.9 vfs_setopt_part.9 \ vfs_getopt.9 vfs_setopts.9 -MLINKS+=VFS_LOCK_GIANT.9 VFS_UNLOCK_GIANT.9 MLINKS+=vhold.9 vdrop.9 \ vhold.9 vdropl.9 \ vhold.9 vholdl.9 Modified: head/share/man/man9/namei.9 ============================================================================== --- head/share/man/man9/namei.9 Mon Oct 22 17:47:37 2012 (r241895) +++ head/share/man/man9/namei.9 Mon Oct 22 17:50:54 2012 (r241896) @@ -168,19 +168,6 @@ This flag allows the function to return the parent (directory) vnode in an unlocked state. The parent vnode must be released separately by using .Xr vrele 9 . -.It Dv MPSAFE -With this flag set, -.Fn namei -will conditionally acquire -.Va Giant -if it is required by a traversed file system. -MPSAFE callers should pass the results of -.Fn NDHASGIANT -to -.Xr VFS_UNLOCK_GIANT -in order to conditionally release -.Va Giant -if necessary. .It Dv NOCACHE Avoid .Fn namei @@ -354,7 +341,6 @@ An attempt is made to modify a file or d .Xr uio 9 , .Xr uma 9 , .Xr VFS 9 , -.Xr VFS_UNLOCK_GIANT 9 , .Xr vnode 9 , .Xr vput 9 , .Xr vref 9 Modified: head/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_block.c Mon Oct 22 17:47:37 2012 (r241895) +++ head/sys/cam/ctl/ctl_backend_block.c Mon Oct 22 17:50:54 2012 (r241896) @@ -594,14 +594,12 @@ ctl_be_block_flush_file(struct ctl_be_bl { union ctl_io *io; struct mount *mountpoint; - int vfs_is_locked, error, lock_flags; + int error, lock_flags; DPRINTF("entered\n"); io = beio->io; - vfs_is_locked = VFS_LOCK_GIANT(be_lun->vn->v_mount); - (void) vn_start_write(be_lun->vn, &mountpoint, V_WAIT); if (MNT_SHARED_WRITES(mountpoint) @@ -621,8 +619,6 @@ ctl_be_block_flush_file(struct ctl_be_bl vn_finished_write(mountpoint); - VFS_UNLOCK_GIANT(vfs_is_locked); - if (error == 0) ctl_set_success(&io->scsiio); else { @@ -648,7 +644,7 @@ ctl_be_block_dispatch_file(struct ctl_be union ctl_io *io; struct uio xuio; struct iovec *xiovec; - int vfs_is_locked, flags; + int flags; int error, i; DPRINTF("entered\n"); @@ -681,7 +677,6 @@ ctl_be_block_dispatch_file(struct ctl_be xiovec->iov_len = beio->sg_segs[i].len; } - vfs_is_locked = VFS_LOCK_GIANT(be_lun->vn->v_mount); if (beio->bio_cmd == BIO_READ) { vn_lock(be_lun->vn, LK_SHARED | LK_RETRY); @@ -754,7 +749,6 @@ ctl_be_block_dispatch_file(struct ctl_be vn_finished_write(mountpoint); } - VFS_UNLOCK_GIANT(vfs_is_locked); /* * If we got an error, set the sense data to "MEDIUM ERROR" and @@ -1478,7 +1472,6 @@ ctl_be_block_close(struct ctl_be_block_l DROP_GIANT(); if (be_lun->vn) { int flags = FREAD | FWRITE; - int vfs_is_locked = 0; switch (be_lun->dev_type) { case CTL_BE_BLOCK_DEV: @@ -1490,7 +1483,6 @@ ctl_be_block_close(struct ctl_be_block_l } break; case CTL_BE_BLOCK_FILE: - vfs_is_locked = VFS_LOCK_GIANT(be_lun->vn->v_mount); break; case CTL_BE_BLOCK_NONE: default: @@ -1505,7 +1497,6 @@ ctl_be_block_close(struct ctl_be_block_l case CTL_BE_BLOCK_DEV: break; case CTL_BE_BLOCK_FILE: - VFS_UNLOCK_GIANT(vfs_is_locked); if (be_lun->backend.file.cred != NULL) { crfree(be_lun->backend.file.cred); be_lun->backend.file.cred = NULL; @@ -1529,7 +1520,6 @@ ctl_be_block_open(struct ctl_be_block_so struct nameidata nd; int flags; int error; - int vfs_is_locked; /* * XXX KDM allow a read-only option? @@ -1587,8 +1577,6 @@ ctl_be_block_open(struct ctl_be_block_so return (error); } - vfs_is_locked = NDHASGIANT(&nd); - NDFREE(&nd, NDF_ONLY_PNBUF); be_lun->vn = nd.ni_vp; @@ -1604,7 +1592,6 @@ ctl_be_block_open(struct ctl_be_block_so "%s is not a disk or file", be_lun->dev_path); } VOP_UNLOCK(be_lun->vn, 0); - VFS_UNLOCK_GIANT(vfs_is_locked); if (error != 0) { ctl_be_block_close(be_lun); @@ -2090,7 +2077,7 @@ ctl_be_block_modify(struct ctl_be_block_ { struct ctl_lun_modify_params *params; struct ctl_be_block_lun *be_lun; - int vfs_is_locked, error; + int error; params = &req->reqdata.modify; @@ -2120,7 +2107,6 @@ ctl_be_block_modify(struct ctl_be_block_ } } - 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) @@ -2129,7 +2115,6 @@ ctl_be_block_modify(struct ctl_be_block_ 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; Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c ============================================================================== --- head/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c Mon Oct 22 17:47:37 2012 (r241895) +++ head/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c Mon Oct 22 17:50:54 2012 (r241896) @@ -69,7 +69,7 @@ kobj_open_file_vnode(const char *file) struct thread *td = curthread; struct filedesc *fd; struct nameidata nd; - int error, flags, vfslocked; + int error, flags; fd = td->td_proc->p_fd; FILEDESC_XLOCK(fd); @@ -84,15 +84,13 @@ kobj_open_file_vnode(const char *file) FILEDESC_XUNLOCK(fd); flags = FREAD | O_NOFOLLOW; - NDINIT(&nd, LOOKUP, MPSAFE, UIO_SYSSPACE, file, td); + NDINIT(&nd, LOOKUP, 0, UIO_SYSSPACE, file, td); error = vn_open_cred(&nd, &flags, 0, 0, curthread->td_ucred, NULL); if (error != 0) return (NULL); - vfslocked = NDHASGIANT(&nd); NDFREE(&nd, NDF_ONLY_PNBUF); /* We just unlock so we hold a reference. */ VOP_UNLOCK(nd.ni_vp, 0); - VFS_UNLOCK_GIANT(vfslocked); return (nd.ni_vp); } @@ -130,15 +128,13 @@ kobj_get_filesize_vnode(struct _buf *fil { struct vnode *vp = file->ptr; struct vattr va; - int error, vfslocked; + int error; - vfslocked = VFS_LOCK_GIANT(vp->v_mount); vn_lock(vp, LK_SHARED | LK_RETRY); error = VOP_GETATTR(vp, &va, curthread->td_ucred); VOP_UNLOCK(vp, 0); if (error == 0) *size = (uint64_t)va.va_size; - VFS_UNLOCK_GIANT(vfslocked); return (error); } @@ -171,7 +167,7 @@ kobj_read_file_vnode(struct _buf *file, struct thread *td = curthread; struct uio auio; struct iovec aiov; - int error, vfslocked; + int error; bzero(&aiov, sizeof(aiov)); bzero(&auio, sizeof(auio)); @@ -187,11 +183,9 @@ kobj_read_file_vnode(struct _buf *file, auio.uio_resid = size; auio.uio_td = td; - vfslocked = VFS_LOCK_GIANT(vp->v_mount); vn_lock(vp, LK_SHARED | LK_RETRY); error = VOP_READ(vp, &auio, IO_UNIT | IO_SYNC, td->td_ucred); VOP_UNLOCK(vp, 0); - VFS_UNLOCK_GIANT(vfslocked); return (error != 0 ? -1 : size - auio.uio_resid); } @@ -221,14 +215,7 @@ void kobj_close_file(struct _buf *file) { - if (file->mounted) { - struct vnode *vp = file->ptr; - struct thread *td = curthread; - int vfslocked; - - vfslocked = VFS_LOCK_GIANT(vp->v_mount); - vn_close(vp, FREAD, td->td_ucred, td); - VFS_UNLOCK_GIANT(vfslocked); - } + if (file->mounted) + vn_close(file->ptr, FREAD, curthread->td_ucred, curthread); kmem_free(file, sizeof(*file)); } Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c ============================================================================== --- head/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c Mon Oct 22 17:47:37 2012 (r241895) +++ head/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c Mon Oct 22 17:50:54 2012 (r241896) @@ -54,7 +54,7 @@ lookupnameat(char *dirname, enum uio_seg vref(startvp); ltype = VOP_ISLOCKED(startvp); VOP_UNLOCK(startvp, 0); - NDINIT_ATVP(&nd, LOOKUP, LOCKLEAF | MPSAFE | follow, seg, dirname, + NDINIT_ATVP(&nd, LOOKUP, LOCKLEAF | follow, seg, dirname, startvp, curthread); error = namei(&nd); *compvpp = nd.ni_vp; Modified: head/sys/cddl/compat/opensolaris/sys/vnode.h ============================================================================== --- head/sys/cddl/compat/opensolaris/sys/vnode.h Mon Oct 22 17:47:37 2012 (r241895) +++ head/sys/cddl/compat/opensolaris/sys/vnode.h Mon Oct 22 17:50:54 2012 (r241896) @@ -193,7 +193,7 @@ vn_openat(char *pnamep, enum uio_seg seg if (startvp != NULL) vref(startvp); - NDINIT_ATVP(&nd, operation, MPSAFE, UIO_SYSSPACE, pnamep, startvp, td); + NDINIT_ATVP(&nd, operation, 0, UIO_SYSSPACE, pnamep, startvp, td); filemode |= O_NOFOLLOW; error = vn_open_cred(&nd, &filemode, createmode, 0, td->td_ucred, NULL); NDFREE(&nd, NDF_ONLY_PNBUF); @@ -223,13 +223,12 @@ zfs_vn_rdwr(enum uio_rw rw, vnode_t *vp, ssize_t *residp) { struct thread *td = curthread; - int error, vfslocked; + int error; ssize_t resid; ASSERT(ioflag == 0); ASSERT(ulimit == RLIM64_INFINITY); - vfslocked = VFS_LOCK_GIANT(vp->v_mount); if (rw == UIO_WRITE) { ioflag = IO_SYNC; } else { @@ -237,7 +236,6 @@ zfs_vn_rdwr(enum uio_rw rw, vnode_t *vp, } error = vn_rdwr(rw, vp, base, len, offset, seg, ioflag, cr, NOCRED, &resid, td); - VFS_UNLOCK_GIANT(vfslocked); if (residp != NULL) *residp = (ssize_t)resid; return (error); @@ -249,11 +247,10 @@ static __inline int zfs_vop_fsync(vnode_t *vp, int flag, cred_t *cr) { struct mount *mp; - int error, vfslocked; + int error; ASSERT(flag == FSYNC); - vfslocked = VFS_LOCK_GIANT(vp->v_mount); if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0) goto drop; vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); @@ -261,7 +258,6 @@ zfs_vop_fsync(vnode_t *vp, int flag, cre VOP_UNLOCK(vp, 0); vn_finished_write(mp); drop: - VFS_UNLOCK_GIANT(vfslocked); return (error); } #define VOP_FSYNC(vp, flag, cr, ct) zfs_vop_fsync((vp), (flag), (cr)) @@ -269,14 +265,12 @@ drop: static __inline int zfs_vop_close(vnode_t *vp, int flag, int count, offset_t offset, cred_t *cr) { - int error, vfslocked; + int error; ASSERT(count == 1); ASSERT(offset == 0); - vfslocked = VFS_LOCK_GIANT(vp->v_mount); error = vn_close(vp, flag, cr, curthread); - VFS_UNLOCK_GIANT(vfslocked); return (error); } #define VOP_CLOSE(vp, oflags, count, offset, cr, ct) \ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c Mon Oct 22 17:47:37 2012 (r241895) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c Mon Oct 22 17:50:54 2012 (r241896) @@ -54,7 +54,7 @@ vdev_file_open(vdev_t *vd, uint64_t *psi vdev_file_t *vf; vnode_t *vp; vattr_t vattr; - int error, vfslocked; + int error; /* * We must have a pathname, and it must be absolute. @@ -114,11 +114,9 @@ skip_open: * Determine the physical size of the file. */ vattr.va_mask = AT_SIZE; - vfslocked = VFS_LOCK_GIANT(vp->v_mount); vn_lock(vp, LK_SHARED | LK_RETRY); error = VOP_GETATTR(vp, &vattr, kcred); VOP_UNLOCK(vp, 0); - VFS_UNLOCK_GIANT(vfslocked); if (error) { (void) VOP_CLOSE(vp, spa_mode(vd->vdev_spa), 1, 0, kcred, NULL); vd->vdev_stat.vs_aux = VDEV_AUX_OPEN_FAILED; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Oct 22 17:47:37 2012 (r241895) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Oct 22 17:50:54 2012 (r241896) @@ -1092,14 +1092,12 @@ zfs_get_done(zgd_t *zgd, int error) { znode_t *zp = zgd->zgd_private; objset_t *os = zp->z_zfsvfs->z_os; - int vfslocked; if (zgd->zgd_db) dmu_buf_rele(zgd->zgd_db, zgd); zfs_range_unlock(zgd->zgd_rl); - vfslocked = VFS_LOCK_GIANT(zp->z_zfsvfs->z_vfs); /* * Release the vnode asynchronously as we currently have the * txg stopped from syncing. @@ -1110,7 +1108,6 @@ zfs_get_done(zgd_t *zgd, int error) zil_add_block(zgd->zgd_zilog, zgd->zgd_bp); kmem_free(zgd, sizeof (zgd_t)); - VFS_UNLOCK_GIANT(vfslocked); } #ifdef DEBUG @@ -6337,7 +6334,7 @@ vop_getextattr { } flags = FREAD; - NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW | MPSAFE, UIO_SYSSPACE, attrname, + NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, attrname, xvp, td); error = vn_open_cred(&nd, &flags, 0, 0, ap->a_cred, NULL); vp = nd.ni_vp; @@ -6405,7 +6402,7 @@ vop_deleteextattr { return (error); } - NDINIT_ATVP(&nd, DELETE, NOFOLLOW | LOCKPARENT | LOCKLEAF | MPSAFE, + NDINIT_ATVP(&nd, DELETE, NOFOLLOW | LOCKPARENT | LOCKLEAF, UIO_SYSSPACE, attrname, xvp, td); error = namei(&nd); vp = nd.ni_vp; @@ -6472,7 +6469,7 @@ vop_setextattr { } flags = FFLAGS(O_WRONLY | O_CREAT); - NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW | MPSAFE, UIO_SYSSPACE, attrname, + NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, attrname, xvp, td); error = vn_open_cred(&nd, &flags, 0600, 0, ap->a_cred, NULL); vp = nd.ni_vp; @@ -6553,7 +6550,7 @@ vop_listextattr { return (error); } - NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW | LOCKLEAF | LOCKSHARED | MPSAFE, + NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW | LOCKLEAF | LOCKSHARED, UIO_SYSSPACE, ".", xvp, td); error = namei(&nd); vp = nd.ni_vp; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Mon Oct 22 17:47:37 2012 (r241895) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Mon Oct 22 17:50:54 2012 (r241896) @@ -1404,7 +1404,6 @@ zfs_zinactive(znode_t *zp) vnode_t *vp = ZTOV(zp); zfsvfs_t *zfsvfs = zp->z_zfsvfs; uint64_t z_id = zp->z_id; - int vfslocked; ASSERT(zp->z_sa_hdl); @@ -1437,9 +1436,7 @@ zfs_zinactive(znode_t *zp) ZFS_OBJ_HOLD_EXIT(zfsvfs, z_id); ASSERT(vp->v_count == 0); vrecycle(vp); - vfslocked = VFS_LOCK_GIANT(zfsvfs->z_vfs); zfs_rmnode(zp); - VFS_UNLOCK_GIANT(vfslocked); return; } Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Mon Oct 22 17:47:37 2012 (r241895) +++ head/sys/compat/linprocfs/linprocfs.c Mon Oct 22 17:50:54 2012 (r241896) @@ -335,7 +335,7 @@ linprocfs_domtab(PFS_FILL_ARGS) int error; /* resolve symlinks etc. in the emulation tree prefix */ - NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, UIO_SYSSPACE, linux_emul_path, td); + NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, linux_emul_path, td); flep = NULL; error = namei(&nd); lep = linux_emul_path; @@ -343,7 +343,6 @@ linprocfs_domtab(PFS_FILL_ARGS) if (vn_fullpath(td, nd.ni_vp, &dlep, &flep) == 0) lep = dlep; vrele(nd.ni_vp); - VFS_UNLOCK_GIANT(NDHASGIANT(&nd)); } lep_len = strlen(lep); @@ -414,7 +413,7 @@ linprocfs_dopartitions(PFS_FILL_ARGS) int major, minor; /* resolve symlinks etc. in the emulation tree prefix */ - NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, UIO_SYSSPACE, linux_emul_path, td); + NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, linux_emul_path, td); flep = NULL; error = namei(&nd); lep = linux_emul_path; @@ -422,7 +421,6 @@ linprocfs_dopartitions(PFS_FILL_ARGS) if (vn_fullpath(td, nd.ni_vp, &dlep, &flep) == 0) lep = dlep; vrele(nd.ni_vp); - VFS_UNLOCK_GIANT(NDHASGIANT(&nd)); } lep_len = strlen(lep); @@ -1012,7 +1010,6 @@ linprocfs_doprocmaps(PFS_FILL_ARGS) int error; struct vnode *vp; struct vattr vat; - int locked; PROC_LOCK(p); error = p_candebug(td, p); @@ -1065,12 +1062,10 @@ linprocfs_doprocmaps(PFS_FILL_ARGS) VM_OBJECT_UNLOCK(obj); if (vp) { vn_fullpath(td, vp, &name, &freename); - locked = VFS_LOCK_GIANT(vp->v_mount); vn_lock(vp, LK_SHARED | LK_RETRY); VOP_GETATTR(vp, &vat, td->td_ucred); ino = vat.va_fileid; vput(vp); - VFS_UNLOCK_GIANT(locked); } } else { flags = 0; Modified: head/sys/compat/linux/linux_file.c ============================================================================== --- head/sys/compat/linux/linux_file.c Mon Oct 22 17:47:37 2012 (r241895) +++ head/sys/compat/linux/linux_file.c Mon Oct 22 17:50:54 2012 (r241896) @@ -337,7 +337,7 @@ getdents_common(struct thread *td, struc struct l_dirent64 *linux_dirent64; int buflen, error, eofflag, nbytes, justone; u_long *cookies = NULL, *cookiep; - int ncookies, vfslocked; + int ncookies; nbytes = args->count; if (nbytes == 1) { @@ -359,9 +359,7 @@ getdents_common(struct thread *td, struc off = foffset_lock(fp, 0); vp = fp->f_vnode; - vfslocked = VFS_LOCK_GIANT(vp->v_mount); if (vp->v_type != VDIR) { - VFS_UNLOCK_GIANT(vfslocked); foffset_unlock(fp, off, 0); fdrop(fp, td); return (EINVAL); @@ -521,7 +519,6 @@ out: free(cookies, M_TEMP); VOP_UNLOCK(vp, 0); - VFS_UNLOCK_GIANT(vfslocked); foffset_unlock(fp, off, 0); fdrop(fp, td); free(buf, M_TEMP); Modified: head/sys/compat/linux/linux_misc.c ============================================================================== --- head/sys/compat/linux/linux_misc.c Mon Oct 22 17:47:37 2012 (r241895) +++ head/sys/compat/linux/linux_misc.c Mon Oct 22 17:50:54 2012 (r241896) @@ -247,7 +247,7 @@ linux_uselib(struct thread *td, struct l char *library; ssize_t aresid; int error; - int locked, vfslocked; + int locked; LCONVPATHEXIST(td, args->library, &library); @@ -257,11 +257,10 @@ linux_uselib(struct thread *td, struct l #endif a_out = NULL; - vfslocked = 0; locked = 0; vp = NULL; - NDINIT(&ni, LOOKUP, ISOPEN | FOLLOW | LOCKLEAF | MPSAFE | AUDITVNODE1, + NDINIT(&ni, LOOKUP, ISOPEN | FOLLOW | LOCKLEAF | AUDITVNODE1, UIO_SYSSPACE, library, td); error = namei(&ni); LFREEPATH(library); @@ -269,7 +268,6 @@ linux_uselib(struct thread *td, struct l goto cleanup; vp = ni.ni_vp; - vfslocked = NDHASGIANT(&ni); NDFREE(&ni, NDF_ONLY_PNBUF); /* @@ -393,7 +391,6 @@ linux_uselib(struct thread *td, struct l */ locked = 0; VOP_UNLOCK(vp, 0); - VFS_UNLOCK_GIANT(vfslocked); /* * Check if file_offset page aligned. Currently we cannot handle @@ -463,10 +460,8 @@ linux_uselib(struct thread *td, struct l cleanup: /* Unlock vnode if needed */ - if (locked) { + if (locked) VOP_UNLOCK(vp, 0); - VFS_UNLOCK_GIANT(vfslocked); - } /* Release the temporary mapping. */ if (a_out) Modified: head/sys/compat/ndis/subr_ndis.c ============================================================================== --- head/sys/compat/ndis/subr_ndis.c Mon Oct 22 17:47:37 2012 (r241895) +++ head/sys/compat/ndis/subr_ndis.c Mon Oct 22 17:50:54 2012 (r241896) @@ -2741,7 +2741,7 @@ NdisOpenFile(status, filehandle, filelen char *afilename = NULL; struct thread *td = curthread; struct nameidata nd; - int flags, error, vfslocked; + int flags, error; struct vattr vat; struct vattr *vap = &vat; ndis_fh *fh; @@ -2821,7 +2821,7 @@ NdisOpenFile(status, filehandle, filelen if (td->td_proc->p_fd->fd_cdir == NULL) td->td_proc->p_fd->fd_cdir = rootvnode; - NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, UIO_SYSSPACE, path, td); + NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, path, td); flags = FREAD; error = vn_open(&nd, &flags, 0, NULL); @@ -2833,7 +2833,6 @@ NdisOpenFile(status, filehandle, filelen free(afilename, M_DEVBUF); return; } - vfslocked = NDHASGIANT(&nd); ExFreePool(path); @@ -2842,7 +2841,6 @@ NdisOpenFile(status, filehandle, filelen /* Get the file size. */ VOP_GETATTR(nd.ni_vp, vap, td->td_ucred); VOP_UNLOCK(nd.ni_vp, 0); - VFS_UNLOCK_GIANT(vfslocked); fh->nf_vp = nd.ni_vp; fh->nf_map = NULL; @@ -2862,7 +2860,7 @@ NdisMapFile(status, mappedbuffer, fileha struct thread *td = curthread; linker_file_t lf; caddr_t kldstart; - int error, vfslocked; + int error; ssize_t resid; struct vnode *vp; @@ -2903,10 +2901,8 @@ NdisMapFile(status, mappedbuffer, fileha } vp = fh->nf_vp; - vfslocked = VFS_LOCK_GIANT(vp->v_mount); error = vn_rdwr(UIO_READ, vp, fh->nf_map, fh->nf_maplen, 0, UIO_SYSSPACE, 0, td->td_ucred, NOCRED, &resid, td); - VFS_UNLOCK_GIANT(vfslocked); if (error) *status = NDIS_STATUS_FAILURE; @@ -2937,7 +2933,6 @@ NdisCloseFile(filehandle) { struct thread *td = curthread; ndis_fh *fh; - int vfslocked; struct vnode *vp; if (filehandle == NULL) @@ -2955,9 +2950,7 @@ NdisCloseFile(filehandle) if (fh->nf_type == NDIS_FH_TYPE_VFS) { vp = fh->nf_vp; - vfslocked = VFS_LOCK_GIANT(vp->v_mount); vn_close(vp, FREAD, td->td_ucred, td); - VFS_UNLOCK_GIANT(vfslocked); } fh->nf_vp = NULL; Modified: head/sys/compat/svr4/svr4_misc.c ============================================================================== --- head/sys/compat/svr4/svr4_misc.c Mon Oct 22 17:47:37 2012 (r241895) +++ head/sys/compat/svr4/svr4_misc.c Mon Oct 22 17:50:54 2012 (r241896) @@ -241,7 +241,7 @@ svr4_sys_getdents64(td, uap) struct iovec aiov; off_t off; struct svr4_dirent64 svr4_dirent; - int buflen, error, eofflag, nbytes, justone, vfslocked; + int buflen, error, eofflag, nbytes, justone; u_long *cookies = NULL, *cookiep; int ncookies; @@ -258,9 +258,7 @@ svr4_sys_getdents64(td, uap) } vp = fp->f_vnode; - vfslocked = VFS_LOCK_GIANT(vp->v_mount); if (vp->v_type != VDIR) { - VFS_UNLOCK_GIANT(vfslocked); fdrop(fp, td); return (EINVAL); } @@ -397,7 +395,6 @@ eof: td->td_retval[0] = nbytes - resid; out: VOP_UNLOCK(vp, 0); - VFS_UNLOCK_GIANT(vfslocked); fdrop(fp, td); if (cookies) free(cookies, M_TEMP); @@ -422,7 +419,7 @@ svr4_sys_getdents(td, uap) struct iovec aiov; struct svr4_dirent idb; off_t off; /* true file offset */ - int buflen, error, eofflag, vfslocked; + int buflen, error, eofflag; u_long *cookiebuf = NULL, *cookie; int ncookies = 0, *retval = td->td_retval; @@ -439,9 +436,7 @@ svr4_sys_getdents(td, uap) } vp = fp->f_vnode; - vfslocked = VFS_LOCK_GIANT(vp->v_mount); if (vp->v_type != VDIR) { - VFS_UNLOCK_GIANT(vfslocked); fdrop(fp, td); return (EINVAL); } @@ -534,7 +529,6 @@ eof: *retval = uap->nbytes - resid; out: VOP_UNLOCK(vp, 0); - VFS_UNLOCK_GIANT(vfslocked); fdrop(fp, td); if (cookiebuf) free(cookiebuf, M_TEMP); @@ -614,7 +608,7 @@ svr4_sys_fchroot(td, uap) struct filedesc *fdp = td->td_proc->p_fd; struct vnode *vp; struct file *fp; - int error, vfslocked; + int error; if ((error = priv_check(td, PRIV_VFS_FCHROOT)) != 0) return error; @@ -624,7 +618,6 @@ svr4_sys_fchroot(td, uap) vp = fp->f_vnode; VREF(vp); fdrop(fp, td); - vfslocked = VFS_LOCK_GIANT(vp->v_mount); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); error = change_dir(vp, td); if (error) @@ -637,11 +630,9 @@ svr4_sys_fchroot(td, uap) VOP_UNLOCK(vp, 0); error = change_root(vp, td); vrele(vp); - VFS_UNLOCK_GIANT(vfslocked); return (error); fail: vput(vp); - VFS_UNLOCK_GIANT(vfslocked); return (error); } @@ -1652,13 +1643,12 @@ svr4_sys_resolvepath(td, uap) int error, *retval = td->td_retval; unsigned int ncopy; - NDINIT(&nd, LOOKUP, NOFOLLOW | SAVENAME | MPSAFE, UIO_USERSPACE, + NDINIT(&nd, LOOKUP, NOFOLLOW | SAVENAME, UIO_USERSPACE, uap->path, td); if ((error = namei(&nd)) != 0) return (error); NDFREE(&nd, NDF_NO_FREE_PNBUF); - VFS_UNLOCK_GIANT(NDHASGIANT(&nd)); ncopy = min(uap->bufsiz, strlen(nd.ni_cnd.cn_pnbuf) + 1); if ((error = copyout(nd.ni_cnd.cn_pnbuf, uap->buf, ncopy)) != 0) Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Mon Oct 22 17:47:37 2012 (r241895) +++ head/sys/conf/NOTES Mon Oct 22 17:50:54 2012 (r241896) @@ -1088,9 +1088,6 @@ options REISERFS # unsuitable for inclusion on machines with untrusted local users. options VFS_AIO -# Enable mounting of non-MPSAFE filesystems. -options VFS_ALLOW_NONMPSAFE - # Cryptographically secure random number generator; /dev/random device random Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Mon Oct 22 17:47:37 2012 (r241895) +++ head/sys/conf/options Mon Oct 22 17:50:54 2012 (r241896) @@ -188,7 +188,6 @@ SW_WATCHDOG opt_watchdog.h TURNSTILE_PROFILING UMTX_PROFILING VFS_AIO -VFS_ALLOW_NONMPSAFE VERBOSE_SYSINIT opt_global.h WLCACHE opt_wavelan.h WLDEBUG opt_wavelan.h Modified: head/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_mod.c Mon Oct 22 17:47:37 2012 (r241895) +++ head/sys/dev/hwpmc/hwpmc_mod.c Mon Oct 22 17:50:54 2012 (r241896) @@ -1632,7 +1632,6 @@ pmc_log_kernel_mappings(struct pmc *pm) static void pmc_log_process_mappings(struct pmc_owner *po, struct proc *p) { - int locked; vm_map_t map; struct vnode *vp; struct vmspace *vm; @@ -1742,9 +1741,7 @@ pmc_log_process_mappings(struct pmc_owne pmc_getfilename(vp, &fullpath, &freepath); last_vp = vp; - locked = VFS_LOCK_GIANT(vp->v_mount); vrele(vp); - VFS_UNLOCK_GIANT(locked); vp = NULL; pmclog_process_map_in(po, p->p_pid, start_addr, fullpath); Modified: head/sys/dev/md/md.c ============================================================================== --- head/sys/dev/md/md.c Mon Oct 22 17:47:37 2012 (r241895) +++ head/sys/dev/md/md.c Mon Oct 22 17:50:54 2012 (r241896) @@ -512,7 +512,7 @@ mdstart_preload(struct md_s *sc, struct static int mdstart_vnode(struct md_s *sc, struct bio *bp) { - int error, vfslocked; + int error; struct uio auio; struct iovec aiov; struct mount *mp; @@ -542,13 +542,11 @@ mdstart_vnode(struct md_s *sc, struct bi */ if (bp->bio_cmd == BIO_FLUSH) { - vfslocked = VFS_LOCK_GIANT(vp->v_mount); (void) vn_start_write(vp, &mp, V_WAIT); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); error = VOP_FSYNC(vp, MNT_WAIT, td); VOP_UNLOCK(vp, 0); vn_finished_write(mp); - VFS_UNLOCK_GIANT(vfslocked); return (error); } @@ -570,7 +568,6 @@ mdstart_vnode(struct md_s *sc, struct bi auio.uio_rw = UIO_WRITE; auio.uio_td = td; end = bp->bio_offset + bp->bio_length; - vfslocked = VFS_LOCK_GIANT(vp->v_mount); (void) vn_start_write(vp, &mp, V_WAIT); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); error = 0; @@ -588,7 +585,6 @@ mdstart_vnode(struct md_s *sc, struct bi VOP_UNLOCK(vp, 0); vn_finished_write(mp); bp->bio_resid = end - auio.uio_offset; - VFS_UNLOCK_GIANT(vfslocked); return (error); } @@ -610,7 +606,6 @@ mdstart_vnode(struct md_s *sc, struct bi * When reading set IO_DIRECT to try to avoid double-caching * the data. When writing IO_DIRECT is not optimal. */ - vfslocked = VFS_LOCK_GIANT(vp->v_mount); if (bp->bio_cmd == BIO_READ) { vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); error = VOP_READ(vp, &auio, IO_DIRECT, sc->cred); @@ -623,7 +618,6 @@ mdstart_vnode(struct md_s *sc, struct bi VOP_UNLOCK(vp, 0); vn_finished_write(mp); } - VFS_UNLOCK_GIANT(vfslocked); bp->bio_resid = auio.uio_resid; return (error); } @@ -957,7 +951,7 @@ mdcreate_vnode(struct md_s *sc, struct m struct vattr vattr; struct nameidata nd; char *fname; - int error, flags, vfslocked; + int error, flags; /* * Kernel-originated requests must have the filename appended @@ -976,11 +970,10 @@ mdcreate_vnode(struct md_s *sc, struct m * set the FWRITE mask before trying to open the backing store. */ flags = FREAD | ((mdio->md_options & MD_READONLY) ? 0 : FWRITE); - NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, UIO_SYSSPACE, sc->file, td); + NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, sc->file, td); error = vn_open(&nd, &flags, 0, NULL); if (error != 0) return (error); - vfslocked = NDHASGIANT(&nd); NDFREE(&nd, NDF_ONLY_PNBUF); if (nd.ni_vp->v_type != VREG) { error = EINVAL; @@ -1016,19 +1009,16 @@ mdcreate_vnode(struct md_s *sc, struct m nd.ni_vp->v_vflag &= ~VV_MD; goto bad; } - VFS_UNLOCK_GIANT(vfslocked); return (0); bad: VOP_UNLOCK(nd.ni_vp, 0); (void)vn_close(nd.ni_vp, flags, td->td_ucred, td); - VFS_UNLOCK_GIANT(vfslocked); return (error); } static int mddestroy(struct md_s *sc, struct thread *td) { - int vfslocked; if (sc->gp) { sc->gp->softc = NULL; @@ -1050,13 +1040,11 @@ mddestroy(struct md_s *sc, struct thread mtx_unlock(&sc->queue_mtx); mtx_destroy(&sc->queue_mtx); if (sc->vnode != NULL) { - vfslocked = VFS_LOCK_GIANT(sc->vnode->v_mount); vn_lock(sc->vnode, LK_EXCLUSIVE | LK_RETRY); sc->vnode->v_vflag &= ~VV_MD; VOP_UNLOCK(sc->vnode, 0); (void)vn_close(sc->vnode, sc->flags & MD_READONLY ? FREAD : (FREAD|FWRITE), sc->cred, td); - VFS_UNLOCK_GIANT(vfslocked); } if (sc->cred != NULL) crfree(sc->cred); Modified: head/sys/dev/nand/nandsim_swap.c ============================================================================== --- head/sys/dev/nand/nandsim_swap.c Mon Oct 22 17:47:37 2012 (r241895) +++ head/sys/dev/nand/nandsim_swap.c Mon Oct 22 17:50:54 2012 (r241896) @@ -142,9 +142,9 @@ static int swap_file_open(struct chip_swap *swap, const char *swap_file) { struct nameidata nd; - int vfslocked, flags, error; + int flags, error; - NDINIT(&nd, LOOKUP, NOFOLLOW | MPSAFE, UIO_SYSSPACE, swap_file, + NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, swap_file, curthread); flags = FWRITE | FREAD | O_NOFOLLOW | O_CREAT | O_TRUNC; @@ -157,12 +157,10 @@ swap_file_open(struct chip_swap *swap, c } swap->swap_cred = crhold(curthread->td_ucred); - vfslocked = NDHASGIANT(&nd); NDFREE(&nd, NDF_ONLY_PNBUF); /* We just unlock so we hold a reference */ VOP_UNLOCK(nd.ni_vp, 0); - VFS_UNLOCK_GIANT(vfslocked); swap->swap_vp = nd.ni_vp; @@ -192,7 +190,6 @@ swap_file_write(struct chip_swap *swap, struct vnode *vp; struct uio auio; struct iovec aiov; - int vfslocked; if (swap == NULL || blk_state == NULL) return (-1); @@ -222,13 +219,11 @@ swap_file_write(struct chip_swap *swap, auio.uio_resid = swap->blk_size; auio.uio_td = td; - vfslocked = VFS_LOCK_GIANT(vp->v_mount); vn_start_write(vp, &mp, V_WAIT); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); VOP_WRITE(vp, &auio, IO_UNIT, swap->swap_cred); VOP_UNLOCK(vp, 0); vn_finished_write(mp); - VFS_UNLOCK_GIANT(vfslocked); return (0); } @@ -241,7 +236,6 @@ swap_file_read(struct chip_swap *swap, s struct vnode *vp; struct uio auio; struct iovec aiov; - int vfslocked; if (swap == NULL || blk_state == NULL) return (-1); @@ -267,11 +261,9 @@ swap_file_read(struct chip_swap *swap, s auio.uio_resid = swap->blk_size; auio.uio_td = td; - vfslocked = VFS_LOCK_GIANT(vp->v_mount); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 17:54: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 1A75C1D6; Mon, 22 Oct 2012 17:54:33 +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 002A08FC0A; Mon, 22 Oct 2012 17:54: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 q9MHsW6n062678; Mon, 22 Oct 2012 17:54:32 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MHsWcl062675; Mon, 22 Oct 2012 17:54:32 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201210221754.q9MHsWcl062675@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 22 Oct 2012 17:54:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241897 - in head: . sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 17:54:33 -0000 Author: kib Date: Mon Oct 22 17:54:32 2012 New Revision: 241897 URL: http://svn.freebsd.org/changeset/base/241897 Log: Bump __FreeBSD_version and make a note in UPDATING about removal of the support for non-MPSAFE filesystems. Modified: head/UPDATING head/sys/sys/param.h Modified: head/UPDATING ============================================================================== --- head/UPDATING Mon Oct 22 17:50:54 2012 (r241896) +++ head/UPDATING Mon Oct 22 17:54:32 2012 (r241897) @@ -24,6 +24,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20121022: + Support for non-MPSAFE filesystems was removed from VFS. The + VFS_VERSION was bumped, all filesystem modules shall be + recompiled. + 20121018: All the non-MPSAFE filesystems have been disconnected from the build. The full list includes: codafs, hpfs, ntfs, nwfs, Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Mon Oct 22 17:50:54 2012 (r241896) +++ head/sys/sys/param.h Mon Oct 22 17:54:32 2012 (r241897) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1000020 /* Master, propagated to newvers */ +#define __FreeBSD_version 1000021 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 17:56: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 3649F73E; Mon, 22 Oct 2012 17:56:16 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1CF158FC19; Mon, 22 Oct 2012 17:56: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 q9MHuFYL063300; Mon, 22 Oct 2012 17:56:15 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MHuFEr063297; Mon, 22 Oct 2012 17:56:15 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201210221756.q9MHuFEr063297@svn.freebsd.org> From: Navdeep Parhar Date: Mon, 22 Oct 2012 17:56:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241898 - stable/9/sys/dev/cxgbe/tom X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 17:56:16 -0000 Author: np Date: Mon Oct 22 17:56:15 2012 New Revision: 241898 URL: http://svn.freebsd.org/changeset/base/241898 Log: MFC r241626, r241642. r241626: Whitespace cleanup. r241642: Always provide sndbuf and MSS values in a flowc command, even when the driver is going to abort the connection right after the flowc. Modified: stable/9/sys/dev/cxgbe/tom/t4_cpl_io.c stable/9/sys/dev/cxgbe/tom/t4_listen.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- stable/9/sys/dev/cxgbe/tom/t4_cpl_io.c Mon Oct 22 17:54:32 2012 (r241897) +++ stable/9/sys/dev/cxgbe/tom/t4_cpl_io.c Mon Oct 22 17:56:15 2012 (r241898) @@ -73,9 +73,9 @@ VNET_DECLARE(int, tcp_autorcvbuf_max); void send_flowc_wr(struct toepcb *toep, struct flowc_tx_params *ftxp) { - struct wrqe *wr; - struct fw_flowc_wr *flowc; - unsigned int nparams = ftxp ? 8 : 4, flowclen; + struct wrqe *wr; + struct fw_flowc_wr *flowc; + unsigned int nparams = ftxp ? 8 : 6, flowclen; struct port_info *pi = toep->port; struct adapter *sc = pi->adapter; unsigned int pfvf = G_FW_VIID_PFN(pi->viid) << S_FW_VIID_PFN; @@ -102,13 +102,13 @@ send_flowc_wr(struct toepcb *toep, struc V_FW_WR_FLOWID(toep->tid)); flowc->mnemval[0].mnemonic = FW_FLOWC_MNEM_PFNVFN; - flowc->mnemval[0].val = htobe32(pfvf); - flowc->mnemval[1].mnemonic = FW_FLOWC_MNEM_CH; - flowc->mnemval[1].val = htobe32(pi->tx_chan); - flowc->mnemval[2].mnemonic = FW_FLOWC_MNEM_PORT; - flowc->mnemval[2].val = htobe32(pi->tx_chan); - flowc->mnemval[3].mnemonic = FW_FLOWC_MNEM_IQID; - flowc->mnemval[3].val = htobe32(toep->ofld_rxq->iq.abs_id); + flowc->mnemval[0].val = htobe32(pfvf); + flowc->mnemval[1].mnemonic = FW_FLOWC_MNEM_CH; + flowc->mnemval[1].val = htobe32(pi->tx_chan); + flowc->mnemval[2].mnemonic = FW_FLOWC_MNEM_PORT; + flowc->mnemval[2].val = htobe32(pi->tx_chan); + flowc->mnemval[3].mnemonic = FW_FLOWC_MNEM_IQID; + flowc->mnemval[3].val = htobe32(toep->ofld_rxq->iq.abs_id); if (ftxp) { uint32_t sndbuf = min(ftxp->snd_space, sc->tt.sndbuf); @@ -120,6 +120,11 @@ send_flowc_wr(struct toepcb *toep, struc flowc->mnemval[6].val = htobe32(sndbuf); flowc->mnemval[7].mnemonic = FW_FLOWC_MNEM_MSS; flowc->mnemval[7].val = htobe32(ftxp->mss); + } else { + flowc->mnemval[4].mnemonic = FW_FLOWC_MNEM_SNDBUF; + flowc->mnemval[4].val = htobe32(512); + flowc->mnemval[5].mnemonic = FW_FLOWC_MNEM_MSS; + flowc->mnemval[5].val = htobe32(512); } txsd->tx_credits = howmany(flowclen, 16); Modified: stable/9/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- stable/9/sys/dev/cxgbe/tom/t4_listen.c Mon Oct 22 17:54:32 2012 (r241897) +++ stable/9/sys/dev/cxgbe/tom/t4_listen.c Mon Oct 22 17:56:15 2012 (r241898) @@ -271,13 +271,13 @@ send_reset_synqe(struct toedev *tod, str struct ifnet *ifp = m->m_pkthdr.rcvif; struct port_info *pi = ifp->if_softc; struct l2t_entry *e = &sc->l2t->l2tab[synqe->l2e_idx]; - struct wrqe *wr; - struct fw_flowc_wr *flowc; + struct wrqe *wr; + struct fw_flowc_wr *flowc; struct cpl_abort_req *req; int txqid, rxqid, flowclen; struct sge_wrq *ofld_txq; struct sge_ofld_rxq *ofld_rxq; - const int nparams = 4; + const int nparams = 6; unsigned int pfvf = G_FW_VIID_PFN(pi->viid) << S_FW_VIID_PFN; INP_WLOCK_ASSERT(synqe->lctx->inp); @@ -312,13 +312,17 @@ send_reset_synqe(struct toedev *tod, str flowc->flowid_len16 = htonl(V_FW_WR_LEN16(howmany(flowclen, 16)) | V_FW_WR_FLOWID(synqe->tid)); flowc->mnemval[0].mnemonic = FW_FLOWC_MNEM_PFNVFN; - flowc->mnemval[0].val = htobe32(pfvf); - flowc->mnemval[1].mnemonic = FW_FLOWC_MNEM_CH; - flowc->mnemval[1].val = htobe32(pi->tx_chan); - flowc->mnemval[2].mnemonic = FW_FLOWC_MNEM_PORT; - flowc->mnemval[2].val = htobe32(pi->tx_chan); - flowc->mnemval[3].mnemonic = FW_FLOWC_MNEM_IQID; - flowc->mnemval[3].val = htobe32(ofld_rxq->iq.abs_id); + flowc->mnemval[0].val = htobe32(pfvf); + flowc->mnemval[1].mnemonic = FW_FLOWC_MNEM_CH; + flowc->mnemval[1].val = htobe32(pi->tx_chan); + flowc->mnemval[2].mnemonic = FW_FLOWC_MNEM_PORT; + flowc->mnemval[2].val = htobe32(pi->tx_chan); + flowc->mnemval[3].mnemonic = FW_FLOWC_MNEM_IQID; + flowc->mnemval[3].val = htobe32(ofld_rxq->iq.abs_id); + flowc->mnemval[4].mnemonic = FW_FLOWC_MNEM_SNDBUF; + flowc->mnemval[4].val = htobe32(512); + flowc->mnemval[5].mnemonic = FW_FLOWC_MNEM_MSS; + flowc->mnemval[5].val = htobe32(512); synqe->flags |= TPF_FLOWC_WR_SENT; /* ... then ABORT request */ From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 18:01: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 4E64D968; Mon, 22 Oct 2012 18:01:39 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 29B7D8FC0C; Mon, 22 Oct 2012 18:01: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 q9MI1d4U064846; Mon, 22 Oct 2012 18:01:39 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MI1c9Z064837; Mon, 22 Oct 2012 18:01:38 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201210221801.q9MI1c9Z064837@svn.freebsd.org> From: Devin Teske Date: Mon, 22 Oct 2012 18:01:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241899 - in head/usr.sbin/bsdconfig: . include security security/include share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 18:01:39 -0000 Author: dteske Date: Mon Oct 22 18:01:38 2012 New Revision: 241899 URL: http://svn.freebsd.org/changeset/base/241899 Log: Resurrect usage.hlp and securelevel.hlp from sysinstall(8) and integrate them into bsdconfig(8). Approved by: adrian (co-mentor) (implicit) Added: head/usr.sbin/bsdconfig/include/usage.hlp (contents, props changed) head/usr.sbin/bsdconfig/security/include/securelevel.hlp (contents, props changed) Modified: head/usr.sbin/bsdconfig/bsdconfig head/usr.sbin/bsdconfig/include/Makefile head/usr.sbin/bsdconfig/include/messages.subr head/usr.sbin/bsdconfig/security/include/Makefile head/usr.sbin/bsdconfig/security/kern_securelevel head/usr.sbin/bsdconfig/share/common.subr Modified: head/usr.sbin/bsdconfig/bsdconfig ============================================================================== --- head/usr.sbin/bsdconfig/bsdconfig Mon Oct 22 17:56:15 2012 (r241898) +++ head/usr.sbin/bsdconfig/bsdconfig Mon Oct 22 18:01:38 2012 (r241899) @@ -37,7 +37,8 @@ f_include $BSDCFG_SHARE/strings.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" f_include_lang $BSDCFG_LIBE/include/messages.subr -f_include_help $BSDCFG_LIBE/include/bsdconfig.hlp +f_include_help BSDCONFIG $BSDCFG_LIBE/include/bsdconfig.hlp +f_include_help USAGE $BSDCFG_LIBE/include/usage.hlp ############################################################ FUNCTIONS @@ -141,12 +142,13 @@ dialog_menu_main() local menu_list size menu_list=" - 'X' '$msg_exit' '$msg_exit_bsdconfig' + 'X' '$msg_exit' '$msg_exit_bsdconfig' + '1' '$msg_usage' '$msg_quick_start_how_to_use_this_menu_system' " # END-QUOTE local sanitize_awk="{ gsub(/'/, \"'\\\\''\"); print }" - local menuitem menu_title menu_help menu_selection index=1 + local menuitem menu_title menu_help menu_selection index=2 for menuitem in $( ls -d [0-9][0-9][0-9].* ); do [ $index -lt ${#DIALOG_MENU_TAGS} ] || break tag=$( f_substr "$DIALOG_MENU_TAGS" $index 1 ) @@ -187,7 +189,7 @@ dialog_menu_main() --ok-label \"\$msg_ok\" \ --cancel-label \"\$msg_exit_bsdconfig\" \ --help-button \ - ${USE_XDIALOG:+--help \"\$( f_include_help )\"} \ + ${USE_XDIALOG:+--help \"\$( f_include_help BSDCONFIG )\"} \ --menu \"\$prompt\" $size $menu_list \ 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD ) @@ -300,7 +302,7 @@ while :; do if [ $retval -eq 2 ]; then # The Help button was pressed - f_show_msg "%s" "$( f_include_help )" + f_show_msg "%s" "$( f_include_help BSDCONFIG )" continue elif [ $retval -ne 0 ]; then f_die @@ -311,6 +313,11 @@ while :; do break ;; + 1) # Usage + f_show_msg "%s" "$( f_include_help USAGE )" + continue + ;; + *) # Dynamically loaded menuitem cmd=$( eval echo \"\$menu_program$mtag\" ) f_dprintf "cmd=[$cmd]" Modified: head/usr.sbin/bsdconfig/include/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/include/Makefile Mon Oct 22 17:56:15 2012 (r241898) +++ head/usr.sbin/bsdconfig/include/Makefile Mon Oct 22 18:01:38 2012 (r241899) @@ -3,7 +3,7 @@ NO_OBJ= FILESDIR= ${LIBEXECDIR}/bsdconfig/include -FILES= bsdconfig.hlp messages.subr +FILES= bsdconfig.hlp messages.subr usage.hlp beforeinstall: mkdir -p ${DESTDIR}${FILESDIR} Modified: head/usr.sbin/bsdconfig/include/messages.subr ============================================================================== --- head/usr.sbin/bsdconfig/include/messages.subr Mon Oct 22 17:56:15 2012 (r241898) +++ head/usr.sbin/bsdconfig/include/messages.subr Mon Oct 22 18:01:38 2012 (r241899) @@ -51,11 +51,13 @@ msg_permission_denied="%s: %s: Permissio msg_please_enter_password="Please enter your password for sudo(8):" msg_please_enter_username_password="Please enter a username and password for sudo(8):" msg_previous_syntax_errors="%s: Not overwriting \`%s' due to previous syntax errors" +msg_quick_start_how_to_use_this_menu_system="Quick start - How to use this menu system" msg_secure_mode_requires_x11="Secure-mode requires X11 (use \`-X')!" msg_secure_mode_requires_root="Secure-mode requires root-access!" msg_sorry_try_again="Sorry, try again." msg_try_sudo_only_this_once="Try sudo(8) only this once" msg_unknown_user="Unknown user: %s" +msg_usage="Usage" msg_user_disallowed="User disallowed: %s" msg_yes="Yes" msg_you_are_not_root_but="You are not root but %s can use sudo(8).\nWhat would you like to do?" Added: head/usr.sbin/bsdconfig/include/usage.hlp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bsdconfig/include/usage.hlp Mon Oct 22 18:01:38 2012 (r241899) @@ -0,0 +1,64 @@ +HOW TO USE THIS SYSTEM +====================== + +[press the PageDown key to go to the next screen when you finish + reading this one] + +The following keys are recognized in most of the dialogs you'll +encounter during this installation: + +KEY ACTION +--- ------ +SPACE Select or toggle the current item. +ENTER Finish with a menu or item. +UP ARROW Move to previous item (or up, in a text display box). +DOWN ARROW Move to next item (or down, in a text display box). +TAB Move to next item or group. +RIGHT ARROW Move to next item or group (same as TAB). +SHIFT-TAB Move to previous item or group. +LEFT ARROW Move to previous item or group (same as SHIFT-TAB). +PAGE UP In text display boxes, scrolls up one page. +PAGE DOWN In text display boxes, scrolls down one page. +F1 Display associated help text. + +If you see small "^(-)" or "v(+)" symbols at the edges of a menu, it +means that there are more items above or below the current one that +aren't being shown (due to insufficient screen space). In text +display boxes, the amount of text above the current point will be +displayed as a percentage in the lower right corner. Using the +Up/Down arrow keys will cause the object to scroll by line. The +PageUp and PageDown keys will scroll by entire screens. + +Selecting OK in a menu will confirm whatever action it's controlling. +Selecting Cancel will cancel the operation and generally return you to +the previous menu. Use TAB to move the cursor around and select the +buttons. + +Most screens offer a Help button - USE IT! It generally offers useful +context-specific hints on what to do and if you're at all unsure about +what to do at a given configuration menu, choose Help! + + +SPECIAL FEATURES: +================= + +It is possible to select a menu item by typing the first character of +its name, if unique. This will generally be an item number. + +The console driver contains a scroll-back buffer for reviewing things +that may have scrolled off the screen. To use scroll-back, press the +"Scroll Lock" key on your keyboard and use the arrow or Page Up/Page +Down keys to move through the saved text. To leave scroll-back mode, +press the Scroll Lock key again. This feature is most useful for +reading back through your boot messages (go ahead, try it now!) though +it's also useful when dealing with sub-shells or other "expert modes" +that don't use menus and tend to scroll their output off the top of +the screen. + +FreeBSD also supports multiple "virtual consoles" which you can use +in order to have several active sessions at once. Use ALT-F to +switch between screens, where `F' is the function key corresponding +to the screen you wish to see. By default, the system comes with 8 +virtual consoles enabled - you can enable more by editing the +/etc/ttys file and turning the "off" field to "on" in the relevant vty +entries (up to 12). Modified: head/usr.sbin/bsdconfig/security/include/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/security/include/Makefile Mon Oct 22 17:56:15 2012 (r241898) +++ head/usr.sbin/bsdconfig/security/include/Makefile Mon Oct 22 18:01:38 2012 (r241899) @@ -3,7 +3,7 @@ NO_OBJ= FILESDIR= ${LIBEXECDIR}/bsdconfig/130.security/include -FILES= messages.subr +FILES= messages.subr securelevel.hlp beforeinstall: mkdir -p ${DESTDIR}${FILESDIR} Added: head/usr.sbin/bsdconfig/security/include/securelevel.hlp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bsdconfig/security/include/securelevel.hlp Mon Oct 22 18:01:38 2012 (r241899) @@ -0,0 +1,40 @@ +This menu allows you to configure the Securelevel mechanism in FreeBSD. + +Securelevels may be used to limit the privileges assigned to the +root user in multi-user mode, which in turn may limit the effects of +a root compromise, at the cost of reducing administrative functions. +Refer to the security(7) and init(8) manual pages for complete details. + + -1 Permanently insecure mode - always run the system in level 0 + mode. This is the default initial value. + + 0 Insecure mode - immutable and append-only flags may be turned + off. All devices may be read or written subject to their + permissions. + + 1 Secure mode - the system immutable and system append-only + flags may not be turned off; disks for mounted file systems, + /dev/mem, /dev/kmem and /dev/io (if your platform has it) + may not be opened for writing; kernel modules (see kld(4)) + may not be loaded or unloaded. + + 2 Highly secure mode - same as secure mode, plus disks may not + be opened for writing (except by mount(2)) whether mounted or + not. This level precludes tampering with file systems by + unmounting them, but also inhibits running newfs(8) while the + system is multi-user. + + In addition, kernel time changes are restricted to less than + or equal to one second. Attempts to change the time by more + than this will log the message ``Time adjustment clamped to +1 + second''. + + 3 Network secure mode - same as highly secure mode, plus IP + packet filter rules (see ipfw(8), ipfirewall(4) and pfctl(8)) + cannot be changed and dummynet(4) or pf(4) configuration + cannot be adjusted. + +Securelevels must be used in combination with careful system design and +application of protective mechanisms to prevent system configuration +files from being modified in a way that compromises the protections of +the securelevel variable upon reboot. Modified: head/usr.sbin/bsdconfig/security/kern_securelevel ============================================================================== --- head/usr.sbin/bsdconfig/security/kern_securelevel Mon Oct 22 17:56:15 2012 (r241898) +++ head/usr.sbin/bsdconfig/security/kern_securelevel Mon Oct 22 18:01:38 2012 (r241899) @@ -36,6 +36,7 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="130.security" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr +f_include_help SECURELEVEL $BSDCFG_LIBE/$APP_DIR/include/securelevel.hlp ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" @@ -74,6 +75,8 @@ dialog_menu_main() --hline \"\$hline\" \ --ok-label \"\$msg_ok\" \ --cancel-label \"\$msg_cancel\" \ + --help-button \ + ${USE_XDIALOG:+--help \"\$( f_include_help SECURELEVEL )\"} \ --menu \"\$prompt\" $size \ $menu_list \ 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD @@ -109,11 +112,21 @@ f_mustberoot_init # # Launch application main menu # -dialog_menu_main -retval=$? -mtag=$( f_dialog_menutag ) +while :; do + dialog_menu_main + retval=$? + mtag=$( f_dialog_menutag ) + + if [ $retval -eq 2 ]; then + # The Help button was pressed + f_show_msg "%s" "$( f_include_help SECURELEVEL )" + continue + elif [ $retval -ne 0 ]; then + f_die + fi -[ $retval -eq 0 ] || f_die + break +done case "$mtag" in "$msg_disabled") Modified: head/usr.sbin/bsdconfig/share/common.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/common.subr Mon Oct 22 17:56:15 2012 (r241898) +++ head/usr.sbin/bsdconfig/share/common.subr Mon Oct 22 18:01:38 2012 (r241899) @@ -179,41 +179,37 @@ f_include_lang() fi } -# f_include_help [$file] +# f_include_help NAME [$file] # -# When given an argument, cache the contents of a language help-file (to later -# be retrieved by executing again without arguments). +# When given both arguments, cache the contents of a language help-file to +# later be retrieved by executing again with only the first argument. # # Automatically takes $LANG and $LC_ALL into consideration when reading $file # (suffix ".$LC_ALL" or ".$LANG" will automatically be added prior to loading # the language help-file). # -# No error is produced if (a) a language has been requested (by setting either -# $LANG or $LC_ALL in the environment) and (b) the language help-file does not -# exist -- in which case we will fall back to loading $file without-suffix. +# If a language has been requested by setting either $LANG or $LC_ALL in the +# environment and the language-specific help-file does not exist we will fall +# back to $file without-suffix. # # If the language help-file does not exist, an error is cached in place of the # help-file contents. # -# When called without arguments, the cached value (if any) is produced. Each -# time this function is called, the cache is overwritten with the newly loaded -# contents. -# f_include_help() { - local file="$1" + local name="$1" file="$2" if [ "$file" ]; then local lang="${LANG:-$LC_ALL}" - f_dprintf "lang=[$lang]" + f_dprintf "name=[$name] lang=[$lang]" if [ -f "$file.$lang" ]; then - setvar HELP_$$ "$( cat "$file.$lang" 2>&1 )" + setvar HELP_${name}_$$ "$( cat "$file.$lang" 2>&1 )" else - setvar HELP_$$ "$( cat "$file" 2>&1 )" + setvar HELP_${name}_$$ "$( cat "$file" 2>&1 )" fi else - eval echo \"\$HELP_$$\" + eval echo \"\$HELP_${name}_$$\" fi } From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 18:04: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 ED03FB6D; Mon, 22 Oct 2012 18:04:00 +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 D07368FC0A; Mon, 22 Oct 2012 18:04: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 q9MI40ql065531; Mon, 22 Oct 2012 18:04:00 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MI407b065523; Mon, 22 Oct 2012 18:04:00 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201210221804.q9MI407b065523@svn.freebsd.org> From: Dimitry Andric Date: Mon, 22 Oct 2012 18:04:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r241900 - in vendor/libc++/dist: . include include/support src src/support X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 18:04:01 -0000 Author: dim Date: Mon Oct 22 18:04:00 2012 New Revision: 241900 URL: http://svn.freebsd.org/changeset/base/241900 Log: Vendor import of libc++ trunk r165949: http://llvm.org/svn/llvm-project/libcxx/trunk@165949 Added: vendor/libc++/dist/CREDITS.TXT vendor/libc++/dist/LICENSE.TXT Deleted: vendor/libc++/dist/include/support/ vendor/libc++/dist/src/support/ Modified: vendor/libc++/dist/include/__bit_reference vendor/libc++/dist/include/__config vendor/libc++/dist/include/__hash_table vendor/libc++/dist/include/__locale vendor/libc++/dist/include/__mutex_base vendor/libc++/dist/include/__tree vendor/libc++/dist/include/__tuple vendor/libc++/dist/include/__undef_min_max vendor/libc++/dist/include/algorithm vendor/libc++/dist/include/array vendor/libc++/dist/include/atomic vendor/libc++/dist/include/bitset vendor/libc++/dist/include/chrono vendor/libc++/dist/include/cmath vendor/libc++/dist/include/complex vendor/libc++/dist/include/condition_variable vendor/libc++/dist/include/cstddef vendor/libc++/dist/include/cstdio vendor/libc++/dist/include/cstdlib vendor/libc++/dist/include/deque vendor/libc++/dist/include/exception vendor/libc++/dist/include/forward_list vendor/libc++/dist/include/fstream vendor/libc++/dist/include/functional vendor/libc++/dist/include/future vendor/libc++/dist/include/ios vendor/libc++/dist/include/iosfwd vendor/libc++/dist/include/istream vendor/libc++/dist/include/iterator vendor/libc++/dist/include/list vendor/libc++/dist/include/locale vendor/libc++/dist/include/map vendor/libc++/dist/include/memory vendor/libc++/dist/include/mutex vendor/libc++/dist/include/new vendor/libc++/dist/include/ostream vendor/libc++/dist/include/queue vendor/libc++/dist/include/random vendor/libc++/dist/include/regex vendor/libc++/dist/include/stack vendor/libc++/dist/include/streambuf vendor/libc++/dist/include/string vendor/libc++/dist/include/system_error vendor/libc++/dist/include/thread vendor/libc++/dist/include/tuple vendor/libc++/dist/include/type_traits vendor/libc++/dist/include/unordered_map vendor/libc++/dist/include/utility vendor/libc++/dist/include/valarray vendor/libc++/dist/include/vector vendor/libc++/dist/src/condition_variable.cpp vendor/libc++/dist/src/debug.cpp vendor/libc++/dist/src/exception.cpp vendor/libc++/dist/src/future.cpp vendor/libc++/dist/src/ios.cpp vendor/libc++/dist/src/iostream.cpp vendor/libc++/dist/src/locale.cpp vendor/libc++/dist/src/memory.cpp vendor/libc++/dist/src/mutex.cpp vendor/libc++/dist/src/new.cpp vendor/libc++/dist/src/random.cpp vendor/libc++/dist/src/stdexcept.cpp vendor/libc++/dist/src/thread.cpp vendor/libc++/dist/src/typeinfo.cpp Added: vendor/libc++/dist/CREDITS.TXT ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/CREDITS.TXT Mon Oct 22 18:04:00 2012 (r241900) @@ -0,0 +1,76 @@ +This file is a partial list of people who have contributed to the LLVM/libc++ +project. If you have contributed a patch or made some other contribution to +LLVM/libc++, please submit a patch to this file to add yourself, and it will be +done! + +The list is sorted by surname and formatted to allow easy grepping and +beautification by scripts. The fields are: name (N), email (E), web-address +(W), PGP key ID and fingerprint (P), description (D), and snail-mail address +(S). + +N: Howard Hinnant +E: hhinnant@apple.com +D: Architect and primary author of libc++ + +N: Marshall Clow +E: mclow.lists@gmail.com +E: marshall@idio.com +D: Minor patches and bug fixes. + +N: Bjorn Reese +E: breese@users.sourceforge.net +D: Initial regex prototype + +N: David Chisnall +E: theraven at theravensnest dot org +D: FreeBSD and Solaris ports, libcxxrt support, some atomics work. + +N: Ruben Van Boxem +E: vanboxem dot ruben at gmail dot com +D: Initial Windows patches. + +N: Arvid Picciani +E: aep at exys dot org +D: Minor patches and musl port. + +N: Craig Silverstein +E: csilvers@google.com +D: Implemented Cityhash as the string hash function on 64-bit machines + +N: Google Inc. +D: Copyright owner and contributor of the CityHash algorithm + +N: Jeffrey Yasskin +E: jyasskin@gmail.com +E: jyasskin@google.com +D: Linux fixes. + +N: Jonathan Sauer +D: Minor patches, mostly related to constexpr + +N: Richard Smith +D: Minor patches. + +N: Andrew Morrow +E: andrew.c.morrow@gmail.com +D: Minor patches and Linux fixes. + +N: Hyeon-bin Jeong +E: tuhertz@gmail.com +D: Minor patches and bug fixes. + +N: Michel Morin +E: mimomorin@gmail.com +D: Minor patches to is_convertible. + +N: Dimitry Andric +E: dimitry@andric.com +D: Visibility fixes, minor FreeBSD portability patches. + +N: Holger Arnold +E: holgerar@gmail.com +D: Minor fix. + +N: Argyrios Kyrtzidis +E: kyrtzidis@apple.com +D: Bug fixes. Added: vendor/libc++/dist/LICENSE.TXT ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/LICENSE.TXT Mon Oct 22 18:04:00 2012 (r241900) @@ -0,0 +1,76 @@ +============================================================================== +libc++ License +============================================================================== + +The libc++ library is dual licensed under both the University of Illinois +"BSD-Like" license and the MIT license. As a user of this code you may choose +to use it under either license. As a contributor, you agree to allow your code +to be used under both. + +Full text of the relevant licenses is included below. + +============================================================================== + +University of Illinois/NCSA +Open Source License + +Copyright (c) 2009-2012 by the contributors listed in CREDITS.TXT + +All rights reserved. + +Developed by: + + LLVM Team + + University of Illinois at Urbana-Champaign + + http://llvm.org + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal with +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimers. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimers in the + documentation and/or other materials provided with the distribution. + + * Neither the names of the LLVM Team, University of Illinois at + Urbana-Champaign, nor the names of its contributors may be used to + endorse or promote products derived from this Software without specific + prior written permission. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +SOFTWARE. + +============================================================================== + +Copyright (c) 2009-2012 by the contributors listed in CREDITS.TXT + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. Modified: vendor/libc++/dist/include/__bit_reference ============================================================================== --- vendor/libc++/dist/include/__bit_reference Mon Oct 22 18:01:38 2012 (r241899) +++ vendor/libc++/dist/include/__bit_reference Mon Oct 22 18:04:00 2012 (r241900) @@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template class __bit_iterator; +template class __bit_iterator; template class __bit_const_reference; template @@ -131,13 +131,14 @@ public: __bit_const_reference(const __bit_reference<_Cp>& __x) _NOEXCEPT : __seg_(__x.__seg_), __mask_(__x.__mask_) {} - _LIBCPP_INLINE_VISIBILITY operator bool() const _NOEXCEPT + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR operator bool() const _NOEXCEPT {return static_cast(*__seg_ & __mask_);} _LIBCPP_INLINE_VISIBILITY __bit_iterator<_Cp, true> operator&() const _NOEXCEPT {return __bit_iterator<_Cp, true>(__seg_, static_cast(__ctz(__mask_)));} private: _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR __bit_const_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT : __seg_(__s), __mask_(__m) {} @@ -146,11 +147,11 @@ private: // find -template -__bit_iterator<_Cp, false> -__find_bool_true(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) +template +__bit_iterator<_Cp, _IsConst> +__find_bool_true(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n) { - typedef __bit_iterator<_Cp, false> _It; + typedef __bit_iterator<_Cp, _IsConst> _It; typedef typename _It::__storage_type __storage_type; static const unsigned __bits_per_word = _It::__bits_per_word; // do first partial word @@ -180,11 +181,11 @@ __find_bool_true(__bit_iterator<_Cp, fal return _It(__first.__seg_, static_cast(__n)); } -template -__bit_iterator<_Cp, false> -__find_bool_false(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) +template +__bit_iterator<_Cp, _IsConst> +__find_bool_false(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n) { - typedef __bit_iterator<_Cp, false> _It; + typedef __bit_iterator<_Cp, _IsConst> _It; typedef typename _It::__storage_type __storage_type; static const unsigned __bits_per_word = _It::__bits_per_word; // do first partial word @@ -193,7 +194,7 @@ __find_bool_false(__bit_iterator<_Cp, fa __storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_); __storage_type __dn = _VSTD::min(__clz_f, __n); __storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn)); - __storage_type __b = ~(*__first.__seg_ & __m); + __storage_type __b = ~*__first.__seg_ & __m; if (__b) return _It(__first.__seg_, static_cast(_VSTD::__ctz(__b))); __n -= __dn; @@ -210,17 +211,17 @@ __find_bool_false(__bit_iterator<_Cp, fa if (__n > 0) { __storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n); - __storage_type __b = ~(*__first.__seg_ & __m); + __storage_type __b = ~*__first.__seg_ & __m; if (__b) return _It(__first.__seg_, static_cast(_VSTD::__ctz(__b))); } return _It(__first.__seg_, static_cast(__n)); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__bit_iterator<_Cp, false> -find(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __last, const _Tp& __value_) +__bit_iterator<_Cp, _IsConst> +find(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, const _Tp& __value_) { if (static_cast(__value_)) return __find_bool_true(__first, static_cast(__last - __first)); @@ -229,11 +230,11 @@ find(__bit_iterator<_Cp, false> __first, // count -template -typename __bit_iterator<_Cp, false>::difference_type -__count_bool_true(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) +template +typename __bit_iterator<_Cp, _IsConst>::difference_type +__count_bool_true(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n) { - typedef __bit_iterator<_Cp, false> _It; + typedef __bit_iterator<_Cp, _IsConst> _It; typedef typename _It::__storage_type __storage_type; typedef typename _It::difference_type difference_type; static const unsigned __bits_per_word = _It::__bits_per_word; @@ -260,11 +261,11 @@ __count_bool_true(__bit_iterator<_Cp, fa return __r; } -template -typename __bit_iterator<_Cp, false>::difference_type -__count_bool_false(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) +template +typename __bit_iterator<_Cp, _IsConst>::difference_type +__count_bool_false(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n) { - typedef __bit_iterator<_Cp, false> _It; + typedef __bit_iterator<_Cp, _IsConst> _It; typedef typename _It::__storage_type __storage_type; typedef typename _It::difference_type difference_type; static const unsigned __bits_per_word = _It::__bits_per_word; @@ -275,7 +276,7 @@ __count_bool_false(__bit_iterator<_Cp, f __storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_); __storage_type __dn = _VSTD::min(__clz_f, __n); __storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn)); - __r = _VSTD::__pop_count(~(*__first.__seg_ & __m)); + __r = _VSTD::__pop_count(~*__first.__seg_ & __m); __n -= __dn; ++__first.__seg_; } @@ -286,15 +287,15 @@ __count_bool_false(__bit_iterator<_Cp, f if (__n > 0) { __storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n); - __r += _VSTD::__pop_count(~(*__first.__seg_ & __m)); + __r += _VSTD::__pop_count(~*__first.__seg_ & __m); } return __r; } -template +template inline _LIBCPP_INLINE_VISIBILITY -typename __bit_iterator<_Cp, false>::difference_type -count(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __last, const _Tp& __value_) +typename __bit_iterator<_Cp, _IsConst>::difference_type +count(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, const _Tp& __value_) { if (static_cast(__value_)) return __count_bool_true(__first, static_cast(__last - __first)); @@ -926,12 +927,12 @@ rotate(__bit_iterator<_Cp, false> __firs // equal -template +template bool -__equal_unaligned(__bit_iterator<_Cp, true> __first1, __bit_iterator<_Cp, true> __last1, - __bit_iterator<_Cp, true> __first2) +__equal_unaligned(__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1> __last1, + __bit_iterator<_Cp, _IC2> __first2) { - typedef __bit_iterator<_Cp, true> _It; + typedef __bit_iterator<_Cp, _IC1> _It; typedef typename _It::difference_type difference_type; typedef typename _It::__storage_type __storage_type; static const unsigned __bits_per_word = _It::__bits_per_word; @@ -950,11 +951,15 @@ __equal_unaligned(__bit_iterator<_Cp, tr __storage_type __ddn = _VSTD::min<__storage_type>(__dn, __clz_r); __m = (~__storage_type(0) << __first2.__ctz_) & (~__storage_type(0) >> (__clz_r - __ddn)); if (__first2.__ctz_ > __first1.__ctz_) + { if ((*__first2.__seg_ & __m) != (__b << (__first2.__ctz_ - __first1.__ctz_))) return false; + } else + { if ((*__first2.__seg_ & __m) != (__b >> (__first1.__ctz_ - __first2.__ctz_))) return false; + } __first2.__seg_ += (__ddn + __first2.__ctz_) / __bits_per_word; __first2.__ctz_ = static_cast((__ddn + __first2.__ctz_) % __bits_per_word); __dn -= __ddn; @@ -1004,12 +1009,12 @@ __equal_unaligned(__bit_iterator<_Cp, tr return true; } -template +template bool -__equal_aligned(__bit_iterator<_Cp, true> __first1, __bit_iterator<_Cp, true> __last1, - __bit_iterator<_Cp, true> __first2) +__equal_aligned(__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1> __last1, + __bit_iterator<_Cp, _IC2> __first2) { - typedef __bit_iterator<_Cp, true> _It; + typedef __bit_iterator<_Cp, _IC1> _It; typedef typename _It::difference_type difference_type; typedef typename _It::__storage_type __storage_type; static const unsigned __bits_per_word = _It::__bits_per_word; @@ -1057,7 +1062,8 @@ equal(__bit_iterator<_Cp, _IC1> __first1 return __equal_unaligned(__first1, __last1, __first2); } -template +template class __bit_iterator { public: @@ -1228,19 +1234,23 @@ private: template friend __bit_iterator<_Dp, false> rotate(__bit_iterator<_Dp, false>, __bit_iterator<_Dp, false>, __bit_iterator<_Dp, false>); - template friend bool __equal_aligned(__bit_iterator<_Dp, true>, - __bit_iterator<_Dp, true>, - __bit_iterator<_Dp, true>); - template friend bool __equal_unaligned(__bit_iterator<_Dp, true>, - __bit_iterator<_Dp, true>, - __bit_iterator<_Dp, true>); + template friend bool __equal_aligned(__bit_iterator<_Dp, _IC1>, + __bit_iterator<_Dp, _IC1>, + __bit_iterator<_Dp, _IC2>); + template friend bool __equal_unaligned(__bit_iterator<_Dp, _IC1>, + __bit_iterator<_Dp, _IC1>, + __bit_iterator<_Dp, _IC2>); template friend bool equal(__bit_iterator<_Dp, _IC1>, __bit_iterator<_Dp, _IC1>, __bit_iterator<_Dp, _IC2>); - template friend __bit_iterator<_Dp, false> __find_bool_true(__bit_iterator<_Dp, false>, + template friend __bit_iterator<_Dp, _IC> __find_bool_true(__bit_iterator<_Dp, _IC>, typename _Dp::size_type); - template friend __bit_iterator<_Dp, false> __find_bool_false(__bit_iterator<_Dp, false>, + template friend __bit_iterator<_Dp, _IC> __find_bool_false(__bit_iterator<_Dp, _IC>, typename _Dp::size_type); + template friend typename __bit_iterator<_Dp, _IC>::difference_type + __count_bool_true(__bit_iterator<_Dp, _IC>, typename _Dp::size_type); + template friend typename __bit_iterator<_Dp, _IC>::difference_type + __count_bool_false(__bit_iterator<_Dp, _IC>, typename _Dp::size_type); }; _LIBCPP_END_NAMESPACE_STD Modified: vendor/libc++/dist/include/__config ============================================================================== --- vendor/libc++/dist/include/__config Mon Oct 22 18:01:38 2012 (r241899) +++ vendor/libc++/dist/include/__config Mon Oct 22 18:04:00 2012 (r241900) @@ -15,7 +15,11 @@ #pragma GCC system_header #endif -#define _LIBCPP_VERSION 1001 +#ifdef __GNUC__ +#define _GNUC_VER (__GNUC__ * 100 + __GNUC_MINOR__) +#endif + +#define _LIBCPP_VERSION 1101 #define _LIBCPP_ABI_VERSION 1 @@ -53,7 +57,8 @@ # define _LIBCPP_LITTLE_ENDIAN 1 # define _LIBCPP_BIG_ENDIAN 0 // Compiler intrinsics (GCC or MSVC) -# if (defined(_MSC_VER) && _MSC_VER >= 1400) || (__GNUC__ >= 4 && __GNUC_MINOR__ > 3) +# if (defined(_MSC_VER) && _MSC_VER >= 1400) \ + || (defined(__GNUC__) && _GNUC_VER > 403) # define _LIBCP_HAS_IS_BASE_OF # endif #endif // _WIN32 @@ -145,8 +150,10 @@ #if defined(__clang__) #if __has_feature(cxx_alignas) +# define _ALIGNAS_TYPE(x) alignas(x) # define _ALIGNAS(x) alignas(x) #else +# define _ALIGNAS_TYPE(x) __attribute__((__aligned__(__alignof(x)))) # define _ALIGNAS(x) __attribute__((__aligned__(x))) #endif @@ -180,9 +187,9 @@ typedef __char32_t char32_t; #endif #if __has_feature(cxx_attributes) -# define _ATTRIBUTE(x) [[x]] +# define _LIBCPP_NORETURN [[noreturn]] #else -# define _ATTRIBUTE(x) __attribute__ ((x)) +# define _LIBCPP_NORETURN __attribute__ ((noreturn)) #endif #define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS @@ -245,8 +252,9 @@ typedef __char32_t char32_t; #define _LIBCPP_HAS_NO_CONSTEXPR #endif -#if __FreeBSD__ +#if __FreeBSD__ && (__ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L) #define _LIBCPP_HAS_QUICK_EXIT +#define _LIBCPP_HAS_C11_FEATURES #endif #if (__has_feature(cxx_noexcept)) @@ -274,8 +282,9 @@ namespace std { #elif defined(__GNUC__) #define _ALIGNAS(x) __attribute__((__aligned__(x))) +#define _ALIGNAS_TYPE(x) __attribute__((__aligned__(__alignof(x)))) -#define _ATTRIBUTE(x) __attribute__((x)) +#define _LIBCPP_NORETURN __attribute__((noreturn)) #if !__EXCEPTIONS #define _LIBCPP_NO_EXCEPTIONS @@ -305,15 +314,15 @@ namespace std { #define _LIBCPP_HAS_NO_TRAILING_RETURN #define _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS -#if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 3) +#if _GNUC_VER < 403 #define _LIBCPP_HAS_NO_RVALUE_REFERENCES #endif -#if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 3) +#if _GNUC_VER < 403 #define _LIBCPP_HAS_NO_STATIC_ASSERT #endif -#if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 4) +#if _GNUC_VER < 404 #define _LIBCPP_HAS_NO_ADVANCED_SFINAE #define _LIBCPP_HAS_NO_DECLTYPE #define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS @@ -321,9 +330,9 @@ namespace std { #define _LIBCPP_HAS_NO_UNICODE_CHARS #define _LIBCPP_HAS_NO_VARIADICS #define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS -#endif // !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 4) +#endif // _GNUC_VER < 404 -#if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 6) +#if _GNUC_VER < 406 #define _LIBCPP_HAS_NO_NULLPTR #endif @@ -347,7 +356,7 @@ using namespace _LIBCPP_NAMESPACE __attr #define _LIBCPP_HAS_NO_UNICODE_CHARS #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS #define __alignof__ __alignof -#define _ATTRIBUTE __declspec +#define _LIBCPP_NORETURN __declspec(noreturn) #define _ALIGNAS(x) __declspec(align(x)) #define _LIBCPP_HAS_NO_VARIADICS @@ -389,6 +398,12 @@ template struct __static_asse #define _LIBCPP_CONSTEXPR constexpr #endif +#ifdef __GNUC__ +#define _NOALIAS __attribute__((malloc)) +#else +#define _NOALIAS +#endif + #ifndef __has_feature #define __has_feature(__x) 0 #endif @@ -404,6 +419,7 @@ template struct __static_asse #define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) \ _ __v_; \ _LIBCPP_ALWAYS_INLINE x(_ __v) : __v_(__v) {} \ + _LIBCPP_ALWAYS_INLINE explicit x(int __v) : __v_(static_cast<_>(__v)) {} \ _LIBCPP_ALWAYS_INLINE operator int() const {return __v_;} \ }; #else // _LIBCPP_HAS_NO_STRONG_ENUMS Modified: vendor/libc++/dist/include/__hash_table ============================================================================== --- vendor/libc++/dist/include/__hash_table Mon Oct 22 18:01:38 2012 (r241899) +++ vendor/libc++/dist/include/__hash_table Mon Oct 22 18:04:00 2012 (r241900) @@ -58,10 +58,31 @@ struct __hash_node value_type __value_; }; +inline _LIBCPP_INLINE_VISIBILITY +bool +__is_power2(size_t __bc) +{ + return __bc > 2 && !(__bc & (__bc - 1)); +} + +inline _LIBCPP_INLINE_VISIBILITY +size_t +__constrain_hash(size_t __h, size_t __bc) +{ + return !(__bc & (__bc - 1)) ? __h & (__bc - 1) : __h % __bc; +} + +inline _LIBCPP_INLINE_VISIBILITY +size_t +__next_pow2(size_t __n) +{ + return size_t(1) << (std::numeric_limits::digits - __clz(__n-1)); +} + template class __hash_table; -template class __hash_const_iterator; -template class __hash_map_iterator; -template class __hash_map_const_iterator; +template class _LIBCPP_VISIBLE __hash_const_iterator; +template class _LIBCPP_VISIBLE __hash_map_iterator; +template class _LIBCPP_VISIBLE __hash_map_const_iterator; template class _LIBCPP_VISIBLE unordered_map; @@ -240,7 +261,7 @@ public: __hash_local_iterator& operator++() { __node_ = __node_->__next_; - if (__node_ != nullptr && __node_->__hash_ % __bucket_count_ != __bucket_) + if (__node_ != nullptr && __constrain_hash(__node_->__hash_, __bucket_count_) != __bucket_) __node_ = nullptr; return *this; } @@ -330,7 +351,7 @@ public: __hash_const_local_iterator& operator++() { __node_ = __node_->__next_; - if (__node_ != nullptr && __node_->__hash_ % __bucket_count_ != __bucket_) + if (__node_ != nullptr && __constrain_hash(__node_->__hash_, __bucket_count_) != __bucket_) __node_ = nullptr; return *this; } @@ -637,7 +658,7 @@ public: template _LIBCPP_INLINE_VISIBILITY size_type bucket(const _Key& __k) const - {return hash_function()(__k) % bucket_count();} + {return __constrain_hash(hash_function()(__k), bucket_count());} template iterator find(const _Key& __x); @@ -871,7 +892,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> { if (size() > 0) { - __bucket_list_[__p1_.first().__next_->__hash_ % bucket_count()] = + __bucket_list_[__constrain_hash(__p1_.first().__next_->__hash_, bucket_count())] = static_cast<__node_pointer>(_VSTD::addressof(__p1_.first())); __u.__p1_.first().__next_ = nullptr; __u.size() = 0; @@ -895,7 +916,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> { __p1_.first().__next_ = __u.__p1_.first().__next_; __u.__p1_.first().__next_ = nullptr; - __bucket_list_[__p1_.first().__next_->__hash_ % bucket_count()] = + __bucket_list_[__constrain_hash(__p1_.first().__next_->__hash_, bucket_count())] = static_cast<__node_pointer>(_VSTD::addressof(__p1_.first())); size() = __u.size(); __u.size() = 0; @@ -992,7 +1013,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> __p1_.first().__next_ = __u.__p1_.first().__next_; if (size() > 0) { - __bucket_list_[__p1_.first().__next_->__hash_ % bucket_count()] = + __bucket_list_[__constrain_hash(__p1_.first().__next_->__hash_, bucket_count())] = static_cast<__node_pointer>(_VSTD::addressof(__p1_.first())); __u.__p1_.first().__next_ = nullptr; __u.size() = 0; @@ -1190,12 +1211,12 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> size_t __chash; if (__bc != 0) { - __chash = __nd->__hash_ % __bc; + __chash = __constrain_hash(__nd->__hash_, __bc); __ndptr = __bucket_list_[__chash]; if (__ndptr != nullptr) { for (__ndptr = __ndptr->__next_; __ndptr != nullptr && - __ndptr->__hash_ % __bc == __chash; + __constrain_hash(__ndptr->__hash_, __bc) == __chash; __ndptr = __ndptr->__next_) { if (key_eq()(__ndptr->__value_, __nd->__value_)) @@ -1206,10 +1227,10 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> { if (size()+1 > __bc * max_load_factor() || __bc == 0) { - rehash(_VSTD::max(2 * __bc + 1, + rehash(_VSTD::max(2 * __bc + !__is_power2(__bc), size_type(ceil(float(size() + 1) / max_load_factor())))); __bc = bucket_count(); - __chash = __nd->__hash_ % __bc; + __chash = __constrain_hash(__nd->__hash_, __bc); } // insert_after __bucket_list_[__chash], or __first_node if bucket is null __node_pointer __pn = __bucket_list_[__chash]; @@ -1221,7 +1242,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> // fix up __bucket_list_ __bucket_list_[__chash] = __pn; if (__nd->__next_ != nullptr) - __bucket_list_[__nd->__next_->__hash_ % __bc] = __nd; + __bucket_list_[__constrain_hash(__nd->__next_->__hash_, __bc)] = __nd; } else { @@ -1245,11 +1266,11 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> size_type __bc = bucket_count(); if (size()+1 > __bc * max_load_factor() || __bc == 0) { - rehash(_VSTD::max(2 * __bc + 1, + rehash(_VSTD::max(2 * __bc + !__is_power2(__bc), size_type(ceil(float(size() + 1) / max_load_factor())))); __bc = bucket_count(); } - size_t __chash = __cp->__hash_ % __bc; + size_t __chash = __constrain_hash(__cp->__hash_, __bc); __node_pointer __pn = __bucket_list_[__chash]; if (__pn == nullptr) { @@ -1259,12 +1280,12 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> // fix up __bucket_list_ __bucket_list_[__chash] = __pn; if (__cp->__next_ != nullptr) - __bucket_list_[__cp->__next_->__hash_ % __bc] = __cp; + __bucket_list_[__constrain_hash(__cp->__next_->__hash_, __bc)] = __cp; } else { for (bool __found = false; __pn->__next_ != nullptr && - __pn->__next_->__hash_ % __bc == __chash; + __constrain_hash(__pn->__next_->__hash_, __bc) == __chash; __pn = __pn->__next_) { // __found key_eq() action @@ -1285,7 +1306,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> __pn->__next_ = __cp; if (__cp->__next_ != nullptr) { - size_t __nhash = __cp->__next_->__hash_ % __bc; + size_t __nhash = __constrain_hash(__cp->__next_->__hash_, __bc); if (__nhash != __chash) __bucket_list_[__nhash] = __cp; } @@ -1306,11 +1327,11 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> size_type __bc = bucket_count(); if (size()+1 > __bc * max_load_factor() || __bc == 0) { - rehash(_VSTD::max(2 * __bc + 1, + rehash(_VSTD::max(2 * __bc + !__is_power2(__bc), size_type(ceil(float(size() + 1) / max_load_factor())))); __bc = bucket_count(); } - size_t __chash = __cp->__hash_ % __bc; + size_t __chash = __constrain_hash(__cp->__hash_, __bc); __node_pointer __pp = __bucket_list_[__chash]; while (__pp->__next_ != __np) __pp = __pp->__next_; @@ -1333,12 +1354,12 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> size_t __chash; if (__bc != 0) { - __chash = __hash % __bc; + __chash = __constrain_hash(__hash, __bc); __nd = __bucket_list_[__chash]; if (__nd != nullptr) { for (__nd = __nd->__next_; __nd != nullptr && - __nd->__hash_ % __bc == __chash; + __constrain_hash(__nd->__hash_, __bc) == __chash; __nd = __nd->__next_) { if (key_eq()(__nd->__value_, __x)) @@ -1350,10 +1371,10 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> __node_holder __h = __construct_node(__x, __hash); if (size()+1 > __bc * max_load_factor() || __bc == 0) { - rehash(_VSTD::max(2 * __bc + 1, + rehash(_VSTD::max(2 * __bc + !__is_power2(__bc), size_type(ceil(float(size() + 1) / max_load_factor())))); __bc = bucket_count(); - __chash = __hash % __bc; + __chash = __constrain_hash(__hash, __bc); } // insert_after __bucket_list_[__chash], or __first_node if bucket is null __node_pointer __pn = __bucket_list_[__chash]; @@ -1365,7 +1386,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> // fix up __bucket_list_ __bucket_list_[__chash] = __pn; if (__h->__next_ != nullptr) - __bucket_list_[__h->__next_->__hash_ % __bc] = __h.get(); + __bucket_list_[__constrain_hash(__h->__next_->__hash_, __bc)] = __h.get(); } else { @@ -1489,16 +1510,20 @@ template ::rehash(size_type __n) { - __n = __next_prime(_VSTD::max(__n, size() > 0)); + if (__n == 1) + __n = 2; + else if (__n & (__n - 1)) + __n = __next_prime(__n); size_type __bc = bucket_count(); if (__n > __bc) __rehash(__n); - else + else if (__n < __bc) { __n = _VSTD::max ( __n, - __next_prime(size_t(ceil(float(size()) / max_load_factor()))) + __is_power2(__bc) ? __next_pow2(size_t(ceil(float(size()) / max_load_factor()))) : + __next_prime(size_t(ceil(float(size()) / max_load_factor()))) ); if (__n < __bc) __rehash(__n); @@ -1521,13 +1546,13 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> __node_pointer __cp = __pp->__next_; if (__cp != nullptr) { - size_type __chash = __cp->__hash_ % __nbc; + size_type __chash = __constrain_hash(__cp->__hash_, __nbc); __bucket_list_[__chash] = __pp; size_type __phash = __chash; for (__pp = __cp, __cp = __cp->__next_; __cp != nullptr; __cp = __pp->__next_) { - __chash = __cp->__hash_ % __nbc; + __chash = __constrain_hash(__cp->__hash_, __nbc); if (__chash == __phash) __pp = __cp; else @@ -1565,12 +1590,12 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> size_type __bc = bucket_count(); if (__bc != 0) { - size_t __chash = __hash % __bc; + size_t __chash = __constrain_hash(__hash, __bc); __node_pointer __nd = __bucket_list_[__chash]; if (__nd != nullptr) { for (__nd = __nd->__next_; __nd != nullptr && - __nd->__hash_ % __bc == __chash; + __constrain_hash(__nd->__hash_, __bc) == __chash; __nd = __nd->__next_) { if (key_eq()(__nd->__value_, __k)) @@ -1590,12 +1615,12 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> size_type __bc = bucket_count(); if (__bc != 0) { - size_t __chash = __hash % __bc; + size_t __chash = __constrain_hash(__hash, __bc); __node_const_pointer __nd = __bucket_list_[__chash]; if (__nd != nullptr) { for (__nd = __nd->__next_; __nd != nullptr && - __nd->__hash_ % __bc == __chash; + __constrain_hash(__nd->__hash_, __bc) == __chash; __nd = __nd->__next_) { if (key_eq()(__nd->__value_, __k)) @@ -1734,7 +1759,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> // current node __node_pointer __cn = const_cast<__node_pointer>(__p.__node_); size_type __bc = bucket_count(); - size_t __chash = __cn->__hash_ % __bc; + size_t __chash = __constrain_hash(__cn->__hash_, __bc); // find previous node __node_pointer __pn = __bucket_list_[__chash]; for (; __pn->__next_ != __cn; __pn = __pn->__next_) @@ -1742,15 +1767,15 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> // Fix up __bucket_list_ // if __pn is not in same bucket (before begin is not in same bucket) && // if __cn->__next_ is not in same bucket (nullptr is not in same bucket) - if (__pn == _VSTD::addressof(__p1_.first()) || __pn->__hash_ % __bc != __chash) + if (__pn == _VSTD::addressof(__p1_.first()) || __constrain_hash(__pn->__hash_, __bc) != __chash) { - if (__cn->__next_ == nullptr || __cn->__next_->__hash_ % __bc != __chash) + if (__cn->__next_ == nullptr || __constrain_hash(__cn->__next_->__hash_, __bc) != __chash) __bucket_list_[__chash] = nullptr; } // if __cn->__next_ is not in same bucket (nullptr is in same bucket) if (__cn->__next_ != nullptr) { - size_t __nhash = __cn->__next_->__hash_ % __bc; + size_t __nhash = __constrain_hash(__cn->__next_->__hash_, __bc); if (__nhash != __chash) __bucket_list_[__nhash] = __pn; } @@ -1881,10 +1906,10 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> __p2_.swap(__u.__p2_); __p3_.swap(__u.__p3_); if (size() > 0) - __bucket_list_[__p1_.first().__next_->__hash_ % bucket_count()] = + __bucket_list_[__constrain_hash(__p1_.first().__next_->__hash_, bucket_count())] = static_cast<__node_pointer>(_VSTD::addressof(__p1_.first())); if (__u.size() > 0) - __u.__bucket_list_[__u.__p1_.first().__next_->__hash_ % __u.bucket_count()] = + __u.__bucket_list_[__constrain_hash(__u.__p1_.first().__next_->__hash_, __u.bucket_count())] = static_cast<__node_pointer>(_VSTD::addressof(__u.__p1_.first())); } @@ -1898,7 +1923,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> if (__np != nullptr) { for (__np = __np->__next_; __np != nullptr && - __np->__hash_ % __bc == __n; + __constrain_hash(__np->__hash_, __bc) == __n; __np = __np->__next_, ++__r) ; } Modified: vendor/libc++/dist/include/__locale ============================================================================== --- vendor/libc++/dist/include/__locale Mon Oct 22 18:01:38 2012 (r241899) +++ vendor/libc++/dist/include/__locale Mon Oct 22 18:04:00 2012 (r241900) @@ -31,17 +31,24 @@ _LIBCPP_BEGIN_NAMESPACE_STD -class locale; +class _LIBCPP_VISIBLE locale; -template bool has_facet(const locale&) _NOEXCEPT; -template const _Facet& use_facet(const locale&); +template +_LIBCPP_INLINE_VISIBILITY +bool +has_facet(const locale&) _NOEXCEPT; + +template +_LIBCPP_INLINE_VISIBILITY +const _Facet& +use_facet(const locale&); class _LIBCPP_VISIBLE locale { public: // types: - class facet; - class id; + class _LIBCPP_VISIBLE facet; + class _LIBCPP_VISIBLE id; typedef int category; static const category // values assigned here are for exposition only @@ -119,7 +126,7 @@ class _LIBCPP_VISIBLE locale::id static int32_t __next_id; public: - _LIBCPP_INLINE_VISIBILITY id() {} + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR id() :__id_(0) {} private: void __init(); void operator=(const id&); // = delete; Modified: vendor/libc++/dist/include/__mutex_base ============================================================================== --- vendor/libc++/dist/include/__mutex_base Mon Oct 22 18:01:38 2012 (r241899) +++ vendor/libc++/dist/include/__mutex_base Mon Oct 22 18:04:00 2012 (r241900) @@ -38,7 +38,11 @@ class _LIBCPP_VISIBLE mutex public: _LIBCPP_INLINE_VISIBILITY - mutex() {__m_ = (pthread_mutex_t)PTHREAD_MUTEX_INITIALIZER;} +#ifndef _LIBCPP_HAS_NO_CONSTEXPR + constexpr mutex() _NOEXCEPT : __m_(PTHREAD_MUTEX_INITIALIZER) {} +#else + mutex() _NOEXCEPT {__m_ = (pthread_mutex_t)PTHREAD_MUTEX_INITIALIZER;} +#endif ~mutex(); private: @@ -47,8 +51,8 @@ private: public: void lock(); - bool try_lock(); - void unlock(); + bool try_lock() _NOEXCEPT; + void unlock() _NOEXCEPT; typedef pthread_mutex_t* native_handle_type; _LIBCPP_INLINE_VISIBILITY native_handle_type native_handle() {return &__m_;} @@ -58,17 +62,19 @@ struct _LIBCPP_VISIBLE defer_lock_t {}; struct _LIBCPP_VISIBLE try_to_lock_t {}; struct _LIBCPP_VISIBLE adopt_lock_t {}; -//constexpr -extern const -defer_lock_t defer_lock; - -//constexpr -extern const -try_to_lock_t try_to_lock; - -//constexpr -extern const -adopt_lock_t adopt_lock; +#if defined(_LIBCPP_HAS_NO_CONSTEXPR) || defined(_LIBCPP_BUILDING_MUTEX) + +extern const defer_lock_t defer_lock; +extern const try_to_lock_t try_to_lock; +extern const adopt_lock_t adopt_lock; + +#else + +constexpr defer_lock_t defer_lock = defer_lock_t(); +constexpr try_to_lock_t try_to_lock = try_to_lock_t(); +constexpr adopt_lock_t adopt_lock = adopt_lock_t(); + +#endif template class _LIBCPP_VISIBLE lock_guard @@ -106,12 +112,12 @@ private: public: _LIBCPP_INLINE_VISIBILITY - unique_lock() : __m_(nullptr), __owns_(false) {} + unique_lock() _NOEXCEPT : __m_(nullptr), __owns_(false) {} _LIBCPP_INLINE_VISIBILITY explicit unique_lock(mutex_type& __m) : __m_(&__m), __owns_(true) {__m_->lock();} _LIBCPP_INLINE_VISIBILITY - unique_lock(mutex_type& __m, defer_lock_t) + unique_lock(mutex_type& __m, defer_lock_t) _NOEXCEPT : __m_(&__m), __owns_(false) {} _LIBCPP_INLINE_VISIBILITY unique_lock(mutex_type& __m, try_to_lock_t) @@ -141,11 +147,11 @@ private: public: #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY - unique_lock(unique_lock&& __u) + unique_lock(unique_lock&& __u) _NOEXCEPT : __m_(__u.__m_), __owns_(__u.__owns_) {__u.__m_ = nullptr; __u.__owns_ = false;} _LIBCPP_INLINE_VISIBILITY - unique_lock& operator=(unique_lock&& __u) + unique_lock& operator=(unique_lock&& __u) _NOEXCEPT { if (__owns_) __m_->unlock(); @@ -190,13 +196,13 @@ public: void unlock(); _LIBCPP_INLINE_VISIBILITY *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 18:05: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 9B2C9CCF; Mon, 22 Oct 2012 18:05:02 +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 695DE8FC0A; Mon, 22 Oct 2012 18:05: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 q9MI529i065924; Mon, 22 Oct 2012 18:05:02 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MI52MP065923; Mon, 22 Oct 2012 18:05:02 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201210221805.q9MI52MP065923@svn.freebsd.org> From: Dimitry Andric Date: Mon, 22 Oct 2012 18:05:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r241901 - vendor/libc++/r165949 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 18:05:02 -0000 Author: dim Date: Mon Oct 22 18:05:01 2012 New Revision: 241901 URL: http://svn.freebsd.org/changeset/base/241901 Log: Tag libc++ trunk r165949. Added: vendor/libc++/r165949/ - copied from r241900, vendor/libc++/dist/ From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 18:14: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 CA8401EC; Mon, 22 Oct 2012 18:14:27 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 977AD8FC12; Mon, 22 Oct 2012 18:14: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 q9MIERov068470; Mon, 22 Oct 2012 18:14:27 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MIERFb068467; Mon, 22 Oct 2012 18:14:27 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201210221814.q9MIERFb068467@svn.freebsd.org> From: Devin Teske Date: Mon, 22 Oct 2012 18:14:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241902 - in head/usr.sbin/bsdinstall: . scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 18:14:27 -0000 Author: dteske Date: Mon Oct 22 18:14:27 2012 New Revision: 241902 URL: http://svn.freebsd.org/changeset/base/241902 Log: Optimize syntax to use builtins and reduce unnecessary forking where possible. Reviewed by: nwhitehorn Approved by: adrian (co-mentor) Modified: head/usr.sbin/bsdinstall/bsdinstall head/usr.sbin/bsdinstall/scripts/auto Modified: head/usr.sbin/bsdinstall/bsdinstall ============================================================================== --- head/usr.sbin/bsdinstall/bsdinstall Mon Oct 22 18:05:01 2012 (r241901) +++ head/usr.sbin/bsdinstall/bsdinstall Mon Oct 22 18:14:27 2012 (r241902) @@ -32,12 +32,8 @@ : ${BSDINSTALL_DISTDIR="/usr/freebsd-dist"}; export BSDINSTALL_DISTDIR : ${BSDINSTALL_CHROOT="/mnt"}; export BSDINSTALL_CHROOT -VERB=$1; shift +VERB=${1:-auto}; shift -if [ -z "$VERB" ]; then - VERB=auto -fi - -test -d "$BSDINSTALL_TMPETC" || mkdir "$BSDINSTALL_TMPETC" +[ -d "$BSDINSTALL_TMPETC" ] || mkdir -p "$BSDINSTALL_TMPETC" echo "Running installation step: $VERB $@" >> "$BSDINSTALL_LOG" -exec "/usr/libexec/bsdinstall/$VERB" "$@" 2>>"$BSDINSTALL_LOG" +exec "/usr/libexec/bsdinstall/$VERB" "$@" 2>> "$BSDINSTALL_LOG" Modified: head/usr.sbin/bsdinstall/scripts/auto ============================================================================== --- head/usr.sbin/bsdinstall/scripts/auto Mon Oct 22 18:05:01 2012 (r241901) +++ head/usr.sbin/bsdinstall/scripts/auto Mon Oct 22 18:14:27 2012 (r241902) @@ -53,15 +53,15 @@ bsdinstall hostname || error export DISTRIBUTIONS="base.txz kernel.txz" if [ -f $BSDINSTALL_DISTDIR/MANIFEST ]; then - DISTMENU=`cut -f 4,5,6 $BSDINSTALL_DISTDIR/MANIFEST | grep -v -e ^kernel -e ^base` + DISTMENU=`awk '!/^(kernel|base)/{print $4,$5,$6}' $BSDINSTALL_DISTDIR/MANIFEST` exec 3>&1 - EXTRA_DISTS=$(echo $DISTMENU | xargs dialog \ - --backtitle "FreeBSD Installer" \ - --title "Distribution Select" --nocancel --separate-output \ - --checklist "Choose optional system components to install:" \ - 0 0 0 \ - 2>&1 1>&3) + EXTRA_DISTS=$( eval dialog \ + --backtitle \"FreeBSD Installer\" \ + --title \"Distribution Select\" --nocancel --separate-output \ + --checklist \"Choose optional system components to install:\" \ + 0 0 0 $DISTMENU \ + 2>&1 1>&3 ) for dist in $EXTRA_DISTS; do export DISTRIBUTIONS="$DISTRIBUTIONS $dist.txz" done From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 18:25: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 92BB24FF; Mon, 22 Oct 2012 18:25:05 +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 770B08FC12; Mon, 22 Oct 2012 18:25:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9MIP5Tl071082; Mon, 22 Oct 2012 18:25:05 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MIP5B0071073; Mon, 22 Oct 2012 18:25:05 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201210221825.q9MIP5B0071073@svn.freebsd.org> From: Dimitry Andric Date: Mon, 22 Oct 2012 18:25:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241903 - in head/contrib/libc++: . include src src/support X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 18:25:05 -0000 Author: dim Date: Mon Oct 22 18:25:04 2012 New Revision: 241903 URL: http://svn.freebsd.org/changeset/base/241903 Log: Import libc++ trunk r165949. Among other improvements and bug fixes, this has many visibility problems fixed, which should help with compiling certain ports that exercise C++11 mode (i.e. Firefox). Also, belatedly add the LICENSE.TXT and accompanying CREDITS.TXT files, which are referred to in all the source files. MFC after: 1 month Added: head/contrib/libc++/CREDITS.TXT - copied unchanged from r241901, vendor/libc++/dist/CREDITS.TXT head/contrib/libc++/LICENSE.TXT - copied unchanged from r241901, vendor/libc++/dist/LICENSE.TXT Deleted: head/contrib/libc++/src/support/ Modified: head/contrib/libc++/include/__bit_reference head/contrib/libc++/include/__config head/contrib/libc++/include/__hash_table head/contrib/libc++/include/__locale head/contrib/libc++/include/__mutex_base head/contrib/libc++/include/__tree head/contrib/libc++/include/__tuple head/contrib/libc++/include/__undef_min_max head/contrib/libc++/include/algorithm head/contrib/libc++/include/array head/contrib/libc++/include/atomic head/contrib/libc++/include/bitset head/contrib/libc++/include/chrono head/contrib/libc++/include/cmath head/contrib/libc++/include/complex head/contrib/libc++/include/condition_variable head/contrib/libc++/include/cstddef head/contrib/libc++/include/cstdio head/contrib/libc++/include/cstdlib head/contrib/libc++/include/deque head/contrib/libc++/include/exception head/contrib/libc++/include/forward_list head/contrib/libc++/include/fstream head/contrib/libc++/include/functional head/contrib/libc++/include/future head/contrib/libc++/include/ios head/contrib/libc++/include/iosfwd head/contrib/libc++/include/istream head/contrib/libc++/include/iterator head/contrib/libc++/include/list head/contrib/libc++/include/locale head/contrib/libc++/include/map head/contrib/libc++/include/memory head/contrib/libc++/include/mutex head/contrib/libc++/include/new head/contrib/libc++/include/ostream head/contrib/libc++/include/queue head/contrib/libc++/include/random head/contrib/libc++/include/regex head/contrib/libc++/include/stack head/contrib/libc++/include/streambuf head/contrib/libc++/include/string head/contrib/libc++/include/system_error head/contrib/libc++/include/thread head/contrib/libc++/include/tuple head/contrib/libc++/include/type_traits head/contrib/libc++/include/unordered_map head/contrib/libc++/include/utility head/contrib/libc++/include/valarray head/contrib/libc++/include/vector head/contrib/libc++/src/condition_variable.cpp head/contrib/libc++/src/debug.cpp head/contrib/libc++/src/exception.cpp head/contrib/libc++/src/future.cpp head/contrib/libc++/src/ios.cpp head/contrib/libc++/src/iostream.cpp head/contrib/libc++/src/locale.cpp head/contrib/libc++/src/memory.cpp head/contrib/libc++/src/mutex.cpp head/contrib/libc++/src/new.cpp head/contrib/libc++/src/random.cpp head/contrib/libc++/src/stdexcept.cpp head/contrib/libc++/src/thread.cpp head/contrib/libc++/src/typeinfo.cpp Directory Properties: head/contrib/libc++/ (props changed) Copied: head/contrib/libc++/CREDITS.TXT (from r241901, vendor/libc++/dist/CREDITS.TXT) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/libc++/CREDITS.TXT Mon Oct 22 18:25:04 2012 (r241903, copy of r241901, vendor/libc++/dist/CREDITS.TXT) @@ -0,0 +1,76 @@ +This file is a partial list of people who have contributed to the LLVM/libc++ +project. If you have contributed a patch or made some other contribution to +LLVM/libc++, please submit a patch to this file to add yourself, and it will be +done! + +The list is sorted by surname and formatted to allow easy grepping and +beautification by scripts. The fields are: name (N), email (E), web-address +(W), PGP key ID and fingerprint (P), description (D), and snail-mail address +(S). + +N: Howard Hinnant +E: hhinnant@apple.com +D: Architect and primary author of libc++ + +N: Marshall Clow +E: mclow.lists@gmail.com +E: marshall@idio.com +D: Minor patches and bug fixes. + +N: Bjorn Reese +E: breese@users.sourceforge.net +D: Initial regex prototype + +N: David Chisnall +E: theraven at theravensnest dot org +D: FreeBSD and Solaris ports, libcxxrt support, some atomics work. + +N: Ruben Van Boxem +E: vanboxem dot ruben at gmail dot com +D: Initial Windows patches. + +N: Arvid Picciani +E: aep at exys dot org +D: Minor patches and musl port. + +N: Craig Silverstein +E: csilvers@google.com +D: Implemented Cityhash as the string hash function on 64-bit machines + +N: Google Inc. +D: Copyright owner and contributor of the CityHash algorithm + +N: Jeffrey Yasskin +E: jyasskin@gmail.com +E: jyasskin@google.com +D: Linux fixes. + +N: Jonathan Sauer +D: Minor patches, mostly related to constexpr + +N: Richard Smith +D: Minor patches. + +N: Andrew Morrow +E: andrew.c.morrow@gmail.com +D: Minor patches and Linux fixes. + +N: Hyeon-bin Jeong +E: tuhertz@gmail.com +D: Minor patches and bug fixes. + +N: Michel Morin +E: mimomorin@gmail.com +D: Minor patches to is_convertible. + +N: Dimitry Andric +E: dimitry@andric.com +D: Visibility fixes, minor FreeBSD portability patches. + +N: Holger Arnold +E: holgerar@gmail.com +D: Minor fix. + +N: Argyrios Kyrtzidis +E: kyrtzidis@apple.com +D: Bug fixes. Copied: head/contrib/libc++/LICENSE.TXT (from r241901, vendor/libc++/dist/LICENSE.TXT) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/libc++/LICENSE.TXT Mon Oct 22 18:25:04 2012 (r241903, copy of r241901, vendor/libc++/dist/LICENSE.TXT) @@ -0,0 +1,76 @@ +============================================================================== +libc++ License +============================================================================== + +The libc++ library is dual licensed under both the University of Illinois +"BSD-Like" license and the MIT license. As a user of this code you may choose +to use it under either license. As a contributor, you agree to allow your code +to be used under both. + +Full text of the relevant licenses is included below. + +============================================================================== + +University of Illinois/NCSA +Open Source License + +Copyright (c) 2009-2012 by the contributors listed in CREDITS.TXT + +All rights reserved. + +Developed by: + + LLVM Team + + University of Illinois at Urbana-Champaign + + http://llvm.org + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal with +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimers. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimers in the + documentation and/or other materials provided with the distribution. + + * Neither the names of the LLVM Team, University of Illinois at + Urbana-Champaign, nor the names of its contributors may be used to + endorse or promote products derived from this Software without specific + prior written permission. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +SOFTWARE. + +============================================================================== + +Copyright (c) 2009-2012 by the contributors listed in CREDITS.TXT + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. Modified: head/contrib/libc++/include/__bit_reference ============================================================================== --- head/contrib/libc++/include/__bit_reference Mon Oct 22 18:14:27 2012 (r241902) +++ head/contrib/libc++/include/__bit_reference Mon Oct 22 18:25:04 2012 (r241903) @@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template class __bit_iterator; +template class __bit_iterator; template class __bit_const_reference; template @@ -131,13 +131,14 @@ public: __bit_const_reference(const __bit_reference<_Cp>& __x) _NOEXCEPT : __seg_(__x.__seg_), __mask_(__x.__mask_) {} - _LIBCPP_INLINE_VISIBILITY operator bool() const _NOEXCEPT + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR operator bool() const _NOEXCEPT {return static_cast(*__seg_ & __mask_);} _LIBCPP_INLINE_VISIBILITY __bit_iterator<_Cp, true> operator&() const _NOEXCEPT {return __bit_iterator<_Cp, true>(__seg_, static_cast(__ctz(__mask_)));} private: _LIBCPP_INLINE_VISIBILITY + _LIBCPP_CONSTEXPR __bit_const_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT : __seg_(__s), __mask_(__m) {} @@ -146,11 +147,11 @@ private: // find -template -__bit_iterator<_Cp, false> -__find_bool_true(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) +template +__bit_iterator<_Cp, _IsConst> +__find_bool_true(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n) { - typedef __bit_iterator<_Cp, false> _It; + typedef __bit_iterator<_Cp, _IsConst> _It; typedef typename _It::__storage_type __storage_type; static const unsigned __bits_per_word = _It::__bits_per_word; // do first partial word @@ -180,11 +181,11 @@ __find_bool_true(__bit_iterator<_Cp, fal return _It(__first.__seg_, static_cast(__n)); } -template -__bit_iterator<_Cp, false> -__find_bool_false(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) +template +__bit_iterator<_Cp, _IsConst> +__find_bool_false(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n) { - typedef __bit_iterator<_Cp, false> _It; + typedef __bit_iterator<_Cp, _IsConst> _It; typedef typename _It::__storage_type __storage_type; static const unsigned __bits_per_word = _It::__bits_per_word; // do first partial word @@ -193,7 +194,7 @@ __find_bool_false(__bit_iterator<_Cp, fa __storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_); __storage_type __dn = _VSTD::min(__clz_f, __n); __storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn)); - __storage_type __b = ~(*__first.__seg_ & __m); + __storage_type __b = ~*__first.__seg_ & __m; if (__b) return _It(__first.__seg_, static_cast(_VSTD::__ctz(__b))); __n -= __dn; @@ -210,17 +211,17 @@ __find_bool_false(__bit_iterator<_Cp, fa if (__n > 0) { __storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n); - __storage_type __b = ~(*__first.__seg_ & __m); + __storage_type __b = ~*__first.__seg_ & __m; if (__b) return _It(__first.__seg_, static_cast(_VSTD::__ctz(__b))); } return _It(__first.__seg_, static_cast(__n)); } -template +template inline _LIBCPP_INLINE_VISIBILITY -__bit_iterator<_Cp, false> -find(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __last, const _Tp& __value_) +__bit_iterator<_Cp, _IsConst> +find(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, const _Tp& __value_) { if (static_cast(__value_)) return __find_bool_true(__first, static_cast(__last - __first)); @@ -229,11 +230,11 @@ find(__bit_iterator<_Cp, false> __first, // count -template -typename __bit_iterator<_Cp, false>::difference_type -__count_bool_true(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) +template +typename __bit_iterator<_Cp, _IsConst>::difference_type +__count_bool_true(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n) { - typedef __bit_iterator<_Cp, false> _It; + typedef __bit_iterator<_Cp, _IsConst> _It; typedef typename _It::__storage_type __storage_type; typedef typename _It::difference_type difference_type; static const unsigned __bits_per_word = _It::__bits_per_word; @@ -260,11 +261,11 @@ __count_bool_true(__bit_iterator<_Cp, fa return __r; } -template -typename __bit_iterator<_Cp, false>::difference_type -__count_bool_false(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n) +template +typename __bit_iterator<_Cp, _IsConst>::difference_type +__count_bool_false(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n) { - typedef __bit_iterator<_Cp, false> _It; + typedef __bit_iterator<_Cp, _IsConst> _It; typedef typename _It::__storage_type __storage_type; typedef typename _It::difference_type difference_type; static const unsigned __bits_per_word = _It::__bits_per_word; @@ -275,7 +276,7 @@ __count_bool_false(__bit_iterator<_Cp, f __storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_); __storage_type __dn = _VSTD::min(__clz_f, __n); __storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn)); - __r = _VSTD::__pop_count(~(*__first.__seg_ & __m)); + __r = _VSTD::__pop_count(~*__first.__seg_ & __m); __n -= __dn; ++__first.__seg_; } @@ -286,15 +287,15 @@ __count_bool_false(__bit_iterator<_Cp, f if (__n > 0) { __storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n); - __r += _VSTD::__pop_count(~(*__first.__seg_ & __m)); + __r += _VSTD::__pop_count(~*__first.__seg_ & __m); } return __r; } -template +template inline _LIBCPP_INLINE_VISIBILITY -typename __bit_iterator<_Cp, false>::difference_type -count(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __last, const _Tp& __value_) +typename __bit_iterator<_Cp, _IsConst>::difference_type +count(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, const _Tp& __value_) { if (static_cast(__value_)) return __count_bool_true(__first, static_cast(__last - __first)); @@ -926,12 +927,12 @@ rotate(__bit_iterator<_Cp, false> __firs // equal -template +template bool -__equal_unaligned(__bit_iterator<_Cp, true> __first1, __bit_iterator<_Cp, true> __last1, - __bit_iterator<_Cp, true> __first2) +__equal_unaligned(__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1> __last1, + __bit_iterator<_Cp, _IC2> __first2) { - typedef __bit_iterator<_Cp, true> _It; + typedef __bit_iterator<_Cp, _IC1> _It; typedef typename _It::difference_type difference_type; typedef typename _It::__storage_type __storage_type; static const unsigned __bits_per_word = _It::__bits_per_word; @@ -1008,12 +1009,12 @@ __equal_unaligned(__bit_iterator<_Cp, tr return true; } -template +template bool -__equal_aligned(__bit_iterator<_Cp, true> __first1, __bit_iterator<_Cp, true> __last1, - __bit_iterator<_Cp, true> __first2) +__equal_aligned(__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1> __last1, + __bit_iterator<_Cp, _IC2> __first2) { - typedef __bit_iterator<_Cp, true> _It; + typedef __bit_iterator<_Cp, _IC1> _It; typedef typename _It::difference_type difference_type; typedef typename _It::__storage_type __storage_type; static const unsigned __bits_per_word = _It::__bits_per_word; @@ -1061,7 +1062,8 @@ equal(__bit_iterator<_Cp, _IC1> __first1 return __equal_unaligned(__first1, __last1, __first2); } -template +template class __bit_iterator { public: @@ -1232,19 +1234,23 @@ private: template friend __bit_iterator<_Dp, false> rotate(__bit_iterator<_Dp, false>, __bit_iterator<_Dp, false>, __bit_iterator<_Dp, false>); - template friend bool __equal_aligned(__bit_iterator<_Dp, true>, - __bit_iterator<_Dp, true>, - __bit_iterator<_Dp, true>); - template friend bool __equal_unaligned(__bit_iterator<_Dp, true>, - __bit_iterator<_Dp, true>, - __bit_iterator<_Dp, true>); + template friend bool __equal_aligned(__bit_iterator<_Dp, _IC1>, + __bit_iterator<_Dp, _IC1>, + __bit_iterator<_Dp, _IC2>); + template friend bool __equal_unaligned(__bit_iterator<_Dp, _IC1>, + __bit_iterator<_Dp, _IC1>, + __bit_iterator<_Dp, _IC2>); template friend bool equal(__bit_iterator<_Dp, _IC1>, __bit_iterator<_Dp, _IC1>, __bit_iterator<_Dp, _IC2>); - template friend __bit_iterator<_Dp, false> __find_bool_true(__bit_iterator<_Dp, false>, + template friend __bit_iterator<_Dp, _IC> __find_bool_true(__bit_iterator<_Dp, _IC>, typename _Dp::size_type); - template friend __bit_iterator<_Dp, false> __find_bool_false(__bit_iterator<_Dp, false>, + template friend __bit_iterator<_Dp, _IC> __find_bool_false(__bit_iterator<_Dp, _IC>, typename _Dp::size_type); + template friend typename __bit_iterator<_Dp, _IC>::difference_type + __count_bool_true(__bit_iterator<_Dp, _IC>, typename _Dp::size_type); + template friend typename __bit_iterator<_Dp, _IC>::difference_type + __count_bool_false(__bit_iterator<_Dp, _IC>, typename _Dp::size_type); }; _LIBCPP_END_NAMESPACE_STD Modified: head/contrib/libc++/include/__config ============================================================================== --- head/contrib/libc++/include/__config Mon Oct 22 18:14:27 2012 (r241902) +++ head/contrib/libc++/include/__config Mon Oct 22 18:25:04 2012 (r241903) @@ -15,7 +15,11 @@ #pragma GCC system_header #endif -#define _LIBCPP_VERSION 1001 +#ifdef __GNUC__ +#define _GNUC_VER (__GNUC__ * 100 + __GNUC_MINOR__) +#endif + +#define _LIBCPP_VERSION 1101 #define _LIBCPP_ABI_VERSION 1 @@ -53,7 +57,8 @@ # define _LIBCPP_LITTLE_ENDIAN 1 # define _LIBCPP_BIG_ENDIAN 0 // Compiler intrinsics (GCC or MSVC) -# if (defined(_MSC_VER) && _MSC_VER >= 1400) || (__GNUC__ >= 4 && __GNUC_MINOR__ > 3) +# if (defined(_MSC_VER) && _MSC_VER >= 1400) \ + || (defined(__GNUC__) && _GNUC_VER > 403) # define _LIBCP_HAS_IS_BASE_OF # endif #endif // _WIN32 @@ -145,8 +150,10 @@ #if defined(__clang__) #if __has_feature(cxx_alignas) +# define _ALIGNAS_TYPE(x) alignas(x) # define _ALIGNAS(x) alignas(x) #else +# define _ALIGNAS_TYPE(x) __attribute__((__aligned__(__alignof(x)))) # define _ALIGNAS(x) __attribute__((__aligned__(x))) #endif @@ -180,9 +187,9 @@ typedef __char32_t char32_t; #endif #if __has_feature(cxx_attributes) -# define _ATTRIBUTE(x) [[x]] +# define _LIBCPP_NORETURN [[noreturn]] #else -# define _ATTRIBUTE(x) __attribute__ ((x)) +# define _LIBCPP_NORETURN __attribute__ ((noreturn)) #endif #define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS @@ -245,8 +252,9 @@ typedef __char32_t char32_t; #define _LIBCPP_HAS_NO_CONSTEXPR #endif -#if __FreeBSD__ +#if __FreeBSD__ && (__ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L) #define _LIBCPP_HAS_QUICK_EXIT +#define _LIBCPP_HAS_C11_FEATURES #endif #if (__has_feature(cxx_noexcept)) @@ -274,8 +282,9 @@ namespace std { #elif defined(__GNUC__) #define _ALIGNAS(x) __attribute__((__aligned__(x))) +#define _ALIGNAS_TYPE(x) __attribute__((__aligned__(__alignof(x)))) -#define _ATTRIBUTE(x) __attribute__((x)) +#define _LIBCPP_NORETURN __attribute__((noreturn)) #if !__EXCEPTIONS #define _LIBCPP_NO_EXCEPTIONS @@ -305,15 +314,15 @@ namespace std { #define _LIBCPP_HAS_NO_TRAILING_RETURN #define _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS -#if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 3) +#if _GNUC_VER < 403 #define _LIBCPP_HAS_NO_RVALUE_REFERENCES #endif -#if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 3) +#if _GNUC_VER < 403 #define _LIBCPP_HAS_NO_STATIC_ASSERT #endif -#if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 4) +#if _GNUC_VER < 404 #define _LIBCPP_HAS_NO_ADVANCED_SFINAE #define _LIBCPP_HAS_NO_DECLTYPE #define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS @@ -321,9 +330,9 @@ namespace std { #define _LIBCPP_HAS_NO_UNICODE_CHARS #define _LIBCPP_HAS_NO_VARIADICS #define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS -#endif // !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 4) +#endif // _GNUC_VER < 404 -#if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 6) +#if _GNUC_VER < 406 #define _LIBCPP_HAS_NO_NULLPTR #endif @@ -347,7 +356,7 @@ using namespace _LIBCPP_NAMESPACE __attr #define _LIBCPP_HAS_NO_UNICODE_CHARS #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS #define __alignof__ __alignof -#define _ATTRIBUTE __declspec +#define _LIBCPP_NORETURN __declspec(noreturn) #define _ALIGNAS(x) __declspec(align(x)) #define _LIBCPP_HAS_NO_VARIADICS @@ -389,6 +398,12 @@ template struct __static_asse #define _LIBCPP_CONSTEXPR constexpr #endif +#ifdef __GNUC__ +#define _NOALIAS __attribute__((malloc)) +#else +#define _NOALIAS +#endif + #ifndef __has_feature #define __has_feature(__x) 0 #endif @@ -404,6 +419,7 @@ template struct __static_asse #define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) \ _ __v_; \ _LIBCPP_ALWAYS_INLINE x(_ __v) : __v_(__v) {} \ + _LIBCPP_ALWAYS_INLINE explicit x(int __v) : __v_(static_cast<_>(__v)) {} \ _LIBCPP_ALWAYS_INLINE operator int() const {return __v_;} \ }; #else // _LIBCPP_HAS_NO_STRONG_ENUMS Modified: head/contrib/libc++/include/__hash_table ============================================================================== --- head/contrib/libc++/include/__hash_table Mon Oct 22 18:14:27 2012 (r241902) +++ head/contrib/libc++/include/__hash_table Mon Oct 22 18:25:04 2012 (r241903) @@ -58,10 +58,31 @@ struct __hash_node value_type __value_; }; +inline _LIBCPP_INLINE_VISIBILITY +bool +__is_power2(size_t __bc) +{ + return __bc > 2 && !(__bc & (__bc - 1)); +} + +inline _LIBCPP_INLINE_VISIBILITY +size_t +__constrain_hash(size_t __h, size_t __bc) +{ + return !(__bc & (__bc - 1)) ? __h & (__bc - 1) : __h % __bc; +} + +inline _LIBCPP_INLINE_VISIBILITY +size_t +__next_pow2(size_t __n) +{ + return size_t(1) << (std::numeric_limits::digits - __clz(__n-1)); +} + template class __hash_table; -template class __hash_const_iterator; -template class __hash_map_iterator; -template class __hash_map_const_iterator; +template class _LIBCPP_VISIBLE __hash_const_iterator; +template class _LIBCPP_VISIBLE __hash_map_iterator; +template class _LIBCPP_VISIBLE __hash_map_const_iterator; template class _LIBCPP_VISIBLE unordered_map; @@ -240,7 +261,7 @@ public: __hash_local_iterator& operator++() { __node_ = __node_->__next_; - if (__node_ != nullptr && __node_->__hash_ % __bucket_count_ != __bucket_) + if (__node_ != nullptr && __constrain_hash(__node_->__hash_, __bucket_count_) != __bucket_) __node_ = nullptr; return *this; } @@ -330,7 +351,7 @@ public: __hash_const_local_iterator& operator++() { __node_ = __node_->__next_; - if (__node_ != nullptr && __node_->__hash_ % __bucket_count_ != __bucket_) + if (__node_ != nullptr && __constrain_hash(__node_->__hash_, __bucket_count_) != __bucket_) __node_ = nullptr; return *this; } @@ -637,7 +658,7 @@ public: template _LIBCPP_INLINE_VISIBILITY size_type bucket(const _Key& __k) const - {return hash_function()(__k) % bucket_count();} + {return __constrain_hash(hash_function()(__k), bucket_count());} template iterator find(const _Key& __x); @@ -871,7 +892,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> { if (size() > 0) { - __bucket_list_[__p1_.first().__next_->__hash_ % bucket_count()] = + __bucket_list_[__constrain_hash(__p1_.first().__next_->__hash_, bucket_count())] = static_cast<__node_pointer>(_VSTD::addressof(__p1_.first())); __u.__p1_.first().__next_ = nullptr; __u.size() = 0; @@ -895,7 +916,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> { __p1_.first().__next_ = __u.__p1_.first().__next_; __u.__p1_.first().__next_ = nullptr; - __bucket_list_[__p1_.first().__next_->__hash_ % bucket_count()] = + __bucket_list_[__constrain_hash(__p1_.first().__next_->__hash_, bucket_count())] = static_cast<__node_pointer>(_VSTD::addressof(__p1_.first())); size() = __u.size(); __u.size() = 0; @@ -992,7 +1013,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> __p1_.first().__next_ = __u.__p1_.first().__next_; if (size() > 0) { - __bucket_list_[__p1_.first().__next_->__hash_ % bucket_count()] = + __bucket_list_[__constrain_hash(__p1_.first().__next_->__hash_, bucket_count())] = static_cast<__node_pointer>(_VSTD::addressof(__p1_.first())); __u.__p1_.first().__next_ = nullptr; __u.size() = 0; @@ -1190,12 +1211,12 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> size_t __chash; if (__bc != 0) { - __chash = __nd->__hash_ % __bc; + __chash = __constrain_hash(__nd->__hash_, __bc); __ndptr = __bucket_list_[__chash]; if (__ndptr != nullptr) { for (__ndptr = __ndptr->__next_; __ndptr != nullptr && - __ndptr->__hash_ % __bc == __chash; + __constrain_hash(__ndptr->__hash_, __bc) == __chash; __ndptr = __ndptr->__next_) { if (key_eq()(__ndptr->__value_, __nd->__value_)) @@ -1206,10 +1227,10 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> { if (size()+1 > __bc * max_load_factor() || __bc == 0) { - rehash(_VSTD::max(2 * __bc + 1, + rehash(_VSTD::max(2 * __bc + !__is_power2(__bc), size_type(ceil(float(size() + 1) / max_load_factor())))); __bc = bucket_count(); - __chash = __nd->__hash_ % __bc; + __chash = __constrain_hash(__nd->__hash_, __bc); } // insert_after __bucket_list_[__chash], or __first_node if bucket is null __node_pointer __pn = __bucket_list_[__chash]; @@ -1221,7 +1242,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> // fix up __bucket_list_ __bucket_list_[__chash] = __pn; if (__nd->__next_ != nullptr) - __bucket_list_[__nd->__next_->__hash_ % __bc] = __nd; + __bucket_list_[__constrain_hash(__nd->__next_->__hash_, __bc)] = __nd; } else { @@ -1245,11 +1266,11 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> size_type __bc = bucket_count(); if (size()+1 > __bc * max_load_factor() || __bc == 0) { - rehash(_VSTD::max(2 * __bc + 1, + rehash(_VSTD::max(2 * __bc + !__is_power2(__bc), size_type(ceil(float(size() + 1) / max_load_factor())))); __bc = bucket_count(); } - size_t __chash = __cp->__hash_ % __bc; + size_t __chash = __constrain_hash(__cp->__hash_, __bc); __node_pointer __pn = __bucket_list_[__chash]; if (__pn == nullptr) { @@ -1259,12 +1280,12 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> // fix up __bucket_list_ __bucket_list_[__chash] = __pn; if (__cp->__next_ != nullptr) - __bucket_list_[__cp->__next_->__hash_ % __bc] = __cp; + __bucket_list_[__constrain_hash(__cp->__next_->__hash_, __bc)] = __cp; } else { for (bool __found = false; __pn->__next_ != nullptr && - __pn->__next_->__hash_ % __bc == __chash; + __constrain_hash(__pn->__next_->__hash_, __bc) == __chash; __pn = __pn->__next_) { // __found key_eq() action @@ -1285,7 +1306,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> __pn->__next_ = __cp; if (__cp->__next_ != nullptr) { - size_t __nhash = __cp->__next_->__hash_ % __bc; + size_t __nhash = __constrain_hash(__cp->__next_->__hash_, __bc); if (__nhash != __chash) __bucket_list_[__nhash] = __cp; } @@ -1306,11 +1327,11 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> size_type __bc = bucket_count(); if (size()+1 > __bc * max_load_factor() || __bc == 0) { - rehash(_VSTD::max(2 * __bc + 1, + rehash(_VSTD::max(2 * __bc + !__is_power2(__bc), size_type(ceil(float(size() + 1) / max_load_factor())))); __bc = bucket_count(); } - size_t __chash = __cp->__hash_ % __bc; + size_t __chash = __constrain_hash(__cp->__hash_, __bc); __node_pointer __pp = __bucket_list_[__chash]; while (__pp->__next_ != __np) __pp = __pp->__next_; @@ -1333,12 +1354,12 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> size_t __chash; if (__bc != 0) { - __chash = __hash % __bc; + __chash = __constrain_hash(__hash, __bc); __nd = __bucket_list_[__chash]; if (__nd != nullptr) { for (__nd = __nd->__next_; __nd != nullptr && - __nd->__hash_ % __bc == __chash; + __constrain_hash(__nd->__hash_, __bc) == __chash; __nd = __nd->__next_) { if (key_eq()(__nd->__value_, __x)) @@ -1350,10 +1371,10 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> __node_holder __h = __construct_node(__x, __hash); if (size()+1 > __bc * max_load_factor() || __bc == 0) { - rehash(_VSTD::max(2 * __bc + 1, + rehash(_VSTD::max(2 * __bc + !__is_power2(__bc), size_type(ceil(float(size() + 1) / max_load_factor())))); __bc = bucket_count(); - __chash = __hash % __bc; + __chash = __constrain_hash(__hash, __bc); } // insert_after __bucket_list_[__chash], or __first_node if bucket is null __node_pointer __pn = __bucket_list_[__chash]; @@ -1365,7 +1386,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> // fix up __bucket_list_ __bucket_list_[__chash] = __pn; if (__h->__next_ != nullptr) - __bucket_list_[__h->__next_->__hash_ % __bc] = __h.get(); + __bucket_list_[__constrain_hash(__h->__next_->__hash_, __bc)] = __h.get(); } else { @@ -1489,16 +1510,20 @@ template ::rehash(size_type __n) { - __n = __next_prime(_VSTD::max(__n, size() > 0)); + if (__n == 1) + __n = 2; + else if (__n & (__n - 1)) + __n = __next_prime(__n); size_type __bc = bucket_count(); if (__n > __bc) __rehash(__n); - else + else if (__n < __bc) { __n = _VSTD::max ( __n, - __next_prime(size_t(ceil(float(size()) / max_load_factor()))) + __is_power2(__bc) ? __next_pow2(size_t(ceil(float(size()) / max_load_factor()))) : + __next_prime(size_t(ceil(float(size()) / max_load_factor()))) ); if (__n < __bc) __rehash(__n); @@ -1521,13 +1546,13 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> __node_pointer __cp = __pp->__next_; if (__cp != nullptr) { - size_type __chash = __cp->__hash_ % __nbc; + size_type __chash = __constrain_hash(__cp->__hash_, __nbc); __bucket_list_[__chash] = __pp; size_type __phash = __chash; for (__pp = __cp, __cp = __cp->__next_; __cp != nullptr; __cp = __pp->__next_) { - __chash = __cp->__hash_ % __nbc; + __chash = __constrain_hash(__cp->__hash_, __nbc); if (__chash == __phash) __pp = __cp; else @@ -1565,12 +1590,12 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> size_type __bc = bucket_count(); if (__bc != 0) { - size_t __chash = __hash % __bc; + size_t __chash = __constrain_hash(__hash, __bc); __node_pointer __nd = __bucket_list_[__chash]; if (__nd != nullptr) { for (__nd = __nd->__next_; __nd != nullptr && - __nd->__hash_ % __bc == __chash; + __constrain_hash(__nd->__hash_, __bc) == __chash; __nd = __nd->__next_) { if (key_eq()(__nd->__value_, __k)) @@ -1590,12 +1615,12 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> size_type __bc = bucket_count(); if (__bc != 0) { - size_t __chash = __hash % __bc; + size_t __chash = __constrain_hash(__hash, __bc); __node_const_pointer __nd = __bucket_list_[__chash]; if (__nd != nullptr) { for (__nd = __nd->__next_; __nd != nullptr && - __nd->__hash_ % __bc == __chash; + __constrain_hash(__nd->__hash_, __bc) == __chash; __nd = __nd->__next_) { if (key_eq()(__nd->__value_, __k)) @@ -1734,7 +1759,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> // current node __node_pointer __cn = const_cast<__node_pointer>(__p.__node_); size_type __bc = bucket_count(); - size_t __chash = __cn->__hash_ % __bc; + size_t __chash = __constrain_hash(__cn->__hash_, __bc); // find previous node __node_pointer __pn = __bucket_list_[__chash]; for (; __pn->__next_ != __cn; __pn = __pn->__next_) @@ -1742,15 +1767,15 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> // Fix up __bucket_list_ // if __pn is not in same bucket (before begin is not in same bucket) && // if __cn->__next_ is not in same bucket (nullptr is not in same bucket) - if (__pn == _VSTD::addressof(__p1_.first()) || __pn->__hash_ % __bc != __chash) + if (__pn == _VSTD::addressof(__p1_.first()) || __constrain_hash(__pn->__hash_, __bc) != __chash) { - if (__cn->__next_ == nullptr || __cn->__next_->__hash_ % __bc != __chash) + if (__cn->__next_ == nullptr || __constrain_hash(__cn->__next_->__hash_, __bc) != __chash) __bucket_list_[__chash] = nullptr; } // if __cn->__next_ is not in same bucket (nullptr is in same bucket) if (__cn->__next_ != nullptr) { - size_t __nhash = __cn->__next_->__hash_ % __bc; + size_t __nhash = __constrain_hash(__cn->__next_->__hash_, __bc); if (__nhash != __chash) __bucket_list_[__nhash] = __pn; } @@ -1881,10 +1906,10 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> __p2_.swap(__u.__p2_); __p3_.swap(__u.__p3_); if (size() > 0) - __bucket_list_[__p1_.first().__next_->__hash_ % bucket_count()] = + __bucket_list_[__constrain_hash(__p1_.first().__next_->__hash_, bucket_count())] = static_cast<__node_pointer>(_VSTD::addressof(__p1_.first())); if (__u.size() > 0) - __u.__bucket_list_[__u.__p1_.first().__next_->__hash_ % __u.bucket_count()] = + __u.__bucket_list_[__constrain_hash(__u.__p1_.first().__next_->__hash_, __u.bucket_count())] = static_cast<__node_pointer>(_VSTD::addressof(__u.__p1_.first())); } @@ -1898,7 +1923,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> if (__np != nullptr) { for (__np = __np->__next_; __np != nullptr && - __np->__hash_ % __bc == __n; + __constrain_hash(__np->__hash_, __bc) == __n; __np = __np->__next_, ++__r) ; } Modified: head/contrib/libc++/include/__locale ============================================================================== --- head/contrib/libc++/include/__locale Mon Oct 22 18:14:27 2012 (r241902) +++ head/contrib/libc++/include/__locale Mon Oct 22 18:25:04 2012 (r241903) @@ -31,17 +31,24 @@ _LIBCPP_BEGIN_NAMESPACE_STD -class locale; +class _LIBCPP_VISIBLE locale; -template bool has_facet(const locale&) _NOEXCEPT; -template const _Facet& use_facet(const locale&); +template +_LIBCPP_INLINE_VISIBILITY +bool +has_facet(const locale&) _NOEXCEPT; + +template +_LIBCPP_INLINE_VISIBILITY +const _Facet& +use_facet(const locale&); class _LIBCPP_VISIBLE locale { public: // types: - class facet; - class id; + class _LIBCPP_VISIBLE facet; + class _LIBCPP_VISIBLE id; typedef int category; static const category // values assigned here are for exposition only @@ -119,7 +126,7 @@ class _LIBCPP_VISIBLE locale::id static int32_t __next_id; public: - _LIBCPP_INLINE_VISIBILITY id() {} + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR id() :__id_(0) {} private: void __init(); void operator=(const id&); // = delete; Modified: head/contrib/libc++/include/__mutex_base ============================================================================== --- head/contrib/libc++/include/__mutex_base Mon Oct 22 18:14:27 2012 (r241902) +++ head/contrib/libc++/include/__mutex_base Mon Oct 22 18:25:04 2012 (r241903) @@ -38,7 +38,11 @@ class _LIBCPP_VISIBLE mutex public: _LIBCPP_INLINE_VISIBILITY - mutex() {__m_ = (pthread_mutex_t)PTHREAD_MUTEX_INITIALIZER;} +#ifndef _LIBCPP_HAS_NO_CONSTEXPR + constexpr mutex() _NOEXCEPT : __m_(PTHREAD_MUTEX_INITIALIZER) {} +#else + mutex() _NOEXCEPT {__m_ = (pthread_mutex_t)PTHREAD_MUTEX_INITIALIZER;} +#endif ~mutex(); private: @@ -47,8 +51,8 @@ private: public: void lock(); - bool try_lock(); - void unlock(); + bool try_lock() _NOEXCEPT; + void unlock() _NOEXCEPT; typedef pthread_mutex_t* native_handle_type; _LIBCPP_INLINE_VISIBILITY native_handle_type native_handle() {return &__m_;} @@ -58,17 +62,19 @@ struct _LIBCPP_VISIBLE defer_lock_t {}; struct _LIBCPP_VISIBLE try_to_lock_t {}; struct _LIBCPP_VISIBLE adopt_lock_t {}; -//constexpr -extern const -defer_lock_t defer_lock; - -//constexpr -extern const -try_to_lock_t try_to_lock; - -//constexpr -extern const -adopt_lock_t adopt_lock; +#if defined(_LIBCPP_HAS_NO_CONSTEXPR) || defined(_LIBCPP_BUILDING_MUTEX) + +extern const defer_lock_t defer_lock; +extern const try_to_lock_t try_to_lock; +extern const adopt_lock_t adopt_lock; + +#else + +constexpr defer_lock_t defer_lock = defer_lock_t(); +constexpr try_to_lock_t try_to_lock = try_to_lock_t(); +constexpr adopt_lock_t adopt_lock = adopt_lock_t(); + +#endif template class _LIBCPP_VISIBLE lock_guard @@ -106,12 +112,12 @@ private: public: _LIBCPP_INLINE_VISIBILITY - unique_lock() : __m_(nullptr), __owns_(false) {} + unique_lock() _NOEXCEPT : __m_(nullptr), __owns_(false) {} _LIBCPP_INLINE_VISIBILITY explicit unique_lock(mutex_type& __m) : __m_(&__m), __owns_(true) {__m_->lock();} _LIBCPP_INLINE_VISIBILITY - unique_lock(mutex_type& __m, defer_lock_t) + unique_lock(mutex_type& __m, defer_lock_t) _NOEXCEPT : __m_(&__m), __owns_(false) {} _LIBCPP_INLINE_VISIBILITY unique_lock(mutex_type& __m, try_to_lock_t) @@ -141,11 +147,11 @@ private: public: #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY - unique_lock(unique_lock&& __u) + unique_lock(unique_lock&& __u) _NOEXCEPT : __m_(__u.__m_), __owns_(__u.__owns_) {__u.__m_ = nullptr; __u.__owns_ = false;} _LIBCPP_INLINE_VISIBILITY - unique_lock& operator=(unique_lock&& __u) + unique_lock& operator=(unique_lock&& __u) _NOEXCEPT { if (__owns_) __m_->unlock(); @@ -190,13 +196,13 @@ public: void unlock(); _LIBCPP_INLINE_VISIBILITY - void swap(unique_lock& __u) + void swap(unique_lock& __u) _NOEXCEPT { _VSTD::swap(__m_, __u.__m_); _VSTD::swap(__owns_, __u.__owns_); } _LIBCPP_INLINE_VISIBILITY - mutex_type* release() + mutex_type* release() _NOEXCEPT { mutex_type* __m = __m_; __m_ = nullptr; @@ -205,12 +211,12 @@ public: } _LIBCPP_INLINE_VISIBILITY *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 18:28: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 768876BC; Mon, 22 Oct 2012 18:28:44 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id C258C8FC0C; Mon, 22 Oct 2012 18:28:43 +0000 (UTC) Received: by mail-vc0-f182.google.com with SMTP id fw7so4161851vcb.13 for ; Mon, 22 Oct 2012 11:28:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=/651SbFgziIBV4XHB0a5XKQQTnhqaWYUYhuXIc97Wng=; b=ODPvLgxc1I1rdm9xqqrhMCKJH7zeJP0r/BBcn54pDSD+D58/8tuw6XcdGmDtbtAovZ /9UySDlWjFqfH7GCkY+5IgxTMbClYLqyO7btu7pusG30msDlmj6r6ycKR+9pdhJBjKLP cs5GilTJEPBq/VoVe188iEe/0A2CNk8Iv4ZlteOk3iWpqSZw8URe716CYa1ROTHQ/xcG Ocr2jUJQ8/R7xRZmj/8z6JqsoAHTduzw8sIiAGr0Xw0zcWAI9q0Tn9vhv4/KIkANkyGo 37hPdndU4hGNo0rI4blmSX0n+7COSa4kyVkEjJ5q5mgldCDxwjSB4lKK36G2lAdjGu31 DcYQ== MIME-Version: 1.0 Received: by 10.52.179.231 with SMTP id dj7mr12975395vdc.108.1350930522371; Mon, 22 Oct 2012 11:28:42 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.220.150.197 with HTTP; Mon, 22 Oct 2012 11:28:42 -0700 (PDT) In-Reply-To: <201210221754.q9MHsWcl062675@svn.freebsd.org> References: <201210221754.q9MHsWcl062675@svn.freebsd.org> Date: Mon, 22 Oct 2012 19:28:42 +0100 X-Google-Sender-Auth: 9swAcmkYm18k22smObBQAnjjzRw Message-ID: Subject: Re: svn commit: r241897 - in head: . sys/sys From: Attilio Rao To: Konstantin Belousov Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: "SVN commit messages 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, 22 Oct 2012 18:28:44 -0000 On 10/22/12, Konstantin Belousov wrote: > Author: kib > Date: Mon Oct 22 17:54:32 2012 > New Revision: 241897 > URL: http://svn.freebsd.org/changeset/base/241897 > > Log: > Bump __FreeBSD_version and make a note in UPDATING about removal of > the support for non-MPSAFE filesystems. Also, the __FreeBSD_version bump can be used for FUSE import and NON-mpsafe filesystems removal as well. Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 18:47: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 D5634311; Mon, 22 Oct 2012 18:47:59 +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 B2F3B8FC12; Mon, 22 Oct 2012 18:47: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 q9MIlxM0077105; Mon, 22 Oct 2012 18:47:59 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MIlxJD077101; Mon, 22 Oct 2012 18:47:59 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201210221847.q9MIlxJD077101@svn.freebsd.org> From: Xin LI Date: Mon, 22 Oct 2012 18:47:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r241904 - vendor/netcat/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 18:47:59 -0000 Author: delphij Date: Mon Oct 22 18:47:59 2012 New Revision: 241904 URL: http://svn.freebsd.org/changeset/base/241904 Log: Vendor import from OpenBSD 5.1. Modified: vendor/netcat/dist/nc.1 vendor/netcat/dist/netcat.c vendor/netcat/dist/socks.c Modified: vendor/netcat/dist/nc.1 ============================================================================== --- vendor/netcat/dist/nc.1 Mon Oct 22 18:25:04 2012 (r241903) +++ vendor/netcat/dist/nc.1 Mon Oct 22 18:47:59 2012 (r241904) @@ -1,4 +1,4 @@ -.\" $OpenBSD: nc.1,v 1.60 2012/02/07 12:11:43 lum Exp $ +.\" $OpenBSD: nc.1,v 1.61 2012/07/07 15:33:02 haesbaert Exp $ .\" .\" Copyright (c) 1996 David Sacerdote .\" All rights reserved. @@ -25,7 +25,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: October 4 2011 $ +.Dd $Mdocdate: February 7 2012 $ .Dt NC 1 .Os .Sh NAME @@ -119,6 +119,10 @@ is completed. It is an error to use this option without the .Fl l option. +When used together with the +.Fl u +option, the server socket is not connected and it can receive UDP datagrams from +multiple hosts. .It Fl l Used to specify that .Nm Modified: vendor/netcat/dist/netcat.c ============================================================================== --- vendor/netcat/dist/netcat.c Mon Oct 22 18:25:04 2012 (r241903) +++ vendor/netcat/dist/netcat.c Mon Oct 22 18:47:59 2012 (r241904) @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.105 2012/02/09 06:25:35 lum Exp $ */ +/* $OpenBSD: netcat.c,v 1.109 2012/07/07 15:33:02 haesbaert Exp $ */ /* * Copyright (c) 2001 Eric Jackson * @@ -67,7 +67,6 @@ /* Command Line Options */ int dflag; /* detached, no stdin */ unsigned int iflag; /* Interval Flag */ -int jflag; /* use jumbo frames if we can */ int kflag; /* More than one connect */ int lflag; /* Bind to local port */ int nflag; /* Don't do name look up */ @@ -107,6 +106,7 @@ int unix_connect(char *); int unix_listen(char *); void set_common_sockopts(int); int map_tos(char *, int *); +void report_connect(const struct sockaddr *, socklen_t); void usage(int); int @@ -131,7 +131,7 @@ main(int argc, char *argv[]) sv = NULL; while ((ch = getopt(argc, argv, - "46DdhI:i:jklnO:P:p:rSs:tT:UuV:vw:X:x:z")) != -1) { + "46DdhI:i:klnO:P:p:rSs:tT:UuV:vw:X:x:z")) != -1) { switch (ch) { case '4': family = AF_INET; @@ -163,9 +163,6 @@ main(int argc, char *argv[]) if (errstr) errx(1, "interval %s: %s", errstr, optarg); break; - case 'j': - jflag = 1; - break; case 'k': kflag = 1; break; @@ -348,17 +345,23 @@ main(int argc, char *argv[]) if (s < 0) err(1, NULL); /* - * For UDP, we will use recvfrom() initially - * to wait for a caller, then use the regular - * functions to talk to the caller. + * For UDP and -k, don't connect the socket, let it + * receive datagrams from multiple socket pairs. */ - if (uflag) { + if (uflag && kflag) + readwrite(s); + /* + * For UDP and not -k, we will use recvfrom() initially + * to wait for a caller, then use the regular functions + * to talk to the caller. + */ + else if (uflag && !kflag) { int rv, plen; char buf[16384]; struct sockaddr_storage z; len = sizeof(z); - plen = jflag ? 16384 : 2048; + plen = 2048; rv = recvfrom(s, buf, plen, MSG_PEEK, (struct sockaddr *)&z, &len); if (rv < 0) @@ -368,11 +371,20 @@ main(int argc, char *argv[]) if (rv < 0) err(1, "connect"); + if (vflag) + report_connect((struct sockaddr *)&z, len); + readwrite(s); } else { len = sizeof(cliaddr); connfd = accept(s, (struct sockaddr *)&cliaddr, &len); + if (connfd == -1) + err(1, "accept"); + + if (vflag) + report_connect((struct sockaddr *)&cliaddr, len); + readwrite(connfd); close(connfd); } @@ -717,7 +729,7 @@ readwrite(int nfd) int lfd = fileno(stdout); int plen; - plen = jflag ? 16384 : 2048; + plen = 2048; /* Setup Network FD */ pfd[0].fd = nfd; @@ -896,11 +908,6 @@ set_common_sockopts(int s) &x, sizeof(x)) == -1) err(1, NULL); } - if (jflag) { - if (setsockopt(s, SOL_SOCKET, SO_JUMBO, - &x, sizeof(x)) == -1) - err(1, NULL); - } if (Tflag != -1) { if (setsockopt(s, IPPROTO_IP, IP_TOS, &Tflag, sizeof(Tflag)) == -1) @@ -967,6 +974,32 @@ map_tos(char *s, int *val) } void +report_connect(const struct sockaddr *sa, socklen_t salen) +{ + char remote_host[NI_MAXHOST]; + char remote_port[NI_MAXSERV]; + int herr; + int flags = NI_NUMERICSERV; + + if (nflag) + flags |= NI_NUMERICHOST; + + if ((herr = getnameinfo(sa, salen, + remote_host, sizeof(remote_host), + remote_port, sizeof(remote_port), + flags)) != 0) { + if (herr == EAI_SYSTEM) + err(1, "getnameinfo"); + else + errx(1, "getnameinfo: %s", gai_strerror(herr)); + } + + fprintf(stderr, + "Connection from %s %s " + "received!\n", remote_host, remote_port); +} + +void help(void) { usage(0); Modified: vendor/netcat/dist/socks.c ============================================================================== --- vendor/netcat/dist/socks.c Mon Oct 22 18:25:04 2012 (r241903) +++ vendor/netcat/dist/socks.c Mon Oct 22 18:47:59 2012 (r241904) @@ -1,4 +1,4 @@ -/* $OpenBSD: socks.c,v 1.19 2011/02/12 15:54:18 okan Exp $ */ +/* $OpenBSD: socks.c,v 1.20 2012/03/08 09:56:28 espie Exp $ */ /* * Copyright (c) 1999 Niklas Hallqvist. All rights reserved. @@ -231,12 +231,12 @@ socks_connect(const char *host, const ch case SOCKS_IPV4: cnt = atomicio(read, proxyfd, buf + 4, 6); if (cnt != 6) - err(1, "read failed (%d/6)", cnt); + err(1, "read failed (%zu/6)", cnt); break; case SOCKS_IPV6: cnt = atomicio(read, proxyfd, buf + 4, 18); if (cnt != 18) - err(1, "read failed (%d/18)", cnt); + err(1, "read failed (%zu/18)", cnt); break; default: errx(1, "connection failed, unsupported address type"); From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 18:48: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 12AFB473; Mon, 22 Oct 2012 18:48:22 +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 C0CA38FC1A; Mon, 22 Oct 2012 18:48:21 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:c885:d4a7:e016:ae9d] (unknown [IPv6:2001:7b8:3a7:0:c885:d4a7:e016:ae9d]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 3D4475C59; Mon, 22 Oct 2012 20:48:20 +0200 (CEST) Message-ID: <508594F0.4040301@FreeBSD.org> Date: Mon, 22 Oct 2012 20:48:16 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r241903 - in head/contrib/libc++: . include src src/support References: <201210221825.q9MIP5B0071073@svn.freebsd.org> In-Reply-To: <201210221825.q9MIP5B0071073@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 18:48:22 -0000 On 2012-10-22 20:25, Dimitry Andric wrote:> Author: dim > Date: Mon Oct 22 18:25:04 2012 > New Revision: 241903 > URL: http://svn.freebsd.org/changeset/base/241903 > > Log: > Import libc++ trunk r165949. Among other improvements and bug fixes, > this has many visibility problems fixed, which should help with > compiling certain ports that exercise C++11 mode (i.e. Firefox). > > Also, belatedly add the LICENSE.TXT and accompanying CREDITS.TXT files, > which are referred to in all the source files. Note that with llvm and clang, we install these license files into /usr/share/doc/{llvm,clang}, together with the (admittedly sparse) other documentation. For libc++, there isn't any offline documentation to install right now, so making a /usr/share/doc/libc++ directory for just the .TXT files might be a little overkill? Maybe we should install them into the include directory? From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 18:49: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 B7A49788; Mon, 22 Oct 2012 18:49:04 +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 D96718FC18; Mon, 22 Oct 2012 18:49: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 q9MIn33o077394; Mon, 22 Oct 2012 18:49:03 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MIn3QI077393; Mon, 22 Oct 2012 18:49:03 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201210221849.q9MIn3QI077393@svn.freebsd.org> From: Xin LI Date: Mon, 22 Oct 2012 18:49:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r241905 - vendor/netcat/5.2 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 18:49:04 -0000 Author: delphij Date: Mon Oct 22 18:49:03 2012 New Revision: 241905 URL: http://svn.freebsd.org/changeset/base/241905 Log: Tag netcat from OpenBSD 5.2. Added: vendor/netcat/5.2/ - copied from r241904, vendor/netcat/dist/ From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 18:56: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 B0927AE5; Mon, 22 Oct 2012 18:56:32 +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 96BDC8FC14; Mon, 22 Oct 2012 18:56: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 q9MIuWdU078746; Mon, 22 Oct 2012 18:56:32 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MIuWsJ078740; Mon, 22 Oct 2012 18:56:32 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201210221856.q9MIuWsJ078740@svn.freebsd.org> From: Xin LI Date: Mon, 22 Oct 2012 18:56:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241906 - head/contrib/netcat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 18:56:32 -0000 Author: delphij Date: Mon Oct 22 18:56:31 2012 New Revision: 241906 URL: http://svn.freebsd.org/changeset/base/241906 Log: MFV: netcat from OpenBSD 5.2. MFC after: 1 month Modified: head/contrib/netcat/FREEBSD-vendor head/contrib/netcat/nc.1 head/contrib/netcat/netcat.c head/contrib/netcat/socks.c Directory Properties: head/contrib/netcat/ (props changed) Modified: head/contrib/netcat/FREEBSD-vendor ============================================================================== --- head/contrib/netcat/FREEBSD-vendor Mon Oct 22 18:49:03 2012 (r241905) +++ head/contrib/netcat/FREEBSD-vendor Mon Oct 22 18:56:31 2012 (r241906) @@ -1,5 +1,5 @@ # $FreeBSD$ Project: netcat (aka src/usr.bin/nc in OpenBSD) ProjectURL: http://www.openbsd.org/ -Version: 5.1 +Version: 5.2 License: BSD Modified: head/contrib/netcat/nc.1 ============================================================================== --- head/contrib/netcat/nc.1 Mon Oct 22 18:49:03 2012 (r241905) +++ head/contrib/netcat/nc.1 Mon Oct 22 18:56:31 2012 (r241906) @@ -1,4 +1,4 @@ -.\" $OpenBSD: nc.1,v 1.60 2012/02/07 12:11:43 lum Exp $ +.\" $OpenBSD: nc.1,v 1.61 2012/07/07 15:33:02 haesbaert Exp $ .\" .\" Copyright (c) 1996 David Sacerdote .\" All rights reserved. @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 4, 2011 +.Dd February 7, 2012 .Dt NC 1 .Os .Sh NAME @@ -137,6 +137,10 @@ is completed. It is an error to use this option without the .Fl l option. +When used together with the +.Fl u +option, the server socket is not connected and it can receive UDP datagrams from +multiple hosts. .It Fl l Used to specify that .Nm Modified: head/contrib/netcat/netcat.c ============================================================================== --- head/contrib/netcat/netcat.c Mon Oct 22 18:49:03 2012 (r241905) +++ head/contrib/netcat/netcat.c Mon Oct 22 18:56:31 2012 (r241906) @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.105 2012/02/09 06:25:35 lum Exp $ */ +/* $OpenBSD: netcat.c,v 1.109 2012/07/07 15:33:02 haesbaert Exp $ */ /* * Copyright (c) 2001 Eric Jackson * @@ -75,7 +75,6 @@ /* Command Line Options */ int dflag; /* detached, no stdin */ unsigned int iflag; /* Interval Flag */ -int jflag; /* use jumbo frames if we can */ int kflag; /* More than one connect */ int lflag; /* Bind to local port */ int nflag; /* Don't do name look up */ @@ -116,6 +115,7 @@ int unix_connect(char *); int unix_listen(char *); void set_common_sockopts(int); int map_tos(char *, int *); +void report_connect(const struct sockaddr *, socklen_t); void usage(int); #ifdef IPSEC @@ -153,7 +153,7 @@ main(int argc, char *argv[]) sv = NULL; while ((ch = getopt_long(argc, argv, - "46DdEe:hI:i:jklnoO:P:p:rSs:tT:UuV:vw:X:x:z", + "46DdEe:hI:i:klnoO:P:p:rSs:tT:UuV:vw:X:x:z", longopts, NULL)) != -1) { switch (ch) { case '4': @@ -201,11 +201,6 @@ main(int argc, char *argv[]) if (errstr) errx(1, "interval %s: %s", errstr, optarg); break; -#ifdef SO_JUMBO - case 'j': - jflag = 1; - break; -#endif case 'k': kflag = 1; break; @@ -395,17 +390,23 @@ main(int argc, char *argv[]) if (s < 0) err(1, NULL); /* - * For UDP, we will use recvfrom() initially - * to wait for a caller, then use the regular - * functions to talk to the caller. + * For UDP and -k, don't connect the socket, let it + * receive datagrams from multiple socket pairs. + */ + if (uflag && kflag) + readwrite(s); + /* + * For UDP and not -k, we will use recvfrom() initially + * to wait for a caller, then use the regular functions + * to talk to the caller. */ - if (uflag) { + else if (uflag && !kflag) { int rv, plen; char buf[16384]; struct sockaddr_storage z; len = sizeof(z); - plen = jflag ? 16384 : 2048; + plen = 2048; rv = recvfrom(s, buf, plen, MSG_PEEK, (struct sockaddr *)&z, &len); if (rv < 0) @@ -415,11 +416,20 @@ main(int argc, char *argv[]) if (rv < 0) err(1, "connect"); + if (vflag) + report_connect((struct sockaddr *)&z, len); + readwrite(s); } else { len = sizeof(cliaddr); connfd = accept(s, (struct sockaddr *)&cliaddr, &len); + if (connfd == -1) + err(1, "accept"); + + if (vflag) + report_connect((struct sockaddr *)&cliaddr, len); + readwrite(connfd); close(connfd); } @@ -782,7 +792,7 @@ readwrite(int nfd) int lfd = fileno(stdout); int plen; - plen = jflag ? 16384 : 2048; + plen = 2048; /* Setup Network FD */ pfd[0].fd = nfd; @@ -961,13 +971,6 @@ set_common_sockopts(int s) &x, sizeof(x)) == -1) err(1, NULL); } -#ifdef SO_JUMBO - if (jflag) { - if (setsockopt(s, SOL_SOCKET, SO_JUMBO, - &x, sizeof(x)) == -1) - err(1, NULL); - } -#endif if (Tflag != -1) { if (setsockopt(s, IPPROTO_IP, IP_TOS, &Tflag, sizeof(Tflag)) == -1) @@ -1039,6 +1042,32 @@ map_tos(char *s, int *val) } void +report_connect(const struct sockaddr *sa, socklen_t salen) +{ + char remote_host[NI_MAXHOST]; + char remote_port[NI_MAXSERV]; + int herr; + int flags = NI_NUMERICSERV; + + if (nflag) + flags |= NI_NUMERICHOST; + + if ((herr = getnameinfo(sa, salen, + remote_host, sizeof(remote_host), + remote_port, sizeof(remote_port), + flags)) != 0) { + if (herr == EAI_SYSTEM) + err(1, "getnameinfo"); + else + errx(1, "getnameinfo: %s", gai_strerror(herr)); + } + + fprintf(stderr, + "Connection from %s %s " + "received!\n", remote_host, remote_port); +} + +void help(void) { usage(0); Modified: head/contrib/netcat/socks.c ============================================================================== --- head/contrib/netcat/socks.c Mon Oct 22 18:49:03 2012 (r241905) +++ head/contrib/netcat/socks.c Mon Oct 22 18:56:31 2012 (r241906) @@ -1,4 +1,4 @@ -/* $OpenBSD: socks.c,v 1.19 2011/02/12 15:54:18 okan Exp $ */ +/* $OpenBSD: socks.c,v 1.20 2012/03/08 09:56:28 espie Exp $ */ /* * Copyright (c) 1999 Niklas Hallqvist. All rights reserved. @@ -231,12 +231,12 @@ socks_connect(const char *host, const ch case SOCKS_IPV4: cnt = atomicio(read, proxyfd, buf + 4, 6); if (cnt != 6) - err(1, "read failed (%zd/6)", cnt); + err(1, "read failed (%zu/6)", cnt); break; case SOCKS_IPV6: cnt = atomicio(read, proxyfd, buf + 4, 18); if (cnt != 18) - err(1, "read failed (%zd/18)", cnt); + err(1, "read failed (%zu/18)", cnt); break; default: errx(1, "connection failed, unsupported address type"); From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 19:06: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 D7AABF93; Mon, 22 Oct 2012 19:06:00 +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 BE8898FC08; Mon, 22 Oct 2012 19:06: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 q9MJ60w2080469; Mon, 22 Oct 2012 19:06:00 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MJ60kb080467; Mon, 22 Oct 2012 19:06:00 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201210221906.q9MJ60kb080467@svn.freebsd.org> From: Dimitry Andric Date: Mon, 22 Oct 2012 19:06:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241907 - head/contrib/libc++/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 19:06:00 -0000 Author: dim Date: Mon Oct 22 19:06:00 2012 New Revision: 241907 URL: http://svn.freebsd.org/changeset/base/241907 Log: Fix two -Wsystem-header warnings in libc++ that were exposed by the new ATF import. These have also been sent upstream. MFC after: 1 month Modified: head/contrib/libc++/include/locale Modified: head/contrib/libc++/include/locale ============================================================================== --- head/contrib/libc++/include/locale Mon Oct 22 18:56:31 2012 (r241906) +++ head/contrib/libc++/include/locale Mon Oct 22 19:06:00 2012 (r241907) @@ -2876,9 +2876,9 @@ protected: virtual string_type do_negative_sign() const {return string_type(1, '-');} virtual int do_frac_digits() const {return 0;} virtual pattern do_pos_format() const - {pattern __p = {symbol, sign, none, value}; return __p;} + {pattern __p = {{symbol, sign, none, value}}; return __p;} virtual pattern do_neg_format() const - {pattern __p = {symbol, sign, none, value}; return __p;} + {pattern __p = {{symbol, sign, none, value}}; return __p;} }; template @@ -3192,7 +3192,6 @@ money_get<_CharT, _InputIterator>::__do_ bool __sb = __flags & ios_base::showbase; if (__sb || __more_needed) { - ios_base::iostate __et = ios_base::goodbit; typename string_type::const_iterator __sym_space_end = __sym.begin(); if (__p > 0 && (__pat.field[__p - 1] == money_base::none || __pat.field[__p - 1] == money_base::space)) { From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 19:22: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 9EE28424; Mon, 22 Oct 2012 19:22:32 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 854E98FC16; Mon, 22 Oct 2012 19:22: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 q9MJMWQb085465; Mon, 22 Oct 2012 19:22:32 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MJMWBl085463; Mon, 22 Oct 2012 19:22:32 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201210221922.q9MJMWBl085463@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Mon, 22 Oct 2012 19:22:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241908 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 19:22:32 -0000 Author: melifaro Date: Mon Oct 22 19:22:31 2012 New Revision: 241908 URL: http://svn.freebsd.org/changeset/base/241908 Log: Remove unnecessary chain read lock in ipfw nat 'global' code. Document case when ipfw chain lock must be held while calling ipfw_nat(). MFC after: 2 weeks Modified: head/sys/netpfil/ipfw/ip_fw_nat.c Modified: head/sys/netpfil/ipfw/ip_fw_nat.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_nat.c Mon Oct 22 19:06:00 2012 (r241907) +++ head/sys/netpfil/ipfw/ip_fw_nat.c Mon Oct 22 19:22:31 2012 (r241908) @@ -202,6 +202,13 @@ add_redir_spool_cfg(char *buf, struct cf } } +/* + * ipfw_nat - perform mbuf header translation. + * + * Note V_layer3_chain has to be locked while calling ipfw_nat() in + * 'global' operation mode (t == NULL). + * + */ static int ipfw_nat(struct ip_fw_args *args, struct cfg_nat *t, struct mbuf *m) { @@ -269,7 +276,6 @@ ipfw_nat(struct ip_fw_args *args, struct found = 0; chain = &V_layer3_chain; - IPFW_RLOCK(chain); /* Check every nat entry... */ LIST_FOREACH(t, &chain->nat, _next) { if ((t->mode & PKT_ALIAS_SKIP_GLOBAL) != 0) @@ -282,7 +288,6 @@ ipfw_nat(struct ip_fw_args *args, struct break; } } - IPFW_RUNLOCK(chain); if (found != 1) { /* No instance found, return ignore */ args->m = mcl; From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 19:44: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 30A1FFA6; Mon, 22 Oct 2012 19:44:18 +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 194F28FC12; Mon, 22 Oct 2012 19:44: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 q9MJiHof088890; Mon, 22 Oct 2012 19:44:17 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MJiHTQ088887; Mon, 22 Oct 2012 19:44:17 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201210221944.q9MJiHTQ088887@svn.freebsd.org> From: Dimitry Andric Date: Mon, 22 Oct 2012 19:44:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241909 - head/lib/libc++ X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 19:44:18 -0000 Author: dim Date: Mon Oct 22 19:44:17 2012 New Revision: 241909 URL: http://svn.freebsd.org/changeset/base/241909 Log: Allow building libc++ with any custom -std=xxx flag. Note that using -std=gnu++98 will give a lot of warnings with clang, so please use -std=c++0x or higher, or use NO_WERROR. MFC after: 1 week Modified: head/lib/libc++/Makefile Modified: head/lib/libc++/Makefile ============================================================================== --- head/lib/libc++/Makefile Mon Oct 22 19:22:31 2012 (r241908) +++ head/lib/libc++/Makefile Mon Oct 22 19:44:17 2012 (r241909) @@ -53,7 +53,9 @@ cxxrt_${_S}: WARNS= 0 CFLAGS+= -I${HDRDIR} -I${LIBCXXRTDIR} -nostdlib -DLIBCXXRT +.if !defined(CXXFLAGS) || ${CXXFLAGS:M-std=*}" == "" CXXFLAGS+= -std=c++0x +.endif DPADD= ${LIBCXXRT} LDADD= -lcxxrt From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 20:22: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 8B343DC0; Mon, 22 Oct 2012 20:22:54 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id F02D48FC08; Mon, 22 Oct 2012 20:22:53 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q9MKMqYS079128; Tue, 23 Oct 2012 00:22:52 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q9MKMqrJ079127; Tue, 23 Oct 2012 00:22:52 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 23 Oct 2012 00:22:52 +0400 From: Gleb Smirnoff To: Garrett Cooper Subject: Re: svn commit: r241823 - in head: . etc etc/atf etc/mtree lib lib/atf lib/atf/libatf-c lib/atf/libatf-c++ libexec libexec/atf libexec/atf/atf-check share share/atf share/doc share/doc/atf share/exampl... Message-ID: <20121022202252.GI70741@FreeBSD.org> References: <201210220118.q9M1Ifh5098857@svn.freebsd.org> <20121022150706.GD70741@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Marcel Moolenaar , src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 20:22:54 -0000 On Mon, Oct 22, 2012 at 09:42:42AM -0700, Garrett Cooper wrote: G> On Mon, Oct 22, 2012 at 8:07 AM, Gleb Smirnoff wrote: G> > On Mon, Oct 22, 2012 at 01:18:41AM +0000, Marcel Moolenaar wrote: G> > M> Tinderbox breakages that are the result of this commit are entirely G> > M> the committer's fault -- in other words: buildworld testing on amd64 G> > M> only. G> > G> > Taking into account the fact that last couple of weeks head was usually G> > not buildable rather than buildable, I strongly disappreciate this. G> > G> > It looks to me as we are again treating head/ as a pile of stuff, G> > not as an operating system one can install and use. G> > G> > Now that we have a big choice of VCSes: svn user branches, git and G> > perforce, why isn't it possible to settle things in private branch G> > and only then commit them to the head/? G> G> I had been checking in changes to p4 over the last 4 months and then I G> ditched it for a local svn checkout when preparing the final patch G> that I sent to Marcel; I had run the patch in svn in two different G> sets of VMs in a make tinderbox manner several times. All but a G> handful of non-build critical items made it into this commit, and the G> only breakage that was present was accidental and affected ATF G> runtime. G> G> Maintaining all these moving pieces has proved challenging (esp. G> because I lack the scripts to track all of the changes that I had at G> IronPort with p4), and even then tracking new files in p4 is G> entertaining compared to svn, git, etc. This unnecessary complexity G> plus the fact that one needs p4 in order to collaborate with the G> changes I'm working on is the primary reason why I'm ditching it for G> git. G> G> The only breakage that's occurring now we've found is people using G> clang/libc++ (and libc++ looks like it has bugs that would have been G> caught with C++ applications written in a C++ standards-compliant G> manner) and various optimization levels which would not have raised G> red flags with make tinderbox in the first place. G> G> If there was a widespread (gcc and/or standard compiler/linker flags) G> issue with the build a) we would have seen it be now in the tinderbox G> emails and b) I would have CCed the current set of mailing lists so G> the issue would have been resolved quickly. The fact that it wasn't G> caught illustrates the fact that although we're trying to pilot clang G> as the default compiler by next month, there's a huge gap in required G> testing for commits. G> G> Looking forward, the major items for ATF have been committed. The rest G> of the patches which will be committed will be considerably smaller, G> targeted to specific components, and [for the most part, minus test G> integration in the tinderbox builds which will only be done after G> extensively testing is performed] will not affect the standard build G> process. G> G> Thank you for the concern though and I understand where you're coming from. Okay, now I see that you had did a lot of testing and my blame was ungrounded. Sorry. But the commit message from Marcel was so provocating such blame :) And probably I was also driven by the fact that I closed a number of build breakages last week, which weren't mine. Sorry again. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 20:28: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 5DCDE4F8; Mon, 22 Oct 2012 20:28:07 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id C7EF88FC08; Mon, 22 Oct 2012 20:28:06 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q9MKS50N079163; Tue, 23 Oct 2012 00:28:05 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q9MKS5gs079162; Tue, 23 Oct 2012 00:28:05 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 23 Oct 2012 00:28:05 +0400 From: Gleb Smirnoff To: Attilio Rao Subject: Re: svn commit: r241897 - in head: . sys/sys Message-ID: <20121022202805.GJ70741@FreeBSD.org> References: <201210221754.q9MHsWcl062675@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Konstantin Belousov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 20:28:07 -0000 On Mon, Oct 22, 2012 at 07:28:42PM +0100, Attilio Rao wrote: A> On 10/22/12, Konstantin Belousov wrote: A> > Author: kib A> > Date: Mon Oct 22 17:54:32 2012 A> > New Revision: 241897 A> > URL: http://svn.freebsd.org/changeset/base/241897 A> > A> > Log: A> > Bump __FreeBSD_version and make a note in UPDATING about removal of A> > the support for non-MPSAFE filesystems. A> A> Also, the __FreeBSD_version bump can be used for FUSE import and A> NON-mpsafe filesystems removal as well. Can you please mention this in the doc repo, where we document __FreeBSD_version values? -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 21:09: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 BE558E2E; Mon, 22 Oct 2012 21:09:04 +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 A353D8FC0C; Mon, 22 Oct 2012 21:09: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 q9ML94fS007866; Mon, 22 Oct 2012 21:09:04 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9ML94e7007834; Mon, 22 Oct 2012 21:09:04 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210222109.q9ML94e7007834@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 22 Oct 2012 21:09:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241913 - in head: . sys/net sys/netgraph sys/netinet sys/netinet6 sys/netipsec sys/netpfil/ipfw sys/netpfil/pf sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 21:09:04 -0000 Author: glebius Date: Mon Oct 22 21:09:03 2012 New Revision: 241913 URL: http://svn.freebsd.org/changeset/base/241913 Log: Switch the entire IPv4 stack to keep the IP packet header in network byte order. Any host byte order processing is done in local variables and host byte order values are never[1] written to a packet. After this change a packet processed by the stack isn't modified at all[2] except for TTL. After this change a network stack hacker doesn't need to scratch his head trying to figure out what is the byte order at the given place in the stack. [1] One exception still remains. The raw sockets convert host byte order before pass a packet to an application. Probably this would remain for ages for compatibility. [2] The ip_input() still subtructs header len from ip->ip_len, but this is planned to be fixed soon. Reviewed by: luigi, Maxim Dounin Tested by: ray, Olivier Cochard-Labbe Modified: head/UPDATING head/sys/net/if_gre.c head/sys/net/if_stf.c head/sys/netgraph/ng_ipfw.c head/sys/netinet/igmp.c head/sys/netinet/in.h head/sys/netinet/in_gif.c head/sys/netinet/ip_carp.c head/sys/netinet/ip_divert.c head/sys/netinet/ip_gre.c head/sys/netinet/ip_icmp.c head/sys/netinet/ip_input.c head/sys/netinet/ip_ipsec.c head/sys/netinet/ip_mroute.c head/sys/netinet/ip_options.c head/sys/netinet/ip_output.c head/sys/netinet/raw_ip.c head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_usrreq.c head/sys/netinet/sctputil.c head/sys/netinet/siftr.c head/sys/netinet/tcp_debug.c head/sys/netinet/tcp_input.c head/sys/netinet/tcp_output.c head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_syncache.c head/sys/netinet/tcp_timewait.c head/sys/netinet/udp_usrreq.c head/sys/netinet6/ip6_ipsec.c head/sys/netipsec/ipsec.c head/sys/netpfil/ipfw/ip_dn_io.c head/sys/netpfil/ipfw/ip_fw2.c head/sys/netpfil/ipfw/ip_fw_dynamic.c head/sys/netpfil/ipfw/ip_fw_pfil.c head/sys/netpfil/pf/if_pfsync.c head/sys/netpfil/pf/pf.c head/sys/sys/param.h Modified: head/UPDATING ============================================================================== --- head/UPDATING Mon Oct 22 20:17:58 2012 (r241912) +++ head/UPDATING Mon Oct 22 21:09:03 2012 (r241913) @@ -24,6 +24,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20121023: + The IPv4 network stack has been converted to network byte + order. The following modules need to be recompiled together + with kernel: carp(4), divert(4), gif(4), siftr(4), gre(4), + pf(4), ipfw(4), ng_ipfw(4), stf(4). + 20121022: Support for non-MPSAFE filesystems was removed from VFS. The VFS_VERSION was bumped, all filesystem modules shall be Modified: head/sys/net/if_gre.c ============================================================================== --- head/sys/net/if_gre.c Mon Oct 22 20:17:58 2012 (r241912) +++ head/sys/net/if_gre.c Mon Oct 22 21:09:03 2012 (r241913) @@ -356,7 +356,7 @@ gre_output(struct ifnet *ifp, struct mbu * RFC2004 specifies that fragmented diagrams shouldn't * be encapsulated. */ - if (ip->ip_off & (IP_MF | IP_OFFMASK)) { + if (ip->ip_off & htons(IP_MF | IP_OFFMASK)) { _IF_DROP(&ifp->if_snd); m_freem(m); error = EINVAL; /* is there better errno? */ @@ -410,7 +410,7 @@ gre_output(struct ifnet *ifp, struct mbu } ip = mtod(m, struct ip *); memcpy((caddr_t)(ip + 1), &mob_h, (unsigned)msiz); - ip->ip_len = ntohs(ip->ip_len) + msiz; + ip->ip_len = htons(ntohs(ip->ip_len) + msiz); } else { /* AF_INET */ _IF_DROP(&ifp->if_snd); m_freem(m); @@ -493,7 +493,7 @@ gre_output(struct ifnet *ifp, struct mbu ((struct ip*)gh)->ip_ttl = GRE_TTL; ((struct ip*)gh)->ip_tos = gre_ip_tos; ((struct ip*)gh)->ip_id = gre_ip_id; - gh->gi_len = m->m_pkthdr.len; + gh->gi_len = htons(m->m_pkthdr.len); } ifp->if_opackets++; Modified: head/sys/net/if_stf.c ============================================================================== --- head/sys/net/if_stf.c Mon Oct 22 20:17:58 2012 (r241912) +++ head/sys/net/if_stf.c Mon Oct 22 21:09:03 2012 (r241913) @@ -524,7 +524,7 @@ stf_output(ifp, m, dst, ro) bcopy(&in4, &ip->ip_dst, sizeof(ip->ip_dst)); ip->ip_p = IPPROTO_IPV6; ip->ip_ttl = ip_stf_ttl; - ip->ip_len = m->m_pkthdr.len; /*host order*/ + ip->ip_len = htons(m->m_pkthdr.len); if (ifp->if_flags & IFF_LINK1) ip_ecn_ingress(ECN_ALLOWED, &ip->ip_tos, &tos); else Modified: head/sys/netgraph/ng_ipfw.c ============================================================================== --- head/sys/netgraph/ng_ipfw.c Mon Oct 22 20:17:58 2012 (r241912) +++ head/sys/netgraph/ng_ipfw.c Mon Oct 22 21:09:03 2012 (r241913) @@ -265,7 +265,6 @@ ng_ipfw_rcvdata(hook_p hook, item_p item switch (ip->ip_v) { #ifdef INET case IPVERSION: - SET_HOST_IPLEN(ip); return (ip_output(m, NULL, NULL, IP_FORWARDING, NULL, NULL)); #endif Modified: head/sys/netinet/igmp.c ============================================================================== --- head/sys/netinet/igmp.c Mon Oct 22 20:17:58 2012 (r241912) +++ head/sys/netinet/igmp.c Mon Oct 22 21:09:03 2012 (r241913) @@ -1442,7 +1442,7 @@ igmp_input(struct mbuf *m, int off) ip = mtod(m, struct ip *); iphlen = off; - igmplen = ip->ip_len; + igmplen = ntohs(ip->ip_len); /* * Validate lengths. @@ -2225,7 +2225,7 @@ igmp_v1v2_queue_report(struct in_multi * ip = mtod(m, struct ip *); ip->ip_tos = 0; - ip->ip_len = sizeof(struct ip) + sizeof(struct igmp); + ip->ip_len = htons(sizeof(struct ip) + sizeof(struct igmp)); ip->ip_off = 0; ip->ip_p = IPPROTO_IGMP; ip->ip_src.s_addr = INADDR_ANY; @@ -3522,8 +3522,8 @@ igmp_v3_encap_report(struct ifnet *ifp, ip = mtod(m, struct ip *); ip->ip_tos = IPTOS_PREC_INTERNETCONTROL; - ip->ip_len = hdrlen + igmpreclen; - ip->ip_off = IP_DF; + ip->ip_len = htons(hdrlen + igmpreclen); + ip->ip_off = htons(IP_DF); ip->ip_p = IPPROTO_IGMP; ip->ip_sum = 0; Modified: head/sys/netinet/in.h ============================================================================== --- head/sys/netinet/in.h Mon Oct 22 20:17:58 2012 (r241912) +++ head/sys/netinet/in.h Mon Oct 22 21:09:03 2012 (r241913) @@ -741,33 +741,6 @@ void in_ifdetach(struct ifnet *); #define satosin(sa) ((struct sockaddr_in *)(sa)) #define sintosa(sin) ((struct sockaddr *)(sin)) #define ifatoia(ifa) ((struct in_ifaddr *)(ifa)) - -/* - * Historically, BSD keeps ip_len and ip_off in host format - * when doing layer 3 processing, and this often requires - * to translate the format back and forth. - * To make the process explicit, we define a couple of macros - * that also take into account the fact that at some point - * we may want to keep those fields always in net format. - */ - -#if (BYTE_ORDER == BIG_ENDIAN) || defined(HAVE_NET_IPLEN) -#define SET_NET_IPLEN(p) do {} while (0) -#define SET_HOST_IPLEN(p) do {} while (0) -#else -#define SET_NET_IPLEN(p) do { \ - struct ip *h_ip = (p); \ - h_ip->ip_len = htons(h_ip->ip_len); \ - h_ip->ip_off = htons(h_ip->ip_off); \ - } while (0) - -#define SET_HOST_IPLEN(p) do { \ - struct ip *h_ip = (p); \ - h_ip->ip_len = ntohs(h_ip->ip_len); \ - h_ip->ip_off = ntohs(h_ip->ip_off); \ - } while (0) -#endif /* !HAVE_NET_IPLEN */ - #endif /* _KERNEL */ /* INET6 stuff */ Modified: head/sys/netinet/in_gif.c ============================================================================== --- head/sys/netinet/in_gif.c Mon Oct 22 20:17:58 2012 (r241912) +++ head/sys/netinet/in_gif.c Mon Oct 22 21:09:03 2012 (r241913) @@ -192,7 +192,7 @@ in_gif_output(struct ifnet *ifp, int fam iphdr.ip_p = proto; /* version will be set in ip_output() */ iphdr.ip_ttl = V_ip_gif_ttl; - iphdr.ip_len = m->m_pkthdr.len + sizeof(struct ip); + iphdr.ip_len = htons(m->m_pkthdr.len + sizeof(struct ip)); ip_ecn_ingress((ifp->if_flags & IFF_LINK1) ? ECN_ALLOWED : ECN_NOCARE, &iphdr.ip_tos, &tos); Modified: head/sys/netinet/ip_carp.c ============================================================================== --- head/sys/netinet/ip_carp.c Mon Oct 22 20:17:58 2012 (r241912) +++ head/sys/netinet/ip_carp.c Mon Oct 22 21:09:03 2012 (r241913) @@ -783,9 +783,9 @@ carp_send_ad_locked(struct carp_softc *s ip->ip_v = IPVERSION; ip->ip_hl = sizeof(*ip) >> 2; ip->ip_tos = IPTOS_LOWDELAY; - ip->ip_len = len; + ip->ip_len = htons(len); ip->ip_id = ip_newid(); - ip->ip_off = IP_DF; + ip->ip_off = htons(IP_DF); ip->ip_ttl = CARP_DFLTTL; ip->ip_p = IPPROTO_CARP; ip->ip_sum = 0; Modified: head/sys/netinet/ip_divert.c ============================================================================== --- head/sys/netinet/ip_divert.c Mon Oct 22 20:17:58 2012 (r241912) +++ head/sys/netinet/ip_divert.c Mon Oct 22 21:09:03 2012 (r241913) @@ -386,10 +386,6 @@ div_output(struct socket *so, struct mbu INP_RUNLOCK(inp); goto cantsend; } - - /* Convert fields to host order for ip_output() */ - ip->ip_len = ntohs(ip->ip_len); - ip->ip_off = ntohs(ip->ip_off); break; #ifdef INET6 case IPV6_VERSION >> 4: Modified: head/sys/netinet/ip_gre.c ============================================================================== --- head/sys/netinet/ip_gre.c Mon Oct 22 20:17:58 2012 (r241912) +++ head/sys/netinet/ip_gre.c Mon Oct 22 21:09:03 2012 (r241913) @@ -274,12 +274,10 @@ gre_mobile_input(struct mbuf *m, int hle /* * On FreeBSD, rip_input() supplies us with ip->ip_len - * already converted into host byteorder and also decreases - * it by the lengh of IP header, however, ip_input() expects - * that this field is in the original format (network byteorder - * and full size of IP packet), so that adjust accordingly. + * decreased by the lengh of IP header, however, ip_input() + * expects it to be full size of IP packet, so adjust accordingly. */ - ip->ip_len = htons(ip->ip_len + sizeof(struct ip) - msiz); + ip->ip_len = htons(ntohs(ip->ip_len) + sizeof(struct ip) - msiz); ip->ip_sum = 0; ip->ip_sum = in_cksum(m, (ip->ip_hl << 2)); Modified: head/sys/netinet/ip_icmp.c ============================================================================== --- head/sys/netinet/ip_icmp.c Mon Oct 22 20:17:58 2012 (r241912) +++ head/sys/netinet/ip_icmp.c Mon Oct 22 21:09:03 2012 (r241913) @@ -229,7 +229,7 @@ icmp_error(struct mbuf *n, int type, int */ if (n->m_flags & M_DECRYPTED) goto freeit; - if (oip->ip_off & ~(IP_MF|IP_DF)) + if (oip->ip_off & htons(~(IP_MF|IP_DF))) goto freeit; if (n->m_flags & (M_BCAST|M_MCAST)) goto freeit; @@ -263,16 +263,17 @@ icmp_error(struct mbuf *n, int type, int tcphlen = th->th_off << 2; if (tcphlen < sizeof(struct tcphdr)) goto freeit; - if (oip->ip_len < oiphlen + tcphlen) + if (ntohs(oip->ip_len) < oiphlen + tcphlen) goto freeit; if (oiphlen + tcphlen > n->m_len && n->m_next == NULL) goto stdreply; if (n->m_len < oiphlen + tcphlen && ((n = m_pullup(n, oiphlen + tcphlen)) == NULL)) goto freeit; - icmpelen = max(tcphlen, min(V_icmp_quotelen, oip->ip_len - oiphlen)); + icmpelen = max(tcphlen, min(V_icmp_quotelen, + ntohs(oip->ip_len) - oiphlen)); } else -stdreply: icmpelen = max(8, min(V_icmp_quotelen, oip->ip_len - oiphlen)); +stdreply: icmpelen = max(8, min(V_icmp_quotelen, ntohs(oip->ip_len) - oiphlen)); icmplen = min(oiphlen + icmpelen, nlen); if (icmplen < sizeof(struct ip)) @@ -322,8 +323,6 @@ stdreply: icmpelen = max(8, min(V_icmp_q */ m_copydata(n, 0, icmplen, (caddr_t)&icp->icmp_ip); nip = &icp->icmp_ip; - nip->ip_len = htons(nip->ip_len); - nip->ip_off = htons(nip->ip_off); /* * Set up ICMP message mbuf and copy old IP header (without options @@ -338,7 +337,7 @@ stdreply: icmpelen = max(8, min(V_icmp_q m->m_pkthdr.rcvif = n->m_pkthdr.rcvif; nip = mtod(m, struct ip *); bcopy((caddr_t)oip, (caddr_t)nip, sizeof(struct ip)); - nip->ip_len = m->m_len; + nip->ip_len = htons(m->m_len); nip->ip_v = IPVERSION; nip->ip_hl = 5; nip->ip_p = IPPROTO_ICMP; @@ -360,7 +359,7 @@ icmp_input(struct mbuf *m, int off) struct ip *ip = mtod(m, struct ip *); struct sockaddr_in icmpsrc, icmpdst, icmpgw; int hlen = off; - int icmplen = ip->ip_len; + int icmplen = ntohs(ip->ip_len); int i, code; void (*ctlfunc)(int, struct sockaddr *, void *); int fibnum; @@ -501,7 +500,6 @@ icmp_input(struct mbuf *m, int off) ICMPSTAT_INC(icps_badlen); goto freeit; } - icp->icmp_ip.ip_len = ntohs(icp->icmp_ip.ip_len); /* Discard ICMP's in response to multicast packets */ if (IN_MULTICAST(ntohl(icp->icmp_ip.ip_dst.s_addr))) goto badcode; @@ -594,7 +592,8 @@ icmp_input(struct mbuf *m, int off) } ifa_free(&ia->ia_ifa); reflect: - ip->ip_len += hlen; /* since ip_input deducts this */ + /* Since ip_input() deducts this. */ + ip->ip_len = htons(ntohs(ip->ip_len) + hlen); ICMPSTAT_INC(icps_reflect); ICMPSTAT_INC(icps_outhist[icp->icmp_type]); icmp_reflect(m); @@ -864,7 +863,7 @@ match: * Now strip out original options by copying rest of first * mbuf's data back, and adjust the IP length. */ - ip->ip_len -= optlen; + ip->ip_len = htons(ntohs(ip->ip_len) - optlen); ip->ip_v = IPVERSION; ip->ip_hl = 5; m->m_len -= optlen; @@ -898,7 +897,7 @@ icmp_send(struct mbuf *m, struct mbuf *o m->m_len -= hlen; icp = mtod(m, struct icmp *); icp->icmp_cksum = 0; - icp->icmp_cksum = in_cksum(m, ip->ip_len - hlen); + icp->icmp_cksum = in_cksum(m, ntohs(ip->ip_len) - hlen); m->m_data -= hlen; m->m_len += hlen; m->m_pkthdr.rcvif = (struct ifnet *)0; Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Mon Oct 22 20:17:58 2012 (r241912) +++ head/sys/netinet/ip_input.c Mon Oct 22 21:09:03 2012 (r241913) @@ -390,9 +390,8 @@ ip_input(struct mbuf *m) m->m_flags &= ~M_FASTFWD_OURS; /* Set up some basics that will be used later. */ ip = mtod(m, struct ip *); - ip->ip_len = ntohs(ip->ip_len); - ip->ip_off = ntohs(ip->ip_off); hlen = ip->ip_hl << 2; + ip_len = ntohs(ip->ip_len); goto ours; } @@ -513,8 +512,6 @@ tooshort: #ifdef IPFIREWALL_FORWARD if (m->m_flags & M_FASTFWD_OURS) { m->m_flags &= ~M_FASTFWD_OURS; - ip->ip_len = ntohs(ip->ip_len); - ip->ip_off = ntohs(ip->ip_off); goto ours; } if ((dchg = (m_tag_find(m, PACKET_TAG_IPFORWARD, NULL) != NULL)) != 0) { @@ -523,20 +520,12 @@ tooshort: * packets originally destined to us to some other directly * connected host. */ - ip->ip_len = ntohs(ip->ip_len); - ip->ip_off = ntohs(ip->ip_off); ip_forward(m, dchg); return; } #endif /* IPFIREWALL_FORWARD */ passin: - /* - * From now and up to output pfil(9) processing in ip_output() - * the header is in host byte order. - */ - ip->ip_len = ntohs(ip->ip_len); - ip->ip_off = ntohs(ip->ip_off); /* * Process options and, if not destined for us, @@ -732,20 +721,21 @@ ours: * Attempt reassembly; if it succeeds, proceed. * ip_reass() will return a different mbuf. */ - if (ip->ip_off & (IP_MF | IP_OFFMASK)) { + if (ip->ip_off & htons(IP_MF | IP_OFFMASK)) { m = ip_reass(m); if (m == NULL) return; ip = mtod(m, struct ip *); /* Get the header length of the reassembled packet */ hlen = ip->ip_hl << 2; + ip_len = ntohs(ip->ip_len); } /* * Further protocols expect the packet length to be w/o the * IP header. */ - ip->ip_len -= hlen; + ip->ip_len = htons(ip_len - hlen); #ifdef IPSEC /* @@ -914,21 +904,20 @@ found: * Adjust ip_len to not reflect header, * convert offset of this to bytes. */ - ip->ip_len -= hlen; - if (ip->ip_off & IP_MF) { + ip->ip_len = htons(ntohs(ip->ip_len) - hlen); + if (ip->ip_off & htons(IP_MF)) { /* * Make sure that fragments have a data length * that's a non-zero multiple of 8 bytes. */ - if (ip->ip_len == 0 || (ip->ip_len & 0x7) != 0) { + if (ntohs(ip->ip_len) == 0 || (ntohs(ip->ip_len & 0x7) != 0)) { IPSTAT_INC(ips_toosmall); /* XXX */ goto dropfrag; } m->m_flags |= M_FRAG; } else m->m_flags &= ~M_FRAG; - ip->ip_off <<= 3; - + ip->ip_off = htons(ntohs(ip->ip_off) << 3); /* * Attempt reassembly; if it succeeds, proceed. @@ -1000,7 +989,7 @@ found: * Find a segment which begins after this one does. */ for (p = NULL, q = fp->ipq_frags; q; p = q, q = q->m_nextpkt) - if (GETIP(q)->ip_off > ip->ip_off) + if (ntohs(GETIP(q)->ip_off) > ntohs(ip->ip_off)) break; /* @@ -1013,14 +1002,15 @@ found: * segment, then it's checksum is invalidated. */ if (p) { - i = GETIP(p)->ip_off + GETIP(p)->ip_len - ip->ip_off; + i = ntohs(GETIP(p)->ip_off) + ntohs(GETIP(p)->ip_len) - + ntohs(ip->ip_off); if (i > 0) { - if (i >= ip->ip_len) + if (i >= ntohs(ip->ip_len)) goto dropfrag; m_adj(m, i); m->m_pkthdr.csum_flags = 0; - ip->ip_off += i; - ip->ip_len -= i; + ip->ip_off = htons(ntohs(ip->ip_off) + i); + ip->ip_len = htons(ntohs(ip->ip_len) - i); } m->m_nextpkt = p->m_nextpkt; p->m_nextpkt = m; @@ -1033,12 +1023,13 @@ found: * While we overlap succeeding segments trim them or, * if they are completely covered, dequeue them. */ - for (; q != NULL && ip->ip_off + ip->ip_len > GETIP(q)->ip_off; - q = nq) { - i = (ip->ip_off + ip->ip_len) - GETIP(q)->ip_off; - if (i < GETIP(q)->ip_len) { - GETIP(q)->ip_len -= i; - GETIP(q)->ip_off += i; + for (; q != NULL && ntohs(ip->ip_off) + ntohs(ip->ip_len) > + ntohs(GETIP(q)->ip_off); q = nq) { + i = (ntohs(ip->ip_off) + ntohs(ip->ip_len)) - + ntohs(GETIP(q)->ip_off); + if (i < ntohs(GETIP(q)->ip_len)) { + GETIP(q)->ip_len = htons(ntohs(GETIP(q)->ip_len) - i); + GETIP(q)->ip_off = htons(ntohs(GETIP(q)->ip_off) + i); m_adj(q, i); q->m_pkthdr.csum_flags = 0; break; @@ -1062,14 +1053,14 @@ found: */ next = 0; for (p = NULL, q = fp->ipq_frags; q; p = q, q = q->m_nextpkt) { - if (GETIP(q)->ip_off != next) { + if (ntohs(GETIP(q)->ip_off) != next) { if (fp->ipq_nfrags > V_maxfragsperpacket) { IPSTAT_ADD(ips_fragdropped, fp->ipq_nfrags); ip_freef(head, fp); } goto done; } - next += GETIP(q)->ip_len; + next += ntohs(GETIP(q)->ip_len); } /* Make sure the last packet didn't have the IP_MF flag */ if (p->m_flags & M_FRAG) { @@ -1125,7 +1116,7 @@ found: * packet; dequeue and discard fragment reassembly header. * Make header visible. */ - ip->ip_len = (ip->ip_hl << 2) + next; + ip->ip_len = htons((ip->ip_hl << 2) + next); ip->ip_src = fp->ipq_src; ip->ip_dst = fp->ipq_dst; TAILQ_REMOVE(head, fp, ipq_list); @@ -1365,8 +1356,6 @@ u_char inetctlerrmap[PRC_NCMDS] = { * * The srcrt parameter indicates whether the packet is being forwarded * via a source route. - * - * IP header in host byte order. */ void ip_forward(struct mbuf *m, int srcrt) @@ -1436,7 +1425,7 @@ ip_forward(struct mbuf *m, int srcrt) mcopy = NULL; } if (mcopy != NULL) { - mcopy->m_len = min(ip->ip_len, M_TRAILINGSPACE(mcopy)); + mcopy->m_len = min(ntohs(ip->ip_len), M_TRAILINGSPACE(mcopy)); mcopy->m_pkthdr.len = mcopy->m_len; m_copydata(m, 0, mcopy->m_len, mtod(mcopy, caddr_t)); } @@ -1564,7 +1553,7 @@ ip_forward(struct mbuf *m, int srcrt) if (ia != NULL) mtu = ia->ia_ifp->if_mtu; else - mtu = ip_next_mtu(ip->ip_len, 0); + mtu = ip_next_mtu(ntohs(ip->ip_len), 0); } IPSTAT_INC(ips_cantfrag); break; Modified: head/sys/netinet/ip_ipsec.c ============================================================================== --- head/sys/netinet/ip_ipsec.c Mon Oct 22 20:17:58 2012 (r241912) +++ head/sys/netinet/ip_ipsec.c Mon Oct 22 21:09:03 2012 (r241913) @@ -259,7 +259,6 @@ ip_ipsec_output(struct mbuf **m, struct { #ifdef IPSEC struct secpolicy *sp = NULL; - struct ip *ip = mtod(*m, struct ip *); struct tdb_ident *tdbi; struct m_tag *mtag; /* @@ -324,9 +323,6 @@ ip_ipsec_output(struct mbuf **m, struct } } - ip->ip_len = htons(ip->ip_len); - ip->ip_off = htons(ip->ip_off); - /* * Do delayed checksums now because we send before * this is done in the normal processing path. @@ -337,6 +333,8 @@ ip_ipsec_output(struct mbuf **m, struct } #ifdef SCTP if ((*m)->m_pkthdr.csum_flags & CSUM_SCTP) { + struct ip *ip = mtod(*m, struct ip *); + sctp_delayed_cksum(*m, (uint32_t)(ip->ip_hl << 2)); (*m)->m_pkthdr.csum_flags &= ~CSUM_SCTP; } @@ -351,8 +349,6 @@ ip_ipsec_output(struct mbuf **m, struct * IPsec processing and return without error. */ *error = 0; - ip->ip_len = ntohs(ip->ip_len); - ip->ip_off = ntohs(ip->ip_off); goto done; } /* Modified: head/sys/netinet/ip_mroute.c ============================================================================== --- head/sys/netinet/ip_mroute.c Mon Oct 22 20:17:58 2012 (r241912) +++ head/sys/netinet/ip_mroute.c Mon Oct 22 21:09:03 2012 (r241913) @@ -1493,7 +1493,7 @@ ip_mdq(struct mbuf *m, struct ifnet *ifp { struct ip *ip = mtod(m, struct ip *); vifi_t vifi; - int plen = ip->ip_len; + int plen = ntohs(ip->ip_len); VIF_LOCK_ASSERT(); @@ -2376,10 +2376,7 @@ pim_register_prepare(struct ip *ip, stru /* Take care of delayed checksums */ if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA) { - /* XXX: in_delayed_cksum() expects net byte order */ - ip->ip_len = htons(ip->ip_len); in_delayed_cksum(m); - ip->ip_len = ntohs(ip->ip_len); m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; } @@ -2401,10 +2398,8 @@ pim_register_prepare(struct ip *ip, stru /* Compute the MTU after the PIM Register encapsulation */ mtu = 0xffff - sizeof(pim_encap_iphdr) - sizeof(pim_encap_pimhdr); - if (ip->ip_len <= mtu) { + if (ntohs(ip->ip_len) <= mtu) { /* Turn the IP header into a valid one */ - ip->ip_len = htons(ip->ip_len); - ip->ip_off = htons(ip->ip_off); ip->ip_sum = 0; ip->ip_sum = in_cksum(mb_copy, ip->ip_hl << 2); } else { @@ -2509,7 +2504,8 @@ pim_register_send_rp(struct ip *ip, stru ip_outer = mtod(mb_first, struct ip *); *ip_outer = pim_encap_iphdr; ip_outer->ip_id = ip_newid(); - ip_outer->ip_len = len + sizeof(pim_encap_iphdr) + sizeof(pim_encap_pimhdr); + ip_outer->ip_len = htons(len + sizeof(pim_encap_iphdr) + + sizeof(pim_encap_pimhdr)); ip_outer->ip_src = V_viftable[vifi].v_lcl_addr; ip_outer->ip_dst = rt->mfc_rp; /* @@ -2517,8 +2513,8 @@ pim_register_send_rp(struct ip *ip, stru * IP_DF bit. */ ip_outer->ip_tos = ip->ip_tos; - if (ntohs(ip->ip_off) & IP_DF) - ip_outer->ip_off |= IP_DF; + if (ip->ip_off & htons(IP_DF)) + ip_outer->ip_off |= htons(IP_DF); pimhdr = (struct pim_encap_pimhdr *)((caddr_t)ip_outer + sizeof(pim_encap_iphdr)); *pimhdr = pim_encap_pimhdr; @@ -2571,7 +2567,7 @@ pim_input(struct mbuf *m, int off) struct ip *ip = mtod(m, struct ip *); struct pim *pim; int minlen; - int datalen = ip->ip_len; + int datalen = ntohs(ip->ip_len); int ip_tos; int iphlen = off; Modified: head/sys/netinet/ip_options.c ============================================================================== --- head/sys/netinet/ip_options.c Mon Oct 22 20:17:58 2012 (r241912) +++ head/sys/netinet/ip_options.c Mon Oct 22 21:09:03 2012 (r241913) @@ -490,7 +490,7 @@ ip_insertoptions(struct mbuf *m, struct unsigned optlen; optlen = opt->m_len - sizeof(p->ipopt_dst); - if (optlen + ip->ip_len > IP_MAXPACKET) { + if (optlen + ntohs(ip->ip_len) > IP_MAXPACKET) { *phlen = 0; return (m); /* XXX should fail */ } @@ -523,7 +523,7 @@ ip_insertoptions(struct mbuf *m, struct *phlen = sizeof(struct ip) + optlen; ip->ip_v = IPVERSION; ip->ip_hl = *phlen >> 2; - ip->ip_len += optlen; + ip->ip_len = htons(ntohs(ip->ip_len) + optlen); return (m); } Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Mon Oct 22 20:17:58 2012 (r241912) +++ head/sys/netinet/ip_output.c Mon Oct 22 21:09:03 2012 (r241913) @@ -102,7 +102,6 @@ extern struct protosw inetsw[]; /* * IP output. The packet in mbuf chain m contains a skeletal IP * header (with len, off, ttl, proto, tos, src, dst). - * ip_len and ip_off are in host format. * The mbuf chain containing the packet will be freed. * The mbuf opt, if present, will not be freed. * If route ro is present and has ro_rt initialized, route lookup would be @@ -175,6 +174,8 @@ ip_output(struct mbuf *m, struct mbuf *o hlen = len; /* ip->ip_hl is updated above */ } ip = mtod(m, struct ip *); + ip_len = ntohs(ip->ip_len); + ip_off = ntohs(ip->ip_off); /* * Fill in IP header. If we are not allowing fragmentation, @@ -442,7 +443,7 @@ again: * packet or packet fragments, unless ALTQ is enabled on the given * interface in which case packetdrop should be done by queueing. */ - n = ip->ip_len / mtu + 1; /* how many fragments ? */ + n = ip_len / mtu + 1; /* how many fragments ? */ if ( #ifdef ALTQ (!ALTQ_IS_ENABLED(&ifp->if_snd)) && @@ -469,7 +470,7 @@ again: goto bad; } /* don't allow broadcast messages to be fragmented */ - if (ip->ip_len > mtu) { + if (ip_len > mtu) { error = EMSGSIZE; goto bad; } @@ -502,12 +503,6 @@ sendit: hlen = ip->ip_hl << 2; #endif /* IPSEC */ - /* - * To network byte order. pfil(9) hooks and ip_fragment() expect this. - */ - ip->ip_len = htons(ip->ip_len); - ip->ip_off = htons(ip->ip_off); - /* Jump over all PFIL processing if hooks are not active. */ if (!PFIL_HOOKED(&V_inet_pfil_hook)) goto passout; @@ -544,8 +539,6 @@ sendit: } else { if (ia != NULL) ifa_free(&ia->ia_ifa); - ip->ip_len = ntohs(ip->ip_len); - ip->ip_off = ntohs(ip->ip_off); goto again; /* Redo the routing table lookup. */ } } @@ -579,16 +572,11 @@ sendit: m_tag_delete(m, fwd_tag); if (ia != NULL) ifa_free(&ia->ia_ifa); - ip->ip_len = ntohs(ip->ip_len); - ip->ip_off = ntohs(ip->ip_off); goto again; } #endif /* IPFIREWALL_FORWARD */ passout: - ip_len = ntohs(ip->ip_len); - ip_off = ntohs(ip->ip_off); - /* 127/8 must not appear on wire - RFC1122. */ if ((ntohl(ip->ip_dst.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET || (ntohl(ip->ip_src.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET) { @@ -1295,8 +1283,6 @@ ip_ctloutput(struct socket *so, struct s * calls the output routine of the loopback "driver", but with an interface * pointer that might NOT be a loopback interface -- evil, but easier than * replicating that code here. - * - * IP header in host byte order. */ static void ip_mloopback(struct ifnet *ifp, struct mbuf *m, struct sockaddr_in *dst, @@ -1313,9 +1299,6 @@ ip_mloopback(struct ifnet *ifp, struct m if (copym != NULL && (copym->m_flags & M_EXT || copym->m_len < hlen)) copym = m_pullup(copym, hlen); if (copym != NULL) { - ip = mtod(copym, struct ip *); - ip->ip_len = htons(ip->ip_len); - ip->ip_off = htons(ip->ip_off); /* If needed, compute the checksum and mark it as valid. */ if (copym->m_pkthdr.csum_flags & CSUM_DELAY_DATA) { in_delayed_cksum(copym); @@ -1328,6 +1311,7 @@ ip_mloopback(struct ifnet *ifp, struct m * We don't bother to fragment if the IP length is greater * than the interface's MTU. Can this possibly matter? */ + ip = mtod(copym, struct ip *); ip->ip_sum = 0; ip->ip_sum = in_cksum(copym, hlen); #if 1 /* XXX */ Modified: head/sys/netinet/raw_ip.c ============================================================================== --- head/sys/netinet/raw_ip.c Mon Oct 22 20:17:58 2012 (r241912) +++ head/sys/netinet/raw_ip.c Mon Oct 22 21:09:03 2012 (r241913) @@ -292,7 +292,8 @@ rip_input(struct mbuf *m, int off) * not modify the packet except for some * byte order swaps. */ - ip->ip_len += off; + ip->ip_len = ntohs(ip->ip_len) + off; + ip->ip_off = ntohs(ip->ip_off); hash = INP_PCBHASH_RAW(proto, ip->ip_src.s_addr, ip->ip_dst.s_addr, V_ripcbinfo.ipi_hashmask); @@ -449,11 +450,11 @@ rip_output(struct mbuf *m, struct socket ip = mtod(m, struct ip *); ip->ip_tos = inp->inp_ip_tos; if (inp->inp_flags & INP_DONTFRAG) - ip->ip_off = IP_DF; + ip->ip_off = htons(IP_DF); else - ip->ip_off = 0; + ip->ip_off = htons(0); ip->ip_p = inp->inp_ip_p; - ip->ip_len = m->m_pkthdr.len; + ip->ip_len = htons(m->m_pkthdr.len); ip->ip_src = inp->inp_laddr; if (jailed(inp->inp_cred)) { /* @@ -505,6 +506,12 @@ rip_output(struct mbuf *m, struct socket ip->ip_id = ip_newid(); /* + * Applications on raw sockets expect host byte order. + */ + ip->ip_len = htons(ip->ip_len); + ip->ip_off = htons(ip->ip_off); + + /* * XXX prevent ip_output from overwriting header fields. */ flags |= IP_RAWOUTPUT; Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Mon Oct 22 20:17:58 2012 (r241912) +++ head/sys/netinet/sctp_input.c Mon Oct 22 21:09:03 2012 (r241913) @@ -6038,7 +6038,7 @@ sctp_input_with_port(struct mbuf *i_pak, dst.sin_len = sizeof(struct sockaddr_in); dst.sin_port = sh->dest_port; dst.sin_addr = ip->ip_dst; - length = ip->ip_len + iphlen; + length = ntohs(ip->ip_len) + iphlen; /* Validate mbuf chain length with IP payload length. */ if (SCTP_HEADER_LEN(m) != length) { SCTPDBG(SCTP_DEBUG_INPUT1, Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Mon Oct 22 20:17:58 2012 (r241912) +++ head/sys/netinet/sctp_output.c Mon Oct 22 21:09:03 2012 (r241913) @@ -3980,15 +3980,15 @@ sctp_lowlevel_chunk_output(struct sctp_i tos_value |= sctp_get_ect(stcb); } if ((nofragment_flag) && (port == 0)) { - ip->ip_off = IP_DF; + ip->ip_off = htons(IP_DF); } else - ip->ip_off = 0; + ip->ip_off = htons(0); /* FreeBSD has a function for ip_id's */ ip->ip_id = ip_newid(); ip->ip_ttl = inp->ip_inp.inp.inp_ip_ttl; - ip->ip_len = packet_length; + ip->ip_len = htons(packet_length); ip->ip_tos = tos_value; if (port) { ip->ip_p = IPPROTO_UDP; @@ -10991,7 +10991,7 @@ sctp_send_resp_msg(struct sockaddr *src, udp->uh_sum = 0; } } - ip->ip_len = len; + ip->ip_len = htons(len); if (port) { #if defined(SCTP_WITH_NO_CSUM) SCTP_STAT_INCR(sctps_sendnocrc); Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Mon Oct 22 20:17:58 2012 (r241912) +++ head/sys/netinet/sctp_usrreq.c Mon Oct 22 21:09:03 2012 (r241913) @@ -180,7 +180,7 @@ sctp_notify_mbuf(struct sctp_inpcb *inp, SCTP_TCB_UNLOCK(stcb); return; } - totsz = ip->ip_len; + totsz = ntohs(ip->ip_len); nxtsz = ntohs(icmph->icmp_nextmtu); if (nxtsz == 0) { Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Mon Oct 22 20:17:58 2012 (r241912) +++ head/sys/netinet/sctputil.c Mon Oct 22 21:09:03 2012 (r241913) @@ -6821,7 +6821,7 @@ sctp_recv_udp_tunneled_packet(struct mbu switch (iph->ip_v) { #ifdef INET case IPVERSION: - iph->ip_len -= sizeof(struct udphdr); + iph->ip_len = ntohs(htons(iph->ip_len) - sizeof(struct udphdr)); sctp_input_with_port(m, off, port); break; #endif Modified: head/sys/netinet/siftr.c ============================================================================== --- head/sys/netinet/siftr.c Mon Oct 22 20:17:58 2012 (r241912) +++ head/sys/netinet/siftr.c Mon Oct 22 21:09:03 2012 (r241913) @@ -952,7 +952,8 @@ siftr_chkpkt(void *arg, struct mbuf **m, * the mbuf cluster "at" at offset "offset" bytes from * the beginning of the "at" mbuf's data pointer. */ - th->th_sum = in_cksum_skip(*m, ip->ip_len, ip_hl); + th->th_sum = in_cksum_skip(*m, ntohs(ip->ip_len), + ip_hl); } /* Modified: head/sys/netinet/tcp_debug.c ============================================================================== --- head/sys/netinet/tcp_debug.c Mon Oct 22 20:17:58 2012 (r241912) +++ head/sys/netinet/tcp_debug.c Mon Oct 22 21:09:03 2012 (r241913) @@ -175,11 +175,10 @@ tcp_trace(short act, short ostate, struc #ifdef INET6 isipv6 ? ntohs(((struct ip6_hdr *)ipgen)->ip6_plen) : #endif - ((struct ip *)ipgen)->ip_len; + ntohs(((struct ip *)ipgen)->ip_len); if (act == TA_OUTPUT) { seq = ntohl(seq); ack = ntohl(ack); - len = ntohs((u_short)len); } if (act == TA_OUTPUT) len -= sizeof (struct tcphdr); Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Mon Oct 22 20:17:58 2012 (r241912) +++ head/sys/netinet/tcp_input.c Mon Oct 22 21:09:03 2012 (r241913) @@ -528,9 +528,6 @@ tcp_input(struct mbuf *m, int off0) { struct tcphdr *th = NULL; struct ip *ip = NULL; -#ifdef INET - struct ipovly *ipov; -#endif struct inpcb *inp = NULL; struct tcpcb *tp = NULL; struct socket *so = NULL; @@ -643,32 +640,27 @@ tcp_input(struct mbuf *m, int off0) } } ip = mtod(m, struct ip *); - ipov = (struct ipovly *)ip; th = (struct tcphdr *)((caddr_t)ip + off0); - tlen = ip->ip_len; + tlen = ntohs(ip->ip_len); if (m->m_pkthdr.csum_flags & CSUM_DATA_VALID) { if (m->m_pkthdr.csum_flags & CSUM_PSEUDO_HDR) th->th_sum = m->m_pkthdr.csum_data; else th->th_sum = in_pseudo(ip->ip_src.s_addr, - ip->ip_dst.s_addr, - htonl(m->m_pkthdr.csum_data + - ip->ip_len + - IPPROTO_TCP)); + ip->ip_dst.s_addr, + htonl(m->m_pkthdr.csum_data + tlen + + IPPROTO_TCP)); th->th_sum ^= 0xffff; -#ifdef TCPDEBUG - ipov->ih_len = (u_short)tlen; - ipov->ih_len = htons(ipov->ih_len); -#endif } else { + struct ipovly *ipov = (struct ipovly *)ip; + /* * Checksum extended TCP header and data. */ - len = sizeof (struct ip) + tlen; + len = off0 + tlen; bzero(ipov->ih_x1, sizeof(ipov->ih_x1)); - ipov->ih_len = (u_short)tlen; - ipov->ih_len = htons(ipov->ih_len); + ipov->ih_len = htons(tlen); th->th_sum = in_cksum(m, len); } if (th->th_sum) { @@ -721,7 +713,6 @@ tcp_input(struct mbuf *m, int off0) return; } ip = mtod(m, struct ip *); - ipov = (struct ipovly *)ip; th = (struct tcphdr *)((caddr_t)ip + off0); } } Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Mon Oct 22 20:17:58 2012 (r241912) +++ head/sys/netinet/tcp_output.c Mon Oct 22 21:09:03 2012 (r241913) @@ -1239,7 +1239,7 @@ timer: struct route ro; bzero(&ro, sizeof(ro)); - ip->ip_len = m->m_pkthdr.len; + ip->ip_len = htons(m->m_pkthdr.len); #ifdef INET6 if (tp->t_inpcb->inp_vflag & INP_IPV6PROTO) ip->ip_ttl = in6_selecthlim(tp->t_inpcb, NULL); @@ -1253,7 +1253,7 @@ timer: * NB: Don't set DF on small MTU/MSS to have a safe fallback. */ if (V_path_mtu_discovery && tp->t_maxopd > V_tcp_minmss) - ip->ip_off |= IP_DF; + ip->ip_off |= htons(IP_DF); error = ip_output(m, tp->t_inpcb->inp_options, &ro, ((so->so_options & SO_DONTROUTE) ? IP_ROUTETOIF : 0), 0, Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Mon Oct 22 20:17:58 2012 (r241912) +++ head/sys/netinet/tcp_subr.c Mon Oct 22 21:09:03 2012 (r241913) @@ -584,10 +584,10 @@ tcp_respond(struct tcpcb *tp, void *ipge #ifdef INET { tlen += sizeof (struct tcpiphdr); - ip->ip_len = tlen; + ip->ip_len = htons(tlen); ip->ip_ttl = V_ip_defttl; if (V_path_mtu_discovery) - ip->ip_off |= IP_DF; + ip->ip_off |= htons(IP_DF); } #endif m->m_len = tlen; @@ -1398,12 +1398,11 @@ tcp_ctlinput(int cmd, struct sockaddr *s /* * If no alternative MTU was * proposed, try the next smaller - * one. ip->ip_len has already - * been swapped in icmp_input(). + * one. */ if (!mtu) - mtu = ip_next_mtu(ip->ip_len, - 1); + mtu = ip_next_mtu( + ntohs(ip->ip_len), 1); if (mtu < V_tcp_minmss + sizeof(struct tcpiphdr)) mtu = V_tcp_minmss Modified: head/sys/netinet/tcp_syncache.c ============================================================================== --- head/sys/netinet/tcp_syncache.c Mon Oct 22 20:17:58 2012 (r241912) +++ head/sys/netinet/tcp_syncache.c Mon Oct 22 21:09:03 2012 (r241913) @@ -1395,7 +1395,7 @@ syncache_respond(struct syncache *sc) ip = mtod(m, struct ip *); ip->ip_v = IPVERSION; ip->ip_hl = sizeof(struct ip) >> 2; - ip->ip_len = tlen; + ip->ip_len = htons(tlen); ip->ip_id = 0; ip->ip_off = 0; ip->ip_sum = 0; @@ -1413,7 +1413,7 @@ syncache_respond(struct syncache *sc) * 2) the SCF_UNREACH flag has been set */ if (V_path_mtu_discovery && ((sc->sc_flags & SCF_UNREACH) == 0)) - ip->ip_off |= IP_DF; + ip->ip_off |= htons(IP_DF); th = (struct tcphdr *)(ip + 1); } @@ -1473,7 +1473,7 @@ syncache_respond(struct syncache *sc) ip6->ip6_plen = htons(ntohs(ip6->ip6_plen) + optlen); else #endif - ip->ip_len += optlen; + ip->ip_len = htons(ntohs(ip->ip_len) + optlen); } else optlen = 0; Modified: head/sys/netinet/tcp_timewait.c ============================================================================== --- head/sys/netinet/tcp_timewait.c Mon Oct 22 20:17:58 2012 (r241912) +++ head/sys/netinet/tcp_timewait.c Mon Oct 22 21:09:03 2012 (r241913) @@ -593,9 +593,9 @@ tcp_twrespond(struct tcptw *tw, int flag m->m_pkthdr.csum_flags = CSUM_TCP; th->th_sum = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr, htons(sizeof(struct tcphdr) + optlen + IPPROTO_TCP)); - ip->ip_len = m->m_pkthdr.len; + ip->ip_len = htons(m->m_pkthdr.len); if (V_path_mtu_discovery) - ip->ip_off |= IP_DF; + ip->ip_off |= htons(IP_DF); error = ip_output(m, inp->inp_options, NULL, ((tw->tw_so_options & SO_DONTROUTE) ? IP_ROUTETOIF : 0), NULL, inp); Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Mon Oct 22 20:17:58 2012 (r241912) +++ head/sys/netinet/udp_usrreq.c Mon Oct 22 21:09:03 2012 (r241913) @@ -338,7 +338,7 @@ udp_input(struct mbuf *m, int off) struct udphdr *uh; struct ifnet *ifp; struct inpcb *inp; - int len; + uint16_t len, ip_len; struct ip save_ip; struct sockaddr_in udp_in; #ifdef IPFIREWALL_FORWARD @@ -392,13 +392,13 @@ udp_input(struct mbuf *m, int off) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 21:14: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 C124721E; Mon, 22 Oct 2012 21:14:26 +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 A88468FC12; Mon, 22 Oct 2012 21:14: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 q9MLEQDP008892; Mon, 22 Oct 2012 21:14:26 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MLEQdK008890; Mon, 22 Oct 2012 21:14:26 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201210222114.q9MLEQdK008890@svn.freebsd.org> From: Ed Schouten Date: Mon, 22 Oct 2012 21:14:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241914 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 21:14:26 -0000 Author: ed Date: Mon Oct 22 21:14:26 2012 New Revision: 241914 URL: http://svn.freebsd.org/changeset/base/241914 Log: Remove unused `vfslocked' variable. I have no idea what this `vfslocked' thing means. I wonder how it ended up here. Modified: head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Mon Oct 22 21:09:03 2012 (r241913) +++ head/sys/kern/vfs_syscalls.c Mon Oct 22 21:14:26 2012 (r241914) @@ -4507,10 +4507,9 @@ kern_posix_fallocate(struct thread *td, struct mount *mp; struct vnode *vp; off_t olen, ooffset; - int error, vfslocked; + int error; fp = NULL; - vfslocked = 0; error = fget(td, fd, CAP_WRITE, &fp); if (error != 0) goto out; From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 21:49: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 F1F5067B; Mon, 22 Oct 2012 21:49:57 +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 D657F8FC0A; Mon, 22 Oct 2012 21:49: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 q9MLnvVo014564; Mon, 22 Oct 2012 21:49:57 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MLnvrt014543; Mon, 22 Oct 2012 21:49:57 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201210222149.q9MLnvrt014543@svn.freebsd.org> From: Xin LI Date: Mon, 22 Oct 2012 21:49:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241916 - in head/sys: netinet netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 21:49:58 -0000 Author: delphij Date: Mon Oct 22 21:49:56 2012 New Revision: 241916 URL: http://svn.freebsd.org/changeset/base/241916 Log: Remove __P. Submitted by: kevlo Reviewed by: md5(1) MFC after: 2 months Modified: head/sys/netinet/sctp_uio.h head/sys/netinet/sctp_var.h head/sys/netinet6/icmp6.c head/sys/netinet6/in6.c head/sys/netinet6/in6.h head/sys/netinet6/in6_gif.h head/sys/netinet6/in6_ifattach.h head/sys/netinet6/in6_pcb.h head/sys/netinet6/in6_src.c head/sys/netinet6/in6_var.h head/sys/netinet6/ip6_output.c head/sys/netinet6/ip6_var.h head/sys/netinet6/ip6protosw.h head/sys/netinet6/nd6.c head/sys/netinet6/nd6.h head/sys/netinet6/nd6_rtr.c head/sys/netinet6/pim6_var.h head/sys/netinet6/scope6_var.h head/sys/netinet6/sctp6_var.h head/sys/netinet6/tcp6_var.h Modified: head/sys/netinet/sctp_uio.h ============================================================================== --- head/sys/netinet/sctp_uio.h Mon Oct 22 21:26:36 2012 (r241915) +++ head/sys/netinet/sctp_uio.h Mon Oct 22 21:49:56 2012 (r241916) @@ -1267,44 +1267,44 @@ sctp_sorecvmsg(struct socket *so, #if !(defined(_KERNEL)) && !(defined(__Userspace__)) __BEGIN_DECLS -int sctp_peeloff __P((int, sctp_assoc_t)); -int sctp_bindx __P((int, struct sockaddr *, int, int)); -int sctp_connectx __P((int, const struct sockaddr *, int, sctp_assoc_t *)); -int sctp_getaddrlen __P((sa_family_t)); -int sctp_getpaddrs __P((int, sctp_assoc_t, struct sockaddr **)); -void sctp_freepaddrs __P((struct sockaddr *)); -int sctp_getladdrs __P((int, sctp_assoc_t, struct sockaddr **)); -void sctp_freeladdrs __P((struct sockaddr *)); -int sctp_opt_info __P((int, sctp_assoc_t, int, void *, socklen_t *)); +int sctp_peeloff(int, sctp_assoc_t); +int sctp_bindx(int, struct sockaddr *, int, int); +int sctp_connectx(int, const struct sockaddr *, int, sctp_assoc_t *); +int sctp_getaddrlen(sa_family_t); +int sctp_getpaddrs(int, sctp_assoc_t, struct sockaddr **); +void sctp_freepaddrs(struct sockaddr *); +int sctp_getladdrs(int, sctp_assoc_t, struct sockaddr **); +void sctp_freeladdrs(struct sockaddr *); +int sctp_opt_info(int, sctp_assoc_t, int, void *, socklen_t *); /* deprecated */ ssize_t sctp_sendmsg -__P((int, const void *, size_t, const struct sockaddr *, - socklen_t, uint32_t, uint32_t, uint16_t, uint32_t, uint32_t)); +(int, const void *, size_t, const struct sockaddr *, + socklen_t, uint32_t, uint32_t, uint16_t, uint32_t, uint32_t); /* deprecated */ - ssize_t sctp_send __P((int, const void *, size_t, - const struct sctp_sndrcvinfo *, int)); + ssize_t sctp_send(int, const void *, size_t, + const struct sctp_sndrcvinfo *, int); /* deprecated */ - ssize_t sctp_sendx __P((int, const void *, size_t, struct sockaddr *, - int, struct sctp_sndrcvinfo *, int)); + ssize_t sctp_sendx(int, const void *, size_t, struct sockaddr *, + int, struct sctp_sndrcvinfo *, int); /* deprecated */ - ssize_t sctp_sendmsgx __P((int sd, const void *, size_t, struct sockaddr *, - int, uint32_t, uint32_t, uint16_t, uint32_t, uint32_t)); + ssize_t sctp_sendmsgx(int sd, const void *, size_t, struct sockaddr *, + int, uint32_t, uint32_t, uint16_t, uint32_t, uint32_t); - sctp_assoc_t sctp_getassocid __P((int, struct sockaddr *)); + sctp_assoc_t sctp_getassocid(int, struct sockaddr *); /* deprecated */ - ssize_t sctp_recvmsg __P((int, void *, size_t, struct sockaddr *, socklen_t *, - struct sctp_sndrcvinfo *, int *)); + ssize_t sctp_recvmsg(int, void *, size_t, struct sockaddr *, socklen_t *, + struct sctp_sndrcvinfo *, int *); - ssize_t sctp_sendv __P((int, const struct iovec *, int, struct sockaddr *, - int, void *, socklen_t, unsigned int, int)); + ssize_t sctp_sendv(int, const struct iovec *, int, struct sockaddr *, + int, void *, socklen_t, unsigned int, int); - ssize_t sctp_recvv __P((int, const struct iovec *, int, struct sockaddr *, - socklen_t *, void *, socklen_t *, unsigned int *, int *)); + ssize_t sctp_recvv(int, const struct iovec *, int, struct sockaddr *, + socklen_t *, void *, socklen_t *, unsigned int *, int *); __END_DECLS Modified: head/sys/netinet/sctp_var.h ============================================================================== --- head/sys/netinet/sctp_var.h Mon Oct 22 21:26:36 2012 (r241915) +++ head/sys/netinet/sctp_var.h Mon Oct 22 21:49:56 2012 (r241916) @@ -322,29 +322,29 @@ struct sctphdr; void sctp_close(struct socket *so); int sctp_disconnect(struct socket *so); -void sctp_ctlinput __P((int, struct sockaddr *, void *)); -int sctp_ctloutput __P((struct socket *, struct sockopt *)); +void sctp_ctlinput(int, struct sockaddr *, void *); +int sctp_ctloutput(struct socket *, struct sockopt *); #ifdef INET -void sctp_input_with_port __P((struct mbuf *, int, uint16_t)); +void sctp_input_with_port(struct mbuf *, int, uint16_t); #endif #ifdef INET -void sctp_input __P((struct mbuf *, int)); +void sctp_input(struct mbuf *, int); #endif -void sctp_pathmtu_adjustment __P((struct sctp_tcb *, uint16_t)); -void sctp_drain __P((void)); -void sctp_init __P((void)); +void sctp_pathmtu_adjustment(struct sctp_tcb *, uint16_t); +void sctp_drain(void); +void sctp_init(void); void sctp_finish(void); int sctp_flush(struct socket *, int); -int sctp_shutdown __P((struct socket *)); +int sctp_shutdown(struct socket *); void sctp_notify -__P((struct sctp_inpcb *, struct ip *ip, struct sctphdr *, +(struct sctp_inpcb *, struct ip *ip, struct sctphdr *, struct sockaddr *, struct sctp_tcb *, - struct sctp_nets *)); + struct sctp_nets *); int sctp_bindx(struct socket *, int, struct sockaddr_storage *, int, int, struct proc *); Modified: head/sys/netinet6/icmp6.c ============================================================================== --- head/sys/netinet6/icmp6.c Mon Oct 22 21:26:36 2012 (r241915) +++ head/sys/netinet6/icmp6.c Mon Oct 22 21:49:56 2012 (r241916) @@ -133,15 +133,15 @@ VNET_DECLARE(int, icmp6_nodeinfo); static void icmp6_errcount(struct icmp6errstat *, int, int); static int icmp6_rip6_input(struct mbuf **, int); static int icmp6_ratelimit(const struct in6_addr *, const int, const int); -static const char *icmp6_redirect_diag __P((struct in6_addr *, - struct in6_addr *, struct in6_addr *)); +static const char *icmp6_redirect_diag(struct in6_addr *, + struct in6_addr *, struct in6_addr *); static struct mbuf *ni6_input(struct mbuf *, int); static struct mbuf *ni6_nametodns(const char *, int, int); static int ni6_dnsmatch(const char *, int, const char *, int); -static int ni6_addrs __P((struct icmp6_nodeinfo *, struct mbuf *, - struct ifnet **, struct in6_addr *)); -static int ni6_store_addrs __P((struct icmp6_nodeinfo *, struct icmp6_nodeinfo *, - struct ifnet *, int)); +static int ni6_addrs(struct icmp6_nodeinfo *, struct mbuf *, + struct ifnet **, struct in6_addr *); +static int ni6_store_addrs(struct icmp6_nodeinfo *, struct icmp6_nodeinfo *, + struct ifnet *, int); static int icmp6_notify_error(struct mbuf **, int, int, int); /* Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Mon Oct 22 21:26:36 2012 (r241915) +++ head/sys/netinet6/in6.c Mon Oct 22 21:49:56 2012 (r241916) @@ -129,10 +129,10 @@ const struct in6_addr in6mask128 = IN6MA const struct sockaddr_in6 sa6_any = { sizeof(sa6_any), AF_INET6, 0, 0, IN6ADDR_ANY_INIT, 0 }; -static int in6_lifaddr_ioctl __P((struct socket *, u_long, caddr_t, - struct ifnet *, struct thread *)); -static int in6_ifinit __P((struct ifnet *, struct in6_ifaddr *, - struct sockaddr_in6 *, int)); +static int in6_lifaddr_ioctl(struct socket *, u_long, caddr_t, + struct ifnet *, struct thread *); +static int in6_ifinit(struct ifnet *, struct in6_ifaddr *, + struct sockaddr_in6 *, int); static void in6_unlink_ifa(struct in6_ifaddr *, struct ifnet *); int (*faithprefix_p)(struct in6_addr *); Modified: head/sys/netinet6/in6.h ============================================================================== --- head/sys/netinet6/in6.h Mon Oct 22 21:26:36 2012 (r241915) +++ head/sys/netinet6/in6.h Mon Oct 22 21:49:56 2012 (r241916) @@ -635,22 +635,22 @@ struct cmsghdr; struct ip6_hdr; int in6_cksum_pseudo(struct ip6_hdr *, uint32_t, uint8_t, uint16_t); -int in6_cksum __P((struct mbuf *, u_int8_t, u_int32_t, u_int32_t)); -int in6_localaddr __P((struct in6_addr *)); +int in6_cksum(struct mbuf *, u_int8_t, u_int32_t, u_int32_t); +int in6_localaddr(struct in6_addr *); int in6_localip(struct in6_addr *); -int in6_addrscope __P((struct in6_addr *)); -struct in6_ifaddr *in6_ifawithifp __P((struct ifnet *, struct in6_addr *)); -extern void in6_if_up __P((struct ifnet *)); +int in6_addrscope(struct in6_addr *); +struct in6_ifaddr *in6_ifawithifp(struct ifnet *, struct in6_addr *); +extern void in6_if_up(struct ifnet *); struct sockaddr; extern u_char ip6_protox[]; -void in6_sin6_2_sin __P((struct sockaddr_in *sin, - struct sockaddr_in6 *sin6)); -void in6_sin_2_v4mapsin6 __P((struct sockaddr_in *sin, - struct sockaddr_in6 *sin6)); -void in6_sin6_2_sin_in_sock __P((struct sockaddr *nam)); -void in6_sin_2_v4mapsin6_in_sock __P((struct sockaddr **nam)); -extern void addrsel_policy_init __P((void)); +void in6_sin6_2_sin(struct sockaddr_in *sin, + struct sockaddr_in6 *sin6); +void in6_sin_2_v4mapsin6(struct sockaddr_in *sin, + struct sockaddr_in6 *sin6); +void in6_sin6_2_sin_in_sock(struct sockaddr *nam); +void in6_sin_2_v4mapsin6_in_sock(struct sockaddr **nam); +extern void addrsel_policy_init(void); #define satosin6(sa) ((struct sockaddr_in6 *)(sa)) #define sin6tosa(sin6) ((struct sockaddr *)(sin6)) @@ -674,43 +674,43 @@ typedef __socklen_t socklen_t; __BEGIN_DECLS struct cmsghdr; -extern int inet6_option_space __P((int)); -extern int inet6_option_init __P((void *, struct cmsghdr **, int)); -extern int inet6_option_append __P((struct cmsghdr *, const uint8_t *, - int, int)); -extern uint8_t *inet6_option_alloc __P((struct cmsghdr *, int, int, int)); -extern int inet6_option_next __P((const struct cmsghdr *, uint8_t **)); -extern int inet6_option_find __P((const struct cmsghdr *, uint8_t **, int)); - -extern size_t inet6_rthdr_space __P((int, int)); -extern struct cmsghdr *inet6_rthdr_init __P((void *, int)); -extern int inet6_rthdr_add __P((struct cmsghdr *, const struct in6_addr *, - unsigned int)); -extern int inet6_rthdr_lasthop __P((struct cmsghdr *, unsigned int)); +extern int inet6_option_space(int); +extern int inet6_option_init(void *, struct cmsghdr **, int); +extern int inet6_option_append(struct cmsghdr *, const uint8_t *, + int, int); +extern uint8_t *inet6_option_alloc(struct cmsghdr *, int, int, int); +extern int inet6_option_next(const struct cmsghdr *, uint8_t **); +extern int inet6_option_find(const struct cmsghdr *, uint8_t **, int); + +extern size_t inet6_rthdr_space(int, int); +extern struct cmsghdr *inet6_rthdr_init(void *, int); +extern int inet6_rthdr_add(struct cmsghdr *, const struct in6_addr *, + unsigned int); +extern int inet6_rthdr_lasthop(struct cmsghdr *, unsigned int); #if 0 /* not implemented yet */ -extern int inet6_rthdr_reverse __P((const struct cmsghdr *, struct cmsghdr *)); +extern int inet6_rthdr_reverse(const struct cmsghdr *, struct cmsghdr *); #endif -extern int inet6_rthdr_segments __P((const struct cmsghdr *)); -extern struct in6_addr *inet6_rthdr_getaddr __P((struct cmsghdr *, int)); -extern int inet6_rthdr_getflags __P((const struct cmsghdr *, int)); - -extern int inet6_opt_init __P((void *, socklen_t)); -extern int inet6_opt_append __P((void *, socklen_t, int, uint8_t, socklen_t, - uint8_t, void **)); -extern int inet6_opt_finish __P((void *, socklen_t, int)); -extern int inet6_opt_set_val __P((void *, int, void *, socklen_t)); - -extern int inet6_opt_next __P((void *, socklen_t, int, uint8_t *, socklen_t *, - void **)); -extern int inet6_opt_find __P((void *, socklen_t, int, uint8_t, socklen_t *, - void **)); -extern int inet6_opt_get_val __P((void *, int, void *, socklen_t)); -extern socklen_t inet6_rth_space __P((int, int)); -extern void *inet6_rth_init __P((void *, socklen_t, int, int)); -extern int inet6_rth_add __P((void *, const struct in6_addr *)); -extern int inet6_rth_reverse __P((const void *, void *)); -extern int inet6_rth_segments __P((const void *)); -extern struct in6_addr *inet6_rth_getaddr __P((const void *, int)); +extern int inet6_rthdr_segments(const struct cmsghdr *); +extern struct in6_addr *inet6_rthdr_getaddr(struct cmsghdr *, int); +extern int inet6_rthdr_getflags(const struct cmsghdr *, int); + +extern int inet6_opt_init(void *, socklen_t); +extern int inet6_opt_append(void *, socklen_t, int, uint8_t, socklen_t, + uint8_t, void **); +extern int inet6_opt_finish(void *, socklen_t, int); +extern int inet6_opt_set_val(void *, int, void *, socklen_t); + +extern int inet6_opt_next(void *, socklen_t, int, uint8_t *, socklen_t *, + void **); +extern int inet6_opt_find(void *, socklen_t, int, uint8_t, socklen_t *, + void **); +extern int inet6_opt_get_val(void *, int, void *, socklen_t); +extern socklen_t inet6_rth_space(int, int); +extern void *inet6_rth_init(void *, socklen_t, int, int); +extern int inet6_rth_add(void *, const struct in6_addr *); +extern int inet6_rth_reverse(const void *, void *); +extern int inet6_rth_segments(const void *); +extern struct in6_addr *inet6_rth_getaddr(const void *, int); __END_DECLS #endif /* __BSD_VISIBLE */ Modified: head/sys/netinet6/in6_gif.h ============================================================================== --- head/sys/netinet6/in6_gif.h Mon Oct 22 21:26:36 2012 (r241915) +++ head/sys/netinet6/in6_gif.h Mon Oct 22 21:49:56 2012 (r241916) @@ -36,10 +36,10 @@ #define GIF_HLIM 30 struct gif_softc; -int in6_gif_input __P((struct mbuf **, int *, int)); -int in6_gif_output __P((struct ifnet *, int, struct mbuf *)); -int gif_encapcheck6 __P((const struct mbuf *, int, int, void *)); -int in6_gif_attach __P((struct gif_softc *)); -int in6_gif_detach __P((struct gif_softc *)); +int in6_gif_input(struct mbuf **, int *, int); +int in6_gif_output(struct ifnet *, int, struct mbuf *); +int gif_encapcheck6(const struct mbuf *, int, int, void *); +int in6_gif_attach(struct gif_softc *); +int in6_gif_detach(struct gif_softc *); #endif /* _NETINET6_IN6_GIF_H_ */ Modified: head/sys/netinet6/in6_ifattach.h ============================================================================== --- head/sys/netinet6/in6_ifattach.h Mon Oct 22 21:26:36 2012 (r241915) +++ head/sys/netinet6/in6_ifattach.h Mon Oct 22 21:49:56 2012 (r241916) @@ -34,12 +34,12 @@ #define _NETINET6_IN6_IFATTACH_H_ #ifdef _KERNEL -void in6_ifattach __P((struct ifnet *, struct ifnet *)); -void in6_ifdetach __P((struct ifnet *)); -int in6_get_tmpifid __P((struct ifnet *, u_int8_t *, const u_int8_t *, int)); -void in6_tmpaddrtimer __P((void *)); -int in6_get_hw_ifid __P((struct ifnet *, struct in6_addr *)); -int in6_nigroup __P((struct ifnet *, const char *, int, struct in6_addr *)); +void in6_ifattach(struct ifnet *, struct ifnet *); +void in6_ifdetach(struct ifnet *); +int in6_get_tmpifid(struct ifnet *, u_int8_t *, const u_int8_t *, int); +void in6_tmpaddrtimer(void *); +int in6_get_hw_ifid(struct ifnet *, struct in6_addr *); +int in6_nigroup(struct ifnet *, const char *, int, struct in6_addr *); #endif /* _KERNEL */ #endif /* _NETINET6_IN6_IFATTACH_H_ */ Modified: head/sys/netinet6/in6_pcb.h ============================================================================== --- head/sys/netinet6/in6_pcb.h Mon Oct 22 21:26:36 2012 (r241915) +++ head/sys/netinet6/in6_pcb.h Mon Oct 22 21:49:56 2012 (r241916) @@ -72,53 +72,53 @@ struct inpcbgroup * in6_pcbgroup_byhash(struct inpcbinfo *, u_int, uint32_t); struct inpcbgroup * - in6_pcbgroup_byinpcb __P((struct inpcb *)); + in6_pcbgroup_byinpcb(struct inpcb *); struct inpcbgroup * in6_pcbgroup_bymbuf(struct inpcbinfo *, struct mbuf *); struct inpcbgroup * - in6_pcbgroup_bytuple __P((struct inpcbinfo *, const struct in6_addr *, - u_short, const struct in6_addr *, u_short)); + in6_pcbgroup_bytuple(struct inpcbinfo *, const struct in6_addr *, + u_short, const struct in6_addr *, u_short); -void in6_pcbpurgeif0 __P((struct inpcbinfo *, struct ifnet *)); -void in6_losing __P((struct inpcb *)); -int in6_pcbbind __P((struct inpcb *, struct sockaddr *, struct ucred *)); -int in6_pcbconnect __P((struct inpcb *, struct sockaddr *, struct ucred *)); -int in6_pcbconnect_mbuf __P((struct inpcb *, struct sockaddr *, - struct ucred *, struct mbuf *)); -void in6_pcbdisconnect __P((struct inpcb *)); +void in6_pcbpurgeif0(struct inpcbinfo *, struct ifnet *); +void in6_losing(struct inpcb *); +int in6_pcbbind(struct inpcb *, struct sockaddr *, struct ucred *); +int in6_pcbconnect(struct inpcb *, struct sockaddr *, struct ucred *); +int in6_pcbconnect_mbuf(struct inpcb *, struct sockaddr *, + struct ucred *, struct mbuf *); +void in6_pcbdisconnect(struct inpcb *); int in6_pcbladdr(struct inpcb *, struct sockaddr *, struct in6_addr *); struct inpcb * - in6_pcblookup_local __P((struct inpcbinfo *, + in6_pcblookup_local(struct inpcbinfo *, struct in6_addr *, u_short, int, - struct ucred *)); + struct ucred *); struct inpcb * - in6_pcblookup __P((struct inpcbinfo *, struct in6_addr *, + in6_pcblookup(struct inpcbinfo *, struct in6_addr *, u_int, struct in6_addr *, u_int, int, - struct ifnet *)); + struct ifnet *); struct inpcb * - in6_pcblookup_hash_locked __P((struct inpcbinfo *, struct in6_addr *, + in6_pcblookup_hash_locked(struct inpcbinfo *, struct in6_addr *, u_int, struct in6_addr *, u_int, int, - struct ifnet *)); + struct ifnet *); struct inpcb * - in6_pcblookup_mbuf __P((struct inpcbinfo *, struct in6_addr *, + in6_pcblookup_mbuf(struct inpcbinfo *, struct in6_addr *, u_int, struct in6_addr *, u_int, int, - struct ifnet *ifp, struct mbuf *)); -void in6_pcbnotify __P((struct inpcbinfo *, struct sockaddr *, + struct ifnet *ifp, struct mbuf *); +void in6_pcbnotify(struct inpcbinfo *, struct sockaddr *, u_int, const struct sockaddr *, u_int, int, void *, - struct inpcb *(*)(struct inpcb *, int))); + struct inpcb *(*)(struct inpcb *, int)); struct inpcb * - in6_rtchange __P((struct inpcb *, int)); + in6_rtchange(struct inpcb *, int); struct sockaddr * - in6_sockaddr __P((in_port_t port, struct in6_addr *addr_p)); + in6_sockaddr(in_port_t port, struct in6_addr *addr_p); struct sockaddr * - in6_v4mapsin6_sockaddr __P((in_port_t port, struct in_addr *addr_p)); -int in6_getpeeraddr __P((struct socket *so, struct sockaddr **nam)); -int in6_getsockaddr __P((struct socket *so, struct sockaddr **nam)); -int in6_mapped_sockaddr __P((struct socket *so, struct sockaddr **nam)); -int in6_mapped_peeraddr __P((struct socket *so, struct sockaddr **nam)); -int in6_selecthlim __P((struct in6pcb *, struct ifnet *)); -int in6_pcbsetport __P((struct in6_addr *, struct inpcb *, struct ucred *)); -void init_sin6 __P((struct sockaddr_in6 *sin6, struct mbuf *m)); + in6_v4mapsin6_sockaddr(in_port_t port, struct in_addr *addr_p); +int in6_getpeeraddr(struct socket *so, struct sockaddr **nam); +int in6_getsockaddr(struct socket *so, struct sockaddr **nam); +int in6_mapped_sockaddr(struct socket *so, struct sockaddr **nam); +int in6_mapped_peeraddr(struct socket *so, struct sockaddr **nam); +int in6_selecthlim(struct in6pcb *, struct ifnet *); +int in6_pcbsetport(struct in6_addr *, struct inpcb *, struct ucred *); +void init_sin6(struct sockaddr_in6 *sin6, struct mbuf *m); #endif /* _KERNEL */ #endif /* !_NETINET6_IN6_PCB_H_ */ Modified: head/sys/netinet6/in6_src.c ============================================================================== --- head/sys/netinet6/in6_src.c Mon Oct 22 21:26:36 2012 (r241915) +++ head/sys/netinet6/in6_src.c Mon Oct 22 21:49:56 2012 (r241916) @@ -127,20 +127,20 @@ static VNET_DEFINE(struct in6_addrpolicy VNET_DEFINE(int, ip6_prefer_tempaddr) = 0; -static int selectroute __P((struct sockaddr_in6 *, struct ip6_pktopts *, +static int selectroute(struct sockaddr_in6 *, struct ip6_pktopts *, struct ip6_moptions *, struct route_in6 *, struct ifnet **, - struct rtentry **, int, u_int)); -static int in6_selectif __P((struct sockaddr_in6 *, struct ip6_pktopts *, + struct rtentry **, int, u_int); +static int in6_selectif(struct sockaddr_in6 *, struct ip6_pktopts *, struct ip6_moptions *, struct route_in6 *ro, struct ifnet **, - struct ifnet *, u_int)); + struct ifnet *, u_int); static struct in6_addrpolicy *lookup_addrsel_policy(struct sockaddr_in6 *); static void init_policy_queue(void); static int add_addrsel_policyent(struct in6_addrpolicy *); static int delete_addrsel_policyent(struct in6_addrpolicy *); -static int walk_addrsel_policy __P((int (*)(struct in6_addrpolicy *, void *), - void *)); +static int walk_addrsel_policy(int (*)(struct in6_addrpolicy *, void *), + void *); static int dump_addrsel_policyent(struct in6_addrpolicy *, void *); static struct in6_addrpolicy *match_addrsel_policy(struct sockaddr_in6 *); Modified: head/sys/netinet6/in6_var.h ============================================================================== --- head/sys/netinet6/in6_var.h Mon Oct 22 21:26:36 2012 (r241915) +++ head/sys/netinet6/in6_var.h Mon Oct 22 21:49:56 2012 (r241916) @@ -762,36 +762,36 @@ int in6_leavegroup(struct in6_multi_mshi /* flags to in6_update_ifa */ #define IN6_IFAUPDATE_DADDELAY 0x1 /* first time to configure an address */ -int in6_mask2len __P((struct in6_addr *, u_char *)); -int in6_control __P((struct socket *, u_long, caddr_t, struct ifnet *, - struct thread *)); -int in6_update_ifa __P((struct ifnet *, struct in6_aliasreq *, - struct in6_ifaddr *, int)); -void in6_purgeaddr __P((struct ifaddr *)); -int in6if_do_dad __P((struct ifnet *)); -void in6_purgeif __P((struct ifnet *)); -void in6_savemkludge __P((struct in6_ifaddr *)); -void *in6_domifattach __P((struct ifnet *)); -void in6_domifdetach __P((struct ifnet *, void *)); -void in6_setmaxmtu __P((void)); -int in6_if2idlen __P((struct ifnet *)); -struct in6_ifaddr *in6ifa_ifpforlinklocal __P((struct ifnet *, int)); -struct in6_ifaddr *in6ifa_ifpwithaddr __P((struct ifnet *, struct in6_addr *)); -char *ip6_sprintf __P((char *, const struct in6_addr *)); -int in6_addr2zoneid __P((struct ifnet *, struct in6_addr *, u_int32_t *)); -int in6_matchlen __P((struct in6_addr *, struct in6_addr *)); -int in6_are_prefix_equal __P((struct in6_addr *, struct in6_addr *, int)); -void in6_prefixlen2mask __P((struct in6_addr *, int)); -int in6_prefix_ioctl __P((struct socket *, u_long, caddr_t, - struct ifnet *)); -int in6_prefix_add_ifid __P((int, struct in6_ifaddr *)); -void in6_prefix_remove_ifid __P((int, struct in6_ifaddr *)); -void in6_purgeprefix __P((struct ifnet *)); +int in6_mask2len(struct in6_addr *, u_char *); +int in6_control(struct socket *, u_long, caddr_t, struct ifnet *, + struct thread *); +int in6_update_ifa(struct ifnet *, struct in6_aliasreq *, + struct in6_ifaddr *, int); +void in6_purgeaddr(struct ifaddr *); +int in6if_do_dad(struct ifnet *); +void in6_purgeif(struct ifnet *); +void in6_savemkludge(struct in6_ifaddr *); +void *in6_domifattach(struct ifnet *); +void in6_domifdetach(struct ifnet *, void *); +void in6_setmaxmtu(void); +int in6_if2idlen(struct ifnet *); +struct in6_ifaddr *in6ifa_ifpforlinklocal(struct ifnet *, int); +struct in6_ifaddr *in6ifa_ifpwithaddr(struct ifnet *, struct in6_addr *); +char *ip6_sprintf(char *, const struct in6_addr *); +int in6_addr2zoneid(struct ifnet *, struct in6_addr *, u_int32_t *); +int in6_matchlen(struct in6_addr *, struct in6_addr *); +int in6_are_prefix_equal(struct in6_addr *, struct in6_addr *, int); +void in6_prefixlen2mask(struct in6_addr *, int); +int in6_prefix_ioctl(struct socket *, u_long, caddr_t, + struct ifnet *); +int in6_prefix_add_ifid(int, struct in6_ifaddr *); +void in6_prefix_remove_ifid(int, struct in6_ifaddr *); +void in6_purgeprefix(struct ifnet *); void in6_ifremloop(struct ifaddr *); void in6_ifaddloop(struct ifaddr *); -int in6_is_addr_deprecated __P((struct sockaddr_in6 *)); -int in6_src_ioctl __P((u_long, caddr_t)); +int in6_is_addr_deprecated(struct sockaddr_in6 *); +int in6_src_ioctl(u_long, caddr_t); /* * Extended API for IPv6 FIB support. Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Mon Oct 22 21:26:36 2012 (r241915) +++ head/sys/netinet6/ip6_output.c Mon Oct 22 21:49:56 2012 (r241916) @@ -130,21 +130,21 @@ struct ip6_exthdrs { struct mbuf *ip6e_dest2; }; -static int ip6_pcbopt __P((int, u_char *, int, struct ip6_pktopts **, - struct ucred *, int)); -static int ip6_pcbopts __P((struct ip6_pktopts **, struct mbuf *, - struct socket *, struct sockopt *)); +static int ip6_pcbopt(int, u_char *, int, struct ip6_pktopts **, + struct ucred *, int); +static int ip6_pcbopts(struct ip6_pktopts **, struct mbuf *, + struct socket *, struct sockopt *); static int ip6_getpcbopt(struct ip6_pktopts *, int, struct sockopt *); -static int ip6_setpktopt __P((int, u_char *, int, struct ip6_pktopts *, - struct ucred *, int, int, int)); +static int ip6_setpktopt(int, u_char *, int, struct ip6_pktopts *, + struct ucred *, int, int, int); static int ip6_copyexthdr(struct mbuf **, caddr_t, int); -static int ip6_insertfraghdr __P((struct mbuf *, struct mbuf *, int, - struct ip6_frag **)); +static int ip6_insertfraghdr(struct mbuf *, struct mbuf *, int, + struct ip6_frag **); static int ip6_insert_jumboopt(struct ip6_exthdrs *, u_int32_t); static int ip6_splithdr(struct mbuf *, struct ip6_exthdrs *); -static int ip6_getpmtu __P((struct route_in6 *, struct route_in6 *, - struct ifnet *, struct in6_addr *, u_long *, int *, u_int)); +static int ip6_getpmtu(struct route_in6 *, struct route_in6 *, + struct ifnet *, struct in6_addr *, u_long *, int *, u_int); static int copypktopts(struct ip6_pktopts *, struct ip6_pktopts *, int); Modified: head/sys/netinet6/ip6_var.h ============================================================================== --- head/sys/netinet6/ip6_var.h Mon Oct 22 21:26:36 2012 (r241915) +++ head/sys/netinet6/ip6_var.h Mon Oct 22 21:49:56 2012 (r241916) @@ -369,87 +369,87 @@ struct sockopt; struct inpcb; -int icmp6_ctloutput __P((struct socket *, struct sockopt *sopt)); +int icmp6_ctloutput(struct socket *, struct sockopt *sopt); struct in6_ifaddr; -void ip6_init __P((void)); +void ip6_init(void); #ifdef VIMAGE -void ip6_destroy __P((void)); +void ip6_destroy(void); #endif int ip6proto_register(short); int ip6proto_unregister(short); -void ip6_input __P((struct mbuf *)); -struct in6_ifaddr *ip6_getdstifaddr __P((struct mbuf *)); -void ip6_freepcbopts __P((struct ip6_pktopts *)); - -int ip6_unknown_opt __P((u_int8_t *, struct mbuf *, int)); -char * ip6_get_prevhdr __P((struct mbuf *, int)); -int ip6_nexthdr __P((struct mbuf *, int, int, int *)); -int ip6_lasthdr __P((struct mbuf *, int, int, int *)); +void ip6_input(struct mbuf *); +struct in6_ifaddr *ip6_getdstifaddr(struct mbuf *); +void ip6_freepcbopts(struct ip6_pktopts *); + +int ip6_unknown_opt(u_int8_t *, struct mbuf *, int); +char * ip6_get_prevhdr(struct mbuf *, int); +int ip6_nexthdr(struct mbuf *, int, int, int *); +int ip6_lasthdr(struct mbuf *, int, int, int *); #ifdef __notyet__ -struct ip6aux *ip6_findaux __P((struct mbuf *)); +struct ip6aux *ip6_findaux(struct mbuf *); #endif extern int (*ip6_mforward)(struct ip6_hdr *, struct ifnet *, struct mbuf *); -int ip6_process_hopopts __P((struct mbuf *, u_int8_t *, int, u_int32_t *, - u_int32_t *)); +int ip6_process_hopopts(struct mbuf *, u_int8_t *, int, u_int32_t *, + u_int32_t *); struct mbuf **ip6_savecontrol_v4(struct inpcb *, struct mbuf *, struct mbuf **, int *); -void ip6_savecontrol __P((struct inpcb *, struct mbuf *, struct mbuf **)); -void ip6_notify_pmtu __P((struct inpcb *, struct sockaddr_in6 *, - u_int32_t *)); -int ip6_sysctl __P((int *, u_int, void *, size_t *, void *, size_t)); +void ip6_savecontrol(struct inpcb *, struct mbuf *, struct mbuf **); +void ip6_notify_pmtu(struct inpcb *, struct sockaddr_in6 *, + u_int32_t *); +int ip6_sysctl(int *, u_int, void *, size_t *, void *, size_t); -void ip6_forward __P((struct mbuf *, int)); +void ip6_forward(struct mbuf *, int); -void ip6_mloopback __P((struct ifnet *, struct mbuf *, struct sockaddr_in6 *)); -int ip6_output __P((struct mbuf *, struct ip6_pktopts *, +void ip6_mloopback(struct ifnet *, struct mbuf *, struct sockaddr_in6 *); +int ip6_output(struct mbuf *, struct ip6_pktopts *, struct route_in6 *, int, struct ip6_moptions *, struct ifnet **, - struct inpcb *)); -int ip6_ctloutput __P((struct socket *, struct sockopt *)); -int ip6_raw_ctloutput __P((struct socket *, struct sockopt *)); -void ip6_initpktopts __P((struct ip6_pktopts *)); -int ip6_setpktopts __P((struct mbuf *, struct ip6_pktopts *, - struct ip6_pktopts *, struct ucred *, int)); -void ip6_clearpktopts __P((struct ip6_pktopts *, int)); -struct ip6_pktopts *ip6_copypktopts __P((struct ip6_pktopts *, int)); -int ip6_optlen __P((struct inpcb *)); - -int route6_input __P((struct mbuf **, int *, int)); - -void frag6_init __P((void)); -int frag6_input __P((struct mbuf **, int *, int)); -void frag6_slowtimo __P((void)); -void frag6_drain __P((void)); - -void rip6_init __P((void)); -int rip6_input __P((struct mbuf **, int *, int)); -void rip6_ctlinput __P((int, struct sockaddr *, void *)); -int rip6_ctloutput __P((struct socket *, struct sockopt *)); -int rip6_output __P((struct mbuf *, ...)); -int rip6_usrreq __P((struct socket *, - int, struct mbuf *, struct mbuf *, struct mbuf *, struct thread *)); + struct inpcb *); +int ip6_ctloutput(struct socket *, struct sockopt *); +int ip6_raw_ctloutput(struct socket *, struct sockopt *); +void ip6_initpktopts(struct ip6_pktopts *); +int ip6_setpktopts(struct mbuf *, struct ip6_pktopts *, + struct ip6_pktopts *, struct ucred *, int); +void ip6_clearpktopts(struct ip6_pktopts *, int); +struct ip6_pktopts *ip6_copypktopts(struct ip6_pktopts *, int); +int ip6_optlen(struct inpcb *); + +int route6_input(struct mbuf **, int *, int); + +void frag6_init(void); +int frag6_input(struct mbuf **, int *, int); +void frag6_slowtimo(void); +void frag6_drain(void); + +void rip6_init(void); +int rip6_input(struct mbuf **, int *, int); +void rip6_ctlinput(int, struct sockaddr *, void *); +int rip6_ctloutput(struct socket *, struct sockopt *); +int rip6_output(struct mbuf *, ...); +int rip6_usrreq(struct socket *, + int, struct mbuf *, struct mbuf *, struct mbuf *, struct thread *); -int dest6_input __P((struct mbuf **, int *, int)); -int none_input __P((struct mbuf **, int *, int)); +int dest6_input(struct mbuf **, int *, int); +int none_input(struct mbuf **, int *, int); int in6_selectsrc(struct sockaddr_in6 *, struct ip6_pktopts *, struct inpcb *inp, struct route_in6 *, struct ucred *cred, struct ifnet **, struct in6_addr *); -int in6_selectroute __P((struct sockaddr_in6 *, struct ip6_pktopts *, +int in6_selectroute(struct sockaddr_in6 *, struct ip6_pktopts *, struct ip6_moptions *, struct route_in6 *, struct ifnet **, - struct rtentry **)); + struct rtentry **); int in6_selectroute_fib(struct sockaddr_in6 *, struct ip6_pktopts *, struct ip6_moptions *, struct route_in6 *, struct ifnet **, struct rtentry **, u_int); -u_int32_t ip6_randomid __P((void)); -u_int32_t ip6_randomflowlabel __P((void)); +u_int32_t ip6_randomid(void); +u_int32_t ip6_randomflowlabel(void); #endif /* _KERNEL */ #endif /* !_NETINET6_IP6_VAR_H_ */ Modified: head/sys/netinet6/ip6protosw.h ============================================================================== --- head/sys/netinet6/ip6protosw.h Mon Oct 22 21:26:36 2012 (r241915) +++ head/sys/netinet6/ip6protosw.h Mon Oct 22 21:49:56 2012 (r241916) @@ -118,26 +118,26 @@ struct ip6protosw { /* protocol-protocol hooks */ int (*pr_input) /* input to protocol (from below) */ - __P((struct mbuf **, int *, int)); + (struct mbuf **, int *, int); int (*pr_output) /* output to protocol (from above) */ - __P((struct mbuf *, ...)); + (struct mbuf *, ...); void (*pr_ctlinput) /* control input (from below) */ - __P((int, struct sockaddr *, void *)); + (int, struct sockaddr *, void *); int (*pr_ctloutput) /* control output (from above) */ - __P((struct socket *, struct sockopt *)); + (struct socket *, struct sockopt *); /* utility hooks */ void (*pr_init) /* initialization hook */ - __P((void)); + (void); void (*pr_destroy) /* cleanup hook */ - __P((void)); + (void); void (*pr_fasttimo) /* fast timeout (200ms) */ - __P((void)); + (void); void (*pr_slowtimo) /* slow timeout (500ms) */ - __P((void)); + (void); void (*pr_drain) /* flush any excess space possible */ - __P((void)); + (void); struct pr_usrreqs *pr_usrreqs; /* supersedes pr_usrreq() */ }; Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Mon Oct 22 21:26:36 2012 (r241915) +++ head/sys/netinet6/nd6.c Mon Oct 22 21:49:56 2012 (r241916) @@ -124,8 +124,8 @@ static struct sockaddr_in6 all1_sa; int (*send_sendso_input_hook)(struct mbuf *, struct ifnet *, int, int); -static int nd6_is_new_addr_neighbor __P((struct sockaddr_in6 *, - struct ifnet *)); +static int nd6_is_new_addr_neighbor(struct sockaddr_in6 *, + struct ifnet *); static void nd6_setmtu0(struct ifnet *, struct nd_ifinfo *); static void nd6_slowtimo(void *); static int regen_tmpaddr(struct in6_ifaddr *); Modified: head/sys/netinet6/nd6.h ============================================================================== --- head/sys/netinet6/nd6.h Mon Oct 22 21:26:36 2012 (r241915) +++ head/sys/netinet6/nd6.h Mon Oct 22 21:49:56 2012 (r241916) @@ -384,68 +384,68 @@ union nd_opts { /* XXX: need nd6_var.h?? */ /* nd6.c */ -void nd6_init __P((void)); +void nd6_init(void); #ifdef VIMAGE -void nd6_destroy __P((void)); +void nd6_destroy(void); #endif -struct nd_ifinfo *nd6_ifattach __P((struct ifnet *)); -void nd6_ifdetach __P((struct nd_ifinfo *)); -int nd6_is_addr_neighbor __P((struct sockaddr_in6 *, struct ifnet *)); -void nd6_option_init __P((void *, int, union nd_opts *)); -struct nd_opt_hdr *nd6_option __P((union nd_opts *)); -int nd6_options __P((union nd_opts *)); -struct llentry *nd6_lookup __P((struct in6_addr *, int, struct ifnet *)); -void nd6_setmtu __P((struct ifnet *)); -void nd6_llinfo_settimer __P((struct llentry *, long)); -void nd6_llinfo_settimer_locked __P((struct llentry *, long)); -void nd6_timer __P((void *)); -void nd6_purge __P((struct ifnet *)); -void nd6_nud_hint __P((struct rtentry *, struct in6_addr *, int)); -int nd6_resolve __P((struct ifnet *, struct rtentry *, struct mbuf *, - struct sockaddr *, u_char *)); -void nd6_rtrequest __P((int, struct rtentry *, struct rt_addrinfo *)); -int nd6_ioctl __P((u_long, caddr_t, struct ifnet *)); -struct llentry *nd6_cache_lladdr __P((struct ifnet *, struct in6_addr *, - char *, int, int, int)); -int nd6_output __P((struct ifnet *, struct ifnet *, struct mbuf *, - struct sockaddr_in6 *, struct rtentry *)); -int nd6_output_lle __P((struct ifnet *, struct ifnet *, struct mbuf *, +struct nd_ifinfo *nd6_ifattach(struct ifnet *); +void nd6_ifdetach(struct nd_ifinfo *); +int nd6_is_addr_neighbor(struct sockaddr_in6 *, struct ifnet *); +void nd6_option_init(void *, int, union nd_opts *); +struct nd_opt_hdr *nd6_option(union nd_opts *); +int nd6_options(union nd_opts *); +struct llentry *nd6_lookup(struct in6_addr *, int, struct ifnet *); +void nd6_setmtu(struct ifnet *); +void nd6_llinfo_settimer(struct llentry *, long); +void nd6_llinfo_settimer_locked(struct llentry *, long); +void nd6_timer(void *); +void nd6_purge(struct ifnet *); +void nd6_nud_hint(struct rtentry *, struct in6_addr *, int); +int nd6_resolve(struct ifnet *, struct rtentry *, struct mbuf *, + struct sockaddr *, u_char *); +void nd6_rtrequest(int, struct rtentry *, struct rt_addrinfo *); +int nd6_ioctl(u_long, caddr_t, struct ifnet *); +struct llentry *nd6_cache_lladdr(struct ifnet *, struct in6_addr *, + char *, int, int, int); +int nd6_output(struct ifnet *, struct ifnet *, struct mbuf *, + struct sockaddr_in6 *, struct rtentry *); +int nd6_output_lle(struct ifnet *, struct ifnet *, struct mbuf *, struct sockaddr_in6 *, struct rtentry *, struct llentry *, - struct mbuf **)); -int nd6_output_flush __P((struct ifnet *, struct ifnet *, struct mbuf *, - struct sockaddr_in6 *, struct route *)); -int nd6_need_cache __P((struct ifnet *)); -int nd6_storelladdr __P((struct ifnet *, struct mbuf *, - struct sockaddr *, u_char *, struct llentry **)); + struct mbuf **); +int nd6_output_flush(struct ifnet *, struct ifnet *, struct mbuf *, + struct sockaddr_in6 *, struct route *); +int nd6_need_cache(struct ifnet *); +int nd6_storelladdr(struct ifnet *, struct mbuf *, + struct sockaddr *, u_char *, struct llentry **); /* nd6_nbr.c */ -void nd6_na_input __P((struct mbuf *, int, int)); -void nd6_na_output __P((struct ifnet *, const struct in6_addr *, - const struct in6_addr *, u_long, int, struct sockaddr *)); -void nd6_ns_input __P((struct mbuf *, int, int)); -void nd6_ns_output __P((struct ifnet *, const struct in6_addr *, - const struct in6_addr *, struct llentry *, int)); -caddr_t nd6_ifptomac __P((struct ifnet *)); -void nd6_dad_start __P((struct ifaddr *, int)); -void nd6_dad_stop __P((struct ifaddr *)); -void nd6_dad_duplicated __P((struct ifaddr *)); +void nd6_na_input(struct mbuf *, int, int); +void nd6_na_output(struct ifnet *, const struct in6_addr *, + const struct in6_addr *, u_long, int, struct sockaddr *); +void nd6_ns_input(struct mbuf *, int, int); +void nd6_ns_output(struct ifnet *, const struct in6_addr *, + const struct in6_addr *, struct llentry *, int); +caddr_t nd6_ifptomac(struct ifnet *); +void nd6_dad_start(struct ifaddr *, int); +void nd6_dad_stop(struct ifaddr *); +void nd6_dad_duplicated(struct ifaddr *); /* nd6_rtr.c */ -void nd6_rs_input __P((struct mbuf *, int, int)); -void nd6_ra_input __P((struct mbuf *, int, int)); -void prelist_del __P((struct nd_prefix *)); -void defrouter_reset __P((void)); -void defrouter_select __P((void)); -void defrtrlist_del __P((struct nd_defrouter *)); -void prelist_remove __P((struct nd_prefix *)); -int nd6_prelist_add __P((struct nd_prefixctl *, struct nd_defrouter *, - struct nd_prefix **)); -void pfxlist_onlink_check __P((void)); -struct nd_defrouter *defrouter_lookup __P((struct in6_addr *, struct ifnet *)); -struct nd_prefix *nd6_prefix_lookup __P((struct nd_prefixctl *)); -void rt6_flush __P((struct in6_addr *, struct ifnet *)); -int nd6_setdefaultiface __P((int)); -int in6_tmpifadd __P((const struct in6_ifaddr *, int, int)); +void nd6_rs_input(struct mbuf *, int, int); +void nd6_ra_input(struct mbuf *, int, int); +void prelist_del(struct nd_prefix *); +void defrouter_reset(void); +void defrouter_select(void); +void defrtrlist_del(struct nd_defrouter *); +void prelist_remove(struct nd_prefix *); +int nd6_prelist_add(struct nd_prefixctl *, struct nd_defrouter *, + struct nd_prefix **); +void pfxlist_onlink_check(void); +struct nd_defrouter *defrouter_lookup(struct in6_addr *, struct ifnet *); +struct nd_prefix *nd6_prefix_lookup(struct nd_prefixctl *); +void rt6_flush(struct in6_addr *, struct ifnet *); +int nd6_setdefaultiface(int); +int in6_tmpifadd(const struct in6_ifaddr *, int, int); #endif /* _KERNEL */ Modified: head/sys/netinet6/nd6_rtr.c ============================================================================== --- head/sys/netinet6/nd6_rtr.c Mon Oct 22 21:26:36 2012 (r241915) +++ head/sys/netinet6/nd6_rtr.c Mon Oct 22 21:49:56 2012 (r241916) @@ -68,11 +68,11 @@ __FBSDID("$FreeBSD$"); static int rtpref(struct nd_defrouter *); static struct nd_defrouter *defrtrlist_update(struct nd_defrouter *); -static int prelist_update __P((struct nd_prefixctl *, struct nd_defrouter *, - struct mbuf *, int)); -static struct in6_ifaddr *in6_ifadd(struct nd_prefixctl *, int); -static struct nd_pfxrouter *pfxrtr_lookup __P((struct nd_prefix *, - struct nd_defrouter *)); +static int prelist_update(struct nd_prefixctl *, struct nd_defrouter *, + struct mbuf *, int); +static struct in6_ifaddr *in6_ifadd(struct nd_prefixctl *, int); +static struct nd_pfxrouter *pfxrtr_lookup(struct nd_prefix *, + struct nd_defrouter *); static void pfxrtr_add(struct nd_prefix *, struct nd_defrouter *); static void pfxrtr_del(struct nd_pfxrouter *); static struct nd_pfxrouter *find_pfxlist_reachable_router @@ -81,8 +81,8 @@ static void defrouter_delreq(struct nd_d static void nd6_rtmsg(int, struct rtentry *); static int in6_init_prefix_ltimes(struct nd_prefix *); -static void in6_init_address_ltimes __P((struct nd_prefix *, - struct in6_addrlifetime *)); +static void in6_init_address_ltimes(struct nd_prefix *, + struct in6_addrlifetime *); static int nd6_prefix_onlink(struct nd_prefix *); static int nd6_prefix_offlink(struct nd_prefix *); Modified: head/sys/netinet6/pim6_var.h ============================================================================== --- head/sys/netinet6/pim6_var.h Mon Oct 22 21:26:36 2012 (r241915) +++ head/sys/netinet6/pim6_var.h Mon Oct 22 21:49:56 2012 (r241916) @@ -52,7 +52,7 @@ struct pim6stat { }; #if (defined(KERNEL)) || (defined(_KERNEL)) -int pim6_input __P((struct mbuf **, int*, int)); +int pim6_input(struct mbuf **, int*, int); #endif /* KERNEL */ /* Modified: head/sys/netinet6/scope6_var.h ============================================================================== --- head/sys/netinet6/scope6_var.h Mon Oct 22 21:26:36 2012 (r241915) +++ head/sys/netinet6/scope6_var.h Mon Oct 22 21:49:56 2012 (r241916) @@ -42,18 +42,18 @@ struct scope6_id { u_int32_t s6id_list[16]; }; -void scope6_init __P((void)); -struct scope6_id *scope6_ifattach __P((struct ifnet *)); -void scope6_ifdetach __P((struct scope6_id *)); -int scope6_set __P((struct ifnet *, struct scope6_id *)); -int scope6_get __P((struct ifnet *, struct scope6_id *)); -void scope6_setdefault __P((struct ifnet *)); -int scope6_get_default __P((struct scope6_id *)); -u_int32_t scope6_addr2default __P((struct in6_addr *)); -int sa6_embedscope __P((struct sockaddr_in6 *, int)); -int sa6_recoverscope __P((struct sockaddr_in6 *)); -int in6_setscope __P((struct in6_addr *, struct ifnet *, u_int32_t *)); -int in6_clearscope __P((struct in6_addr *)); +void scope6_init(void); +struct scope6_id *scope6_ifattach(struct ifnet *); +void scope6_ifdetach(struct scope6_id *); +int scope6_set(struct ifnet *, struct scope6_id *); +int scope6_get(struct ifnet *, struct scope6_id *); +void scope6_setdefault(struct ifnet *); +int scope6_get_default(struct scope6_id *); +u_int32_t scope6_addr2default(struct in6_addr *); +int sa6_embedscope(struct sockaddr_in6 *, int); +int sa6_recoverscope(struct sockaddr_in6 *); +int in6_setscope(struct in6_addr *, struct ifnet *, u_int32_t *); +int in6_clearscope(struct in6_addr *); uint16_t in6_getscope(struct in6_addr *); #endif /* _KERNEL */ Modified: head/sys/netinet6/sctp6_var.h ============================================================================== --- head/sys/netinet6/sctp6_var.h Mon Oct 22 21:26:36 2012 (r241915) +++ head/sys/netinet6/sctp6_var.h Mon Oct 22 21:49:56 2012 (r241916) @@ -42,11 +42,11 @@ SYSCTL_DECL(_net_inet6_sctp6); extern struct pr_usrreqs sctp6_usrreqs; -int sctp6_input __P((struct mbuf **, int *, int)); +int sctp6_input(struct mbuf **, int *, int); int sctp6_output -__P((struct sctp_inpcb *, struct mbuf *, struct sockaddr *, - struct mbuf *, struct proc *)); - void sctp6_ctlinput __P((int, struct sockaddr *, void *)); +(struct sctp_inpcb *, struct mbuf *, struct sockaddr *, + struct mbuf *, struct proc *); + void sctp6_ctlinput(int, struct sockaddr *, void *); extern void sctp6_notify(struct sctp_inpcb *inp, Modified: head/sys/netinet6/tcp6_var.h ============================================================================== --- head/sys/netinet6/tcp6_var.h Mon Oct 22 21:26:36 2012 (r241915) +++ head/sys/netinet6/tcp6_var.h Mon Oct 22 21:49:56 2012 (r241916) @@ -71,9 +71,9 @@ VNET_DECLARE(int, tcp_v6mssdflt); /* XXX #endif struct ip6_hdr; -void tcp6_ctlinput __P((int, struct sockaddr *, void *)); -void tcp6_init __P((void)); -int tcp6_input __P((struct mbuf **, int *, int)); +void tcp6_ctlinput(int, struct sockaddr *, void *); +void tcp6_init(void); +int tcp6_input(struct mbuf **, int *, int); struct rtentry *tcp_rtlookup6(struct in_conninfo *); extern struct pr_usrreqs tcp6_usrreqs; From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 22:29: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 76BA61CA; Mon, 22 Oct 2012 22:29: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 451058FC12; Mon, 22 Oct 2012 22:29: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 q9MMTnvg022298; Mon, 22 Oct 2012 22:29:49 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MMTn4M022292; Mon, 22 Oct 2012 22:29:49 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210222229.q9MMTn4M022292@svn.freebsd.org> From: Eitan Adler Date: Mon, 22 Oct 2012 22:29:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241917 - in head/sys/dev: e1000 ixgbe sound/pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 22:29:49 -0000 Author: eadler Date: Mon Oct 22 22:29:48 2012 New Revision: 241917 URL: http://svn.freebsd.org/changeset/base/241917 Log: Now that device disabling is generic, remove extraneous code from the device drivers that used to provide this feature. This is a subset of 241856 (which was reverted) Reviewed by: des Approved by: cperciva (implicit) MFC after: 1 week Modified: head/sys/dev/e1000/if_lem.c head/sys/dev/ixgbe/ixgbe.c head/sys/dev/ixgbe/ixv.c head/sys/dev/sound/pci/emu10kx.c Modified: head/sys/dev/e1000/if_lem.c ============================================================================== --- head/sys/dev/e1000/if_lem.c Mon Oct 22 21:49:56 2012 (r241916) +++ head/sys/dev/e1000/if_lem.c Mon Oct 22 22:29:48 2012 (r241917) @@ -390,11 +390,6 @@ lem_attach(device_t dev) INIT_DEBUGOUT("lem_attach: begin"); - if (resource_disabled("lem", device_get_unit(dev))) { - device_printf(dev, "Disabled by device hint\n"); - return (ENXIO); - } - adapter = device_get_softc(dev); adapter->dev = adapter->osdep.dev = dev; EM_CORE_LOCK_INIT(adapter, device_get_nameunit(dev)); Modified: head/sys/dev/ixgbe/ixgbe.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe.c Mon Oct 22 21:49:56 2012 (r241916) +++ head/sys/dev/ixgbe/ixgbe.c Mon Oct 22 22:29:48 2012 (r241917) @@ -401,11 +401,6 @@ ixgbe_attach(device_t dev) INIT_DEBUGOUT("ixgbe_attach: begin"); - if (resource_disabled("ixgbe", device_get_unit(dev))) { - device_printf(dev, "Disabled by device hint\n"); - return (ENXIO); - } - /* Allocate, clear, and link in our adapter structure */ adapter = device_get_softc(dev); adapter->dev = adapter->osdep.dev = dev; Modified: head/sys/dev/ixgbe/ixv.c ============================================================================== --- head/sys/dev/ixgbe/ixv.c Mon Oct 22 21:49:56 2012 (r241916) +++ head/sys/dev/ixgbe/ixv.c Mon Oct 22 22:29:48 2012 (r241917) @@ -299,11 +299,6 @@ ixv_attach(device_t dev) INIT_DEBUGOUT("ixv_attach: begin"); - if (resource_disabled("ixgbe", device_get_unit(dev))) { - device_printf(dev, "Disabled by device hint\n"); - return (ENXIO); - } - /* Allocate, clear, and link in our adapter structure */ adapter = device_get_softc(dev); adapter->dev = adapter->osdep.dev = dev; Modified: head/sys/dev/sound/pci/emu10kx.c ============================================================================== --- head/sys/dev/sound/pci/emu10kx.c Mon Oct 22 21:49:56 2012 (r241916) +++ head/sys/dev/sound/pci/emu10kx.c Mon Oct 22 22:29:48 2012 (r241917) @@ -3050,11 +3050,6 @@ emu_pci_attach(device_t dev) sc = device_get_softc(dev); unit = device_get_unit(dev); - if (resource_disabled("emu10kx", unit)) { - device_printf(dev, "disabled by kernel hints\n"); - return (ENXIO); /* XXX to avoid unit reuse */ - } - /* Get configuration */ sc->ctx = device_get_sysctl_ctx(dev); From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 22:32: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 B1FD6470; Mon, 22 Oct 2012 22:32: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 9AC028FC0A; Mon, 22 Oct 2012 22:32: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 q9MMWq9d023027; Mon, 22 Oct 2012 22:32:52 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MMWqbH023025; Mon, 22 Oct 2012 22:32:52 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201210222232.q9MMWqbH023025@svn.freebsd.org> From: Adrian Chadd Date: Mon, 22 Oct 2012 22:32:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241918 - head/sys/dev/etherswitch/arswitch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 22:32:52 -0000 Author: adrian Date: Mon Oct 22 22:32:52 2012 New Revision: 241918 URL: http://svn.freebsd.org/changeset/base/241918 Log: Don't try to cache the page setting - always set the page before doing a switch register read/write. PR: kern/172968 Modified: head/sys/dev/etherswitch/arswitch/arswitch_reg.c Modified: head/sys/dev/etherswitch/arswitch/arswitch_reg.c ============================================================================== --- head/sys/dev/etherswitch/arswitch/arswitch_reg.c Mon Oct 22 22:29:48 2012 (r241917) +++ head/sys/dev/etherswitch/arswitch/arswitch_reg.c Mon Oct 22 22:32:52 2012 (r241918) @@ -72,10 +72,17 @@ arswitch_split_setpage(device_t dev, uin *phy = (((addr) >> 6) & 0x07) | 0x10; *reg = ((addr) >> 1) & 0x1f; - if (sc->page != page) { - MDIO_WRITEREG(device_get_parent(dev), 0x18, 0, page); - sc->page = page; - } + /* + * The earlier code would only switch the page + * over if the page were different. Experiments have + * shown that this is unstable. + * + * Hence, the page is always set here. + * + * See PR kern/172968 + */ + MDIO_WRITEREG(device_get_parent(dev), 0x18, 0, page); + sc->page = page; } /* From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 22:42: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 8B456827; Mon, 22 Oct 2012 22:42:29 +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 566738FC14; Mon, 22 Oct 2012 22:42: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 q9MMgTPu025235; Mon, 22 Oct 2012 22:42:29 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9MMgTJ6025232; Mon, 22 Oct 2012 22:42:29 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210222242.q9MMgTJ6025232@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 22 Oct 2012 22:42:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241919 - head/sys/netipsec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 22 Oct 2012 22:42:29 -0000 Author: glebius Date: Mon Oct 22 22:42:28 2012 New Revision: 241919 URL: http://svn.freebsd.org/changeset/base/241919 Log: Couple of changes missed from r241913, which converted IPv4 stack to network byte order. Modified: head/sys/netipsec/ipsec_output.c head/sys/netipsec/xform_ah.c Modified: head/sys/netipsec/ipsec_output.c ============================================================================== --- head/sys/netipsec/ipsec_output.c Mon Oct 22 22:32:52 2012 (r241918) +++ head/sys/netipsec/ipsec_output.c Mon Oct 22 22:42:28 2012 (r241919) @@ -197,18 +197,14 @@ ipsec_process_done(struct mbuf *m, struc */ switch (saidx->dst.sa.sa_family) { #ifdef INET - struct ip *ip; case AF_INET: - ip = mtod(m, struct ip *); - ip->ip_len = ntohs(ip->ip_len); - ip->ip_off = ntohs(ip->ip_off); - #ifdef IPSEC_NAT_T /* * If NAT-T is enabled, now that all IPsec processing is done * insert UDP encapsulation header after IP header. */ if (sav->natt_type) { + struct ip *ip = mtod(m, struct ip *); #ifdef _IP_VHL const int hlen = IP_VHL_HL(ip->ip_vhl); #else @@ -246,7 +242,7 @@ ipsec_process_done(struct mbuf *m, struc udp->uh_dport = KEY_PORTFROMSADDR(&sav->sah->saidx.dst); udp->uh_sum = 0; udp->uh_ulen = htons(m->m_pkthdr.len - hlen); - ip->ip_len = m->m_pkthdr.len; + ip->ip_len = htons(m->m_pkthdr.len); ip->ip_p = IPPROTO_UDP; if (sav->natt_type == UDP_ENCAP_ESPINUDP_NON_IKE) Modified: head/sys/netipsec/xform_ah.c ============================================================================== --- head/sys/netipsec/xform_ah.c Mon Oct 22 22:32:52 2012 (r241918) +++ head/sys/netipsec/xform_ah.c Mon Oct 22 22:42:28 2012 (r241919) @@ -305,23 +305,13 @@ ah_massage_headers(struct mbuf **m0, int ip->ip_ttl = 0; ip->ip_sum = 0; - /* - * On input, fix ip_len which has been byte-swapped - * at ip_input(). - */ - if (!out) { - ip->ip_len = htons(ip->ip_len + skip); + if (!out) + ip->ip_len = htons(ntohs(ip->ip_len) + skip); - if (alg == CRYPTO_MD5_KPDK || alg == CRYPTO_SHA1_KPDK) - ip->ip_off = htons(ip->ip_off & IP_DF); - else - ip->ip_off = 0; - } else { - if (alg == CRYPTO_MD5_KPDK || alg == CRYPTO_SHA1_KPDK) - ip->ip_off = htons(ntohs(ip->ip_off) & IP_DF); - else - ip->ip_off = 0; - } + if (alg == CRYPTO_MD5_KPDK || alg == CRYPTO_SHA1_KPDK) + ip->ip_off &= htons(IP_DF); + else + ip->ip_off = htons(0); ptr = mtod(m, unsigned char *) + sizeof(struct ip); From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 02:20: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 C8D13B80; Tue, 23 Oct 2012 02:20:11 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B103B8FC08; Tue, 23 Oct 2012 02:20: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 q9N2KBpJ062766; Tue, 23 Oct 2012 02:20:11 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9N2KB4k062764; Tue, 23 Oct 2012 02:20:11 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201210230220.q9N2KB4k062764@svn.freebsd.org> From: Rui Paulo Date: Tue, 23 Oct 2012 02:20:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241920 - head/sys/powerpc/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 02:20:11 -0000 Author: rpaulo Date: Tue Oct 23 02:20:11 2012 New Revision: 241920 URL: http://svn.freebsd.org/changeset/base/241920 Log: Remove compat options. Submitted by: netchild Modified: head/sys/powerpc/conf/WII Modified: head/sys/powerpc/conf/WII ============================================================================== --- head/sys/powerpc/conf/WII Mon Oct 22 22:42:28 2012 (r241919) +++ head/sys/powerpc/conf/WII Tue Oct 23 02:20:11 2012 (r241920) @@ -32,10 +32,6 @@ options PROCFS #Process filesystem (r options PSEUDOFS #Pseudo-filesystem framework options GEOM_PART_GPT #GUID Partition Tables. options GEOM_LABEL #Provides labelization -options COMPAT_FREEBSD4 #Keep this for a while -options COMPAT_FREEBSD5 #Compatible with FreeBSD5 -options COMPAT_FREEBSD6 #Compatible with FreeBSD6 -options COMPAT_FREEBSD7 #Compatible with FreeBSD7 options SCSI_DELAY=5000 #Delay (in ms) before probing SCSI options KTRACE #ktrace(1) syscall trace support options STACK #stack(9) support From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 03:31: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 2E8B9909; Tue, 23 Oct 2012 03:31:47 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id CCEC48FC08; Tue, 23 Oct 2012 03:31:46 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 7496373027; Tue, 23 Oct 2012 05:52:24 +0200 (CEST) Date: Tue, 23 Oct 2012 05:52:24 +0200 From: Luigi Rizzo To: Gleb Smirnoff Subject: Re: svn commit: r241913 - in head: . sys/net sys/netgraph sys/netinet sys/netinet6 sys/netipsec sys/netpfil/ipfw sys/netpfil/pf sys/sys Message-ID: <20121023035224.GA95299@onelab2.iet.unipi.it> References: <201210222109.q9ML94e7007834@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201210222109.q9ML94e7007834@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 03:31:47 -0000 On Mon, Oct 22, 2012 at 09:09:04PM +0000, Gleb Smirnoff wrote: > Author: glebius > Date: Mon Oct 22 21:09:03 2012 > New Revision: 241913 > URL: http://svn.freebsd.org/changeset/base/241913 > > Log: > Switch the entire IPv4 stack to keep the IP packet header > in network byte order. Any host byte order processing is well done! cheers luigi From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 04: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 008D9101; Tue, 23 Oct 2012 04:23:29 +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 201338FC08; Tue, 23 Oct 2012 04:23:27 +0000 (UTC) Received: from c122-106-175-26.carlnfd1.nsw.optusnet.com.au (c122-106-175-26.carlnfd1.nsw.optusnet.com.au [122.106.175.26]) by mail03.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q9N4NE1L016168 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 23 Oct 2012 15:23:19 +1100 Date: Tue, 23 Oct 2012 15:23:14 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Xin LI Subject: Re: svn commit: r241916 - in head/sys: netinet netinet6 In-Reply-To: <201210222149.q9MLnvrt014543@svn.freebsd.org> Message-ID: <20121023142219.K1008@besplex.bde.org> References: <201210222149.q9MLnvrt014543@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-Cloudmark-Score: 0 X-Optus-Cloudmark-Analysis: v=2.0 cv=Up07rJMB c=1 sm=1 a=IL5CxCm4NNkA:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=4YxgJb60Em8A:10 a=9bYWxNbaw6tVe6ETzKsA:9 a=CjuIK1q_8ugA:10 a=_gJgAyp_CBRbkso1:21 a=1lT4tYz5JrisiryW:21 a=6BedxJCTRBcC19oj:21 a=bxQHXO5Py4tHmhUgaywp5w==:117 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 04:23:30 -0000 On Mon, 22 Oct 2012, Xin LI wrote: > Log: > Remove __P. This was a chance to remove style bugs in the prototypes. At least it didn't create so many new ones, unlike the original __P axing. It still enlarged about a hundred by changing from Gnu style continuation to Gnu style continuation indentation with an off-by-5 error. > Modified: head/sys/netinet/sctp_uio.h > ============================================================================== > --- head/sys/netinet/sctp_uio.h Mon Oct 22 21:26:36 2012 (r241915) > +++ head/sys/netinet/sctp_uio.h Mon Oct 22 21:49:56 2012 (r241916) > @@ -1267,44 +1267,44 @@ sctp_sorecvmsg(struct socket *so, > #if !(defined(_KERNEL)) && !(defined(__Userspace__)) > > __BEGIN_DECLS > -int sctp_peeloff __P((int, sctp_assoc_t)); > -int sctp_bindx __P((int, struct sockaddr *, int, int)); > -int sctp_connectx __P((int, const struct sockaddr *, int, sctp_assoc_t *)); > -int sctp_getaddrlen __P((sa_family_t)); > -int sctp_getpaddrs __P((int, sctp_assoc_t, struct sockaddr **)); > -void sctp_freepaddrs __P((struct sockaddr *)); > -int sctp_getladdrs __P((int, sctp_assoc_t, struct sockaddr **)); > -void sctp_freeladdrs __P((struct sockaddr *)); > -int sctp_opt_info __P((int, sctp_assoc_t, int, void *, socklen_t *)); > +int sctp_peeloff(int, sctp_assoc_t); > +int sctp_bindx(int, struct sockaddr *, int, int); > +int sctp_connectx(int, const struct sockaddr *, int, sctp_assoc_t *); > +int sctp_getaddrlen(sa_family_t); > +int sctp_getpaddrs(int, sctp_assoc_t, struct sockaddr **); > +void sctp_freepaddrs(struct sockaddr *); > +int sctp_getladdrs(int, sctp_assoc_t, struct sockaddr **); > +void sctp_freeladdrs(struct sockaddr *); > +int sctp_opt_info(int, sctp_assoc_t, int, void *, socklen_t *); sctp is fairly consistent in having style bugs on every line. It never indented fucntion names in prototypes. > > /* deprecated */ > ssize_t sctp_sendmsg > -__P((int, const void *, size_t, const struct sockaddr *, > - socklen_t, uint32_t, uint32_t, uint16_t, uint32_t, uint32_t)); > +(int, const void *, size_t, const struct sockaddr *, > + socklen_t, uint32_t, uint32_t, uint16_t, uint32_t, uint32_t); Putting the __P(( unindented on a new line was weird. It is weirder now with the __P( part. > > /* deprecated */ > - ssize_t sctp_send __P((int, const void *, size_t, > - const struct sctp_sndrcvinfo *, int)); > + ssize_t sctp_send(int, const void *, size_t, > + const struct sctp_sndrcvinfo *, int); Continuation lines were weirdly indented in at least this part of sctp. This one uses 14 spaces, underneath a line with 1 tab. 1 tab followed by 4 spaces would be normal. Since the 14 spaces didn't line up with anything, removing __P( leaves the continuation line not lined up with anything slightly differently. > ... > /* deprecated */ > - ssize_t sctp_recvmsg __P((int, void *, size_t, struct sockaddr *, socklen_t *, > - struct sctp_sndrcvinfo *, int *)); > + ssize_t sctp_recvmsg(int, void *, size_t, struct sockaddr *, socklen_t *, > + struct sctp_sndrcvinfo *, int *); Here there are 17 spaces instead of 14. > Modified: head/sys/netinet6/icmp6.c > ============================================================================== > --- head/sys/netinet6/icmp6.c Mon Oct 22 21:26:36 2012 (r241915) > +++ head/sys/netinet6/icmp6.c Mon Oct 22 21:49:56 2012 (r241916) > @@ -133,15 +133,15 @@ VNET_DECLARE(int, icmp6_nodeinfo); > static void icmp6_errcount(struct icmp6errstat *, int, int); > static int icmp6_rip6_input(struct mbuf **, int); > static int icmp6_ratelimit(const struct in6_addr *, const int, const int); > -static const char *icmp6_redirect_diag __P((struct in6_addr *, > - struct in6_addr *, struct in6_addr *)); > +static const char *icmp6_redirect_diag(struct in6_addr *, > + struct in6_addr *, struct in6_addr *); Function names not indented. Continuation lines indented abnormally with 1 tab so that it doesn't line up with anything. > static struct mbuf *ni6_input(struct mbuf *, int); > static struct mbuf *ni6_nametodns(const char *, int, int); > static int ni6_dnsmatch(const char *, int, const char *, int); > -static int ni6_addrs __P((struct icmp6_nodeinfo *, struct mbuf *, > - struct ifnet **, struct in6_addr *)); > -static int ni6_store_addrs __P((struct icmp6_nodeinfo *, struct icmp6_nodeinfo *, > - struct ifnet *, int)); Here the continuation lines were indented abnormally but using Gnu style (indent -lp) so that they lined up with the parantheses using a mixture of tabs and spaces. > +static int ni6_addrs(struct icmp6_nodeinfo *, struct mbuf *, > + struct ifnet **, struct in6_addr *); > +static int ni6_store_addrs(struct icmp6_nodeinfo *, struct icmp6_nodeinfo *, > + struct ifnet *, int); Now after removing __P( and closing up a space, the contination lines don't even follow Gnu style, but are off by 5 spaces. > static int icmp6_notify_error(struct mbuf **, int, int, int); > > /* > > Modified: head/sys/netinet6/in6.c > ============================================================================== > --- head/sys/netinet6/in6.c Mon Oct 22 21:26:36 2012 (r241915) > +++ head/sys/netinet6/in6.c Mon Oct 22 21:49:56 2012 (r241916) > @@ -129,10 +129,10 @@ const struct in6_addr in6mask128 = IN6MA > const struct sockaddr_in6 sa6_any = > { sizeof(sa6_any), AF_INET6, 0, 0, IN6ADDR_ANY_INIT, 0 }; > > -static int in6_lifaddr_ioctl __P((struct socket *, u_long, caddr_t, > - struct ifnet *, struct thread *)); > -static int in6_ifinit __P((struct ifnet *, struct in6_ifaddr *, > - struct sockaddr_in6 *, int)); > +static int in6_lifaddr_ioctl(struct socket *, u_long, caddr_t, > + struct ifnet *, struct thread *); > +static int in6_ifinit(struct ifnet *, struct in6_ifaddr *, > + struct sockaddr_in6 *, int); > static void in6_unlink_ifa(struct in6_ifaddr *, struct ifnet *); > > int (*faithprefix_p)(struct in6_addr *); netinet6 mostly had the first type of misindentation of continued lines, so removing __P( doesn't increase the style bugs. > Modified: head/sys/netinet6/in6.h > ============================================================================== > --- head/sys/netinet6/in6.h Mon Oct 22 21:26:36 2012 (r241915) > +++ head/sys/netinet6/in6.h Mon Oct 22 21:49:56 2012 (r241916) > @@ -635,22 +635,22 @@ struct cmsghdr; > struct ip6_hdr; > > int in6_cksum_pseudo(struct ip6_hdr *, uint32_t, uint8_t, uint16_t); > -int in6_cksum __P((struct mbuf *, u_int8_t, u_int32_t, u_int32_t)); > -int in6_localaddr __P((struct in6_addr *)); > +int in6_cksum(struct mbuf *, u_int8_t, u_int32_t, u_int32_t); > +int in6_localaddr(struct in6_addr *); > int in6_localip(struct in6_addr *); netinet actually had normal style here, except for __P( and a weird mixture of uintN_t with u_intN_t. > -int in6_addrscope __P((struct in6_addr *)); > -struct in6_ifaddr *in6_ifawithifp __P((struct ifnet *, struct in6_addr *)); > -extern void in6_if_up __P((struct ifnet *)); > +int in6_addrscope(struct in6_addr *); > +struct in6_ifaddr *in6_ifawithifp(struct ifnet *, struct in6_addr *); > +extern void in6_if_up(struct ifnet *); 'extern' on prototypes is even more archaic than __P(()), and is a style bug. It may have been needed for portability in 1980. > struct sockaddr; Mispaced declaration: (1) it is in the middle of the prototypes but not attached to the one (?) prototype that uses it. For other declarations, this file uses the more normal style of forward-incompete-declaring structs in a subsection before all the prototypes. (2) a subsection is not started or ended for it. > extern u_char ip6_protox[]; > Misplaced declaration: (1) it is a data declaration in the middle of the prototypes but not even used by the prototypes. (2) a subsection is ended for it but not started. > -void in6_sin6_2_sin __P((struct sockaddr_in *sin, > - struct sockaddr_in6 *sin6)); > -void in6_sin_2_v4mapsin6 __P((struct sockaddr_in *sin, > - struct sockaddr_in6 *sin6)); These used to line up. > -void in6_sin6_2_sin_in_sock __P((struct sockaddr *nam)); > -void in6_sin_2_v4mapsin6_in_sock __P((struct sockaddr **nam)); > -extern void addrsel_policy_init __P((void)); Another extern, with no indentation. > +void in6_sin6_2_sin(struct sockaddr_in *sin, > + struct sockaddr_in6 *sin6); > +void in6_sin_2_v4mapsin6(struct sockaddr_in *sin, > + struct sockaddr_in6 *sin6); Now off 5 spaces. The misindentation is more visible in the diffs than above because both lines use tabs normally. > +void in6_sin6_2_sin_in_sock(struct sockaddr *nam); > +void in6_sin_2_v4mapsin6_in_sock(struct sockaddr **nam); > +extern void addrsel_policy_init(void); It still has the extern. > > #define satosin6(sa) ((struct sockaddr_in6 *)(sa)) > #define sin6tosa(sin6) ((struct sockaddr *)(sin6)) > @@ -674,43 +674,43 @@ typedef __socklen_t socklen_t; > __BEGIN_DECLS > struct cmsghdr; > > -extern int inet6_option_space __P((int)); > -extern int inet6_option_init __P((void *, struct cmsghdr **, int)); > -extern int inet6_option_append __P((struct cmsghdr *, const uint8_t *, > - int, int)); > -extern uint8_t *inet6_option_alloc __P((struct cmsghdr *, int, int, int)); > -extern int inet6_option_next __P((const struct cmsghdr *, uint8_t **)); > -extern int inet6_option_find __P((const struct cmsghdr *, uint8_t **, int)); > - > -extern size_t inet6_rthdr_space __P((int, int)); > -extern struct cmsghdr *inet6_rthdr_init __P((void *, int)); > -extern int inet6_rthdr_add __P((struct cmsghdr *, const struct in6_addr *, > - unsigned int)); > -extern int inet6_rthdr_lasthop __P((struct cmsghdr *, unsigned int)); > +extern int inet6_option_space(int); > +extern int inet6_option_init(void *, struct cmsghdr **, int); > +extern int inet6_option_append(struct cmsghdr *, const uint8_t *, > + int, int); > +extern uint8_t *inet6_option_alloc(struct cmsghdr *, int, int, int); > +extern int inet6_option_next(const struct cmsghdr *, uint8_t **); > +extern int inet6_option_find(const struct cmsghdr *, uint8_t **, int); > + > +extern size_t inet6_rthdr_space(int, int); > +extern struct cmsghdr *inet6_rthdr_init(void *, int); > +extern int inet6_rthdr_add(struct cmsghdr *, const struct in6_addr *, > + unsigned int); > +extern int inet6_rthdr_lasthop(struct cmsghdr *, unsigned int); > #if 0 /* not implemented yet */ > -extern int inet6_rthdr_reverse __P((const struct cmsghdr *, struct cmsghdr *)); > +extern int inet6_rthdr_reverse(const struct cmsghdr *, struct cmsghdr *); > #endif > -extern int inet6_rthdr_segments __P((const struct cmsghdr *)); > -extern struct in6_addr *inet6_rthdr_getaddr __P((struct cmsghdr *, int)); > -extern int inet6_rthdr_getflags __P((const struct cmsghdr *, int)); > - > -extern int inet6_opt_init __P((void *, socklen_t)); > -extern int inet6_opt_append __P((void *, socklen_t, int, uint8_t, socklen_t, > - uint8_t, void **)); > -extern int inet6_opt_finish __P((void *, socklen_t, int)); > -extern int inet6_opt_set_val __P((void *, int, void *, socklen_t)); > - > -extern int inet6_opt_next __P((void *, socklen_t, int, uint8_t *, socklen_t *, > - void **)); > -extern int inet6_opt_find __P((void *, socklen_t, int, uint8_t, socklen_t *, > - void **)); > -extern int inet6_opt_get_val __P((void *, int, void *, socklen_t)); > -extern socklen_t inet6_rth_space __P((int, int)); > -extern void *inet6_rth_init __P((void *, socklen_t, int, int)); > -extern int inet6_rth_add __P((void *, const struct in6_addr *)); > -extern int inet6_rth_reverse __P((const void *, void *)); > -extern int inet6_rth_segments __P((const void *)); > -extern struct in6_addr *inet6_rth_getaddr __P((const void *, int)); > +extern int inet6_rthdr_segments(const struct cmsghdr *); > +extern struct in6_addr *inet6_rthdr_getaddr(struct cmsghdr *, int); > +extern int inet6_rthdr_getflags(const struct cmsghdr *, int); > + > +extern int inet6_opt_init(void *, socklen_t); > +extern int inet6_opt_append(void *, socklen_t, int, uint8_t, socklen_t, > + uint8_t, void **); > +extern int inet6_opt_finish(void *, socklen_t, int); > +extern int inet6_opt_set_val(void *, int, void *, socklen_t); > + > +extern int inet6_opt_next(void *, socklen_t, int, uint8_t *, socklen_t *, > + void **); > +extern int inet6_opt_find(void *, socklen_t, int, uint8_t, socklen_t *, > + void **); > +extern int inet6_opt_get_val(void *, int, void *, socklen_t); > +extern socklen_t inet6_rth_space(int, int); > +extern void *inet6_rth_init(void *, socklen_t, int, int); > +extern int inet6_rth_add(void *, const struct in6_addr *); > +extern int inet6_rth_reverse(const void *, void *); > +extern int inet6_rth_segments(const void *); > +extern struct in6_addr *inet6_rth_getaddr(const void *, int); > __END_DECLS Squillions of externs, and no tabs except to consistently misindent continuation lines, so removing __P( didn't make the indentation worse. This apparently uses extern because userland is more likely than the kernel to be compiled by a 1980 model compiler. But the 1980 model won't have dreamed of prototypes, so removing __P(()) breaks the sources for it completely, and the externs are useless. > > #endif /* __BSD_VISIBLE */ > > Modified: head/sys/netinet6/in6_gif.h > ============================================================================== > --- head/sys/netinet6/in6_gif.h Mon Oct 22 21:26:36 2012 (r241915) > +++ head/sys/netinet6/in6_gif.h Mon Oct 22 21:49:56 2012 (r241916) > @@ -36,10 +36,10 @@ > #define GIF_HLIM 30 > > struct gif_softc; > -int in6_gif_input __P((struct mbuf **, int *, int)); > -int in6_gif_output __P((struct ifnet *, int, struct mbuf *)); > -int gif_encapcheck6 __P((const struct mbuf *, int, int, void *)); > -int in6_gif_attach __P((struct gif_softc *)); > -int in6_gif_detach __P((struct gif_softc *)); > +int in6_gif_input(struct mbuf **, int *, int); > +int in6_gif_output(struct ifnet *, int, struct mbuf *); > +int gif_encapcheck6(const struct mbuf *, int, int, void *); > +int in6_gif_attach(struct gif_softc *); > +int in6_gif_detach(struct gif_softc *); Another place for forward incomplete struct declarations. These prototypes remain misindented and unsorted. The gif_encapcheck6() one seems to be in a wrong namespace and is unsorted into the middle of the in6 ones. If it were named in6_gig_enc..., then it would still be unsorted. > > #endif /* _NETINET6_IN6_GIF_H_ */ > Backwards comment. [... Lots more similarly] > Modified: head/sys/netinet6/in6_pcb.h > ============================================================================== > --- head/sys/netinet6/in6_pcb.h Mon Oct 22 21:26:36 2012 (r241915) > +++ head/sys/netinet6/in6_pcb.h Mon Oct 22 21:49:56 2012 (r241916) > @@ -72,53 +72,53 @@ > struct inpcbgroup * > in6_pcbgroup_byhash(struct inpcbinfo *, u_int, uint32_t); > struct inpcbgroup * > - in6_pcbgroup_byinpcb __P((struct inpcb *)); > + in6_pcbgroup_byinpcb(struct inpcb *); > struct inpcbgroup * > in6_pcbgroup_bymbuf(struct inpcbinfo *, struct mbuf *); > struct inpcbgroup * > - in6_pcbgroup_bytuple __P((struct inpcbinfo *, const struct in6_addr *, > - u_short, const struct in6_addr *, u_short)); > + in6_pcbgroup_bytuple(struct inpcbinfo *, const struct in6_addr *, > + u_short, const struct in6_addr *, u_short); Normal style to a fault. It even has the tab after 'struct' to bogusly line up the struct tag. FreeBSD stopped requiring this mistake 10-15 years ago. I don't remember if it is still accepted. With normal style, removing __P( doesn't affect the continued line. This still uses u_short instead of u_int16_t or uint16_t. > ... > struct inpcb * > - in6_pcblookup_local __P((struct inpcbinfo *, > + in6_pcblookup_local(struct inpcbinfo *, > struct in6_addr *, u_short, int, > - struct ucred *)); > + struct ucred *); Back to abnormal indentation for the continued lines.o Removing __P( breaks it further, as usual. The abnormal indentation is also partly responsible for needing 2 continuation lines instead of 1. But there was space for more args before splitting, and after removal of __P( there is even more space. Complete editing of __P( would create larger chur^diffs by often moving 1 arg from each line back to the previous line in multi-line prototypes after removing __P( gives enough space for 1 more arg on the first line. > struct inpcb * > - in6_pcblookup __P((struct inpcbinfo *, struct in6_addr *, > + in6_pcblookup(struct inpcbinfo *, struct in6_addr *, > u_int, struct in6_addr *, u_int, int, > - struct ifnet *)); > + struct ifnet *); > struct inpcb * > - in6_pcblookup_hash_locked __P((struct inpcbinfo *, struct in6_addr *, > + in6_pcblookup_hash_locked(struct inpcbinfo *, struct in6_addr *, > u_int, struct in6_addr *, u_int, int, > - struct ifnet *)); > + struct ifnet *); > struct inpcb * > - in6_pcblookup_mbuf __P((struct inpcbinfo *, struct in6_addr *, > + in6_pcblookup_mbuf(struct inpcbinfo *, struct in6_addr *, > u_int, struct in6_addr *, u_int, int, > - struct ifnet *ifp, struct mbuf *)); > -void in6_pcbnotify __P((struct inpcbinfo *, struct sockaddr *, > + struct ifnet *ifp, struct mbuf *); > +void in6_pcbnotify(struct inpcbinfo *, struct sockaddr *, > u_int, const struct sockaddr *, u_int, int, void *, > - struct inpcb *(*)(struct inpcb *, int))); > + struct inpcb *(*)(struct inpcb *, int)); Lots more off-by-5 errors. > struct inpcb * > - in6_rtchange __P((struct inpcb *, int)); > + in6_rtchange(struct inpcb *, int); After this point, most of the parameters have names, but before it they don't. > struct sockaddr * > - in6_sockaddr __P((in_port_t port, struct in6_addr *addr_p)); > + in6_sockaddr(in_port_t port, struct in6_addr *addr_p); > struct sockaddr * > - in6_v4mapsin6_sockaddr __P((in_port_t port, struct in_addr *addr_p)); > -int in6_getpeeraddr __P((struct socket *so, struct sockaddr **nam)); > -int in6_getsockaddr __P((struct socket *so, struct sockaddr **nam)); > -int in6_mapped_sockaddr __P((struct socket *so, struct sockaddr **nam)); > -int in6_mapped_peeraddr __P((struct socket *so, struct sockaddr **nam)); > -int in6_selecthlim __P((struct in6pcb *, struct ifnet *)); > -int in6_pcbsetport __P((struct in6_addr *, struct inpcb *, struct ucred *)); Back to no names on parameters. > -void init_sin6 __P((struct sockaddr_in6 *sin6, struct mbuf *m)); Especially large unsorting and/or namespace error. > + in6_v4mapsin6_sockaddr(in_port_t port, struct in_addr *addr_p); > +int in6_getpeeraddr(struct socket *so, struct sockaddr **nam); > +int in6_getsockaddr(struct socket *so, struct sockaddr **nam); > +int in6_mapped_sockaddr(struct socket *so, struct sockaddr **nam); > +int in6_mapped_peeraddr(struct socket *so, struct sockaddr **nam); > +int in6_selecthlim(struct in6pcb *, struct ifnet *); > +int in6_pcbsetport(struct in6_addr *, struct inpcb *, struct ucred *); > +void init_sin6(struct sockaddr_in6 *sin6, struct mbuf *m); The order seems to have been originally alphabetical with random accretions. > #endif /* _KERNEL */ > > #endif /* !_NETINET6_IN6_PCB_H_ */ At least this comment isn't backwards. > ... > Modified: head/sys/netinet6/in6_var.h > ============================================================================== > --- head/sys/netinet6/in6_var.h Mon Oct 22 21:26:36 2012 (r241915) > +++ head/sys/netinet6/in6_var.h Mon Oct 22 21:49:56 2012 (r241916) > @@ -762,36 +762,36 @@ int in6_leavegroup(struct in6_multi_mshi > ... > +int in6_prefix_ioctl(struct socket *, u_long, caddr_t, > + struct ifnet *); After removing __P(, the line splitting is no longer needed. [... Lots more similarly] Bruce From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 06:00: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 C0F7BBFF; Tue, 23 Oct 2012 06:00:32 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail04.syd.optusnet.com.au (mail04.syd.optusnet.com.au [211.29.132.185]) by mx1.freebsd.org (Postfix) with ESMTP id 4CB388FC0C; Tue, 23 Oct 2012 06:00:31 +0000 (UTC) Received: from c122-106-175-26.carlnfd1.nsw.optusnet.com.au (c122-106-175-26.carlnfd1.nsw.optusnet.com.au [122.106.175.26]) by mail04.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q9N60Hub026655 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 23 Oct 2012 17:00:19 +1100 Date: Tue, 23 Oct 2012 17:00:17 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Warner Losh Subject: Re: svn commit: r241755 - head/lib/msun/src In-Reply-To: <45589524-E249-43E3-91B7-6A78068208AD@bsdimp.com> Message-ID: <20121023160721.O1282@besplex.bde.org> References: <201210192246.q9JMkm4R092929@svn.freebsd.org> <20121020150917.I1095@besplex.bde.org> <18177777-6EE0-4103-98B0-272EFF98FE96@bsdimp.com> <20121022040651.GA49632@troutmask.apl.washington.edu> <20121022134003.GA52156@troutmask.apl.washington.edu> <45589524-E249-43E3-91B7-6A78068208AD@bsdimp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-Cloudmark-Score: 0 X-Optus-Cloudmark-Analysis: v=2.0 cv=fLlhRume c=1 sm=1 a=xI64QrV9ptIA:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=Aet6fyW9sl8A:10 a=xwBt9yZo37ERmlmNs5IA:9 a=CjuIK1q_8ugA:10 a=bxQHXO5Py4tHmhUgaywp5w==:117 Cc: src-committers@freebsd.org, Steve Kargl , svn-src-all@freebsd.org, Bruce Evans , svn-src-head@freebsd.org, Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 06:00:32 -0000 On Mon, 22 Oct 2012, Warner Losh wrote: > On Oct 22, 2012, at 7:40 AM, Steve Kargl wrote: >> ... >> BTW, besides bde's technical points, your change made >> our sources different from OpenBSD, NetBSD, and new >> project openlibm. Diffing against the other trees >> would become cluttered. > > BDE's technical points vary in quality and are difficult to argue with since they are so nit-picky. :( I'd be happy to work through them, but some of the issues I just fundamentally disagree with. Since I backed out the comments, I've decided not to spend the time arguing, but do think that documenting the differences between the precisions would be good. I started down this path because I thought expf was broken because it didn't match exp exactly... > > However, since he's implementing a new one, wouldn't that also have diffability issues too? Steve is implementing it :-). It would be completely different. It is already implemented, not quite perfectly, for expl(), and diffs between that version and the float and double versions are unreadable. Changing the float and double versions to be like it would make the diffs readable again. Imperfections in it include its documentation consisting mainly of a pointer to a much further-away place than a nearby source file -- to a paper by Tang which is still behind the ACM paywall AFAIK. It is slightly simpler and more general than the fdlibm version (no transformation through the apparently-magic R(z)), and well documented by the paper, so it is easier to understand iff you have seen the paper or know the general details. Starting from scratch, I wouldn't go this way. Translating the fdlibm exp() directly to expl() would have given a good enough version. Similarly for all functions in fdlibm. The double precision versions aren't perfect, but they are mostly good or very good. (It's interesting that they keep getting better with each generation of x86, because each generation has better support for the type of bit fiddling that the fdlibm functions like to do. Better means often taking 1/2 or 1/3 as many cycles relative to the 2002 generation of x86's, mainly by reducing pipeline stalls in instructions that fdlibm probably liked to use because they were fast on sparc in 1992, but were slow on x86 in 1992 and became relatively slower with pipelines on x86.) But Steve didn't understand the fdlibm version when he started, and didn't like the looks of it, so he wrote a completely different version. We now have a version that is so much better than the fdlibm version that it is silly to keep using the fdlibm version. It takes about the same time for expl() as for expf(), to create about 3 times as many accurate bits internally and deliver 64 of them (it would be useful to deliver more, but the API for this isn't established and expf() doesn't have any more to deliver). (This is for ld80; ld128 on at least sparc64 is so slow that it is unusable for almost all purposes and especially unusable for optimizing expf().) Normally, using the same algorithm, you have to work hard for long double precision to be less than 4 times slower than float precision. Note that i386 doesn't even use fdlibm for exp(). It uses the i387 for "efficiency". But with newer x86, even fdlibm's slow version is faster than the i387. We never used the i387 for expf() on i386 because optimizing expf() wasn't considered important until after x86's became new enough for their hardware expf to be slower than fdlibm software expf, though we almost imported this from NetBSD. The i387 is unusable for expl() on i386 since it is barely accurate enough for exp(). Lots of other i387 "optimized" versions on i386 should be removed. There are just a couple of them that are more efficient or more accurate (usually not both) than the fdlibm versions on modern x86. amd64 never used most of the ones that should be removed, though they would have been relatively more accurate for amd64. But it takes courage to axe working versions :-). Bruce From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 08:22: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 6916CE10; Tue, 23 Oct 2012 08:22:02 +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 51A1D8FC0C; Tue, 23 Oct 2012 08:22: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 q9N8M2KF019100; Tue, 23 Oct 2012 08:22:02 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9N8M2kT019097; Tue, 23 Oct 2012 08:22:02 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210230822.q9N8M2kT019097@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 23 Oct 2012 08:22:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241922 - head/sys/netipsec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 08:22:02 -0000 Author: glebius Date: Tue Oct 23 08:22:01 2012 New Revision: 241922 URL: http://svn.freebsd.org/changeset/base/241922 Log: - Fix one more miss from r241913. - Add XXX comment about necessity of the entire block, that "fixes up" the IP header. Modified: head/sys/netipsec/ipsec_input.c Modified: head/sys/netipsec/ipsec_input.c ============================================================================== --- head/sys/netipsec/ipsec_input.c Tue Oct 23 02:20:42 2012 (r241921) +++ head/sys/netipsec/ipsec_input.c Tue Oct 23 08:22:01 2012 (r241922) @@ -328,7 +328,10 @@ ipsec4_common_input_cb(struct mbuf *m, s } if (skip != 0) { - /* Fix IPv4 header */ + /* + * Fix IPv4 header + * XXXGL: do we need this entire block? + */ if (m->m_len < skip && (m = m_pullup(m, skip)) == NULL) { DPRINTF(("%s: processing failed for SA %s/%08lx\n", __func__, ipsec_address(&sav->sah->saidx.dst), @@ -341,7 +344,6 @@ ipsec4_common_input_cb(struct mbuf *m, s ip = mtod(m, struct ip *); ip->ip_len = htons(m->m_pkthdr.len); - ip->ip_off = htons(ip->ip_off); ip->ip_sum = 0; ip->ip_sum = in_cksum(m, ip->ip_hl << 2); } else { From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 08:27: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 316B4FFC; Tue, 23 Oct 2012 08:27:14 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 9EB728FC0A; Tue, 23 Oct 2012 08:27:13 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q9N8RB48083216; Tue, 23 Oct 2012 12:27:11 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q9N8RBNt083215; Tue, 23 Oct 2012 12:27:11 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 23 Oct 2012 12:27:11 +0400 From: Gleb Smirnoff To: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r241922 - head/sys/netipsec Message-ID: <20121023082711.GN70741@FreeBSD.org> References: <201210230822.q9N8M2kT019097@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201210230822.q9N8M2kT019097@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 08:27:14 -0000 On Tue, Oct 23, 2012 at 08:22:02AM +0000, Gleb Smirnoff wrote: T> Author: glebius T> Date: Tue Oct 23 08:22:01 2012 T> New Revision: 241922 T> URL: http://svn.freebsd.org/changeset/base/241922 T> T> Log: T> - Fix one more miss from r241913. T> - Add XXX comment about necessity of the entire block, T> that "fixes up" the IP header. It'll be nice if any IPSEC expert looks into this block and considers its importance. It looks to me that the "fix up" won't be needed at all right after I commit change that fixed ip_input() to not modify ip_len, which I plan to do in several minutes. T> Modified: T> head/sys/netipsec/ipsec_input.c T> T> Modified: head/sys/netipsec/ipsec_input.c T> ============================================================================== T> --- head/sys/netipsec/ipsec_input.c Tue Oct 23 02:20:42 2012 (r241921) T> +++ head/sys/netipsec/ipsec_input.c Tue Oct 23 08:22:01 2012 (r241922) T> @@ -328,7 +328,10 @@ ipsec4_common_input_cb(struct mbuf *m, s T> } T> T> if (skip != 0) { T> - /* Fix IPv4 header */ T> + /* T> + * Fix IPv4 header T> + * XXXGL: do we need this entire block? T> + */ T> if (m->m_len < skip && (m = m_pullup(m, skip)) == NULL) { T> DPRINTF(("%s: processing failed for SA %s/%08lx\n", T> __func__, ipsec_address(&sav->sah->saidx.dst), T> @@ -341,7 +344,6 @@ ipsec4_common_input_cb(struct mbuf *m, s T> T> ip = mtod(m, struct ip *); T> ip->ip_len = htons(m->m_pkthdr.len); T> - ip->ip_off = htons(ip->ip_off); T> ip->ip_sum = 0; T> ip->ip_sum = in_cksum(m, ip->ip_hl << 2); T> } else { -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 08:33: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 5A33E2E9; Tue, 23 Oct 2012 08:33:15 +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 6E6B18FC08; Tue, 23 Oct 2012 08:33: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 q9N8XEQ5020947; Tue, 23 Oct 2012 08:33:14 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9N8XEas020937; Tue, 23 Oct 2012 08:33:14 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210230833.q9N8XEas020937@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 23 Oct 2012 08:33:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241923 - in head/sys: netinet netipsec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 08:33:15 -0000 Author: glebius Date: Tue Oct 23 08:33:13 2012 New Revision: 241923 URL: http://svn.freebsd.org/changeset/base/241923 Log: Do not reduce ip_len by size of IP header in the ip_input() before passing a packet to protocol input routines. For several protocols this mean that now protocol needs to do subtraction itself, and for another half this means that we do not need to add header length back to the packet. Make ip_stripoptions() to adjust ip_len, since now we enter this function with a packet header whose ip_len does represent length of entire packet, not payload only. Modified: head/sys/netinet/igmp.c head/sys/netinet/ip_icmp.c head/sys/netinet/ip_input.c head/sys/netinet/ip_options.c head/sys/netinet/raw_ip.c head/sys/netinet/sctp_input.c head/sys/netinet/tcp_input.c head/sys/netinet/udp_usrreq.c head/sys/netipsec/xform_ah.c Modified: head/sys/netinet/igmp.c ============================================================================== --- head/sys/netinet/igmp.c Tue Oct 23 08:22:01 2012 (r241922) +++ head/sys/netinet/igmp.c Tue Oct 23 08:33:13 2012 (r241923) @@ -1442,7 +1442,7 @@ igmp_input(struct mbuf *m, int off) ip = mtod(m, struct ip *); iphlen = off; - igmplen = ntohs(ip->ip_len); + igmplen = ntohs(ip->ip_len) - off; /* * Validate lengths. Modified: head/sys/netinet/ip_icmp.c ============================================================================== --- head/sys/netinet/ip_icmp.c Tue Oct 23 08:22:01 2012 (r241922) +++ head/sys/netinet/ip_icmp.c Tue Oct 23 08:33:13 2012 (r241923) @@ -359,7 +359,7 @@ icmp_input(struct mbuf *m, int off) struct ip *ip = mtod(m, struct ip *); struct sockaddr_in icmpsrc, icmpdst, icmpgw; int hlen = off; - int icmplen = ntohs(ip->ip_len); + int icmplen = ntohs(ip->ip_len) - off; int i, code; void (*ctlfunc)(int, struct sockaddr *, void *); int fibnum; @@ -592,8 +592,6 @@ icmp_input(struct mbuf *m, int off) } ifa_free(&ia->ia_ifa); reflect: - /* Since ip_input() deducts this. */ - ip->ip_len = htons(ntohs(ip->ip_len) + hlen); ICMPSTAT_INC(icps_reflect); ICMPSTAT_INC(icps_outhist[icp->icmp_type]); icmp_reflect(m); Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Tue Oct 23 08:22:01 2012 (r241922) +++ head/sys/netinet/ip_input.c Tue Oct 23 08:33:13 2012 (r241923) @@ -731,12 +731,6 @@ ours: ip_len = ntohs(ip->ip_len); } - /* - * Further protocols expect the packet length to be w/o the - * IP header. - */ - ip->ip_len = htons(ip_len - hlen); - #ifdef IPSEC /* * enforce IPsec policy checking if we are seeing last header. Modified: head/sys/netinet/ip_options.c ============================================================================== --- head/sys/netinet/ip_options.c Tue Oct 23 08:22:01 2012 (r241922) +++ head/sys/netinet/ip_options.c Tue Oct 23 08:33:13 2012 (r241923) @@ -470,7 +470,7 @@ ip_stripoptions(struct mbuf *m) m->m_len -= olen; if (m->m_flags & M_PKTHDR) m->m_pkthdr.len -= olen; - ip->ip_v = IPVERSION; + ip->ip_len = htons(ntohs(ip->ip_len) - olen); ip->ip_hl = sizeof(struct ip) >> 2; } Modified: head/sys/netinet/raw_ip.c ============================================================================== --- head/sys/netinet/raw_ip.c Tue Oct 23 08:22:01 2012 (r241922) +++ head/sys/netinet/raw_ip.c Tue Oct 23 08:33:13 2012 (r241923) @@ -287,12 +287,9 @@ rip_input(struct mbuf *m, int off) ifp = m->m_pkthdr.rcvif; /* - * Add back the IP header length which was - * removed by ip_input(). Raw sockets do - * not modify the packet except for some - * byte order swaps. + * Applications on raw sockets expect host byte order. */ - ip->ip_len = ntohs(ip->ip_len) + off; + ip->ip_len = ntohs(ip->ip_len); ip->ip_off = ntohs(ip->ip_off); hash = INP_PCBHASH_RAW(proto, ip->ip_src.s_addr, @@ -506,7 +503,8 @@ rip_output(struct mbuf *m, struct socket ip->ip_id = ip_newid(); /* - * Applications on raw sockets expect host byte order. + * Applications on raw sockets pass us packets + * in host byte order. */ ip->ip_len = htons(ip->ip_len); ip->ip_off = htons(ip->ip_off); Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Tue Oct 23 08:22:01 2012 (r241922) +++ head/sys/netinet/sctp_input.c Tue Oct 23 08:33:13 2012 (r241923) @@ -6038,7 +6038,7 @@ sctp_input_with_port(struct mbuf *i_pak, dst.sin_len = sizeof(struct sockaddr_in); dst.sin_port = sh->dest_port; dst.sin_addr = ip->ip_dst; - length = ntohs(ip->ip_len) + iphlen; + length = ntohs(ip->ip_len); /* Validate mbuf chain length with IP payload length. */ if (SCTP_HEADER_LEN(m) != length) { SCTPDBG(SCTP_DEBUG_INPUT1, Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Tue Oct 23 08:22:01 2012 (r241922) +++ head/sys/netinet/tcp_input.c Tue Oct 23 08:33:13 2012 (r241923) @@ -641,7 +641,7 @@ tcp_input(struct mbuf *m, int off0) } ip = mtod(m, struct ip *); th = (struct tcphdr *)((caddr_t)ip + off0); - tlen = ntohs(ip->ip_len); + tlen = ntohs(ip->ip_len) - off0; if (m->m_pkthdr.csum_flags & CSUM_DATA_VALID) { if (m->m_pkthdr.csum_flags & CSUM_PSEUDO_HDR) Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Tue Oct 23 08:22:01 2012 (r241922) +++ head/sys/netinet/udp_usrreq.c Tue Oct 23 08:33:13 2012 (r241923) @@ -392,7 +392,7 @@ udp_input(struct mbuf *m, int off) * reflect UDP length, drop. */ len = ntohs((u_short)uh->uh_ulen); - ip_len = ntohs(ip->ip_len); + ip_len = ntohs(ip->ip_len) - iphlen; if (ip_len != len) { if (len > ip_len || len < sizeof(struct udphdr)) { UDPSTAT_INC(udps_badlen); @@ -601,7 +601,6 @@ udp_input(struct mbuf *m, int off) if (badport_bandlim(BANDLIM_ICMP_UNREACH) < 0) goto badunlocked; *ip = save_ip; - ip->ip_len = htons(ip_len + iphlen); icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_PORT, 0, 0); return; } Modified: head/sys/netipsec/xform_ah.c ============================================================================== --- head/sys/netipsec/xform_ah.c Tue Oct 23 08:22:01 2012 (r241922) +++ head/sys/netipsec/xform_ah.c Tue Oct 23 08:33:13 2012 (r241923) @@ -305,9 +305,6 @@ ah_massage_headers(struct mbuf **m0, int ip->ip_ttl = 0; ip->ip_sum = 0; - if (!out) - ip->ip_len = htons(ntohs(ip->ip_len) + skip); - if (alg == CRYPTO_MD5_KPDK || alg == CRYPTO_SHA1_KPDK) ip->ip_off &= htons(IP_DF); else From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 09:05: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 4327DD44; Tue, 23 Oct 2012 09:05:59 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) by mx1.freebsd.org (Postfix) with ESMTP id E145A8FC18; Tue, 23 Oct 2012 09:05:58 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:4d6a:19cb:16ac:7be0] (unknown [IPv6:2001:7b8:3a7:0:4d6a:19cb:16ac:7be0]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 2183A5C59; Tue, 23 Oct 2012 11:05:57 +0200 (CEST) Message-ID: <50865DF3.7060302@FreeBSD.org> Date: Tue, 23 Oct 2012 11:05:55 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Jan Beich Subject: Re: svn commit: r241823 - in head: . etc etc/atf etc/mtree lib lib/atf lib/atf/libatf-c lib/atf/libatf-c++ libexec libexec/atf libexec/atf/atf-check share share/atf share/doc share/doc/atf share/exampl... References: <201210220118.q9M1Ifh5098857__14926.3614825488$1350868751$gmane$org@svn.freebsd.org> <1TQC0L-000AZG-Q5@internal.tormail.org> <1TQFrW-0008DN-S8@internal.tormail.org> <1TQJtx-000C9z-I6@internal.tormail.org> In-Reply-To: <1TQJtx-000C9z-I6@internal.tormail.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 09:05:59 -0000 On 2012-10-22 16:58, Jan Beich wrote: > Dimitry Andric writes: >> On 2012-10-22 09:00, Jan Beich wrote: ... >>> undefined reference to `std::__1::basic_ios>> std::__1::char_traits >::clear(unsigned int)' >>> clang++: error: linker command failed with exit code 1 (use -v to >>> see invocation) >> Strange, for me it compiles (with a bunch of warnings, which I have >> fixed locally), and links just fine. However, I always use -std=c++11, >> which -std= flag are you using, if any? > Adding -std=c++11 doesn't help. Neither yours or Garrett's patches. > Instead, removing local -finline-functions (implied by -O3) does. With clang, -O3 does not imply -finline-functions, but it may have some influence on the threshold for inlining. This error is still very strange though, and it might be a real bug in the optimizer at -O3; at this level, it really seems to generate a call to a function that is declared inline, with the __always_inline attribute. For now, I would advise not to use higher levels than -O2. Meanwhile, I will take this problem to the llvm/clang guys. From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 09:12: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 AF10671 for ; Tue, 23 Oct 2012 09:12:17 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 0D52A8FC18 for ; Tue, 23 Oct 2012 09:12:16 +0000 (UTC) Received: (qmail 84840 invoked from network); 23 Oct 2012 10:50:13 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 23 Oct 2012 10:50:13 -0000 Message-ID: <50865F60.4040409@freebsd.org> Date: Tue, 23 Oct 2012 11:12:00 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r241923 - in head/sys: netinet netipsec References: <201210230833.q9N8XEas020937@svn.freebsd.org> In-Reply-To: <201210230833.q9N8XEas020937@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 09:12:17 -0000 On 23.10.2012 10:33, Gleb Smirnoff wrote: > Author: glebius > Date: Tue Oct 23 08:33:13 2012 > New Revision: 241923 > URL: http://svn.freebsd.org/changeset/base/241923 > > Log: > Do not reduce ip_len by size of IP header in the ip_input() > before passing a packet to protocol input routines. > For several protocols this mean that now protocol needs to > do subtraction itself, and for another half this means that > we do not need to add header length back to the packet. Yay! More Mammoth shit getting washed away! ;) Please add an entry to UPDATING as the convention of of ip_len subtraction has been there since forever. That makes it easier to discover for third parties writing code. -- Andre From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 10:16: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 C8917494; Tue, 23 Oct 2012 10:16:20 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 42E028FC08; Tue, 23 Oct 2012 10:16:20 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q9NAGIg3084093; Tue, 23 Oct 2012 14:16:18 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q9NAGIhn084092; Tue, 23 Oct 2012 14:16:18 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 23 Oct 2012 14:16:18 +0400 From: Gleb Smirnoff To: Andre Oppermann Subject: Re: svn commit: r241923 - in head/sys: netinet netipsec Message-ID: <20121023101618.GP70741@FreeBSD.org> References: <201210230833.q9N8XEas020937@svn.freebsd.org> <50865F60.4040409@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <50865F60.4040409@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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 10:16:20 -0000 On Tue, Oct 23, 2012 at 11:12:00AM +0200, Andre Oppermann wrote: A> On 23.10.2012 10:33, Gleb Smirnoff wrote: A> > Author: glebius A> > Date: Tue Oct 23 08:33:13 2012 A> > New Revision: 241923 A> > URL: http://svn.freebsd.org/changeset/base/241923 A> > A> > Log: A> > Do not reduce ip_len by size of IP header in the ip_input() A> > before passing a packet to protocol input routines. A> > For several protocols this mean that now protocol needs to A> > do subtraction itself, and for another half this means that A> > we do not need to add header length back to the packet. A> A> Yay! More Mammoth shit getting washed away! ;) A> A> Please add an entry to UPDATING as the convention of of ip_len A> subtraction has been there since forever. That makes it easier A> to discover for third parties writing code. Not sure it worth. Never heard of any loadable protocol outside of tree. Those loadable protocols that we have in tree (carp, divert) do not look at ip_len. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 10:29: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 0DEF2861; Tue, 23 Oct 2012 10:29:32 +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 EA5438FC17; Tue, 23 Oct 2012 10:29: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 q9NATVlb040435; Tue, 23 Oct 2012 10:29:31 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NATVKx040433; Tue, 23 Oct 2012 10:29:31 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210231029.q9NATVKx040433@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 23 Oct 2012 10:29:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241925 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 10:29:32 -0000 Author: glebius Date: Tue Oct 23 10:29:31 2012 New Revision: 241925 URL: http://svn.freebsd.org/changeset/base/241925 Log: Simplify ip_stripoptions() reducing number of intermediate variables. Modified: head/sys/netinet/ip_options.c Modified: head/sys/netinet/ip_options.c ============================================================================== --- head/sys/netinet/ip_options.c Tue Oct 23 09:59:46 2012 (r241924) +++ head/sys/netinet/ip_options.c Tue Oct 23 10:29:31 2012 (r241925) @@ -458,20 +458,18 @@ ip_srcroute(struct mbuf *m0) void ip_stripoptions(struct mbuf *m) { - int i; struct ip *ip = mtod(m, struct ip *); - caddr_t opts; int olen; - olen = (ip->ip_hl << 2) - sizeof (struct ip); - opts = (caddr_t)(ip + 1); - i = m->m_len - (sizeof (struct ip) + olen); - bcopy(opts + olen, opts, (unsigned)i); + olen = (ip->ip_hl << 2) - sizeof(struct ip); m->m_len -= olen; if (m->m_flags & M_PKTHDR) m->m_pkthdr.len -= olen; ip->ip_len = htons(ntohs(ip->ip_len) - olen); ip->ip_hl = sizeof(struct ip) >> 2; + + bcopy((char *)ip + sizeof(struct ip) + olen, (ip + 1), + (size_t )(m->m_len - sizeof(struct ip))); } /* From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 10:30:10 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 8BA42A40; Tue, 23 Oct 2012 10:30:10 +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 738618FC1A; Tue, 23 Oct 2012 10:30: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 q9NAUAGk040623; Tue, 23 Oct 2012 10:30:10 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NAUAIr040621; Tue, 23 Oct 2012 10:30:10 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210231030.q9NAUAIr040621@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 23 Oct 2012 10:30:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241926 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 10:30:10 -0000 Author: glebius Date: Tue Oct 23 10:30:09 2012 New Revision: 241926 URL: http://svn.freebsd.org/changeset/base/241926 Log: Use ip_stripoptions() instead of handrolled version. Modified: head/sys/netinet/ip_icmp.c Modified: head/sys/netinet/ip_icmp.c ============================================================================== --- head/sys/netinet/ip_icmp.c Tue Oct 23 10:29:31 2012 (r241925) +++ head/sys/netinet/ip_icmp.c Tue Oct 23 10:30:09 2012 (r241926) @@ -857,19 +857,7 @@ match: printf("%d\n", opts->m_len); #endif } - /* - * Now strip out original options by copying rest of first - * mbuf's data back, and adjust the IP length. - */ - ip->ip_len = htons(ntohs(ip->ip_len) - optlen); - ip->ip_v = IPVERSION; - ip->ip_hl = 5; - m->m_len -= optlen; - if (m->m_flags & M_PKTHDR) - m->m_pkthdr.len -= optlen; - optlen += sizeof(struct ip); - bcopy((caddr_t)ip + optlen, (caddr_t)(ip + 1), - (unsigned)(m->m_len - sizeof(struct ip))); + ip_stripoptions(m); } m_tag_delete_nonpersistent(m); m->m_flags &= ~(M_BCAST|M_MCAST); From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 12:03: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 1396CCDB; Tue, 23 Oct 2012 12:03:33 +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 F00A68FC12; Tue, 23 Oct 2012 12:03: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 q9NC3Wsh057268; Tue, 23 Oct 2012 12:03:32 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NC3WMU057266; Tue, 23 Oct 2012 12:03:32 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201210231203.q9NC3WMU057266@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 23 Oct 2012 12:03:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241927 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 12:03:33 -0000 Author: kib Date: Tue Oct 23 12:03:32 2012 New Revision: 241927 URL: http://svn.freebsd.org/changeset/base/241927 Log: Add the VFS_UNLOCK_GIANT.9.gz hardlink to ObsoleteFiles list too. Noted by: pluknet Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Oct 23 10:30:09 2012 (r241926) +++ head/ObsoleteFiles.inc Tue Oct 23 12:03:32 2012 (r241927) @@ -40,6 +40,7 @@ # 20121022: VFS_LOCK_GIANT elimination OLD_FILES+=usr/share/man/man9/VFS_LOCK_GIANT.9.gz +OLD_FILES+=usr/share/man/man9/VFS_UNLOCK_GIANT.9.gz # 20121004: remove incomplete unwind.h OLD_FILES+=usr/include/clang/3.2/unwind.h # 20120908: pf cleanup From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 12:37: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 65B32646; Tue, 23 Oct 2012 12:37:03 +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 4D3AC8FC12; Tue, 23 Oct 2012 12:37: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 q9NCb3Rh063377; Tue, 23 Oct 2012 12:37:03 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NCb3Oq063374; Tue, 23 Oct 2012 12:37:03 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210231237.q9NCb3Oq063374@svn.freebsd.org> From: John Baldwin Date: Tue, 23 Oct 2012 12:37:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241928 - stable/9/usr.bin/make X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 12:37:03 -0000 Author: jhb Date: Tue Oct 23 12:37:02 2012 New Revision: 241928 URL: http://svn.freebsd.org/changeset/base/241928 Log: MFC 228157: - Fix segmentation fault when running "+command" when run with -jX -n due to Compat_RunCommand() being called with `cmd' that is not on the node->commands list - Make ellipsis ("..." command) handling consistent: check for "..." command in job make after variables expansion to match compat make behavior - Fix empty command handling (after variables expansion and @+- modifiers are processed): now empty commands are ignored in compat make and are not printed in job make case Modified: stable/9/usr.bin/make/Makefile stable/9/usr.bin/make/job.c Directory Properties: stable/9/usr.bin/make/ (props changed) Modified: stable/9/usr.bin/make/Makefile ============================================================================== --- stable/9/usr.bin/make/Makefile Tue Oct 23 12:03:32 2012 (r241927) +++ stable/9/usr.bin/make/Makefile Tue Oct 23 12:37:02 2012 (r241928) @@ -15,7 +15,7 @@ NO_SHARED?= YES .endif # Version has the RYYYYMMDDX format, where R is from RELENG_ -CFLAGS+=-DMAKE_VERSION=\"9201206140\" +CFLAGS+=-DMAKE_VERSION=\"9201210220\" # There is no obvious performance improvement currently. # CFLAGS+=-DUSE_KQUEUE Modified: stable/9/usr.bin/make/job.c ============================================================================== --- stable/9/usr.bin/make/job.c Tue Oct 23 12:03:32 2012 (r241927) +++ stable/9/usr.bin/make/job.c Tue Oct 23 12:37:02 2012 (r241928) @@ -381,7 +381,7 @@ static int JobStart(GNode *, int, Job *) static void JobDoOutput(Job *, Boolean); static void JobInterrupt(int, int); static void JobRestartJobs(void); -static int Compat_RunCommand(char *, struct GNode *); +static int Compat_RunCommand(LstNode *, struct GNode *); static GNode *curTarg = NULL; static GNode *ENDNode; @@ -647,7 +647,7 @@ JobPassSig(int signo) * numCommands is incremented if the command is actually printed. */ static int -JobPrintCommand(char *cmd, Job *job) +JobPrintCommand(LstNode *cmdNode, Job *job) { Boolean noSpecials; /* true if we shouldn't worry about * inserting special commands into @@ -658,40 +658,30 @@ JobPrintCommand(char *cmd, Job *job) * off before printing the command * and need to turn it back on */ const char *cmdTemplate;/* Template to use when printing the command */ - char *cmdStart; /* Start of expanded command */ - LstNode *cmdNode; /* Node for replacing the command */ + char *cmd; /* Expanded command */ noSpecials = (noExecute && !(job->node->type & OP_MAKE)); - if (strcmp(cmd, "...") == 0) { - job->node->type |= OP_SAVE_CMDS; - if ((job->flags & JOB_IGNDOTS) == 0) { - job->tailCmds = - Lst_Succ(Lst_Member(&job->node->commands, cmd)); - return (1); - } - return (0); - } - #define DBPRINTF(fmt, arg) \ DEBUGF(JOB, (fmt, arg)); \ fprintf(job->cmdFILE, fmt, arg); \ fflush(job->cmdFILE); - numCommands += 1; - /* * For debugging, we replace each command with the result of expanding * the variables in the command. */ - cmdNode = Lst_Member(&job->node->commands, cmd); - - cmd = Buf_Peel(Var_Subst(cmd, job->node, FALSE)); - cmdStart = cmd; - - Lst_Replace(cmdNode, cmdStart); - - cmdTemplate = "%s\n"; + cmd = Buf_Peel(Var_Subst(Lst_Datum(cmdNode), job->node, FALSE)); + if (strcmp(cmd, "...") == 0) { + free(cmd); + job->node->type |= OP_SAVE_CMDS; + if ((job->flags & JOB_IGNDOTS) == 0) { + job->tailCmds = Lst_Succ(cmdNode); + return (1); + } + return (0); + } + Lst_Replace(cmdNode, cmd); /* * Check for leading @', -' or +'s to control echoing, error checking, @@ -715,7 +705,7 @@ JobPrintCommand(char *cmd, Job *job) * but this one needs to be - use compat mode * just for it. */ - Compat_RunCommand(cmd, job->node); + Compat_RunCommand(cmdNode, job->node); return (0); } break; @@ -726,6 +716,16 @@ JobPrintCommand(char *cmd, Job *job) while (isspace((unsigned char)*cmd)) cmd++; + /* + * Ignore empty commands + */ + if (*cmd == '\0') { + return (0); + } + + cmdTemplate = "%s\n"; + numCommands += 1; + if (shutUp) { if (!(job->flags & JOB_SILENT) && !noSpecials && commandShell->hasEchoCtl) { @@ -1670,7 +1670,7 @@ JobStart(GNode *gn, int flags, Job *prev Lst_Succ(gn->compat_command); if (gn->compat_command == NULL || - JobPrintCommand(Lst_Datum(gn->compat_command), job)) + JobPrintCommand(gn->compat_command, job)) noExec = TRUE; if (noExec && !(job->flags & JOB_FIRST)) { @@ -1694,7 +1694,7 @@ JobStart(GNode *gn, int flags, Job *prev */ numCommands = 0; LST_FOREACH(ln, &gn->commands) { - if (JobPrintCommand(Lst_Datum(ln), job)) + if (JobPrintCommand(ln, job)) break; } @@ -1728,7 +1728,7 @@ JobStart(GNode *gn, int flags, Job *prev */ if (cmdsOK) { LST_FOREACH(ln, &gn->commands) { - if (JobPrintCommand(Lst_Datum(ln), job)) + if (JobPrintCommand(ln, job)) break; } } @@ -2814,7 +2814,7 @@ CompatInterrupt(int signo) gn = Targ_FindNode(".INTERRUPT", TARG_NOCREATE); if (gn != NULL) { LST_FOREACH(ln, &gn->commands) { - if (Compat_RunCommand(Lst_Datum(ln), gn)) + if (Compat_RunCommand(ln, gn)) break; } } @@ -2889,16 +2889,15 @@ shellneed(ArgArray *aa, char *cmd) * The node's 'made' field may be set to ERROR. */ static int -Compat_RunCommand(char *cmd, GNode *gn) +Compat_RunCommand(LstNode *cmdNode, GNode *gn) { ArgArray aa; - char *cmdStart; /* Start of expanded command */ + char *cmd; /* Expanded command */ Boolean silent; /* Don't print command */ Boolean doit; /* Execute even in -n */ Boolean errCheck; /* Check errors */ int reason; /* Reason for child's death */ int status; /* Description of child's death */ - LstNode *cmdNode; /* Node where current cmd is located */ char **av; /* Argument vector for thing to exec */ ProcStuff ps; @@ -2906,31 +2905,16 @@ Compat_RunCommand(char *cmd, GNode *gn) errCheck = !(gn->type & OP_IGNORE); doit = FALSE; - cmdNode = Lst_Member(&gn->commands, cmd); - cmdStart = Buf_Peel(Var_Subst(cmd, gn, FALSE)); - - /* - * brk_string will return an argv with a NULL in av[0], thus causing - * execvp() to choke and die horribly. Besides, how can we execute a - * null command? In any case, we warn the user that the command - * expanded to nothing (is this the right thing to do?). - */ - if (*cmdStart == '\0') { - free(cmdStart); - Error("%s expands to empty string", cmd); - return (0); - } else { - cmd = cmdStart; - } - Lst_Replace(cmdNode, cmdStart); - + cmd = Buf_Peel(Var_Subst(Lst_Datum(cmdNode), gn, FALSE)); if ((gn->type & OP_SAVE_CMDS) && (gn != ENDNode)) { - Lst_AtEnd(&ENDNode->commands, cmdStart); + Lst_AtEnd(&ENDNode->commands, cmd); return (0); - } else if (strcmp(cmdStart, "...") == 0) { + } else if (strcmp(cmd, "...") == 0) { + free(cmd); gn->type |= OP_SAVE_CMDS; return (0); } + Lst_Replace(cmdNode, cmd); while (*cmd == '@' || *cmd == '-' || *cmd == '+') { switch (*cmd) { @@ -2954,6 +2938,13 @@ Compat_RunCommand(char *cmd, GNode *gn) cmd++; /* + * Ignore empty commands + */ + if (*cmd == '\0') { + return (0); + } + + /* * Print the command before echoing if we're not supposed to be quiet * for this one. We also print the command if -n given, but not if '+'. */ @@ -3027,7 +3018,8 @@ Compat_RunCommand(char *cmd, GNode *gn) * therefore do not free it when debugging. */ if (!DEBUG(GRAPH2)) { - free(cmdStart); + free(Lst_Datum(cmdNode)); + Lst_Replace(cmdNode, NULL); } /* @@ -3173,8 +3165,7 @@ Compat_Make(GNode *gn, GNode *pgn) if (!touchFlag) { curTarg = gn; LST_FOREACH(ln, &gn->commands) { - if (Compat_RunCommand(Lst_Datum(ln), - gn)) + if (Compat_RunCommand(ln, gn)) break; } curTarg = NULL; @@ -3352,7 +3343,7 @@ Compat_Run(Lst *targs) gn = Targ_FindNode(".BEGIN", TARG_NOCREATE); if (gn != NULL) { LST_FOREACH(ln, &gn->commands) { - if (Compat_RunCommand(Lst_Datum(ln), gn)) + if (Compat_RunCommand(ln, gn)) break; } if (gn->made == ERROR) { @@ -3393,7 +3384,7 @@ Compat_Run(Lst *targs) */ if (makeErrors == 0) { LST_FOREACH(ln, &ENDNode->commands) { - if (Compat_RunCommand(Lst_Datum(ln), ENDNode)) + if (Compat_RunCommand(ln, ENDNode)) break; } } From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 12: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 999167BB; Tue, 23 Oct 2012 12:37:45 +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 822F28FC18; Tue, 23 Oct 2012 12: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 q9NCbjsp063527; Tue, 23 Oct 2012 12:37:45 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NCbjUp063525; Tue, 23 Oct 2012 12:37:45 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210231237.q9NCbjUp063525@svn.freebsd.org> From: John Baldwin Date: Tue, 23 Oct 2012 12:37:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241929 - stable/9/share/mk X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 12:37:45 -0000 Author: jhb Date: Tue Oct 23 12:37:44 2012 New Revision: 241929 URL: http://svn.freebsd.org/changeset/base/241929 Log: Update the make version required to use an empty command for CTFCONVERT_CMD to require the most recent MFC to 9. Modified: stable/9/share/mk/bsd.own.mk Modified: stable/9/share/mk/bsd.own.mk ============================================================================== --- stable/9/share/mk/bsd.own.mk Tue Oct 23 12:37:02 2012 (r241928) +++ stable/9/share/mk/bsd.own.mk Tue Oct 23 12:37:44 2012 (r241929) @@ -642,7 +642,7 @@ MK_${vv:H}:= ${MK_${vv:T}} .if ${MK_CTF} != "no" CTFCONVERT_CMD= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.elif ${MAKE_VERSION} >= 5201111300 +.elif ${MAKE_VERSION} >= 9201210220 CTFCONVERT_CMD= .else CTFCONVERT_CMD= @: From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 12:39: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 A9BD294E; Tue, 23 Oct 2012 12:39:17 +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 9225A8FC16; Tue, 23 Oct 2012 12:39: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 q9NCdHLI063845; Tue, 23 Oct 2012 12:39:17 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NCdHIM063843; Tue, 23 Oct 2012 12:39:17 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210231239.q9NCdHIM063843@svn.freebsd.org> From: John Baldwin Date: Tue, 23 Oct 2012 12:39:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r241930 - stable/8/share/mk X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 12:39:17 -0000 Author: jhb Date: Tue Oct 23 12:39:17 2012 New Revision: 241930 URL: http://svn.freebsd.org/changeset/base/241930 Log: Remove attempt to use an empty CTFCONVERT_CMD and always fall back to using a the null "@:" command if CTF is disabled. Modified: stable/8/share/mk/bsd.own.mk Modified: stable/8/share/mk/bsd.own.mk ============================================================================== --- stable/8/share/mk/bsd.own.mk Tue Oct 23 12:37:44 2012 (r241929) +++ stable/8/share/mk/bsd.own.mk Tue Oct 23 12:39:17 2012 (r241930) @@ -569,8 +569,6 @@ MK_${vv:H}:= ${MK_${vv:T}} .if ${MK_CTF} != "no" CTFCONVERT_CMD= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.elif ${MAKE_VERSION} >= 5201111300 -CTFCONVERT_CMD= .else CTFCONVERT_CMD= @: .endif From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 14:19: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 A84449D; Tue, 23 Oct 2012 14:19:45 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8BE0D8FC08; Tue, 23 Oct 2012 14:19: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 q9NEJjJx082869; Tue, 23 Oct 2012 14:19:45 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NEJjYH082863; Tue, 23 Oct 2012 14:19:45 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201210231419.q9NEJjYH082863@svn.freebsd.org> From: Andre Oppermann Date: Tue, 23 Oct 2012 14:19:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241931 - in head/sys: conf kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 14:19:45 -0000 Author: andre Date: Tue Oct 23 14:19:44 2012 New Revision: 241931 URL: http://svn.freebsd.org/changeset/base/241931 Log: Replace the ill-named ZERO_COPY_SOCKET kernel option with two more appropriate named kernel options for the very distinct send and receive path. "options SOCKET_SEND_COW" enables VM page copy-on-write based sending of data on an outbound socket. NB: The COW based send mechanism is not safe and may result in kernel crashes. "options SOCKET_RECV_PFLIP" enables VM kernel/userspace page flipping for special disposable pages attached as external storage to mbufs. Only the naming of the kernel options is changed and their corresponding #ifdef sections are adjusted. No functionality is added or removed. Discussed with: alc (mechanism and limitations of send side COW) Modified: head/sys/conf/NOTES head/sys/conf/options head/sys/kern/subr_uio.c head/sys/kern/uipc_socket.c Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Tue Oct 23 12:39:17 2012 (r241930) +++ head/sys/conf/NOTES Tue Oct 23 14:19:44 2012 (r241931) @@ -964,12 +964,20 @@ options TCP_SIGNATURE #include support # a smooth scheduling of the traffic. options DUMMYNET -# Zero copy sockets support. This enables "zero copy" for sending and -# receiving data via a socket. The send side works for any type of NIC, -# the receive side only works for NICs that support MTUs greater than the -# page size of your architecture and that support header splitting. See -# zero_copy(9) for more details. -options ZERO_COPY_SOCKETS +# "Zero copy" sockets support is split into the send and receive path +# which operate very differently. +# For the send path the VM page with the data is wired into the kernel +# and marked as COW (copy-on-write). If the application touches the +# data while it is still in the send socket buffer the page is copied +# and divorced from its kernel wiring (no longer zero copy). +# The receive side requires explicit NIC driver support to create +# disposable pages which are flipped from kernel to user-space VM. +# See zero_copy(9) for more details. +# XXX: The COW based send mechanism is not safe and may result in +# kernel crashes. +# XXX: None of the current NIC drivers support disposeable pages. +options SOCKET_SEND_COW +options SOCKET_RECV_PFLIP ##################################################################### # FILESYSTEM OPTIONS Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Tue Oct 23 12:39:17 2012 (r241930) +++ head/sys/conf/options Tue Oct 23 14:19:44 2012 (r241931) @@ -520,7 +520,8 @@ NGATM_CCATM opt_netgraph.h # DRM options DRM_DEBUG opt_drm.h -ZERO_COPY_SOCKETS opt_zero.h +SOCKET_SEND_COW opt_zero.h +SOCKET_RECV_PFLIP opt_zero.h TI_SF_BUF_JUMBO opt_ti.h TI_JUMBO_HDRSPLIT opt_ti.h BCE_JUMBO_HDRSPLIT opt_bce.h Modified: head/sys/kern/subr_uio.c ============================================================================== --- head/sys/kern/subr_uio.c Tue Oct 23 12:39:17 2012 (r241930) +++ head/sys/kern/subr_uio.c Tue Oct 23 14:19:44 2012 (r241931) @@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef ZERO_COPY_SOCKETS +#ifdef SOCKET_SEND_COW #include #endif @@ -66,7 +66,7 @@ SYSCTL_INT(_kern, KERN_IOV_MAX, iov_max, static int uiomove_faultflag(void *cp, int n, struct uio *uio, int nofault); -#ifdef ZERO_COPY_SOCKETS +#ifdef SOCKET_SEND_COW /* Declared in uipc_socket.c */ extern int so_zero_copy_receive; @@ -128,7 +128,7 @@ retry: vm_map_lookup_done(map, entry); return(KERN_SUCCESS); } -#endif /* ZERO_COPY_SOCKETS */ +#endif /* SOCKET_SEND_COW */ int copyin_nofault(const void *udaddr, void *kaddr, size_t len) @@ -261,7 +261,7 @@ uiomove_frombuf(void *buf, int buflen, s return (uiomove((char *)buf + offset, n, uio)); } -#ifdef ZERO_COPY_SOCKETS +#ifdef SOCKET_RECV_PFLIP /* * Experimental support for zero-copy I/O */ @@ -356,7 +356,7 @@ uiomoveco(void *cp, int n, struct uio *u } return (0); } -#endif /* ZERO_COPY_SOCKETS */ +#endif /* SOCKET_RECV_PFLIP */ /* * Give next character to user as result of read. Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Tue Oct 23 12:39:17 2012 (r241930) +++ head/sys/kern/uipc_socket.c Tue Oct 23 14:19:44 2012 (r241931) @@ -219,17 +219,20 @@ static int numopensockets; SYSCTL_INT(_kern_ipc, OID_AUTO, numopensockets, CTLFLAG_RD, &numopensockets, 0, "Number of open sockets"); -#ifdef ZERO_COPY_SOCKETS -/* These aren't static because they're used in other files. */ -int so_zero_copy_send = 1; -int so_zero_copy_receive = 1; +#if defined(SOCKET_SEND_COW) || defined(SOCKET_RECV_PFLIP) SYSCTL_NODE(_kern_ipc, OID_AUTO, zero_copy, CTLFLAG_RD, 0, "Zero copy controls"); +#ifdef SOCKET_RECV_PFLIP +int so_zero_copy_receive = 1; SYSCTL_INT(_kern_ipc_zero_copy, OID_AUTO, receive, CTLFLAG_RW, &so_zero_copy_receive, 0, "Enable zero copy receive"); +#endif +#ifdef SOCKET_SEND_COW +int so_zero_copy_send = 1; SYSCTL_INT(_kern_ipc_zero_copy, OID_AUTO, send, CTLFLAG_RW, &so_zero_copy_send, 0, "Enable zero copy send"); -#endif /* ZERO_COPY_SOCKETS */ +#endif /* SOCKET_SEND_COW */ +#endif /* SOCKET_SEND_COW || SOCKET_RECV_PFLIP */ /* * accept_mtx locks down per-socket fields relating to accept queues. See @@ -903,7 +906,7 @@ sodisconnect(struct socket *so) return (error); } -#ifdef ZERO_COPY_SOCKETS +#ifdef SOCKET_SEND_COW struct so_zerocopy_stats{ int size_ok; int align_ok; @@ -1008,7 +1011,7 @@ out: *retmp = top; return (error); } -#endif /* ZERO_COPY_SOCKETS */ +#endif /* SOCKET_SEND_COW */ #define SBLOCKWAIT(f) (((f) & MSG_DONTWAIT) ? 0 : SBL_WAIT) @@ -1019,7 +1022,7 @@ sosend_dgram(struct socket *so, struct s long space; ssize_t resid; int clen = 0, error, dontroute; -#ifdef ZERO_COPY_SOCKETS +#ifdef SOCKET_SEND_COW int atomic = sosendallatonce(so) || top; #endif @@ -1104,7 +1107,7 @@ sosend_dgram(struct socket *so, struct s if (flags & MSG_EOR) top->m_flags |= M_EOR; } else { -#ifdef ZERO_COPY_SOCKETS +#ifdef SOCKET_SEND_COW error = sosend_copyin(uio, &top, atomic, &space, flags); if (error) goto out; @@ -1121,7 +1124,7 @@ sosend_dgram(struct socket *so, struct s goto out; } space -= resid - uio->uio_resid; -#endif +#endif /* SOCKET_SEND_COW */ resid = uio->uio_resid; } KASSERT(resid == 0, ("sosend_dgram: resid != 0")); @@ -1293,7 +1296,7 @@ restart: if (flags & MSG_EOR) top->m_flags |= M_EOR; } else { -#ifdef ZERO_COPY_SOCKETS +#ifdef SOCKET_SEND_COW error = sosend_copyin(uio, &top, atomic, &space, flags); if (error != 0) @@ -1313,7 +1316,7 @@ restart: goto release; } space -= resid - uio->uio_resid; -#endif +#endif /* SOCKET_SEND_COW */ resid = uio->uio_resid; } if (dontroute) { @@ -1405,7 +1408,7 @@ soreceive_rcvoob(struct socket *so, stru if (error) goto bad; do { -#ifdef ZERO_COPY_SOCKETS +#ifdef SOCKET_RECV_PFLIP if (so_zero_copy_receive) { int disposable; @@ -1419,7 +1422,7 @@ soreceive_rcvoob(struct socket *so, stru min(uio->uio_resid, m->m_len), uio, disposable); } else -#endif /* ZERO_COPY_SOCKETS */ +#endif /* SOCKET_RECV_PFLIP */ error = uiomove(mtod(m, void *), (int) min(uio->uio_resid, m->m_len), uio); m = m_free(m); @@ -1743,7 +1746,7 @@ dontblock: SBLASTRECORDCHK(&so->so_rcv); SBLASTMBUFCHK(&so->so_rcv); SOCKBUF_UNLOCK(&so->so_rcv); -#ifdef ZERO_COPY_SOCKETS +#ifdef SOCKET_RECV_PFLIP if (so_zero_copy_receive) { int disposable; @@ -1757,7 +1760,7 @@ dontblock: (int)len, uio, disposable); } else -#endif /* ZERO_COPY_SOCKETS */ +#endif /* SOCKET_RECV_PFLIP */ error = uiomove(mtod(m, char *) + moff, (int)len, uio); SOCKBUF_LOCK(&so->so_rcv); if (error) { From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 14:25: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 E06F4304; Tue, 23 Oct 2012 14:25:37 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C6DA78FC18; Tue, 23 Oct 2012 14:25: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 q9NEPblo084081; Tue, 23 Oct 2012 14:25:37 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NEPbMi084079; Tue, 23 Oct 2012 14:25:37 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201210231425.q9NEPbMi084079@svn.freebsd.org> From: Andre Oppermann Date: Tue, 23 Oct 2012 14:25:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241932 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 14:25:38 -0000 Author: andre Date: Tue Oct 23 14:25:37 2012 New Revision: 241932 URL: http://svn.freebsd.org/changeset/base/241932 Log: Update zero_copy(9) man page to note the renamed kernel options and to warn about unsafeness of COW based sends. Modified: head/share/man/man9/zero_copy.9 Modified: head/share/man/man9/zero_copy.9 ============================================================================== --- head/share/man/man9/zero_copy.9 Tue Oct 23 14:19:44 2012 (r241931) +++ head/share/man/man9/zero_copy.9 Tue Oct 23 14:25:37 2012 (r241932) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 5, 2004 +.Dd October 23, 2012 .Dt ZERO_COPY 9 .Os .Sh NAME @@ -33,7 +33,8 @@ .Nm zero_copy_sockets .Nd "zero copy sockets code" .Sh SYNOPSIS -.Cd "options ZERO_COPY_SOCKETS" +.Cd "options SOCKET_SEND_COW" +.Cd "options SOCKET_RECV_PFLIP" .Sh DESCRIPTION The .Fx @@ -155,6 +156,8 @@ variables respectively. .Xr sendfile 2 , .Xr socket 2 , .Xr ti 4 +.Sh BUGS +The COW based send mechanism is not safe and may result in kernel crashes. .Sh HISTORY The zero copy sockets code first appeared in .Fx 5.0 , From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 14:42: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 EC13BD5F; Tue, 23 Oct 2012 14:42:12 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 63B738FC08; Tue, 23 Oct 2012 14:42:12 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q9NEgB5K086152; Tue, 23 Oct 2012 18:42:11 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q9NEgBFX086151; Tue, 23 Oct 2012 18:42:11 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 23 Oct 2012 18:42:11 +0400 From: Gleb Smirnoff To: Andre Oppermann Subject: Re: svn commit: r241931 - in head/sys: conf kern Message-ID: <20121023144211.GX70741@FreeBSD.org> References: <201210231419.q9NEJjYH082863@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201210231419.q9NEJjYH082863@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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 14:42:13 -0000 On Tue, Oct 23, 2012 at 02:19:45PM +0000, Andre Oppermann wrote: A> Author: andre A> Date: Tue Oct 23 14:19:44 2012 A> New Revision: 241931 A> URL: http://svn.freebsd.org/changeset/base/241931 A> A> Log: A> Replace the ill-named ZERO_COPY_SOCKET kernel option with two A> more appropriate named kernel options for the very distinct A> send and receive path. A> A> "options SOCKET_SEND_COW" enables VM page copy-on-write based A> sending of data on an outbound socket. A> A> NB: The COW based send mechanism is not safe and may result A> in kernel crashes. A> A> "options SOCKET_RECV_PFLIP" enables VM kernel/userspace page A> flipping for special disposable pages attached as external A> storage to mbufs. A> A> Only the naming of the kernel options is changed and their A> corresponding #ifdef sections are adjusted. No functionality A> is added or removed. A> A> Discussed with: alc (mechanism and limitations of send side COW) Users may call this a pointless POLA violation. IMO, the old kernel option that we had for years, more than a decade, should remain and just imply two new kernel options. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 14:58: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 C2294E1; Tue, 23 Oct 2012 14:58:25 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 994F08FC0A; Tue, 23 Oct 2012 14:58: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 q9NEwPwF090444; Tue, 23 Oct 2012 14:58:25 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NEwPRd090442; Tue, 23 Oct 2012 14:58:25 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201210231458.q9NEwPRd090442@svn.freebsd.org> From: Warner Losh Date: Tue, 23 Oct 2012 14:58:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241933 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 14:58:26 -0000 Author: imp Date: Tue Oct 23 14:58:24 2012 New Revision: 241933 URL: http://svn.freebsd.org/changeset/base/241933 Log: Start a clean-room implementation of files.mips. This is sufficient for SWARM64 and SWARM64_SMP to compile. Other kernels will be layered in. Modified: head/sys/conf/files.mips Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Tue Oct 23 14:25:37 2012 (r241932) +++ head/sys/conf/files.mips Tue Oct 23 14:58:24 2012 (r241933) @@ -1,130 +1,77 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# Copyright (c) 2001, 2004-2005, Juniper Networks, Inc. -# All rights reserved. -# JNPR: files.mips,v 1.11 2007/08/09 12:25:35 katta -# -# ---------------------------------------------------------------------- -# Phase 2 -# ---------------------------------------------------------------------- -# This file tells config what files go into building a kernel, -# files marked standard are always included. -# -# Copyright (c) 2001, 2004-2005, Juniper Networks, Inc. -# All rights reserved. -# JNPR: files.mips,v 1.11 2007/08/09 12:25:35 katta # $FreeBSD$ # -# ---------------------------------------------------------------------- -# Phase 2 -# ---------------------------------------------------------------------- -mips/mips/machdep.c standard -mips/mips/mp_machdep.c optional smp -mips/mips/mpboot.S optional smp -# ---------------------------------------------------------------------- -# Phase 3 -# ---------------------------------------------------------------------- -mips/mips/autoconf.c standard -mips/mips/cpu.c standard -mips/mips/elf_machdep.c standard -mips/mips/exception.S standard -mips/mips/gdb_machdep.c standard -mips/mips/pmap.c standard -mips/mips/trap.c standard -mips/mips/vm_machdep.c standard -# ---------------------------------------------------------------------- -# Phase 4 -# ---------------------------------------------------------------------- -# ---------------------------------------------------------------------- -# Phase 5 -# ---------------------------------------------------------------------- -mips/mips/fp.S standard -mips/mips/pm_machdep.c standard -mips/mips/swtch.S standard -mips/mips/tlb.c standard - -mips/mips/bus_space_generic.c standard -mips/mips/busdma_machdep.c standard -mips/mips/cache.c standard -mips/mips/cache_mipsNN.c standard -mips/mips/db_disasm.c optional ddb -mips/mips/db_interface.c optional ddb -mips/mips/db_trace.c optional ddb -mips/mips/dump_machdep.c standard -mips/mips/in_cksum.c optional inet | inet6 -mips/mips/locore.S standard no-obj -mips/mips/minidump_machdep.c standard -mips/mips/mem.c optional mem -mips/mips/libkern_machdep.c standard -mips/mips/nexus.c standard -mips/mips/stack_machdep.c optional ddb | stack -mips/mips/support.S standard -mips/mips/sys_machdep.c standard -mips/mips/swtch.S standard -mips/mips/uio_machdep.c standard -mips/mips/uma_machdep.c standard -crypto/blowfish/bf_enc.c optional crypto | ipsec -crypto/des/des_enc.c optional crypto | ipsec -geom/geom_bsd.c optional geom_bsd -geom/geom_bsd_enc.c optional geom_bsd -geom/geom_mbr.c optional geom_mbr -geom/geom_mbr_enc.c optional geom_mbr -libkern/ashldi3.c standard -libkern/ashrdi3.c standard -libkern/cmpdi2.c standard -libkern/ffsl.c standard -libkern/fls.c standard -libkern/flsl.c standard -libkern/lshrdi3.c standard -libkern/memchr.c optional fdt -libkern/memmove.c standard -libkern/ucmpdi2.c standard - -#XXX: We can't use these versions, as strcmp.c is included conf/files -#libkern/mips/strcmp.S standard -#libkern/mips/strncmp.S standard -cddl/compat/opensolaris/kern/opensolaris_atomic.c optional zfs compile-with "${ZFS_C}" +# Arch dependent files +mips/mips/autoconf.c standard +mips/mips/bus_space_generic.c standard +mips/mips/busdma_machdep.c standard +mips/mips/cache.c standard +mips/mips/cache_mipsNN.c standard +mips/mips/cpu.c standard +mips/mips/db_disasm.c optional ddb +mips/mips/db_interface.c optional ddb +mips/mips/db_trace.c optional ddb +mips/mips/dump_machdep.c standard +mips/mips/elf_machdep.c standard +mips/mips/exception.S standard +mips/mips/fp.S standard +mips/mips/gdb_machdep.c standard +mips/mips/in_cksum.c optional inet +mips/mips/intr_machdep.c standard +mips/mips/libkern_machdep.c standard +mips/mips/locore.S standard no-obj +mips/mips/machdep.c standard +mips/mips/mem.c optional mem +mips/mips/minidump_machdep.c standard +mips/mips/mp_machdep.c optional smp +mips/mips/mpboot.S optional smp +mips/mips/nexus.c standard +mips/mips/pm_machdep.c standard +mips/mips/pmap.c standard +mips/mips/ptrace_machdep.c standard +mips/mips/sc_machdep.c standard +mips/mips/stack_machdep.c standard +mips/mips/support.S standard +mips/mips/swtch.S standard +mips/mips/sys_machdep.c standard +mips/mips/tick.c standard +mips/mips/tlb.c standard +mips/mips/trap.c standard +mips/mips/uio_machdep.c standard +mips/mips/uma_machdep.c standard +mips/mips/vm_machdep.c standard + +# misc opt-in bits +kern/kern_clocksource.c standard +kern/link_elf_obj.c standard +kern/subr_dummy_vdso_tc.c standard + +# Common geom we need to support: MBR and BSD +geom/geom_bsd.c standard +geom/geom_bsd_enc.c standard +geom/geom_mbr.c standard +geom/geom_mbr_enc.c standard + +# gcc/clang runtime +libkern/ashldi3.c standard +libkern/ashrdi3.c standard +libkern/ffsl.c standard +libkern/fls.c standard +libkern/flsl.c standard +libkern/lshrdi3.c standard +libkern/memmove.c standard + +# Compat32 stuff compat/freebsd32/freebsd32_ioctl.c optional compat_freebsd32 compat/freebsd32/freebsd32_misc.c optional compat_freebsd32 compat/freebsd32/freebsd32_syscalls.c optional compat_freebsd32 compat/freebsd32/freebsd32_sysent.c optional compat_freebsd32 kern/imgact_elf32.c optional compat_freebsd32 -kern/subr_dummy_vdso_tc.c standard mips/mips/freebsd32_machdep.c optional compat_freebsd32 -kern/kern_clocksource.c standard -kern/link_elf_obj.c standard - -dev/cfe/cfe_api.c optional cfe -dev/cfe/cfe_console.c optional cfe_console -dev/cfe/cfe_env.c optional cfe_env -#dev/cfe/cfe_resource.c optional cfe # not yet needed - -dev/siba/siba.c optional siba -dev/siba/siba_cc.c optional siba -dev/siba/siba_core.c optional siba -dev/siba/siba_pcib.c optional siba pci -#mips/sentry5/siba_mips.c optional siba # not yet - -dev/hwpmc/hwpmc_mips.c optional hwpmc - -dev/rt/if_rt.c optional rt -dev/nvram2env/nvram2env.c optional nvram2env - -dev/ofw/openfirm.c optional fdt -dev/ofw/openfirmio.c optional fdt -dev/ofw/ofw_bus_if.m optional fdt -dev/ofw/ofw_if.m optional fdt -dev/ofw/ofw_bus_subr.c optional fdt -dev/ofw/ofw_fdt.c optional fdt - -dev/fdt/fdt_mips.c optional fdt - -dev/fb/fb.c optional sc -dev/kbd/kbd.c optional sc -dev/syscons/scgfbrndr.c optional sc -dev/syscons/scterm-teken.c optional sc -dev/syscons/scvtb.c optional sc -mips/mips/sc_machdep.c optional sc +dev/cfe/cfe_api.c optional cfe +dev/cfe/cfe_console.c optional cfe_console +dev/cfe/cfe_env.c optional cfe_env From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 15:03: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 34AB2301; Tue, 23 Oct 2012 15:03: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 19E768FC19; Tue, 23 Oct 2012 15:03: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 q9NF3PY6091552; Tue, 23 Oct 2012 15:03:25 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NF3PJr091550; Tue, 23 Oct 2012 15:03:25 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210231503.q9NF3PJr091550@svn.freebsd.org> From: Eitan Adler Date: Tue, 23 Oct 2012 15:03:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241934 - head/games/fortune/datfiles X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 15:03:26 -0000 Author: eadler Date: Tue Oct 23 15:03:25 2012 New Revision: 241934 URL: http://svn.freebsd.org/changeset/base/241934 Log: Remove extra word: Submitted by: many Approved by: cperciva (implicit) MFC after: 3 days Modified: head/games/fortune/datfiles/freebsd-tips Modified: head/games/fortune/datfiles/freebsd-tips ============================================================================== --- head/games/fortune/datfiles/freebsd-tips Tue Oct 23 14:58:24 2012 (r241933) +++ head/games/fortune/datfiles/freebsd-tips Tue Oct 23 15:03:25 2012 (r241934) @@ -40,7 +40,7 @@ Having trouble using fetch through a fir variable FTP_PASSIVE_MODE to yes, and see fetch(3) for more details. % If other operating systems have damaged your Master Boot Record, you can -reinstall it either with boot0cfg(8). See +reinstall it with boot0cfg(8). See "man boot0cfg" for details. % If you accidentally end up inside vi, you can quit it by pressing Escape, colon From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 15:05: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 B4D5E674 for ; Tue, 23 Oct 2012 15:05:59 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 15C9C8FC1C for ; Tue, 23 Oct 2012 15:05:58 +0000 (UTC) Received: (qmail 86105 invoked from network); 23 Oct 2012 16:43:58 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 23 Oct 2012 16:43:58 -0000 Message-ID: <5086B24C.9000606@freebsd.org> Date: Tue, 23 Oct 2012 17:05:48 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r241931 - in head/sys: conf kern References: <201210231419.q9NEJjYH082863@svn.freebsd.org> <20121023144211.GX70741@FreeBSD.org> In-Reply-To: <20121023144211.GX70741@FreeBSD.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 15:05:59 -0000 On 23.10.2012 16:42, Gleb Smirnoff wrote: > On Tue, Oct 23, 2012 at 02:19:45PM +0000, Andre Oppermann wrote: > A> Author: andre > A> Date: Tue Oct 23 14:19:44 2012 > A> New Revision: 241931 > A> URL: http://svn.freebsd.org/changeset/base/241931 > A> > A> Log: > A> Replace the ill-named ZERO_COPY_SOCKET kernel option with two > A> more appropriate named kernel options for the very distinct > A> send and receive path. > A> > A> "options SOCKET_SEND_COW" enables VM page copy-on-write based > A> sending of data on an outbound socket. > A> > A> NB: The COW based send mechanism is not safe and may result > A> in kernel crashes. > A> > A> "options SOCKET_RECV_PFLIP" enables VM kernel/userspace page > A> flipping for special disposable pages attached as external > A> storage to mbufs. > A> > A> Only the naming of the kernel options is changed and their > A> corresponding #ifdef sections are adjusted. No functionality > A> is added or removed. > A> > A> Discussed with: alc (mechanism and limitations of send side COW) > > Users may call this a pointless POLA violation. IMO, the old > kernel option that we had for years, more than a decade, should remain > and just imply two new kernel options. There shouldn't be any users. Zero copy send is broken and responsible for random kernel crashes. Zero copy receive isn't supported by any modern driver. Both are useless to dangerous. The main problem with ZERO_COPY_SOCKETS was that it sounded great and who wouldn't want to have zero copy sockets? Unfortunately it doesn't work that way. According to alc@ even if zero copy send would work it wouldn't be faster due to page based COW setup being a very expensive operation. Eventually he want's page-based COW to go away. For zero copy send we're trying to come up with a sendfile-like approach where the page is simply wired into kernel space. The application then is not allowed to touch it until the socket buffer has released it again. The main issue here is how to provide feedback to the application when it is safe for reuse. For zero copy receive I've been contacted by np@ to find a way to combine DDP into the socket buffer layer. Trying to work something out that isn't too horrible. A generic approach would hinge on page sized mbufs though. -- Andre From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 15:12: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 BC2518FE; Tue, 23 Oct 2012 15:12:36 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) by mx1.freebsd.org (Postfix) with ESMTP id 82E648FC08; Tue, 23 Oct 2012 15:12:35 +0000 (UTC) Received: from [192.168.0.2] (cpc2-cmbg15-2-0-cust445.5-4.cable.virginmedia.com [86.26.13.190]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id q9NFBM6h095459 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Tue, 23 Oct 2012 15:11:23 GMT (envelope-from theraven@FreeBSD.org) Subject: Re: svn commit: r241931 - in head/sys: conf kern Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=koi8-r From: David Chisnall In-Reply-To: <5086B24C.9000606@freebsd.org> Date: Tue, 23 Oct 2012 16:11:16 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201210231419.q9NEJjYH082863@svn.freebsd.org> <20121023144211.GX70741@FreeBSD.org> <5086B24C.9000606@freebsd.org> To: Andre Oppermann X-Mailer: Apple Mail (2.1278) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Gleb Smirnoff , src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 15:12:36 -0000 On 23 Oct 2012, at 16:05, Andre Oppermann wrote: > For zero copy send we're trying to come up with a sendfile-like > approach where the page is simply wired into kernel space. The > application then is not allowed to touch it until the socket > buffer has released it again. The main issue here is how to > provide feedback to the application when it is safe for reuse. It's been a few years since I used it, but I thought that aio_write() = already provided this. The application may not modify the contents of = the memory pointed to by aio_buf until after it has received = notification that the write has finished. This happens either via a = signal directly, a signal polled by kqueue, or a call to aio_return(). David= From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 15:15: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 3CFF2AC8; Tue, 23 Oct 2012 15:15: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 244668FC19; Tue, 23 Oct 2012 15:15: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 q9NFFGbF093982; Tue, 23 Oct 2012 15:15:17 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NFFG5S093980; Tue, 23 Oct 2012 15:15:16 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210231515.q9NFFG5S093980@svn.freebsd.org> From: Alexander Motin Date: Tue, 23 Oct 2012 15:15:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241935 - stable/9/sys/cam X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 15:15:17 -0000 Author: mav Date: Tue Oct 23 15:15:16 2012 New Revision: 241935 URL: http://svn.freebsd.org/changeset/base/241935 Log: MFC r241028: Change queue overflow checks from DIAGNOSTIC+panic() to KASSERT() to make them enabled on HEAD by default. It is probably better to do single compare then hunt for unexpected memory corruption. Modified: stable/9/sys/cam/cam_queue.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/cam_queue.c ============================================================================== --- stable/9/sys/cam/cam_queue.c Tue Oct 23 15:03:25 2012 (r241934) +++ stable/9/sys/cam/cam_queue.c Tue Oct 23 15:15:16 2012 (r241935) @@ -121,11 +121,9 @@ camq_resize(struct camq *queue, int new_ { cam_pinfo **new_array; -#ifdef DIAGNOSTIC - if (new_size < queue->entries) - panic("camq_resize: New queue size can't accomodate " - "queued entries."); -#endif + KASSERT(new_size >= queue->entries, ("camq_resize: " + "New queue size can't accomodate queued entries (%d < %d).", + new_size, queue->entries)); new_array = (cam_pinfo **)malloc(new_size * sizeof(cam_pinfo *), M_CAMQ, M_NOWAIT); if (new_array == NULL) { @@ -156,10 +154,10 @@ camq_resize(struct camq *queue, int new_ void camq_insert(struct camq *queue, cam_pinfo *new_entry) { -#ifdef DIAGNOSTIC - if (queue->entries >= queue->array_size) - panic("camq_insert: Attempt to insert into a full queue"); -#endif + + KASSERT(queue->entries < queue->array_size, + ("camq_insert: Attempt to insert into a full queue (%d >= %d)", + queue->entries, queue->array_size)); queue->entries++; queue->queue_array[queue->entries] = new_entry; new_entry->index = queue->entries; From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 15:16: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 98346C4C; Tue, 23 Oct 2012 15:16:41 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 80FBD8FC0C; Tue, 23 Oct 2012 15:16: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 q9NFGfRC094324; Tue, 23 Oct 2012 15:16:41 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NFGfWx094322; Tue, 23 Oct 2012 15:16:41 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201210231516.q9NFGfWx094322@svn.freebsd.org> From: Warner Losh Date: Tue, 23 Oct 2012 15:16:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241936 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 15:16:41 -0000 Author: imp Date: Tue Oct 23 15:16:40 2012 New Revision: 241936 URL: http://svn.freebsd.org/changeset/base/241936 Log: Add support for syscons (we should consider moving most of this into files, another day). Modified: head/sys/conf/files.mips Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Tue Oct 23 15:15:16 2012 (r241935) +++ head/sys/conf/files.mips Tue Oct 23 15:16:40 2012 (r241936) @@ -72,6 +72,15 @@ compat/freebsd32/freebsd32_sysent.c opti kern/imgact_elf32.c optional compat_freebsd32 mips/mips/freebsd32_machdep.c optional compat_freebsd32 +# cfe support dev/cfe/cfe_api.c optional cfe dev/cfe/cfe_console.c optional cfe_console dev/cfe/cfe_env.c optional cfe_env + +# syscons support +dev/fb/fb.c optional sc +dev/kbd/kbd.c optional sc +dev/syscons/scgfbrndr.c optional sc +dev/syscons/scterm-teken.c optional sc +dev/syscons/scvtb.c optional sc +mips/mips/sc_machdep.c optional sc From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 15:16: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 4A000D66; Tue, 23 Oct 2012 15:16:51 +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 30FBE8FC0C; Tue, 23 Oct 2012 15:16: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 q9NFGpXr094404; Tue, 23 Oct 2012 15:16:51 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NFGoub094392; Tue, 23 Oct 2012 15:16:50 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210231516.q9NFGoub094392@svn.freebsd.org> From: Alexander Motin Date: Tue, 23 Oct 2012 15:16:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241937 - in stable/9/sys/cam: ata scsi X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 15:16:51 -0000 Author: mav Date: Tue Oct 23 15:16:50 2012 New Revision: 241937 URL: http://svn.freebsd.org/changeset/base/241937 Log: MFC r241404: Remove 'periph == NULL' check from bunch of periph drivers. This condition can never be true as functions are called from single place and the checks just pollute the code and confuse Clang Static Analyzer. Modified: stable/9/sys/cam/ata/ata_da.c stable/9/sys/cam/ata/ata_pmp.c stable/9/sys/cam/ata/ata_xpt.c stable/9/sys/cam/scsi/scsi_cd.c stable/9/sys/cam/scsi/scsi_ch.c stable/9/sys/cam/scsi/scsi_da.c stable/9/sys/cam/scsi/scsi_pass.c stable/9/sys/cam/scsi/scsi_sa.c stable/9/sys/cam/scsi/scsi_sg.c stable/9/sys/cam/scsi/scsi_xpt.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ata/ata_da.c ============================================================================== --- stable/9/sys/cam/ata/ata_da.c Tue Oct 23 15:16:40 2012 (r241936) +++ stable/9/sys/cam/ata/ata_da.c Tue Oct 23 15:16:50 2012 (r241937) @@ -943,11 +943,6 @@ adaregister(struct cam_periph *periph, v int legacy_id, quirks; cgd = (struct ccb_getdev *)arg; - if (periph == NULL) { - printf("adaregister: periph was NULL!!\n"); - return(CAM_REQ_CMP_ERR); - } - if (cgd == NULL) { printf("adaregister: no getdev CCB, can't register device\n"); return(CAM_REQ_CMP_ERR); Modified: stable/9/sys/cam/ata/ata_pmp.c ============================================================================== --- stable/9/sys/cam/ata/ata_pmp.c Tue Oct 23 15:16:40 2012 (r241936) +++ stable/9/sys/cam/ata/ata_pmp.c Tue Oct 23 15:16:50 2012 (r241937) @@ -367,11 +367,6 @@ pmpregister(struct cam_periph *periph, v struct ccb_getdev *cgd; cgd = (struct ccb_getdev *)arg; - if (periph == NULL) { - printf("pmpregister: periph was NULL!!\n"); - return(CAM_REQ_CMP_ERR); - } - if (cgd == NULL) { printf("pmpregister: no getdev CCB, can't register device\n"); return(CAM_REQ_CMP_ERR); Modified: stable/9/sys/cam/ata/ata_xpt.c ============================================================================== --- stable/9/sys/cam/ata/ata_xpt.c Tue Oct 23 15:16:40 2012 (r241936) +++ stable/9/sys/cam/ata/ata_xpt.c Tue Oct 23 15:16:50 2012 (r241937) @@ -224,11 +224,6 @@ proberegister(struct cam_periph *periph, probe_softc *softc; request_ccb = (union ccb *)arg; - if (periph == NULL) { - printf("proberegister: periph was NULL!!\n"); - return(CAM_REQ_CMP_ERR); - } - if (request_ccb == NULL) { printf("proberegister: no probe CCB, " "can't register device\n"); Modified: stable/9/sys/cam/scsi/scsi_cd.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_cd.c Tue Oct 23 15:16:40 2012 (r241936) +++ stable/9/sys/cam/scsi/scsi_cd.c Tue Oct 23 15:16:50 2012 (r241937) @@ -641,10 +641,6 @@ cdregister(struct cam_periph *periph, vo caddr_t match; cgd = (struct ccb_getdev *)arg; - if (periph == NULL) { - printf("cdregister: periph was NULL!!\n"); - return(CAM_REQ_CMP_ERR); - } if (cgd == NULL) { printf("cdregister: no getdev CCB, can't register device\n"); return(CAM_REQ_CMP_ERR); Modified: stable/9/sys/cam/scsi/scsi_ch.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_ch.c Tue Oct 23 15:16:40 2012 (r241936) +++ stable/9/sys/cam/scsi/scsi_ch.c Tue Oct 23 15:16:50 2012 (r241937) @@ -324,11 +324,6 @@ chregister(struct cam_periph *periph, vo struct ccb_pathinq cpi; cgd = (struct ccb_getdev *)arg; - if (periph == NULL) { - printf("chregister: periph was NULL!!\n"); - return(CAM_REQ_CMP_ERR); - } - if (cgd == NULL) { printf("chregister: no getdev CCB, can't register device\n"); return(CAM_REQ_CMP_ERR); Modified: stable/9/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.c Tue Oct 23 15:16:40 2012 (r241936) +++ stable/9/sys/cam/scsi/scsi_da.c Tue Oct 23 15:16:50 2012 (r241937) @@ -1550,11 +1550,6 @@ daregister(struct cam_periph *periph, vo caddr_t match; cgd = (struct ccb_getdev *)arg; - if (periph == NULL) { - printf("daregister: periph was NULL!!\n"); - return(CAM_REQ_CMP_ERR); - } - if (cgd == NULL) { printf("daregister: no getdev CCB, can't register device\n"); return(CAM_REQ_CMP_ERR); Modified: stable/9/sys/cam/scsi/scsi_pass.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_pass.c Tue Oct 23 15:16:40 2012 (r241936) +++ stable/9/sys/cam/scsi/scsi_pass.c Tue Oct 23 15:16:50 2012 (r241937) @@ -312,11 +312,6 @@ passregister(struct cam_periph *periph, int no_tags; cgd = (struct ccb_getdev *)arg; - if (periph == NULL) { - printf("%s: periph was NULL!!\n", __func__); - return(CAM_REQ_CMP_ERR); - } - if (cgd == NULL) { printf("%s: no getdev CCB, can't register device\n", __func__); return(CAM_REQ_CMP_ERR); Modified: stable/9/sys/cam/scsi/scsi_sa.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_sa.c Tue Oct 23 15:16:40 2012 (r241936) +++ stable/9/sys/cam/scsi/scsi_sa.c Tue Oct 23 15:16:50 2012 (r241937) @@ -1445,11 +1445,6 @@ saregister(struct cam_periph *periph, vo int i; cgd = (struct ccb_getdev *)arg; - if (periph == NULL) { - printf("saregister: periph was NULL!!\n"); - return (CAM_REQ_CMP_ERR); - } - if (cgd == NULL) { printf("saregister: no getdev CCB, can't register device\n"); return (CAM_REQ_CMP_ERR); Modified: stable/9/sys/cam/scsi/scsi_sg.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_sg.c Tue Oct 23 15:16:40 2012 (r241936) +++ stable/9/sys/cam/scsi/scsi_sg.c Tue Oct 23 15:16:50 2012 (r241937) @@ -261,11 +261,6 @@ sgregister(struct cam_periph *periph, vo int no_tags; cgd = (struct ccb_getdev *)arg; - if (periph == NULL) { - printf("sgregister: periph was NULL!!\n"); - return (CAM_REQ_CMP_ERR); - } - if (cgd == NULL) { printf("sgregister: no getdev CCB, can't register device\n"); return (CAM_REQ_CMP_ERR); Modified: stable/9/sys/cam/scsi/scsi_xpt.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_xpt.c Tue Oct 23 15:16:40 2012 (r241936) +++ stable/9/sys/cam/scsi/scsi_xpt.c Tue Oct 23 15:16:50 2012 (r241937) @@ -615,11 +615,6 @@ proberegister(struct cam_periph *periph, probe_softc *softc; request_ccb = (union ccb *)arg; - if (periph == NULL) { - printf("proberegister: periph was NULL!!\n"); - return(CAM_REQ_CMP_ERR); - } - if (request_ccb == NULL) { printf("proberegister: no probe CCB, " "can't register device\n"); From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 15:18: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 AF158F37; Tue, 23 Oct 2012 15:18:16 +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 969148FC08; Tue, 23 Oct 2012 15:18: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 q9NFIGhM094781; Tue, 23 Oct 2012 15:18:16 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NFIGjG094779; Tue, 23 Oct 2012 15:18:16 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210231518.q9NFIGjG094779@svn.freebsd.org> From: Alexander Motin Date: Tue, 23 Oct 2012 15:18:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241938 - stable/9/sys/cam X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 15:18:16 -0000 Author: mav Date: Tue Oct 23 15:18:16 2012 New Revision: 241938 URL: http://svn.freebsd.org/changeset/base/241938 Log: MFC r241405: Really handle xpt_compile_path() error in xpt_bus_register() instead of print error message and probably crash just after it on NULL dereference. Modified: stable/9/sys/cam/cam_xpt.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/cam_xpt.c ============================================================================== --- stable/9/sys/cam/cam_xpt.c Tue Oct 23 15:16:50 2012 (r241937) +++ stable/9/sys/cam/cam_xpt.c Tue Oct 23 15:18:16 2012 (r241938) @@ -3898,8 +3898,11 @@ xpt_bus_register(struct cam_sim *sim, de status = xpt_compile_path(path, /*periph*/NULL, sim->path_id, CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD); - if (status != CAM_REQ_CMP) - printf("xpt_compile_path returned %d\n", status); + if (status != CAM_REQ_CMP) { + xpt_release_bus(new_bus); + free(path, M_CAMXPT); + return (CAM_RESRC_UNAVAIL); + } xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NORMAL); cpi.ccb_h.func_code = XPT_PATH_INQ; From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 15:21: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 1E69C1DF; Tue, 23 Oct 2012 15:21:00 +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 0675D8FC17; Tue, 23 Oct 2012 15:21: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 q9NFKxrH095420; Tue, 23 Oct 2012 15:20:59 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NFKx7N095418; Tue, 23 Oct 2012 15:20:59 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210231520.q9NFKx7N095418@svn.freebsd.org> From: Alexander Motin Date: Tue, 23 Oct 2012 15:20:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241939 - stable/9/sys/cam/scsi X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 15:21:00 -0000 Author: mav Date: Tue Oct 23 15:20:59 2012 New Revision: 241939 URL: http://svn.freebsd.org/changeset/base/241939 Log: MFC r241410: There are SCSI conditions that are not an errors. In those cases cderror() returns zero while request status is not CAM_REQ_CMP. That could cause partial device attach or other unexpected results. Modified: stable/9/sys/cam/scsi/scsi_cd.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_cd.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_cd.c Tue Oct 23 15:18:16 2012 (r241938) +++ stable/9/sys/cam/scsi/scsi_cd.c Tue Oct 23 15:20:59 2012 (r241939) @@ -1661,6 +1661,7 @@ cddone(struct cam_periph *periph, union * bytes. */ struct cd_params *cdp; + int error; cdp = &softc->params; @@ -1669,28 +1670,26 @@ cddone(struct cam_periph *periph, union cdp->disksize = scsi_4btoul (rdcap->addr) + 1; cdp->blksize = scsi_4btoul (rdcap->length); - if ((csio->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) { + /* + * Retry any UNIT ATTENTION type errors. They + * are expected at boot. + */ + if ((csio->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP || + (error = cderror(done_ccb, CAM_RETRY_SELTO, + SF_RETRY_UA | SF_NO_PRINT)) == 0) { snprintf(announce_buf, sizeof(announce_buf), "cd present [%lu x %lu byte records]", cdp->disksize, (u_long)cdp->blksize); } else { - int error; - /* - * Retry any UNIT ATTENTION type errors. They - * are expected at boot. - */ - error = cderror(done_ccb, CAM_RETRY_SELTO, - SF_RETRY_UA | SF_NO_PRINT); if (error == ERESTART) { /* * A retry was scheuled, so * just return. */ return; - } else if (error != 0) { - + } else { struct scsi_sense_data *sense; int asc, ascq; int sense_key, error_code; From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 15:21: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 A3AC334B for ; Tue, 23 Oct 2012 15:21:49 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.FreeBSD.org [8.8.178.135]) by mx1.freebsd.org (Postfix) with ESMTP id 810EF8FC17 for ; Tue, 23 Oct 2012 15:21:49 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q9NFLniG098551 for ; Tue, 23 Oct 2012 15:21:49 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q9NFLnYY098547 for svn-src-all@FreeBSD.org; Tue, 23 Oct 2012 15:21:49 GMT (envelope-from bdrewery) Received: (qmail 26215 invoked from network); 23 Oct 2012 10:21:47 -0500 Received: from unknown (HELO ?192.168.0.74?) (freebsd@shatow.net@74.94.87.209) by sweb.xzibition.com with ESMTPA; 23 Oct 2012 10:21:47 -0500 Message-ID: <5086B613.4060804@FreeBSD.org> Date: Tue, 23 Oct 2012 10:21:55 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: Andre Oppermann Subject: Re: svn commit: r241931 - in head/sys: conf kern References: <201210231419.q9NEJjYH082863@svn.freebsd.org> <20121023144211.GX70741@FreeBSD.org> <5086B24C.9000606@freebsd.org> In-Reply-To: <5086B24C.9000606@freebsd.org> X-Enigmail-Version: 1.4.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 15:21:49 -0000 On 10/23/2012 10:05 AM, Andre Oppermann wrote: > There shouldn't be any users. Zero copy send is broken and > responsible for random kernel crashes. Zero copy receive isn't > supported by any modern driver. Both are useless to dangerous. I enabled this a few weeks ago, not knowing it was useless/dangerous. Perhaps an entry in UPDATING to note that this has been renamed and that it may not actually be useful? Also, zero_copy(9) needs updating, as it references ZERO_COPY_SOCKETS. -- Regards, Bryan Drewery bdrewery@freenode/EFNet From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 15:22: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 1D7964C0; Tue, 23 Oct 2012 15:22:12 +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 EE7CD8FC1C; Tue, 23 Oct 2012 15:22: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 q9NFMBJV095788; Tue, 23 Oct 2012 15:22:11 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NFMB5O095783; Tue, 23 Oct 2012 15:22:11 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210231522.q9NFMB5O095783@svn.freebsd.org> From: Alexander Motin Date: Tue, 23 Oct 2012 15:22:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241940 - in stable/9/sys/cam: . ata scsi X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 15:22:12 -0000 Author: mav Date: Tue Oct 23 15:22:11 2012 New Revision: 241940 URL: http://svn.freebsd.org/changeset/base/241940 Log: MFC r241455: Don't duplicate path/ccb allocation code, use existing functions. Modified: stable/9/sys/cam/ata/ata_xpt.c stable/9/sys/cam/cam_xpt.c stable/9/sys/cam/scsi/scsi_xpt.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ata/ata_xpt.c ============================================================================== --- stable/9/sys/cam/ata/ata_xpt.c Tue Oct 23 15:20:59 2012 (r241939) +++ stable/9/sys/cam/ata/ata_xpt.c Tue Oct 23 15:22:11 2012 (r241940) @@ -1450,29 +1450,20 @@ ata_scan_lun(struct cam_periph *periph, } if (request_ccb == NULL) { - request_ccb = malloc(sizeof(union ccb), M_CAMXPT, M_NOWAIT); + request_ccb = xpt_alloc_ccb_nowait(); if (request_ccb == NULL) { xpt_print(path, "xpt_scan_lun: can't allocate CCB, " "can't continue\n"); return; } - new_path = malloc(sizeof(*new_path), M_CAMXPT, M_NOWAIT); - if (new_path == NULL) { - xpt_print(path, "xpt_scan_lun: can't allocate path, " - "can't continue\n"); - free(request_ccb, M_CAMXPT); - return; - } - status = xpt_compile_path(new_path, xpt_periph, + status = xpt_create_path(&new_path, xpt_periph, path->bus->path_id, path->target->target_id, path->device->lun_id); - if (status != CAM_REQ_CMP) { - xpt_print(path, "xpt_scan_lun: can't compile path, " + xpt_print(path, "xpt_scan_lun: can't create path, " "can't continue\n"); - free(request_ccb, M_CAMXPT); - free(new_path, M_CAMXPT); + xpt_free_ccb(request_ccb); return; } xpt_setup_ccb(&request_ccb->ccb_h, new_path, CAM_PRIORITY_XPT); @@ -1512,9 +1503,9 @@ ata_scan_lun(struct cam_periph *periph, static void xptscandone(struct cam_periph *periph, union ccb *done_ccb) { - xpt_release_path(done_ccb->ccb_h.path); - free(done_ccb->ccb_h.path, M_CAMXPT); - free(done_ccb, M_CAMXPT); + + xpt_free_path(done_ccb->ccb_h.path); + xpt_free_ccb(done_ccb); } static struct cam_ed * Modified: stable/9/sys/cam/cam_xpt.c ============================================================================== --- stable/9/sys/cam/cam_xpt.c Tue Oct 23 15:20:59 2012 (r241939) +++ stable/9/sys/cam/cam_xpt.c Tue Oct 23 15:22:11 2012 (r241940) @@ -3857,12 +3857,6 @@ xpt_bus_register(struct cam_sim *sim, de /* Couldn't satisfy request */ return (CAM_RESRC_UNAVAIL); } - path = (struct cam_path *)malloc(sizeof(*path), M_CAMXPT, M_NOWAIT); - if (path == NULL) { - free(new_bus, M_CAMXPT); - return (CAM_RESRC_UNAVAIL); - } - if (strcmp(sim->sim_name, "xpt") != 0) { sim->path_id = xptpathid(sim->sim_name, sim->unit_number, sim->bus_id); @@ -3896,7 +3890,7 @@ xpt_bus_register(struct cam_sim *sim, de */ new_bus->xport = &xport_default; - status = xpt_compile_path(path, /*periph*/NULL, sim->path_id, + status = xpt_create_path(&path, /*periph*/NULL, sim->path_id, CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD); if (status != CAM_REQ_CMP) { xpt_release_bus(new_bus); Modified: stable/9/sys/cam/scsi/scsi_xpt.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_xpt.c Tue Oct 23 15:20:59 2012 (r241939) +++ stable/9/sys/cam/scsi/scsi_xpt.c Tue Oct 23 15:22:11 2012 (r241940) @@ -2243,29 +2243,20 @@ scsi_scan_lun(struct cam_periph *periph, } if (request_ccb == NULL) { - request_ccb = malloc(sizeof(union ccb), M_CAMXPT, M_NOWAIT); + request_ccb = xpt_alloc_ccb_nowait(); if (request_ccb == NULL) { xpt_print(path, "scsi_scan_lun: can't allocate CCB, " "can't continue\n"); return; } - new_path = malloc(sizeof(*new_path), M_CAMXPT, M_NOWAIT); - if (new_path == NULL) { - xpt_print(path, "scsi_scan_lun: can't allocate path, " - "can't continue\n"); - free(request_ccb, M_CAMXPT); - return; - } - status = xpt_compile_path(new_path, xpt_periph, + status = xpt_create_path(&new_path, xpt_periph, path->bus->path_id, path->target->target_id, path->device->lun_id); - if (status != CAM_REQ_CMP) { - xpt_print(path, "scsi_scan_lun: can't compile path, " + xpt_print(path, "scsi_scan_lun: can't create path, " "can't continue\n"); - free(request_ccb, M_CAMXPT); - free(new_path, M_CAMXPT); + xpt_free_ccb(request_ccb); return; } xpt_setup_ccb(&request_ccb->ccb_h, new_path, CAM_PRIORITY_XPT); @@ -2304,9 +2295,9 @@ scsi_scan_lun(struct cam_periph *periph, static void xptscandone(struct cam_periph *periph, union ccb *done_ccb) { - xpt_release_path(done_ccb->ccb_h.path); - free(done_ccb->ccb_h.path, M_CAMXPT); - free(done_ccb, M_CAMXPT); + + xpt_free_path(done_ccb->ccb_h.path); + xpt_free_ccb(done_ccb); } static struct cam_ed * From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 15:25: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 B51C0663; Tue, 23 Oct 2012 15:25:19 +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 9D3908FC17; Tue, 23 Oct 2012 15:25: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 q9NFPJKc096567; Tue, 23 Oct 2012 15:25:19 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NFPJna096564; Tue, 23 Oct 2012 15:25:19 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210231525.q9NFPJna096564@svn.freebsd.org> From: Alexander Motin Date: Tue, 23 Oct 2012 15:25:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241941 - stable/9/sys/cam X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 15:25:19 -0000 Author: mav Date: Tue Oct 23 15:25:19 2012 New Revision: 241941 URL: http://svn.freebsd.org/changeset/base/241941 Log: MFC r241456: Use separate malloc buckets for CAM devices, CCBs and paths. This will make it easier to track down the source of any use after free problems. Modified: stable/9/sys/cam/cam_xpt.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/cam_xpt.c ============================================================================== --- stable/9/sys/cam/cam_xpt.c Tue Oct 23 15:22:11 2012 (r241940) +++ stable/9/sys/cam/cam_xpt.c Tue Oct 23 15:25:19 2012 (r241941) @@ -78,6 +78,9 @@ __FBSDID("$FreeBSD$"); /* Datastructures internal to the xpt layer */ MALLOC_DEFINE(M_CAMXPT, "CAM XPT", "CAM XPT buffers"); +MALLOC_DEFINE(M_CAMDEV, "CAM DEV", "CAM devices"); +MALLOC_DEFINE(M_CAMCCB, "CAM CCB", "CAM CCBs"); +MALLOC_DEFINE(M_CAMPATH, "CAM path", "CAM paths"); /* Object for defering XPT actions to a taskqueue */ struct xpt_task { @@ -3397,7 +3400,7 @@ xpt_create_path(struct cam_path **new_pa struct cam_path *path; cam_status status; - path = (struct cam_path *)malloc(sizeof(*path), M_CAMXPT, M_NOWAIT); + path = (struct cam_path *)malloc(sizeof(*path), M_CAMPATH, M_NOWAIT); if (path == NULL) { status = CAM_RESRC_UNAVAIL; @@ -3405,7 +3408,7 @@ xpt_create_path(struct cam_path **new_pa } status = xpt_compile_path(path, perph, path_id, target_id, lun_id); if (status != CAM_REQ_CMP) { - free(path, M_CAMXPT); + free(path, M_CAMPATH); path = NULL; } *new_path_ptr = path; @@ -3422,7 +3425,7 @@ xpt_create_path_unlocked(struct cam_path cam_status status; int need_unlock = 0; - path = (struct cam_path *)malloc(sizeof(*path), M_CAMXPT, M_WAITOK); + path = (struct cam_path *)malloc(sizeof(*path), M_CAMPATH, M_WAITOK); if (path_id != CAM_BUS_WILDCARD) { bus = xpt_find_bus(path_id); @@ -3437,7 +3440,7 @@ xpt_create_path_unlocked(struct cam_path xpt_release_bus(bus); } if (status != CAM_REQ_CMP) { - free(path, M_CAMXPT); + free(path, M_CAMPATH); path = NULL; } *new_path_ptr = path; @@ -3540,7 +3543,7 @@ xpt_free_path(struct cam_path *path) CAM_DEBUG(path, CAM_DEBUG_TRACE, ("xpt_free_path\n")); xpt_release_path(path); - free(path, M_CAMXPT); + free(path, M_CAMPATH); } void @@ -4376,7 +4379,7 @@ xpt_alloc_ccb() { union ccb *new_ccb; - new_ccb = malloc(sizeof(*new_ccb), M_CAMXPT, M_ZERO|M_WAITOK); + new_ccb = malloc(sizeof(*new_ccb), M_CAMCCB, M_ZERO|M_WAITOK); return (new_ccb); } @@ -4385,14 +4388,14 @@ xpt_alloc_ccb_nowait() { union ccb *new_ccb; - new_ccb = malloc(sizeof(*new_ccb), M_CAMXPT, M_ZERO|M_NOWAIT); + new_ccb = malloc(sizeof(*new_ccb), M_CAMCCB, M_ZERO|M_NOWAIT); return (new_ccb); } void xpt_free_ccb(union ccb *free_ccb) { - free(free_ccb, M_CAMXPT); + free(free_ccb, M_CAMCCB); } @@ -4544,7 +4547,7 @@ xpt_alloc_device(struct cam_eb *bus, str device = NULL; } else { device = (struct cam_ed *)malloc(sizeof(*device), - M_CAMXPT, M_NOWAIT|M_ZERO); + M_CAMDEV, M_NOWAIT|M_ZERO); } if (device != NULL) { @@ -4557,13 +4560,13 @@ xpt_alloc_device(struct cam_eb *bus, str device->sim = bus->sim; /* Initialize our queues */ if (camq_init(&device->drvq, 0) != 0) { - free(device, M_CAMXPT); + free(device, M_CAMDEV); return (NULL); } if (cam_ccbq_init(&device->ccbq, bus->sim->max_dev_openings) != 0) { camq_fini(&device->drvq); - free(device, M_CAMXPT); + free(device, M_CAMDEV); return (NULL); } SLIST_INIT(&device->asyncs); @@ -4616,7 +4619,7 @@ xpt_release_device(struct cam_ed *device camq_fini(&device->drvq); cam_ccbq_fini(&device->ccbq); xpt_release_target(device->target); - free(device, M_CAMXPT); + free(device, M_CAMDEV); } else device->refcount--; } From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 15:25: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 DC78D7C7; Tue, 23 Oct 2012 15:25:48 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C4CCE8FC0C; Tue, 23 Oct 2012 15:25: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 q9NFPmwj096717; Tue, 23 Oct 2012 15:25:48 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NFPmJf096715; Tue, 23 Oct 2012 15:25:48 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201210231525.q9NFPmJf096715@svn.freebsd.org> From: Warner Losh Date: Tue, 23 Oct 2012 15:25:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241942 - head/sys/mips/rt305x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 15:25:48 -0000 Author: imp Date: Tue Oct 23 15:25:48 2012 New Revision: 241942 URL: http://svn.freebsd.org/changeset/base/241942 Log: Add RT305x specific devices here. Modified: head/sys/mips/rt305x/files.rt305x Modified: head/sys/mips/rt305x/files.rt305x ============================================================================== --- head/sys/mips/rt305x/files.rt305x Tue Oct 23 15:25:19 2012 (r241941) +++ head/sys/mips/rt305x/files.rt305x Tue Oct 23 15:25:48 2012 (r241942) @@ -11,3 +11,5 @@ mips/rt305x/uart_cpu_rt305x.c optional u mips/rt305x/uart_dev_rt305x.c optional uart mips/mips/intr_machdep.c standard mips/mips/tick.c standard +dev/rt/if_rt.c optional rt +dev/nvram2env/nvram2env.c optional nvram2env From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 15:27: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 535ED970; Tue, 23 Oct 2012 15:27:33 +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 382468FC14; Tue, 23 Oct 2012 15:27: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 q9NFRXPf097179; Tue, 23 Oct 2012 15:27:33 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NFRWER097174; Tue, 23 Oct 2012 15:27:32 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210231527.q9NFRWER097174@svn.freebsd.org> From: Alexander Motin Date: Tue, 23 Oct 2012 15:27:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241943 - in stable/9/sys/cam: . ata scsi X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 15:27:33 -0000 Author: mav Date: Tue Oct 23 15:27:32 2012 New Revision: 241943 URL: http://svn.freebsd.org/changeset/base/241943 Log: MFC r241485: Protect xpt_getattr() calls with the SIM lock and assert that. Modified: stable/9/sys/cam/ata/ata_da.c stable/9/sys/cam/cam_xpt.c stable/9/sys/cam/scsi/scsi_da.c stable/9/sys/cam/scsi/scsi_pass.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ata/ata_da.c ============================================================================== --- stable/9/sys/cam/ata/ata_da.c Tue Oct 23 15:25:48 2012 (r241942) +++ stable/9/sys/cam/ata/ata_da.c Tue Oct 23 15:27:32 2012 (r241943) @@ -914,17 +914,17 @@ adasysctlinit(void *context, int pending static int adagetattr(struct bio *bp) { - int ret = -1; + int ret; struct cam_periph *periph; - if (bp->bio_disk == NULL || bp->bio_disk->d_drv1 == NULL) - return ENXIO; periph = (struct cam_periph *)bp->bio_disk->d_drv1; - if (periph->path == NULL) - return ENXIO; + if (periph == NULL) + return (ENXIO); + cam_periph_lock(periph); ret = xpt_getattr(bp->bio_data, bp->bio_length, bp->bio_attribute, periph->path); + cam_periph_unlock(periph); if (ret == 0) bp->bio_completed = bp->bio_length; return ret; Modified: stable/9/sys/cam/cam_xpt.c ============================================================================== --- stable/9/sys/cam/cam_xpt.c Tue Oct 23 15:25:48 2012 (r241942) +++ stable/9/sys/cam/cam_xpt.c Tue Oct 23 15:27:32 2012 (r241943) @@ -1111,6 +1111,8 @@ xpt_getattr(char *buf, size_t len, const int ret = -1; struct ccb_dev_advinfo cdai; + mtx_assert(path->bus->sim->mtx, MA_OWNED); + memset(&cdai, 0, sizeof(cdai)); xpt_setup_ccb(&cdai.ccb_h, path, CAM_PRIORITY_NORMAL); cdai.ccb_h.func_code = XPT_DEV_ADVINFO; Modified: stable/9/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.c Tue Oct 23 15:25:48 2012 (r241942) +++ stable/9/sys/cam/scsi/scsi_da.c Tue Oct 23 15:27:32 2012 (r241943) @@ -1213,17 +1213,17 @@ dadump(void *arg, void *virtual, vm_offs static int dagetattr(struct bio *bp) { - int ret = -1; + int ret; struct cam_periph *periph; - if (bp->bio_disk == NULL || bp->bio_disk->d_drv1 == NULL) - return ENXIO; periph = (struct cam_periph *)bp->bio_disk->d_drv1; - if (periph->path == NULL) - return ENXIO; + if (periph == NULL) + return (ENXIO); + cam_periph_lock(periph); ret = xpt_getattr(bp->bio_data, bp->bio_length, bp->bio_attribute, periph->path); + cam_periph_unlock(periph); if (ret == 0) bp->bio_completed = bp->bio_length; return ret; Modified: stable/9/sys/cam/scsi/scsi_pass.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_pass.c Tue Oct 23 15:25:48 2012 (r241942) +++ stable/9/sys/cam/scsi/scsi_pass.c Tue Oct 23 15:27:32 2012 (r241943) @@ -212,27 +212,26 @@ pass_add_physpath(void *context, int pen */ periph = context; softc = periph->softc; + physpath = malloc(MAXPATHLEN, M_DEVBUF, M_WAITOK); cam_periph_lock(periph); if (periph->flags & CAM_PERIPH_INVALID) { cam_periph_unlock(periph); - return; + goto out; } - cam_periph_unlock(periph); - physpath = malloc(MAXPATHLEN, M_DEVBUF, M_WAITOK); if (xpt_getattr(physpath, MAXPATHLEN, "GEOM::physpath", periph->path) == 0 && strlen(physpath) != 0) { + cam_periph_unlock(periph); make_dev_physpath_alias(MAKEDEV_WAITOK, &softc->alias_dev, softc->dev, softc->alias_dev, physpath); + cam_periph_lock(periph); } - free(physpath, M_DEVBUF); /* * Now that we've made our alias, we no longer have to have a * reference to the device. */ - cam_periph_lock(periph); if ((softc->flags & PASS_FLAG_INITIAL_PHYSPATH) == 0) { softc->flags |= PASS_FLAG_INITIAL_PHYSPATH; cam_periph_unlock(periph); @@ -240,6 +239,9 @@ pass_add_physpath(void *context, int pen } else cam_periph_unlock(periph); + +out: + free(physpath, M_DEVBUF); } static void From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 15:28: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 E7C14ACE for ; Tue, 23 Oct 2012 15:28:00 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 509538FC0C for ; Tue, 23 Oct 2012 15:28:00 +0000 (UTC) Received: (qmail 86238 invoked from network); 23 Oct 2012 17:05:59 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 23 Oct 2012 17:05:59 -0000 Message-ID: <5086B775.40702@freebsd.org> Date: Tue, 23 Oct 2012 17:27:49 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: David Chisnall Subject: Re: svn commit: r241931 - in head/sys: conf kern References: <201210231419.q9NEJjYH082863@svn.freebsd.org> <20121023144211.GX70741@FreeBSD.org> <5086B24C.9000606@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Gleb Smirnoff , src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 15:28:01 -0000 On 23.10.2012 17:11, David Chisnall wrote: > On 23 Oct 2012, at 16:05, Andre Oppermann wrote: > >> For zero copy send we're trying to come up with a sendfile-like >> approach where the page is simply wired into kernel space. The >> application then is not allowed to touch it until the socket >> buffer has released it again. The main issue here is how to >> provide feedback to the application when it is safe for reuse. > > It's been a few years since I used it, but I thought that aio_write() already provided this. The application may not modify the contents of the memory pointed to by aio_buf until after it has received notification that the write has finished. This happens either via a signal directly, a signal polled by kqueue, or a call to aio_return(). Indeed, that's one of the ways being explored. It requires the explicit cooperation of the application. I don't think there is any way around that. -- Andre From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 15:31: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 2EBB4C7D; Tue, 23 Oct 2012 15:31:51 +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 F083E8FC16; Tue, 23 Oct 2012 15: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 q9NFVoNx098295; Tue, 23 Oct 2012 15:31:50 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NFVodf098293; Tue, 23 Oct 2012 15:31:50 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210231531.q9NFVodf098293@svn.freebsd.org> From: Alexander Motin Date: Tue, 23 Oct 2012 15:31:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241944 - stable/9/sys/cam X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 15:31:51 -0000 Author: mav Date: Tue Oct 23 15:31:50 2012 New Revision: 241944 URL: http://svn.freebsd.org/changeset/base/241944 Log: MFC r241504: Fix XPT_DEBUG paths operations locking: - Extend the lock to cover xpt_path_release() for the new path. - While xpt_action() is called while holding right SIM lock for the new bus, the old path release may require different SIM lock. So we have to temporary drop the new lock and get the old one. Modified: stable/9/sys/cam/cam_xpt.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/cam_xpt.c ============================================================================== --- stable/9/sys/cam/cam_xpt.c Tue Oct 23 15:27:32 2012 (r241943) +++ stable/9/sys/cam/cam_xpt.c Tue Oct 23 15:31:50 2012 (r241944) @@ -533,9 +533,9 @@ xptioctl(struct cdev *dev, u_long cmd, c xpt_merge_ccb(&ccb, inccb); ccb.ccb_h.cbfcnp = xptdone; xpt_action(&ccb); - CAM_SIM_UNLOCK(bus->sim); bcopy(&ccb, inccb, sizeof(union ccb)); xpt_free_path(ccb.ccb_h.path); + CAM_SIM_UNLOCK(bus->sim); break; } @@ -2981,34 +2981,42 @@ xpt_action_default(union ccb *start_ccb) break; } case XPT_DEBUG: { + struct cam_path *oldpath; + struct cam_sim *oldsim; + /* Check that all request bits are supported. */ if (start_ccb->cdbg.flags & ~(CAM_DEBUG_COMPILE)) { start_ccb->ccb_h.status = CAM_FUNC_NOTAVAIL; break; } - cam_dflags = start_ccb->cdbg.flags; + cam_dflags = CAM_DEBUG_NONE; if (cam_dpath != NULL) { - xpt_free_path(cam_dpath); + /* To release the old path we must hold proper lock. */ + oldpath = cam_dpath; cam_dpath = NULL; + oldsim = xpt_path_sim(oldpath); + CAM_SIM_UNLOCK(xpt_path_sim(start_ccb->ccb_h.path)); + CAM_SIM_LOCK(oldsim); + xpt_free_path(oldpath); + CAM_SIM_UNLOCK(oldsim); + CAM_SIM_LOCK(xpt_path_sim(start_ccb->ccb_h.path)); } - if (cam_dflags != CAM_DEBUG_NONE) { + if (start_ccb->cdbg.flags != CAM_DEBUG_NONE) { if (xpt_create_path(&cam_dpath, xpt_periph, start_ccb->ccb_h.path_id, start_ccb->ccb_h.target_id, start_ccb->ccb_h.target_lun) != CAM_REQ_CMP) { start_ccb->ccb_h.status = CAM_RESRC_UNAVAIL; - cam_dflags = CAM_DEBUG_NONE; } else { + cam_dflags = start_ccb->cdbg.flags; start_ccb->ccb_h.status = CAM_REQ_CMP; xpt_print(cam_dpath, "debugging flags now %x\n", cam_dflags); } - } else { - cam_dpath = NULL; + } else start_ccb->ccb_h.status = CAM_REQ_CMP; - } break; } case XPT_FREEZE_QUEUE: From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 15:33: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 60AE5E96; Tue, 23 Oct 2012 15:33:33 +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 2F0348FC0C; Tue, 23 Oct 2012 15:33: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 q9NFXXj5098799; Tue, 23 Oct 2012 15:33:33 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NFXWiK098797; Tue, 23 Oct 2012 15:33:32 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210231533.q9NFXWiK098797@svn.freebsd.org> From: Alexander Motin Date: Tue, 23 Oct 2012 15:33:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241945 - stable/9/sys/cam/ctl X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 15:33:33 -0000 Author: mav Date: Tue Oct 23 15:33:32 2012 New Revision: 241945 URL: http://svn.freebsd.org/changeset/base/241945 Log: MFC r241508: Extend SIM lock coverage during the bus registration process. Modified: stable/9/sys/cam/ctl/ctl_frontend_cam_sim.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- stable/9/sys/cam/ctl/ctl_frontend_cam_sim.c Tue Oct 23 15:31:50 2012 (r241944) +++ stable/9/sys/cam/ctl/ctl_frontend_cam_sim.c Tue Oct 23 15:33:32 2012 (r241945) @@ -175,8 +175,8 @@ cfcs_init(void) if (retval != 0) { printf("%s: ctl_frontend_register() failed with error %d!\n", __func__, retval); - retval = 1; - goto bailout; + mtx_destroy(&softc->lock); + return (1); } /* @@ -207,7 +207,7 @@ cfcs_init(void) softc->wwpn = fe->wwpn; } - + mtx_lock(&softc->lock); softc->devq = cam_simq_alloc(fe->num_requested_ctl_io); if (softc->devq == NULL) { printf("%s: error allocating devq\n", __func__); @@ -224,9 +224,7 @@ cfcs_init(void) goto bailout; } - mtx_lock(&softc->lock); if (xpt_bus_register(softc->sim, NULL, 0) != CAM_SUCCESS) { - mtx_unlock(&softc->lock); printf("%s: error registering SIM\n", __func__); retval = ENOMEM; goto bailout; @@ -236,15 +234,12 @@ cfcs_init(void) cam_sim_path(softc->sim), CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { - mtx_unlock(&softc->lock); printf("%s: error creating path\n", __func__); xpt_bus_deregister(cam_sim_path(softc->sim)); retval = 1; goto bailout; } - mtx_unlock(&softc->lock); - xpt_setup_ccb(&csa.ccb_h, softc->path, /*priority*/ 5); csa.ccb_h.func_code = XPT_SASYNC_CB; csa.event_enable = AC_LOST_DEVICE; @@ -252,6 +247,8 @@ cfcs_init(void) csa.callback_arg = softc->sim; xpt_action((union ccb *)&csa); + mtx_unlock(&softc->lock); + return (retval); bailout: @@ -259,6 +256,8 @@ bailout: cam_sim_free(softc->sim, /*free_devq*/ TRUE); else if (softc->devq) cam_simq_free(softc->devq); + mtx_unlock(&softc->lock); + mtx_destroy(&softc->lock); return (retval); } From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 15:33: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 878F5FA3; Tue, 23 Oct 2012 15:33:41 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 708648FC1A; Tue, 23 Oct 2012 15:33: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 q9NFXfxA098865; Tue, 23 Oct 2012 15:33:41 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NFXfod098863; Tue, 23 Oct 2012 15:33:41 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201210231533.q9NFXfod098863@svn.freebsd.org> From: Warner Losh Date: Tue, 23 Oct 2012 15:33:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241946 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 15:33:41 -0000 Author: imp Date: Tue Oct 23 15:33:40 2012 New Revision: 241946 URL: http://svn.freebsd.org/changeset/base/241946 Log: intr_machdep.c and trap.c can be replaced with ports' own versions, so remove the standard ones from here. Modified: head/sys/conf/files.mips Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Tue Oct 23 15:33:32 2012 (r241945) +++ head/sys/conf/files.mips Tue Oct 23 15:33:40 2012 (r241946) @@ -20,7 +20,6 @@ mips/mips/exception.S standard mips/mips/fp.S standard mips/mips/gdb_machdep.c standard mips/mips/in_cksum.c optional inet -mips/mips/intr_machdep.c standard mips/mips/libkern_machdep.c standard mips/mips/locore.S standard no-obj mips/mips/machdep.c standard @@ -37,7 +36,6 @@ mips/mips/stack_machdep.c standard mips/mips/support.S standard mips/mips/swtch.S standard mips/mips/sys_machdep.c standard -mips/mips/tick.c standard mips/mips/tlb.c standard mips/mips/trap.c standard mips/mips/uio_machdep.c standard From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 15:34: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 E7C8D1F5; Tue, 23 Oct 2012 15:34:51 +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 CF8C68FC12; Tue, 23 Oct 2012 15:34: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 q9NFYp4G099297; Tue, 23 Oct 2012 15:34:51 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NFYpGG099295; Tue, 23 Oct 2012 15:34:51 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210231534.q9NFYpGG099295@svn.freebsd.org> From: Alexander Motin Date: Tue, 23 Oct 2012 15:34:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241947 - stable/9/sys/cam X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 15:34:52 -0000 Author: mav Date: Tue Oct 23 15:34:51 2012 New Revision: 241947 URL: http://svn.freebsd.org/changeset/base/241947 Log: MFC r241509: Use xpt_create_path_unlocked() for initial debug path compilation because we are not holding respective SIM lock. Modified: stable/9/sys/cam/cam_xpt.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/cam_xpt.c ============================================================================== --- stable/9/sys/cam/cam_xpt.c Tue Oct 23 15:33:40 2012 (r241946) +++ stable/9/sys/cam/cam_xpt.c Tue Oct 23 15:34:51 2012 (r241947) @@ -4777,12 +4777,7 @@ xpt_config(void *arg) /* Setup debugging path */ if (cam_dflags != CAM_DEBUG_NONE) { - /* - * Locking is specifically omitted here. No SIMs have - * registered yet, so xpt_create_path will only be searching - * empty lists of targets and devices. - */ - if (xpt_create_path(&cam_dpath, xpt_periph, + if (xpt_create_path_unlocked(&cam_dpath, xpt_periph, CAM_DEBUG_BUS, CAM_DEBUG_TARGET, CAM_DEBUG_LUN) != CAM_REQ_CMP) { printf("xpt_config: xpt_create_path() failed for debug" From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 15:36: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 5CDC7443; Tue, 23 Oct 2012 15:36:24 +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 44AE48FC0A; Tue, 23 Oct 2012 15:36: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 q9NFaOIc099669; Tue, 23 Oct 2012 15:36:24 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NFaOqO099667; Tue, 23 Oct 2012 15:36:24 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210231536.q9NFaOqO099667@svn.freebsd.org> From: Alexander Motin Date: Tue, 23 Oct 2012 15:36:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241948 - stable/9/sys/cam X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 15:36:24 -0000 Author: mav Date: Tue Oct 23 15:36:23 2012 New Revision: 241948 URL: http://svn.freebsd.org/changeset/base/241948 Log: MFC r241510: Don't exclude XPT SIM from locking in xpt_create_path_unlocked(). We don't want xpt periph, device, target or bus disappeared because of incorrect reference counting. Modified: stable/9/sys/cam/cam_xpt.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/cam_xpt.c ============================================================================== --- stable/9/sys/cam/cam_xpt.c Tue Oct 23 15:34:51 2012 (r241947) +++ stable/9/sys/cam/cam_xpt.c Tue Oct 23 15:36:23 2012 (r241948) @@ -3433,19 +3433,14 @@ xpt_create_path_unlocked(struct cam_path struct cam_path *path; struct cam_eb *bus = NULL; cam_status status; - int need_unlock = 0; path = (struct cam_path *)malloc(sizeof(*path), M_CAMPATH, M_WAITOK); - if (path_id != CAM_BUS_WILDCARD) { - bus = xpt_find_bus(path_id); - if (bus != NULL) { - need_unlock = 1; - CAM_SIM_LOCK(bus->sim); - } - } + bus = xpt_find_bus(path_id); + if (bus != NULL) + CAM_SIM_LOCK(bus->sim); status = xpt_compile_path(path, periph, path_id, target_id, lun_id); - if (need_unlock) { + if (bus != NULL) { CAM_SIM_UNLOCK(bus->sim); xpt_release_bus(bus); } From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 15:37: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 032995B7; Tue, 23 Oct 2012 15:37:58 +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 DF0AC8FC08; Tue, 23 Oct 2012 15:37: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 q9NFbv7D000132; Tue, 23 Oct 2012 15:37:57 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NFbvve000126; Tue, 23 Oct 2012 15:37:57 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210231537.q9NFbvve000126@svn.freebsd.org> From: Alexander Motin Date: Tue, 23 Oct 2012 15:37:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241949 - stable/9/sys/cam X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 15:37:58 -0000 Author: mav Date: Tue Oct 23 15:37:57 2012 New Revision: 241949 URL: http://svn.freebsd.org/changeset/base/241949 Log: MFC r241536: Add explicit check for not set time inside cam_periph_freeze_after_event(). System time is set later on boot process then initial bus scan by CAM. Until that moment microtime() is equal to microuptime(), and if system boots quickly, the value can be close to zero. That causes settle time waiting even for buses that don't use reset during probe. On my test system this reduces boot time by 1 second if USB enabled, or by 4 seconds if USB disabled. CAM waited for ctl2cam0 bus "settle". Modified: stable/9/sys/cam/cam_periph.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/cam_periph.c ============================================================================== --- stable/9/sys/cam/cam_periph.c Tue Oct 23 15:36:23 2012 (r241948) +++ stable/9/sys/cam/cam_periph.c Tue Oct 23 15:37:57 2012 (r241949) @@ -1257,6 +1257,9 @@ cam_periph_freeze_after_event(struct cam struct timeval delta; struct timeval duration_tv; + if (!timevalisset(event_time)) + return; + microtime(&delta); timevalsub(&delta, event_time); duration_tv.tv_sec = duration_ms / 1000; From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 15:46: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 97BB38D6; Tue, 23 Oct 2012 15:46:02 +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 7CA438FC14; Tue, 23 Oct 2012 15:46: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 q9NFk2K9001892; Tue, 23 Oct 2012 15:46:02 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NFk2aM001890; Tue, 23 Oct 2012 15:46:02 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210231546.q9NFk2aM001890@svn.freebsd.org> From: Alexander Motin Date: Tue, 23 Oct 2012 15:46:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241950 - stable/9/sys/geom/raid X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 15:46:02 -0000 Author: mav Date: Tue Oct 23 15:46:02 2012 New Revision: 241950 URL: http://svn.freebsd.org/changeset/base/241950 Log: MFC r239175: Add missing FAILED event to g_raid_subdisk_event2str() to print it properly in debug messages. Modified: stable/9/sys/geom/raid/g_raid.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/raid/g_raid.c ============================================================================== --- stable/9/sys/geom/raid/g_raid.c Tue Oct 23 15:37:57 2012 (r241949) +++ stable/9/sys/geom/raid/g_raid.c Tue Oct 23 15:46:02 2012 (r241950) @@ -222,6 +222,8 @@ g_raid_subdisk_event2str(int event) switch (event) { case G_RAID_SUBDISK_E_NEW: return ("NEW"); + case G_RAID_SUBDISK_E_FAILED: + return ("FAILED"); case G_RAID_SUBDISK_E_DISCONNECTED: return ("DISCONNECTED"); default: From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 15:48: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 D7A10A72; Tue, 23 Oct 2012 15:48:42 +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 BEE6F8FC08; Tue, 23 Oct 2012 15:48: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 q9NFmg3o002386; Tue, 23 Oct 2012 15:48:42 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NFmguH002384; Tue, 23 Oct 2012 15:48:42 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210231548.q9NFmguH002384@svn.freebsd.org> From: Alexander Motin Date: Tue, 23 Oct 2012 15:48:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241951 - stable/9/sys/geom/raid X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 15:48:42 -0000 Author: mav Date: Tue Oct 23 15:48:42 2012 New Revision: 241951 URL: http://svn.freebsd.org/changeset/base/241951 Log: MFC r241418: NULL-ify last previously used pointer instead of last possible pointer. This should be only a cosmetic change. Modified: stable/9/sys/geom/raid/md_promise.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/raid/md_promise.c ============================================================================== --- stable/9/sys/geom/raid/md_promise.c Tue Oct 23 15:46:02 2012 (r241950) +++ stable/9/sys/geom/raid/md_promise.c Tue Oct 23 15:48:42 2012 (r241951) @@ -544,7 +544,7 @@ g_raid_md_promise_purge_disks(struct g_r free(pd->pd_meta[i], M_MD_PROMISE); for (j = i; j < pd->pd_subdisks - 1; j++) pd->pd_meta[j] = pd->pd_meta[j + 1]; - pd->pd_meta[PROMISE_MAX_SUBDISKS - 1] = NULL; + pd->pd_meta[pd->pd_subdisks - 1] = NULL; pd->pd_subdisks--; pd->pd_updated = 1; } @@ -650,7 +650,7 @@ g_raid_md_promise_start_disk(struct g_ra free(pd->pd_meta[sdn], M_MD_PROMISE); for (i = sdn; i < pd->pd_subdisks - 1; i++) pd->pd_meta[i] = pd->pd_meta[i + 1]; - pd->pd_meta[PROMISE_MAX_SUBDISKS - 1] = NULL; + pd->pd_meta[pd->pd_subdisks - 1] = NULL; pd->pd_subdisks--; } /* If we are in the start process, that's all for now. */ @@ -1094,7 +1094,7 @@ g_raid_md_taste_promise(struct g_raid_md free(metaarr[i], M_MD_PROMISE); for (j = i; j < subdisks - 1; j++) metaarr[i] = metaarr[j + 1]; - metaarr[PROMISE_MAX_SUBDISKS - 1] = NULL; + metaarr[subdisks - 1] = NULL; subdisks--; } From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 16:03: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 9DC30E17; Tue, 23 Oct 2012 16:03:00 +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 863218FC0A; Tue, 23 Oct 2012 16:03: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 q9NG302Y004955; Tue, 23 Oct 2012 16:03:00 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NG30DL004951; Tue, 23 Oct 2012 16:03:00 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210231603.q9NG30DL004951@svn.freebsd.org> From: Alexander Motin Date: Tue, 23 Oct 2012 16:03:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241952 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 16:03:00 -0000 Author: mav Date: Tue Oct 23 16:03:00 2012 New Revision: 241952 URL: http://svn.freebsd.org/changeset/base/241952 Log: Remove two more 'periph == NULL' checks missed in r241404. This condition can never be true as functions are called from single place and the checks just pollute the code and confuse Clang Static Analyzer. Modified: head/sys/cam/scsi/scsi_enc.c head/sys/cam/scsi/scsi_pt.c Modified: head/sys/cam/scsi/scsi_enc.c ============================================================================== --- head/sys/cam/scsi/scsi_enc.c Tue Oct 23 15:48:42 2012 (r241951) +++ head/sys/cam/scsi/scsi_enc.c Tue Oct 23 16:03:00 2012 (r241952) @@ -879,11 +879,6 @@ enc_ctor(struct cam_periph *periph, void char *tname; cgd = (struct ccb_getdev *)arg; - if (periph == NULL) { - printf("enc_ctor: periph was NULL!!\n"); - goto out; - } - if (cgd == NULL) { printf("enc_ctor: no getdev CCB, can't register device\n"); goto out; Modified: head/sys/cam/scsi/scsi_pt.c ============================================================================== --- head/sys/cam/scsi/scsi_pt.c Tue Oct 23 15:48:42 2012 (r241951) +++ head/sys/cam/scsi/scsi_pt.c Tue Oct 23 16:03:00 2012 (r241952) @@ -255,11 +255,6 @@ ptctor(struct cam_periph *periph, void * struct ccb_pathinq cpi; cgd = (struct ccb_getdev *)arg; - if (periph == NULL) { - printf("ptregister: periph was NULL!!\n"); - return(CAM_REQ_CMP_ERR); - } - if (cgd == NULL) { printf("ptregister: no getdev CCB, can't register device\n"); return(CAM_REQ_CMP_ERR); From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 16:05:08 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 E0713F9C; Tue, 23 Oct 2012 16:05:08 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 5AB298FC18; Tue, 23 Oct 2012 16:05:08 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q9NG51Zt086951; Tue, 23 Oct 2012 20:05:01 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q9NG51Ek086950; Tue, 23 Oct 2012 20:05:01 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 23 Oct 2012 20:05:01 +0400 From: Gleb Smirnoff To: Andre Oppermann Subject: Re: svn commit: r241931 - in head/sys: conf kern Message-ID: <20121023160501.GB70741@FreeBSD.org> References: <201210231419.q9NEJjYH082863@svn.freebsd.org> <20121023144211.GX70741@FreeBSD.org> <5086B24C.9000606@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <5086B24C.9000606@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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 16:05:09 -0000 On Tue, Oct 23, 2012 at 05:05:48PM +0200, Andre Oppermann wrote: A> There shouldn't be any users. Zero copy send is broken and A> responsible for random kernel crashes. Zero copy receive isn't A> supported by any modern driver. Both are useless to dangerous. A> A> The main problem with ZERO_COPY_SOCKETS was that it sounded great A> and who wouldn't want to have zero copy sockets? Unfortunately A> it doesn't work that way. Okay, it appeared that there are users, even on current@ mailing list during couple of hours of exposition. Can we keep the old option as compatibility? -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 16:07: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 18EA232C; Tue, 23 Oct 2012 16:07:42 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 015898FC0C; Tue, 23 Oct 2012 16:07: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 q9NG7fXi005803; Tue, 23 Oct 2012 16:07:41 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NG7fdA005801; Tue, 23 Oct 2012 16:07:41 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201210231607.q9NG7fdA005801@svn.freebsd.org> From: Warner Losh Date: Tue, 23 Oct 2012 16:07:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241953 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 16:07:42 -0000 Author: imp Date: Tue Oct 23 16:07:41 2012 New Revision: 241953 URL: http://svn.freebsd.org/changeset/base/241953 Log: Add in MD specific support for FDT. Need to refactor this a bit. Modified: head/sys/conf/files.mips Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Tue Oct 23 16:03:00 2012 (r241952) +++ head/sys/conf/files.mips Tue Oct 23 16:07:41 2012 (r241953) @@ -60,6 +60,7 @@ libkern/ffsl.c standard libkern/fls.c standard libkern/flsl.c standard libkern/lshrdi3.c standard +libkern/memchr.c optional fdt libkern/memmove.c standard # Compat32 stuff @@ -82,3 +83,12 @@ dev/syscons/scgfbrndr.c optional sc dev/syscons/scterm-teken.c optional sc dev/syscons/scvtb.c optional sc mips/mips/sc_machdep.c optional sc + +# FDT support +dev/ofw/openfirm.c optional fdt +dev/ofw/openfirmio.c optional fdt +dev/ofw/ofw_bus_if.m optional fdt +dev/ofw/ofw_if.m optional fdt +dev/ofw/ofw_bus_subr.c optional fdt +dev/ofw/ofw_fdt.c optional fdt +dev/fdt/fdt_mips.c optional fdt From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 16:12: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 88CF360F; Tue, 23 Oct 2012 16:12:18 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E04E8FC0A; Tue, 23 Oct 2012 16:12: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 q9NGCIiX006783; Tue, 23 Oct 2012 16:12:18 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NGCItd006781; Tue, 23 Oct 2012 16:12:18 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201210231612.q9NGCItd006781@svn.freebsd.org> From: Warner Losh Date: Tue, 23 Oct 2012 16:12:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241954 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 16:12:18 -0000 Author: imp Date: Tue Oct 23 16:12:17 2012 New Revision: 241954 URL: http://svn.freebsd.org/changeset/base/241954 Log: Add in the crypto support from the generic versions. Modified: head/sys/conf/files.mips Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Tue Oct 23 16:07:41 2012 (r241953) +++ head/sys/conf/files.mips Tue Oct 23 16:12:17 2012 (r241954) @@ -92,3 +92,7 @@ dev/ofw/ofw_if.m optional fdt dev/ofw/ofw_bus_subr.c optional fdt dev/ofw/ofw_fdt.c optional fdt dev/fdt/fdt_mips.c optional fdt + +# crypto support -- use generic +crypto/blowfish/bf_enc.c optional crypto | ipsec +crypto/des/des_enc.c optional crypto | ipsec From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 16:23: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 22C23919; Tue, 23 Oct 2012 16:23:25 +0000 (UTC) (envelope-from alc@rice.edu) Received: from mh11.mail.rice.edu (mh11.mail.rice.edu [128.42.199.30]) by mx1.freebsd.org (Postfix) with ESMTP id E08768FC14; Tue, 23 Oct 2012 16:23:24 +0000 (UTC) Received: from mh11.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh11.mail.rice.edu (Postfix) with ESMTP id 12C8B4C02C6; Tue, 23 Oct 2012 11:23:24 -0500 (CDT) Received: from mh11.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh11.mail.rice.edu (Postfix) with ESMTP id 113E04C02AE; Tue, 23 Oct 2012 11:23:24 -0500 (CDT) X-Virus-Scanned: by amavis-2.7.0 at mh11.mail.rice.edu, auth channel Received: from mh11.mail.rice.edu ([127.0.0.1]) by mh11.mail.rice.edu (mh11.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id LBNapbc_z3db; Tue, 23 Oct 2012 11:23:23 -0500 (CDT) Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh11.mail.rice.edu (Postfix) with ESMTPSA id 8F7EB4C0261; Tue, 23 Oct 2012 11:23:23 -0500 (CDT) Message-ID: <5086C47B.9080202@rice.edu> Date: Tue, 23 Oct 2012 11:23:23 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:8.0) Gecko/20111113 Thunderbird/8.0 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r241931 - in head/sys: conf kern References: <201210231419.q9NEJjYH082863@svn.freebsd.org> <20121023144211.GX70741@FreeBSD.org> <5086B24C.9000606@freebsd.org> <20121023160501.GB70741@FreeBSD.org> In-Reply-To: <20121023160501.GB70741@FreeBSD.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Andre Oppermann X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 16:23:25 -0000 On 10/23/2012 11:05, Gleb Smirnoff wrote: > On Tue, Oct 23, 2012 at 05:05:48PM +0200, Andre Oppermann wrote: > A> There shouldn't be any users. Zero copy send is broken and > A> responsible for random kernel crashes. Zero copy receive isn't > A> supported by any modern driver. Both are useless to dangerous. > A> > A> The main problem with ZERO_COPY_SOCKETS was that it sounded great > A> and who wouldn't want to have zero copy sockets? Unfortunately > A> it doesn't work that way. > > Okay, it appeared that there are users, even on current@ mailing > list during couple of hours of exposition. In my experience, that is because they are reporting a crash. > Can we keep the old option as compatibility? > > From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 16:24: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 E4255A9C; Tue, 23 Oct 2012 16:24:03 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-oa0-f54.google.com (mail-oa0-f54.google.com [209.85.219.54]) by mx1.freebsd.org (Postfix) with ESMTP id 65CEE8FC0A; Tue, 23 Oct 2012 16:24:03 +0000 (UTC) Received: by mail-oa0-f54.google.com with SMTP id n9so4991994oag.13 for ; Tue, 23 Oct 2012 09:24:02 -0700 (PDT) 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; bh=1xz5PrQTGIRxXNmN6MXjDE5A1LPORoomKoNQBsQm2kU=; b=P5B1sdrTOUByjCZeXYk86mlBs9xwjfFaA/IZoODDaaKSe1kz6Cf6vkYJQmHB62+DAn IDE0ZpAUQ2ZxFVeqQyfWjQ5ZQYoPNIwlSBbR+jNG3z65sdwq4/U9b7kJ72UyN7TRVXUt kBHqWRXCLNrBX0MxpKlYPG0KlZwkhZKPFADKVQMnOeobCPp85l01qQTvx8JEIiYo4tk2 h4NZuCPg3r1+eGgXTUNlGtm/vDQHA4zGCy4gmMIXkfQ5Ui5im5OxubRro6xRRmUhdud7 A6MfhkQapbSBDjDE3WSqOgCMpOHXmGIUh0zt9SfN4opqQTV48sNOSoNZOGoFmT85aSB9 lJzg== MIME-Version: 1.0 Received: by 10.182.172.74 with SMTP id ba10mr10479850obc.83.1351009442918; Tue, 23 Oct 2012 09:24:02 -0700 (PDT) Received: by 10.76.143.33 with HTTP; Tue, 23 Oct 2012 09:24:02 -0700 (PDT) In-Reply-To: <20121023101618.GP70741@FreeBSD.org> References: <201210230833.q9N8XEas020937@svn.freebsd.org> <50865F60.4040409@freebsd.org> <20121023101618.GP70741@FreeBSD.org> Date: Tue, 23 Oct 2012 09:24:02 -0700 Message-ID: Subject: Re: svn commit: r241923 - in head/sys: netinet netipsec From: Garrett Cooper To: Gleb Smirnoff Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Andre Oppermann X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 16:24:04 -0000 On Tue, Oct 23, 2012 at 3:16 AM, Gleb Smirnoff wrote: > On Tue, Oct 23, 2012 at 11:12:00AM +0200, Andre Oppermann wrote: > A> On 23.10.2012 10:33, Gleb Smirnoff wrote: > A> > Author: glebius > A> > Date: Tue Oct 23 08:33:13 2012 > A> > New Revision: 241923 > A> > URL: http://svn.freebsd.org/changeset/base/241923 > A> > > A> > Log: > A> > Do not reduce ip_len by size of IP header in the ip_input() > A> > before passing a packet to protocol input routines. > A> > For several protocols this mean that now protocol needs to > A> > do subtraction itself, and for another half this means that > A> > we do not need to add header length back to the packet. > A> > A> Yay! More Mammoth shit getting washed away! ;) > A> > A> Please add an entry to UPDATING as the convention of of ip_len > A> subtraction has been there since forever. That makes it easier > A> to discover for third parties writing code. > > Not sure it worth. Never heard of any loadable protocol outside > of tree. > > Those loadable protocols that we have in tree (carp, divert) do > not look at ip_len. I would follow Andre's advice. People can get clever when developing under a tight deadline, which can result in interesting breakage. Thanks! -Garrett From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 16:33: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 4B768C94; Tue, 23 Oct 2012 16:33:44 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 326B18FC08; Tue, 23 Oct 2012 16:33: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 q9NGXiNq010299; Tue, 23 Oct 2012 16:33:44 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NGXhIX010297; Tue, 23 Oct 2012 16:33:43 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201210231633.q9NGXhIX010297@svn.freebsd.org> From: Andre Oppermann Date: Tue, 23 Oct 2012 16:33:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241955 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 16:33:44 -0000 Author: andre Date: Tue Oct 23 16:33:43 2012 New Revision: 241955 URL: http://svn.freebsd.org/changeset/base/241955 Log: Note the removal of the ZERO_COPY_SOCKETS kernel option in r241931 and provide a proper explanation. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Oct 23 16:12:17 2012 (r241954) +++ head/UPDATING Tue Oct 23 16:33:43 2012 (r241955) @@ -25,6 +25,17 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 "ln -s 'abort:false,junk:false' /etc/malloc.conf".) 20121023: + The ZERO_COPY_SOCKET kernel option has been removed and + split into SOCKET_SEND_COW and SOCKET_RECV_PFLIP. + NB: SOCKET_SEND_COW uses the VM page based copy-on-write + mechanism which is not safe and may result in kernel crashes. + NB: The SOCKET_RECV_PFLIP mechanism is useless as no current + driver supports disposeable external page sized mbuf storage. + Proper replacements for both zero-copy mechanisms are under + consideration and will eventually lead to complete removal + of the two kernel options. + +20121023: The IPv4 network stack has been converted to network byte order. The following modules need to be recompiled together with kernel: carp(4), divert(4), gif(4), siftr(4), gre(4), From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 16:38: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 77662FC0 for ; Tue, 23 Oct 2012 16:38:29 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id C6BD68FC1A for ; Tue, 23 Oct 2012 16:38:27 +0000 (UTC) Received: (qmail 86553 invoked from network); 23 Oct 2012 18:16:26 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 23 Oct 2012 18:16:26 -0000 Message-ID: <5086C7F8.5070104@freebsd.org> Date: Tue, 23 Oct 2012 18:38:16 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: Bryan Drewery Subject: Re: svn commit: r241931 - in head/sys: conf kern References: <201210231419.q9NEJjYH082863@svn.freebsd.org> <20121023144211.GX70741@FreeBSD.org> <5086B24C.9000606@freebsd.org> <5086B613.4060804@FreeBSD.org> In-Reply-To: <5086B613.4060804@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 16:38:29 -0000 On 23.10.2012 17:21, Bryan Drewery wrote: > On 10/23/2012 10:05 AM, Andre Oppermann wrote: >> There shouldn't be any users. Zero copy send is broken and >> responsible for random kernel crashes. Zero copy receive isn't >> supported by any modern driver. Both are useless to dangerous. > > I enabled this a few weeks ago, not knowing it was useless/dangerous. > > Perhaps an entry in UPDATING to note that this has been renamed and that > it may not actually be useful? Good idea. Will do. > Also, zero_copy(9) needs updating, as it references ZERO_COPY_SOCKETS. Already done in r241932. -- Andre From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 16:39: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 230A01B2 for ; Tue, 23 Oct 2012 16:39:04 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 825098FC1B for ; Tue, 23 Oct 2012 16:39:03 +0000 (UTC) Received: (qmail 86564 invoked from network); 23 Oct 2012 18:17:02 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 23 Oct 2012 18:17:02 -0000 Message-ID: <5086C81C.5010604@freebsd.org> Date: Tue, 23 Oct 2012 18:38:52 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r241931 - in head/sys: conf kern References: <201210231419.q9NEJjYH082863@svn.freebsd.org> <20121023144211.GX70741@FreeBSD.org> <5086B24C.9000606@freebsd.org> <20121023160501.GB70741@FreeBSD.org> In-Reply-To: <20121023160501.GB70741@FreeBSD.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 16:39:04 -0000 On 23.10.2012 18:05, Gleb Smirnoff wrote: > On Tue, Oct 23, 2012 at 05:05:48PM +0200, Andre Oppermann wrote: > A> There shouldn't be any users. Zero copy send is broken and > A> responsible for random kernel crashes. Zero copy receive isn't > A> supported by any modern driver. Both are useless to dangerous. > A> > A> The main problem with ZERO_COPY_SOCKETS was that it sounded great > A> and who wouldn't want to have zero copy sockets? Unfortunately > A> it doesn't work that way. > > Okay, it appeared that there are users, even on current@ mailing > list during couple of hours of exposition. > > Can we keep the old option as compatibility? No. They are not users. They simply fell for the promise of "zero copy" which it isn't. It doesn't do what the "users" believe it does. It's useless for receive and dangerous for send. I have updated NOTES and forwarded it to -current. -- Andre From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 16:54: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 E1176751; Tue, 23 Oct 2012 16:54:57 +0000 (UTC) (envelope-from tuexen@fh-muenster.de) 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 D4E458FC0C; Tue, 23 Oct 2012 16:54:56 +0000 (UTC) Received: from [192.168.1.103] (p508F9AE1.dip.t-dialin.net [80.143.154.225]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTP id 46E3A1C0C0692; Tue, 23 Oct 2012 18:54:54 +0200 (CEST) Subject: Re: svn commit: r241916 - in head/sys: netinet netinet6 Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=us-ascii From: Michael Tuexen In-Reply-To: <20121023142219.K1008@besplex.bde.org> Date: Tue, 23 Oct 2012 18:54:53 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201210222149.q9MLnvrt014543@svn.freebsd.org> <20121023142219.K1008@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.1283) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Xin LI X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 16:54:58 -0000 On Oct 23, 2012, at 6:23 AM, Bruce Evans wrote: > On Mon, 22 Oct 2012, Xin LI wrote: >=20 >> Log: >> Remove __P. >=20 > This was a chance to remove style bugs in the prototypes. At least it > didn't create so many new ones, unlike the original __P axing. It > still enlarged about a hundred by changing from Gnu style continuation > to Gnu style continuation indentation with an off-by-5 error. Hi Bruce, please note that the SCTP code in the FreeBSD sources is generated via an export script from a codebase which runs on multiple platforms. The script tries to follow FreeBSDs guidelines, but is far from being perfect. Best regards Michael >=20 >> Modified: head/sys/netinet/sctp_uio.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/netinet/sctp_uio.h Mon Oct 22 21:26:36 2012 = (r241915) >> +++ head/sys/netinet/sctp_uio.h Mon Oct 22 21:49:56 2012 = (r241916) >> @@ -1267,44 +1267,44 @@ sctp_sorecvmsg(struct socket *so, >> #if !(defined(_KERNEL)) && !(defined(__Userspace__)) >>=20 >> __BEGIN_DECLS >> -int sctp_peeloff __P((int, sctp_assoc_t)); >> -int sctp_bindx __P((int, struct sockaddr *, int, int)); >> -int sctp_connectx __P((int, const struct sockaddr *, int, = sctp_assoc_t *)); >> -int sctp_getaddrlen __P((sa_family_t)); >> -int sctp_getpaddrs __P((int, sctp_assoc_t, struct sockaddr **)); >> -void sctp_freepaddrs __P((struct sockaddr *)); >> -int sctp_getladdrs __P((int, sctp_assoc_t, struct sockaddr **)); >> -void sctp_freeladdrs __P((struct sockaddr *)); >> -int sctp_opt_info __P((int, sctp_assoc_t, int, void *, socklen_t = *)); >> +int sctp_peeloff(int, sctp_assoc_t); >> +int sctp_bindx(int, struct sockaddr *, int, int); >> +int sctp_connectx(int, const struct sockaddr *, int, sctp_assoc_t = *); >> +int sctp_getaddrlen(sa_family_t); >> +int sctp_getpaddrs(int, sctp_assoc_t, struct sockaddr **); >> +void sctp_freepaddrs(struct sockaddr *); >> +int sctp_getladdrs(int, sctp_assoc_t, struct sockaddr **); >> +void sctp_freeladdrs(struct sockaddr *); >> +int sctp_opt_info(int, sctp_assoc_t, int, void *, socklen_t *); >=20 > sctp is fairly consistent in having style bugs on every line. It > never indented fucntion names in prototypes. >=20 >>=20 >> /* deprecated */ >> ssize_t sctp_sendmsg >> -__P((int, const void *, size_t, const struct sockaddr *, >> - socklen_t, uint32_t, uint32_t, uint16_t, uint32_t, uint32_t)); >> +(int, const void *, size_t, const struct sockaddr *, >> + socklen_t, uint32_t, uint32_t, uint16_t, uint32_t, uint32_t); >=20 > Putting the __P(( unindented on a new line was weird. It is weirder > now with the __P( part. >=20 >>=20 >> /* deprecated */ >> - ssize_t sctp_send __P((int, const void *, size_t, >> - const struct sctp_sndrcvinfo *, int)); >> + ssize_t sctp_send(int, const void *, size_t, >> + const struct sctp_sndrcvinfo *, int); >=20 > Continuation lines were weirdly indented in at least this part of = sctp. > This one uses 14 spaces, underneath a line with 1 tab. 1 tab followed > by 4 spaces would be normal. Since the 14 spaces didn't line up with > anything, removing __P( leaves the continuation line not lined up with > anything slightly differently. >=20 >> ... >> /* deprecated */ >> - ssize_t sctp_recvmsg __P((int, void *, size_t, struct sockaddr = *, socklen_t *, >> - struct sctp_sndrcvinfo *, int *)); >> + ssize_t sctp_recvmsg(int, void *, size_t, struct sockaddr *, = socklen_t *, >> + struct sctp_sndrcvinfo *, int *); >=20 > Here there are 17 spaces instead of 14. >=20 >> Modified: head/sys/netinet6/icmp6.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/netinet6/icmp6.c Mon Oct 22 21:26:36 2012 = (r241915) >> +++ head/sys/netinet6/icmp6.c Mon Oct 22 21:49:56 2012 = (r241916) >> @@ -133,15 +133,15 @@ VNET_DECLARE(int, icmp6_nodeinfo); >> static void icmp6_errcount(struct icmp6errstat *, int, int); >> static int icmp6_rip6_input(struct mbuf **, int); >> static int icmp6_ratelimit(const struct in6_addr *, const int, const = int); >> -static const char *icmp6_redirect_diag __P((struct in6_addr *, >> - struct in6_addr *, struct in6_addr *)); >> +static const char *icmp6_redirect_diag(struct in6_addr *, >> + struct in6_addr *, struct in6_addr *); >=20 > Function names not indented. >=20 > Continuation lines indented abnormally with 1 tab so that it doesn't > line up with anything. >=20 >> static struct mbuf *ni6_input(struct mbuf *, int); >> static struct mbuf *ni6_nametodns(const char *, int, int); >> static int ni6_dnsmatch(const char *, int, const char *, int); >> -static int ni6_addrs __P((struct icmp6_nodeinfo *, struct mbuf *, >> - struct ifnet **, struct in6_addr *)); >> -static int ni6_store_addrs __P((struct icmp6_nodeinfo *, struct = icmp6_nodeinfo *, >> - struct ifnet *, int)); >=20 > Here the continuation lines were indented abnormally but using Gnu = style > (indent -lp) so that they lined up with the parantheses using a = mixture > of tabs and spaces. >=20 >> +static int ni6_addrs(struct icmp6_nodeinfo *, struct mbuf *, >> + struct ifnet **, struct in6_addr *); >> +static int ni6_store_addrs(struct icmp6_nodeinfo *, struct = icmp6_nodeinfo *, >> + struct ifnet *, int); >=20 > Now after removing __P( and closing up a space, the contination lines = don't > even follow Gnu style, but are off by 5 spaces. >=20 >> static int icmp6_notify_error(struct mbuf **, int, int, int); >>=20 >> /* >>=20 >> Modified: head/sys/netinet6/in6.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/netinet6/in6.c Mon Oct 22 21:26:36 2012 = (r241915) >> +++ head/sys/netinet6/in6.c Mon Oct 22 21:49:56 2012 = (r241916) >> @@ -129,10 +129,10 @@ const struct in6_addr in6mask128 =3D IN6MA >> const struct sockaddr_in6 sa6_any =3D >> { sizeof(sa6_any), AF_INET6, 0, 0, IN6ADDR_ANY_INIT, 0 }; >>=20 >> -static int in6_lifaddr_ioctl __P((struct socket *, u_long, caddr_t, >> - struct ifnet *, struct thread *)); >> -static int in6_ifinit __P((struct ifnet *, struct in6_ifaddr *, >> - struct sockaddr_in6 *, int)); >> +static int in6_lifaddr_ioctl(struct socket *, u_long, caddr_t, >> + struct ifnet *, struct thread *); >> +static int in6_ifinit(struct ifnet *, struct in6_ifaddr *, >> + struct sockaddr_in6 *, int); >> static void in6_unlink_ifa(struct in6_ifaddr *, struct ifnet *); >>=20 >> int (*faithprefix_p)(struct in6_addr *); >=20 > netinet6 mostly had the first type of misindentation of continued = lines, > so removing __P( doesn't increase the style bugs. >=20 >> Modified: head/sys/netinet6/in6.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/netinet6/in6.h Mon Oct 22 21:26:36 2012 = (r241915) >> +++ head/sys/netinet6/in6.h Mon Oct 22 21:49:56 2012 = (r241916) >> @@ -635,22 +635,22 @@ struct cmsghdr; >> struct ip6_hdr; >>=20 >> int in6_cksum_pseudo(struct ip6_hdr *, uint32_t, uint8_t, uint16_t); >> -int in6_cksum __P((struct mbuf *, u_int8_t, u_int32_t, u_int32_t)); >> -int in6_localaddr __P((struct in6_addr *)); >> +int in6_cksum(struct mbuf *, u_int8_t, u_int32_t, u_int32_t); >> +int in6_localaddr(struct in6_addr *); >> int in6_localip(struct in6_addr *); >=20 > netinet actually had normal style here, except for __P( and a weird = mixture > of uintN_t with u_intN_t. >=20 >> -int in6_addrscope __P((struct in6_addr *)); >> -struct in6_ifaddr *in6_ifawithifp __P((struct ifnet *, struct = in6_addr *)); >> -extern void in6_if_up __P((struct ifnet *)); >> +int in6_addrscope(struct in6_addr *); >> +struct in6_ifaddr *in6_ifawithifp(struct ifnet *, struct = in6_addr *); >> +extern void in6_if_up(struct ifnet *); >=20 > 'extern' on prototypes is even more archaic than __P(()), and is a = style > bug. It may have been needed for portability in 1980. >=20 >> struct sockaddr; >=20 > Mispaced declaration: > (1) it is in the middle of the prototypes but not attached to the one = (?) > prototype that uses it. For other declarations, this file uses the > more normal style of forward-incompete-declaring structs in a = subsection > before all the prototypes. > (2) a subsection is not started or ended for it. >=20 >> extern u_char ip6_protox[]; >>=20 >=20 > Misplaced declaration: > (1) it is a data declaration in the middle of the prototypes but not = even > used by the prototypes. > (2) a subsection is ended for it but not started. >=20 >> -void in6_sin6_2_sin __P((struct sockaddr_in *sin, >> - struct sockaddr_in6 *sin6)); >> -void in6_sin_2_v4mapsin6 __P((struct sockaddr_in *sin, >> - struct sockaddr_in6 *sin6)); >=20 > These used to line up. >=20 >> -void in6_sin6_2_sin_in_sock __P((struct sockaddr *nam)); >> -void in6_sin_2_v4mapsin6_in_sock __P((struct sockaddr = **nam)); >=20 >> -extern void addrsel_policy_init __P((void)); >=20 > Another extern, with no indentation. >=20 >> +void in6_sin6_2_sin(struct sockaddr_in *sin, >> + struct sockaddr_in6 *sin6); >> +void in6_sin_2_v4mapsin6(struct sockaddr_in *sin, >> + struct sockaddr_in6 *sin6); >=20 > Now off 5 spaces. The misindentation is more visible in the diffs = than > above because both lines use tabs normally. >=20 >> +void in6_sin6_2_sin_in_sock(struct sockaddr *nam); >> +void in6_sin_2_v4mapsin6_in_sock(struct sockaddr **nam); >> +extern void addrsel_policy_init(void); >=20 > It still has the extern. >=20 >>=20 >> #define satosin6(sa) ((struct sockaddr_in6 *)(sa)) >> #define sin6tosa(sin6) ((struct sockaddr *)(sin6)) >> @@ -674,43 +674,43 @@ typedef __socklen_t socklen_t; >> __BEGIN_DECLS >> struct cmsghdr; >>=20 >> -extern int inet6_option_space __P((int)); >> -extern int inet6_option_init __P((void *, struct cmsghdr **, int)); >> -extern int inet6_option_append __P((struct cmsghdr *, const uint8_t = *, >> - int, int)); >> -extern uint8_t *inet6_option_alloc __P((struct cmsghdr *, int, int, = int)); >> -extern int inet6_option_next __P((const struct cmsghdr *, uint8_t = **)); >> -extern int inet6_option_find __P((const struct cmsghdr *, uint8_t = **, int)); >> - >> -extern size_t inet6_rthdr_space __P((int, int)); >> -extern struct cmsghdr *inet6_rthdr_init __P((void *, int)); >> -extern int inet6_rthdr_add __P((struct cmsghdr *, const struct = in6_addr *, >> - unsigned int)); >> -extern int inet6_rthdr_lasthop __P((struct cmsghdr *, unsigned = int)); >> +extern int inet6_option_space(int); >> +extern int inet6_option_init(void *, struct cmsghdr **, int); >> +extern int inet6_option_append(struct cmsghdr *, const uint8_t *, >> + int, int); >> +extern uint8_t *inet6_option_alloc(struct cmsghdr *, int, int, int); >> +extern int inet6_option_next(const struct cmsghdr *, uint8_t **); >> +extern int inet6_option_find(const struct cmsghdr *, uint8_t **, = int); >> + >> +extern size_t inet6_rthdr_space(int, int); >> +extern struct cmsghdr *inet6_rthdr_init(void *, int); >> +extern int inet6_rthdr_add(struct cmsghdr *, const struct in6_addr = *, >> + unsigned int); >> +extern int inet6_rthdr_lasthop(struct cmsghdr *, unsigned int); >> #if 0 /* not implemented yet */ >> -extern int inet6_rthdr_reverse __P((const struct cmsghdr *, struct = cmsghdr *)); >> +extern int inet6_rthdr_reverse(const struct cmsghdr *, struct = cmsghdr *); >> #endif >> -extern int inet6_rthdr_segments __P((const struct cmsghdr *)); >> -extern struct in6_addr *inet6_rthdr_getaddr __P((struct cmsghdr *, = int)); >> -extern int inet6_rthdr_getflags __P((const struct cmsghdr *, int)); >> - >> -extern int inet6_opt_init __P((void *, socklen_t)); >> -extern int inet6_opt_append __P((void *, socklen_t, int, uint8_t, = socklen_t, >> - uint8_t, void **)); >> -extern int inet6_opt_finish __P((void *, socklen_t, int)); >> -extern int inet6_opt_set_val __P((void *, int, void *, socklen_t)); >> - >> -extern int inet6_opt_next __P((void *, socklen_t, int, uint8_t *, = socklen_t *, >> - void **)); >> -extern int inet6_opt_find __P((void *, socklen_t, int, uint8_t, = socklen_t *, >> - void **)); >> -extern int inet6_opt_get_val __P((void *, int, void *, socklen_t)); >> -extern socklen_t inet6_rth_space __P((int, int)); >> -extern void *inet6_rth_init __P((void *, socklen_t, int, int)); >> -extern int inet6_rth_add __P((void *, const struct in6_addr *)); >> -extern int inet6_rth_reverse __P((const void *, void *)); >> -extern int inet6_rth_segments __P((const void *)); >> -extern struct in6_addr *inet6_rth_getaddr __P((const void *, int)); >> +extern int inet6_rthdr_segments(const struct cmsghdr *); >> +extern struct in6_addr *inet6_rthdr_getaddr(struct cmsghdr *, int); >> +extern int inet6_rthdr_getflags(const struct cmsghdr *, int); >> + >> +extern int inet6_opt_init(void *, socklen_t); >> +extern int inet6_opt_append(void *, socklen_t, int, uint8_t, = socklen_t, >> + uint8_t, void **); >> +extern int inet6_opt_finish(void *, socklen_t, int); >> +extern int inet6_opt_set_val(void *, int, void *, socklen_t); >> + >> +extern int inet6_opt_next(void *, socklen_t, int, uint8_t *, = socklen_t *, >> + void **); >> +extern int inet6_opt_find(void *, socklen_t, int, uint8_t, socklen_t = *, >> + void **); >> +extern int inet6_opt_get_val(void *, int, void *, socklen_t); >> +extern socklen_t inet6_rth_space(int, int); >> +extern void *inet6_rth_init(void *, socklen_t, int, int); >> +extern int inet6_rth_add(void *, const struct in6_addr *); >> +extern int inet6_rth_reverse(const void *, void *); >> +extern int inet6_rth_segments(const void *); >> +extern struct in6_addr *inet6_rth_getaddr(const void *, int); >> __END_DECLS >=20 > Squillions of externs, and no tabs except to consistently misindent > continuation lines, so removing __P( didn't make the indentation = worse. >=20 > This apparently uses extern because userland is more likely than the > kernel to be compiled by a 1980 model compiler. But the 1980 model > won't have dreamed of prototypes, so removing __P(()) breaks the > sources for it completely, and the externs are useless. >=20 >>=20 >> #endif /* __BSD_VISIBLE */ >>=20 >> Modified: head/sys/netinet6/in6_gif.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/netinet6/in6_gif.h Mon Oct 22 21:26:36 2012 = (r241915) >> +++ head/sys/netinet6/in6_gif.h Mon Oct 22 21:49:56 2012 = (r241916) >> @@ -36,10 +36,10 @@ >> #define GIF_HLIM 30 >>=20 >> struct gif_softc; >> -int in6_gif_input __P((struct mbuf **, int *, int)); >> -int in6_gif_output __P((struct ifnet *, int, struct mbuf *)); >> -int gif_encapcheck6 __P((const struct mbuf *, int, int, void *)); >> -int in6_gif_attach __P((struct gif_softc *)); >> -int in6_gif_detach __P((struct gif_softc *)); >> +int in6_gif_input(struct mbuf **, int *, int); >> +int in6_gif_output(struct ifnet *, int, struct mbuf *); >> +int gif_encapcheck6(const struct mbuf *, int, int, void *); >> +int in6_gif_attach(struct gif_softc *); >> +int in6_gif_detach(struct gif_softc *); >=20 > Another place for forward incomplete struct declarations. >=20 > These prototypes remain misindented and unsorted. >=20 > The gif_encapcheck6() one seems to be in a wrong namespace and is = unsorted > into the middle of the in6 ones. If it were named in6_gig_enc..., = then it > would still be unsorted. >=20 >>=20 >> #endif /* _NETINET6_IN6_GIF_H_ */ >>=20 >=20 > Backwards comment. >=20 > [... Lots more similarly] >=20 >> Modified: head/sys/netinet6/in6_pcb.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/netinet6/in6_pcb.h Mon Oct 22 21:26:36 2012 = (r241915) >> +++ head/sys/netinet6/in6_pcb.h Mon Oct 22 21:49:56 2012 = (r241916) >> @@ -72,53 +72,53 @@ >> struct inpcbgroup * >> in6_pcbgroup_byhash(struct inpcbinfo *, u_int, uint32_t); >> struct inpcbgroup * >> - in6_pcbgroup_byinpcb __P((struct inpcb *)); >> + in6_pcbgroup_byinpcb(struct inpcb *); >> struct inpcbgroup * >> in6_pcbgroup_bymbuf(struct inpcbinfo *, struct mbuf *); >> struct inpcbgroup * >> - in6_pcbgroup_bytuple __P((struct inpcbinfo *, const struct = in6_addr *, >> - u_short, const struct in6_addr *, u_short)); >> + in6_pcbgroup_bytuple(struct inpcbinfo *, const struct in6_addr = *, >> + u_short, const struct in6_addr *, u_short); >=20 > Normal style to a fault. It even has the tab after 'struct' to = bogusly > line up the struct tag. FreeBSD stopped requiring this mistake 10-15 > years ago. I don't remember if it is still accepted. >=20 > With normal style, removing __P( doesn't affect the continued line. >=20 > This still uses u_short instead of u_int16_t or uint16_t. >=20 >> ... >> struct inpcb * >> - in6_pcblookup_local __P((struct inpcbinfo *, >> + in6_pcblookup_local(struct inpcbinfo *, >> struct in6_addr *, u_short, int, >> - struct ucred *)); >> + struct ucred *); >=20 > Back to abnormal indentation for the continued lines.o > Removing __P( breaks it further, as usual. >=20 > The abnormal indentation is also partly responsible for needing 2 > continuation lines instead of 1. But there was space for more args > before splitting, and after removal of __P( there is even more space. > Complete editing of __P( would create larger chur^diffs by often > moving 1 arg from each line back to the previous line in multi-line > prototypes after removing __P( gives enough space for 1 more arg on > the first line. >=20 >> struct inpcb * >> - in6_pcblookup __P((struct inpcbinfo *, struct in6_addr *, >> + in6_pcblookup(struct inpcbinfo *, struct in6_addr *, >> u_int, struct in6_addr *, u_int, int, >> - struct ifnet *)); >> + struct ifnet *); >> struct inpcb * >> - in6_pcblookup_hash_locked __P((struct inpcbinfo *, struct = in6_addr *, >> + in6_pcblookup_hash_locked(struct inpcbinfo *, struct in6_addr *, >> u_int, struct in6_addr *, u_int, int, >> - struct ifnet *)); >> + struct ifnet *); >> struct inpcb * >> - in6_pcblookup_mbuf __P((struct inpcbinfo *, struct in6_addr *, >> + in6_pcblookup_mbuf(struct inpcbinfo *, struct in6_addr *, >> u_int, struct in6_addr *, u_int, int, >> - struct ifnet *ifp, struct mbuf *)); >> -void in6_pcbnotify __P((struct inpcbinfo *, struct sockaddr = *, >> + struct ifnet *ifp, struct mbuf *); >> +void in6_pcbnotify(struct inpcbinfo *, struct sockaddr *, >> u_int, const struct sockaddr *, u_int, int, = void *, >> - struct inpcb *(*)(struct inpcb *, int))); >> + struct inpcb *(*)(struct inpcb *, int)); >=20 > Lots more off-by-5 errors. >=20 >> struct inpcb * >> - in6_rtchange __P((struct inpcb *, int)); >> + in6_rtchange(struct inpcb *, int); >=20 > After this point, most of the parameters have names, but before it = they > don't. >=20 >> struct sockaddr * >> - in6_sockaddr __P((in_port_t port, struct in6_addr *addr_p)); >> + in6_sockaddr(in_port_t port, struct in6_addr *addr_p); >> struct sockaddr * >> - in6_v4mapsin6_sockaddr __P((in_port_t port, struct in_addr = *addr_p)); >> -int in6_getpeeraddr __P((struct socket *so, struct sockaddr **nam)); >> -int in6_getsockaddr __P((struct socket *so, struct sockaddr **nam)); >> -int in6_mapped_sockaddr __P((struct socket *so, struct sockaddr = **nam)); >> -int in6_mapped_peeraddr __P((struct socket *so, struct sockaddr = **nam)); >> -int in6_selecthlim __P((struct in6pcb *, struct ifnet *)); >> -int in6_pcbsetport __P((struct in6_addr *, struct inpcb *, struct = ucred *)); >=20 > Back to no names on parameters. >=20 >> -void init_sin6 __P((struct sockaddr_in6 *sin6, struct mbuf = *m)); >=20 > Especially large unsorting and/or namespace error. >=20 >> + in6_v4mapsin6_sockaddr(in_port_t port, struct in_addr *addr_p); >> +int in6_getpeeraddr(struct socket *so, struct sockaddr **nam); >> +int in6_getsockaddr(struct socket *so, struct sockaddr **nam); >> +int in6_mapped_sockaddr(struct socket *so, struct sockaddr **nam); >> +int in6_mapped_peeraddr(struct socket *so, struct sockaddr **nam); >> +int in6_selecthlim(struct in6pcb *, struct ifnet *); >> +int in6_pcbsetport(struct in6_addr *, struct inpcb *, struct ucred = *); >> +void init_sin6(struct sockaddr_in6 *sin6, struct mbuf *m); >=20 > The order seems to have been originally alphabetical with random > accretions. >=20 >> #endif /* _KERNEL */ >>=20 >> #endif /* !_NETINET6_IN6_PCB_H_ */ >=20 > At least this comment isn't backwards. >=20 >> ... >> Modified: head/sys/netinet6/in6_var.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/netinet6/in6_var.h Mon Oct 22 21:26:36 2012 = (r241915) >> +++ head/sys/netinet6/in6_var.h Mon Oct 22 21:49:56 2012 = (r241916) >> @@ -762,36 +762,36 @@ int in6_leavegroup(struct in6_multi_mshi >> ... >> +int in6_prefix_ioctl(struct socket *, u_long, caddr_t, >> + struct ifnet *); >=20 > After removing __P(, the line splitting is no longer needed. >=20 > [... Lots more similarly] >=20 > Bruce >=20 From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 17:53: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 77B37BD; Tue, 23 Oct 2012 17:53:21 +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 5FA868FC16; Tue, 23 Oct 2012 17:53: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 q9NHrLAB023760; Tue, 23 Oct 2012 17:53:21 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NHrLYe023757; Tue, 23 Oct 2012 17:53:21 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201210231753.q9NHrLYe023757@svn.freebsd.org> From: Xin LI Date: Tue, 23 Oct 2012 17:53:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r241956 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 17:53:21 -0000 Author: delphij Date: Tue Oct 23 17:53:20 2012 New Revision: 241956 URL: http://svn.freebsd.org/changeset/base/241956 Log: Enhance Erwin Lansing (erwin@)'s commit bit collection to include src/. He will start by working on maintaining BIND in the base system and I will be walking him through the first few commits. Approved by: core Modified: svnadmin/conf/access svnadmin/conf/mentors Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Tue Oct 23 16:33:43 2012 (r241955) +++ svnadmin/conf/access Tue Oct 23 17:53:20 2012 (r241956) @@ -82,6 +82,7 @@ eivind emaste emax eri +erwin fabient fanf fjoe Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Tue Oct 23 16:33:43 2012 (r241955) +++ svnadmin/conf/mentors Tue Oct 23 17:53:20 2012 (r241956) @@ -17,6 +17,7 @@ bgray cognet davidcs gnn eadler cperciva eri mlaier Co-mentor: thompsa +erwin delphij jceel wkoszek Co-mentor: cognet jinmei gnn jlh kib From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 17:59: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 961CA388; Tue, 23 Oct 2012 17:59:44 +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 E4C618FC0C; Tue, 23 Oct 2012 17:59:43 +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 q9NHxlO6070161; Tue, 23 Oct 2012 20:59:47 +0300 (EEST) (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 q9NHxa0k025199; Tue, 23 Oct 2012 20:59:36 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q9NHxZlw025198; Tue, 23 Oct 2012 20:59:35 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 23 Oct 2012 20:59:35 +0300 From: Konstantin Belousov To: Maxim Sobolev Subject: Re: svn commit: r241625 - head/usr.sbin/cron/cron Message-ID: <20121023175935.GY35915@deviant.kiev.zoral.com.ua> References: <201210170044.q9H0iZHo055977@svn.freebsd.org> <20121017174814.GN35915@deviant.kiev.zoral.com.ua> <507F0FF8.3090602@FreeBSD.org> <20121017201811.GO35915@deviant.kiev.zoral.com.ua> <50856FE9.1020807@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5nUKqBW0XvnsonJi" Content-Disposition: inline In-Reply-To: <50856FE9.1020807@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) 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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 17:59:44 -0000 --5nUKqBW0XvnsonJi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 22, 2012 at 09:10:17AM -0700, Maxim Sobolev wrote: > Guys, >=20 > The latest version of the patch against current HEAD is available here: >=20 > http://sobomax.sippysoft.com/cron.diff >=20 > Any comments/suggestions are appreciated. This version should default to= =20 > previous behaviour of waking up every 60 seconds unless there is=20 > @every_second entry in the cron. >=20 > Konstantin, can you please put it for testing to your boxes? Please make= =20 > sure to do `make clean' after applying it, as libcron is not listed as a= =20 > dependency for cron, so it's possible that some changes may not be=20 > picked up. I patched the HEAD with the provided diff, and did make clean all in usr.sbin/cron. The resulting binary correctly handled both /etc/crontab and personal crontabs with the each-minute jobs. I did not read the changed logic. Still, I suggest you to wrap the too-long line in the patch. Also, it seems that the changes would benefit from (extensive) commenting in the code. --5nUKqBW0XvnsonJi Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlCG2wcACgkQC3+MBN1Mb4i0lACg4XaUp9zqsXjIlrTiiiBrBrQO HjYAnRMK1IZ6FmobeGnHNm878IZ0rsqZ =Pcdk -----END PGP SIGNATURE----- --5nUKqBW0XvnsonJi-- From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 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 C3DEAAF8; Tue, 23 Oct 2012 18:28:39 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail35.syd.optusnet.com.au (mail35.syd.optusnet.com.au [211.29.133.51]) by mx1.freebsd.org (Postfix) with ESMTP id 3B40E8FC0C; Tue, 23 Oct 2012 18:28:39 +0000 (UTC) Received: from c122-106-175-26.carlnfd1.nsw.optusnet.com.au (c122-106-175-26.carlnfd1.nsw.optusnet.com.au [122.106.175.26]) by mail35.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q9NISEhD018400 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 24 Oct 2012 05:28:21 +1100 Date: Wed, 24 Oct 2012 05:28:14 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Michael Tuexen Subject: Re: svn commit: r241916 - in head/sys: netinet netinet6 In-Reply-To: Message-ID: <20121024052525.T4723@besplex.bde.org> References: <201210222149.q9MLnvrt014543@svn.freebsd.org> <20121023142219.K1008@besplex.bde.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, Xin LI , Bruce Evans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 18:28:40 -0000 On Tue, 23 Oct 2012, Michael Tuexen wrote: > On Oct 23, 2012, at 6:23 AM, Bruce Evans wrote: > >> On Mon, 22 Oct 2012, Xin LI wrote: >> >>> Log: >>> Remove __P. >> >> This was a chance to remove style bugs in the prototypes. At least it >> didn't create so many new ones, unlike the original __P axing. It >> still enlarged about a hundred by changing from Gnu style continuation >> to Gnu style continuation indentation with an off-by-5 error. > > please note that the SCTP code in the FreeBSD sources is generated > via an export script from a codebase which runs on multiple platforms. > The script tries to follow FreeBSDs guidelines, but is far from being > perfect. The export script might not like manual editing of its output. Portability might require __P(()), and then removing it cleaning requires a complicated script. Bruce From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 18:36:08 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 3349FE90; Tue, 23 Oct 2012 18:36:08 +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 162728FC19; Tue, 23 Oct 2012 18:36: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 q9NIa7vV031015; Tue, 23 Oct 2012 18:36:07 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NIa7wa031007; Tue, 23 Oct 2012 18:36:07 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201210231836.q9NIa7wa031007@svn.freebsd.org> From: Dimitry Andric Date: Tue, 23 Oct 2012 18:36:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241957 - in head/contrib/libstdc++: config/os/bsd/freebsd include/bits include/std X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 18:36:08 -0000 Author: dim Date: Tue Oct 23 18:36:07 2012 New Revision: 241957 URL: http://svn.freebsd.org/changeset/base/241957 Log: Fix several clang warnings in libstdc++, which were exposed by the recent atf import. These changes are purely cosmetic, no functional change. MFC after: 1 week Modified: head/contrib/libstdc++/config/os/bsd/freebsd/ctype_base.h head/contrib/libstdc++/include/bits/fstream.tcc head/contrib/libstdc++/include/bits/locale_facets.h head/contrib/libstdc++/include/bits/locale_facets.tcc head/contrib/libstdc++/include/bits/streambuf_iterator.h head/contrib/libstdc++/include/std/std_sstream.h Modified: head/contrib/libstdc++/config/os/bsd/freebsd/ctype_base.h ============================================================================== --- head/contrib/libstdc++/config/os/bsd/freebsd/ctype_base.h Tue Oct 23 17:53:20 2012 (r241956) +++ head/contrib/libstdc++/config/os/bsd/freebsd/ctype_base.h Tue Oct 23 18:36:07 2012 (r241957) @@ -38,8 +38,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) /// @brief Base class for ctype. - struct ctype_base + class ctype_base { + public: // Non-standard typedefs. typedef const int* __to_type; Modified: head/contrib/libstdc++/include/bits/fstream.tcc ============================================================================== --- head/contrib/libstdc++/include/bits/fstream.tcc Tue Oct 23 17:53:20 2012 (r241956) +++ head/contrib/libstdc++/include/bits/fstream.tcc Tue Oct 23 18:36:07 2012 (r241957) @@ -641,21 +641,23 @@ _GLIBCXX_BEGIN_NAMESPACE(std) setbuf(char_type* __s, streamsize __n) { if (!this->is_open()) - if (__s == 0 && __n == 0) - _M_buf_size = 1; - else if (__s && __n > 0) - { - // This is implementation-defined behavior, and assumes that - // an external char_type array of length __n exists and has - // been pre-allocated. If this is not the case, things will - // quickly blow up. When __n > 1, __n - 1 positions will be - // used for the get area, __n - 1 for the put area and 1 - // position to host the overflow char of a full put area. - // When __n == 1, 1 position will be used for the get area - // and 0 for the put area, as in the unbuffered case above. - _M_buf = __s; - _M_buf_size = __n; - } + { + if (__s == 0 && __n == 0) + _M_buf_size = 1; + else if (__s && __n > 0) + { + // This is implementation-defined behavior, and assumes that + // an external char_type array of length __n exists and has + // been pre-allocated. If this is not the case, things will + // quickly blow up. When __n > 1, __n - 1 positions will be + // used for the get area, __n - 1 for the put area and 1 + // position to host the overflow char of a full put area. + // When __n == 1, 1 position will be used for the get area + // and 0 for the put area, as in the unbuffered case above. + _M_buf = __s; + _M_buf_size = __n; + } + } return this; } Modified: head/contrib/libstdc++/include/bits/locale_facets.h ============================================================================== --- head/contrib/libstdc++/include/bits/locale_facets.h Tue Oct 23 17:53:20 2012 (r241956) +++ head/contrib/libstdc++/include/bits/locale_facets.h Tue Oct 23 18:36:07 2012 (r241957) @@ -4335,8 +4335,9 @@ _GLIBCXX_END_LDBL_NAMESPACE /** * @brief Messages facet base class providing catalog typedef. */ - struct messages_base + class messages_base { + public: typedef int catalog; }; Modified: head/contrib/libstdc++/include/bits/locale_facets.tcc ============================================================================== --- head/contrib/libstdc++/include/bits/locale_facets.tcc Tue Oct 23 17:53:20 2012 (r241956) +++ head/contrib/libstdc++/include/bits/locale_facets.tcc Tue Oct 23 18:36:07 2012 (r241957) @@ -316,7 +316,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE int __sep_pos = 0; while (!__testeof) { - if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep + if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) || __c == __lc->_M_decimal_point) break; else if (__c == __lit[__num_base::_S_izero]) @@ -558,7 +558,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE int __sep_pos = 0; while (!__testeof) { - if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep + if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) || __c == __lc->_M_decimal_point) break; else if (__c == __lit[__num_base::_S_izero] @@ -748,16 +748,20 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE const char_type __c = *__beg; if (__testf) - if (__n < __lc->_M_falsename_size) - __testf = __c == __lc->_M_falsename[__n]; - else - break; + { + if (__n < __lc->_M_falsename_size) + __testf = __c == __lc->_M_falsename[__n]; + else + break; + } if (__testt) - if (__n < __lc->_M_truename_size) - __testt = __c == __lc->_M_truename[__n]; - else - break; + { + if (__n < __lc->_M_truename_size) + __testt = __c == __lc->_M_truename[__n]; + else + break; + } if (!__testf && !__testt) break; @@ -1387,9 +1391,9 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE == money_base::space))) || (__i == 2 && ((static_cast(__p.field[3]) == money_base::value) - || __mandatory_sign + || (__mandatory_sign && (static_cast(__p.field[3]) - == money_base::sign)))) + == money_base::sign))))) { const size_type __len = __lc->_M_curr_symbol_size; size_type __j = 0; Modified: head/contrib/libstdc++/include/bits/streambuf_iterator.h ============================================================================== --- head/contrib/libstdc++/include/bits/streambuf_iterator.h Tue Oct 23 17:53:20 2012 (r241956) +++ head/contrib/libstdc++/include/bits/streambuf_iterator.h Tue Oct 23 18:36:07 2012 (r241957) @@ -160,7 +160,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { const bool __thiseof = _M_at_eof(); const bool __beof = __b._M_at_eof(); - return (__thiseof && __beof || (!__thiseof && !__beof)); + return ((__thiseof && __beof) || (!__thiseof && !__beof)); } private: Modified: head/contrib/libstdc++/include/std/std_sstream.h ============================================================================== --- head/contrib/libstdc++/include/std/std_sstream.h Tue Oct 23 17:53:20 2012 (r241956) +++ head/contrib/libstdc++/include/std/std_sstream.h Tue Oct 23 18:36:07 2012 (r241957) @@ -240,10 +240,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { const bool __testin = _M_mode & ios_base::in; if (this->pptr() && this->pptr() > this->egptr()) - if (__testin) - this->setg(this->eback(), this->gptr(), this->pptr()); - else - this->setg(this->pptr(), this->pptr(), this->pptr()); + { + if (__testin) + this->setg(this->eback(), this->gptr(), this->pptr()); + else + this->setg(this->pptr(), this->pptr(), this->pptr()); + } } }; From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 18:38: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 91DB5AC; Tue, 23 Oct 2012 18:38:05 +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 789248FC0C; Tue, 23 Oct 2012 18:38:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9NIc5Sj031375; Tue, 23 Oct 2012 18:38:05 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NIc5jA031373; Tue, 23 Oct 2012 18:38:05 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201210231838.q9NIc5jA031373@svn.freebsd.org> From: Dimitry Andric Date: Tue, 23 Oct 2012 18:38:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241958 - in head/contrib/atf: atf-report atf-run X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 18:38:05 -0000 Author: dim Date: Tue Oct 23 18:38:04 2012 New Revision: 241958 URL: http://svn.freebsd.org/changeset/base/241958 Log: Fix two clang warnings in the recent atf import. These have also been sent upstream. Tested by: Garrett Cooper Modified: head/contrib/atf/atf-report/atf-report.cpp head/contrib/atf/atf-run/io.hpp Modified: head/contrib/atf/atf-report/atf-report.cpp ============================================================================== --- head/contrib/atf/atf-report/atf-report.cpp Tue Oct 23 18:36:07 2012 (r241957) +++ head/contrib/atf/atf-report/atf-report.cpp Tue Oct 23 18:38:04 2012 (r241958) @@ -381,7 +381,6 @@ public: class xml_writer : public writer { ostream_ptr m_os; - size_t m_curtp, m_ntps; std::string m_tcname, m_tpname; static Modified: head/contrib/atf/atf-run/io.hpp ============================================================================== --- head/contrib/atf/atf-run/io.hpp Tue Oct 23 18:36:07 2012 (r241957) +++ head/contrib/atf/atf-run/io.hpp Tue Oct 23 18:38:04 2012 (r241958) @@ -378,11 +378,6 @@ class pistream : public std::istream, utils::noncopyable { //! - //! \brief The file handle managed by this stream. - //! - int m_fd; - - //! //! \brief The systembuf object used to manage this stream's data. //! systembuf m_systembuf; From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 18:43: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 983B03DA; Tue, 23 Oct 2012 18:43:36 +0000 (UTC) (envelope-from tuexen@fh-muenster.de) 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 009448FC08; Tue, 23 Oct 2012 18:43:35 +0000 (UTC) Received: from [192.168.1.103] (p508F9AE1.dip.t-dialin.net [80.143.154.225]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTP id A57EB1C0C0692; Tue, 23 Oct 2012 20:43:34 +0200 (CEST) Subject: Re: svn commit: r241916 - in head/sys: netinet netinet6 Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=us-ascii From: Michael Tuexen In-Reply-To: <20121024052525.T4723@besplex.bde.org> Date: Tue, 23 Oct 2012 20:43:33 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201210222149.q9MLnvrt014543@svn.freebsd.org> <20121023142219.K1008@besplex.bde.org> <20121024052525.T4723@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.1283) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Xin LI X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 18:43:36 -0000 On Oct 23, 2012, at 8:28 PM, Bruce Evans wrote: > On Tue, 23 Oct 2012, Michael Tuexen wrote: >=20 >> On Oct 23, 2012, at 6:23 AM, Bruce Evans wrote: >>=20 >>> On Mon, 22 Oct 2012, Xin LI wrote: >>>=20 >>>> Log: >>>> Remove __P. >>>=20 >>> This was a chance to remove style bugs in the prototypes. At least = it >>> didn't create so many new ones, unlike the original __P axing. It >>> still enlarged about a hundred by changing from Gnu style = continuation >>> to Gnu style continuation indentation with an off-by-5 error. >>=20 >> please note that the SCTP code in the FreeBSD sources is generated >> via an export script from a codebase which runs on multiple = platforms. >> The script tries to follow FreeBSDs guidelines, but is far from being >> perfect. >=20 > The export script might not like manual editing of its output. >=20 > Portability might require __P(()), and then removing it cleaning = requires > a complicated script. Maybe I wasn't clear... * The removal of __P() needs also be done upstream. I'll handle this, = not problem. I don't think we need __P on any platform. * My comment was regarding your list of formatting issues of the code. = Changing the formatting would require changing the export script. If someone "just" changes the FreeBSD sources and these changes are = not included upstream, they are lost by the next commit of rrs@ or mine. My point was: Getting rid of __P is fine and we can handle that upstream = (as any other non whitespace/formatting changes needed), but changing the = formatting is NOT that easy. I'm sorry about that and just wanted to let you know = that there is a reason why the style 9 stuff is not followed exactly within = the SCTP code. I hope this makes the situation clearer. Best regards Michael >=20 > Bruce >=20 From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 18:45: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 4FF5E648; Tue, 23 Oct 2012 18:45:33 +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 2D09C8FC08; Tue, 23 Oct 2012 18:45: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 q9NIjXU9032647; Tue, 23 Oct 2012 18:45:33 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NIjWPZ032640; Tue, 23 Oct 2012 18:45:32 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201210231845.q9NIjWPZ032640@svn.freebsd.org> From: Dimitry Andric Date: Tue, 23 Oct 2012 18:45:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241959 - in head/contrib/libstdc++: include/debug include/ext libsupc++ src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 18:45:33 -0000 Author: dim Date: Tue Oct 23 18:45:32 2012 New Revision: 241959 URL: http://svn.freebsd.org/changeset/base/241959 Log: Fix a number of other clang warnings in libstdc++, which could appear when building other C++ software with it. Also fix one actual bug in libsupc++, which was exposed by such a warning. This latter fix is the only functional change. MFC after: 1 week Modified: head/contrib/libstdc++/include/debug/safe_iterator.tcc head/contrib/libstdc++/include/ext/ropeimpl.h head/contrib/libstdc++/libsupc++/tinfo.cc head/contrib/libstdc++/src/locale.cc head/contrib/libstdc++/src/strstream.cc head/contrib/libstdc++/src/tree.cc Modified: head/contrib/libstdc++/include/debug/safe_iterator.tcc ============================================================================== --- head/contrib/libstdc++/include/debug/safe_iterator.tcc Tue Oct 23 18:38:04 2012 (r241958) +++ head/contrib/libstdc++/include/debug/safe_iterator.tcc Tue Oct 23 18:45:32 2012 (r241959) @@ -54,8 +54,8 @@ namespace __gnu_debug static_cast(_M_sequence)->begin(); std::pair __dist = this->_M_get_distance(__begin, *this); - bool __ok = (__dist.second == __dp_exact && __dist.first >= -__n - || __dist.second != __dp_exact && __dist.first > 0); + bool __ok = ((__dist.second == __dp_exact && __dist.first >= -__n) + || (__dist.second != __dp_exact && __dist.first > 0)); return __ok; } else @@ -64,8 +64,8 @@ namespace __gnu_debug static_cast(_M_sequence)->end(); std::pair __dist = this->_M_get_distance(*this, __end); - bool __ok = (__dist.second == __dp_exact && __dist.first >= __n - || __dist.second != __dp_exact && __dist.first > 0); + bool __ok = ((__dist.second == __dp_exact && __dist.first >= __n) + || (__dist.second != __dp_exact && __dist.first > 0)); return __ok; } } Modified: head/contrib/libstdc++/include/ext/ropeimpl.h ============================================================================== --- head/contrib/libstdc++/include/ext/ropeimpl.h Tue Oct 23 18:38:04 2012 (r241958) +++ head/contrib/libstdc++/include/ext/ropeimpl.h Tue Oct 23 18:45:32 2012 (r241959) @@ -1143,7 +1143,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) } else { - char* __kind; + const char* __kind; switch (__r->_M_tag) { Modified: head/contrib/libstdc++/libsupc++/tinfo.cc ============================================================================== --- head/contrib/libstdc++/libsupc++/tinfo.cc Tue Oct 23 18:38:04 2012 (r241958) +++ head/contrib/libstdc++/libsupc++/tinfo.cc Tue Oct 23 18:45:32 2012 (r241959) @@ -499,9 +499,9 @@ __do_dyncast (ptrdiff_t src2dst, result.whole2dst = __sub_kind (result.whole2dst | result2.whole2dst); } - else if ((result.dst_ptr != 0 & result2.dst_ptr != 0) - || (result.dst_ptr != 0 & result2_ambig) - || (result2.dst_ptr != 0 & result_ambig)) + else if ((result.dst_ptr != 0 && result2.dst_ptr != 0) + || (result.dst_ptr != 0 && result2_ambig) + || (result2.dst_ptr != 0 && result_ambig)) { // Found two different DST_TYPE bases, or a valid one and a set of // ambiguous ones, must disambiguate. See whether SRC_PTR is Modified: head/contrib/libstdc++/src/locale.cc ============================================================================== --- head/contrib/libstdc++/src/locale.cc Tue Oct 23 18:38:04 2012 (r241958) +++ head/contrib/libstdc++/src/locale.cc Tue Oct 23 18:45:32 2012 (r241959) @@ -146,7 +146,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) locale::_S_normalize_category(category __cat) { int __ret = 0; - if (__cat == none || (__cat & all) && !(__cat & ~all)) + if (__cat == none || ((__cat & all) && !(__cat & ~all))) __ret = __cat; else { Modified: head/contrib/libstdc++/src/strstream.cc ============================================================================== --- head/contrib/libstdc++/src/strstream.cc Tue Oct 23 18:38:04 2012 (r241958) +++ head/contrib/libstdc++/src/strstream.cc Tue Oct 23 18:45:32 2012 (r241959) @@ -311,10 +311,12 @@ _GLIBCXX_BEGIN_NAMESPACE(std) strstreambuf::_M_free(char* p) { if (p) - if (_M_free_fun) - _M_free_fun(p); - else - delete[] p; + { + if (_M_free_fun) + _M_free_fun(p); + else + delete[] p; + } } void Modified: head/contrib/libstdc++/src/tree.cc ============================================================================== --- head/contrib/libstdc++/src/tree.cc Tue Oct 23 18:38:04 2012 (r241958) +++ head/contrib/libstdc++/src/tree.cc Tue Oct 23 18:45:32 2012 (r241959) @@ -316,17 +316,21 @@ _GLIBCXX_BEGIN_NAMESPACE(std) else __z->_M_parent->_M_right = __x; if (__leftmost == __z) - if (__z->_M_right == 0) // __z->_M_left must be null also - __leftmost = __z->_M_parent; - // makes __leftmost == _M_header if __z == __root - else - __leftmost = _Rb_tree_node_base::_S_minimum(__x); + { + if (__z->_M_right == 0) // __z->_M_left must be null also + __leftmost = __z->_M_parent; + // makes __leftmost == _M_header if __z == __root + else + __leftmost = _Rb_tree_node_base::_S_minimum(__x); + } if (__rightmost == __z) - if (__z->_M_left == 0) // __z->_M_right must be null also - __rightmost = __z->_M_parent; - // makes __rightmost == _M_header if __z == __root - else // __x == __z->_M_left - __rightmost = _Rb_tree_node_base::_S_maximum(__x); + { + if (__z->_M_left == 0) // __z->_M_right must be null also + __rightmost = __z->_M_parent; + // makes __rightmost == _M_header if __z == __root + else // __x == __z->_M_left + __rightmost = _Rb_tree_node_base::_S_maximum(__x); + } } if (__y->_M_color != _S_red) { From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 18:57: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 DBED0A28; Tue, 23 Oct 2012 18:57:21 +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 A3DC18FC16; Tue, 23 Oct 2012 18:57: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 q9NIvLtv034672; Tue, 23 Oct 2012 18:57:21 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NIvLFW034668; Tue, 23 Oct 2012 18:57:21 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201210231857.q9NIvLFW034668@svn.freebsd.org> From: Dimitry Andric Date: Tue, 23 Oct 2012 18:57:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241960 - in head/gnu/lib: libstdc++ libsupc++ X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 18:57:22 -0000 Author: dim Date: Tue Oct 23 18:57:20 2012 New Revision: 241960 URL: http://svn.freebsd.org/changeset/base/241960 Log: For building GNU libstdc++ and libsupc++, filter out libc++-specific and -std= flags above c++98 or gnu++98 from CXXFLAGS *after* including bsd.lib.mk, otherwise some additions to CXXFLAGS done in bsd.*.mk might not be preserved. MFC after: 1 week Modified: head/gnu/lib/libstdc++/Makefile head/gnu/lib/libsupc++/Makefile Modified: head/gnu/lib/libstdc++/Makefile ============================================================================== --- head/gnu/lib/libstdc++/Makefile Tue Oct 23 18:45:32 2012 (r241959) +++ head/gnu/lib/libstdc++/Makefile Tue Oct 23 18:57:20 2012 (r241960) @@ -22,7 +22,6 @@ CFLAGS+= -I${GCCLIB}/include -I${SRCDIR} CFLAGS+= -frandom-seed=RepeatabilityConsideredGood CXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections \ -Wno-deprecated -CXXFLAGS:= ${CXXFLAGS:N-stdlib=libc++:N-std=c++[01][13x]:N-std=gnu++[01][13x]} PO_CXXFLAGS= ${CXXFLAGS:N-ffunction-sections} DPADD= ${LIBM} @@ -626,3 +625,6 @@ ${VERSION_MAP}: ${SRCDIR}/config/abi/pre CLEANFILES+= ${VERSION_MAP} .include + +# Filter out libc++-specific flags, and -std= flags above c++98 or gnu++98. +CXXFLAGS:= ${CXXFLAGS:N-stdlib=libc++:N-std=c++[01][13x]:N-std=gnu++[01][13x]} Modified: head/gnu/lib/libsupc++/Makefile ============================================================================== --- head/gnu/lib/libsupc++/Makefile Tue Oct 23 18:45:32 2012 (r241959) +++ head/gnu/lib/libsupc++/Makefile Tue Oct 23 18:57:20 2012 (r241960) @@ -24,7 +24,6 @@ CFLAGS+= -I${GCCLIB}/include -I${SRCDIR} CFLAGS+= -I${.CURDIR}/../libstdc++ -I. CFLAGS+= -frandom-seed=RepeatabilityConsideredGood CXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections -CXXFLAGS:= ${CXXFLAGS:N-stdlib=libc++:N-std=c++[01][13x]:N-std=gnu++[01][13x]} PO_CXXFLAGS= ${CXXFLAGS:N-ffunction-sections} HDRS= exception new typeinfo cxxabi.h exception_defines.h @@ -43,3 +42,6 @@ VERSION_MAP= ${.CURDIR}/Version.map .include + +# Filter out libc++-specific flags, and -std= flags above c++98 or gnu++98. +CXXFLAGS:= ${CXXFLAGS:N-stdlib=libc++:N-std=c++[01][13x]:N-std=gnu++[01][13x]} From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 19:02: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 4617AC12; Tue, 23 Oct 2012 19:02:23 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id 7C5B78FC0C; Tue, 23 Oct 2012 19:02:21 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id 0BAB9293; Tue, 23 Oct 2012 21:00:58 +0200 (CEST) Date: Tue, 23 Oct 2012 21:03:11 +0200 From: Pawel Jakub Dawidek To: Konstantin Belousov Subject: Re: svn commit: r241896 - in head: . cddl/contrib/opensolaris/lib/libzpool/common/sys share/man/man9 sys/cam/ctl sys/cddl/compat/opensolaris/kern sys/cddl/compat/opensolaris/sys sys/cddl/contrib/openso... Message-ID: <20121023190311.GA1620@garage.freebsd.pl> References: <201210221750.q9MHot26061585@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pf9I7BMVVzbSWLtt" Content-Disposition: inline In-Reply-To: <201210221750.q9MHot26061585@svn.freebsd.org> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 19:02:23 -0000 --pf9I7BMVVzbSWLtt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 22, 2012 at 05:50:55PM +0000, Konstantin Belousov wrote: > Author: kib > Date: Mon Oct 22 17:50:54 2012 > New Revision: 241896 > URL: http://svn.freebsd.org/changeset/base/241896 >=20 > Log: > Remove the support for using non-mpsafe filesystem modules. > =20 > In particular, do not lock Giant conditionally when calling into the > filesystem module, remove the VFS_LOCK_GIANT() and related > macros. Stop handling buffers belonging to non-mpsafe filesystems. > =20 > The VFS_VERSION is bumped to indicate the interface change which does > not result in the interface signatures changes. > =20 > Conducted and reviewed by: attilio > Tested by: pho FINALLY! > Deleted: > head/share/man/man9/VFS_LOCK_GIANT.9 > Modified: > head/ObsoleteFiles.inc > head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h > head/share/man/man9/Makefile > head/share/man/man9/namei.9 > head/sys/cam/ctl/ctl_backend_block.c > head/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c > head/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c > head/sys/cddl/compat/opensolaris/sys/vnode.h > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c > head/sys/compat/linprocfs/linprocfs.c > head/sys/compat/linux/linux_file.c > head/sys/compat/linux/linux_misc.c > head/sys/compat/ndis/subr_ndis.c > head/sys/compat/svr4/svr4_misc.c > head/sys/conf/NOTES > head/sys/conf/options > head/sys/dev/hwpmc/hwpmc_mod.c > head/sys/dev/md/md.c > head/sys/dev/nand/nandsim_swap.c > head/sys/dev/xen/blkback/blkback.c > head/sys/fs/nfs/nfs_commonport.c > head/sys/fs/nfsserver/nfs_nfsdport.c > head/sys/fs/procfs/procfs_map.c > head/sys/fs/unionfs/union_subr.c > head/sys/geom/geom_vfs.c > head/sys/geom/journal/g_journal.c > head/sys/i386/ibcs2/ibcs2_misc.c > head/sys/kern/imgact_elf.c > head/sys/kern/kern_acct.c > head/sys/kern/kern_alq.c > head/sys/kern/kern_ctf.c > head/sys/kern/kern_descrip.c > head/sys/kern/kern_exec.c > head/sys/kern/kern_exit.c > head/sys/kern/kern_gzio.c > head/sys/kern/kern_jail.c > head/sys/kern/kern_ktrace.c > head/sys/kern/kern_linker.c > head/sys/kern/kern_proc.c > head/sys/kern/kern_sig.c > head/sys/kern/link_elf.c > head/sys/kern/link_elf_obj.c > head/sys/kern/sys_process.c > head/sys/kern/uipc_syscalls.c > head/sys/kern/uipc_usrreq.c > head/sys/kern/vfs_acl.c > head/sys/kern/vfs_aio.c > head/sys/kern/vfs_bio.c > head/sys/kern/vfs_cache.c > head/sys/kern/vfs_default.c > head/sys/kern/vfs_extattr.c > head/sys/kern/vfs_init.c > head/sys/kern/vfs_lookup.c > head/sys/kern/vfs_mount.c > head/sys/kern/vfs_mountroot.c > head/sys/kern/vfs_subr.c > head/sys/kern/vfs_syscalls.c > head/sys/kern/vfs_vnops.c > head/sys/nfsserver/nfs.h > head/sys/nfsserver/nfs_serv.c > head/sys/nfsserver/nfs_srvsubs.c > head/sys/nlm/nlm_prot_impl.c > head/sys/security/audit/audit_arg.c > head/sys/security/audit/audit_syscalls.c > head/sys/security/audit/audit_worker.c > head/sys/security/mac/mac_process.c > head/sys/security/mac/mac_syscalls.c > head/sys/sys/buf.h > head/sys/sys/bufobj.h > head/sys/sys/mount.h > head/sys/sys/namei.h > head/sys/ufs/ffs/ffs_alloc.c > head/sys/ufs/ffs/ffs_softdep.c > head/sys/ufs/ufs/ufs_quota.c > head/sys/vm/vm_fault.c > head/sys/vm/vm_mmap.c > head/sys/vm/vm_object.c > head/sys/vm/vm_pageout.c > head/sys/vm/vnode_pager.c >=20 > 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 Mon Oct 22 17:47:37 2012 (r241895) > +++ head/ObsoleteFiles.inc Mon Oct 22 17:50:54 2012 (r241896) > @@ -38,6 +38,8 @@ > # xargs -n1 | sort | uniq -d; > # done > =20 > +# 20121022: VFS_LOCK_GIANT elimination > +OLD_FILES+=3Dusr/share/man/man9/VFS_LOCK_GIANT.9.gz > # 20121004: remove incomplete unwind.h > OLD_FILES+=3Dusr/include/clang/3.2/unwind.h > # 20120908: pf cleanup >=20 > Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_conte= xt.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/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h M= on Oct 22 17:47:37 2012 (r241895) > +++ head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h M= on Oct 22 17:50:54 2012 (r241896) > @@ -430,14 +430,6 @@ extern int fop_getattr(vnode_t *vp, vatt > =20 > #define vn_lock(vp, type) > #define VOP_UNLOCK(vp, type) > -#ifdef VFS_LOCK_GIANT > -#undef VFS_LOCK_GIANT > -#endif > -#define VFS_LOCK_GIANT(mp) 0 > -#ifdef VFS_UNLOCK_GIANT > -#undef VFS_UNLOCK_GIANT > -#endif > -#define VFS_UNLOCK_GIANT(vfslocked) > =20 > extern int vn_open(char *path, int x1, int oflags, int mode, vnode_t **v= pp, > int x2, int x3); >=20 > Modified: head/share/man/man9/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=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/share/man/man9/Makefile Mon Oct 22 17:47:37 2012 (r241895) > +++ head/share/man/man9/Makefile Mon Oct 22 17:50:54 2012 (r241896) > @@ -280,7 +280,6 @@ MAN=3D accept_filter.9 \ > vfs_getnewfsid.9 \ > vfs_getopt.9 \ > vfs_getvfs.9 \ > - VFS_LOCK_GIANT.9 \ > VFS_MOUNT.9 \ > vfs_mount.9 \ > vfs_mountedfrom.9 \ > @@ -1413,7 +1412,6 @@ MLINKS+=3Dvfs_getopt.9 vfs_copyopt.9 \ > vfs_getopt.9 vfs_setopt.9 \ > vfs_getopt.9 vfs_setopt_part.9 \ > vfs_getopt.9 vfs_setopts.9 > -MLINKS+=3DVFS_LOCK_GIANT.9 VFS_UNLOCK_GIANT.9 > MLINKS+=3Dvhold.9 vdrop.9 \ > vhold.9 vdropl.9 \ > vhold.9 vholdl.9 >=20 > Modified: head/share/man/man9/namei.9 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/share/man/man9/namei.9 Mon Oct 22 17:47:37 2012 (r241895) > +++ head/share/man/man9/namei.9 Mon Oct 22 17:50:54 2012 (r241896) > @@ -168,19 +168,6 @@ This flag allows the > function to return the parent (directory) vnode in an unlocked state. > The parent vnode must be released separately by using > .Xr vrele 9 . > -.It Dv MPSAFE > -With this flag set, > -.Fn namei > -will conditionally acquire > -.Va Giant > -if it is required by a traversed file system. > -MPSAFE callers should pass the results of > -.Fn NDHASGIANT > -to > -.Xr VFS_UNLOCK_GIANT > -in order to conditionally release > -.Va Giant > -if necessary. > .It Dv NOCACHE > Avoid > .Fn namei > @@ -354,7 +341,6 @@ An attempt is made to modify a file or d > .Xr uio 9 , > .Xr uma 9 , > .Xr VFS 9 , > -.Xr VFS_UNLOCK_GIANT 9 , > .Xr vnode 9 , > .Xr vput 9 , > .Xr vref 9 >=20 > Modified: head/sys/cam/ctl/ctl_backend_block.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/cam/ctl/ctl_backend_block.c Mon Oct 22 17:47:37 2012 (r24189= 5) > +++ head/sys/cam/ctl/ctl_backend_block.c Mon Oct 22 17:50:54 2012 (r24189= 6) > @@ -594,14 +594,12 @@ ctl_be_block_flush_file(struct ctl_be_bl > { > union ctl_io *io; > struct mount *mountpoint; > - int vfs_is_locked, error, lock_flags; > + int error, lock_flags; > =20 > DPRINTF("entered\n"); > =20 > io =3D beio->io; > =20 > - vfs_is_locked =3D VFS_LOCK_GIANT(be_lun->vn->v_mount); > - > (void) vn_start_write(be_lun->vn, &mountpoint, V_WAIT); > =20 > if (MNT_SHARED_WRITES(mountpoint) > @@ -621,8 +619,6 @@ ctl_be_block_flush_file(struct ctl_be_bl > =20 > vn_finished_write(mountpoint); > =20 > - VFS_UNLOCK_GIANT(vfs_is_locked); > - > if (error =3D=3D 0) > ctl_set_success(&io->scsiio); > else { > @@ -648,7 +644,7 @@ ctl_be_block_dispatch_file(struct ctl_be > union ctl_io *io; > struct uio xuio; > struct iovec *xiovec; > - int vfs_is_locked, flags; > + int flags; > int error, i; > =20 > DPRINTF("entered\n"); > @@ -681,7 +677,6 @@ ctl_be_block_dispatch_file(struct ctl_be > xiovec->iov_len =3D beio->sg_segs[i].len; > } > =20 > - vfs_is_locked =3D VFS_LOCK_GIANT(be_lun->vn->v_mount); > if (beio->bio_cmd =3D=3D BIO_READ) { > vn_lock(be_lun->vn, LK_SHARED | LK_RETRY); > =20 > @@ -754,7 +749,6 @@ ctl_be_block_dispatch_file(struct ctl_be > =20 > vn_finished_write(mountpoint); > } > - VFS_UNLOCK_GIANT(vfs_is_locked); > =20 > /* > * If we got an error, set the sense data to "MEDIUM ERROR" and > @@ -1478,7 +1472,6 @@ ctl_be_block_close(struct ctl_be_block_l > DROP_GIANT(); > if (be_lun->vn) { > int flags =3D FREAD | FWRITE; > - int vfs_is_locked =3D 0; > =20 > switch (be_lun->dev_type) { > case CTL_BE_BLOCK_DEV: > @@ -1490,7 +1483,6 @@ ctl_be_block_close(struct ctl_be_block_l > } > break; > case CTL_BE_BLOCK_FILE: > - vfs_is_locked =3D VFS_LOCK_GIANT(be_lun->vn->v_mount); > break; > case CTL_BE_BLOCK_NONE: > default: > @@ -1505,7 +1497,6 @@ ctl_be_block_close(struct ctl_be_block_l > case CTL_BE_BLOCK_DEV: > break; > case CTL_BE_BLOCK_FILE: > - VFS_UNLOCK_GIANT(vfs_is_locked); > if (be_lun->backend.file.cred !=3D NULL) { > crfree(be_lun->backend.file.cred); > be_lun->backend.file.cred =3D NULL; > @@ -1529,7 +1520,6 @@ ctl_be_block_open(struct ctl_be_block_so > struct nameidata nd; > int flags; > int error; > - int vfs_is_locked; > =20 > /* > * XXX KDM allow a read-only option? > @@ -1587,8 +1577,6 @@ ctl_be_block_open(struct ctl_be_block_so > return (error); > } > =20 > - vfs_is_locked =3D NDHASGIANT(&nd); > - > NDFREE(&nd, NDF_ONLY_PNBUF); > =09 > be_lun->vn =3D nd.ni_vp; > @@ -1604,7 +1592,6 @@ ctl_be_block_open(struct ctl_be_block_so > "%s is not a disk or file", be_lun->dev_path); > } > VOP_UNLOCK(be_lun->vn, 0); > - VFS_UNLOCK_GIANT(vfs_is_locked); > =20 > if (error !=3D 0) { > ctl_be_block_close(be_lun); > @@ -2090,7 +2077,7 @@ ctl_be_block_modify(struct ctl_be_block_ > { > struct ctl_lun_modify_params *params; > struct ctl_be_block_lun *be_lun; > - int vfs_is_locked, error; > + int error; > =20 > params =3D &req->reqdata.modify; > =20 > @@ -2120,7 +2107,6 @@ ctl_be_block_modify(struct ctl_be_block_ > } > } > =20 > - vfs_is_locked =3D VFS_LOCK_GIANT(be_lun->vn->v_mount); > vn_lock(be_lun->vn, LK_SHARED | LK_RETRY); > =20 > if (be_lun->vn->v_type =3D=3D VREG) > @@ -2129,7 +2115,6 @@ ctl_be_block_modify(struct ctl_be_block_ > error =3D ctl_be_block_modify_dev(be_lun, req); > =20 > VOP_UNLOCK(be_lun->vn, 0); > - VFS_UNLOCK_GIANT(vfs_is_locked); > =20 > if (error !=3D 0) > goto bailout_error; >=20 > Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.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/cddl/compat/opensolaris/kern/opensolaris_kobj.c Mon Oct 22 1= 7:47:37 2012 (r241895) > +++ head/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c Mon Oct 22 1= 7:50:54 2012 (r241896) > @@ -69,7 +69,7 @@ kobj_open_file_vnode(const char *file) > struct thread *td =3D curthread; > struct filedesc *fd; > struct nameidata nd; > - int error, flags, vfslocked; > + int error, flags; > =20 > fd =3D td->td_proc->p_fd; > FILEDESC_XLOCK(fd); > @@ -84,15 +84,13 @@ kobj_open_file_vnode(const char *file) > FILEDESC_XUNLOCK(fd); > =20 > flags =3D FREAD | O_NOFOLLOW; > - NDINIT(&nd, LOOKUP, MPSAFE, UIO_SYSSPACE, file, td); > + NDINIT(&nd, LOOKUP, 0, UIO_SYSSPACE, file, td); > error =3D vn_open_cred(&nd, &flags, 0, 0, curthread->td_ucred, NULL); > if (error !=3D 0) > return (NULL); > - vfslocked =3D NDHASGIANT(&nd); > NDFREE(&nd, NDF_ONLY_PNBUF); > /* We just unlock so we hold a reference. */ > VOP_UNLOCK(nd.ni_vp, 0); > - VFS_UNLOCK_GIANT(vfslocked); > return (nd.ni_vp); > } > =20 > @@ -130,15 +128,13 @@ kobj_get_filesize_vnode(struct _buf *fil > { > struct vnode *vp =3D file->ptr; > struct vattr va; > - int error, vfslocked; > + int error; > =20 > - vfslocked =3D VFS_LOCK_GIANT(vp->v_mount); > vn_lock(vp, LK_SHARED | LK_RETRY); > error =3D VOP_GETATTR(vp, &va, curthread->td_ucred); > VOP_UNLOCK(vp, 0); > if (error =3D=3D 0) > *size =3D (uint64_t)va.va_size; > - VFS_UNLOCK_GIANT(vfslocked); > return (error); > } > =20 > @@ -171,7 +167,7 @@ kobj_read_file_vnode(struct _buf *file,=20 > struct thread *td =3D curthread; > struct uio auio; > struct iovec aiov; > - int error, vfslocked; > + int error; > =20 > bzero(&aiov, sizeof(aiov)); > bzero(&auio, sizeof(auio)); > @@ -187,11 +183,9 @@ kobj_read_file_vnode(struct _buf *file,=20 > auio.uio_resid =3D size; > auio.uio_td =3D td; > =20 > - vfslocked =3D VFS_LOCK_GIANT(vp->v_mount); > vn_lock(vp, LK_SHARED | LK_RETRY); > error =3D VOP_READ(vp, &auio, IO_UNIT | IO_SYNC, td->td_ucred); > VOP_UNLOCK(vp, 0); > - VFS_UNLOCK_GIANT(vfslocked); > return (error !=3D 0 ? -1 : size - auio.uio_resid); > } > =20 > @@ -221,14 +215,7 @@ void > kobj_close_file(struct _buf *file) > { > =20 > - if (file->mounted) { > - struct vnode *vp =3D file->ptr; > - struct thread *td =3D curthread; > - int vfslocked; > - > - vfslocked =3D VFS_LOCK_GIANT(vp->v_mount); > - vn_close(vp, FREAD, td->td_ucred, td); > - VFS_UNLOCK_GIANT(vfslocked); > - } > + if (file->mounted) > + vn_close(file->ptr, FREAD, curthread->td_ucred, curthread); > kmem_free(file, sizeof(*file)); > } >=20 > Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.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/cddl/compat/opensolaris/kern/opensolaris_lookup.c Mon Oct 22= 17:47:37 2012 (r241895) > +++ head/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c Mon Oct 22= 17:50:54 2012 (r241896) > @@ -54,7 +54,7 @@ lookupnameat(char *dirname, enum uio_seg > vref(startvp); > ltype =3D VOP_ISLOCKED(startvp); > VOP_UNLOCK(startvp, 0); > - NDINIT_ATVP(&nd, LOOKUP, LOCKLEAF | MPSAFE | follow, seg, dirname, > + NDINIT_ATVP(&nd, LOOKUP, LOCKLEAF | follow, seg, dirname, > startvp, curthread); > error =3D namei(&nd); > *compvpp =3D nd.ni_vp; >=20 > Modified: head/sys/cddl/compat/opensolaris/sys/vnode.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/cddl/compat/opensolaris/sys/vnode.h Mon Oct 22 17:47:37 2012= (r241895) > +++ head/sys/cddl/compat/opensolaris/sys/vnode.h Mon Oct 22 17:50:54 2012= (r241896) > @@ -193,7 +193,7 @@ vn_openat(char *pnamep, enum uio_seg seg > =20 > if (startvp !=3D NULL) > vref(startvp); > - NDINIT_ATVP(&nd, operation, MPSAFE, UIO_SYSSPACE, pnamep, startvp, td); > + NDINIT_ATVP(&nd, operation, 0, UIO_SYSSPACE, pnamep, startvp, td); > filemode |=3D O_NOFOLLOW; > error =3D vn_open_cred(&nd, &filemode, createmode, 0, td->td_ucred, NUL= L); > NDFREE(&nd, NDF_ONLY_PNBUF); > @@ -223,13 +223,12 @@ zfs_vn_rdwr(enum uio_rw rw, vnode_t *vp, > ssize_t *residp) > { > struct thread *td =3D curthread; > - int error, vfslocked; > + int error; > ssize_t resid; > =20 > ASSERT(ioflag =3D=3D 0); > ASSERT(ulimit =3D=3D RLIM64_INFINITY); > =20 > - vfslocked =3D VFS_LOCK_GIANT(vp->v_mount); > if (rw =3D=3D UIO_WRITE) { > ioflag =3D IO_SYNC; > } else { > @@ -237,7 +236,6 @@ zfs_vn_rdwr(enum uio_rw rw, vnode_t *vp, > } > error =3D vn_rdwr(rw, vp, base, len, offset, seg, ioflag, cr, NOCRED, > &resid, td); > - VFS_UNLOCK_GIANT(vfslocked); > if (residp !=3D NULL) > *residp =3D (ssize_t)resid; > return (error); > @@ -249,11 +247,10 @@ static __inline int > zfs_vop_fsync(vnode_t *vp, int flag, cred_t *cr) > { > struct mount *mp; > - int error, vfslocked; > + int error; > =20 > ASSERT(flag =3D=3D FSYNC); > =20 > - vfslocked =3D VFS_LOCK_GIANT(vp->v_mount); > if ((error =3D vn_start_write(vp, &mp, V_WAIT | PCATCH)) !=3D 0) > goto drop; > vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); > @@ -261,7 +258,6 @@ zfs_vop_fsync(vnode_t *vp, int flag, cre > VOP_UNLOCK(vp, 0); > vn_finished_write(mp); > drop: > - VFS_UNLOCK_GIANT(vfslocked); > return (error); > } > #define VOP_FSYNC(vp, flag, cr, ct) zfs_vop_fsync((vp), (flag), (cr)) > @@ -269,14 +265,12 @@ drop: > static __inline int > zfs_vop_close(vnode_t *vp, int flag, int count, offset_t offset, cred_t = *cr) > { > - int error, vfslocked; > + int error; > =20 > ASSERT(count =3D=3D 1); > ASSERT(offset =3D=3D 0); > =20 > - vfslocked =3D VFS_LOCK_GIANT(vp->v_mount); > error =3D vn_close(vp, flag, cr, curthread); > - VFS_UNLOCK_GIANT(vfslocked); > return (error); > } > #define VOP_CLOSE(vp, oflags, count, offset, cr, ct) \ >=20 > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.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/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c Mon O= ct 22 17:47:37 2012 (r241895) > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c Mon O= ct 22 17:50:54 2012 (r241896) > @@ -54,7 +54,7 @@ vdev_file_open(vdev_t *vd, uint64_t *psi > vdev_file_t *vf; > vnode_t *vp; > vattr_t vattr; > - int error, vfslocked; > + int error; > =20 > /* > * We must have a pathname, and it must be absolute. > @@ -114,11 +114,9 @@ skip_open: > * Determine the physical size of the file. > */ > vattr.va_mask =3D AT_SIZE; > - vfslocked =3D VFS_LOCK_GIANT(vp->v_mount); > vn_lock(vp, LK_SHARED | LK_RETRY); > error =3D VOP_GETATTR(vp, &vattr, kcred); > VOP_UNLOCK(vp, 0); > - VFS_UNLOCK_GIANT(vfslocked); > if (error) { > (void) VOP_CLOSE(vp, spa_mode(vd->vdev_spa), 1, 0, kcred, NULL); > vd->vdev_stat.vs_aux =3D VDEV_AUX_OPEN_FAILED; >=20 > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.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/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon O= ct 22 17:47:37 2012 (r241895) > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon O= ct 22 17:50:54 2012 (r241896) > @@ -1092,14 +1092,12 @@ zfs_get_done(zgd_t *zgd, int error) > { > znode_t *zp =3D zgd->zgd_private; > objset_t *os =3D zp->z_zfsvfs->z_os; > - int vfslocked; > =20 > if (zgd->zgd_db) > dmu_buf_rele(zgd->zgd_db, zgd); > =20 > zfs_range_unlock(zgd->zgd_rl); > =20 > - vfslocked =3D VFS_LOCK_GIANT(zp->z_zfsvfs->z_vfs); > /* > * Release the vnode asynchronously as we currently have the > * txg stopped from syncing. > @@ -1110,7 +1108,6 @@ zfs_get_done(zgd_t *zgd, int error) > zil_add_block(zgd->zgd_zilog, zgd->zgd_bp); > =20 > kmem_free(zgd, sizeof (zgd_t)); > - VFS_UNLOCK_GIANT(vfslocked); > } > =20 > #ifdef DEBUG > @@ -6337,7 +6334,7 @@ vop_getextattr { > } > =20 > flags =3D FREAD; > - NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW | MPSAFE, UIO_SYSSPACE, attrname, > + NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, attrname, > xvp, td); > error =3D vn_open_cred(&nd, &flags, 0, 0, ap->a_cred, NULL); > vp =3D nd.ni_vp; > @@ -6405,7 +6402,7 @@ vop_deleteextattr { > return (error); > } > =20 > - NDINIT_ATVP(&nd, DELETE, NOFOLLOW | LOCKPARENT | LOCKLEAF | MPSAFE, > + NDINIT_ATVP(&nd, DELETE, NOFOLLOW | LOCKPARENT | LOCKLEAF, > UIO_SYSSPACE, attrname, xvp, td); > error =3D namei(&nd); > vp =3D nd.ni_vp; > @@ -6472,7 +6469,7 @@ vop_setextattr { > } > =20 > flags =3D FFLAGS(O_WRONLY | O_CREAT); > - NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW | MPSAFE, UIO_SYSSPACE, attrname, > + NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, attrname, > xvp, td); > error =3D vn_open_cred(&nd, &flags, 0600, 0, ap->a_cred, NULL); > vp =3D nd.ni_vp; > @@ -6553,7 +6550,7 @@ vop_listextattr { > return (error); > } > =20 > - NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW | LOCKLEAF | LOCKSHARED | MPSAFE, > + NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW | LOCKLEAF | LOCKSHARED, > UIO_SYSSPACE, ".", xvp, td); > error =3D namei(&nd); > vp =3D nd.ni_vp; >=20 > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.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/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Mon O= ct 22 17:47:37 2012 (r241895) > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Mon O= ct 22 17:50:54 2012 (r241896) > @@ -1404,7 +1404,6 @@ zfs_zinactive(znode_t *zp) > vnode_t *vp =3D ZTOV(zp); > zfsvfs_t *zfsvfs =3D zp->z_zfsvfs; > uint64_t z_id =3D zp->z_id; > - int vfslocked; > =20 > ASSERT(zp->z_sa_hdl); > =20 > @@ -1437,9 +1436,7 @@ zfs_zinactive(znode_t *zp) > ZFS_OBJ_HOLD_EXIT(zfsvfs, z_id); > ASSERT(vp->v_count =3D=3D 0); > vrecycle(vp); > - vfslocked =3D VFS_LOCK_GIANT(zfsvfs->z_vfs); > zfs_rmnode(zp); > - VFS_UNLOCK_GIANT(vfslocked); > return; > } > =20 >=20 > Modified: head/sys/compat/linprocfs/linprocfs.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/compat/linprocfs/linprocfs.c Mon Oct 22 17:47:37 2012 (r2418= 95) > +++ head/sys/compat/linprocfs/linprocfs.c Mon Oct 22 17:50:54 2012 (r2418= 96) > @@ -335,7 +335,7 @@ linprocfs_domtab(PFS_FILL_ARGS) > int error; > =20 > /* resolve symlinks etc. in the emulation tree prefix */ > - NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, UIO_SYSSPACE, linux_emul_path, td); > + NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, linux_emul_path, td); > flep =3D NULL; > error =3D namei(&nd); > lep =3D linux_emul_path; > @@ -343,7 +343,6 @@ linprocfs_domtab(PFS_FILL_ARGS) > if (vn_fullpath(td, nd.ni_vp, &dlep, &flep) =3D=3D 0) > lep =3D dlep; > vrele(nd.ni_vp); > - VFS_UNLOCK_GIANT(NDHASGIANT(&nd)); > } > lep_len =3D strlen(lep); > =20 > @@ -414,7 +413,7 @@ linprocfs_dopartitions(PFS_FILL_ARGS) > int major, minor; > =20 > /* resolve symlinks etc. in the emulation tree prefix */ > - NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, UIO_SYSSPACE, linux_emul_path, td); > + NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, linux_emul_path, td); > flep =3D NULL; > error =3D namei(&nd); > lep =3D linux_emul_path; > @@ -422,7 +421,6 @@ linprocfs_dopartitions(PFS_FILL_ARGS) > if (vn_fullpath(td, nd.ni_vp, &dlep, &flep) =3D=3D 0) > lep =3D dlep; > vrele(nd.ni_vp); > - VFS_UNLOCK_GIANT(NDHASGIANT(&nd)); > } > lep_len =3D strlen(lep); > =20 > @@ -1012,7 +1010,6 @@ linprocfs_doprocmaps(PFS_FILL_ARGS) > int error; > struct vnode *vp; > struct vattr vat; > - int locked; > =20 > PROC_LOCK(p); > error =3D p_candebug(td, p); > @@ -1065,12 +1062,10 @@ linprocfs_doprocmaps(PFS_FILL_ARGS) > VM_OBJECT_UNLOCK(obj); > if (vp) { > vn_fullpath(td, vp, &name, &freename); > - locked =3D VFS_LOCK_GIANT(vp->v_mount); > vn_lock(vp, LK_SHARED | LK_RETRY); > VOP_GETATTR(vp, &vat, td->td_ucred); > ino =3D vat.va_fileid; > vput(vp); > - VFS_UNLOCK_GIANT(locked); > } > } else { > flags =3D 0; >=20 > Modified: head/sys/compat/linux/linux_file.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/compat/linux/linux_file.c Mon Oct 22 17:47:37 2012 (r241895) > +++ head/sys/compat/linux/linux_file.c Mon Oct 22 17:50:54 2012 (r241896) > @@ -337,7 +337,7 @@ getdents_common(struct thread *td, struc > struct l_dirent64 *linux_dirent64; > int buflen, error, eofflag, nbytes, justone; > u_long *cookies =3D NULL, *cookiep; > - int ncookies, vfslocked; > + int ncookies; > =20 > nbytes =3D args->count; > if (nbytes =3D=3D 1) { > @@ -359,9 +359,7 @@ getdents_common(struct thread *td, struc > =20 > off =3D foffset_lock(fp, 0); > vp =3D fp->f_vnode; > - vfslocked =3D VFS_LOCK_GIANT(vp->v_mount); > if (vp->v_type !=3D VDIR) { > - VFS_UNLOCK_GIANT(vfslocked); > foffset_unlock(fp, off, 0); > fdrop(fp, td); > return (EINVAL); > @@ -521,7 +519,6 @@ out: > free(cookies, M_TEMP); > =20 > VOP_UNLOCK(vp, 0); > - VFS_UNLOCK_GIANT(vfslocked); > foffset_unlock(fp, off, 0); > fdrop(fp, td); > free(buf, M_TEMP); >=20 > Modified: head/sys/compat/linux/linux_misc.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/compat/linux/linux_misc.c Mon Oct 22 17:47:37 2012 (r241895) > +++ head/sys/compat/linux/linux_misc.c Mon Oct 22 17:50:54 2012 (r241896) > @@ -247,7 +247,7 @@ linux_uselib(struct thread *td, struct l > char *library; > ssize_t aresid; > int error; > - int locked, vfslocked; > + int locked; > =20 > LCONVPATHEXIST(td, args->library, &library); > =20 > @@ -257,11 +257,10 @@ linux_uselib(struct thread *td, struct l > #endif > =20 > a_out =3D NULL; > - vfslocked =3D 0; > locked =3D 0; > vp =3D NULL; > =20 > - NDINIT(&ni, LOOKUP, ISOPEN | FOLLOW | LOCKLEAF | MPSAFE | AUDITVNODE1, > + NDINIT(&ni, LOOKUP, ISOPEN | FOLLOW | LOCKLEAF | AUDITVNODE1, > UIO_SYSSPACE, library, td); > error =3D namei(&ni); > LFREEPATH(library); > @@ -269,7 +268,6 @@ linux_uselib(struct thread *td, struct l > goto cleanup; > =20 > vp =3D ni.ni_vp; > - vfslocked =3D NDHASGIANT(&ni); > NDFREE(&ni, NDF_ONLY_PNBUF); > =20 > /* > @@ -393,7 +391,6 @@ linux_uselib(struct thread *td, struct l > */ > locked =3D 0; > VOP_UNLOCK(vp, 0); > - VFS_UNLOCK_GIANT(vfslocked); > =20 > /* > * Check if file_offset page aligned. Currently we cannot handle > @@ -463,10 +460,8 @@ linux_uselib(struct thread *td, struct l > =20 > cleanup: > /* Unlock vnode if needed */ > - if (locked) { > + if (locked) > VOP_UNLOCK(vp, 0); > - VFS_UNLOCK_GIANT(vfslocked); > - } > =20 > /* Release the temporary mapping. */ > if (a_out) >=20 > Modified: head/sys/compat/ndis/subr_ndis.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/compat/ndis/subr_ndis.c Mon Oct 22 17:47:37 2012 (r241895) > +++ head/sys/compat/ndis/subr_ndis.c Mon Oct 22 17:50:54 2012 (r241896) > @@ -2741,7 +2741,7 @@ NdisOpenFile(status, filehandle, filelen > char *afilename =3D NULL; > struct thread *td =3D curthread; > struct nameidata nd; > - int flags, error, vfslocked; > + int flags, error; > struct vattr vat; > struct vattr *vap =3D &vat; > ndis_fh *fh; > @@ -2821,7 +2821,7 @@ NdisOpenFile(status, filehandle, filelen > if (td->td_proc->p_fd->fd_cdir =3D=3D NULL) > td->td_proc->p_fd->fd_cdir =3D rootvnode; > =20 > - NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, UIO_SYSSPACE, path, td); > + NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, path, td); > =20 > flags =3D FREAD; > error =3D vn_open(&nd, &flags, 0, NULL); > @@ -2833,7 +2833,6 @@ NdisOpenFile(status, filehandle, filelen > free(afilename, M_DEVBUF); > return; > } > - vfslocked =3D NDHASGIANT(&nd); > =20 > ExFreePool(path); > =20 > @@ -2842,7 +2841,6 @@ NdisOpenFile(status, filehandle, filelen > /* Get the file size. */ > VOP_GETATTR(nd.ni_vp, vap, td->td_ucred); > VOP_UNLOCK(nd.ni_vp, 0); > - VFS_UNLOCK_GIANT(vfslocked); > =20 > fh->nf_vp =3D nd.ni_vp; > fh->nf_map =3D NULL; > @@ -2862,7 +2860,7 @@ NdisMapFile(status, mappedbuffer, fileha > struct thread *td =3D curthread; > linker_file_t lf; > caddr_t kldstart; > - int error, vfslocked; > + int error; > ssize_t resid; > struct vnode *vp; > =20 > @@ -2903,10 +2901,8 @@ NdisMapFile(status, mappedbuffer, fileha > } > =20 > vp =3D fh->nf_vp; > - vfslocked =3D VFS_LOCK_GIANT(vp->v_mount); > error =3D vn_rdwr(UIO_READ, vp, fh->nf_map, fh->nf_maplen, 0, > UIO_SYSSPACE, 0, td->td_ucred, NOCRED, &resid, td); > - VFS_UNLOCK_GIANT(vfslocked); > =20 > if (error) > *status =3D NDIS_STATUS_FAILURE; > @@ -2937,7 +2933,6 @@ NdisCloseFile(filehandle) > { > struct thread *td =3D curthread; > ndis_fh *fh; > - int vfslocked; > struct vnode *vp; > =20 > if (filehandle =3D=3D NULL) > @@ -2955,9 +2950,7 @@ NdisCloseFile(filehandle) > =20 > if (fh->nf_type =3D=3D NDIS_FH_TYPE_VFS) { > vp =3D fh->nf_vp; > - vfslocked =3D VFS_LOCK_GIANT(vp->v_mount); > vn_close(vp, FREAD, td->td_ucred, td); > - VFS_UNLOCK_GIANT(vfslocked); > } > =20 > fh->nf_vp =3D NULL; >=20 > Modified: head/sys/compat/svr4/svr4_misc.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/compat/svr4/svr4_misc.c Mon Oct 22 17:47:37 2012 (r241895) > +++ head/sys/compat/svr4/svr4_misc.c Mon Oct 22 17:50:54 2012 (r241896) > @@ -241,7 +241,7 @@ svr4_sys_getdents64(td, uap) > struct iovec aiov; > off_t off; > struct svr4_dirent64 svr4_dirent; > - int buflen, error, eofflag, nbytes, justone, vfslocked; > + int buflen, error, eofflag, nbytes, justone; > u_long *cookies =3D NULL, *cookiep; > int ncookies; > =20 > @@ -258,9 +258,7 @@ svr4_sys_getdents64(td, uap) > } > =20 > vp =3D fp->f_vnode; > - vfslocked =3D VFS_LOCK_GIANT(vp->v_mount); > if (vp->v_type !=3D VDIR) { > - VFS_UNLOCK_GIANT(vfslocked); > fdrop(fp, td); > return (EINVAL); > } > @@ -397,7 +395,6 @@ eof: > td->td_retval[0] =3D nbytes - resid; > out: > VOP_UNLOCK(vp, 0); > - VFS_UNLOCK_GIANT(vfslocked); > fdrop(fp, td); > if (cookies) > free(cookies, M_TEMP); > @@ -422,7 +419,7 @@ svr4_sys_getdents(td, uap) > struct iovec aiov; > struct svr4_dirent idb; > off_t off; /* true file offset */ > - int buflen, error, eofflag, vfslocked; > + int buflen, error, eofflag; > u_long *cookiebuf =3D NULL, *cookie; > int ncookies =3D 0, *retval =3D td->td_retval; > =20 > @@ -439,9 +436,7 @@ svr4_sys_getdents(td, uap) > } > =20 > vp =3D fp->f_vnode; > - vfslocked =3D VFS_LOCK_GIANT(vp->v_mount); > if (vp->v_type !=3D VDIR) { > - VFS_UNLOCK_GIANT(vfslocked); > fdrop(fp, td); > return (EINVAL); > } > @@ -534,7 +529,6 @@ eof: > *retval =3D uap->nbytes - resid; > out: > VOP_UNLOCK(vp, 0); > - VFS_UNLOCK_GIANT(vfslocked); > fdrop(fp, td); > if (cookiebuf) > free(cookiebuf, M_TEMP); > @@ -614,7 +608,7 @@ svr4_sys_fchroot(td, uap) > struct filedesc *fdp =3D td->td_proc->p_fd; > struct vnode *vp; > struct file *fp; > - int error, vfslocked; > + int error; > =20 > if ((error =3D priv_check(td, PRIV_VFS_FCHROOT)) !=3D 0) > return error; > @@ -624,7 +618,6 @@ svr4_sys_fchroot(td, uap) > vp =3D fp->f_vnode; > VREF(vp); > fdrop(fp, td); > - vfslocked =3D VFS_LOCK_GIANT(vp->v_mount); > vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); > error =3D change_dir(vp, td); > if (error) > @@ -637,11 +630,9 @@ svr4_sys_fchroot(td, uap) > VOP_UNLOCK(vp, 0); > error =3D change_root(vp, td); > vrele(vp); > - VFS_UNLOCK_GIANT(vfslocked); > return (error); > fail: > vput(vp); > - VFS_UNLOCK_GIANT(vfslocked); > return (error); > } > =20 > @@ -1652,13 +1643,12 @@ svr4_sys_resolvepath(td, uap) > int error, *retval =3D td->td_retval; > unsigned int ncopy; > =20 > - NDINIT(&nd, LOOKUP, NOFOLLOW | SAVENAME | MPSAFE, UIO_USERSPACE, > + NDINIT(&nd, LOOKUP, NOFOLLOW | SAVENAME, UIO_USERSPACE, > uap->path, td); > =20 > if ((error =3D namei(&nd)) !=3D 0) > return (error); > NDFREE(&nd, NDF_NO_FREE_PNBUF); > - VFS_UNLOCK_GIANT(NDHASGIANT(&nd)); > =20 > ncopy =3D min(uap->bufsiz, strlen(nd.ni_cnd.cn_pnbuf) + 1); > if ((error =3D copyout(nd.ni_cnd.cn_pnbuf, uap->buf, ncopy)) !=3D 0) >=20 > Modified: head/sys/conf/NOTES > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/conf/NOTES Mon Oct 22 17:47:37 2012 (r241895) > +++ head/sys/conf/NOTES Mon Oct 22 17:50:54 2012 (r241896) > @@ -1088,9 +1088,6 @@ options REISERFS > # unsuitable for inclusion on machines with untrusted local users. > options VFS_AIO > =20 > -# Enable mounting of non-MPSAFE filesystems. > -options VFS_ALLOW_NONMPSAFE > - > # Cryptographically secure random number generator; /dev/random > device random > =20 >=20 > Modified: head/sys/conf/options > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/conf/options Mon Oct 22 17:47:37 2012 (r241895) > +++ head/sys/conf/options Mon Oct 22 17:50:54 2012 (r241896) > @@ -188,7 +188,6 @@ SW_WATCHDOG opt_watchdog.h > TURNSTILE_PROFILING > UMTX_PROFILING > VFS_AIO > -VFS_ALLOW_NONMPSAFE > VERBOSE_SYSINIT opt_global.h > WLCACHE opt_wavelan.h > WLDEBUG opt_wavelan.h >=20 > Modified: head/sys/dev/hwpmc/hwpmc_mod.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/dev/hwpmc/hwpmc_mod.c Mon Oct 22 17:47:37 2012 (r241895) > +++ head/sys/dev/hwpmc/hwpmc_mod.c Mon Oct 22 17:50:54 2012 (r241896) > @@ -1632,7 +1632,6 @@ pmc_log_kernel_mappings(struct pmc *pm) > static void > pmc_log_process_mappings(struct pmc_owner *po, struct proc *p) > { > - int locked; > vm_map_t map; > struct vnode *vp; > struct vmspace *vm; > @@ -1742,9 +1741,7 @@ pmc_log_process_mappings(struct pmc_owne > pmc_getfilename(vp, &fullpath, &freepath); > last_vp =3D vp; > =20 > - locked =3D VFS_LOCK_GIANT(vp->v_mount); > vrele(vp); > - VFS_UNLOCK_GIANT(locked); > =20 > vp =3D NULL; > pmclog_process_map_in(po, p->p_pid, start_addr, fullpath); >=20 > Modified: head/sys/dev/md/md.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/dev/md/md.c Mon Oct 22 17:47:37 2012 (r241895) > +++ head/sys/dev/md/md.c Mon Oct 22 17:50:54 2012 (r241896) > @@ -512,7 +512,7 @@ mdstart_preload(struct md_s *sc, struct=20 > static int > mdstart_vnode(struct md_s *sc, struct bio *bp) > { > - int error, vfslocked; > + int error; > struct uio auio; > struct iovec aiov; > struct mount *mp; > @@ -542,13 +542,11 @@ mdstart_vnode(struct md_s *sc, struct bi > */ > =20 > if (bp->bio_cmd =3D=3D BIO_FLUSH) { > - vfslocked =3D VFS_LOCK_GIANT(vp->v_mount); > (void) vn_start_write(vp, &mp, V_WAIT); > vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); > error =3D VOP_FSYNC(vp, MNT_WAIT, td); > VOP_UNLOCK(vp, 0); > vn_finished_write(mp); > - VFS_UNLOCK_GIANT(vfslocked); > return (error); > } > =20 > @@ -570,7 +568,6 @@ mdstart_vnode(struct md_s *sc, struct bi > auio.uio_rw =3D UIO_WRITE; > auio.uio_td =3D td; > end =3D bp->bio_offset + bp->bio_length; > - vfslocked =3D VFS_LOCK_GIANT(vp->v_mount); > (void) vn_start_write(vp, &mp, V_WAIT); > vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); > error =3D 0; > @@ -588,7 +585,6 @@ mdstart_vnode(struct md_s *sc, struct bi > VOP_UNLOCK(vp, 0); > vn_finished_write(mp); > bp->bio_resid =3D end - auio.uio_offset; > - VFS_UNLOCK_GIANT(vfslocked); > return (error); > } > =20 > @@ -610,7 +606,6 @@ mdstart_vnode(struct md_s *sc, struct bi > * When reading set IO_DIRECT to try to avoid double-caching > * the data. When writing IO_DIRECT is not optimal. > */ > - vfslocked =3D VFS_LOCK_GIANT(vp->v_mount); > if (bp->bio_cmd =3D=3D BIO_READ) { > vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); > error =3D VOP_READ(vp, &auio, IO_DIRECT, sc->cred); > @@ -623,7 +618,6 @@ mdstart_vnode(struct md_s *sc, struct bi > VOP_UNLOCK(vp, 0); > vn_finished_write(mp); > } > - VFS_UNLOCK_GIANT(vfslocked); > bp->bio_resid =3D auio.uio_resid; > return (error); > } > @@ -957,7 +951,7 @@ mdcreate_vnode(struct md_s *sc, struct m > struct vattr vattr; > struct nameidata nd; > char *fname; > - int error, flags, vfslocked; > + int error, flags; > =20 > /* > * Kernel-originated requests must have the filename appended > @@ -976,11 +970,10 @@ mdcreate_vnode(struct md_s *sc, struct m > * set the FWRITE mask before trying to open the backing store. > */ > flags =3D FREAD | ((mdio->md_options & MD_READONLY) ? 0 : FWRITE); > - NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, UIO_SYSSPACE, sc->file, td); > + NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, sc->file, td); > error =3D vn_open(&nd, &flags, 0, NULL); > if (error !=3D 0) > return (error); > - vfslocked =3D NDHASGIANT(&nd); > NDFREE(&nd, NDF_ONLY_PNBUF); > if (nd.ni_vp->v_type !=3D VREG) { > error =3D EINVAL; > @@ -1016,19 +1009,16 @@ mdcreate_vnode(struct md_s *sc, struct m > nd.ni_vp->v_vflag &=3D ~VV_MD; > goto bad; > } > - VFS_UNLOCK_GIANT(vfslocked); > return (0); > bad: > VOP_UNLOCK(nd.ni_vp, 0); > (void)vn_close(nd.ni_vp, flags, td->td_ucred, td); > - VFS_UNLOCK_GIANT(vfslocked); > return (error); > } > =20 > static int > mddestroy(struct md_s *sc, struct thread *td) > { > - int vfslocked; > =20 > if (sc->gp) { > sc->gp->softc =3D NULL; > @@ -1050,13 +1040,11 @@ mddestroy(struct md_s *sc, struct thread > mtx_unlock(&sc->queue_mtx); > mtx_destroy(&sc->queue_mtx); > if (sc->vnode !=3D NULL) { > - vfslocked =3D VFS_LOCK_GIANT(sc->vnode->v_mount); > vn_lock(sc->vnode, LK_EXCLUSIVE | LK_RETRY); > sc->vnode->v_vflag &=3D ~VV_MD; > VOP_UNLOCK(sc->vnode, 0); > (void)vn_close(sc->vnode, sc->flags & MD_READONLY ? > FREAD : (FREAD|FWRITE), sc->cred, td); > - VFS_UNLOCK_GIANT(vfslocked); > } > if (sc->cred !=3D NULL) > crfree(sc->cred); >=20 > Modified: head/sys/dev/nand/nandsim_swap.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/dev/nand/nandsim_swap.c Mon Oct 22 17:47:37 2012 (r241895) > +++ head/sys/dev/nand/nandsim_swap.c Mon Oct 22 17:50:54 2012 (r241896) > @@ -142,9 +142,9 @@ static int > swap_file_open(struct chip_swap *swap, const char *swap_file) > { > struct nameidata nd; > - int vfslocked, flags, error; > + int flags, error; > =20 > - NDINIT(&nd, LOOKUP, NOFOLLOW | MPSAFE, UIO_SYSSPACE, swap_file, > + NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, swap_file, > curthread); > =20 > flags =3D FWRITE | FREAD | O_NOFOLLOW | O_CREAT | O_TRUNC; > @@ -157,12 +157,10 @@ swap_file_open(struct chip_swap *swap, c > } > =20 > swap->swap_cred =3D crhold(curthread->td_ucred); > - vfslocked =3D NDHASGIANT(&nd); > NDFREE(&nd, NDF_ONLY_PNBUF); > =20 > /* We just unlock so we hold a reference */ > VOP_UNLOCK(nd.ni_vp, 0); > - VFS_UNLOCK_GIANT(vfslocked); > =20 > swap->swap_vp =3D nd.ni_vp; > =20 > @@ -192,7 +190,6 @@ swap_file_write(struct chip_swap *swap,=20 > struct vnode *vp; > struct uio auio; > struct iovec aiov; > - int vfslocked; > =20 > if (swap =3D=3D NULL || blk_state =3D=3D NULL) > return (-1); > @@ -222,13 +219,11 @@ swap_file_write(struct chip_swap *swap,=20 > auio.uio_resid =3D swap->blk_size; > auio.uio_td =3D td; > =20 > - vfslocked =3D VFS_LOCK_GIANT(vp->v_mount); > vn_start_write(vp, &mp, V_WAIT); > vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); > VOP_WRITE(vp, &auio, IO_UNIT, swap->swap_cred); > VOP_UNLOCK(vp, 0); > vn_finished_write(mp); > - VFS_UNLOCK_GIANT(vfslocked); > =20 > return (0); > } > @@ -241,7 +236,6 @@ swap_file_read(struct chip_swap *swap, s > struct vnode *vp; > struct uio auio; > struct iovec aiov; > - int vfslocked; > =20 > if (swap =3D=3D NULL || blk_state =3D=3D NULL) > return (-1); > @@ -267,11 +261,9 @@ swap_file_read(struct chip_swap *swap, s > auio.uio_resid =3D swap->blk_size; > auio.uio_td =3D td; > =20 > - vfslocked =3D VFS_LOCK_GIANT(vp->v_mount); >=20 > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --pf9I7BMVVzbSWLtt Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlCG6e8ACgkQForvXbEpPzQ1iACfVIwuhi1EbjXShJ45DLIXsII9 kOYAoMYcMoTsquCowQ21SndfnjCaFaOP =+Bbm -----END PGP SIGNATURE----- --pf9I7BMVVzbSWLtt-- From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 19:04: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 93B85DB8; Tue, 23 Oct 2012 19:04: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 7BA078FC08; Tue, 23 Oct 2012 19:04: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 q9NJ4642035833; Tue, 23 Oct 2012 19:04:06 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NJ46rr035831; Tue, 23 Oct 2012 19:04:06 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210231904.q9NJ46rr035831@svn.freebsd.org> From: John Baldwin Date: Tue, 23 Oct 2012 19:04:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241961 - stable/9/sys/conf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 19:04:06 -0000 Author: jhb Date: Tue Oct 23 19:04:05 2012 New Revision: 241961 URL: http://svn.freebsd.org/changeset/base/241961 Log: Update the make version required to use an empty command for NORMAL_CTFCONVERT to require the most recent MFC to 9. Submitted by: Petr Lampa lampa fit vutbr cz Modified: stable/9/sys/conf/kern.pre.mk Modified: stable/9/sys/conf/kern.pre.mk ============================================================================== --- stable/9/sys/conf/kern.pre.mk Tue Oct 23 18:57:20 2012 (r241960) +++ stable/9/sys/conf/kern.pre.mk Tue Oct 23 19:04:05 2012 (r241961) @@ -138,7 +138,7 @@ NORMAL_FWO= ${LD} -b binary --no-warn-mi .if ${MK_CTF} != "no" NORMAL_CTFCONVERT= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.elif ${MAKE_VERSION} >= 5201111300 +.elif ${MAKE_VERSION} >= 9201210220 NORMAL_CTFCONVERT= .else NORMAL_CTFCONVERT= @: From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 19:04: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 C94C3FFB; Tue, 23 Oct 2012 19:04: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 AB8438FC17; Tue, 23 Oct 2012 19:04: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 q9NJ4nnE036049; Tue, 23 Oct 2012 19:04:49 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NJ4niV036046; Tue, 23 Oct 2012 19:04:49 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210231904.q9NJ4niV036046@svn.freebsd.org> From: John Baldwin Date: Tue, 23 Oct 2012 19:04:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r241962 - stable/8/sys/conf X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 19:04:50 -0000 Author: jhb Date: Tue Oct 23 19:04:49 2012 New Revision: 241962 URL: http://svn.freebsd.org/changeset/base/241962 Log: Remove attempt to use an empty NORMAL_CTFCONVERT and always fall back to using a the null "@:" command if CTF is disabled. Modified: stable/8/sys/conf/kern.pre.mk Modified: stable/8/sys/conf/kern.pre.mk ============================================================================== --- stable/8/sys/conf/kern.pre.mk Tue Oct 23 19:04:05 2012 (r241961) +++ stable/8/sys/conf/kern.pre.mk Tue Oct 23 19:04:49 2012 (r241962) @@ -137,8 +137,6 @@ NORMAL_FWO= ${LD} -b binary --no-warn-mi .if ${MK_CTF} != "no" NORMAL_CTFCONVERT= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} -.elif ${MAKE_VERSION} >= 5201111300 -NORMAL_CTFCONVERT= .else NORMAL_CTFCONVERT= @: .endif From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 19:15: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 778FF35D; Tue, 23 Oct 2012 19:15:25 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5EE668FC0C; Tue, 23 Oct 2012 19:15: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 q9NJFP9Q037947; Tue, 23 Oct 2012 19:15:25 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NJFPec037945; Tue, 23 Oct 2012 19:15:25 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201210231915.q9NJFPec037945@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 23 Oct 2012 19:15:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r241963 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 19:15:25 -0000 Author: marcel Date: Tue Oct 23 19:15:24 2012 New Revision: 241963 URL: http://svn.freebsd.org/changeset/base/241963 Log: Add Simon J. Gerraty (sjg@) to the ranks of src committers. He has been the bmake maintainer for more than 10 years (i.e. longer than anyone cares to remember :-) and will be using his skills and expertise to bring FreeBSD's build infrastructure up to par. Other areas of interest include Automated Testing Framework, software packaging, software delivery and installation as well as security in general. Approved by: core Modified: svnadmin/conf/access Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Tue Oct 23 19:04:49 2012 (r241962) +++ svnadmin/conf/access Tue Oct 23 19:15:24 2012 (r241963) @@ -229,6 +229,7 @@ sepotvin silby simokawa simon +sjg sobomax sos commit@deepcore.dk sson From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 19:16: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 D53224CD for ; Tue, 23 Oct 2012 19:16:06 +0000 (UTC) (envelope-from mailer-daemon@vniz.net) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3C5F68FC18 for ; Tue, 23 Oct 2012 19:16:05 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id e12so3299970lag.13 for ; Tue, 23 Oct 2012 12:16:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:disposition-notification-to:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:openpgp :content-type:content-transfer-encoding:x-gm-message-state; bh=TiKwXfG3XCUHHO7YwY4RbFNwT5KK7lroelcXw35GOFU=; b=fvCkXt/tLAiGhy4ugRPhR2NCgIOppV92OgtESEtDj67BiMJ4bY/pEdRvnC2WMRLxFL vnAWbG4Ya7f/+fV+Mchj2rhf7PX2UQPK33yA0KJDUr6HI9CKOytNLKEk85rJYOtxG/XM H8u9OP4z4Fhom/w8H52M1pSmkZefjCo2RsOK51MK6e+3D/ayYAYpk2p5YkVGdxrP2ZJO 8R78mObDwWfLIKJof3Nzm/YVDfSfuJJa0RN2b8FKbsq6kQ8KDahfgotwBqXSynqw2wrW drSy2fLGuprFyWgRnRkNNQyfjamQDSH7weVPYFM4RGf4hkK4j6ZBnD8U4mz9lbKo6Lra NTSw== Received: by 10.112.102.10 with SMTP id fk10mr5458470lbb.40.1351019764565; Tue, 23 Oct 2012 12:16:04 -0700 (PDT) Received: from [192.168.1.2] ([89.169.140.97]) by mx.google.com with ESMTPS id y10sm4326006lbg.4.2012.10.23.12.16.03 (version=SSLv3 cipher=OTHER); Tue, 23 Oct 2012 12:16:04 -0700 (PDT) Message-ID: <5086ECF5.3050707@freebsd.org> Date: Tue, 23 Oct 2012 23:16:05 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: John Baldwin Subject: Re: svn commit: r241962 - stable/8/sys/conf References: <201210231904.q9NJ4niV036046@svn.freebsd.org> In-Reply-To: <201210231904.q9NJ4niV036046@svn.freebsd.org> OpenPGP: id=964474DD Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQn1vSNCOi8YBKlFM18aIcr3FmpH+WEaZV0HiE4w4IuCleOlxEyIw2bYwmZqnwM9xqIgyn9t Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 19:16:06 -0000 On 23.10.2012 23:04, John Baldwin wrote: > Remove attempt to use an empty NORMAL_CTFCONVERT and always fall back to > using a the null "@:" command if CTF is disabled. Thanks for merging. BTW, you can merge make change into branch 8 too and use complex check like that .elif (${MAKE_VERSION} >= 8 && ${MAKE_VERSION} < 9000000000) || ${MAKE_VERSION} >= 9201210220 to keep mk files similar everywhere. I don't know it worth efforts and don't check the make change compatible with branch 8. From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 19:17: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 040F164C; Tue, 23 Oct 2012 19:17:44 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DFAE28FC0A; Tue, 23 Oct 2012 19:17: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 q9NJHhOd038357; Tue, 23 Oct 2012 19:17:43 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NJHhbs038354; Tue, 23 Oct 2012 19:17:43 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201210231917.q9NJHhbs038354@svn.freebsd.org> From: Warner Losh Date: Tue, 23 Oct 2012 19:17:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241964 - in head/sys: conf mips/rt305x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 19:17:44 -0000 Author: imp Date: Tue Oct 23 19:17:43 2012 New Revision: 241964 URL: http://svn.freebsd.org/changeset/base/241964 Log: Turns out the nvram env was common, so move it back up to get PB92 working. Modified: head/sys/conf/files.mips head/sys/mips/rt305x/files.rt305x Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Tue Oct 23 19:15:24 2012 (r241963) +++ head/sys/conf/files.mips Tue Oct 23 19:17:43 2012 (r241964) @@ -96,3 +96,6 @@ dev/fdt/fdt_mips.c optional fdt # crypto support -- use generic crypto/blowfish/bf_enc.c optional crypto | ipsec crypto/des/des_enc.c optional crypto | ipsec + +# AP common nvram interface +dev/nvram2env/nvram2env.c optional nvram2env Modified: head/sys/mips/rt305x/files.rt305x ============================================================================== --- head/sys/mips/rt305x/files.rt305x Tue Oct 23 19:15:24 2012 (r241963) +++ head/sys/mips/rt305x/files.rt305x Tue Oct 23 19:17:43 2012 (r241964) @@ -12,4 +12,3 @@ mips/rt305x/uart_dev_rt305x.c optional u mips/mips/intr_machdep.c standard mips/mips/tick.c standard dev/rt/if_rt.c optional rt -dev/nvram2env/nvram2env.c optional nvram2env From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 19:47:08 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 93AE8E65; Tue, 23 Oct 2012 19:47:08 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 624598FC12; Tue, 23 Oct 2012 19:47: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 q9NJl8YU043346; Tue, 23 Oct 2012 19:47:08 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NJl8YF043344; Tue, 23 Oct 2012 19:47:08 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201210231947.q9NJl8YF043344@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 23 Oct 2012 19:47:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r241967 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 19:47:08 -0000 Author: marcel Date: Tue Oct 23 19:47:07 2012 New Revision: 241967 URL: http://svn.freebsd.org/changeset/base/241967 Log: Add Simon J. Gerraty (sjg@) as new source committer, mentored by marcel. Modified: svnadmin/conf/mentors Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Tue Oct 23 19:26:49 2012 (r241966) +++ svnadmin/conf/mentors Tue Oct 23 19:47:07 2012 (r241967) @@ -30,6 +30,7 @@ monthadar adrian nork imp peterj jhb Co-mentor: grog ray adrian +sjg marcel snb dwmalone sson gnn versus gavin Co-mentor: fjoe From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 20:21: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 23F69F14; Tue, 23 Oct 2012 20:21:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id E98A38FC08; Tue, 23 Oct 2012 20:21:41 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 1FDABB946; Tue, 23 Oct 2012 16:21:41 -0400 (EDT) From: John Baldwin To: Andrey Chernov Subject: Re: svn commit: r241962 - stable/8/sys/conf Date: Tue, 23 Oct 2012 16:20:56 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <201210231904.q9NJ4niV036046@svn.freebsd.org> <5086ECF5.3050707@freebsd.org> In-Reply-To: <5086ECF5.3050707@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201210231620.56440.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 23 Oct 2012 16:21:41 -0400 (EDT) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 20:21:42 -0000 On Tuesday, October 23, 2012 3:16:05 pm Andrey Chernov wrote: > On 23.10.2012 23:04, John Baldwin wrote: > > Remove attempt to use an empty NORMAL_CTFCONVERT and always fall back to > > using a the null "@:" command if CTF is disabled. > > Thanks for merging. BTW, you can merge make change into branch 8 too and use > complex check like that > > .elif (${MAKE_VERSION} >= 8 && ${MAKE_VERSION} < 9000000000) || ${MAKE_VERSION} >= 9201210220 > > to keep mk files similar everywhere. > I don't know it worth efforts and don't check the make change compatible with > branch 8. I considered it a bit risky to merge the make changes to 8 (make in 8 and 9 are not identical), so I went with the simpler fix. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 21:20: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 46EF7F61; Tue, 23 Oct 2012 21:20:06 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2EFEB8FC0C; Tue, 23 Oct 2012 21:20: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 q9NLK66V059679; Tue, 23 Oct 2012 21:20:06 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NLK5FY059677; Tue, 23 Oct 2012 21:20:05 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201210232120.q9NLK5FY059677@svn.freebsd.org> From: Brooks Davis Date: Tue, 23 Oct 2012 21:20:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r241969 - stable/8/share/mk X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 21:20:06 -0000 Author: brooks Date: Tue Oct 23 21:20:05 2012 New Revision: 241969 URL: http://svn.freebsd.org/changeset/base/241969 Log: MFC r228120: Allow NO_FOO to override WITH_FOO that could be specified in /etc/src.conf. This is required to override knobs (e.g. WITH_PROFILE) during buildworld stages in Makefile.inc1 (otherwise the build is stopped due to both WITH_FOO and WITHOUT_FOO defined). PR: misc/172873 Modified: stable/8/share/mk/bsd.own.mk Directory Properties: stable/8/share/mk/ (props changed) Modified: stable/8/share/mk/bsd.own.mk ============================================================================== --- stable/8/share/mk/bsd.own.mk Tue Oct 23 20:29:50 2012 (r241968) +++ stable/8/share/mk/bsd.own.mk Tue Oct 23 21:20:05 2012 (r241969) @@ -208,6 +208,9 @@ COMPRESS_EXT?= .gz MAN \ PROFILE .if defined(NO_${var}) +.if defined(WITH_${var}) +.undef WITH_${var} +.endif WITHOUT_${var}= .endif .endfor From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 22:58: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 8E7A2B7F; Tue, 23 Oct 2012 22:58:26 +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 75EBC8FC19; Tue, 23 Oct 2012 22:58: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 q9NMwQSr077236; Tue, 23 Oct 2012 22:58:26 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NMwQpg077233; Tue, 23 Oct 2012 22:58:26 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201210232258.q9NMwQpg077233@svn.freebsd.org> From: Andrew Thompson Date: Tue, 23 Oct 2012 22:58:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241970 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 22:58:26 -0000 Author: thompsa Date: Tue Oct 23 22:58:25 2012 New Revision: 241970 URL: http://svn.freebsd.org/changeset/base/241970 Log: Fix spelling of NFSCL option. Modified: head/sys/mips/conf/AR71XX_BASE head/sys/mips/conf/AR724X_BASE Modified: head/sys/mips/conf/AR71XX_BASE ============================================================================== --- head/sys/mips/conf/AR71XX_BASE Tue Oct 23 21:20:05 2012 (r241969) +++ head/sys/mips/conf/AR71XX_BASE Tue Oct 23 22:58:25 2012 (r241970) @@ -33,7 +33,7 @@ options SCHED_4BSD #4BSD scheduler options INET #InterNETworking options INET6 # IPv6 -# options NFS_CL #Network Filesystem Client +# options NFSCL #Network Filesystem Client options PSEUDOFS #Pseudo-filesystem framework options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions Modified: head/sys/mips/conf/AR724X_BASE ============================================================================== --- head/sys/mips/conf/AR724X_BASE Tue Oct 23 21:20:05 2012 (r241969) +++ head/sys/mips/conf/AR724X_BASE Tue Oct 23 22:58:25 2012 (r241970) @@ -33,7 +33,7 @@ options KDB options SCHED_4BSD #4BSD scheduler options INET #InterNETworking #options INET6 # IPv6 -#options NFS_CL #Network Filesystem Client +#options NFSCL #Network Filesystem Client options PSEUDOFS #Pseudo-filesystem framework options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 23: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 A787DE9B; Tue, 23 Oct 2012 23:13:45 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A36A8FC08; Tue, 23 Oct 2012 23: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 q9NNDjdK080150; Tue, 23 Oct 2012 23:13:45 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NNDj3W080148; Tue, 23 Oct 2012 23:13:45 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201210232313.q9NNDj3W080148@svn.freebsd.org> From: Andre Oppermann Date: Tue, 23 Oct 2012 23:13:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241971 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 23:13:45 -0000 Author: andre Date: Tue Oct 23 23:13:44 2012 New Revision: 241971 URL: http://svn.freebsd.org/changeset/base/241971 Log: Change the dependency of kern/uipc_cow.c from zero_copy_sockets to socket_send_cow. Missed in r241931. Submitted by: pluknet Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Oct 23 22:58:25 2012 (r241970) +++ head/sys/conf/files Tue Oct 23 23:13:44 2012 (r241971) @@ -2691,7 +2691,7 @@ kern/tty_pts.c standard kern/tty_tty.c standard kern/tty_ttydisc.c standard kern/uipc_accf.c optional inet -kern/uipc_cow.c optional zero_copy_sockets +kern/uipc_cow.c optional socket_send_cow kern/uipc_debug.c optional ddb kern/uipc_domain.c standard kern/uipc_mbuf.c standard From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 23:36: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 CB26A78F; Tue, 23 Oct 2012 23:36:29 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B22148FC12; Tue, 23 Oct 2012 23:36: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 q9NNaT8B084080; Tue, 23 Oct 2012 23:36:29 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NNaTNm084077; Tue, 23 Oct 2012 23:36:29 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201210232336.q9NNaTNm084077@svn.freebsd.org> From: "David E. O'Brien" Date: Tue, 23 Oct 2012 23:36:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241972 - head/usr.bin/script X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 23:36:29 -0000 Author: obrien Date: Tue Oct 23 23:36:29 2012 New Revision: 241972 URL: http://svn.freebsd.org/changeset/base/241972 Log: Don't include both & . Modified: head/usr.bin/script/script.c Modified: head/usr.bin/script/script.c ============================================================================== --- head/usr.bin/script/script.c Tue Oct 23 23:13:44 2012 (r241971) +++ head/usr.bin/script/script.c Tue Oct 23 23:36:29 2012 (r241972) @@ -27,28 +27,23 @@ * SUCH DAMAGE. */ -#include - +#include __FBSDID("$FreeBSD$"); - #ifndef lint static const char copyright[] = "@(#) Copyright (c) 1980, 1992, 1993\n\ The Regents of the University of California. All rights reserved.\n"; #endif - #ifndef lint static const char sccsid[] = "@(#)script.c 8.1 (Berkeley) 6/6/93"; #endif -#include #include #include #include #include #include #include -#include #include #include From owner-svn-src-all@FreeBSD.ORG Tue Oct 23 23:49: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 8E5AFBD4; Tue, 23 Oct 2012 23:49:18 +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 706228FC0A; Tue, 23 Oct 2012 23:49: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 q9NNnId4086338; Tue, 23 Oct 2012 23:49:18 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NNnIxD086335; Tue, 23 Oct 2012 23:49:18 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201210232349.q9NNnIxD086335@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 23 Oct 2012 23:49:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241973 - in head/sys: contrib/dev/acpica contrib/dev/acpica/common contrib/dev/acpica/compiler contrib/dev/acpica/components/debugger contrib/dev/acpica/components/disassembler contrib... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 23 Oct 2012 23:49:18 -0000 Author: jkim Date: Tue Oct 23 23:49:17 2012 New Revision: 241973 URL: http://svn.freebsd.org/changeset/base/241973 Log: Merge ACPICA 20121018. Modified: head/sys/contrib/dev/acpica/changes.txt (contents, props changed) head/sys/contrib/dev/acpica/common/adfile.c (contents, props changed) head/sys/contrib/dev/acpica/common/adisasm.c (contents, props changed) head/sys/contrib/dev/acpica/common/adwalk.c (contents, props changed) head/sys/contrib/dev/acpica/common/dmextern.c (contents, props changed) head/sys/contrib/dev/acpica/common/dmrestag.c (contents, props changed) head/sys/contrib/dev/acpica/common/dmtable.c (contents, props changed) head/sys/contrib/dev/acpica/common/dmtbdump.c (contents, props changed) head/sys/contrib/dev/acpica/common/dmtbinfo.c (contents, props changed) head/sys/contrib/dev/acpica/common/getopt.c (contents, props changed) head/sys/contrib/dev/acpica/compiler/aslcodegen.c (contents, props changed) head/sys/contrib/dev/acpica/compiler/aslcompile.c (contents, props changed) head/sys/contrib/dev/acpica/compiler/aslcompiler.h (contents, props changed) head/sys/contrib/dev/acpica/compiler/aslcompiler.y (contents, props changed) head/sys/contrib/dev/acpica/compiler/asldefine.h (contents, props changed) head/sys/contrib/dev/acpica/compiler/aslerror.c (contents, props changed) head/sys/contrib/dev/acpica/compiler/aslfiles.c (contents, props changed) head/sys/contrib/dev/acpica/compiler/aslfold.c (contents, props changed) head/sys/contrib/dev/acpica/compiler/aslglobal.h (contents, props changed) head/sys/contrib/dev/acpica/compiler/asllength.c (contents, props changed) head/sys/contrib/dev/acpica/compiler/asllisting.c (contents, props changed) head/sys/contrib/dev/acpica/compiler/aslload.c (contents, props changed) head/sys/contrib/dev/acpica/compiler/asllookup.c (contents, props changed) head/sys/contrib/dev/acpica/compiler/aslmain.c (contents, props changed) head/sys/contrib/dev/acpica/compiler/aslmap.c (contents, props changed) head/sys/contrib/dev/acpica/compiler/aslmessages.h (contents, props changed) head/sys/contrib/dev/acpica/compiler/aslopcodes.c (contents, props changed) head/sys/contrib/dev/acpica/compiler/asloperands.c (contents, props changed) head/sys/contrib/dev/acpica/compiler/aslopt.c (contents, props changed) head/sys/contrib/dev/acpica/compiler/aslresource.c (contents, props changed) head/sys/contrib/dev/acpica/compiler/aslrestype1.c (contents, props changed) head/sys/contrib/dev/acpica/compiler/aslrestype1i.c (contents, props changed) head/sys/contrib/dev/acpica/compiler/aslrestype2d.c (contents, props changed) head/sys/contrib/dev/acpica/compiler/aslrestype2e.c (contents, props changed) head/sys/contrib/dev/acpica/compiler/aslrestype2q.c (contents, props changed) head/sys/contrib/dev/acpica/compiler/aslrestype2w.c (contents, props changed) head/sys/contrib/dev/acpica/compiler/aslstartup.c (contents, props changed) head/sys/contrib/dev/acpica/compiler/aslstubs.c (contents, props changed) head/sys/contrib/dev/acpica/compiler/aslsupport.l (contents, props changed) head/sys/contrib/dev/acpica/compiler/asltransform.c (contents, props changed) head/sys/contrib/dev/acpica/compiler/asltree.c (contents, props changed) head/sys/contrib/dev/acpica/compiler/asltypes.h (contents, props changed) head/sys/contrib/dev/acpica/compiler/aslutils.c (contents, props changed) head/sys/contrib/dev/acpica/compiler/aslwalks.c (contents, props changed) head/sys/contrib/dev/acpica/compiler/dtcompile.c (contents, props changed) head/sys/contrib/dev/acpica/compiler/dtio.c (contents, props changed) head/sys/contrib/dev/acpica/compiler/dttable.c (contents, props changed) head/sys/contrib/dev/acpica/compiler/dttemplate.h (contents, props changed) head/sys/contrib/dev/acpica/compiler/prutils.c (contents, props changed) head/sys/contrib/dev/acpica/components/debugger/dbcmds.c (contents, props changed) head/sys/contrib/dev/acpica/components/debugger/dbdisply.c (contents, props changed) head/sys/contrib/dev/acpica/components/debugger/dbexec.c (contents, props changed) head/sys/contrib/dev/acpica/components/debugger/dbfileio.c (contents, props changed) head/sys/contrib/dev/acpica/components/debugger/dbhistry.c (contents, props changed) head/sys/contrib/dev/acpica/components/debugger/dbinput.c (contents, props changed) head/sys/contrib/dev/acpica/components/debugger/dbnames.c (contents, props changed) head/sys/contrib/dev/acpica/components/debugger/dbstats.c (contents, props changed) head/sys/contrib/dev/acpica/components/debugger/dbutils.c (contents, props changed) head/sys/contrib/dev/acpica/components/debugger/dbxface.c (contents, props changed) head/sys/contrib/dev/acpica/components/disassembler/dmbuffer.c (contents, props changed) head/sys/contrib/dev/acpica/components/disassembler/dmnames.c (contents, props changed) head/sys/contrib/dev/acpica/components/disassembler/dmobject.c (contents, props changed) head/sys/contrib/dev/acpica/components/disassembler/dmopcode.c (contents, props changed) head/sys/contrib/dev/acpica/components/disassembler/dmresrc.c (contents, props changed) head/sys/contrib/dev/acpica/components/disassembler/dmresrcl2.c (contents, props changed) head/sys/contrib/dev/acpica/components/disassembler/dmresrcs.c (contents, props changed) head/sys/contrib/dev/acpica/components/disassembler/dmutils.c (contents, props changed) head/sys/contrib/dev/acpica/components/disassembler/dmwalk.c (contents, props changed) head/sys/contrib/dev/acpica/components/dispatcher/dscontrol.c (contents, props changed) head/sys/contrib/dev/acpica/components/dispatcher/dsfield.c (contents, props changed) head/sys/contrib/dev/acpica/components/dispatcher/dsinit.c (contents, props changed) head/sys/contrib/dev/acpica/components/dispatcher/dsmethod.c (contents, props changed) head/sys/contrib/dev/acpica/components/dispatcher/dsmthdat.c (contents, props changed) head/sys/contrib/dev/acpica/components/dispatcher/dsobject.c (contents, props changed) head/sys/contrib/dev/acpica/components/dispatcher/dsopcode.c (contents, props changed) head/sys/contrib/dev/acpica/components/dispatcher/dsutils.c (contents, props changed) head/sys/contrib/dev/acpica/components/dispatcher/dswexec.c (contents, props changed) head/sys/contrib/dev/acpica/components/dispatcher/dswload2.c (contents, props changed) head/sys/contrib/dev/acpica/components/dispatcher/dswscope.c (contents, props changed) head/sys/contrib/dev/acpica/components/dispatcher/dswstate.c (contents, props changed) head/sys/contrib/dev/acpica/components/events/evevent.c (contents, props changed) head/sys/contrib/dev/acpica/components/events/evrgnini.c (contents, props changed) head/sys/contrib/dev/acpica/components/events/evxfgpe.c (contents, props changed) head/sys/contrib/dev/acpica/components/events/evxfregn.c (contents, props changed) head/sys/contrib/dev/acpica/components/executer/exconfig.c (contents, props changed) head/sys/contrib/dev/acpica/components/executer/exconvrt.c (contents, props changed) head/sys/contrib/dev/acpica/components/executer/excreate.c (contents, props changed) head/sys/contrib/dev/acpica/components/executer/exdebug.c (contents, props changed) head/sys/contrib/dev/acpica/components/executer/exdump.c (contents, props changed) head/sys/contrib/dev/acpica/components/executer/exfield.c (contents, props changed) head/sys/contrib/dev/acpica/components/executer/exfldio.c (contents, props changed) head/sys/contrib/dev/acpica/components/executer/exmisc.c (contents, props changed) head/sys/contrib/dev/acpica/components/executer/exmutex.c (contents, props changed) head/sys/contrib/dev/acpica/components/executer/exnames.c (contents, props changed) head/sys/contrib/dev/acpica/components/executer/exoparg1.c (contents, props changed) head/sys/contrib/dev/acpica/components/executer/exoparg2.c (contents, props changed) head/sys/contrib/dev/acpica/components/executer/exoparg3.c (contents, props changed) head/sys/contrib/dev/acpica/components/executer/exoparg6.c (contents, props changed) head/sys/contrib/dev/acpica/components/executer/exprep.c (contents, props changed) head/sys/contrib/dev/acpica/components/executer/exregion.c (contents, props changed) head/sys/contrib/dev/acpica/components/executer/exresnte.c (contents, props changed) head/sys/contrib/dev/acpica/components/executer/exresolv.c (contents, props changed) head/sys/contrib/dev/acpica/components/executer/exresop.c (contents, props changed) head/sys/contrib/dev/acpica/components/executer/exstore.c (contents, props changed) head/sys/contrib/dev/acpica/components/executer/exstoren.c (contents, props changed) head/sys/contrib/dev/acpica/components/executer/exstorob.c (contents, props changed) head/sys/contrib/dev/acpica/components/executer/exsystem.c (contents, props changed) head/sys/contrib/dev/acpica/components/executer/exutils.c (contents, props changed) head/sys/contrib/dev/acpica/components/hardware/hwacpi.c (contents, props changed) head/sys/contrib/dev/acpica/components/hardware/hwgpe.c (contents, props changed) head/sys/contrib/dev/acpica/components/hardware/hwpci.c (contents, props changed) head/sys/contrib/dev/acpica/components/hardware/hwregs.c (contents, props changed) head/sys/contrib/dev/acpica/components/hardware/hwtimer.c (contents, props changed) head/sys/contrib/dev/acpica/components/hardware/hwvalid.c (contents, props changed) head/sys/contrib/dev/acpica/components/hardware/hwxface.c (contents, props changed) head/sys/contrib/dev/acpica/components/namespace/nsaccess.c (contents, props changed) head/sys/contrib/dev/acpica/components/namespace/nsalloc.c (contents, props changed) head/sys/contrib/dev/acpica/components/namespace/nsdump.c (contents, props changed) head/sys/contrib/dev/acpica/components/namespace/nsdumpdv.c (contents, props changed) head/sys/contrib/dev/acpica/components/namespace/nseval.c (contents, props changed) head/sys/contrib/dev/acpica/components/namespace/nsinit.c (contents, props changed) head/sys/contrib/dev/acpica/components/namespace/nsload.c (contents, props changed) head/sys/contrib/dev/acpica/components/namespace/nsnames.c (contents, props changed) head/sys/contrib/dev/acpica/components/namespace/nsobject.c (contents, props changed) head/sys/contrib/dev/acpica/components/namespace/nsparse.c (contents, props changed) head/sys/contrib/dev/acpica/components/namespace/nssearch.c (contents, props changed) head/sys/contrib/dev/acpica/components/namespace/nsutils.c (contents, props changed) head/sys/contrib/dev/acpica/components/namespace/nswalk.c (contents, props changed) head/sys/contrib/dev/acpica/components/namespace/nsxfeval.c (contents, props changed) head/sys/contrib/dev/acpica/components/namespace/nsxfname.c (contents, props changed) head/sys/contrib/dev/acpica/components/namespace/nsxfobj.c (contents, props changed) head/sys/contrib/dev/acpica/components/parser/psargs.c (contents, props changed) head/sys/contrib/dev/acpica/components/parser/psloop.c (contents, props changed) head/sys/contrib/dev/acpica/components/parser/psopcode.c (contents, props changed) head/sys/contrib/dev/acpica/components/parser/psparse.c (contents, props changed) head/sys/contrib/dev/acpica/components/parser/psscope.c (contents, props changed) head/sys/contrib/dev/acpica/components/parser/pstree.c (contents, props changed) head/sys/contrib/dev/acpica/components/parser/psutils.c (contents, props changed) head/sys/contrib/dev/acpica/components/parser/psxface.c (contents, props changed) head/sys/contrib/dev/acpica/components/resources/rsaddr.c (contents, props changed) head/sys/contrib/dev/acpica/components/resources/rscalc.c (contents, props changed) head/sys/contrib/dev/acpica/components/resources/rscreate.c (contents, props changed) head/sys/contrib/dev/acpica/components/resources/rsdump.c (contents, props changed) head/sys/contrib/dev/acpica/components/resources/rsio.c (contents, props changed) head/sys/contrib/dev/acpica/components/resources/rslist.c (contents, props changed) head/sys/contrib/dev/acpica/components/resources/rsmemory.c (contents, props changed) head/sys/contrib/dev/acpica/components/resources/rsmisc.c (contents, props changed) head/sys/contrib/dev/acpica/components/resources/rsutils.c (contents, props changed) head/sys/contrib/dev/acpica/components/tables/tbfadt.c (contents, props changed) head/sys/contrib/dev/acpica/components/tables/tbfind.c (contents, props changed) head/sys/contrib/dev/acpica/components/tables/tbinstal.c (contents, props changed) head/sys/contrib/dev/acpica/components/tables/tbutils.c (contents, props changed) head/sys/contrib/dev/acpica/components/tables/tbxface.c (contents, props changed) head/sys/contrib/dev/acpica/components/tables/tbxfload.c (contents, props changed) head/sys/contrib/dev/acpica/components/tables/tbxfroot.c (contents, props changed) head/sys/contrib/dev/acpica/components/utilities/utalloc.c (contents, props changed) head/sys/contrib/dev/acpica/components/utilities/utcache.c (contents, props changed) head/sys/contrib/dev/acpica/components/utilities/utcopy.c (contents, props changed) head/sys/contrib/dev/acpica/components/utilities/utdebug.c (contents, props changed) head/sys/contrib/dev/acpica/components/utilities/utdelete.c (contents, props changed) head/sys/contrib/dev/acpica/components/utilities/utids.c (contents, props changed) head/sys/contrib/dev/acpica/components/utilities/utinit.c (contents, props changed) head/sys/contrib/dev/acpica/components/utilities/utlock.c (contents, props changed) head/sys/contrib/dev/acpica/components/utilities/utmath.c (contents, props changed) head/sys/contrib/dev/acpica/components/utilities/utmisc.c (contents, props changed) head/sys/contrib/dev/acpica/components/utilities/utmutex.c (contents, props changed) head/sys/contrib/dev/acpica/components/utilities/utobject.c (contents, props changed) head/sys/contrib/dev/acpica/components/utilities/utresrc.c (contents, props changed) head/sys/contrib/dev/acpica/components/utilities/utstate.c (contents, props changed) head/sys/contrib/dev/acpica/components/utilities/uttrack.c (contents, props changed) head/sys/contrib/dev/acpica/components/utilities/utxface.c (contents, props changed) head/sys/contrib/dev/acpica/components/utilities/utxferror.c (contents, props changed) head/sys/contrib/dev/acpica/include/acapps.h (contents, props changed) head/sys/contrib/dev/acpica/include/acconfig.h (contents, props changed) head/sys/contrib/dev/acpica/include/acexcep.h (contents, props changed) head/sys/contrib/dev/acpica/include/acglobal.h (contents, props changed) head/sys/contrib/dev/acpica/include/aclocal.h (contents, props changed) head/sys/contrib/dev/acpica/include/acmacros.h (contents, props changed) head/sys/contrib/dev/acpica/include/acnames.h (contents, props changed) head/sys/contrib/dev/acpica/include/acobject.h (contents, props changed) head/sys/contrib/dev/acpica/include/acopcode.h (contents, props changed) head/sys/contrib/dev/acpica/include/acpiosxf.h (contents, props changed) head/sys/contrib/dev/acpica/include/acpixf.h (contents, props changed) head/sys/contrib/dev/acpica/include/acrestyp.h (contents, props changed) head/sys/contrib/dev/acpica/include/acstruct.h (contents, props changed) head/sys/contrib/dev/acpica/include/actbl2.h (contents, props changed) head/sys/contrib/dev/acpica/include/actbl3.h (contents, props changed) head/sys/contrib/dev/acpica/include/actypes.h (contents, props changed) head/sys/contrib/dev/acpica/include/acutils.h (contents, props changed) head/sys/contrib/dev/acpica/include/amlresrc.h (contents, props changed) head/sys/contrib/dev/acpica/include/platform/acenv.h (contents, props changed) head/sys/dev/acpica/acpi.c Directory Properties: head/sys/contrib/dev/acpica/ (props changed) head/sys/contrib/dev/acpica/common/ (props changed) head/sys/contrib/dev/acpica/common/ahpredef.c (props changed) head/sys/contrib/dev/acpica/compiler/ (props changed) head/sys/contrib/dev/acpica/compiler/aslanalyze.c (props changed) head/sys/contrib/dev/acpica/compiler/aslbtypes.c (props changed) head/sys/contrib/dev/acpica/compiler/aslcompiler.l (props changed) head/sys/contrib/dev/acpica/compiler/aslpredef.c (props changed) head/sys/contrib/dev/acpica/compiler/aslrestype2.c (props changed) head/sys/contrib/dev/acpica/compiler/aslrestype2s.c (props changed) head/sys/contrib/dev/acpica/compiler/asluuid.c (props changed) head/sys/contrib/dev/acpica/compiler/dtcompiler.h (props changed) head/sys/contrib/dev/acpica/compiler/dtexpress.c (props changed) head/sys/contrib/dev/acpica/compiler/dtfield.c (props changed) head/sys/contrib/dev/acpica/compiler/dtparser.l (props changed) head/sys/contrib/dev/acpica/compiler/dtparser.y (props changed) head/sys/contrib/dev/acpica/compiler/dtsubtable.c (props changed) head/sys/contrib/dev/acpica/compiler/dttemplate.c (props changed) head/sys/contrib/dev/acpica/compiler/dtutils.c (props changed) head/sys/contrib/dev/acpica/compiler/preprocess.h (props changed) head/sys/contrib/dev/acpica/compiler/prexpress.c (props changed) head/sys/contrib/dev/acpica/compiler/prmacros.c (props changed) head/sys/contrib/dev/acpica/compiler/prparser.l (props changed) head/sys/contrib/dev/acpica/compiler/prparser.y (props changed) head/sys/contrib/dev/acpica/compiler/prscan.c (props changed) head/sys/contrib/dev/acpica/components/debugger/ (props changed) head/sys/contrib/dev/acpica/components/debugger/dbmethod.c (props changed) head/sys/contrib/dev/acpica/components/disassembler/ (props changed) head/sys/contrib/dev/acpica/components/disassembler/dmresrcl.c (props changed) head/sys/contrib/dev/acpica/components/dispatcher/ (props changed) head/sys/contrib/dev/acpica/components/dispatcher/dsargs.c (props changed) head/sys/contrib/dev/acpica/components/dispatcher/dswload.c (props changed) head/sys/contrib/dev/acpica/components/events/ (props changed) head/sys/contrib/dev/acpica/components/events/evglock.c (props changed) head/sys/contrib/dev/acpica/components/events/evgpe.c (props changed) head/sys/contrib/dev/acpica/components/events/evgpeblk.c (props changed) head/sys/contrib/dev/acpica/components/events/evgpeinit.c (props changed) head/sys/contrib/dev/acpica/components/events/evgpeutil.c (props changed) head/sys/contrib/dev/acpica/components/events/evmisc.c (props changed) head/sys/contrib/dev/acpica/components/events/evregion.c (props changed) head/sys/contrib/dev/acpica/components/events/evsci.c (props changed) head/sys/contrib/dev/acpica/components/events/evxface.c (props changed) head/sys/contrib/dev/acpica/components/events/evxfevnt.c (props changed) head/sys/contrib/dev/acpica/components/executer/ (props changed) head/sys/contrib/dev/acpica/components/hardware/ (props changed) head/sys/contrib/dev/acpica/components/hardware/hwesleep.c (props changed) head/sys/contrib/dev/acpica/components/hardware/hwsleep.c (props changed) head/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c (props changed) head/sys/contrib/dev/acpica/components/namespace/ (props changed) head/sys/contrib/dev/acpica/components/namespace/nspredef.c (props changed) head/sys/contrib/dev/acpica/components/namespace/nsrepair.c (props changed) head/sys/contrib/dev/acpica/components/namespace/nsrepair2.c (props changed) head/sys/contrib/dev/acpica/components/parser/ (props changed) head/sys/contrib/dev/acpica/components/parser/pswalk.c (props changed) head/sys/contrib/dev/acpica/components/resources/ (props changed) head/sys/contrib/dev/acpica/components/resources/rsinfo.c (props changed) head/sys/contrib/dev/acpica/components/resources/rsirq.c (props changed) head/sys/contrib/dev/acpica/components/resources/rsserial.c (props changed) head/sys/contrib/dev/acpica/components/resources/rsxface.c (props changed) head/sys/contrib/dev/acpica/components/tables/ (props changed) head/sys/contrib/dev/acpica/components/utilities/ (props changed) head/sys/contrib/dev/acpica/components/utilities/utaddress.c (props changed) head/sys/contrib/dev/acpica/components/utilities/utdecode.c (props changed) head/sys/contrib/dev/acpica/components/utilities/uteval.c (props changed) head/sys/contrib/dev/acpica/components/utilities/utexcep.c (props changed) head/sys/contrib/dev/acpica/components/utilities/utglobal.c (props changed) head/sys/contrib/dev/acpica/components/utilities/utosi.c (props changed) head/sys/contrib/dev/acpica/components/utilities/utxfinit.c (props changed) head/sys/contrib/dev/acpica/components/utilities/utxfmutex.c (props changed) head/sys/contrib/dev/acpica/include/ (props changed) head/sys/contrib/dev/acpica/include/acbuffer.h (props changed) head/sys/contrib/dev/acpica/include/accommon.h (props changed) head/sys/contrib/dev/acpica/include/acdebug.h (props changed) head/sys/contrib/dev/acpica/include/acdisasm.h (props changed) head/sys/contrib/dev/acpica/include/acdispat.h (props changed) head/sys/contrib/dev/acpica/include/acevents.h (props changed) head/sys/contrib/dev/acpica/include/achware.h (props changed) head/sys/contrib/dev/acpica/include/acinterp.h (props changed) head/sys/contrib/dev/acpica/include/acnamesp.h (props changed) head/sys/contrib/dev/acpica/include/acoutput.h (props changed) head/sys/contrib/dev/acpica/include/acparser.h (props changed) head/sys/contrib/dev/acpica/include/acpi.h (props changed) head/sys/contrib/dev/acpica/include/acpredef.h (props changed) head/sys/contrib/dev/acpica/include/acresrc.h (props changed) head/sys/contrib/dev/acpica/include/actables.h (props changed) head/sys/contrib/dev/acpica/include/actbl.h (props changed) head/sys/contrib/dev/acpica/include/actbl1.h (props changed) head/sys/contrib/dev/acpica/include/amlcode.h (props changed) head/sys/contrib/dev/acpica/include/platform/acfreebsd.h (props changed) head/sys/contrib/dev/acpica/include/platform/acgcc.h (props changed) head/sys/contrib/dev/acpica/os_specific/ (props changed) head/sys/contrib/dev/acpica/os_specific/service_layers/osunixxf.c (props changed) Modified: head/sys/contrib/dev/acpica/changes.txt ============================================================================== --- head/sys/contrib/dev/acpica/changes.txt Tue Oct 23 23:36:29 2012 (r241972) +++ head/sys/contrib/dev/acpica/changes.txt Tue Oct 23 23:49:17 2012 (r241973) @@ -1,30 +1,115 @@ ---------------------------------------- +18 October 2012. Summary of changes for version 20121018: + + +1) ACPICA Kernel-resident Subsystem: + +Updated support for the ACPI 5.0 MPST table. Fixes some problems +introduced by late changes to the table as it was added to the ACPI 5.0 +specification. Includes header, disassembler, and data table compiler +support as well as a new version of the MPST template. + +AcpiGetObjectInfo: Enhanced the device object support to include the ACPI +5.0 _SUB method. Now calls _SUB in addition to the other PNP-related ID +methods: _HID, _CID, and _UID. + +Changed ACPI_DEVICE_ID to ACPI_PNP_DEVICE_ID. Also changed +ACPI_DEVICE_ID_LIST to ACPI_PNP_DEVICE_ID_LIST. These changes prevent +name collisions on hosts that reserve the *_DEVICE_ID (or *DeviceId) +names for their various drivers. Affects the AcpiGetObjectInfo external +interface, and other internal interfaces as well. + +Added and deployed a new macro for ACPI_NAME management: ACPI_MOVE_NAME. +This macro resolves to a simple 32-bit move of the 4-character ACPI_NAME +on machines that support non-aligned transfers. Optimizes for this case +rather than using a strncpy. With assistance from Zheng Lv. + +Resource Manager: Small fix for buffer size calculation. Fixed a one byte +error in the output buffer calculation. Feng Tang. ACPICA BZ 849. + +Added a new debug print message for AML mutex objects that are force- +released. At control method termination, any currently acquired mutex +objects are force-released. Adds a new debug-only message for each one +that is released. + +Audited/updated all ACPICA return macros and the function debug depth +counter: 1) Ensure that all functions that use the various TRACE macros +also use the appropriate ACPICA return macros. 2) Ensure that all normal +return statements surround the return expression (value) with parens to +ensure consistency across the ACPICA code base. Guan Chao, Tang Feng, +Zheng Lv, Bob Moore. ACPICA Bugzilla 972. + +Global source code changes/maintenance: All extra lines at the start and +end of each source file have been removed for consistency. Also, within +comments, all new sentences start with a single space instead of a double +space, again for consistency across the code base. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Previous Release: + Non-Debug Version: 93.7K Code, 25.3K Data, 119.0K Total + Debug Version: 175.0K Code, 74.4K Data, 249.4K Total + Current Release: + Non-Debug Version: 93.9K Code, 25.2K Data, 119.1K Total + Debug Version: 175.5K Code, 74.5K Data, 250.0K Total + + +2) iASL Compiler/Disassembler and Tools: + +AcpiExec: Improved the algorithm used for memory leak/corruption +detection. Added some intelligence to the code that maintains the global +list of allocated memory. The list is now ordered by allocated memory +address, significantly improving performance. When running AcpiExec on +the ASLTS test suite, speed improvements of 3X to 5X are seen, depending +on the platform and/or the environment. Note, this performance +enhancement affects the AcpiExec utility only, not the kernel-resident +ACPICA code. + +Enhanced error reporting for invalid AML opcodes and bad ACPI_NAMEs. For +the disassembler, dump the 48 bytes surrounding the invalid opcode. Fix +incorrect table offset reported for invalid opcodes. Report the original +32-bit value for bad ACPI_NAMEs (as well as the repaired name.) + +Disassembler: Enhanced the -vt option to emit the binary table data in +hex format to assist with debugging. + +Fixed a potential filename buffer overflow in osunixdir.c. Increased the +size of file structure. Colin Ian King. + +---------------------------------------- 13 September 2012. Summary of changes for version 20120913: -This release is available at https://www.acpica.org/downloads The ACPI 5.0 -specification is available at www.acpi.info 1) ACPICA Kernel-resident Subsystem: ACPI 5.0: Added two new notify types for the Hardware Error Notification -Structure within the Hardware Error Source Table (HEST) table -- CMCI(5) and +Structure within the Hardware Error Source Table (HEST) table -- CMCI(5) +and MCE(6). Table Manager: Merged/removed duplicate code in the root table resize -functions. One function is external, the other is internal. Lv Zheng, ACPICA +functions. One function is external, the other is internal. Lv Zheng, +ACPICA BZ 846. Makefiles: Completely removed the obsolete "Linux" makefiles under -acpica/generate/linux. These makefiles are obsolete and have been replaced by +acpica/generate/linux. These makefiles are obsolete and have been replaced +by the generic unix makefiles under acpica/generate/unix. -Makefiles: Ensure that binary files always copied properly. Minor rule change +Makefiles: Ensure that binary files always copied properly. Minor rule +change to ensure that the final binary output files are always copied up to the appropriate binary directory (bin32 or bin64.) Example Code and Data Size: These are the sizes for the OS-independent -acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The debug -version of the code includes the debug output trace mechanism and has a much +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug +version of the code includes the debug output trace mechanism and has a +much larger code and data size. Previous Release: @@ -42,27 +127,37 @@ descriptors when a second parse is requi external control methods within the table. With assistance from adq@lidskialf.net. ACPICA BZ 976. -iASL: Fixed a namepath optimization problem. An error can occur if the parse -node that contains the namepath to be optimized does not have a parent node +iASL: Fixed a namepath optimization problem. An error can occur if the +parse +node that contains the namepath to be optimized does not have a parent +node that is a named object. This change fixes the problem. -iASL: Fixed a regression where the AML file is not deleted on errors. The AML -output file should be deleted if there are any errors during the compiler. The +iASL: Fixed a regression where the AML file is not deleted on errors. The +AML +output file should be deleted if there are any errors during the compiler. +The only exception is if the -f (force output) option is used. ACPICA BZ 974. -iASL: Added a feature to automatically increase internal line buffer sizes. +iASL: Added a feature to automatically increase internal line buffer +sizes. Via realloc(), automatically increase the internal line buffer sizes as -necessary to support very long source code lines. The current version of the -preprocessor requires a buffer long enough to contain full source code lines. +necessary to support very long source code lines. The current version of +the +preprocessor requires a buffer long enough to contain full source code +lines. This change increases the line buffer(s) if the input lines go beyond the -current buffer size. This eliminates errors that occurred when a source code +current buffer size. This eliminates errors that occurred when a source +code line was longer than the buffer. iASL: Fixed a problem with constant folding in method declarations. The -SyncLevel term is a ByteConstExpr, and incorrect code would be generated if a +SyncLevel term is a ByteConstExpr, and incorrect code would be generated +if a Type3 opcode was used. -Debugger: Improved command help support. For incorrect argument count, display +Debugger: Improved command help support. For incorrect argument count, +display full help for the command. For help command itself, allow an argument to specify a command. @@ -72,20 +167,24 @@ errors during execution of the suite. Gu ---------------------------------------- 16 August 2012. Summary of changes for version 20120816: -This release is available at https://www.acpica.org/downloads -The ACPI 5.0 specification is available at www.acpi.info 1) ACPICA Kernel-resident Subsystem: -Removed all use of the deprecated _GTS and _BFS predefined methods. The _GTS +Removed all use of the deprecated _GTS and _BFS predefined methods. The +_GTS (Going To Sleep) and _BFS (Back From Sleep) methods are essentially -deprecated and will probably be removed from the ACPI specification. Windows -does not invoke them, and reportedly never will. The final nail in the coffin +deprecated and will probably be removed from the ACPI specification. +Windows +does not invoke them, and reportedly never will. The final nail in the +coffin is that the ACPI specification states that these methods must be run with -interrupts off, which is not going to happen in a kernel interpreter. Note: +interrupts off, which is not going to happen in a kernel interpreter. +Note: Linux has removed all use of the methods also. It was discovered that -invoking these functions caused failures on some machines, probably because -they were never tested since Windows does not call them. Affects two external +invoking these functions caused failures on some machines, probably +because +they were never tested since Windows does not call them. Affects two +external interfaces, AcpiEnterSleepState and AcpiLeaveSleepStatePrep. Tang Feng. ACPICA BZ 969. @@ -93,20 +192,26 @@ Implemented support for complex bit-pack (Physical Location of Device) predefined method. Adds a new external interface, AcpiDecodePldBuffer that parses the buffer into a more usable C structure. Note: C Bitfields cannot be used for this type of predefined -structure since the memory layout of individual bitfields is not defined by -the C language. In addition, there are endian concerns where a compiler will +structure since the memory layout of individual bitfields is not defined +by +the C language. In addition, there are endian concerns where a compiler +will change the bitfield ordering based on the machine type. The new ACPICA interface eliminates these issues, and should be called after _PLD is executed. ACPICA BZ 954. -Implemented a change to allow a scope change to root (via "Scope (\)") during +Implemented a change to allow a scope change to root (via "Scope (\)") +during execution of module-level ASL code (code that is executed at table load time.) Lin Ming. -Added the Windows8/Server2012 string for the _OSI method. This change adds a -new _OSI string, "Windows 2012" for both Windows 8 and Windows Server 2012. +Added the Windows8/Server2012 string for the _OSI method. This change adds +a +new _OSI string, "Windows 2012" for both Windows 8 and Windows Server +2012. -Added header support for the new ACPI tables DBG2 (Debug Port Table Type 2) +Added header support for the new ACPI tables DBG2 (Debug Port Table Type +2) and CSRT (Core System Resource Table). Added struct header support for the _FDE, _GRT, _GTM, and _SRT predefined @@ -118,7 +223,8 @@ internal GPE functions. Tang Feng. Removed the linux makefiles from the unix packages. The generate/linux makefiles are obsolete and have been removed from the unix tarball release -packages. The replacement makefiles are under generate/unix, and there is a +packages. The replacement makefiles are under generate/unix, and there is +a top-level makefile under the main acpica directory. ACPICA BZ 967, 912. Updates for Unix makefiles: @@ -131,7 +237,8 @@ utxface.c to improve modularity and redu Example Code and Data Size: These are the sizes for the OS-independent acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The -debug version of the code includes the debug output trace mechanism and has a +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. Previous Release: @@ -147,7 +254,8 @@ much larger code and data size. iASL: Fixed a problem with constant folding for fixed-length constant expressions. The constant-folding code was not being invoked for constant expressions that allow the use of type 3/4/5 opcodes to generate constants -for expressions such as ByteConstExpr, WordConstExpr, etc. This could result +for expressions such as ByteConstExpr, WordConstExpr, etc. This could +result in the generation of invalid AML bytecode. ACPICA BZ 970. iASL: Fixed a generation issue on newer versions of Bison. Newer versions @@ -156,7 +264,8 @@ handles these versions in order to elimi Disassembler: Added support to decode the DBG2 and CSRT ACPI tables. -Disassembler: Add support to decode _PLD buffers. The decoded buffer appears +Disassembler: Add support to decode _PLD buffers. The decoded buffer +appears within comments in the output file. Debugger: Fixed a regression with the "Threads" command where @@ -165,56 +274,71 @@ AE_BAD_PARAMETER was always returned. ---------------------------------------- 11 July 2012. Summary of changes for version 20120711: -This release is available at https://www.acpica.org/downloads The ACPI 5.0 -specification is available at www.acpi.info - 1) ACPICA Kernel-resident Subsystem: Fixed a possible fault in the return package object repair code. Fixes a problem that can occur when a lone package object is wrapped with an outer -package object in order to force conformance to the ACPI specification. Can -affect these predefined names: _ALR, _MLS, _PSS, _TRT, _TSS, _PRT, _HPX, _DLM, +package object in order to force conformance to the ACPI specification. +Can +affect these predefined names: _ALR, _MLS, _PSS, _TRT, _TSS, _PRT, _HPX, +_DLM, _CSD, _PSD, _TSD. Removed code to disable/enable bus master arbitration (ARB_DIS bit in the PM2_CNT register) in the ACPICA sleep/wake interfaces. Management of the -ARB_DIS bit must be implemented in the host-dependent C3 processor power state -support. Note, ARB_DIS is obsolete and only applies to older chipsets, both +ARB_DIS bit must be implemented in the host-dependent C3 processor power +state +support. Note, ARB_DIS is obsolete and only applies to older chipsets, +both Intel and other vendors. (for Intel: ICH4-M and earlier) -This change removes the code to disable/enable bus master arbitration during -suspend/resume. Use of the ARB_DIS bit in the optional PM2_CNT register causes -resume problems on some machines. The change has been in use for over seven +This change removes the code to disable/enable bus master arbitration +during +suspend/resume. Use of the ARB_DIS bit in the optional PM2_CNT register +causes +resume problems on some machines. The change has been in use for over +seven years within Linux. -Implemented two new external interfaces to support host-directed dynamic ACPI -table load and unload. They are intended to simplify the host implementation +Implemented two new external interfaces to support host-directed dynamic +ACPI +table load and unload. They are intended to simplify the host +implementation of hot-plug support: AcpiLoadTable: Load an SSDT from a buffer into the namespace. - AcpiUnloadParentTable: Unload an SSDT via a named object owned by the table. + AcpiUnloadParentTable: Unload an SSDT via a named object owned by the +table. See the ACPICA reference for additional details. Adds one new file, components/tables/tbxfload.c -Implemented and deployed two new interfaces for errors and warnings that are +Implemented and deployed two new interfaces for errors and warnings that +are known to be caused by BIOS/firmware issues: AcpiBiosError: Prints "ACPI Firmware Error" message. AcpiBiosWarning: Prints "ACPI Firmware Warning" message. -Deployed these new interfaces in the ACPICA Table Manager code for ACPI table -and FADT errors. Additional deployment to be completed as appropriate in the +Deployed these new interfaces in the ACPICA Table Manager code for ACPI +table +and FADT errors. Additional deployment to be completed as appropriate in +the future. The associated conditional macros are ACPI_BIOS_ERROR and -ACPI_BIOS_WARNING. See the ACPICA reference for additional details. ACPICA BZ +ACPI_BIOS_WARNING. See the ACPICA reference for additional details. ACPICA +BZ 843. Implicit notify support: ensure that no memory allocation occurs within a -critical region. This fix moves a memory allocation outside of the time that a +critical region. This fix moves a memory allocation outside of the time +that a spinlock is held. Fixes issues on systems that do not allow this behavior. Jung-uk Kim. -Split exception code utilities and tables into a new file, utilities/utexcep.c +Split exception code utilities and tables into a new file, +utilities/utexcep.c Example Code and Data Size: These are the sizes for the OS-independent -acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The debug -version of the code includes the debug output trace mechanism and has a much +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug +version of the code includes the debug output trace mechanism and has a +much larger code and data size. Previous Release: @@ -227,41 +351,50 @@ larger code and data size. 2) iASL Compiler/Disassembler and Tools: -iASL: Fixed a parser problem for hosts where EOF is defined as -1 instead of +iASL: Fixed a parser problem for hosts where EOF is defined as -1 instead +of 0. Jung-uk Kim. -Debugger: Enhanced the "tables" command to emit additional information about +Debugger: Enhanced the "tables" command to emit additional information +about the current set of ACPI tables, including the owner ID and flags decode. Debugger: Reimplemented the "unload" command to use the new -AcpiUnloadParentTable external interface. This command was disable previously +AcpiUnloadParentTable external interface. This command was disable +previously due to need for an unload interface. -AcpiHelp: Added a new option to decode ACPICA exception codes. The -e option +AcpiHelp: Added a new option to decode ACPICA exception codes. The -e +option will decode 16-bit hex status codes (ACPI_STATUS) to name strings. ---------------------------------------- 20 June 2012. Summary of changes for version 20120620: -This release is available at https://www.acpica.org/downloads -The ACPI 5.0 specification is available at www.acpi.info 1) ACPICA Kernel-resident Subsystem: -Implemented support to expand the "implicit notify" feature to allow multiple -devices to be notified by a single GPE. This feature automatically generates a +Implemented support to expand the "implicit notify" feature to allow +multiple +devices to be notified by a single GPE. This feature automatically +generates a runtime device notification in the absence of a BIOS-provided GPE control -method (_Lxx/_Exx) or a host-installed handler for the GPE. Implicit notify is -provided by ACPICA for Windows compatibility, and is a workaround for BIOS AML -code errors. See the description of the AcpiSetupGpeForWake interface in the +method (_Lxx/_Exx) or a host-installed handler for the GPE. Implicit +notify is +provided by ACPICA for Windows compatibility, and is a workaround for BIOS +AML +code errors. See the description of the AcpiSetupGpeForWake interface in +the APCICA reference. Bob Moore, Rafael Wysocki. ACPICA BZ 918. Changed some comments and internal function names to simplify and ensure correctness of the Linux code translation. No functional changes. Example Code and Data Size: These are the sizes for the OS-independent -acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The debug -version of the code includes the debug output trace mechanism and has a much +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug +version of the code includes the debug output trace mechanism and has a +much larger code and data size. Previous Release: @@ -274,16 +407,21 @@ larger code and data size. 2) iASL Compiler/Disassembler and Tools: -Disassembler: Added support to emit short, commented descriptions for the ACPI +Disassembler: Added support to emit short, commented descriptions for the +ACPI predefined names in order to improve the readability of the disassembled output. ACPICA BZ 959. Changes include: - 1) Emit descriptions for all standard predefined names (_INI, _STA, _PRW, + 1) Emit descriptions for all standard predefined names (_INI, _STA, +_PRW, etc.) 2) Emit generic descriptions for the special names (_Exx, _Qxx, etc.) - 3) Emit descriptions for the resource descriptor names (_MIN, _LEN, etc.) + 3) Emit descriptions for the resource descriptor names (_MIN, _LEN, +etc.) -AcpiSrc: Fixed several long-standing Linux code translation issues. Argument -descriptions in function headers are now translated properly to lower case and +AcpiSrc: Fixed several long-standing Linux code translation issues. +Argument +descriptions in function headers are now translated properly to lower case +and underscores. ACPICA BZ 961. Also fixes translation problems such as these: (old -> new) i_aSL -> iASL @@ -292,16 +430,20 @@ underscores. ACPICA BZ 961. Also fixes t local_fADT -> local_FADT execute_oSI -> execute_OSI -iASL: Fixed a problem where null bytes were inadvertently emitted into some +iASL: Fixed a problem where null bytes were inadvertently emitted into +some listing files. -iASL: Added the existing debug options to the standard help screen. There are +iASL: Added the existing debug options to the standard help screen. There +are no longer two different help screens. ACPICA BZ 957. -AcpiHelp: Fixed some typos in the various predefined name descriptions. Also +AcpiHelp: Fixed some typos in the various predefined name descriptions. +Also expand some of the descriptions where appropriate. -iASL: Fixed the -ot option (display compile times/statistics). Was not working +iASL: Fixed the -ot option (display compile times/statistics). Was not +working properly for standard output; only worked for the debug file case. ---------------------------------------- @@ -310,21 +452,29 @@ properly for standard output; only worke 1) ACPICA Core Subsystem: -Added a new OSL interface, AcpiOsWaitEventsComplete. This interface is defined -to block until asynchronous events such as notifies and GPEs have completed. +Added a new OSL interface, AcpiOsWaitEventsComplete. This interface is +defined +to block until asynchronous events such as notifies and GPEs have +completed. Within ACPICA, it is only called before a notify or GPE handler is removed/uninstalled. It also may be useful for the host OS within related -drivers such as the Embedded Controller driver. See the ACPICA reference for +drivers such as the Embedded Controller driver. See the ACPICA reference +for additional information. ACPICA BZ 868. -ACPI Tables: Added a new error message for a possible overflow failure during -the conversion of FADT 32-bit legacy register addresses to internal common 64- -bit GAS structure representation. The GAS has a one-byte "bit length" field, +ACPI Tables: Added a new error message for a possible overflow failure +during +the conversion of FADT 32-bit legacy register addresses to internal common +64- +bit GAS structure representation. The GAS has a one-byte "bit length" +field, thus limiting the register length to 255 bits. ACPICA BZ 953. Example Code and Data Size: These are the sizes for the OS-independent -acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The debug -version of the code includes the debug output trace mechanism and has a much +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug +version of the code includes the debug output trace mechanism and has a +much larger code and data size. Previous Release: @@ -337,34 +487,44 @@ larger code and data size. 2) iASL Compiler/Disassembler and Tools: -iASL: Added the ACPI 5.0 "PCC" keyword for use in the Register() ASL macro. +iASL: Added the ACPI 5.0 "PCC" keyword for use in the Register() ASL +macro. This keyword was added late in the ACPI 5.0 release cycle and was not implemented until now. Disassembler: Added support for Operation Region externals. Adds missing support for operation regions that are defined in another table, and -referenced locally via a Field or BankField ASL operator. Now generates the +referenced locally via a Field or BankField ASL operator. Now generates +the correct External statement. -Disassembler: Several additional fixes for the External() statement generation +Disassembler: Several additional fixes for the External() statement +generation related to some ASL operators. Also, order the External() statements -alphabetically in the disassembler output. Fixes the External() generation for +alphabetically in the disassembler output. Fixes the External() generation +for the Create* field, Alias, and Scope operators: - 1) Create* buffer field operators - fix type mismatch warning on disassembly + 1) Create* buffer field operators - fix type mismatch warning on +disassembly 2) Alias - implement missing External support 3) Scope - fix to make sure all necessary externals are emitted. -iASL: Improved pathname support. For include files, merge the prefix pathname +iASL: Improved pathname support. For include files, merge the prefix +pathname with the file pathname and eliminate unnecessary components. Convert -backslashes in all pathnames to forward slashes, for readability. Include file +backslashes in all pathnames to forward slashes, for readability. Include +file pathname changes affect both #include and Include() type operators. -iASL/DTC/Preprocessor: Gracefully handle early EOF. Handle an EOF at the end -of a valid line by inserting a newline and then returning the EOF during the +iASL/DTC/Preprocessor: Gracefully handle early EOF. Handle an EOF at the +end +of a valid line by inserting a newline and then returning the EOF during +the next call to GetNextLine. Prevents the line from being ignored due to EOF condition. -iASL: Implemented some changes to enhance the IDE support (-vi option.) Error +iASL: Implemented some changes to enhance the IDE support (-vi option.) +Error and Warning messages are now correctly recognized for both the source code browser and the global error and warning counts. @@ -374,13 +534,17 @@ browser and the global error and warning 1) ACPICA Core Subsystem: -Implemented support for multiple notify handlers. This change adds support to -allow multiple system and device notify handlers on Device, Thermal Zone, and -Processor objects. This can simplify the host OS notification implementation. +Implemented support for multiple notify handlers. This change adds support +to +allow multiple system and device notify handlers on Device, Thermal Zone, +and +Processor objects. This can simplify the host OS notification +implementation. Also re-worked and restructured the entire notify support code to simplify handler installation, handler removal, notify event queuing, and notify dispatch to handler(s). Note: there can still only be two global notify -handlers - one for system notifies and one for device notifies. There are no +handlers - one for system notifies and one for device notifies. There are +no changes to the existing handler install/remove interfaces. Lin Ming, Bob Moore, Rafael Wysocki. @@ -388,12 +552,14 @@ Fixed a regression in the package repair count was calculated incorrectly. Regression was introduced in the commit "Support to add Package wrappers". -Fixed a couple possible memory leaks in the AML parser, in the error recovery +Fixed a couple possible memory leaks in the AML parser, in the error +recovery path. Jesper Juhl, Lin Ming. Example Code and Data Size: These are the sizes for the OS-independent acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The -debug version of the code includes the debug output trace mechanism and has a +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. Previous Release: @@ -406,17 +572,22 @@ much larger code and data size. 2) iASL Compiler/Disassembler and Tools: -iASL: Fixed a problem with the resource descriptor support where the length +iASL: Fixed a problem with the resource descriptor support where the +length of the StartDependentFn and StartDependentFnNoPrio descriptors were not -included in cumulative descriptor offset, resulting in incorrect values for -resource tags within resource descriptors appearing after a StartDependent* +included in cumulative descriptor offset, resulting in incorrect values +for +resource tags within resource descriptors appearing after a +StartDependent* descriptor. Reported by Petr Vandrovec. ACPICA BZ 949. iASL and Preprocessor: Implemented full support for the #line directive to -correctly track original source file line numbers through the .i preprocessor +correctly track original source file line numbers through the .i +preprocessor output file - for error and warning messages. -iASL: Expand the allowable byte constants for address space IDs. Previously, +iASL: Expand the allowable byte constants for address space IDs. +Previously, the allowable range was 0x80-0xFF (user-defined spaces), now the range is 0x0A-0xFF to allow for custom and new IDs without changing the compiler. @@ -427,7 +598,8 @@ iASL: Add option to completely disable t iASL: Now emit all error/warning messages to standard error (stderr) by default (instead of the previous stdout). -ASL Test Suite (ASLTS): Reduce iASL warnings due to use of Switch(). Update +ASL Test Suite (ASLTS): Reduce iASL warnings due to use of Switch(). +Update for resource descriptor offset fix above. Update/cleanup error output routines. Enable and send iASL errors/warnings to an error logfile (error.txt). Send all other iASL output to a logfile (compiler.txt). Fixed @@ -443,42 +615,60 @@ Enhanced the sleep/wake interfaces to op (Going To Sleep) and the _BFS method (Back From Sleep). Windows apparently does not execute these methods, and therefore these methods are often untested. It has been seen on some systems where the execution of these -methods causes errors and also prevents the machine from entering S5. It is -therefore suggested that host operating systems do not execute these methods -by default. In the future, perhaps these methods can be optionally executed -based on the age of the system and/or what is the newest version of Windows -that the BIOS asks for via _OSI. Changed interfaces: AcpiEnterSleepState and +methods causes errors and also prevents the machine from entering S5. It +is +therefore suggested that host operating systems do not execute these +methods +by default. In the future, perhaps these methods can be optionally +executed +based on the age of the system and/or what is the newest version of +Windows +that the BIOS asks for via _OSI. Changed interfaces: AcpiEnterSleepState +and AcpileaveSleepStatePrep. See the ACPICA reference and Linux BZ 13041. Lin Ming. -Fixed a problem where the length of the local/common FADT was set too early. +Fixed a problem where the length of the local/common FADT was set too +early. The local FADT table length cannot be set to the common length until the -original length has been examined. There is code that checks the table length +original length has been examined. There is code that checks the table +length and sets various fields appropriately. This can affect older machines with early FADT versions. For example, this can cause inadvertent writes to the CST_CNT register. Julian Anastasov. -Fixed a mapping issue related to a physical table override. Use the deferred -mapping mechanism for tables loaded via the physical override OSL interface. -This allows for early mapping before the virtual memory manager is available. +Fixed a mapping issue related to a physical table override. Use the +deferred +mapping mechanism for tables loaded via the physical override OSL +interface. +This allows for early mapping before the virtual memory manager is +available. Thomas Renninger, Bob Moore. -Enhanced the automatic return-object repair code: Repair a common problem with +Enhanced the automatic return-object repair code: Repair a common problem +with predefined methods that are defined to return a variable-length Package of -sub-objects. If there is only one sub-object, some BIOS ASL code mistakenly +sub-objects. If there is only one sub-object, some BIOS ASL code +mistakenly simply returns the single object instead of a Package with one sub-object. -This new support will repair this error by wrapping a Package object around -the original object, creating the correct and expected Package with one sub- -object. Names that can be repaired in this manner include: _ALR, _CSD, _HPX, -_MLS, _PLD, _PRT, _PSS, _TRT, _TSS, _BCL, _DOD, _FIX, and _Sx. ACPICA BZ 939. +This new support will repair this error by wrapping a Package object +around +the original object, creating the correct and expected Package with one +sub- +object. Names that can be repaired in this manner include: _ALR, _CSD, +_HPX, +_MLS, _PLD, _PRT, _PSS, _TRT, _TSS, _BCL, _DOD, _FIX, and _Sx. ACPICA BZ +939. Changed the exception code returned for invalid ACPI paths passed as parameters to external interfaces such as AcpiEvaluateObject. Was AE_BAD_PARAMETER, now is the more sensible AE_BAD_PATHNAME. Example Code and Data Size: These are the sizes for the OS-independent -acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The debug -version of the code includes the debug output trace mechanism and has a much +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug +version of the code includes the debug output trace mechanism and has a +much larger code and data size. Previous Release: @@ -491,11 +681,15 @@ larger code and data size. 2) iASL Compiler/Disassembler and Tools: -iASL: Added the infrastructure and initial implementation of a integrated C- -like preprocessor. This will simplify BIOS development process by eliminating -the need for a separate preprocessing step during builds. On Windows, it also +iASL: Added the infrastructure and initial implementation of a integrated +C- +like preprocessor. This will simplify BIOS development process by +eliminating +the need for a separate preprocessing step during builds. On Windows, it +also eliminates the need to install a separate C compiler. ACPICA BZ 761. Some -features including full #define() macro support are still under development. +features including full #define() macro support are still under +development. These preprocessor directives are supported: #define #elif @@ -514,11 +708,14 @@ In addition, these new command line opti -li Create preprocessed output file (*.i) -P Preprocess only and create preprocessor output file (*.i) -Table Compiler: Fixed a problem where the equals operator within an expression +Table Compiler: Fixed a problem where the equals operator within an +expression did not work properly. -Updated iASL to use the current versions of Bison/Flex. Updated the Windows -project file to invoke these tools from the standard location. ACPICA BZ 904. +Updated iASL to use the current versions of Bison/Flex. Updated the +Windows +project file to invoke these tools from the standard location. ACPICA BZ +904. Versions supported: Flex for Windows: V2.5.4 Bison for Windows: V2.4.1 @@ -534,25 +731,33 @@ described below (a - e). a) The AcpiLeaveSleepState has been split into two interfaces, similar to AcpiEnterSleepStatePrep and AcpiEnterSleepState. The new interface is -AcpiLeaveSleepStatePrep. This allows the host to perform actions between the -time the _BFS method is called and the _WAK method is called. NOTE: all hosts -must update their wake/resume code or else sleep/wake will not work properly. +AcpiLeaveSleepStatePrep. This allows the host to perform actions between +the +time the _BFS method is called and the _WAK method is called. NOTE: all +hosts +must update their wake/resume code or else sleep/wake will not work +properly. Rafael Wysocki. -b) In AcpiLeaveSleepState, now enable all runtime GPEs before calling the _WAK -method. Some machines require that the GPEs are enabled before the _WAK method +b) In AcpiLeaveSleepState, now enable all runtime GPEs before calling the +_WAK +method. Some machines require that the GPEs are enabled before the _WAK +method is executed. Thomas Renninger. c) In AcpiLeaveSleepState, now always clear the WAK_STS (wake status) bit. -Some BIOS code assumes that WAK_STS will be cleared on resume and use it to +Some BIOS code assumes that WAK_STS will be cleared on resume and use it +to determine whether the system is rebooting or resuming. Matthew Garrett. -d) Move the invocations of _GTS (Going To Sleep) and _BFS (Back From Sleep) to +d) Move the invocations of _GTS (Going To Sleep) and _BFS (Back From +Sleep) to match the ACPI specification requirement. Rafael Wysocki. e) Implemented full support for the ACPI 5.0 SleepStatus and SleepControl registers within the V5 FADT. This support adds two new files: -hardware/hwesleep.c implements the support for the new registers. Moved all +hardware/hwesleep.c implements the support for the new registers. Moved +all sleep/wake external interfaces to hardware/hwxfsleep.c. @@ -560,17 +765,22 @@ Added a new OSL interface for ACPI table AcpiOsPhysicalTableOverride. This interface allows the host to override a table via a physical address, instead of the logical address required by AcpiOsTableOverride. This simplifies the host implementation. Initial -implementation by Thomas Renninger. The ACPICA implementation creates a single +implementation by Thomas Renninger. The ACPICA implementation creates a +single shared function for table overrides that attempts both a logical and a physical override. Expanded the OSL memory read/write interfaces to 64-bit data (AcpiOsReadMemory, AcpiOsWriteMemory.) This enables full 64-bit memory -transfer support for GAS register structures passed to AcpiRead and AcpiWrite. +transfer support for GAS register structures passed to AcpiRead and +AcpiWrite. -Implemented the ACPI_REDUCED_HARDWARE option to allow the creation of a custom -build of ACPICA that supports only the ACPI 5.0 reduced hardware (SoC) model. -See the ACPICA reference for details. ACPICA BZ 942. This option removes about +Implemented the ACPI_REDUCED_HARDWARE option to allow the creation of a +custom +build of ACPICA that supports only the ACPI 5.0 reduced hardware (SoC) +model. +See the ACPICA reference for details. ACPICA BZ 942. This option removes +about 10% of the code and 5% of the static data, and the following hardware ACPI features become unavailable: PM Event and Control registers @@ -581,19 +791,24 @@ features become unavailable: ACPI PM timer FACS table (Waking vectors and Global Lock) -Updated the unix tarball directory structure to match the ACPICA git source +Updated the unix tarball directory structure to match the ACPICA git +source tree. This ensures that the generic unix makefiles work properly (in generate/unix). Also updated the Linux makefiles to match. ACPICA BZ 867. -Updated the return value of the _REV predefined method to integer value 5 to +Updated the return value of the _REV predefined method to integer value 5 +to reflect ACPI 5.0 support. -Moved the external ACPI PM timer interface prototypes to the public acpixf.h +Moved the external ACPI PM timer interface prototypes to the public +acpixf.h file where they belong. Example Code and Data Size: These are the sizes for the OS-independent -acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The debug -version of the code includes the debug output trace mechanism and has a much +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug +version of the code includes the debug output trace mechanism and has a +much larger code and data size. Previous Release: @@ -619,26 +834,36 @@ specification. 1) ACPICA Core Subsystem: -Implemented a new mechanism to allow host device drivers to check for address -range conflicts with ACPI Operation Regions. Both SystemMemory and SystemIO -address spaces are supported. A new external interface, AcpiCheckAddressRange, -allows drivers to check an address range against the ACPI namespace. See the +Implemented a new mechanism to allow host device drivers to check for +address +range conflicts with ACPI Operation Regions. Both SystemMemory and +SystemIO +address spaces are supported. A new external interface, +AcpiCheckAddressRange, +allows drivers to check an address range against the ACPI namespace. See +the ACPICA reference for additional details. Adds one new file, utilities/utaddress.c. Lin Ming, Bob Moore. -Fixed several issues with the ACPI 5.0 FADT support: Add the sleep Control and +Fixed several issues with the ACPI 5.0 FADT support: Add the sleep Control +and Status registers, update the ACPI 5.0 flags, and update internal data -structures to handle an FADT larger than 256 bytes. The size of the ACPI 5.0 +structures to handle an FADT larger than 256 bytes. The size of the ACPI +5.0 FADT is 268 bytes. -Updated all ACPICA copyrights and signons to 2012. Added the 2012 copyright to +Updated all ACPICA copyrights and signons to 2012. Added the 2012 +copyright to all module headers and signons, including the standard Linux header. This -affects virtually every file in the ACPICA core subsystem, iASL compiler, and +affects virtually every file in the ACPICA core subsystem, iASL compiler, +and all ACPICA utilities. Example Code and Data Size: These are the sizes for the OS-independent -acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The debug -version of the code includes the debug output trace mechanism and has a much +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug +version of the code includes the debug output trace mechanism and has a +much larger code and data size. Previous Release: @@ -653,13 +878,18 @@ larger code and data size. Disassembler: fixed a problem with the automatic resource tag generation support. Fixes a problem where the resource tags are inadvertently not -constructed if the table being disassembled contains external references to -control methods. Moved the actual construction of the tags to after the final -namespace is constructed (after 2nd parse is invoked due to external control +constructed if the table being disassembled contains external references +to +control methods. Moved the actual construction of the tags to after the +final +namespace is constructed (after 2nd parse is invoked due to external +control method references.) ACPICA BZ 941. -Table Compiler: Make all "generic" operators caseless. These are the operators -like UINT8, String, etc. Making these caseless improves ease-of-use. ACPICA BZ +Table Compiler: Make all "generic" operators caseless. These are the +operators +like UINT8, String, etc. Making these caseless improves ease-of-use. +ACPICA BZ 934. ---------------------------------------- @@ -674,8 +904,10 @@ Reduced Hardware Support: ------------------------- This support allows for ACPI systems without the usual ACPI hardware. This -support is enabled by a flag in the revision 5 FADT. If it is set, ACPICA will -not attempt to initialize or use any of the usual ACPI hardware. Note, when +support is enabled by a flag in the revision 5 FADT. If it is set, ACPICA +will +not attempt to initialize or use any of the usual ACPI hardware. Note, +when this flag is set, all of the following ACPI hardware is assumed to be not present and is not initialized or accessed: @@ -707,7 +939,8 @@ Operation Regions/SpaceIDs: --------------------------- All new operation regions are fully supported by the iASL compiler, the -disassembler, and the ACPICA runtime code (for dispatch to region handlers.) +disassembler, and the ACPICA runtime code (for dispatch to region +handlers.) The new operation region Space IDs are: GeneralPurposeIo @@ -716,8 +949,10 @@ The new operation region Space IDs are: Resource Descriptors: --------------------- -All new ASL resource descriptors are fully supported by the iASL compiler, the -ASL/AML disassembler, and the ACPICA runtime Resource Manager code (including +All new ASL resource descriptors are fully supported by the iASL compiler, +the +ASL/AML disassembler, and the ACPICA runtime Resource Manager code +(including all new predefined resource tags). New descriptors are: FixedDma @@ -730,9 +965,11 @@ all new predefined resource tags). New d ASL/AML Operators, New and Modified: ------------------------------------ -One new operator is added, the Connection operator, which is used to associate +One new operator is added, the Connection operator, which is used to +associate a GeneralPurposeIo or GenericSerialBus resource descriptor with individual -field objects within an operation region. Several new protocols are associated +field objects within an operation region. Several new protocols are +associated with the AccessAs operator. All are fully supported by the iASL compiler, disassembler, and runtime ACPICA AML interpreter: @@ -740,13 +977,16 @@ disassembler, and runtime ACPICA AML int AccessAs: AttribBytes (n) // Read/Write N-Bytes Protocol AccessAs: AttribRawBytes (n) // Raw Read/Write N-Bytes Protocol *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 01: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 87F1D7F5; Wed, 24 Oct 2012 01:26:30 +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 5F7038FC16; Wed, 24 Oct 2012 01:26: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 q9O1QUau004946; Wed, 24 Oct 2012 01:26:30 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9O1QUrF004940; Wed, 24 Oct 2012 01:26:30 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201210240126.q9O1QUrF004940@svn.freebsd.org> From: Sean Bruno Date: Wed, 24 Oct 2012 01:26:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241974 - in head: lib/libpmc sys/dev/hwpmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 01:26:30 -0000 Author: sbruno Date: Wed Oct 24 01:26:29 2012 New Revision: 241974 URL: http://svn.freebsd.org/changeset/base/241974 Log: Cleanup and rename some variables in libpmc and hwpmc. Submitted by: hiren panchasara Reviewed by: jimharris@ sbruno@ Obtained from: Yahoo! Inc. MFC after: 2 weeks Modified: head/lib/libpmc/libpmc.c head/lib/libpmc/pmc.ivybridge.3 head/lib/libpmc/pmc.sandybridge.3 head/lib/libpmc/pmc.sandybridgexeon.3 head/sys/dev/hwpmc/pmc_events.h Modified: head/lib/libpmc/libpmc.c ============================================================================== --- head/lib/libpmc/libpmc.c Tue Oct 23 23:49:17 2012 (r241973) +++ head/lib/libpmc/libpmc.c Wed Oct 24 01:26:29 2012 (r241974) @@ -721,7 +721,7 @@ static struct pmc_masks iap_rsp_mask_sb_ PMCMASK(RES_SUPPLIER_LLC_HITS, (1ULL << 20)), PMCMASK(RES_SUPPLIER_LLC_HITF, (1ULL << 21)), PMCMASK(RES_SUPPLIER_LOCAL, (1ULL << 22)), - PMCMASK(RES_SNOOP_SNPI_NONE, (1ULL << 31)), + PMCMASK(RES_SNOOP_SNP_NONE, (1ULL << 31)), PMCMASK(RES_SNOOP_SNP_NO_NEEDED,(1ULL << 32)), PMCMASK(RES_SNOOP_SNP_MISS, (1ULL << 33)), PMCMASK(RES_SNOOP_HIT_NO_FWD, (1ULL << 34)), Modified: head/lib/libpmc/pmc.ivybridge.3 ============================================================================== --- head/lib/libpmc/pmc.ivybridge.3 Tue Oct 23 23:49:17 2012 (r241973) +++ head/lib/libpmc/pmc.ivybridge.3 Wed Oct 24 01:26:29 2012 (r241974) @@ -134,7 +134,7 @@ S-state. F-state. .It Li RES_SUPPLIER_LOCAL Local DRAM Controller. -.It Li RES_SNOOP_SNPI_NONE +.It Li RES_SNOOP_SNP_NONE No details on snoop-related information. .It Li RES_SNOOP_SNP_NO_NEEDED No snoop was needed to satisfy the request. Modified: head/lib/libpmc/pmc.sandybridge.3 ============================================================================== --- head/lib/libpmc/pmc.sandybridge.3 Tue Oct 23 23:49:17 2012 (r241973) +++ head/lib/libpmc/pmc.sandybridge.3 Wed Oct 24 01:26:29 2012 (r241974) @@ -138,7 +138,7 @@ S-state. F-state. .It Li RES_SUPPLIER_LOCAL Local DRAM Controller. -.It Li RES_SNOOP_SNPI_NONE +.It Li RES_SNOOP_SNP_NONE No details on snoop-related information. .It Li RES_SNOOP_SNP_NO_NEEDED No snoop was needed to satisfy the request. Modified: head/lib/libpmc/pmc.sandybridgexeon.3 ============================================================================== --- head/lib/libpmc/pmc.sandybridgexeon.3 Tue Oct 23 23:49:17 2012 (r241973) +++ head/lib/libpmc/pmc.sandybridgexeon.3 Wed Oct 24 01:26:29 2012 (r241974) @@ -135,7 +135,7 @@ S-state. F-state. .It Li RES_SUPPLIER_LOCAL Local DRAM Controller. -.It Li RES_SNOOP_SNPI_NONE +.It Li RES_SNOOP_SNP_NONE No details on snoop-related information. .It Li RES_SNOOP_SNP_NO_NEEDED No snoop was needed to satisfy the request. Modified: head/sys/dev/hwpmc/pmc_events.h ============================================================================== --- head/sys/dev/hwpmc/pmc_events.h Tue Oct 23 23:49:17 2012 (r241973) +++ head/sys/dev/hwpmc/pmc_events.h Wed Oct 24 01:26:29 2012 (r241974) @@ -2640,7 +2640,7 @@ __PMC_EV_ALIAS("DTLB_STORE_MISSES.WALK_C __PMC_EV_ALIAS("DTLB_STORE_MISSES.WALK_DURATION", IAP_EVENT_49H_04H) \ __PMC_EV_ALIAS("DTLB_STORE_MISSES.STLB_HIT", IAP_EVENT_49H_10H) \ __PMC_EV_ALIAS("LOAD_HIT_PRE.SW_PF", IAP_EVENT_4CH_01H) \ -__PMC_EV_ALIAS("LOAD_HIT_PER.HW_PF", IAP_EVENT_4CH_02H) \ +__PMC_EV_ALIAS("LOAD_HIT_PRE.HW_PF", IAP_EVENT_4CH_02H) \ __PMC_EV_ALIAS("HW_PRE_REQ.DL1_MISS", IAP_EVENT_4EH_02H) \ __PMC_EV_ALIAS("L1D.REPLACEMENT", IAP_EVENT_51H_01H) \ __PMC_EV_ALIAS("L1D.ALLOCATED_IN_M", IAP_EVENT_51H_02H) \ @@ -2777,7 +2777,7 @@ __PMC_EV_ALIAS("MEM_LOAD_UOPS_LLC_HIT_RE __PMC_EV_ALIAS("MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_NONE", IAP_EVENT_D2H_08H) \ __PMC_EV_ALIAS("MEM_LOAD_UOPS_LLC_HIT_RETIRED.LLC_MISS", IAP_EVENT_D4H_02H) \ __PMC_EV_ALIAS("L2_TRANS.DEMAND_DATA_RD", IAP_EVENT_F0H_01H) \ -__PMC_EV_ALIAS("L2_TRANS.RF0", IAP_EVENT_F0H_02H) \ +__PMC_EV_ALIAS("L2_TRANS.RFO", IAP_EVENT_F0H_02H) \ __PMC_EV_ALIAS("L2_TRANS.CODE_RD", IAP_EVENT_F0H_04H) \ __PMC_EV_ALIAS("L2_TRANS.ALL_PF", IAP_EVENT_F0H_08H) \ __PMC_EV_ALIAS("L2_TRANS.L1D_WB", IAP_EVENT_F0H_10H) \ @@ -2787,7 +2787,7 @@ __PMC_EV_ALIAS("L2_TRANS.ALL_REQUESTS", __PMC_EV_ALIAS("L2_LINES_IN.I", IAP_EVENT_F1H_01H) \ __PMC_EV_ALIAS("L2_LINES_IN.S", IAP_EVENT_F1H_02H) \ __PMC_EV_ALIAS("L2_LINES_IN.E", IAP_EVENT_F1H_04H) \ -__PMC_EV_ALIAS("L2_LINES-IN.ALL", IAP_EVENT_F1H_07H) \ +__PMC_EV_ALIAS("L2_LINES_IN.ALL", IAP_EVENT_F1H_07H) \ __PMC_EV_ALIAS("L2_LINES_OUT.DEMAND_CLEAN", IAP_EVENT_F2H_01H) \ __PMC_EV_ALIAS("L2_LINES_OUT.DEMAND_DIRTY", IAP_EVENT_F2H_02H) \ __PMC_EV_ALIAS("L2_LINES_OUT.PF_CLEAN", IAP_EVENT_F2H_04H) \ @@ -2855,7 +2855,7 @@ __PMC_EV_ALIAS("DTLB_STORE_MISSES.WALK_C __PMC_EV_ALIAS("DTLB_STORE_MISSES.WALK_DURATION", IAP_EVENT_49H_04H) \ __PMC_EV_ALIAS("DTLB_STORE_MISSES.STLB_HIT", IAP_EVENT_49H_10H) \ __PMC_EV_ALIAS("LOAD_HIT_PRE.SW_PF", IAP_EVENT_4CH_01H) \ -__PMC_EV_ALIAS("LOAD_HIT_PER.HW_PF", IAP_EVENT_4CH_02H) \ +__PMC_EV_ALIAS("LOAD_HIT_PRE.HW_PF", IAP_EVENT_4CH_02H) \ __PMC_EV_ALIAS("HW_PRE_REQ.DL1_MISS", IAP_EVENT_4EH_02H) \ __PMC_EV_ALIAS("L1D.REPLACEMENT", IAP_EVENT_51H_01H) \ __PMC_EV_ALIAS("L1D.ALLOCATED_IN_M", IAP_EVENT_51H_02H) \ @@ -3005,7 +3005,7 @@ __PMC_EV_ALIAS("L2_TRANS.ALL_REQUESTS", __PMC_EV_ALIAS("L2_LINES_IN.I", IAP_EVENT_F1H_01H) \ __PMC_EV_ALIAS("L2_LINES_IN.S", IAP_EVENT_F1H_02H) \ __PMC_EV_ALIAS("L2_LINES_IN.E", IAP_EVENT_F1H_04H) \ -__PMC_EV_ALIAS("L2_LINES-IN.ALL", IAP_EVENT_F1H_07H) \ +__PMC_EV_ALIAS("L2_LINES_IN.ALL", IAP_EVENT_F1H_07H) \ __PMC_EV_ALIAS("L2_LINES_OUT.DEMAND_CLEAN", IAP_EVENT_F2H_01H) \ __PMC_EV_ALIAS("L2_LINES_OUT.DEMAND_DIRTY", IAP_EVENT_F2H_02H) \ __PMC_EV_ALIAS("L2_LINES_OUT.PF_CLEAN", IAP_EVENT_F2H_04H) \ From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 01:42: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 3580EB31; Wed, 24 Oct 2012 01:42:47 +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 1C43A8FC0C; Wed, 24 Oct 2012 01:42: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 q9O1gk9E008094; Wed, 24 Oct 2012 01:42:46 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9O1gkQI008092; Wed, 24 Oct 2012 01:42:46 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201210240142.q9O1gkQI008092@svn.freebsd.org> From: Ken Smith Date: Wed, 24 Oct 2012 01:42:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241975 - head/usr.sbin/pkg_install/add X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 01:42:47 -0000 Author: kensmith Date: Wed Oct 24 01:42:46 2012 New Revision: 241975 URL: http://svn.freebsd.org/changeset/base/241975 Log: Add the release package directory for 9.1-RELEASE. Modified: head/usr.sbin/pkg_install/add/main.c Modified: head/usr.sbin/pkg_install/add/main.c ============================================================================== --- head/usr.sbin/pkg_install/add/main.c Wed Oct 24 01:26:29 2012 (r241974) +++ head/usr.sbin/pkg_install/add/main.c Wed Oct 24 01:42:46 2012 (r241975) @@ -89,6 +89,7 @@ struct { { 802000, 802499, "/packages-8.2-release" }, { 803000, 803499, "/packages-8.3-release" }, { 900000, 900499, "/packages-9.0-release" }, + { 901000, 901499, "/packages-9.1-release" }, { 300000, 399000, "/packages-3-stable" }, { 400000, 499000, "/packages-4-stable" }, { 502100, 502128, "/packages-5-current" }, From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 02:00: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 A7DF7D74; Wed, 24 Oct 2012 02:00:55 +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 8E5D58FC12; Wed, 24 Oct 2012 02:00: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 q9O20tvU011681; Wed, 24 Oct 2012 02:00:55 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9O20tim011677; Wed, 24 Oct 2012 02:00:55 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201210240200.q9O20tim011677@svn.freebsd.org> From: Ken Smith Date: Wed, 24 Oct 2012 02:00:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241976 - stable/9/usr.sbin/pkg_install/add X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 02:00:55 -0000 Author: kensmith Date: Wed Oct 24 02:00:54 2012 New Revision: 241976 URL: http://svn.freebsd.org/changeset/base/241976 Log: MFC r241975: Add the release package directory for 9.1-RELEASE. Modified: stable/9/usr.sbin/pkg_install/add/main.c Directory Properties: stable/9/usr.sbin/pkg_install/add/ (props changed) Modified: stable/9/usr.sbin/pkg_install/add/main.c ============================================================================== --- stable/9/usr.sbin/pkg_install/add/main.c Wed Oct 24 01:42:46 2012 (r241975) +++ stable/9/usr.sbin/pkg_install/add/main.c Wed Oct 24 02:00:54 2012 (r241976) @@ -89,6 +89,7 @@ struct { { 802000, 802499, "/packages-8.2-release" }, { 803000, 803499, "/packages-8.3-release" }, { 900000, 900499, "/packages-9.0-release" }, + { 901000, 901499, "/packages-9.1-release" }, { 300000, 399000, "/packages-3-stable" }, { 400000, 499000, "/packages-4-stable" }, { 502100, 502128, "/packages-5-current" }, From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 02:07: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 24733F44; Wed, 24 Oct 2012 02:07:03 +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 09ED38FC0A; Wed, 24 Oct 2012 02:07: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 q9O272Wr012947; Wed, 24 Oct 2012 02:07:02 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9O272RT012945; Wed, 24 Oct 2012 02:07:02 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201210240207.q9O272RT012945@svn.freebsd.org> From: Ken Smith Date: Wed, 24 Oct 2012 02:07:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r241977 - stable/8/usr.sbin/pkg_install/add X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 02:07:03 -0000 Author: kensmith Date: Wed Oct 24 02:07:02 2012 New Revision: 241977 URL: http://svn.freebsd.org/changeset/base/241977 Log: MFC r241976: Add the release package directory for 9.1-RELEASE. Modified: stable/8/usr.sbin/pkg_install/add/main.c Directory Properties: stable/8/usr.sbin/pkg_install/add/ (props changed) Modified: stable/8/usr.sbin/pkg_install/add/main.c ============================================================================== --- stable/8/usr.sbin/pkg_install/add/main.c Wed Oct 24 02:00:54 2012 (r241976) +++ stable/8/usr.sbin/pkg_install/add/main.c Wed Oct 24 02:07:02 2012 (r241977) @@ -89,6 +89,7 @@ struct { { 802000, 802499, "/packages-8.2-release" }, { 803000, 803499, "/packages-8.3-release" }, { 900000, 900499, "/packages-9.0-release" }, + { 901000, 901499, "/packages-9.1-release" }, { 300000, 399000, "/packages-3-stable" }, { 400000, 499000, "/packages-4-stable" }, { 502100, 502128, "/packages-5-current" }, From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 02:09: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 3B4BC120; Wed, 24 Oct 2012 02:09:22 +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 1E59F8FC0C; Wed, 24 Oct 2012 02:09: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 q9O29Lx8013434; Wed, 24 Oct 2012 02:09:21 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9O29LWA013432; Wed, 24 Oct 2012 02:09:21 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201210240209.q9O29LWA013432@svn.freebsd.org> From: Ken Smith Date: Wed, 24 Oct 2012 02:09:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r241978 - releng/9.1/usr.sbin/pkg_install/add X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 02:09:22 -0000 Author: kensmith Date: Wed Oct 24 02:09:21 2012 New Revision: 241978 URL: http://svn.freebsd.org/changeset/base/241978 Log: MFC r241976: Add the release package directory for 9.1-RELEASE. Approved by: re (implicit) Modified: releng/9.1/usr.sbin/pkg_install/add/main.c Directory Properties: releng/9.1/usr.sbin/pkg_install/add/ (props changed) Modified: releng/9.1/usr.sbin/pkg_install/add/main.c ============================================================================== --- releng/9.1/usr.sbin/pkg_install/add/main.c Wed Oct 24 02:07:02 2012 (r241977) +++ releng/9.1/usr.sbin/pkg_install/add/main.c Wed Oct 24 02:09:21 2012 (r241978) @@ -89,6 +89,7 @@ struct { { 802000, 802499, "/packages-8.2-release" }, { 803000, 803499, "/packages-8.3-release" }, { 900000, 900499, "/packages-9.0-release" }, + { 901000, 901499, "/packages-9.1-release" }, { 300000, 399000, "/packages-3-stable" }, { 400000, 499000, "/packages-4-stable" }, { 502100, 502128, "/packages-5-current" }, From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 02:20:08 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 4A4262FD; Wed, 24 Oct 2012 02:20:08 +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 311118FC0C; Wed, 24 Oct 2012 02:20: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 q9O2K81V015623; Wed, 24 Oct 2012 02:20:08 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9O2K7es015621; Wed, 24 Oct 2012 02:20:07 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201210240220.q9O2K7es015621@svn.freebsd.org> From: Ken Smith Date: Wed, 24 Oct 2012 02:20:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r241979 - releng/9.1/release X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 02:20:08 -0000 Author: kensmith Date: Wed Oct 24 02:20:07 2012 New Revision: 241979 URL: http://svn.freebsd.org/changeset/base/241979 Log: Update for being on releng/9.1 (RELENG_9_1). Approved by: re (implicit) Modified: releng/9.1/release/Makefile.sysinstall Modified: releng/9.1/release/Makefile.sysinstall ============================================================================== --- releng/9.1/release/Makefile.sysinstall Wed Oct 24 02:09:21 2012 (r241978) +++ releng/9.1/release/Makefile.sysinstall Wed Oct 24 02:20:07 2012 (r241979) @@ -33,7 +33,7 @@ BUILDNAME?=${BASE}-${DATE}-SNAP # #CHROOTDIR=/junk/release # If this is a -stable snapshot, then set -#RELEASETAG=RELENG_9 +#RELEASETAG=RELENG_9_1 # # To test a release with a source tree containing patches and # other work. This tree will get copied instead of getting the From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 02:21: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 3B665472; Wed, 24 Oct 2012 02:21:40 +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 2288E8FC08; Wed, 24 Oct 2012 02:21: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 q9O2Ld80015962; Wed, 24 Oct 2012 02:21:39 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9O2Ldlc015960; Wed, 24 Oct 2012 02:21:39 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201210240221.q9O2Ldlc015960@svn.freebsd.org> From: Ken Smith Date: Wed, 24 Oct 2012 02:21:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r241980 - releng/9.1/share/examples/cvsup X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 02:21:40 -0000 Author: kensmith Date: Wed Oct 24 02:21:39 2012 New Revision: 241980 URL: http://svn.freebsd.org/changeset/base/241980 Log: Update branch tag from RELENG_9 to RELENG_9_1. Approved by: re (implicit) Modified: releng/9.1/share/examples/cvsup/standard-supfile Modified: releng/9.1/share/examples/cvsup/standard-supfile ============================================================================== --- releng/9.1/share/examples/cvsup/standard-supfile Wed Oct 24 02:20:07 2012 (r241979) +++ releng/9.1/share/examples/cvsup/standard-supfile Wed Oct 24 02:21:39 2012 (r241980) @@ -46,7 +46,7 @@ *default host=CHANGE_THIS.FreeBSD.org *default base=/var/db *default prefix=/usr -*default release=cvs tag=RELENG_9 +*default release=cvs tag=RELENG_9_1 *default delete use-rel-suffix # If you seem to be limited by CPU rather than network or disk bandwidth, try From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 05:00: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 34939C8D; Wed, 24 Oct 2012 05:00:57 +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 136578FC08; Wed, 24 Oct 2012 05:00: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 q9O50u3p042899; Wed, 24 Oct 2012 05:00:56 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9O50udC042896; Wed, 24 Oct 2012 05:00:56 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201210240500.q9O50udC042896@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 24 Oct 2012 05:00:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241983 - head/sys/dev/bge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 05:00:57 -0000 Author: yongari Date: Wed Oct 24 05:00:56 2012 New Revision: 241983 URL: http://svn.freebsd.org/changeset/base/241983 Log: Do not hardcode phy address. Multi-port controllers use different phy address. 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 Wed Oct 24 02:54:21 2012 (r241982) +++ head/sys/dev/bge/if_bge.c Wed Oct 24 05:00:56 2012 (r241983) @@ -3215,7 +3215,7 @@ bge_attach(device_t dev) struct bge_softc *sc; uint32_t hwcfg = 0, misccfg, pcistate; u_char eaddr[ETHER_ADDR_LEN]; - int capmask, error, msicount, phy_addr, reg, rid, trys; + int capmask, error, msicount, reg, rid, trys; sc = device_get_softc(dev); sc->bge_dev = dev; @@ -3275,7 +3275,7 @@ bge_attach(device_t dev) sc->bge_chiprev = BGE_CHIPREV(sc->bge_chipid); /* Set default PHY address. */ - phy_addr = 1; + sc->bge_phy_addr = 1; /* * PHY address mapping for various devices. * @@ -3304,15 +3304,15 @@ bge_attach(device_t dev) if (sc->bge_chipid != BGE_CHIPID_BCM5717_A0) { if (CSR_READ_4(sc, BGE_SGDIG_STS) & BGE_SGDIGSTS_IS_SERDES) - phy_addr = sc->bge_func_addr + 8; + sc->bge_phy_addr = sc->bge_func_addr + 8; else - phy_addr = sc->bge_func_addr + 1; + sc->bge_phy_addr = sc->bge_func_addr + 1; } else { if (CSR_READ_4(sc, BGE_CPMU_PHY_STRAP) & BGE_CPMU_PHY_STRAP_IS_SERDES) - phy_addr = sc->bge_func_addr + 8; + sc->bge_phy_addr = sc->bge_func_addr + 8; else - phy_addr = sc->bge_func_addr + 1; + sc->bge_phy_addr = sc->bge_func_addr + 1; } } @@ -3789,13 +3789,13 @@ again: bge_asf_driver_up(sc); error = mii_attach(dev, &sc->bge_miibus, ifp, bge_ifmedia_upd, - bge_ifmedia_sts, capmask, phy_addr, MII_OFFSET_ANY, + bge_ifmedia_sts, capmask, sc->bge_phy_addr, MII_OFFSET_ANY, MIIF_DOPAUSE); if (error != 0) { if (trys++ < 4) { device_printf(sc->bge_dev, "Try again\n"); - bge_miibus_writereg(sc->bge_dev, 1, MII_BMCR, - BMCR_RESET); + bge_miibus_writereg(sc->bge_dev, + sc->bge_phy_addr, MII_BMCR, BMCR_RESET); goto again; } device_printf(sc->bge_dev, "attaching PHYs failed\n"); @@ -6017,9 +6017,10 @@ bge_link_upd(struct bge_softc *sc) /* Clear the interrupt. */ CSR_WRITE_4(sc, BGE_MAC_EVT_ENB, BGE_EVTENB_MI_INTERRUPT); - bge_miibus_readreg(sc->bge_dev, 1, BRGPHY_MII_ISR); - bge_miibus_writereg(sc->bge_dev, 1, BRGPHY_MII_IMR, - BRGPHY_INTRS); + bge_miibus_readreg(sc->bge_dev, sc->bge_phy_addr, + BRGPHY_MII_ISR); + bge_miibus_writereg(sc->bge_dev, sc->bge_phy_addr, + BRGPHY_MII_IMR, BRGPHY_INTRS); } return; } Modified: head/sys/dev/bge/if_bgereg.h ============================================================================== --- head/sys/dev/bge/if_bgereg.h Wed Oct 24 02:54:21 2012 (r241982) +++ head/sys/dev/bge/if_bgereg.h Wed Oct 24 05:00:56 2012 (r241983) @@ -2974,6 +2974,7 @@ struct bge_softc { #define BGE_MFW_TYPE_DASH 0x00000008 int bge_phy_ape_lock; int bge_func_addr; + int bge_phy_addr; uint32_t bge_phy_flags; #define BGE_PHY_NO_WIRESPEED 0x00000001 #define BGE_PHY_ADC_BUG 0x00000002 From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 05:22: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 EE684FB6; Wed, 24 Oct 2012 05:22:41 +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 CDC5F8FC1A; Wed, 24 Oct 2012 05:22: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 q9O5MfXV046228; Wed, 24 Oct 2012 05:22:41 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9O5Mfwi046226; Wed, 24 Oct 2012 05:22:41 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201210240522.q9O5Mfwi046226@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 24 Oct 2012 05:22:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241984 - head/sys/dev/bge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 05:22:42 -0000 Author: yongari Date: Wed Oct 24 05:22:41 2012 New Revision: 241984 URL: http://svn.freebsd.org/changeset/base/241984 Log: Ethernet@WireSpeed is defined for 1000baseT adapter to establish a link at a lower speed so enabling it for fiber adapters is wrong. Fix the issue by setting BGE_PHY_NO_WIRESPEED such that brgphy(4) wouldn't enable the feature. While I'm here move PHY specific feature/bug configuration to new location(just before mii attach) for readability. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Wed Oct 24 05:00:56 2012 (r241983) +++ head/sys/dev/bge/if_bge.c Wed Oct 24 05:22:41 2012 (r241984) @@ -3316,17 +3316,6 @@ bge_attach(device_t dev) } } - /* - * Don't enable Ethernet@WireSpeed for the 5700, 5906, or the - * 5705 A0 and A1 chips. - */ - if (sc->bge_asicrev == BGE_ASICREV_BCM5700 || - (sc->bge_asicrev == BGE_ASICREV_BCM5705 && - (sc->bge_chipid != BGE_CHIPID_BCM5705_A0 && - sc->bge_chipid != BGE_CHIPID_BCM5705_A1)) || - sc->bge_asicrev == BGE_ASICREV_BCM5906) - sc->bge_phy_flags |= BGE_PHY_NO_WIRESPEED; - if (bge_has_eaddr(sc)) sc->bge_flags |= BGE_FLAG_EADDR; @@ -3411,38 +3400,6 @@ bge_attach(device_t dev) /* Add SYSCTLs, requires the chipset family to be set. */ bge_add_sysctls(sc); - /* Set various PHY bug flags. */ - if (sc->bge_chipid == BGE_CHIPID_BCM5701_A0 || - sc->bge_chipid == BGE_CHIPID_BCM5701_B0) - sc->bge_phy_flags |= BGE_PHY_CRC_BUG; - if (sc->bge_chiprev == BGE_CHIPREV_5703_AX || - sc->bge_chiprev == BGE_CHIPREV_5704_AX) - sc->bge_phy_flags |= BGE_PHY_ADC_BUG; - if (sc->bge_chipid == BGE_CHIPID_BCM5704_A0) - sc->bge_phy_flags |= BGE_PHY_5704_A0_BUG; - if (pci_get_subvendor(dev) == DELL_VENDORID) - sc->bge_phy_flags |= BGE_PHY_NO_3LED; - if ((BGE_IS_5705_PLUS(sc)) && - sc->bge_asicrev != BGE_ASICREV_BCM5906 && - sc->bge_asicrev != BGE_ASICREV_BCM5717 && - sc->bge_asicrev != BGE_ASICREV_BCM5719 && - sc->bge_asicrev != BGE_ASICREV_BCM5720 && - sc->bge_asicrev != BGE_ASICREV_BCM5785 && - sc->bge_asicrev != BGE_ASICREV_BCM57765 && - sc->bge_asicrev != BGE_ASICREV_BCM57780) { - if (sc->bge_asicrev == BGE_ASICREV_BCM5755 || - sc->bge_asicrev == BGE_ASICREV_BCM5761 || - sc->bge_asicrev == BGE_ASICREV_BCM5784 || - sc->bge_asicrev == BGE_ASICREV_BCM5787) { - if (pci_get_device(dev) != BCOM_DEVICEID_BCM5722 && - pci_get_device(dev) != BCOM_DEVICEID_BCM5756) - sc->bge_phy_flags |= BGE_PHY_JITTER_BUG; - if (pci_get_device(dev) == BCOM_DEVICEID_BCM5755M) - sc->bge_phy_flags |= BGE_PHY_ADJUST_TRIM; - } else - sc->bge_phy_flags |= BGE_PHY_BER_BUG; - } - /* Identify the chips that use an CPMU. */ if (BGE_IS_5717_PLUS(sc) || sc->bge_asicrev == BGE_ASICREV_BCM5784 || @@ -3760,12 +3717,56 @@ bge_attach(device_t dev) /* The SysKonnect SK-9D41 is a 1000baseSX card. */ if ((pci_read_config(dev, BGE_PCI_SUBSYS, 4) >> 16) == SK_SUBSYSID_9D41 || (hwcfg & BGE_HWCFG_MEDIA) == BGE_MEDIA_FIBER) { - if (BGE_IS_5705_PLUS(sc)) + if (BGE_IS_5705_PLUS(sc)) { sc->bge_flags |= BGE_FLAG_MII_SERDES; - else + sc->bge_phy_flags |= BGE_PHY_NO_WIRESPEED; + } else sc->bge_flags |= BGE_FLAG_TBI; } + /* Set various PHY bug flags. */ + if (sc->bge_chipid == BGE_CHIPID_BCM5701_A0 || + sc->bge_chipid == BGE_CHIPID_BCM5701_B0) + sc->bge_phy_flags |= BGE_PHY_CRC_BUG; + if (sc->bge_chiprev == BGE_CHIPREV_5703_AX || + sc->bge_chiprev == BGE_CHIPREV_5704_AX) + sc->bge_phy_flags |= BGE_PHY_ADC_BUG; + if (sc->bge_chipid == BGE_CHIPID_BCM5704_A0) + sc->bge_phy_flags |= BGE_PHY_5704_A0_BUG; + if (pci_get_subvendor(dev) == DELL_VENDORID) + sc->bge_phy_flags |= BGE_PHY_NO_3LED; + if ((BGE_IS_5705_PLUS(sc)) && + sc->bge_asicrev != BGE_ASICREV_BCM5906 && + sc->bge_asicrev != BGE_ASICREV_BCM5717 && + sc->bge_asicrev != BGE_ASICREV_BCM5719 && + sc->bge_asicrev != BGE_ASICREV_BCM5720 && + sc->bge_asicrev != BGE_ASICREV_BCM5785 && + sc->bge_asicrev != BGE_ASICREV_BCM57765 && + sc->bge_asicrev != BGE_ASICREV_BCM57780) { + if (sc->bge_asicrev == BGE_ASICREV_BCM5755 || + sc->bge_asicrev == BGE_ASICREV_BCM5761 || + sc->bge_asicrev == BGE_ASICREV_BCM5784 || + sc->bge_asicrev == BGE_ASICREV_BCM5787) { + if (pci_get_device(dev) != BCOM_DEVICEID_BCM5722 && + pci_get_device(dev) != BCOM_DEVICEID_BCM5756) + sc->bge_phy_flags |= BGE_PHY_JITTER_BUG; + if (pci_get_device(dev) == BCOM_DEVICEID_BCM5755M) + sc->bge_phy_flags |= BGE_PHY_ADJUST_TRIM; + } else + sc->bge_phy_flags |= BGE_PHY_BER_BUG; + } + + /* + * Don't enable Ethernet@WireSpeed for the 5700, 5906, or the + * 5705 A0 and A1 chips. + */ + if (sc->bge_asicrev == BGE_ASICREV_BCM5700 || + (sc->bge_asicrev == BGE_ASICREV_BCM5705 && + (sc->bge_chipid != BGE_CHIPID_BCM5705_A0 && + sc->bge_chipid != BGE_CHIPID_BCM5705_A1)) || + sc->bge_asicrev == BGE_ASICREV_BCM5906) + sc->bge_phy_flags |= BGE_PHY_NO_WIRESPEED; + if (sc->bge_flags & BGE_FLAG_TBI) { ifmedia_init(&sc->bge_ifmedia, IFM_IMASK, bge_ifmedia_upd, bge_ifmedia_sts); From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 05:54: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 930A4907; Wed, 24 Oct 2012 05:54:18 +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 7A59C8FC0C; Wed, 24 Oct 2012 05:54: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 q9O5sIgc051121; Wed, 24 Oct 2012 05:54:18 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9O5sIX6051119; Wed, 24 Oct 2012 05:54:18 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201210240554.q9O5sIX6051119@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 24 Oct 2012 05:54:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241985 - head/sys/dev/bge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 05:54:18 -0000 Author: yongari Date: Wed Oct 24 05:54:17 2012 New Revision: 241985 URL: http://svn.freebsd.org/changeset/base/241985 Log: For fast ethernet controllers, Ethernet@WireSpeed is not defined so explicitly set BGE_PHY_NO_WIRESPEED flag. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Wed Oct 24 05:22:41 2012 (r241984) +++ head/sys/dev/bge/if_bge.c Wed Oct 24 05:54:17 2012 (r241985) @@ -3460,6 +3460,7 @@ bge_attach(device_t dev) sc->bge_asicrev == BGE_ASICREV_BCM5906) { /* These chips are 10/100 only. */ capmask &= ~BMSR_EXTSTAT; + sc->bge_phy_flags |= BGE_PHY_NO_WIRESPEED; } /* @@ -3757,14 +3758,13 @@ bge_attach(device_t dev) } /* - * Don't enable Ethernet@WireSpeed for the 5700, 5906, or the + * Don't enable Ethernet@WireSpeed for the 5700 or the * 5705 A0 and A1 chips. */ if (sc->bge_asicrev == BGE_ASICREV_BCM5700 || (sc->bge_asicrev == BGE_ASICREV_BCM5705 && (sc->bge_chipid != BGE_CHIPID_BCM5705_A0 && - sc->bge_chipid != BGE_CHIPID_BCM5705_A1)) || - sc->bge_asicrev == BGE_ASICREV_BCM5906) + sc->bge_chipid != BGE_CHIPID_BCM5705_A1))) sc->bge_phy_flags |= BGE_PHY_NO_WIRESPEED; if (sc->bge_flags & BGE_FLAG_TBI) { From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 06:10: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 E5F82C96; Wed, 24 Oct 2012 06:10:09 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CD6558FC0C; Wed, 24 Oct 2012 06:10: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 q9O6A9Ap053685; Wed, 24 Oct 2012 06:10:09 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9O6A9oG053683; Wed, 24 Oct 2012 06:10:09 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201210240610.q9O6A9oG053683@svn.freebsd.org> From: Warner Losh Date: Wed, 24 Oct 2012 06:10:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241986 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 06:10:10 -0000 Author: imp Date: Wed Oct 24 06:10:09 2012 New Revision: 241986 URL: http://svn.freebsd.org/changeset/base/241986 Log: Add back hwpmc support. Modified: head/sys/conf/files.mips Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Wed Oct 24 05:54:17 2012 (r241985) +++ head/sys/conf/files.mips Wed Oct 24 06:10:09 2012 (r241986) @@ -99,3 +99,7 @@ crypto/des/des_enc.c optional crypto | # AP common nvram interface dev/nvram2env/nvram2env.c optional nvram2env + +# hwpmc goo +dev/hwpmc/hwpmc_mips.c optional hwpmc +dev/hwpmc/hwpmc_mips24k.c optional hwpmc From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 07: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 4F19A61B; Wed, 24 Oct 2012 07:23:30 +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 32F658FC08; Wed, 24 Oct 2012 07: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 q9O7NUB8064733; Wed, 24 Oct 2012 07:23:30 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9O7NUG7064724; Wed, 24 Oct 2012 07:23:30 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201210240723.q9O7NUG7064724@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 24 Oct 2012 07:23:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241987 - in head/sys/dev/usb: . controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 07:23:30 -0000 Author: hselasky Date: Wed Oct 24 07:23:29 2012 New Revision: 241987 URL: http://svn.freebsd.org/changeset/base/241987 Log: Make several timing parameters of the USB enumeration sequence tuneable. Also update the port reset time from 250ms to 50ms. Some USB devices have a hard limit in hardware at 222ms for the port reset time and will not enumerate unless this delay is closer to the usb.org defined value. This patch can fix enumeration with some USB devices. Tested by: Guido van Rooij Submitted by: Nick Hibma MFC after: 1 week Modified: head/sys/dev/usb/controller/ehci.c head/sys/dev/usb/controller/ohci.c head/sys/dev/usb/controller/uhci.c head/sys/dev/usb/usb.h head/sys/dev/usb/usb_debug.c head/sys/dev/usb/usb_debug.h head/sys/dev/usb/usb_hub.c head/sys/dev/usb/usb_request.c Modified: head/sys/dev/usb/controller/ehci.c ============================================================================== --- head/sys/dev/usb/controller/ehci.c Wed Oct 24 06:10:09 2012 (r241986) +++ head/sys/dev/usb/controller/ehci.c Wed Oct 24 07:23:29 2012 (r241987) @@ -3369,7 +3369,7 @@ ehci_roothub_exec(struct usb_device *ude /* Wait for reset to complete. */ usb_pause_mtx(&sc->sc_bus.bus_mtx, - USB_MS_TO_TICKS(USB_PORT_ROOT_RESET_DELAY)); + USB_MS_TO_TICKS(usb_port_root_reset_delay)); /* Terminate reset sequence. */ if (!(sc->sc_flags & EHCI_SCFLG_NORESTERM)) Modified: head/sys/dev/usb/controller/ohci.c ============================================================================== --- head/sys/dev/usb/controller/ohci.c Wed Oct 24 06:10:09 2012 (r241986) +++ head/sys/dev/usb/controller/ohci.c Wed Oct 24 07:23:29 2012 (r241987) @@ -2345,7 +2345,7 @@ ohci_roothub_exec(struct usb_device *ude for (v = 0;; v++) { if (v < 12) { usb_pause_mtx(&sc->sc_bus.bus_mtx, - USB_MS_TO_TICKS(USB_PORT_ROOT_RESET_DELAY)); + USB_MS_TO_TICKS(usb_port_root_reset_delay)); if ((OREAD4(sc, port) & UPS_RESET) == 0) { break; Modified: head/sys/dev/usb/controller/uhci.c ============================================================================== --- head/sys/dev/usb/controller/uhci.c Wed Oct 24 06:10:09 2012 (r241986) +++ head/sys/dev/usb/controller/uhci.c Wed Oct 24 07:23:29 2012 (r241987) @@ -2393,7 +2393,7 @@ uhci_portreset(uhci_softc_t *sc, uint16_ UWRITE2(sc, port, x | UHCI_PORTSC_PR); usb_pause_mtx(&sc->sc_bus.bus_mtx, - USB_MS_TO_TICKS(USB_PORT_ROOT_RESET_DELAY)); + USB_MS_TO_TICKS(usb_port_root_reset_delay)); DPRINTFN(4, "uhci port %d reset, status0 = 0x%04x\n", index, UREAD2(sc, port)); @@ -2421,7 +2421,7 @@ uhci_portreset(uhci_softc_t *sc, uint16_ for (lim = 0; lim < 12; lim++) { usb_pause_mtx(&sc->sc_bus.bus_mtx, - USB_MS_TO_TICKS(USB_PORT_RESET_DELAY)); + USB_MS_TO_TICKS(usb_port_reset_delay)); x = UREAD2(sc, port); Modified: head/sys/dev/usb/usb.h ============================================================================== --- head/sys/dev/usb/usb.h Wed Oct 24 06:10:09 2012 (r241986) +++ head/sys/dev/usb/usb.h Wed Oct 24 07:23:29 2012 (r241987) @@ -93,31 +93,29 @@ MALLOC_DECLARE(M_USBHC); #define USB_POWER_MODE_SUSPEND 3 /* force suspend */ #define USB_POWER_MODE_RESUME 4 /* force resume */ -#if 0 /* These are the values from the USB specification. */ -#define USB_PORT_RESET_DELAY 10 /* ms */ -#define USB_PORT_ROOT_RESET_DELAY 50 /* ms */ -#define USB_PORT_RESET_RECOVERY 10 /* ms */ -#define USB_PORT_POWERUP_DELAY 100 /* ms */ -#define USB_PORT_RESUME_DELAY 20 /* ms */ -#define USB_SET_ADDRESS_SETTLE 2 /* ms */ -#define USB_RESUME_DELAY (20*5) /* ms */ -#define USB_RESUME_WAIT 10 /* ms */ -#define USB_RESUME_RECOVERY 10 /* ms */ -#define USB_EXTRA_POWER_UP_TIME 0 /* ms */ -#else +#define USB_PORT_RESET_DELAY_SPEC 10 /* ms */ +#define USB_PORT_ROOT_RESET_DELAY_SPEC 50 /* ms */ +#define USB_PORT_RESET_RECOVERY_SPEC 10 /* ms */ +#define USB_PORT_POWERUP_DELAY_SPEC 100 /* ms */ +#define USB_PORT_RESUME_DELAY_SPEC 20 /* ms */ +#define USB_SET_ADDRESS_SETTLE_SPEC 2 /* ms */ +#define USB_RESUME_DELAY_SPEC (20*5) /* ms */ +#define USB_RESUME_WAIT_SPEC 10 /* ms */ +#define USB_RESUME_RECOVERY_SPEC 10 /* ms */ +#define USB_EXTRA_POWER_UP_TIME_SPEC 0 /* ms */ + /* Allow for marginal and non-conforming devices. */ -#define USB_PORT_RESET_DELAY 50 /* ms */ -#define USB_PORT_ROOT_RESET_DELAY 250 /* ms */ -#define USB_PORT_RESET_RECOVERY 250 /* ms */ -#define USB_PORT_POWERUP_DELAY 300 /* ms */ -#define USB_PORT_RESUME_DELAY (20*2) /* ms */ -#define USB_SET_ADDRESS_SETTLE 10 /* ms */ -#define USB_RESUME_DELAY (50*5) /* ms */ -#define USB_RESUME_WAIT 50 /* ms */ -#define USB_RESUME_RECOVERY 50 /* ms */ -#define USB_EXTRA_POWER_UP_TIME 20 /* ms */ -#endif +#define USB_PORT_RESET_DELAY 50 /* ms */ +#define USB_PORT_ROOT_RESET_DELAY 250 /* ms */ +#define USB_PORT_RESET_RECOVERY 250 /* ms */ +#define USB_PORT_POWERUP_DELAY 300 /* ms */ +#define USB_PORT_RESUME_DELAY (20*2) /* ms */ +#define USB_SET_ADDRESS_SETTLE 10 /* ms */ +#define USB_RESUME_DELAY (50*5) /* ms */ +#define USB_RESUME_WAIT 50 /* ms */ +#define USB_RESUME_RECOVERY 50 /* ms */ +#define USB_EXTRA_POWER_UP_TIME 20 /* ms */ #define USB_MIN_POWER 100 /* mA */ #define USB_MAX_POWER 500 /* mA */ Modified: head/sys/dev/usb/usb_debug.c ============================================================================== --- head/sys/dev/usb/usb_debug.c Wed Oct 24 06:10:09 2012 (r241986) +++ head/sys/dev/usb/usb_debug.c Wed Oct 24 07:23:29 2012 (r241987) @@ -68,6 +68,55 @@ SYSCTL_INT(_hw_usb, OID_AUTO, debug, CTL TUNABLE_INT("hw.usb.debug", &usb_debug); +#ifdef USB_DEBUG +/* + * Sysctls to modify timings/delays + */ +static SYSCTL_NODE(_hw_usb, OID_AUTO, timings, CTLFLAG_RW, 0, "Timings"); +static int usb_timings_sysctl_handler(SYSCTL_HANDLER_ARGS); + +TUNABLE_INT("hw.usb.timings.port_reset_delay", (int *)&usb_port_reset_delay); +SYSCTL_PROC(_hw_usb_timings, OID_AUTO, port_reset_delay, CTLTYPE_UINT | CTLFLAG_RW, + &usb_port_reset_delay, sizeof(usb_port_reset_delay), + usb_timings_sysctl_handler, "IU", "Port Reset Delay"); +TUNABLE_INT("hw.usb.timings.port_root_reset_delay", (int *)&usb_port_root_reset_delay); +SYSCTL_PROC(_hw_usb_timings, OID_AUTO, port_root_reset_delay, CTLTYPE_UINT | CTLFLAG_RW, + &usb_port_root_reset_delay, sizeof(usb_port_root_reset_delay), + usb_timings_sysctl_handler, "IU", "Root Port Reset Delay"); +TUNABLE_INT("hw.usb.timings.port_reset_recovery", (int *)&usb_port_reset_recovery); +SYSCTL_PROC(_hw_usb_timings, OID_AUTO, port_reset_recovery, CTLTYPE_UINT | CTLFLAG_RW, + &usb_port_reset_recovery, sizeof(usb_port_reset_recovery), + usb_timings_sysctl_handler, "IU", "Port Reset Recovery"); +TUNABLE_INT("hw.usb.timings.port_powerup_delay", (int *)&usb_port_powerup_delay); +SYSCTL_PROC(_hw_usb_timings, OID_AUTO, port_powerup_delay, CTLTYPE_UINT | CTLFLAG_RW, + &usb_port_powerup_delay, sizeof(usb_port_powerup_delay), + usb_timings_sysctl_handler, "IU", "Port PowerUp Delay"); +TUNABLE_INT("hw.usb.timings.port_resume_delay", (int *)&usb_port_resume_delay); +SYSCTL_PROC(_hw_usb_timings, OID_AUTO, port_resume_delay, CTLTYPE_UINT | CTLFLAG_RW, + &usb_port_resume_delay, sizeof(usb_port_resume_delay), + usb_timings_sysctl_handler, "IU", "Port Resume Delay"); +TUNABLE_INT("hw.usb.timings.set_address_settle", (int *)&usb_set_address_settle); +SYSCTL_PROC(_hw_usb_timings, OID_AUTO, set_address_settle, CTLTYPE_UINT | CTLFLAG_RW, + &usb_set_address_settle, sizeof(usb_set_address_settle), + usb_timings_sysctl_handler, "IU", "Set Address Settle"); +TUNABLE_INT("hw.usb.timings.resume_delay", (int *)&usb_resume_delay); +SYSCTL_PROC(_hw_usb_timings, OID_AUTO, resume_delay, CTLTYPE_UINT | CTLFLAG_RW, + &usb_resume_delay, sizeof(usb_resume_delay), + usb_timings_sysctl_handler, "IU", "Resume Delay"); +TUNABLE_INT("hw.usb.timings.resume_wait", (int *)&usb_resume_wait); +SYSCTL_PROC(_hw_usb_timings, OID_AUTO, resume_wait, CTLTYPE_UINT | CTLFLAG_RW, + &usb_resume_wait, sizeof(usb_resume_wait), + usb_timings_sysctl_handler, "IU", "Resume Wait"); +TUNABLE_INT("hw.usb.timings.resume_recovery", (int *)&usb_resume_recovery); +SYSCTL_PROC(_hw_usb_timings, OID_AUTO, resume_recovery, CTLTYPE_UINT | CTLFLAG_RW, + &usb_resume_recovery, sizeof(usb_resume_recovery), + usb_timings_sysctl_handler, "IU", "Resume Recovery"); +TUNABLE_INT("hw.usb.timings.extra_power_up_time", (int *)&usb_extra_power_up_time); +SYSCTL_PROC(_hw_usb_timings, OID_AUTO, extra_power_up_time, CTLTYPE_UINT | CTLFLAG_RW, + &usb_extra_power_up_time, sizeof(usb_extra_power_up_time), + usb_timings_sysctl_handler, "IU", "Extra PowerUp Time"); +#endif + /*------------------------------------------------------------------------* * usb_dump_iface * @@ -176,3 +225,87 @@ usb_dump_xfer(struct usb_xfer *xfer) xfer->endpoint->edesc->bEndpointAddress, xfer->endpoint->edesc->bmAttributes); } + +#ifdef USB_DEBUG +unsigned int usb_port_reset_delay = USB_PORT_RESET_DELAY; +unsigned int usb_port_root_reset_delay = USB_PORT_ROOT_RESET_DELAY; +unsigned int usb_port_reset_recovery = USB_PORT_RESET_RECOVERY; +unsigned int usb_port_powerup_delay = USB_PORT_POWERUP_DELAY; +unsigned int usb_port_resume_delay = USB_PORT_RESUME_DELAY; +unsigned int usb_set_address_settle = USB_SET_ADDRESS_SETTLE; +unsigned int usb_resume_delay = USB_RESUME_DELAY; +unsigned int usb_resume_wait = USB_RESUME_WAIT; +unsigned int usb_resume_recovery = USB_RESUME_RECOVERY; +unsigned int usb_extra_power_up_time = USB_EXTRA_POWER_UP_TIME; + +/*------------------------------------------------------------------------* + * usb_timings_sysctl_handler + * + * This function updates timings variables, adjusting them where necessary. + *------------------------------------------------------------------------*/ +static int usb_timings_sysctl_handler(SYSCTL_HANDLER_ARGS) +{ + int error = 0; + unsigned int val; + + /* + * Attempt to get a coherent snapshot by making a copy of the data. + */ + if (arg1) + val = *(unsigned int *)arg1; + else + val = arg2; + error = SYSCTL_OUT(req, &val, sizeof(int)); + if (error || !req->newptr) + return (error); + + if (!arg1) + return EPERM; + + error = SYSCTL_IN(req, &val, sizeof(unsigned int)); + if (error) + return (error); + + /* + * Now make sure the values are decent, and certainly no lower than + * what the USB spec prescribes. + */ + unsigned int *p = (unsigned int *)arg1; + if (p == &usb_port_reset_delay) { + if (val < USB_PORT_RESET_DELAY_SPEC) + return (EINVAL); + } else if (p == &usb_port_root_reset_delay) { + if (val < USB_PORT_ROOT_RESET_DELAY_SPEC) + return (EINVAL); + } else if (p == &usb_port_reset_recovery) { + if (val < USB_PORT_RESET_RECOVERY_SPEC) + return (EINVAL); + } else if (p == &usb_port_powerup_delay) { + if (val < USB_PORT_POWERUP_DELAY_SPEC) + return (EINVAL); + } else if (p == &usb_port_resume_delay) { + if (val < USB_PORT_RESUME_DELAY_SPEC) + return (EINVAL); + } else if (p == &usb_set_address_settle) { + if (val < USB_SET_ADDRESS_SETTLE_SPEC) + return (EINVAL); + } else if (p == &usb_resume_delay) { + if (val < USB_RESUME_DELAY_SPEC) + return (EINVAL); + } else if (p == &usb_resume_wait) { + if (val < USB_RESUME_WAIT_SPEC) + return (EINVAL); + } else if (p == &usb_resume_recovery) { + if (val < USB_RESUME_RECOVERY_SPEC) + return (EINVAL); + } else if (p == &usb_extra_power_up_time) { + if (val < USB_EXTRA_POWER_UP_TIME_SPEC) + return (EINVAL); + } else { + /* noop */ + } + + *p = val; + return 0; +} +#endif Modified: head/sys/dev/usb/usb_debug.h ============================================================================== --- head/sys/dev/usb/usb_debug.h Wed Oct 24 06:10:09 2012 (r241986) +++ head/sys/dev/usb/usb_debug.h Wed Oct 24 07:23:29 2012 (r241987) @@ -59,4 +59,28 @@ void usb_dump_queue(struct usb_endpoint void usb_dump_endpoint(struct usb_endpoint *ep); void usb_dump_xfer(struct usb_xfer *xfer); +#ifdef USB_DEBUG +extern unsigned int usb_port_reset_delay; +extern unsigned int usb_port_root_reset_delay; +extern unsigned int usb_port_reset_recovery; +extern unsigned int usb_port_powerup_delay; +extern unsigned int usb_port_resume_delay; +extern unsigned int usb_set_address_settle; +extern unsigned int usb_resume_delay; +extern unsigned int usb_resume_wait; +extern unsigned int usb_resume_recovery; +extern unsigned int usb_extra_power_up_time; +#else +#define usb_port_reset_delay USB_PORT_RESET_DELAY +#define usb_port_root_reset_delay USB_PORT_ROOT_RESET_DELAY +#define usb_port_reset_recovery USB_PORT_RESET_RECOVERY +#define usb_port_powerup_delay USB_PORT_POWERUP_DELAY +#define usb_port_resume_delay USB_PORT_RESUME_DELAY +#define usb_set_address_settle USB_SET_ADDRESS_SETTLE +#define usb_resume_delay USB_RESUME_DELAY +#define usb_resume_wait USB_RESUME_WAIT +#define usb_resume_recovery USB_RESUME_RECOVERY +#define usb_extra_power_up_time USB_EXTRA_POWER_UP_TIME +#endif + #endif /* _USB_DEBUG_H_ */ Modified: head/sys/dev/usb/usb_hub.c ============================================================================== --- head/sys/dev/usb/usb_hub.c Wed Oct 24 06:10:09 2012 (r241986) +++ head/sys/dev/usb/usb_hub.c Wed Oct 24 07:23:29 2012 (r241987) @@ -414,7 +414,7 @@ repeat: /* wait for maximum device power up time */ usb_pause_mtx(NULL, - USB_MS_TO_TICKS(USB_PORT_POWERUP_DELAY)); + USB_MS_TO_TICKS(usb_port_powerup_delay)); /* reset port, which implies enabling it */ @@ -978,7 +978,7 @@ uhub_attach(device_t dev) /* get power delay */ pwrdly = ((hubdesc20.bPwrOn2PwrGood * UHD_PWRON_FACTOR) + - USB_EXTRA_POWER_UP_TIME); + usb_extra_power_up_time); /* get complete HUB descriptor */ if (nports >= 8) { @@ -1023,7 +1023,7 @@ uhub_attach(device_t dev) /* get power delay */ pwrdly = ((hubdesc30.bPwrOn2PwrGood * UHD_PWRON_FACTOR) + - USB_EXTRA_POWER_UP_TIME); + usb_extra_power_up_time); /* get complete HUB descriptor */ if (nports >= 8) { @@ -1052,7 +1052,7 @@ uhub_attach(device_t dev) /* default number of ports */ nports = 1; /* default power delay */ - pwrdly = ((10 * UHD_PWRON_FACTOR) + USB_EXTRA_POWER_UP_TIME); + pwrdly = ((10 * UHD_PWRON_FACTOR) + usb_extra_power_up_time); break; } if (nports == 0) { @@ -2262,7 +2262,7 @@ usb_dev_resume_peer(struct usb_device *u } /* resume settle time */ - usb_pause_mtx(NULL, USB_MS_TO_TICKS(USB_PORT_RESUME_DELAY)); + usb_pause_mtx(NULL, USB_MS_TO_TICKS(usb_port_resume_delay)); if (bus->methods->device_resume != NULL) { /* resume USB device on the USB controller */ @@ -2415,7 +2415,7 @@ repeat: NULL, udev->port_no, UHF_PORT_SUSPEND); /* resume settle time */ - usb_pause_mtx(NULL, USB_MS_TO_TICKS(USB_PORT_RESUME_DELAY)); + usb_pause_mtx(NULL, USB_MS_TO_TICKS(usb_port_resume_delay)); } DPRINTF("Suspend was cancelled!\n"); return; Modified: head/sys/dev/usb/usb_request.c ============================================================================== --- head/sys/dev/usb/usb_request.c Wed Oct 24 06:10:09 2012 (r241986) +++ head/sys/dev/usb/usb_request.c Wed Oct 24 07:23:29 2012 (r241987) @@ -73,14 +73,6 @@ SYSCTL_INT(_hw_usb, OID_AUTO, no_cs_fail &usb_no_cs_fail, 0, "USB clear stall failures are ignored, if set"); #ifdef USB_DEBUG -static int usb_pr_poll_delay = USB_PORT_RESET_DELAY; -static int usb_pr_recovery_delay = USB_PORT_RESET_RECOVERY; - -SYSCTL_INT(_hw_usb, OID_AUTO, pr_poll_delay, CTLFLAG_RW, - &usb_pr_poll_delay, 0, "USB port reset poll delay in ms"); -SYSCTL_INT(_hw_usb, OID_AUTO, pr_recovery_delay, CTLFLAG_RW, - &usb_pr_recovery_delay, 0, "USB port reset recovery delay in ms"); - #ifdef USB_REQ_DEBUG /* The following structures are used in connection to fault injection. */ struct usb_ctrl_debug { @@ -791,12 +783,6 @@ usbd_req_reset_port(struct usb_device *u uint16_t status; uint16_t change; -#ifdef USB_DEBUG - uint16_t pr_poll_delay; - uint16_t pr_recovery_delay; - -#endif - DPRINTF("\n"); /* clear any leftover port reset changes first */ @@ -811,29 +797,12 @@ usbd_req_reset_port(struct usb_device *u if (err) goto done; #ifdef USB_DEBUG - /* range check input parameters */ - pr_poll_delay = usb_pr_poll_delay; - if (pr_poll_delay < 1) { - pr_poll_delay = 1; - } else if (pr_poll_delay > 1000) { - pr_poll_delay = 1000; - } - pr_recovery_delay = usb_pr_recovery_delay; - if (pr_recovery_delay > 1000) { - pr_recovery_delay = 1000; - } #endif n = 0; while (1) { -#ifdef USB_DEBUG - /* wait for the device to recover from reset */ - usb_pause_mtx(mtx, USB_MS_TO_TICKS(pr_poll_delay)); - n += pr_poll_delay; -#else /* wait for the device to recover from reset */ - usb_pause_mtx(mtx, USB_MS_TO_TICKS(USB_PORT_RESET_DELAY)); - n += USB_PORT_RESET_DELAY; -#endif + usb_pause_mtx(mtx, USB_MS_TO_TICKS(usb_port_reset_delay)); + n += usb_port_reset_delay; err = usbd_req_get_port_status(udev, mtx, &ps, port); if (err) goto done; @@ -875,13 +844,8 @@ usbd_req_reset_port(struct usb_device *u err = USB_ERR_TIMEOUT; goto done; } -#ifdef USB_DEBUG - /* wait for the device to recover from reset */ - usb_pause_mtx(mtx, USB_MS_TO_TICKS(pr_recovery_delay)); -#else /* wait for the device to recover from reset */ - usb_pause_mtx(mtx, USB_MS_TO_TICKS(USB_PORT_RESET_RECOVERY)); -#endif + usb_pause_mtx(mtx, USB_MS_TO_TICKS(usb_port_reset_recovery)); done: DPRINTFN(2, "port %d reset returning error=%s\n", @@ -912,12 +876,6 @@ usbd_req_warm_reset_port(struct usb_devi uint16_t status; uint16_t change; -#ifdef USB_DEBUG - uint16_t pr_poll_delay; - uint16_t pr_recovery_delay; - -#endif - DPRINTF("\n"); err = usbd_req_get_port_status(udev, mtx, &ps, port); @@ -947,30 +905,11 @@ usbd_req_warm_reset_port(struct usb_devi if (err) goto done; -#ifdef USB_DEBUG - /* range check input parameters */ - pr_poll_delay = usb_pr_poll_delay; - if (pr_poll_delay < 1) { - pr_poll_delay = 1; - } else if (pr_poll_delay > 1000) { - pr_poll_delay = 1000; - } - pr_recovery_delay = usb_pr_recovery_delay; - if (pr_recovery_delay > 1000) { - pr_recovery_delay = 1000; - } -#endif n = 0; while (1) { -#ifdef USB_DEBUG - /* wait for the device to recover from reset */ - usb_pause_mtx(mtx, USB_MS_TO_TICKS(pr_poll_delay)); - n += pr_poll_delay; -#else /* wait for the device to recover from reset */ - usb_pause_mtx(mtx, USB_MS_TO_TICKS(USB_PORT_RESET_DELAY)); - n += USB_PORT_RESET_DELAY; -#endif + usb_pause_mtx(mtx, USB_MS_TO_TICKS(usb_port_reset_delay)); + n += usb_port_reset_delay; err = usbd_req_get_port_status(udev, mtx, &ps, port); if (err) goto done; @@ -1004,13 +943,8 @@ usbd_req_warm_reset_port(struct usb_devi err = USB_ERR_TIMEOUT; goto done; } -#ifdef USB_DEBUG - /* wait for the device to recover from reset */ - usb_pause_mtx(mtx, USB_MS_TO_TICKS(pr_recovery_delay)); -#else /* wait for the device to recover from reset */ - usb_pause_mtx(mtx, USB_MS_TO_TICKS(USB_PORT_RESET_RECOVERY)); -#endif + usb_pause_mtx(mtx, USB_MS_TO_TICKS(usb_port_reset_recovery)); done: DPRINTFN(2, "port %d warm reset returning error=%s\n", @@ -1569,7 +1503,7 @@ usbd_req_set_address(struct usb_device * done: /* allow device time to set new address */ usb_pause_mtx(mtx, - USB_MS_TO_TICKS(USB_SET_ADDRESS_SETTLE)); + USB_MS_TO_TICKS(usb_set_address_settle)); return (err); } From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 08:00: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 67520D71; Wed, 24 Oct 2012 08:00:02 +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 368258FC14; Wed, 24 Oct 2012 08:00: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 q9O802Dn070260; Wed, 24 Oct 2012 08:00:02 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9O801cm070256; Wed, 24 Oct 2012 08:00:01 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201210240800.q9O801cm070256@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 24 Oct 2012 08:00:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241988 - head/sys/dev/sound/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 08:00:02 -0000 Author: hselasky Date: Wed Oct 24 08:00:01 2012 New Revision: 241988 URL: http://svn.freebsd.org/changeset/base/241988 Log: Fix USB audio specification compliance by filtering which descriptors can appear on which interface. This fixes detection of some USB audio adapters. Also increase the channel limit for FULL speed devices to 4 channels. Tested by: gavin MFC after: 1 week Modified: head/sys/dev/sound/usb/uaudio.c Modified: head/sys/dev/sound/usb/uaudio.c ============================================================================== --- head/sys/dev/sound/usb/uaudio.c Wed Oct 24 07:23:29 2012 (r241987) +++ head/sys/dev/sound/usb/uaudio.c Wed Oct 24 08:00:01 2012 (r241988) @@ -1054,13 +1054,20 @@ uaudio_chan_fill_info_sub(struct uaudio_ sed.v1 = NULL; } - if ((acdp == NULL) && - (desc->bDescriptorType == UDESC_CS_INTERFACE) && - (desc->bDescriptorSubtype == AS_GENERAL) && - (desc->bDescriptorSubtype == UDESCSUB_AC_HEADER) && - (desc->bLength >= sizeof(*acdp))) { - acdp = (void *)desc; - audio_rev = UGETW(acdp->bcdADC); + if (audio_if == 0) { + if ((acdp == NULL) && + (desc->bDescriptorType == UDESC_CS_INTERFACE) && + (desc->bDescriptorSubtype == UDESCSUB_AC_HEADER) && + (desc->bLength >= sizeof(*acdp))) { + acdp = (void *)desc; + audio_rev = UGETW(acdp->bcdADC); + } + + /* + * Don't collect any USB audio descriptors if + * this is not an USB audio stream interface. + */ + continue; } if ((acdp != NULL) && @@ -1132,9 +1139,8 @@ uaudio_chan_fill_info_sub(struct uaudio_ sed.v1 = (void *)desc; } } - if (audio_if == 0 || asid.v1 == NULL || - asf1d.v1 == NULL || ed1 == NULL || - sed.v1 == NULL) { + if (asid.v1 == NULL || asf1d.v1 == NULL || + ed1 == NULL || sed.v1 == NULL) { /* need more descriptors */ continue; } @@ -1349,7 +1355,7 @@ uaudio_chan_fill_info(struct uaudio_soft * disable surround setups on FULL-speed USB * by default */ - channels = 2; + channels = 4; break; default: channels = 16; From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 09:32: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 ED387EC0; Wed, 24 Oct 2012 09:32:34 +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 D4E1F8FC0A; Wed, 24 Oct 2012 09:32: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 q9O9WY2k085002; Wed, 24 Oct 2012 09:32:34 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9O9WYfW085000; Wed, 24 Oct 2012 09:32:34 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210240932.q9O9WYfW085000@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 24 Oct 2012 09:32:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241989 - stable/9/sys/dev/sound/pci X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 09:32:35 -0000 Author: glebius Date: Wed Oct 24 09:32:34 2012 New Revision: 241989 URL: http://svn.freebsd.org/changeset/base/241989 Log: Merge r237975 from head: - Call bus_generic_attach() at end of hdspe_attach(). - Use own devclass_t in DRIVER_MODULE(). This fixes operation of hdspe(4) when built as loadable module. Submitted by: Ruslan Bukin
Modified: stable/9/sys/dev/sound/pci/hdspe.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/pci/hdspe.c ============================================================================== --- stable/9/sys/dev/sound/pci/hdspe.c Wed Oct 24 08:00:01 2012 (r241988) +++ stable/9/sys/dev/sound/pci/hdspe.c Wed Oct 24 09:32:34 2012 (r241989) @@ -347,7 +347,7 @@ hdspe_attach(device_t dev) hdspe_map_dmabuf(sc); - return 0; + return (bus_generic_attach(dev)); } static void @@ -407,4 +407,6 @@ static driver_t hdspe_driver = { PCM_SOFTC_SIZE, }; -DRIVER_MODULE(snd_hdspe, pci, hdspe_driver, pcm_devclass, 0, 0); +static devclass_t hdspe_devclass; + +DRIVER_MODULE(snd_hdspe, pci, hdspe_driver, hdspe_devclass, 0, 0); From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 09:39:08 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 0DAB7202; Wed, 24 Oct 2012 09:39:08 +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 E9BB68FC08; Wed, 24 Oct 2012 09:39: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 q9O9d7Xa086114; Wed, 24 Oct 2012 09:39:07 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9O9d7ml086112; Wed, 24 Oct 2012 09:39:07 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210240939.q9O9d7ml086112@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 24 Oct 2012 09:39:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241990 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 09:39:08 -0000 Author: glebius Date: Wed Oct 24 09:39:07 2012 New Revision: 241990 URL: http://svn.freebsd.org/changeset/base/241990 Log: Merge 239090 from head: Add supported device. Modified: stable/9/share/man/man4/umodem.4 Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/umodem.4 ============================================================================== --- stable/9/share/man/man4/umodem.4 Wed Oct 24 09:32:34 2012 (r241989) +++ stable/9/share/man/man4/umodem.4 Wed Oct 24 09:39:07 2012 (r241990) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 22, 2006 +.Dd August 6, 2012 .Dt UMODEM 4 .Os .Sh NAME @@ -90,6 +90,8 @@ Yamaha Broadband Wireless Router RTW65b ELSA MicroLink 56k USB modem .It Sony Ericsson W810i phone +.It +Sonim XP5300 Force .El .Sh SEE ALSO .Xr tty 4 , From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 09:46: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 53E9E48B; Wed, 24 Oct 2012 09:46:53 +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 216748FC12; Wed, 24 Oct 2012 09:46: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 q9O9kqVd087356; Wed, 24 Oct 2012 09:46:52 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9O9kqok087354; Wed, 24 Oct 2012 09:46:52 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210240946.q9O9kqok087354@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 24 Oct 2012 09:46:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241991 - stable/9/usr.sbin/arp X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 09:46:53 -0000 Author: glebius Date: Wed Oct 24 09:46:52 2012 New Revision: 241991 URL: http://svn.freebsd.org/changeset/base/241991 Log: Merge r240072 from head: Explicitly document all variables in the net.link.ether.inet MIB. Modified: stable/9/usr.sbin/arp/arp.4 Directory Properties: stable/9/usr.sbin/arp/ (props changed) Modified: stable/9/usr.sbin/arp/arp.4 ============================================================================== --- stable/9/usr.sbin/arp/arp.4 Wed Oct 24 09:39:07 2012 (r241990) +++ stable/9/usr.sbin/arp/arp.4 Wed Oct 24 09:46:52 2012 (r241991) @@ -28,7 +28,7 @@ .\" @(#)arp4.4 6.5 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd March 28, 2007 +.Dd September 3, 2012 .Dt ARP 4 .Os .Sh NAME @@ -119,20 +119,53 @@ branch of the .Xr sysctl 3 MIB. -.Bl -tag +.Bl -tag -width "log_arp_permanent_modify" +.It Va log_arp_movements +Should the kernel log movements of IP addresses from one hardware +address to an other. +See +.Sx DIAGNOSTICS +below. +Turned on by default. +.It Va log_arp_permanent_modify +Should the kernel log attempts of remote host on network to modify a +permanent ARP entry. +See +.Sx DIAGNOSTICS +below. +Turned on by default. +.It Va log_arp_wrong_iface +Should the kernel log attempts to insert an ARP entry on an interface +when the IP network the address belongs to is connected to an other +interface. +See +.Sx DIAGNOSTICS +below. +Turned on by default. .It Va max_age How long an ARP entry is held in the cache until it needs to be refreshed. +Default is 1200 seconds. +.It Va maxhold +How many packets hold in the per-entry output queue while the entry +is being resolved. +Default is one packet. .It Va maxtries Number of retransmits before host is considered down and error is returned. +Default is 5 tries. +.It Va proxyall +Enables ARP proxying for all hosts on net. +Turned off by default. .It Va useloopback If an ARP entry is added for local address, force the traffic to go through the loopback interface. -.It Va proxyall -Enables ARP proxying for all hosts on net. +Turned on by default. +.It Va wait +Lifetime of an incomplete ARP entry. +Default is 20 seconds. .El .Sh DIAGNOSTICS .Bl -diag -.It "arp: %x:%x:%x:%x:%x:%x is using my IP address %d.%d.%d.%d!" +.It "arp: %x:%x:%x:%x:%x:%x is using my IP address %d.%d.%d.%d on %s!" ARP has discovered another host on the local network which responds to mapping requests for its own Internet address with a different Ethernet address, generally indicating that two hosts are attempting to use the From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 09:53: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 BE32985A; Wed, 24 Oct 2012 09:53:34 +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 9C8AD8FC0A; Wed, 24 Oct 2012 09:53: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 q9O9rYYr088467; Wed, 24 Oct 2012 09:53:34 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9O9rYJd088464; Wed, 24 Oct 2012 09:53:34 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210240953.q9O9rYJd088464@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 24 Oct 2012 09:53:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241992 - in stable/9: sys/netinet usr.sbin/arp X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 09:53:34 -0000 Author: glebius Date: Wed Oct 24 09:53:34 2012 New Revision: 241992 URL: http://svn.freebsd.org/changeset/base/241992 Log: Merge 240073 from head: Provide a sysctl switch that allows to install ARP entries with multicast bit set. FreeBSD refuses to install such entries since 9.0, and this broke installations running Microsoft NLB, which are violating standards. Tested by: Tarasov Oleg Modified: stable/9/sys/netinet/if_ether.c stable/9/usr.sbin/arp/arp.4 Directory Properties: stable/9/sys/ (props changed) stable/9/usr.sbin/arp/ (props changed) Modified: stable/9/sys/netinet/if_ether.c ============================================================================== --- stable/9/sys/netinet/if_ether.c Wed Oct 24 09:46:52 2012 (r241991) +++ stable/9/sys/netinet/if_ether.c Wed Oct 24 09:53:34 2012 (r241992) @@ -481,6 +481,7 @@ arpintr(struct mbuf *m) static int log_arp_wrong_iface = 1; static int log_arp_movements = 1; static int log_arp_permanent_modify = 1; +static int allow_multicast = 0; SYSCTL_INT(_net_link_ether_inet, OID_AUTO, log_arp_wrong_iface, CTLFLAG_RW, &log_arp_wrong_iface, 0, @@ -491,7 +492,8 @@ SYSCTL_INT(_net_link_ether_inet, OID_AUT SYSCTL_INT(_net_link_ether_inet, OID_AUTO, log_arp_permanent_modify, CTLFLAG_RW, &log_arp_permanent_modify, 0, "log arp replies from MACs different than the one in the permanent arp entry"); - +SYSCTL_INT(_net_link_ether_inet, OID_AUTO, allow_multicast, CTLFLAG_RW, + &allow_multicast, 0, "accept multicast addresses"); static void in_arpinput(struct mbuf *m) @@ -536,8 +538,8 @@ in_arpinput(struct mbuf *m) return; } - if (ETHER_IS_MULTICAST(ar_sha(ah))) { - log(LOG_NOTICE, "in_arp: %*D is multicast\n", + if (allow_multicast == 0 && ETHER_IS_MULTICAST(ar_sha(ah))) { + log(LOG_NOTICE, "arp: %*D is multicast\n", ifp->if_addrlen, (u_char *)ar_sha(ah), ":"); return; } Modified: stable/9/usr.sbin/arp/arp.4 ============================================================================== --- stable/9/usr.sbin/arp/arp.4 Wed Oct 24 09:46:52 2012 (r241991) +++ stable/9/usr.sbin/arp/arp.4 Wed Oct 24 09:53:34 2012 (r241992) @@ -120,6 +120,12 @@ of the .Xr sysctl 3 MIB. .Bl -tag -width "log_arp_permanent_modify" +.It Va allow_multicast +Should the kernel install ARP entries with multicast bit set in +the hardware address. +Installing such entries is RFC 1812 violation, but some prorietary +load balancing techniques require routers on network to do so. +Turned off by default. .It Va log_arp_movements Should the kernel log movements of IP addresses from one hardware address to an other. @@ -203,6 +209,11 @@ entry in the local ARP table. This error will only be logged if the sysctl .Va net.link.ether.inet.log_arp_permanent_modify is set to 1, which is the system's default behaviour. +.It "arp: %x:%x:%x:%x:%x:%x is multicast" +Kernel refused to install an entry with multicast hardware address. +If you really want such addresses being installed, set the sysctl +.Va net.link.ether.inet.allow_multicast +to a positive value. .El .Sh SEE ALSO .Xr inet 4 , From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 10:14: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 312EBEDC; Wed, 24 Oct 2012 10:14:22 +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 197D38FC08; Wed, 24 Oct 2012 10:14: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 q9OAELfm092591; Wed, 24 Oct 2012 10:14:21 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9OAELXn092589; Wed, 24 Oct 2012 10:14:21 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210241014.q9OAELXn092589@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 24 Oct 2012 10:14:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241993 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 10:14:22 -0000 Author: glebius Date: Wed Oct 24 10:14:21 2012 New Revision: 241993 URL: http://svn.freebsd.org/changeset/base/241993 Log: Merge r240214 from head: Supply the pr_ctloutput method for local datagram sockets, so that setsockopt() and getsockopt() work on them. This makes 'tools/regression/sockets/unix_cmsg -t dgram' more successful. Modified: stable/9/sys/kern/uipc_usrreq.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/uipc_usrreq.c ============================================================================== --- stable/9/sys/kern/uipc_usrreq.c Wed Oct 24 09:53:34 2012 (r241992) +++ stable/9/sys/kern/uipc_usrreq.c Wed Oct 24 10:14:21 2012 (r241993) @@ -305,6 +305,7 @@ static struct protosw localsw[] = { .pr_type = SOCK_DGRAM, .pr_domain = &localdomain, .pr_flags = PR_ATOMIC|PR_ADDR|PR_RIGHTS, + .pr_ctloutput = &uipc_ctloutput, .pr_usrreqs = &uipc_usrreqs_dgram }, { From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 10:28: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 51560157; Wed, 24 Oct 2012 10:28:13 +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 37FC98FC0A; Wed, 24 Oct 2012 10:28: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 q9OASDAi094681; Wed, 24 Oct 2012 10:28:13 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9OASCoV094677; Wed, 24 Oct 2012 10:28:12 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210241028.q9OASCoV094677@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 24 Oct 2012 10:28:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241994 - stable/9/contrib/bsnmp/snmpd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 10:28:13 -0000 Author: glebius Date: Wed Oct 24 10:28:12 2012 New Revision: 241994 URL: http://svn.freebsd.org/changeset/base/241994 Log: Merge r240234, r240271, r240734 from head: r240234: The first part of check_priv() function, that attempts to obtain creds from the control message, actually never worked. This means check_priv() didn't work for local dgram sockets. The SCM_CREDS control messages is received only in two cases: 1) If we did setsockopt(LOCAL_CREDS) on our socket, and in this case the message is struct sockcred. 2) If sender did supplied SCM_CREDS control message in his sendmsg() syscall. In this case the message is struct cmsgcred. We can't rely on 2), so we will use 1) for dgram sockets. For stream sockets it is more reliable to obtain accept-time credentials, since SCM_CREDS control message is attached only on first read. Thus: o Do setsockopt(LOCAL_CREDS) on local dgram sockets. o Split check_priv() into check_priv_stream() and check_priv_dgram(), and call them from recv_stream() and recv_dgram() respectively. o Don't provide space for SCM_CREDS control message in recv_stream(). o Provide space for SCM_CREDS control message in recv_dgram(), but there is no need to initialize anything in it. o In recv_dgram() do not blindly expect that first message is SCM_CREDS, instead use correct search cycle through control messages. r240271: For UDP transport set IP_RECVDSTADDR sockopt on the socket, and provide IP_SENDSRCADDR control with datagram message we reply with. This makes bsnmpd reply from exactly same address that request was sent to, thus successfully bypassing stateful firewalls or other kinds of strict checking. r240734: Re-do r240271: - Set IP_RECVDSTADDR sockopt on the socket only in case if it is INADDR_ANY bound. - Supply IP_SENDSRCADDR control message only if we did receive IP_RECVDSTADDR control message. This fixes operation of snmpd bound to a specific local IP address. PR: bin/171279 Modified: stable/9/contrib/bsnmp/snmpd/main.c stable/9/contrib/bsnmp/snmpd/trans_lsock.c stable/9/contrib/bsnmp/snmpd/trans_udp.c Directory Properties: stable/9/contrib/bsnmp/ (props changed) Modified: stable/9/contrib/bsnmp/snmpd/main.c ============================================================================== --- stable/9/contrib/bsnmp/snmpd/main.c Wed Oct 24 10:14:21 2012 (r241993) +++ stable/9/contrib/bsnmp/snmpd/main.c Wed Oct 24 10:28:12 2012 (r241994) @@ -1026,34 +1026,31 @@ snmp_input_consume(struct port_input *pi pi->length -= pi->consumed; } -struct credmsg { - struct cmsghdr hdr; - struct cmsgcred cred; -}; +static void +check_priv_dgram(struct port_input *pi, struct sockcred *cred) +{ + + /* process explicitly sends credentials */ + if (cred) + pi->priv = (cred->sc_euid == 0); + else + pi->priv = 0; +} static void -check_priv(struct port_input *pi, struct msghdr *msg) +check_priv_stream(struct port_input *pi) { - struct credmsg *cmsg; struct xucred ucred; socklen_t ucredlen; - pi->priv = 0; - - if (msg->msg_controllen == sizeof(*cmsg)) { - /* process explicitly sends credentials */ - - cmsg = (struct credmsg *)msg->msg_control; - pi->priv = (cmsg->cred.cmcred_euid == 0); - return; - } - - /* ok, obtain the accept time credentials */ + /* obtain the accept time credentials */ ucredlen = sizeof(ucred); if (getsockopt(pi->fd, 0, LOCAL_PEERCRED, &ucred, &ucredlen) == 0 && ucredlen >= sizeof(ucred) && ucred.cr_version == XUCRED_VERSION) pi->priv = (ucred.cr_uid == 0); + else + pi->priv = 0; } /* @@ -1065,7 +1062,6 @@ recv_stream(struct port_input *pi) struct msghdr msg; struct iovec iov[1]; ssize_t len; - struct credmsg cmsg; if (pi->buf == NULL) { /* no buffer yet - allocate one */ @@ -1084,17 +1080,8 @@ recv_stream(struct port_input *pi) msg.msg_namelen = pi->peerlen; msg.msg_iov = iov; msg.msg_iovlen = 1; - if (pi->cred) { - msg.msg_control = &cmsg; - msg.msg_controllen = sizeof(cmsg); - - cmsg.hdr.cmsg_len = sizeof(cmsg); - cmsg.hdr.cmsg_level = SOL_SOCKET; - cmsg.hdr.cmsg_type = SCM_CREDS; - } else { - msg.msg_control = NULL; - msg.msg_controllen = 0; - } + msg.msg_control = NULL; + msg.msg_controllen = 0; msg.msg_flags = 0; iov[0].iov_base = pi->buf + pi->length; @@ -1109,7 +1096,7 @@ recv_stream(struct port_input *pi) pi->length += len; if (pi->cred) - check_priv(pi, &msg); + check_priv_stream(pi); return (0); } @@ -1119,13 +1106,16 @@ recv_stream(struct port_input *pi) * Each receive should return one datagram. */ static int -recv_dgram(struct port_input *pi) +recv_dgram(struct port_input *pi, struct in_addr *laddr) { u_char embuf[1000]; + char cbuf[CMSG_SPACE(SOCKCREDSIZE(CMGROUP_MAX)) + + CMSG_SPACE(sizeof(struct in_addr))]; struct msghdr msg; struct iovec iov[1]; ssize_t len; - struct credmsg cmsg; + struct cmsghdr *cmsg; + struct sockcred *cred = NULL; if (pi->buf == NULL) { /* no buffer yet - allocate one */ @@ -1145,17 +1135,9 @@ recv_dgram(struct port_input *pi) msg.msg_namelen = pi->peerlen; msg.msg_iov = iov; msg.msg_iovlen = 1; - if (pi->cred) { - msg.msg_control = &cmsg; - msg.msg_controllen = sizeof(cmsg); - - cmsg.hdr.cmsg_len = sizeof(cmsg); - cmsg.hdr.cmsg_level = SOL_SOCKET; - cmsg.hdr.cmsg_type = SCM_CREDS; - } else { - msg.msg_control = NULL; - msg.msg_controllen = 0; - } + memset(cbuf, 0, sizeof(cbuf)); + msg.msg_control = cbuf; + msg.msg_controllen = sizeof(cbuf); msg.msg_flags = 0; iov[0].iov_base = pi->buf; @@ -1176,8 +1158,18 @@ recv_dgram(struct port_input *pi) pi->length = (size_t)len; + for (cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL; + cmsg = CMSG_NXTHDR(&msg, cmsg)) { + if (cmsg->cmsg_level == IPPROTO_IP && + cmsg->cmsg_type == IP_RECVDSTADDR) + memcpy(laddr, CMSG_DATA(cmsg), sizeof(struct in_addr)); + if (cmsg->cmsg_level == SOL_SOCKET && + cmsg->cmsg_type == SCM_CREDS) + cred = (struct sockcred *)CMSG_DATA(cmsg); + } + if (pi->cred) - check_priv(pi, &msg); + check_priv_dgram(pi, cred); return (0); } @@ -1199,12 +1191,35 @@ snmpd_input(struct port_input *pi, struc #ifdef USE_TCPWRAPPERS char client[16]; #endif + struct msghdr msg; + struct iovec iov[1]; + char cbuf[CMSG_SPACE(sizeof(struct in_addr))]; + struct cmsghdr *cmsgp; /* get input depending on the transport */ if (pi->stream) { + msg.msg_control = NULL; + msg.msg_controllen = 0; + ret = recv_stream(pi); } else { - ret = recv_dgram(pi); + struct in_addr *laddr; + + memset(cbuf, 0, CMSG_SPACE(sizeof(struct in_addr))); + msg.msg_control = cbuf; + msg.msg_controllen = CMSG_SPACE(sizeof(struct in_addr)); + cmsgp = CMSG_FIRSTHDR(&msg); + cmsgp->cmsg_len = CMSG_LEN(sizeof(struct in_addr)); + cmsgp->cmsg_level = IPPROTO_IP; + cmsgp->cmsg_type = IP_SENDSRCADDR; + laddr = (struct in_addr *)CMSG_DATA(cmsgp); + + ret = recv_dgram(pi, laddr); + + if (laddr->s_addr == 0) { + msg.msg_control = NULL; + msg.msg_controllen = 0; + } } if (ret == -1) @@ -1349,11 +1364,19 @@ snmpd_input(struct port_input *pi, struc sndbuf, &sndlen, "SNMP", ierr, vi, NULL); if (ferr == SNMPD_INPUT_OK) { - slen = sendto(pi->fd, sndbuf, sndlen, 0, pi->peer, pi->peerlen); + msg.msg_name = pi->peer; + msg.msg_namelen = pi->peerlen; + msg.msg_iov = iov; + msg.msg_iovlen = 1; + msg.msg_flags = 0; + iov[0].iov_base = sndbuf; + iov[0].iov_len = sndlen; + + slen = sendmsg(pi->fd, &msg, 0); if (slen == -1) - syslog(LOG_ERR, "sendto: %m"); + syslog(LOG_ERR, "sendmsg: %m"); else if ((size_t)slen != sndlen) - syslog(LOG_ERR, "sendto: short write %zu/%zu", + syslog(LOG_ERR, "sendmsg: short write %zu/%zu", sndlen, (size_t)slen); } snmp_pdu_free(&pdu); Modified: stable/9/contrib/bsnmp/snmpd/trans_lsock.c ============================================================================== --- stable/9/contrib/bsnmp/snmpd/trans_lsock.c Wed Oct 24 10:14:21 2012 (r241993) +++ stable/9/contrib/bsnmp/snmpd/trans_lsock.c Wed Oct 24 10:28:12 2012 (r241994) @@ -343,6 +343,7 @@ lsock_init_port(struct tport *tp) } } else { struct lsock_peer *peer; + const int on = 1; peer = LIST_FIRST(&p->peers); @@ -351,6 +352,14 @@ lsock_init_port(struct tport *tp) return (SNMP_ERR_RES_UNAVAIL); } + if (setsockopt(peer->input.fd, 0, LOCAL_CREDS, &on, + sizeof(on)) == -1) { + syslog(LOG_ERR, "setsockopt(LOCAL_CREDS): %m"); + close(peer->input.fd); + peer->input.fd = -1; + return (SNMP_ERR_GENERR); + } + strcpy(sa.sun_path, p->name); sa.sun_family = AF_LOCAL; sa.sun_len = strlen(p->name) + Modified: stable/9/contrib/bsnmp/snmpd/trans_udp.c ============================================================================== --- stable/9/contrib/bsnmp/snmpd/trans_udp.c Wed Oct 24 10:14:21 2012 (r241993) +++ stable/9/contrib/bsnmp/snmpd/trans_udp.c Wed Oct 24 10:28:12 2012 (r241994) @@ -103,6 +103,7 @@ udp_init_port(struct tport *tp) struct udp_port *p = (struct udp_port *)tp; struct sockaddr_in addr; u_int32_t ip; + const int on = 1; if ((p->input.fd = socket(PF_INET, SOCK_DGRAM, 0)) < 0) { syslog(LOG_ERR, "creating UDP socket: %m"); @@ -115,6 +116,14 @@ udp_init_port(struct tport *tp) addr.sin_port = htons(p->port); addr.sin_family = AF_INET; addr.sin_len = sizeof(addr); + if (addr.sin_addr.s_addr == INADDR_ANY && + setsockopt(p->input.fd, IPPROTO_IP, IP_RECVDSTADDR, &on, + sizeof(on)) == -1) { + syslog(LOG_ERR, "setsockopt(IP_RECVDSTADDR): %m"); + close(p->input.fd); + p->input.fd = -1; + return (SNMP_ERR_GENERR); + } if (bind(p->input.fd, (struct sockaddr *)&addr, sizeof(addr))) { if (errno == EADDRNOTAVAIL) { close(p->input.fd); From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 10:30: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 6DF302F1; Wed, 24 Oct 2012 10:30:41 +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 55C878FC08; Wed, 24 Oct 2012 10:30: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 q9OAUfvb095116; Wed, 24 Oct 2012 10:30:41 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9OAUfkQ095114; Wed, 24 Oct 2012 10:30:41 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210241030.q9OAUfkQ095114@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 24 Oct 2012 10:30:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241995 - stable/9/usr.sbin/bsnmpd/modules/snmp_hostres X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 10:30:41 -0000 Author: glebius Date: Wed Oct 24 10:30:40 2012 New Revision: 241995 URL: http://svn.freebsd.org/changeset/base/241995 Log: Merge r240354 from head: Do not count kernel threads as processes for hrSystemProcesses OID. PR: bin/160494 Submitted by: Jeremy Chadwick Modified: stable/9/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c Directory Properties: stable/9/usr.sbin/bsnmpd/modules/snmp_hostres/ (props changed) Modified: stable/9/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c ============================================================================== --- stable/9/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c Wed Oct 24 10:28:12 2012 (r241994) +++ stable/9/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c Wed Oct 24 10:30:40 2012 (r241995) @@ -238,7 +238,7 @@ OS_getSystemProcesses(uint32_t *proc_cou if (hr_kd == NULL) return (SNMP_ERR_GENERR); - if (kvm_getprocs(hr_kd, KERN_PROC_ALL, 0, &pc) == NULL) { + if (kvm_getprocs(hr_kd, KERN_PROC_PROC, 0, &pc) == NULL) { syslog(LOG_ERR, "kvm_getprocs failed: %m"); return (SNMP_ERR_GENERR); } From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 10:32: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 ED0B346A; Wed, 24 Oct 2012 10:32:39 +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 D5A0E8FC0A; Wed, 24 Oct 2012 10:32: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 q9OAWd4a095462; Wed, 24 Oct 2012 10:32:39 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9OAWdCD095460; Wed, 24 Oct 2012 10:32:39 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210241032.q9OAWdCD095460@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 24 Oct 2012 10:32:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241996 - stable/9/lib/libc/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 10:32:40 -0000 Author: glebius Date: Wed Oct 24 10:32:39 2012 New Revision: 241996 URL: http://svn.freebsd.org/changeset/base/241996 Log: Merge r240385 from head: Describe in detail required conditions for receiving the SCM_CREDS control message and suggest to use LOCAL_CREDS setsockopt() for reliability. Modified: stable/9/lib/libc/sys/recv.2 Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) Modified: stable/9/lib/libc/sys/recv.2 ============================================================================== --- stable/9/lib/libc/sys/recv.2 Wed Oct 24 10:30:40 2012 (r241995) +++ stable/9/lib/libc/sys/recv.2 Wed Oct 24 10:32:39 2012 (r241996) @@ -28,7 +28,7 @@ .\" @(#)recv.2 8.3 (Berkeley) 2/21/94 .\" $FreeBSD$ .\" -.Dd December 28, 2006 +.Dd September 12, 2012 .Dt RECV 2 .Os .Sh NAME @@ -252,8 +252,21 @@ struct cmsgcred { }; .Ed .Pp -The kernel will fill in the credential information of the sending process -and deliver it to the receiver. +If a sender supplies ancillary data with enough space for the above struct +tagged as +.Dv SCM_CREDS +control message type to the +.Fn sendmsg +system call, then kernel will fill in the credential information of the +sending process and deliver it to the receiver. +Since receiver usually has no control over a sender, this method of retrieving +credential information isn't reliable. +For reliable retrieval of remote side credentials it is advised to use the +.Dv LOCAL_CREDS +socket option on the receiving socket. +See +.Xr unix 4 +for details. .Pp The .Fa msg_flags @@ -322,7 +335,8 @@ address space. .Xr getsockopt 2 , .Xr read 2 , .Xr select 2 , -.Xr socket 2 +.Xr socket 2 , +.Xr unix 4 .Sh HISTORY The .Fn recv From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 10:36: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 9F8F070A; Wed, 24 Oct 2012 10:36:34 +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 882D88FC0A; Wed, 24 Oct 2012 10:36: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 q9OAaY5o096087; Wed, 24 Oct 2012 10:36:34 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9OAaYP2096085; Wed, 24 Oct 2012 10:36:34 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210241036.q9OAaYP2096085@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 24 Oct 2012 10:36:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241997 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 10:36:34 -0000 Author: glebius Date: Wed Oct 24 10:36:33 2012 New Revision: 241997 URL: http://svn.freebsd.org/changeset/base/241997 Log: Merge r240386, r240735 from head: Document conditions for IP_SENDSRCADDR socket option. Obtained from: r167342 commit message Modified: stable/9/share/man/man4/ip.4 Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/ip.4 ============================================================================== --- stable/9/share/man/man4/ip.4 Wed Oct 24 10:32:39 2012 (r241996) +++ stable/9/share/man/man4/ip.4 Wed Oct 24 10:36:33 2012 (r241997) @@ -32,7 +32,7 @@ .\" @(#)ip.4 8.2 (Berkeley) 11/30/93 .\" $FreeBSD$ .\" -.Dd June 12, 2012 +.Dd September 20, 2012 .Dt IP 4 .Os .Sh NAME @@ -172,9 +172,7 @@ cmsg_type = IP_RECVDSTADDR .Pp The source address to be used for outgoing .Tn UDP -datagrams on a socket that is not bound to a specific -.Tn IP -address can be specified as ancillary data with a type code of +datagrams on a socket can be specified as ancillary data with a type code of .Dv IP_SENDSRCADDR . The msg_control field in the msghdr structure should point to a buffer that contains a @@ -189,6 +187,20 @@ cmsg_level = IPPROTO_IP cmsg_type = IP_SENDSRCADDR .Ed .Pp +The socket should be either bound to +.Dv INADDR_ANY +and a local port, and the address supplied with +.Dv IP_SENDSRCADDR +should't be +.Dv INADDR_ANY , +or the socket should be bound to a local address and the address supplied with +.Dv IP_SENDSRCADDR +should be +.Dv INADDR_ANY . +In the latter case bound address is overriden via generic source address +selection logic, which would choose IP address of interface closest to +destination. +.Pp For convenience, .Dv IP_SENDSRCADDR is defined to have the same value as From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 10:44:08 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 8B867A04; Wed, 24 Oct 2012 10:44:08 +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 6E75A8FC08; Wed, 24 Oct 2012 10:44: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 q9OAi8t7097312; Wed, 24 Oct 2012 10:44:08 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9OAi80e097310; Wed, 24 Oct 2012 10:44:08 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210241044.q9OAi80e097310@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 24 Oct 2012 10:44:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241998 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 10:44:08 -0000 Author: glebius Date: Wed Oct 24 10:44:07 2012 New Revision: 241998 URL: http://svn.freebsd.org/changeset/base/241998 Log: Merge r241482, r241491 from head: Be more explicit on how "intact" incoming packets in raw sockets are. Modified: stable/9/share/man/man4/ip.4 Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/ip.4 ============================================================================== --- stable/9/share/man/man4/ip.4 Wed Oct 24 10:36:33 2012 (r241997) +++ stable/9/share/man/man4/ip.4 Wed Oct 24 10:44:07 2012 (r241998) @@ -32,7 +32,7 @@ .\" @(#)ip.4 8.2 (Berkeley) 11/30/93 .\" $FreeBSD$ .\" -.Dd September 20, 2012 +.Dd October 12, 2012 .Dt IP 4 .Os .Sh NAME @@ -763,7 +763,11 @@ unless the option has been set. Incoming packets are received with .Tn IP -header and options intact. +header and options intact, except for +.Va ip_len +and +.Va ip_off +fields converted to host byte order. .Pp .Dv IP_HDRINCL indicates the complete IP header is included with the data From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 12:49: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 9C5297B3; Wed, 24 Oct 2012 12:49: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 6966E8FC0C; Wed, 24 Oct 2012 12:49: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 q9OCn4DX016487; Wed, 24 Oct 2012 12:49:04 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9OCn4ng016485; Wed, 24 Oct 2012 12:49:04 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210241249.q9OCn4ng016485@svn.freebsd.org> From: Eitan Adler Date: Wed, 24 Oct 2012 12:49:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r241999 - head/usr.sbin/portsnap/portsnap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 12:49:04 -0000 Author: eadler Date: Wed Oct 24 12:49:03 2012 New Revision: 241999 URL: http://svn.freebsd.org/changeset/base/241999 Log: Avoid changing IFS in a global context as this can sometimes cause errors later on. PR: bin/172715 Submitted by: Matthew D.Fuller (older version) Submitted by: dteske Approved by: cperciva MFC after: 1 week Modified: head/usr.sbin/portsnap/portsnap/portsnap.sh Modified: head/usr.sbin/portsnap/portsnap/portsnap.sh ============================================================================== --- head/usr.sbin/portsnap/portsnap/portsnap.sh Wed Oct 24 10:44:07 2012 (r241998) +++ head/usr.sbin/portsnap/portsnap/portsnap.sh Wed Oct 24 12:49:03 2012 (r241999) @@ -587,7 +587,7 @@ fetch_metadata_sanity() { # Take a list of ${oldhash}|${newhash} and output a list of needed patches fetch_make_patchlist() { - IFS='|' + local IFS='|' echo "" 1>${QUIETREDIR} grep -vE "^([0-9a-f]{64})\|\1$" | while read X Y; do @@ -596,7 +596,6 @@ fetch_make_patchlist() { echo "${X}|${Y}" done echo "" 1>${QUIETREDIR} - IFS= } # Print user-friendly progress statistics @@ -711,7 +710,7 @@ fetch_update() { # Attempt to apply metadata patches echo -n "Applying metadata patches... " - IFS='|' + local oldifs="$IFS" IFS='|' while read X Y; do if [ ! -f "${X}-${Y}.gz" ]; then continue; fi gunzip -c < ${X}-${Y}.gz > diff @@ -725,7 +724,7 @@ fetch_update() { fi rm -f diff OLD NEW ${X}-${Y}.gz ptmp done < patchlist 2>${QUIETREDIR} - IFS= + IFS="$oldifs" echo "done." # Update metadata without patches @@ -792,7 +791,7 @@ fetch_update() { # Attempt to apply ports patches PATCHCNT=`wc -l patchlist` echo "Applying patches... " - IFS='|' + local oldifs="$IFS" IFS='|' I=0 while read X Y; do I=$(($I + 1)) @@ -810,7 +809,7 @@ fetch_update() { fi rm -f diff OLD NEW ${X}-${Y} done < patchlist 2>${QUIETREDIR} - IFS= + IFS="$oldifs" echo "done." # Update ports without patches @@ -912,7 +911,7 @@ extract_metadata() { # Do the actual work involved in "extract" extract_run() { - local IFS='|' + local oldifs="$IFS" IFS='|' mkdir -p ${PORTSDIR} || return 1 if ! @@ -948,6 +947,8 @@ extract_run() { return 0; fi + IFS="$oldifs" + extract_metadata extract_indices } From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 14:06: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 4796A747; Wed, 24 Oct 2012 14:06:48 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2FAAA8FC08; Wed, 24 Oct 2012 14:06: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 q9OE6mh6028796; Wed, 24 Oct 2012 14:06:48 GMT (envelope-from sjg@svn.freebsd.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9OE6lY0028794; Wed, 24 Oct 2012 14:06:47 GMT (envelope-from sjg@svn.freebsd.org) Message-Id: <201210241406.q9OE6lY0028794@svn.freebsd.org> From: "Simon J. Gerraty" Date: Wed, 24 Oct 2012 14:06:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242000 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 14:06:48 -0000 Author: sjg Date: Wed Oct 24 14:06:47 2012 New Revision: 242000 URL: http://svn.freebsd.org/changeset/base/242000 Log: Add entry for sjg Approved by: marcel (mentor) Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Wed Oct 24 12:49:03 2012 (r241999) +++ head/share/misc/committers-src.dot Wed Oct 24 14:06:47 2012 (r242000) @@ -247,6 +247,7 @@ scottl [label="Scott Long\nscottl@FreeBS sephe [label="Sepherosa Ziehau\nsephe@FreeBSD.org\n2007/03/28"] sepotvin [label="Stephane E. Potvin\nsepotvin@FreeBSD.org\n2007/02/15"] simon [label="Simon L. Nielsen\nsimon@FreeBSD.org\n2006/03/07"] +sjg [label="Simon J. Gerraty\nsjg@FreeBSD.org\n2012/10/23"] sobomax [label="Maxim Sobolev\nsobomax@FreeBSD.org\n2001/07/25"] sos [label="Soren Schmidt\nsos@FreeBSD.org\n????/??/??"] sson [label="Stacey Son\nsson@FreeBSD.org\n2008/07/08"] @@ -496,6 +497,7 @@ marcel -> art marcel -> arun marcel -> marius marcel -> nwhitehorn +marcel -> sjg markm -> jasone markm -> sheldonh From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 15:45: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 D244238A; Wed, 24 Oct 2012 15:45:26 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BAB888FC14; Wed, 24 Oct 2012 15:45: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 q9OFjQgJ044243; Wed, 24 Oct 2012 15:45:26 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9OFjQsw044241; Wed, 24 Oct 2012 15:45:26 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201210241545.q9OFjQsw044241@svn.freebsd.org> From: Warner Losh Date: Wed, 24 Oct 2012 15:45:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242004 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 15:45:26 -0000 Author: imp Date: Wed Oct 24 15:45:26 2012 New Revision: 242004 URL: http://svn.freebsd.org/changeset/base/242004 Log: Conform to the style of the rest of the file for hwpmc. Modified: head/sys/conf/files.mips Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Wed Oct 24 15:02:39 2012 (r242003) +++ head/sys/conf/files.mips Wed Oct 24 15:45:26 2012 (r242004) @@ -101,5 +101,5 @@ crypto/des/des_enc.c optional crypto | dev/nvram2env/nvram2env.c optional nvram2env # hwpmc goo -dev/hwpmc/hwpmc_mips.c optional hwpmc -dev/hwpmc/hwpmc_mips24k.c optional hwpmc +dev/hwpmc/hwpmc_mips.c optional hwpmc +dev/hwpmc/hwpmc_mips24k.c optional hwpmc From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 16:03: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 8FCFABF0; Wed, 24 Oct 2012 16:03: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 772A78FC08; Wed, 24 Oct 2012 16:03: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 q9OG36cF046990; Wed, 24 Oct 2012 16:03:06 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9OG36D6046988; Wed, 24 Oct 2012 16:03:06 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210241603.q9OG36D6046988@svn.freebsd.org> From: Eitan Adler Date: Wed, 24 Oct 2012 16:03:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242005 - head/usr.sbin/lpr/common_source X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 16:03:06 -0000 Author: eadler Date: Wed Oct 24 16:03:05 2012 New Revision: 242005 URL: http://svn.freebsd.org/changeset/base/242005 Log: PRIV_START and PRIV_END were reversed. Submitted by: KAHO Toshikazu Approved by: secteam (simon) MFC after: 3 days Modified: head/usr.sbin/lpr/common_source/lp.h Modified: head/usr.sbin/lpr/common_source/lp.h ============================================================================== --- head/usr.sbin/lpr/common_source/lp.h Wed Oct 24 15:45:26 2012 (r242004) +++ head/usr.sbin/lpr/common_source/lp.h Wed Oct 24 16:03:05 2012 (r242005) @@ -253,10 +253,10 @@ typedef enum { TR_SENDING, TR_RECVING, T * seteuid() macros. */ #define PRIV_START { \ - if (seteuid(uid) != 0) err(1, "seteuid failed"); \ + if (seteuid(euid) != 0) err(1, "seteuid failed"); \ } #define PRIV_END { \ - if (seteuid(euid) != 0) err(1, "seteuid failed"); \ + if (seteuid(uid) != 0) err(1, "seteuid failed"); \ } From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 16:37: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 8A39A916; Wed, 24 Oct 2012 16:37:54 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7185C8FC12; Wed, 24 Oct 2012 16:37: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 q9OGbslb053093; Wed, 24 Oct 2012 16:37:54 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9OGbsmT053091; Wed, 24 Oct 2012 16:37:54 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201210241637.q9OGbsmT053091@svn.freebsd.org> From: Warner Losh Date: Wed, 24 Oct 2012 16:37:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242006 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 16:37:54 -0000 Author: imp Date: Wed Oct 24 16:37:53 2012 New Revision: 242006 URL: http://svn.freebsd.org/changeset/base/242006 Log: Sort a few mis-sorted items. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Oct 24 16:03:05 2012 (r242005) +++ head/sys/conf/files Wed Oct 24 16:37:53 2012 (r242006) @@ -1251,6 +1251,19 @@ dev/ep/if_ep_mca.c optional ep mca dev/ep/if_ep_pccard.c optional ep pccard dev/esp/esp_pci.c optional esp pci dev/esp/ncr53c9x.c optional esp +dev/etherswitch/arswitch/arswitch.c optional arswitch +dev/etherswitch/arswitch/arswitch_reg.c optional arswitch +dev/etherswitch/arswitch/arswitch_phy.c optional arswitch +dev/etherswitch/arswitch/arswitch_8216.c optional arswitch +dev/etherswitch/arswitch/arswitch_8226.c optional arswitch +dev/etherswitch/arswitch/arswitch_8316.c optional arswitch +dev/etherswitch/arswitch/arswitch_7240.c optional arswitch +dev/etherswitch/etherswitch.c optional etherswitch +dev/etherswitch/etherswitch_if.m optional etherswitch +dev/etherswitch/mdio_if.m optional miiproxy +dev/etherswitch/mdio.c optional miiproxy +dev/etherswitch/miiproxy.c optional miiproxy +dev/etherswitch/rtl8366/rtl8366rb.c optional rtl8366rb dev/ex/if_ex.c optional ex dev/ex/if_ex_isa.c optional ex isa dev/ex/if_ex_pccard.c optional ex pccard @@ -2303,6 +2316,16 @@ wpi.fw optional wpifw \ clean "wpi.fw" dev/xe/if_xe.c optional xe dev/xe/if_xe_pccard.c optional xe pccard +dev/xen/balloon/balloon.c optional xen | xenhvm +dev/xen/blkfront/blkfront.c optional xen | xenhvm +dev/xen/blkback/blkback.c optional xen | xenhvm +dev/xen/console/console.c optional xen +dev/xen/console/xencons_ring.c optional xen +dev/xen/control/control.c optional xen | xenhvm +dev/xen/netback/netback.c optional xen | xenhvm +dev/xen/netfront/netfront.c optional xen | xenhvm +dev/xen/xenpci/xenpci.c optional xenpci +dev/xen/xenpci/evtchn.c optional xenpci dev/xl/if_xl.c optional xl pci dev/xl/xlphy.c optional xl pci fs/deadfs/dead_vnops.c standard @@ -3584,13 +3607,6 @@ vm/vm_reserv.c standard vm/vm_unix.c standard vm/vm_zeroidle.c standard vm/vnode_pager.c standard -xdr/xdr.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd -xdr/xdr_array.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd -xdr/xdr_mbuf.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd -xdr/xdr_mem.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd -xdr/xdr_reference.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd -xdr/xdr_sizeof.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd - xen/gnttab.c optional xen | xenhvm xen/features.c optional xen | xenhvm xen/evtchn/evtchn.c optional xen @@ -3603,30 +3619,9 @@ xen/xenbus/xenbusb_front.c optional xen xen/xenbus/xenbusb_back.c optional xen | xenhvm xen/xenstore/xenstore.c optional xen | xenhvm xen/xenstore/xenstore_dev.c optional xen | xenhvm -dev/xen/balloon/balloon.c optional xen | xenhvm -dev/xen/blkfront/blkfront.c optional xen | xenhvm -dev/xen/blkback/blkback.c optional xen | xenhvm -dev/xen/console/console.c optional xen -dev/xen/console/xencons_ring.c optional xen -dev/xen/control/control.c optional xen | xenhvm -dev/xen/netback/netback.c optional xen | xenhvm -dev/xen/netfront/netfront.c optional xen | xenhvm -dev/xen/xenpci/xenpci.c optional xenpci -dev/xen/xenpci/evtchn.c optional xenpci - -dev/etherswitch/mdio_if.m optional miiproxy -dev/etherswitch/mdio.c optional miiproxy -dev/etherswitch/miiproxy.c optional miiproxy - -dev/etherswitch/etherswitch.c optional etherswitch -dev/etherswitch/etherswitch_if.m optional etherswitch - -dev/etherswitch/rtl8366/rtl8366rb.c optional rtl8366rb - -dev/etherswitch/arswitch/arswitch.c optional arswitch -dev/etherswitch/arswitch/arswitch_reg.c optional arswitch -dev/etherswitch/arswitch/arswitch_phy.c optional arswitch -dev/etherswitch/arswitch/arswitch_8216.c optional arswitch -dev/etherswitch/arswitch/arswitch_8226.c optional arswitch -dev/etherswitch/arswitch/arswitch_8316.c optional arswitch -dev/etherswitch/arswitch/arswitch_7240.c optional arswitch +xdr/xdr.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd +xdr/xdr_array.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd +xdr/xdr_mbuf.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd +xdr/xdr_mem.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd +xdr/xdr_reference.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd +xdr/xdr_sizeof.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 16:39: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 30E90AB5; Wed, 24 Oct 2012 16:39:50 +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 F3C778FC0A; Wed, 24 Oct 2012 16:39: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 q9OGdnu7053423; Wed, 24 Oct 2012 16:39:49 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9OGdnSZ053419; Wed, 24 Oct 2012 16:39:49 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201210241639.q9OGdnSZ053419@svn.freebsd.org> From: Dimitry Andric Date: Wed, 24 Oct 2012 16:39:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242007 - head/contrib/llvm/lib/Analysis X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 16:39:50 -0000 Author: dim Date: Wed Oct 24 16:39:49 2012 New Revision: 242007 URL: http://svn.freebsd.org/changeset/base/242007 Log: Pull in r165367 from upstream llvm trunk: Make sure always-inline functions get inlined. Without this change, when the estimated cost for inlining a function with an "alwaysinline" attribute was lower than the inlining threshold, the getInlineCost function was returning that estimated cost rather than the special InlineCost::AlwaysInlineCost value. That is fine in the normal inlining case, but it can fail when the inliner considers the opportunity cost of inlining into an internal or linkonce-odr function. It may decide not to inline the always-inline function in that case. The fix here is just to make getInlineCost always return the special value for always-inline functions. I ran into this building clang with libc++. Tablegen failed to link because of an always-inline function that was not inlined. I have been unable to reduce the testcase down to a reasonable size. This should fix the link errors that were reported when atf-run was compiled with clang -stdlib=libc++. In this case, at -O3 optimization, some calls to basic_ios::clear() were not inlined, even when the function was marked __always_inline__. Reported by: Jan Beich MFC after: 1 week Modified: head/contrib/llvm/lib/Analysis/InlineCost.cpp Modified: head/contrib/llvm/lib/Analysis/InlineCost.cpp ============================================================================== --- head/contrib/llvm/lib/Analysis/InlineCost.cpp Wed Oct 24 16:37:53 2012 (r242006) +++ head/contrib/llvm/lib/Analysis/InlineCost.cpp Wed Oct 24 16:39:49 2012 (r242007) @@ -138,6 +138,7 @@ public: int getThreshold() { return Threshold; } int getCost() { return Cost; } + bool isAlwaysInline() { return AlwaysInline; } // Keep a bunch of stats about the cost savings found so we can print them // out when debugging. @@ -1011,7 +1012,8 @@ InlineCost InlineCostAnalyzer::getInline // Check if there was a reason to force inlining or no inlining. if (!ShouldInline && CA.getCost() < CA.getThreshold()) return InlineCost::getNever(); - if (ShouldInline && CA.getCost() >= CA.getThreshold()) + if (ShouldInline && (CA.isAlwaysInline() || + CA.getCost() >= CA.getThreshold())) return InlineCost::getAlways(); return llvm::InlineCost::get(CA.getCost(), CA.getThreshold()); From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 16:44: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 8D61FC89; Wed, 24 Oct 2012 16:44:25 +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 421BF8FC08; Wed, 24 Oct 2012 16:44:25 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:b489:24:8697:7e27] (unknown [IPv6:2001:7b8:3a7:0:b489:24:8697:7e27]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id B8A625C59; Wed, 24 Oct 2012 18:44:23 +0200 (CEST) Message-ID: <50881AE7.9040202@FreeBSD.org> Date: Wed, 24 Oct 2012 18:44:23 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Jan Beich Subject: Re: svn commit: r241823 - in head: . etc etc/atf etc/mtree lib lib/atf lib/atf/libatf-c lib/atf/libatf-c++ libexec libexec/atf libexec/atf/atf-check share share/atf share/doc share/doc/atf share/exampl... References: <201210220118.q9M1Ifh5098857__14926.3614825488$1350868751$gmane$org@svn.freebsd.org> <1TQC0L-000AZG-Q5@internal.tormail.org> <1TQFrW-0008DN-S8@internal.tormail.org> <1TQJtx-000C9z-I6@internal.tormail.org> <50865DF3.7060302@FreeBSD.org> In-Reply-To: <50865DF3.7060302@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 16:44:25 -0000 On 2012-10-23 11:05, Dimitry Andric wrote: > On 2012-10-22 16:58, Jan Beich wrote: >> Dimitry Andric writes: >>> On 2012-10-22 09:00, Jan Beich wrote: > ... >>>> undefined reference to `std::__1::basic_ios>>> std::__1::char_traits >::clear(unsigned int)' >>>> clang++: error: linker command failed with exit code 1 (use -v to >>>> see invocation) >>> Strange, for me it compiles (with a bunch of warnings, which I have >>> fixed locally), and links just fine. However, I always use -std=c++11, >>> which -std= flag are you using, if any? >> Adding -std=c++11 doesn't help. Neither yours or Garrett's patches. >> Instead, removing local -finline-functions (implied by -O3) does. > With clang, -O3 does not imply -finline-functions, but it may have some > influence on the threshold for inlining. > > This error is still very strange though, and it might be a real bug in > the optimizer at -O3; at this level, it really seems to generate a call > to a function that is declared inline, with the __always_inline > attribute. I have cherry-picked r165367 from the llvm trunk, which should fix this issue, and committed it into our head r242007. Can you please retry your buildworld with the -O3 flag after updating to at least that revision? I will also MFC the fix to stable/9 later on. From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 16:53: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 CD28A206; Wed, 24 Oct 2012 16:53:02 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B50208FC08; Wed, 24 Oct 2012 16:53: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 q9OGr2wq055578; Wed, 24 Oct 2012 16:53:02 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9OGr2Qp055573; Wed, 24 Oct 2012 16:53:02 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201210241653.q9OGr2Qp055573@svn.freebsd.org> From: Warner Losh Date: Wed, 24 Oct 2012 16:53:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242008 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 16:53:03 -0000 Author: imp Date: Wed Oct 24 16:53:02 2012 New Revision: 242008 URL: http://svn.freebsd.org/changeset/base/242008 Log: Move common fdt into files. Duplicate in files.powerpc the files shared with aim. Config is smart enough to cope with multiple lines of the same path with different options. This reduces the needless duplication. Modified: head/sys/conf/files head/sys/conf/files.arm head/sys/conf/files.mips head/sys/conf/files.powerpc Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Oct 24 16:39:49 2012 (r242007) +++ head/sys/conf/files Wed Oct 24 16:53:02 2012 (r242008) @@ -1772,6 +1772,12 @@ dev/oce/oce_mbox.c optional oce pci dev/oce/oce_queue.c optional oce pci dev/oce/oce_sysctl.c optional oce pci dev/oce/oce_util.c optional oce pci +dev/ofw/ofw_bus_if.m optional fdt +dev/ofw/ofw_bus_subr.c optional fdt +dev/ofw/ofw_fdt.c optional fdt +dev/ofw/ofw_if.m optional fdt +dev/ofw/openfirm.c optional fdt +dev/ofw/openfirmio.c optional fdt dev/patm/if_patm.c optional patm pci dev/patm/if_patm_attach.c optional patm pci dev/patm/if_patm_intr.c optional patm pci Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Wed Oct 24 16:39:49 2012 (r242007) +++ head/sys/conf/files.arm Wed Oct 24 16:53:02 2012 (r242008) @@ -62,12 +62,6 @@ cddl/compat/opensolaris/kern/opensolaris dev/fb/fb.c optional sc dev/hwpmc/hwpmc_arm.c optional hwpmc dev/kbd/kbd.c optional sc -dev/ofw/openfirm.c optional fdt -dev/ofw/openfirmio.c optional fdt -dev/ofw/ofw_bus_if.m optional fdt -dev/ofw/ofw_if.m optional fdt -dev/ofw/ofw_bus_subr.c optional fdt -dev/ofw/ofw_fdt.c optional fdt dev/syscons/scgfbrndr.c optional sc dev/syscons/scterm-teken.c optional sc dev/syscons/scvtb.c optional sc Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Wed Oct 24 16:39:49 2012 (r242007) +++ head/sys/conf/files.mips Wed Oct 24 16:53:02 2012 (r242008) @@ -85,12 +85,6 @@ dev/syscons/scvtb.c optional sc mips/mips/sc_machdep.c optional sc # FDT support -dev/ofw/openfirm.c optional fdt -dev/ofw/openfirmio.c optional fdt -dev/ofw/ofw_bus_if.m optional fdt -dev/ofw/ofw_if.m optional fdt -dev/ofw/ofw_bus_subr.c optional fdt -dev/ofw/ofw_fdt.c optional fdt dev/fdt/fdt_mips.c optional fdt # crypto support -- use generic Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Wed Oct 24 16:39:49 2012 (r242007) +++ head/sys/conf/files.powerpc Wed Oct 24 16:53:02 2012 (r242008) @@ -37,14 +37,14 @@ dev/iicbus/ds1775.c optional ds1775 pow dev/iicbus/max6690.c optional max6690 powermac dev/kbd/kbd.c optional sc dev/nand/nfc_fsl.c optional nand mpc85xx -dev/ofw/openfirm.c optional aim | fdt -dev/ofw/openfirmio.c optional aim | fdt -dev/ofw/ofw_bus_if.m optional aim | fdt -dev/ofw/ofw_if.m optional aim | fdt -dev/ofw/ofw_bus_subr.c optional aim | fdt +# ofw can be either aim or fdt: fdt case handled in files. aim only powerpc specific. +dev/ofw/openfirm.c optional aim +dev/ofw/openfirmio.c optional aim +dev/ofw/ofw_bus_if.m optional aim +dev/ofw/ofw_if.m optional aim +dev/ofw/ofw_bus_subr.c optional aim dev/ofw/ofw_console.c optional aim dev/ofw/ofw_disk.c optional ofwd aim -dev/ofw/ofw_fdt.c optional fdt dev/ofw/ofw_iicbus.c optional iicbus aim dev/ofw/ofw_standard.c optional aim powerpc dev/powermac_nvram/powermac_nvram.c optional powermac_nvram powermac From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 18:21: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 717C879F; Wed, 24 Oct 2012 18:21: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 5948C8FC0A; Wed, 24 Oct 2012 18:21: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 q9OILNEG070513; Wed, 24 Oct 2012 18:21:23 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9OILNN2070510; Wed, 24 Oct 2012 18:21:23 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201210241821.q9OILNN2070510@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 24 Oct 2012 18:21:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242010 - head/sys/i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 18:21:23 -0000 Author: kib Date: Wed Oct 24 18:21:22 2012 New Revision: 242010 URL: http://svn.freebsd.org/changeset/base/242010 Log: Add missed sched_pin(). Submitted by: Svatopluk Kraus Reviewed by: alc MFC after: 3 days Modified: head/sys/i386/i386/pmap.c Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Wed Oct 24 16:56:57 2012 (r242009) +++ head/sys/i386/i386/pmap.c Wed Oct 24 18:21:22 2012 (r242010) @@ -3221,6 +3221,7 @@ resume: PMAP_UNLOCK(pmap); goto resume; } + sched_pin(); } if (!pmap_demote_pde(pmap, &pmap->pm_pdir[pdirindex], sva)) { From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 18:22: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 5D117A23; Wed, 24 Oct 2012 18:22:00 +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 457FF8FC0C; Wed, 24 Oct 2012 18:22: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 q9OIM01I070642; Wed, 24 Oct 2012 18:22:00 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9OIM0IF070638; Wed, 24 Oct 2012 18:22:00 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201210241822.q9OIM0IF070638@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 24 Oct 2012 18:22:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242011 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 18:22:00 -0000 Author: kib Date: Wed Oct 24 18:21:59 2012 New Revision: 242011 URL: http://svn.freebsd.org/changeset/base/242011 Log: Dirty the newly copied anonymous pages after the wired region is forked. Otherwise, pagedaemon might reclaim the page without saving its content into the swap file, resulting in the valid content replaced by zeroes. Reported and tested by: pho Reviewed and comment update by: alc MFC after: 1 week Modified: head/sys/vm/vm_fault.c Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Wed Oct 24 18:21:22 2012 (r242010) +++ head/sys/vm/vm_fault.c Wed Oct 24 18:21:59 2012 (r242011) @@ -1287,9 +1287,11 @@ vm_fault_copy_entry(vm_map_t dst_map, vm access &= ~VM_PROT_WRITE; /* - * Loop through all of the pages in the entry's range, copying each - * one from the source object (it should be there) to the destination - * object. + * Loop through all of the pages in the entry's range, copying + * each one from the source object (it should be there) to the + * destination object. Note that copied pages are not wired + * and marked dirty to prevent reclamation without saving the + * content into the swap file on pageout. */ for (vaddr = dst_entry->start, dst_pindex = 0; vaddr < dst_entry->end; @@ -1332,6 +1334,7 @@ vm_fault_copy_entry(vm_map_t dst_map, vm pmap_copy_page(src_m, dst_m); VM_OBJECT_UNLOCK(object); dst_m->valid = VM_PAGE_BITS_ALL; + dst_m->dirty = VM_PAGE_BITS_ALL; VM_OBJECT_UNLOCK(dst_object); /* From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 18:32: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 55CB5D91; Wed, 24 Oct 2012 18:32: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 3DD878FC16; Wed, 24 Oct 2012 18:32: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 q9OIWckx072348; Wed, 24 Oct 2012 18:32:38 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9OIWcaE072346; Wed, 24 Oct 2012 18:32:38 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201210241832.q9OIWcaE072346@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 24 Oct 2012 18:32:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242012 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 18:32:38 -0000 Author: kib Date: Wed Oct 24 18:32:37 2012 New Revision: 242012 URL: http://svn.freebsd.org/changeset/base/242012 Log: Commit the actual text provided by Alan, instead of the wrong update in r242011. MFC after: 1 week Modified: head/sys/vm/vm_fault.c Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Wed Oct 24 18:21:59 2012 (r242011) +++ head/sys/vm/vm_fault.c Wed Oct 24 18:32:37 2012 (r242012) @@ -1287,11 +1287,13 @@ vm_fault_copy_entry(vm_map_t dst_map, vm access &= ~VM_PROT_WRITE; /* - * Loop through all of the pages in the entry's range, copying - * each one from the source object (it should be there) to the - * destination object. Note that copied pages are not wired - * and marked dirty to prevent reclamation without saving the - * content into the swap file on pageout. + * Loop through all of the virtual pages within the entry's + * range, copying each page from the source object to the + * destination object. Since the source is wired, those pages + * must exist. In contrast, the destination is pageable. + * Since the destination object does share any backing storage + * with the source object, all of its pages must be dirtied, + * regardless of whether they can be written. */ for (vaddr = dst_entry->start, dst_pindex = 0; vaddr < dst_entry->end; From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 18:33: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 17A16F09; Wed, 24 Oct 2012 18:33:45 +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 F32FC8FC18; Wed, 24 Oct 2012 18:33: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 q9OIXibc072547; Wed, 24 Oct 2012 18:33:44 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9OIXi77072545; Wed, 24 Oct 2012 18:33:44 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210241833.q9OIXi77072545@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 24 Oct 2012 18:33:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242013 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 18:33:45 -0000 Author: glebius Date: Wed Oct 24 18:33:44 2012 New Revision: 242013 URL: http://svn.freebsd.org/changeset/base/242013 Log: Fix fallout from r240071. If destination interface lookup fails, we should broadcast a packet, not try to deliver it to NULL. Reported by: rpaulo Modified: head/sys/net/if_bridge.c Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Wed Oct 24 18:32:37 2012 (r242012) +++ head/sys/net/if_bridge.c Wed Oct 24 18:33:44 2012 (r242013) @@ -1988,20 +1988,19 @@ static int bridge_transmit(struct ifnet *ifp, struct mbuf *m) { struct bridge_softc *sc; + struct ether_header *eh; + struct ifnet *dst_if; int error = 0; sc = ifp->if_softc; ETHER_BPF_MTAP(ifp, m); + eh = mtod(m, struct ether_header *); BRIDGE_LOCK(sc); - if ((m->m_flags & (M_BCAST|M_MCAST)) == 0) { - struct ether_header *eh; - struct ifnet *dst_if; - - eh = mtod(m, struct ether_header *); - dst_if = bridge_rtlookup(sc, eh->ether_dhost, 1); + if (((m->m_flags & (M_BCAST|M_MCAST)) == 0) && + (dst_if = bridge_rtlookup(sc, eh->ether_dhost, 1)) != NULL) { BRIDGE_UNLOCK(sc); error = bridge_enqueue(sc, dst_if, m); } else From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 18:36: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 A24201E3; Wed, 24 Oct 2012 18:36:41 +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 8ACA98FC12; Wed, 24 Oct 2012 18:36: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 q9OIafq9073005; Wed, 24 Oct 2012 18:36:41 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9OIafqo073002; Wed, 24 Oct 2012 18:36:41 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201210241836.q9OIafqo073002@svn.freebsd.org> From: Jim Harris Date: Wed, 24 Oct 2012 18:36:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242014 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 18:36:41 -0000 Author: jimharris Date: Wed Oct 24 18:36:41 2012 New Revision: 242014 URL: http://svn.freebsd.org/changeset/base/242014 Log: Pad tdq_lock to avoid false sharing with tdq_load and tdq_cpu_idle. This enables CPU searches (which read tdq_load) to operate independently of any contention on the spinlock. Some scheduler-intensive workloads running on an 8C single-socket SNB Xeon show considerable improvement with this change (2-3% perf improvement, 5-6% decrease in CPU util). Sponsored by: Intel Reviewed by: jeff Modified: head/sys/kern/sched_ule.c Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Wed Oct 24 18:33:44 2012 (r242013) +++ head/sys/kern/sched_ule.c Wed Oct 24 18:36:41 2012 (r242014) @@ -223,8 +223,13 @@ static int sched_idlespinthresh = -1; * locking in sched_pickcpu(); */ struct tdq { - /* Ordered to improve efficiency of cpu_search() and switch(). */ + /* + * Ordered to improve efficiency of cpu_search() and switch(). + * tdq_lock is padded to avoid false sharing with tdq_load and + * tdq_cpu_idle. + */ struct mtx tdq_lock; /* run queue lock. */ + char pad[64 - sizeof(struct mtx)]; struct cpu_group *tdq_cg; /* Pointer to cpu topology. */ volatile int tdq_load; /* Aggregate load. */ volatile int tdq_cpu_idle; /* cpu_idle() is active. */ From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 18:41: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 BAE714D5; Wed, 24 Oct 2012 18:41:07 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4B1788FC0C; Wed, 24 Oct 2012 18:41:07 +0000 (UTC) Received: by mail-ob0-f182.google.com with SMTP id wc20so1012287obb.13 for ; Wed, 24 Oct 2012 11:41:06 -0700 (PDT) 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; bh=c6cfnIkiD8aGqTjiIm0aW8BzCShXPyt0bly3ZA5hMUo=; b=Pup3p83DpKekynBF8fvHHKYaYqCeB0cSTebHsYcjNHkebXN1ezIr/xvtaTABsE7btm xMxUsF2dMhDSFOlIktHWXHNCJ0lEqrqYk7sRYzFV5JkKCaQMZhjKUkP7x2lNVh8Lr89o Wcp5ReU5alYXHmGBkUd/SE7G609GrcUW226CPjjrV96uua9ZYoPcFHFoWdgJ4skvXzpR Gpesg6vNpQlS3sFbBmUyXIYO96tZ4v+T9L23/hXtJ98xOknkcFe9JxozSMiosBJmthQx DUpLdSljHMKdFbyokycE2+hRI0NtpaJNuN2zmIdeIy0tPTeAuRIjId6dnUADWMXn30Eu Z6Xw== MIME-Version: 1.0 Received: by 10.182.45.42 with SMTP id j10mr13463426obm.60.1351104066614; Wed, 24 Oct 2012 11:41:06 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.76.75.69 with HTTP; Wed, 24 Oct 2012 11:41:06 -0700 (PDT) In-Reply-To: <201210241836.q9OIafqo073002@svn.freebsd.org> References: <201210241836.q9OIafqo073002@svn.freebsd.org> Date: Wed, 24 Oct 2012 11:41:06 -0700 X-Google-Sender-Auth: cf3uMXSvKI5e_zF5xoDvA0AUp9k Message-ID: Subject: Re: svn commit: r242014 - head/sys/kern From: Adrian Chadd To: Jim Harris Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 18:41:07 -0000 On 24 October 2012 11:36, Jim Harris wrote: > Pad tdq_lock to avoid false sharing with tdq_load and tdq_cpu_idle. Ok, but.. > struct mtx tdq_lock; /* run queue lock. */ > + char pad[64 - sizeof(struct mtx)]; .. don't we have an existing compile time macro for the cache line size, which can be used here? Adrian From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 18:44: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 2EDDD674; Wed, 24 Oct 2012 18:44:24 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 011698FC12; Wed, 24 Oct 2012 18:44:24 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 716C6B94F; Wed, 24 Oct 2012 14:44:23 -0400 (EDT) From: John Baldwin To: Gleb Smirnoff Subject: Re: svn commit: r242013 - head/sys/net Date: Wed, 24 Oct 2012 14:42:33 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <201210241833.q9OIXi77072545@svn.freebsd.org> In-Reply-To: <201210241833.q9OIXi77072545@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201210241442.33028.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 24 Oct 2012 14:44:23 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 18:44:24 -0000 On Wednesday, October 24, 2012 2:33:44 pm Gleb Smirnoff wrote: > Author: glebius > Date: Wed Oct 24 18:33:44 2012 > New Revision: 242013 > URL: http://svn.freebsd.org/changeset/base/242013 > > Log: > Fix fallout from r240071. If destination interface lookup fails, > we should broadcast a packet, not try to deliver it to NULL. > > Reported by: rpaulo I wonder if this fixes the panic someone was reporting on net@ when removing an interface from a bridge? -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 18:44: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 B016D676; Wed, 24 Oct 2012 18:44:24 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 82AAE8FC18; Wed, 24 Oct 2012 18:44:24 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id DCC90B95E; Wed, 24 Oct 2012 14:44:23 -0400 (EDT) From: John Baldwin To: Jim Harris Subject: Re: svn commit: r242014 - head/sys/kern Date: Wed, 24 Oct 2012 14:43:25 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <201210241836.q9OIafqo073002@svn.freebsd.org> In-Reply-To: <201210241836.q9OIafqo073002@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201210241443.25988.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 24 Oct 2012 14:44:24 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 18:44:24 -0000 On Wednesday, October 24, 2012 2:36:41 pm Jim Harris wrote: > Author: jimharris > Date: Wed Oct 24 18:36:41 2012 > New Revision: 242014 > URL: http://svn.freebsd.org/changeset/base/242014 > > Log: > Pad tdq_lock to avoid false sharing with tdq_load and tdq_cpu_idle. > > This enables CPU searches (which read tdq_load) to operate independently > of any contention on the spinlock. Some scheduler-intensive workloads > running on an 8C single-socket SNB Xeon show considerable improvement with > this change (2-3% perf improvement, 5-6% decrease in CPU util). > > Sponsored by: Intel > Reviewed by: jeff > > Modified: > head/sys/kern/sched_ule.c > > Modified: head/sys/kern/sched_ule.c > ============================================================================== > --- head/sys/kern/sched_ule.c Wed Oct 24 18:33:44 2012 (r242013) > +++ head/sys/kern/sched_ule.c Wed Oct 24 18:36:41 2012 (r242014) > @@ -223,8 +223,13 @@ static int sched_idlespinthresh = -1; > * locking in sched_pickcpu(); > */ > struct tdq { > - /* Ordered to improve efficiency of cpu_search() and switch(). */ > + /* > + * Ordered to improve efficiency of cpu_search() and switch(). > + * tdq_lock is padded to avoid false sharing with tdq_load and > + * tdq_cpu_idle. > + */ > struct mtx tdq_lock; /* run queue lock. */ > + char pad[64 - sizeof(struct mtx)]; Can this use 'tdq_lock __aligned(CACHE_LINE_SIZE)' instead? -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 18:56: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 E85F1C87; Wed, 24 Oct 2012 18:56:32 +0000 (UTC) (envelope-from jim.harris@gmail.com) Received: from mail-qa0-f54.google.com (mail-qa0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 592FC8FC08; Wed, 24 Oct 2012 18:56:32 +0000 (UTC) Received: by mail-qa0-f54.google.com with SMTP id p27so1510875qat.13 for ; Wed, 24 Oct 2012 11:56:31 -0700 (PDT) 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; bh=qH5mpS24XFAsscrgWlgNu3rZQWuWvwuQCMIYCM/ZIDk=; b=KL9IYlFWjQcztfttXO4q5BbJ+jjTXU2U5XlGMdcbuhEarrxyJ1ng5hjb/NpjFK5sbk KU2sIR/XFsRDwuWbIkX9HIHT/7IlGWY0saHaEQJ4TGsykuniv2/u30yxHluCoQ9VZ18b YKpxGMwLfaQxw6963pQaRF5TmVqIkxQJdMkvwklrqvTYX6k/9FjPeIeFrkIHC/eLmBB2 z0ZcLbeKcwYkTLFKSERe3kZyqXjfgu8B+0tei1a9KWTd0X2ukLch0zLLI2LizPbM/mUU eW7+lNm1eZWy8EQT4RddXDDzKhKKaVEhZ3uerBgbWq64iije2fuTlHe53PAnsL28OgcB eprA== MIME-Version: 1.0 Received: by 10.224.60.17 with SMTP id n17mr7933135qah.63.1351104991711; Wed, 24 Oct 2012 11:56:31 -0700 (PDT) Received: by 10.49.35.37 with HTTP; Wed, 24 Oct 2012 11:56:31 -0700 (PDT) In-Reply-To: References: <201210241836.q9OIafqo073002@svn.freebsd.org> Date: Wed, 24 Oct 2012 11:56:31 -0700 Message-ID: Subject: Re: svn commit: r242014 - head/sys/kern From: Jim Harris To: Adrian Chadd Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 18:56:33 -0000 On Wed, Oct 24, 2012 at 11:41 AM, Adrian Chadd wrote: > On 24 October 2012 11:36, Jim Harris wrote: > >> Pad tdq_lock to avoid false sharing with tdq_load and tdq_cpu_idle. > > Ok, but.. > > >> struct mtx tdq_lock; /* run queue lock. */ >> + char pad[64 - sizeof(struct mtx)]; > > .. don't we have an existing compile time macro for the cache line > size, which can be used here? Yes, but I didn't use it for a couple of reasons: 1) struct tdq itself is currently using __aligned(64), so I wanted to keep it consistent. 2) CACHE_LINE_SIZE is currently defined as 128 on x86, due to NetBurst-based processors having 128-byte cache sectors a while back. I had planned to start a separate thread on arch@ about this today on whether this was still appropriate. > > > Adrian From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 19:00: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 6F53FE5D; Wed, 24 Oct 2012 19:00:25 +0000 (UTC) (envelope-from jim.harris@gmail.com) Received: from mail-qa0-f47.google.com (mail-qa0-f47.google.com [209.85.216.47]) by mx1.freebsd.org (Postfix) with ESMTP id DE1958FC0A; Wed, 24 Oct 2012 19:00:24 +0000 (UTC) Received: by mail-qa0-f47.google.com with SMTP id i29so3357163qaf.13 for ; Wed, 24 Oct 2012 12:00:24 -0700 (PDT) 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; bh=iWrc8OkzAQ+LHFNo83XhmT5ZV/n/FN4ZEI5PDIiEyYM=; b=tFjf6MWpZf3o/Fg4ARgjL9VtxeneeaCzUFcKxwNK50FrsBTqSwnc/z+NO3u3W2ru62 grvZq7tDame7rrLHAk/jB8sVjWSxW8yM5uegw/0ERmaM56zd0oth4Mc7RFND/0ywNI8J dEgmjGcauKVq2ls21QXmFXsGXJ+r420qT/X4qhVB+Bk3wPfmQYq74kd7W4epEMZQmmm3 s1dg6uNcHspDVnRfE6SaggfDoOIVgLlKuMHoALyzHKkIaLNXhlWxUSoJLRmTt5nZS4XK UzWQa9jl5SWXASz3cGh2b5cxJnwozqQJhC10Owv3598nWNoWgRWSzh6JUY4ItzmLNU4S B3qA== MIME-Version: 1.0 Received: by 10.49.95.73 with SMTP id di9mr9319090qeb.37.1351105223941; Wed, 24 Oct 2012 12:00:23 -0700 (PDT) Received: by 10.49.35.37 with HTTP; Wed, 24 Oct 2012 12:00:23 -0700 (PDT) In-Reply-To: <201210241443.25988.jhb@freebsd.org> References: <201210241836.q9OIafqo073002@svn.freebsd.org> <201210241443.25988.jhb@freebsd.org> Date: Wed, 24 Oct 2012 12:00:23 -0700 Message-ID: Subject: Re: svn commit: r242014 - head/sys/kern From: Jim Harris To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 19:00:25 -0000 On Wed, Oct 24, 2012 at 11:43 AM, John Baldwin wrote: > On Wednesday, October 24, 2012 2:36:41 pm Jim Harris wrote: >> Author: jimharris >> Date: Wed Oct 24 18:36:41 2012 >> New Revision: 242014 >> URL: http://svn.freebsd.org/changeset/base/242014 >> >> Log: >> Pad tdq_lock to avoid false sharing with tdq_load and tdq_cpu_idle. >> >> This enables CPU searches (which read tdq_load) to operate independently >> of any contention on the spinlock. Some scheduler-intensive workloads >> running on an 8C single-socket SNB Xeon show considerable improvement with >> this change (2-3% perf improvement, 5-6% decrease in CPU util). >> >> Sponsored by: Intel >> Reviewed by: jeff >> >> Modified: >> head/sys/kern/sched_ule.c >> >> Modified: head/sys/kern/sched_ule.c >> > ============================================================================== >> --- head/sys/kern/sched_ule.c Wed Oct 24 18:33:44 2012 (r242013) >> +++ head/sys/kern/sched_ule.c Wed Oct 24 18:36:41 2012 (r242014) >> @@ -223,8 +223,13 @@ static int sched_idlespinthresh = -1; >> * locking in sched_pickcpu(); >> */ >> struct tdq { >> - /* Ordered to improve efficiency of cpu_search() and switch(). */ >> + /* >> + * Ordered to improve efficiency of cpu_search() and switch(). >> + * tdq_lock is padded to avoid false sharing with tdq_load and >> + * tdq_cpu_idle. >> + */ >> struct mtx tdq_lock; /* run queue lock. */ >> + char pad[64 - sizeof(struct mtx)]; > > Can this use 'tdq_lock __aligned(CACHE_LINE_SIZE)' instead? > No - that doesn't pad it. I believe that only works if it's global, i.e. not part of a data structure. I could have aligned tdq_cg instead of using the char array to get the same effect. I chose the padding only because there was precedence for it in sys/vm/vm_page.h - struct vpglocks. From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 19:04: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 2C995E7; Wed, 24 Oct 2012 19:04:18 +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 0EFFD8FC0C; Wed, 24 Oct 2012 19:04: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 q9OJ4ITT076878; Wed, 24 Oct 2012 19:04:18 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9OJ4Hbr076861; Wed, 24 Oct 2012 19:04:17 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201210241904.q9OJ4Hbr076861@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 24 Oct 2012 19:04:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242015 - in stable/9/sys: dev/alc dev/bge dev/cxgb dev/cxgbe dev/e1000 dev/et dev/jme dev/pci dev/re ofed/include/linux powerpc/mpc85xx X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 19:04:18 -0000 Author: gavin Date: Wed Oct 24 19:04:17 2012 New Revision: 242015 URL: http://svn.freebsd.org/changeset/base/242015 Log: Merge r240680 from head: Align the PCI Express #defines with the style used for the PCI-X #defines. This has the advantage that it makes the names more compact, and also allows us to correct the non-uniform naming of the PCIM_LINK_* defines, making them all consistent amongst themselves. This is a mostly mechanical rename: s/PCIR_EXPRESS_/PCIER_/g s/PCIM_EXP_/PCIEM_/g s/PCIM_LINK_/PCIEM_LINK_/g In this MFC, #defines have been added for the old names to assist out-of-tree drivers. Modified: stable/9/sys/dev/alc/if_alc.c stable/9/sys/dev/bge/if_bge.c stable/9/sys/dev/cxgb/cxgb_main.c stable/9/sys/dev/cxgb/cxgb_osdep.h stable/9/sys/dev/cxgbe/osdep.h stable/9/sys/dev/cxgbe/t4_main.c stable/9/sys/dev/e1000/if_em.c stable/9/sys/dev/et/if_et.c stable/9/sys/dev/jme/if_jme.c stable/9/sys/dev/pci/pci.c stable/9/sys/dev/pci/pcireg.h stable/9/sys/dev/re/if_re.c stable/9/sys/ofed/include/linux/pci.h stable/9/sys/powerpc/mpc85xx/pci_fdt.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) Modified: stable/9/sys/dev/alc/if_alc.c ============================================================================== --- stable/9/sys/dev/alc/if_alc.c Wed Oct 24 18:36:41 2012 (r242014) +++ stable/9/sys/dev/alc/if_alc.c Wed Oct 24 19:04:17 2012 (r242015) @@ -683,7 +683,7 @@ alc_aspm(struct alc_softc *sc, int media if ((sc->alc_flags & (ALC_FLAG_APS | ALC_FLAG_PCIE)) == (ALC_FLAG_APS | ALC_FLAG_PCIE)) linkcfg = CSR_READ_2(sc, sc->alc_expcap + - PCIR_EXPRESS_LINK_CTL); + PCIER_LINK_CTL); else linkcfg = 0; pmcfg &= ~PM_CFG_SERDES_PD_EX_L1; @@ -698,7 +698,7 @@ alc_aspm(struct alc_softc *sc, int media if (sc->alc_ident->deviceid == DEVICEID_ATHEROS_AR8152_B && sc->alc_rev == ATHEROS_AR8152_B_V10) linkcfg |= 0x80; - CSR_WRITE_2(sc, sc->alc_expcap + PCIR_EXPRESS_LINK_CTL, + CSR_WRITE_2(sc, sc->alc_expcap + PCIER_LINK_CTL, linkcfg); pmcfg &= ~(PM_CFG_EN_BUFS_RX_L0S | PM_CFG_SA_DLY_ENB | PM_CFG_HOTRST); @@ -798,10 +798,10 @@ alc_attach(device_t dev) if (pci_find_cap(dev, PCIY_EXPRESS, &base) == 0) { sc->alc_flags |= ALC_FLAG_PCIE; sc->alc_expcap = base; - burst = CSR_READ_2(sc, base + PCIR_EXPRESS_DEVICE_CTL); + burst = CSR_READ_2(sc, base + PCIER_DEVICE_CTL); sc->alc_dma_rd_burst = - (burst & PCIM_EXP_CTL_MAX_READ_REQUEST) >> 12; - sc->alc_dma_wr_burst = (burst & PCIM_EXP_CTL_MAX_PAYLOAD) >> 5; + (burst & PCIEM_CTL_MAX_READ_REQUEST) >> 12; + sc->alc_dma_wr_burst = (burst & PCIEM_CTL_MAX_PAYLOAD) >> 5; if (bootverbose) { device_printf(dev, "Read request size : %u bytes.\n", alc_dma_burst[sc->alc_dma_rd_burst]); @@ -831,9 +831,9 @@ alc_attach(device_t dev) CSR_WRITE_4(sc, ALC_PCIE_PHYMISC2, val); } /* Disable ASPM L0S and L1. */ - cap = CSR_READ_2(sc, base + PCIR_EXPRESS_LINK_CAP); - if ((cap & PCIM_LINK_CAP_ASPM) != 0) { - ctl = CSR_READ_2(sc, base + PCIR_EXPRESS_LINK_CTL); + cap = CSR_READ_2(sc, base + PCIER_LINK_CAP); + if ((cap & PCIEM_LINK_CAP_ASPM) != 0) { + ctl = CSR_READ_2(sc, base + PCIER_LINK_CTL); if ((ctl & 0x08) != 0) sc->alc_rcb = DMA_CFG_RCB_128; if (bootverbose) Modified: stable/9/sys/dev/bge/if_bge.c ============================================================================== --- stable/9/sys/dev/bge/if_bge.c Wed Oct 24 18:36:41 2012 (r242014) +++ stable/9/sys/dev/bge/if_bge.c Wed Oct 24 19:04:17 2012 (r242015) @@ -3650,17 +3650,17 @@ bge_reset(struct bge_softc *sc) pci_write_config(dev, 0xC4, val | (1 << 15), 4); } devctl = pci_read_config(dev, - sc->bge_expcap + PCIR_EXPRESS_DEVICE_CTL, 2); + sc->bge_expcap + PCIER_DEVICE_CTL, 2); /* Clear enable no snoop and disable relaxed ordering. */ - devctl &= ~(PCIM_EXP_CTL_RELAXED_ORD_ENABLE | - PCIM_EXP_CTL_NOSNOOP_ENABLE); - pci_write_config(dev, sc->bge_expcap + PCIR_EXPRESS_DEVICE_CTL, + devctl &= ~(PCIEM_CTL_RELAXED_ORD_ENABLE | + PCIEM_CTL_NOSNOOP_ENABLE); + pci_write_config(dev, sc->bge_expcap + PCIER_DEVICE_CTL, devctl, 2); /* Clear error status. */ - pci_write_config(dev, sc->bge_expcap + PCIR_EXPRESS_DEVICE_STA, - PCIM_EXP_STA_CORRECTABLE_ERROR | - PCIM_EXP_STA_NON_FATAL_ERROR | PCIM_EXP_STA_FATAL_ERROR | - PCIM_EXP_STA_UNSUPPORTED_REQ, 2); + pci_write_config(dev, sc->bge_expcap + PCIER_DEVICE_STA, + PCIEM_STA_CORRECTABLE_ERROR | + PCIEM_STA_NON_FATAL_ERROR | PCIEM_STA_FATAL_ERROR | + PCIEM_STA_UNSUPPORTED_REQ, 2); } /* Reset some of the PCI state that got zapped by reset. */ Modified: stable/9/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/9/sys/dev/cxgb/cxgb_main.c Wed Oct 24 18:36:41 2012 (r242014) +++ stable/9/sys/dev/cxgb/cxgb_main.c Wed Oct 24 19:04:17 2012 (r242015) @@ -476,8 +476,8 @@ cxgb_controller_attach(device_t dev) if (pci_find_cap(dev, PCIY_EXPRESS, ®) == 0) { uint16_t lnk; - lnk = pci_read_config(dev, reg + PCIR_EXPRESS_LINK_STA, 2); - sc->link_width = (lnk & PCIM_LINK_STA_WIDTH) >> 4; + lnk = pci_read_config(dev, reg + PCIER_LINK_STA, 2); + sc->link_width = (lnk & PCIEM_LINK_STA_WIDTH) >> 4; if (sc->link_width < 8 && (ai->caps & SUPPORTED_10000baseT_Full)) { device_printf(sc->dev, Modified: stable/9/sys/dev/cxgb/cxgb_osdep.h ============================================================================== --- stable/9/sys/dev/cxgb/cxgb_osdep.h Wed Oct 24 18:36:41 2012 (r242014) +++ stable/9/sys/dev/cxgb/cxgb_osdep.h Wed Oct 24 19:04:17 2012 (r242015) @@ -215,11 +215,11 @@ static const int debug_flags = DBG_RX; #define PCI_VPD_DATA PCIR_VPD_DATA #define PCI_CAP_ID_EXP PCIY_EXPRESS -#define PCI_EXP_DEVCTL PCIR_EXPRESS_DEVICE_CTL -#define PCI_EXP_DEVCTL_PAYLOAD PCIM_EXP_CTL_MAX_PAYLOAD -#define PCI_EXP_DEVCTL_READRQ PCIM_EXP_CTL_MAX_READ_REQUEST -#define PCI_EXP_LNKCTL PCIR_EXPRESS_LINK_CTL -#define PCI_EXP_LNKSTA PCIR_EXPRESS_LINK_STA +#define PCI_EXP_DEVCTL PCIER_DEVICE_CTL +#define PCI_EXP_DEVCTL_PAYLOAD PCIEM_CTL_MAX_PAYLOAD +#define PCI_EXP_DEVCTL_READRQ PCIEM_CTL_MAX_READ_REQUEST +#define PCI_EXP_LNKCTL PCIER_LINK_CTL +#define PCI_EXP_LNKSTA PCIER_LINK_STA /* * Linux compatibility macros Modified: stable/9/sys/dev/cxgbe/osdep.h ============================================================================== --- stable/9/sys/dev/cxgbe/osdep.h Wed Oct 24 18:36:41 2012 (r242014) +++ stable/9/sys/dev/cxgbe/osdep.h Wed Oct 24 19:04:17 2012 (r242015) @@ -118,13 +118,13 @@ typedef boolean_t bool; #define PCI_VPD_DATA PCIR_VPD_DATA #define PCI_CAP_ID_EXP PCIY_EXPRESS -#define PCI_EXP_DEVCTL PCIR_EXPRESS_DEVICE_CTL -#define PCI_EXP_DEVCTL_PAYLOAD PCIM_EXP_CTL_MAX_PAYLOAD -#define PCI_EXP_DEVCTL_READRQ PCIM_EXP_CTL_MAX_READ_REQUEST -#define PCI_EXP_LNKCTL PCIR_EXPRESS_LINK_CTL -#define PCI_EXP_LNKSTA PCIR_EXPRESS_LINK_STA -#define PCI_EXP_LNKSTA_CLS PCIM_LINK_STA_SPEED -#define PCI_EXP_LNKSTA_NLW PCIM_LINK_STA_WIDTH +#define PCI_EXP_DEVCTL PCIER_DEVICE_CTL +#define PCI_EXP_DEVCTL_PAYLOAD PCIEM_CTL_MAX_PAYLOAD +#define PCI_EXP_DEVCTL_READRQ PCIEM_CTL_MAX_READ_REQUEST +#define PCI_EXP_LNKCTL PCIER_LINK_CTL +#define PCI_EXP_LNKSTA PCIER_LINK_STA +#define PCI_EXP_LNKSTA_CLS PCIEM_LINK_STA_SPEED +#define PCI_EXP_LNKSTA_NLW PCIEM_LINK_STA_WIDTH #define PCI_EXP_DEVCTL2 0x28 static inline int Modified: stable/9/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_main.c Wed Oct 24 18:36:41 2012 (r242014) +++ stable/9/sys/dev/cxgbe/t4_main.c Wed Oct 24 19:04:17 2012 (r242015) @@ -430,9 +430,9 @@ t4_attach(device_t dev) uint32_t v; pci_set_max_read_req(dev, 4096); - v = pci_read_config(dev, i + PCIR_EXPRESS_DEVICE_CTL, 2); - v |= PCIM_EXP_CTL_RELAXED_ORD_ENABLE; - pci_write_config(dev, i + PCIR_EXPRESS_DEVICE_CTL, v, 2); + v = pci_read_config(dev, i + PCIER_DEVICE_CTL, 2); + v |= PCIEM_CTL_RELAXED_ORD_ENABLE; + pci_write_config(dev, i + PCIER_DEVICE_CTL, v, 2); } snprintf(sc->lockname, sizeof(sc->lockname), "%s", Modified: stable/9/sys/dev/e1000/if_em.c ============================================================================== --- stable/9/sys/dev/e1000/if_em.c Wed Oct 24 18:36:41 2012 (r242014) +++ stable/9/sys/dev/e1000/if_em.c Wed Oct 24 19:04:17 2012 (r242015) @@ -5111,11 +5111,11 @@ em_disable_aspm(struct adapter *adapter) } if (pci_find_cap(dev, PCIY_EXPRESS, &base) != 0) return; - reg = base + PCIR_EXPRESS_LINK_CAP; + reg = base + PCIER_LINK_CAP; link_cap = pci_read_config(dev, reg, 2); - if ((link_cap & PCIM_LINK_CAP_ASPM) == 0) + if ((link_cap & PCIEM_LINK_CAP_ASPM) == 0) return; - reg = base + PCIR_EXPRESS_LINK_CTL; + reg = base + PCIER_LINK_CTL; link_ctrl = pci_read_config(dev, reg, 2); link_ctrl &= 0xFFFC; /* turn off bit 1 and 2 */ pci_write_config(dev, reg, link_ctrl, 2); Modified: stable/9/sys/dev/et/if_et.c ============================================================================== --- stable/9/sys/dev/et/if_et.c Wed Oct 24 18:36:41 2012 (r242014) +++ stable/9/sys/dev/et/if_et.c Wed Oct 24 19:04:17 2012 (r242015) @@ -700,8 +700,8 @@ et_bus_config(struct et_softc *sc) * max playload size */ val = pci_read_config(sc->dev, - sc->sc_expcap + PCIR_EXPRESS_DEVICE_CAP, 4); - max_plsz = val & PCIM_EXP_CAP_MAX_PAYLOAD; + sc->sc_expcap + PCIER_DEVICE_CAP, 4); + max_plsz = val & PCIEM_CAP_MAX_PAYLOAD; switch (max_plsz) { case ET_PCIV_DEVICE_CAPS_PLSZ_128: @@ -732,7 +732,7 @@ et_bus_config(struct et_softc *sc) * Set L0s and L1 latency timer to 2us */ val = pci_read_config(sc->dev, ET_PCIR_L0S_L1_LATENCY, 4); - val &= ~(PCIM_LINK_CAP_L0S_EXIT | PCIM_LINK_CAP_L1_EXIT); + val &= ~(PCIEM_LINK_CAP_L0S_EXIT | PCIEM_LINK_CAP_L1_EXIT); /* L0s exit latency : 2us */ val |= 0x00005000; /* L1 exit latency : 2us */ Modified: stable/9/sys/dev/jme/if_jme.c ============================================================================== --- stable/9/sys/dev/jme/if_jme.c Wed Oct 24 18:36:41 2012 (r242014) +++ stable/9/sys/dev/jme/if_jme.c Wed Oct 24 19:04:17 2012 (r242015) @@ -778,7 +778,7 @@ jme_attach(device_t dev) /* Set max allowable DMA size. */ if (pci_find_cap(dev, PCIY_EXPRESS, &i) == 0) { sc->jme_flags |= JME_FLAG_PCIE; - burst = pci_read_config(dev, i + PCIR_EXPRESS_DEVICE_CTL, 2); + burst = pci_read_config(dev, i + PCIER_DEVICE_CTL, 2); if (bootverbose) { device_printf(dev, "Read request size : %d bytes.\n", 128 << ((burst >> 12) & 0x07)); Modified: stable/9/sys/dev/pci/pci.c ============================================================================== --- stable/9/sys/dev/pci/pci.c Wed Oct 24 18:36:41 2012 (r242014) +++ stable/9/sys/dev/pci/pci.c Wed Oct 24 19:04:17 2012 (r242015) @@ -1722,8 +1722,8 @@ pci_get_max_read_req(device_t dev) if (pci_find_cap(dev, PCIY_EXPRESS, &cap) != 0) return (0); - val = pci_read_config(dev, cap + PCIR_EXPRESS_DEVICE_CTL, 2); - val &= PCIM_EXP_CTL_MAX_READ_REQUEST; + val = pci_read_config(dev, cap + PCIER_DEVICE_CTL, 2); + val &= PCIEM_CTL_MAX_READ_REQUEST; val >>= 12; return (1 << (val + 7)); } @@ -1741,10 +1741,10 @@ pci_set_max_read_req(device_t dev, int s if (size > 4096) size = 4096; size = (1 << (fls(size) - 1)); - val = pci_read_config(dev, cap + PCIR_EXPRESS_DEVICE_CTL, 2); - val &= ~PCIM_EXP_CTL_MAX_READ_REQUEST; + val = pci_read_config(dev, cap + PCIER_DEVICE_CTL, 2); + val &= ~PCIEM_CTL_MAX_READ_REQUEST; val |= (fls(size) - 8) << 12; - pci_write_config(dev, cap + PCIR_EXPRESS_DEVICE_CTL, val, 2); + pci_write_config(dev, cap + PCIER_DEVICE_CTL, val, 2); return (size); } Modified: stable/9/sys/dev/pci/pcireg.h ============================================================================== --- stable/9/sys/dev/pci/pcireg.h Wed Oct 24 18:36:41 2012 (r242014) +++ stable/9/sys/dev/pci/pcireg.h Wed Oct 24 19:04:17 2012 (r242015) @@ -620,56 +620,258 @@ #define PCIR_SUBVENDCAP_ID 0x4 /* PCI Express definitions */ -#define PCIR_EXPRESS_FLAGS 0x2 -#define PCIM_EXP_FLAGS_VERSION 0x000F -#define PCIM_EXP_FLAGS_TYPE 0x00F0 -#define PCIM_EXP_TYPE_ENDPOINT 0x0000 -#define PCIM_EXP_TYPE_LEGACY_ENDPOINT 0x0010 -#define PCIM_EXP_TYPE_ROOT_PORT 0x0040 -#define PCIM_EXP_TYPE_UPSTREAM_PORT 0x0050 -#define PCIM_EXP_TYPE_DOWNSTREAM_PORT 0x0060 -#define PCIM_EXP_TYPE_PCI_BRIDGE 0x0070 -#define PCIM_EXP_TYPE_PCIE_BRIDGE 0x0080 -#define PCIM_EXP_TYPE_ROOT_INT_EP 0x0090 -#define PCIM_EXP_TYPE_ROOT_EC 0x00a0 -#define PCIM_EXP_FLAGS_SLOT 0x0100 -#define PCIM_EXP_FLAGS_IRQ 0x3e00 -#define PCIR_EXPRESS_DEVICE_CAP 0x4 -#define PCIM_EXP_CAP_MAX_PAYLOAD 0x0007 -#define PCIR_EXPRESS_DEVICE_CTL 0x8 -#define PCIM_EXP_CTL_NFER_ENABLE 0x0002 -#define PCIM_EXP_CTL_FER_ENABLE 0x0004 -#define PCIM_EXP_CTL_URR_ENABLE 0x0008 -#define PCIM_EXP_CTL_RELAXED_ORD_ENABLE 0x0010 -#define PCIM_EXP_CTL_MAX_PAYLOAD 0x00e0 -#define PCIM_EXP_CTL_NOSNOOP_ENABLE 0x0800 -#define PCIM_EXP_CTL_MAX_READ_REQUEST 0x7000 -#define PCIR_EXPRESS_DEVICE_STA 0xa -#define PCIM_EXP_STA_CORRECTABLE_ERROR 0x0001 -#define PCIM_EXP_STA_NON_FATAL_ERROR 0x0002 -#define PCIM_EXP_STA_FATAL_ERROR 0x0004 -#define PCIM_EXP_STA_UNSUPPORTED_REQ 0x0008 -#define PCIM_EXP_STA_AUX_POWER 0x0010 -#define PCIM_EXP_STA_TRANSACTION_PND 0x0020 -#define PCIR_EXPRESS_LINK_CAP 0xc -#define PCIM_LINK_CAP_MAX_SPEED 0x0000000f -#define PCIM_LINK_CAP_MAX_WIDTH 0x000003f0 -#define PCIM_LINK_CAP_ASPM 0x00000c00 -#define PCIM_LINK_CAP_L0S_EXIT 0x00007000 -#define PCIM_LINK_CAP_L1_EXIT 0x00038000 -#define PCIM_LINK_CAP_PORT 0xff000000 -#define PCIR_EXPRESS_LINK_CTL 0x10 -#define PCIR_EXPRESS_LINK_STA 0x12 -#define PCIM_LINK_STA_SPEED 0x000f -#define PCIM_LINK_STA_WIDTH 0x03f0 -#define PCIM_LINK_STA_TRAINING_ERROR 0x0400 -#define PCIM_LINK_STA_TRAINING 0x0800 -#define PCIM_LINK_STA_SLOT_CLOCK 0x1000 -#define PCIR_EXPRESS_SLOT_CAP 0x14 -#define PCIR_EXPRESS_SLOT_CTL 0x18 -#define PCIR_EXPRESS_SLOT_STA 0x1a -#define PCIR_EXPRESS_ROOT_CTL 0x1c -#define PCIR_EXPRESS_ROOT_STA 0x20 +#define PCIER_FLAGS 0x2 +#define PCIEM_FLAGS_VERSION 0x000F +#define PCIEM_FLAGS_TYPE 0x00F0 +#define PCIEM_TYPE_ENDPOINT 0x0000 +#define PCIEM_TYPE_LEGACY_ENDPOINT 0x0010 +#define PCIEM_TYPE_ROOT_PORT 0x0040 +#define PCIEM_TYPE_UPSTREAM_PORT 0x0050 +#define PCIEM_TYPE_DOWNSTREAM_PORT 0x0060 +#define PCIEM_TYPE_PCI_BRIDGE 0x0070 +#define PCIEM_TYPE_PCIE_BRIDGE 0x0080 +#define PCIEM_TYPE_ROOT_INT_EP 0x0090 +#define PCIEM_TYPE_ROOT_EC 0x00a0 +#define PCIEM_FLAGS_SLOT 0x0100 +#define PCIEM_FLAGS_IRQ 0x3e00 +#define PCIER_DEVICE_CAP 0x4 +#define PCIEM_CAP_MAX_PAYLOAD 0x00000007 +#define PCIEM_CAP_PHANTHOM_FUNCS 0x00000018 +#define PCIEM_CAP_EXT_TAG_FIELD 0x00000020 +#define PCIEM_CAP_L0S_LATENCY 0x000001c0 +#define PCIEM_CAP_L1_LATENCY 0x00000e00 +#define PCIEM_CAP_ROLE_ERR_RPT 0x00008000 +#define PCIEM_CAP_SLOT_PWR_LIM_VAL 0x03fc0000 +#define PCIEM_CAP_SLOT_PWR_LIM_SCALE 0x0c000000 +#define PCIEM_CAP_FLR 0x10000000 +#define PCIER_DEVICE_CTL 0x8 +#define PCIEM_CTL_COR_ENABLE 0x0001 +#define PCIEM_CTL_NFER_ENABLE 0x0002 +#define PCIEM_CTL_FER_ENABLE 0x0004 +#define PCIEM_CTL_URR_ENABLE 0x0008 +#define PCIEM_CTL_RELAXED_ORD_ENABLE 0x0010 +#define PCIEM_CTL_MAX_PAYLOAD 0x00e0 +#define PCIEM_CTL_EXT_TAG_FIELD 0x0100 +#define PCIEM_CTL_PHANTHOM_FUNCS 0x0200 +#define PCIEM_CTL_AUX_POWER_PM 0x0400 +#define PCIEM_CTL_NOSNOOP_ENABLE 0x0800 +#define PCIEM_CTL_MAX_READ_REQUEST 0x7000 +#define PCIEM_CTL_BRDG_CFG_RETRY 0x8000 /* PCI-E - PCI/PCI-X bridges */ +#define PCIEM_CTL_INITIATE_FLR 0x8000 /* FLR capable endpoints */ +#define PCIER_DEVICE_STA 0xa +#define PCIEM_STA_CORRECTABLE_ERROR 0x0001 +#define PCIEM_STA_NON_FATAL_ERROR 0x0002 +#define PCIEM_STA_FATAL_ERROR 0x0004 +#define PCIEM_STA_UNSUPPORTED_REQ 0x0008 +#define PCIEM_STA_AUX_POWER 0x0010 +#define PCIEM_STA_TRANSACTION_PND 0x0020 +#define PCIER_LINK_CAP 0xc +#define PCIEM_LINK_CAP_MAX_SPEED 0x0000000f +#define PCIEM_LINK_CAP_MAX_WIDTH 0x000003f0 +#define PCIEM_LINK_CAP_ASPM 0x00000c00 +#define PCIEM_LINK_CAP_L0S_EXIT 0x00007000 +#define PCIEM_LINK_CAP_L1_EXIT 0x00038000 +#define PCIEM_LINK_CAP_CLOCK_PM 0x00040000 +#define PCIEM_LINK_CAP_SURPRISE_DOWN 0x00080000 +#define PCIEM_LINK_CAP_DL_ACTIVE 0x00100000 +#define PCIEM_LINK_CAP_LINK_BW_NOTIFY 0x00200000 +#define PCIEM_LINK_CAP_ASPM_COMPLIANCE 0x00400000 +#define PCIEM_LINK_CAP_PORT 0xff000000 +#define PCIER_LINK_CTL 0x10 +#define PCIEM_LINK_CTL_ASPMC_DIS 0x0000 +#define PCIEM_LINK_CTL_ASPMC_L0S 0x0001 +#define PCIEM_LINK_CTL_ASPMC_L1 0x0002 +#define PCIEM_LINK_CTL_ASPMC 0x0003 +#define PCIEM_LINK_CTL_RCB 0x0008 +#define PCIEM_LINK_CTL_LINK_DIS 0x0010 +#define PCIEM_LINK_CTL_RETRAIN_LINK 0x0020 +#define PCIEM_LINK_CTL_COMMON_CLOCK 0x0040 +#define PCIEM_LINK_CTL_EXTENDED_SYNC 0x0080 +#define PCIEM_LINK_CTL_ECPM 0x0100 +#define PCIEM_LINK_CTL_HAWD 0x0200 +#define PCIEM_LINK_CTL_LBMIE 0x0400 +#define PCIEM_LINK_CTL_LABIE 0x0800 +#define PCIER_LINK_STA 0x12 +#define PCIEM_LINK_STA_SPEED 0x000f +#define PCIEM_LINK_STA_WIDTH 0x03f0 +#define PCIEM_LINK_STA_TRAINING_ERROR 0x0400 +#define PCIEM_LINK_STA_TRAINING 0x0800 +#define PCIEM_LINK_STA_SLOT_CLOCK 0x1000 +#define PCIEM_LINK_STA_DL_ACTIVE 0x2000 +#define PCIEM_LINK_STA_LINK_BW_MGMT 0x4000 +#define PCIEM_LINK_STA_LINK_AUTO_BW 0x8000 +#define PCIER_SLOT_CAP 0x14 +#define PCIEM_SLOT_CAP_APB 0x00000001 +#define PCIEM_SLOT_CAP_PCP 0x00000002 +#define PCIEM_SLOT_CAP_MRLSP 0x00000004 +#define PCIEM_SLOT_CAP_AIP 0x00000008 +#define PCIEM_SLOT_CAP_PIP 0x00000010 +#define PCIEM_SLOT_CAP_HPS 0x00000020 +#define PCIEM_SLOT_CAP_HPC 0x00000040 +#define PCIEM_SLOT_CAP_SPLV 0x00007f80 +#define PCIEM_SLOT_CAP_SPLS 0x00018000 +#define PCIEM_SLOT_CAP_EIP 0x00020000 +#define PCIEM_SLOT_CAP_NCCS 0x00040000 +#define PCIEM_SLOT_CAP_PSN 0xfff80000 +#define PCIER_SLOT_CTL 0x18 +#define PCIEM_SLOT_CTL_ABPE 0x0001 +#define PCIEM_SLOT_CTL_PFDE 0x0002 +#define PCIEM_SLOT_CTL_MRLSCE 0x0004 +#define PCIEM_SLOT_CTL_PDCE 0x0008 +#define PCIEM_SLOT_CTL_CCIE 0x0010 +#define PCIEM_SLOT_CTL_HPIE 0x0020 +#define PCIEM_SLOT_CTL_AIC 0x00c0 +#define PCIEM_SLOT_CTL_PIC 0x0300 +#define PCIEM_SLOT_CTL_PCC 0x0400 +#define PCIEM_SLOT_CTL_EIC 0x0800 +#define PCIEM_SLOT_CTL_DLLSCE 0x1000 +#define PCIER_SLOT_STA 0x1a +#define PCIEM_SLOT_STA_ABP 0x0001 +#define PCIEM_SLOT_STA_PFD 0x0002 +#define PCIEM_SLOT_STA_MRLSC 0x0004 +#define PCIEM_SLOT_STA_PDC 0x0008 +#define PCIEM_SLOT_STA_CC 0x0010 +#define PCIEM_SLOT_STA_MRLSS 0x0020 +#define PCIEM_SLOT_STA_PDS 0x0040 +#define PCIEM_SLOT_STA_EIS 0x0080 +#define PCIEM_SLOT_STA_DLLSC 0x0100 +#define PCIER_ROOT_CTL 0x1c +#define PCIER_ROOT_CAP 0x1e +#define PCIER_ROOT_STA 0x20 +#define PCIER_DEVICE_CAP2 0x24 +#define PCIER_DEVICE_CTL2 0x28 +#define PCIEM_CTL2_COMP_TIMEOUT_VAL 0x000f +#define PCIEM_CTL2_COMP_TIMEOUT_DIS 0x0010 +#define PCIEM_CTL2_ARI 0x0020 +#define PCIEM_CTL2_ATOMIC_REQ_ENABLE 0x0040 +#define PCIEM_CTL2_ATOMIC_EGR_BLOCK 0x0080 +#define PCIEM_CTL2_ID_ORDERED_REQ_EN 0x0100 +#define PCIEM_CTL2_ID_ORDERED_CMP_EN 0x0200 +#define PCIEM_CTL2_LTR_ENABLE 0x0400 +#define PCIEM_CTL2_OBFF 0x6000 +#define PCIEM_OBFF_DISABLE 0x0000 +#define PCIEM_OBFF_MSGA_ENABLE 0x2000 +#define PCIEM_OBFF_MSGB_ENABLE 0x4000 +#define PCIEM_OBFF_WAKE_ENABLE 0x6000 +#define PCIEM_CTL2_END2END_TLP 0x8000 +#define PCIER_DEVICE_STA2 0x2a +#define PCIER_LINK_CAP2 0x2c +#define PCIER_LINK_CTL2 0x30 +#define PCIER_LINK_STA2 0x32 +#define PCIER_SLOT_CAP2 0x34 +#define PCIER_SLOT_CTL2 0x38 +#define PCIER_SLOT_STA2 0x3a + +/* Old compatibility definitions for PCI Express registers */ +#define PCIR_EXPRESS_FLAGS PCIER_FLAGS +#define PCIM_EXP_FLAGS_VERSION PCIEM_FLAGS_VERSION +#define PCIM_EXP_FLAGS_TYPE PCIEM_FLAGS_TYPE +#define PCIM_EXP_TYPE_ENDPOINT PCIEM_TYPE_ENDPOINT +#define PCIM_EXP_TYPE_LEGACY_ENDPOINT PCIEM_TYPE_LEGACY_ENDPOINT +#define PCIM_EXP_TYPE_ROOT_PORT PCIEM_TYPE_ROOT_PORT +#define PCIM_EXP_TYPE_UPSTREAM_PORT PCIEM_TYPE_UPSTREAM_PORT +#define PCIM_EXP_TYPE_DOWNSTREAM_PORT PCIEM_TYPE_DOWNSTREAM_PORT +#define PCIM_EXP_TYPE_PCI_BRIDGE PCIEM_TYPE_PCI_BRIDGE +#define PCIM_EXP_TYPE_PCIE_BRIDGE PCIEM_TYPE_PCIE_BRIDGE +#define PCIM_EXP_TYPE_ROOT_INT_EP PCIEM_TYPE_ROOT_INT_EP +#define PCIM_EXP_TYPE_ROOT_EC PCIEM_TYPE_ROOT_EC +#define PCIM_EXP_FLAGS_SLOT PCIEM_FLAGS_SLOT +#define PCIM_EXP_FLAGS_IRQ PCIEM_FLAGS_IRQ +#define PCIR_EXPRESS_DEVICE_CAP PCIER_DEVICE_CAP +#define PCIM_EXP_CAP_MAX_PAYLOAD PCIEM_CAP_MAX_PAYLOAD +#define PCIM_EXP_CAP_PHANTHOM_FUNCS PCIEM_CAP_PHANTHOM_FUNCS +#define PCIM_EXP_CAP_EXT_TAG_FIELD PCIEM_CAP_EXT_TAG_FIELD +#define PCIM_EXP_CAP_L0S_LATENCY PCIEM_CAP_L0S_LATENCY +#define PCIM_EXP_CAP_L1_LATENCY PCIEM_CAP_L1_LATENCY +#define PCIM_EXP_CAP_ROLE_ERR_RPT PCIEM_CAP_ROLE_ERR_RPT +#define PCIM_EXP_CAP_SLOT_PWR_LIM_VAL PCIEM_CAP_SLOT_PWR_LIM_VAL +#define PCIM_EXP_CAP_SLOT_PWR_LIM_SCALE PCIEM_CAP_SLOT_PWR_LIM_SCALE +#define PCIM_EXP_CAP_FLR PCIEM_CAP_FLR +#define PCIR_EXPRESS_DEVICE_CTL PCIER_DEVICE_CTL +#define PCIM_EXP_CTL_COR_ENABLE PCIEM_CTL_COR_ENABLE +#define PCIM_EXP_CTL_NFER_ENABLE PCIEM_CTL_NFER_ENABLE +#define PCIM_EXP_CTL_FER_ENABLE PCIEM_CTL_FER_ENABLE +#define PCIM_EXP_CTL_URR_ENABLE PCIEM_CTL_URR_ENABLE +#define PCIM_EXP_CTL_RELAXED_ORD_ENABLE PCIEM_CTL_RELAXED_ORD_ENABLE +#define PCIM_EXP_CTL_MAX_PAYLOAD PCIEM_CTL_MAX_PAYLOAD +#define PCIM_EXP_CTL_EXT_TAG_FIELD PCIEM_CTL_EXT_TAG_FIELD +#define PCIM_EXP_CTL_PHANTHOM_FUNCS PCIEM_CTL_PHANTHOM_FUNCS +#define PCIM_EXP_CTL_AUX_POWER_PM PCIEM_CTL_AUX_POWER_PM +#define PCIM_EXP_CTL_NOSNOOP_ENABLE PCIEM_CTL_NOSNOOP_ENABLE +#define PCIM_EXP_CTL_MAX_READ_REQUEST PCIEM_CTL_MAX_READ_REQUEST +#define PCIM_EXP_CTL_BRDG_CFG_RETRY PCIEM_CTL_BRDG_CFG_RETRY +#define PCIM_EXP_CTL_INITIATE_FLR PCIEM_CTL_INITIATE_FLR +#define PCIR_EXPRESS_DEVICE_STA PCIER_DEVICE_STA +#define PCIM_EXP_STA_CORRECTABLE_ERROR PCIEM_STA_CORRECTABLE_ERROR +#define PCIM_EXP_STA_NON_FATAL_ERROR PCIEM_STA_NON_FATAL_ERROR +#define PCIM_EXP_STA_FATAL_ERROR PCIEM_STA_FATAL_ERROR +#define PCIM_EXP_STA_UNSUPPORTED_REQ PCIEM_STA_UNSUPPORTED_REQ +#define PCIM_EXP_STA_AUX_POWER PCIEM_STA_AUX_POWER +#define PCIM_EXP_STA_TRANSACTION_PND PCIEM_STA_TRANSACTION_PND +#define PCIR_EXPRESS_LINK_CAP PCIER_LINK_CAP +#define PCIM_LINK_CAP_MAX_SPEED PCIEM_LINK_CAP_MAX_SPEED +#define PCIM_LINK_CAP_MAX_WIDTH PCIEM_LINK_CAP_MAX_WIDTH +#define PCIM_LINK_CAP_ASPM PCIEM_LINK_CAP_ASPM +#define PCIM_LINK_CAP_L0S_EXIT PCIEM_LINK_CAP_L0S_EXIT +#define PCIM_LINK_CAP_L1_EXIT PCIEM_LINK_CAP_L1_EXIT +#define PCIM_LINK_CAP_CLOCK_PM PCIEM_LINK_CAP_CLOCK_PM +#define PCIM_LINK_CAP_SURPRISE_DOWN PCIEM_LINK_CAP_SURPRISE_DOWN +#define PCIM_LINK_CAP_DL_ACTIVE PCIEM_LINK_CAP_DL_ACTIVE +#define PCIM_LINK_CAP_LINK_BW_NOTIFY PCIEM_LINK_CAP_LINK_BW_NOTIFY +#define PCIM_LINK_CAP_ASPM_COMPLIANCE PCIEM_LINK_CAP_ASPM_COMPLIANCE +#define PCIM_LINK_CAP_PORT PCIEM_LINK_CAP_PORT +#define PCIR_EXPRESS_LINK_CTL PCIER_LINK_CTL +#define PCIM_EXP_LINK_CTL_ASPMC_DIS PCIEM_LINK_CTL_ASPMC_DIS +#define PCIM_EXP_LINK_CTL_ASPMC_L0S PCIEM_LINK_CTL_ASPMC_L0S +#define PCIM_EXP_LINK_CTL_ASPMC_L1 PCIEM_LINK_CTL_ASPMC_L1 +#define PCIM_EXP_LINK_CTL_ASPMC PCIEM_LINK_CTL_ASPMC +#define PCIM_EXP_LINK_CTL_RCB PCIEM_LINK_CTL_RCB +#define PCIM_EXP_LINK_CTL_LINK_DIS PCIEM_LINK_CTL_LINK_DIS +#define PCIM_EXP_LINK_CTL_RETRAIN_LINK PCIEM_LINK_CTL_RETRAIN_LINK +#define PCIM_EXP_LINK_CTL_COMMON_CLOCK PCIEM_LINK_CTL_COMMON_CLOCK +#define PCIM_EXP_LINK_CTL_EXTENDED_SYNC PCIEM_LINK_CTL_EXTENDED_SYNC +#define PCIM_EXP_LINK_CTL_ECPM PCIEM_LINK_CTL_ECPM +#define PCIM_EXP_LINK_CTL_HAWD PCIEM_LINK_CTL_HAWD +#define PCIM_EXP_LINK_CTL_LBMIE PCIEM_LINK_CTL_LBMIE +#define PCIM_EXP_LINK_CTL_LABIE PCIEM_LINK_CTL_LABIE +#define PCIR_EXPRESS_LINK_STA PCIER_LINK_STA +#define PCIM_LINK_STA_SPEED PCIEM_LINK_STA_SPEED +#define PCIM_LINK_STA_WIDTH PCIEM_LINK_STA_WIDTH +#define PCIM_LINK_STA_TRAINING_ERROR PCIEM_LINK_STA_TRAINING_ERROR +#define PCIM_LINK_STA_TRAINING PCIEM_LINK_STA_TRAINING +#define PCIM_LINK_STA_SLOT_CLOCK PCIEM_LINK_STA_SLOT_CLOCK +#define PCIM_LINK_STA_DL_ACTIVE PCIEM_LINK_STA_DL_ACTIVE +#define PCIM_LINK_STA_LINK_BW_MGMT PCIEM_LINK_STA_LINK_BW_MGMT +#define PCIM_LINK_STA_LINK_AUTO_BW PCIEM_LINK_STA_LINK_AUTO_BW +#define PCIR_EXPRESS_SLOT_CAP PCIER_SLOT_CAP +#define PCIR_EXPRESS_SLOT_CTL PCIER_SLOT_CTL +#define PCIR_EXPRESS_SLOT_STA PCIER_SLOT_STA +#define PCIR_EXPRESS_ROOT_CTL PCIER_ROOT_CTL +#define PCIR_EXPRESS_ROOT_CAP PCIER_ROOT_CAP +#define PCIR_EXPRESS_ROOT_STA PCIER_ROOT_STA +#define PCIR_EXPRESS_DEVICE_CAP2 PCIER_DEVICE_CAP2 +#define PCIR_EXPRESS_DEVICE_CTL2 PCIER_DEVICE_CTL2 +#define PCIM_EXP_CTL2_COMP_TIMEOUT_VAL PCIEM_CTL2_COMP_TIMEOUT_VAL +#define PCIM_EXP_CTL2_COMP_TIMEOUT_DIS PCIEM_CTL2_COMP_TIMEOUT_DIS +#define PCIM_EXP_CTL2_ARI PCIEM_CTL2_ARI +#define PCIM_EXP_CTL2_ATOMIC_REQ_ENABLE PCIEM_CTL2_ATOMIC_REQ_ENABLE +#define PCIM_EXP_CTL2_ATOMIC_EGR_BLOCK PCIEM_CTL2_ATOMIC_EGR_BLOCK +#define PCIM_EXP_CTL2_ID_ORDERED_REQ_EN PCIEM_CTL2_ID_ORDERED_REQ_EN +#define PCIM_EXP_CTL2_ID_ORDERED_CMP_EN PCIEM_CTL2_ID_ORDERED_CMP_EN +#define PCIM_EXP_CTL2_LTR_ENABLE PCIEM_CTL2_LTR_ENABLE +#define PCIM_EXP_CTL2_OBFF PCIEM_CTL2_OBFF +#define PCIM_EXP_OBFF_DISABLE PCIEM_OBFF_DISABLE +#define PCIM_EXP_OBFF_MSGA_ENABLE PCIEM_OBFF_MSGA_ENABLE +#define PCIM_EXP_OBFF_MSGB_ENABLE PCIEM_OBFF_MSGB_ENABLE +#define PCIM_EXP_OBFF_WAKE_ENABLE PCIEM_OBFF_WAKE_ENABLE +#define PCIM_EXP_CTL2_END2END_TLP PCIEM_CTL2_END2END_TLP +#define PCIR_EXPRESS_DEVICE_STA2 PCIER_DEVICE_STA2 +#define PCIR_EXPRESS_LINK_CAP2 PCIER_LINK_CAP2 +#define PCIR_EXPRESS_LINK_CTL2 PCIER_LINK_CTL2 +#define PCIR_EXPRESS_LINK_STA2 PCIER_LINK_STA2 +#define PCIR_EXPRESS_SLOT_CAP2 PCIER_SLOT_CAP2 +#define PCIR_EXPRESS_SLOT_CTL2 PCIER_SLOT_CTL2 +#define PCIR_EXPRESS_SLOT_STA2 PCIER_SLOT_STA2 /* MSI-X definitions */ #define PCIR_MSIX_CTRL 0x2 Modified: stable/9/sys/dev/re/if_re.c ============================================================================== --- stable/9/sys/dev/re/if_re.c Wed Oct 24 18:36:41 2012 (r242014) +++ stable/9/sys/dev/re/if_re.c Wed Oct 24 19:04:17 2012 (r242015) @@ -1343,14 +1343,14 @@ re_attach(device_t dev) /* Disable ASPM L0S/L1. */ if (sc->rl_expcap != 0) { cap = pci_read_config(dev, sc->rl_expcap + - PCIR_EXPRESS_LINK_CAP, 2); - if ((cap & PCIM_LINK_CAP_ASPM) != 0) { + PCIER_LINK_CAP, 2); + if ((cap & PCIEM_LINK_CAP_ASPM) != 0) { ctl = pci_read_config(dev, sc->rl_expcap + - PCIR_EXPRESS_LINK_CTL, 2); + PCIER_LINK_CTL, 2); if ((ctl & 0x0003) != 0) { ctl &= ~0x0003; pci_write_config(dev, sc->rl_expcap + - PCIR_EXPRESS_LINK_CTL, ctl, 2); + PCIER_LINK_CTL, ctl, 2); device_printf(dev, "ASPM disabled\n"); } } else Modified: stable/9/sys/ofed/include/linux/pci.h ============================================================================== --- stable/9/sys/ofed/include/linux/pci.h Wed Oct 24 18:36:41 2012 (r242014) +++ stable/9/sys/ofed/include/linux/pci.h Wed Oct 24 19:04:17 2012 (r242015) @@ -82,8 +82,8 @@ struct pci_device_id { #define PCI_VENDOR_ID PCIR_DEVVENDOR #define PCI_COMMAND PCIR_COMMAND -#define PCI_EXP_DEVCTL PCIR_EXPRESS_DEVICE_CTL -#define PCI_EXP_LNKCTL PCIR_EXPRESS_LINK_CTL +#define PCI_EXP_DEVCTL PCIER_DEVICE_CTL +#define PCI_EXP_LNKCTL PCIER_LINK_CTL #define IORESOURCE_MEM SYS_RES_MEMORY #define IORESOURCE_IO SYS_RES_IOPORT Modified: stable/9/sys/powerpc/mpc85xx/pci_fdt.c ============================================================================== --- stable/9/sys/powerpc/mpc85xx/pci_fdt.c Wed Oct 24 18:36:41 2012 (r242014) +++ stable/9/sys/powerpc/mpc85xx/pci_fdt.c Wed Oct 24 19:04:17 2012 (r242015) @@ -843,10 +843,10 @@ fsl_pcib_err_init(device_t dev) 0xffffffff); dsr = fsl_pcib_cfgread(sc, 0, 0, 0, - sc->sc_pcie_capreg + PCIR_EXPRESS_DEVICE_STA, 2); + sc->sc_pcie_capreg + PCIER_DEVICE_STA, 2); if (dsr) fsl_pcib_cfgwrite(sc, 0, 0, 0, - sc->sc_pcie_capreg + PCIR_EXPRESS_DEVICE_STA, + sc->sc_pcie_capreg + PCIER_DEVICE_STA, 0xffff, 2); /* Enable all errors reporting */ @@ -856,11 +856,11 @@ fsl_pcib_err_init(device_t dev) /* Enable error reporting: URR, FER, NFER */ dcr = fsl_pcib_cfgread(sc, 0, 0, 0, - sc->sc_pcie_capreg + PCIR_EXPRESS_DEVICE_CTL, 4); - dcr |= PCIM_EXP_CTL_URR_ENABLE | PCIM_EXP_CTL_FER_ENABLE | - PCIM_EXP_CTL_NFER_ENABLE; + sc->sc_pcie_capreg + PCIER_DEVICE_CTL, 4); + dcr |= PCIEM_CTL_URR_ENABLE | PCIEM_CTL_FER_ENABLE | + PCIEM_CTL_NFER_ENABLE; fsl_pcib_cfgwrite(sc, 0, 0, 0, - sc->sc_pcie_capreg + PCIR_EXPRESS_DEVICE_CTL, dcr, 4); + sc->sc_pcie_capreg + PCIER_DEVICE_CTL, dcr, 4); } } From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 19:05: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 D39E0415; Wed, 24 Oct 2012 19:05:54 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 418008FC12; Wed, 24 Oct 2012 19:05:54 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q9OJ5r2N097280; Wed, 24 Oct 2012 23:05:53 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q9OJ5rrs097279; Wed, 24 Oct 2012 23:05:53 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 24 Oct 2012 23:05:53 +0400 From: Gleb Smirnoff To: John Baldwin Subject: Re: svn commit: r242013 - head/sys/net Message-ID: <20121024190553.GM70741@FreeBSD.org> References: <201210241833.q9OIXi77072545@svn.freebsd.org> <201210241442.33028.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201210241442.33028.jhb@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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 19:05:54 -0000 On Wed, Oct 24, 2012 at 02:42:33PM -0400, John Baldwin wrote: J> On Wednesday, October 24, 2012 2:33:44 pm Gleb Smirnoff wrote: J> > Author: glebius J> > Date: Wed Oct 24 18:33:44 2012 J> > New Revision: 242013 J> > URL: http://svn.freebsd.org/changeset/base/242013 J> > J> > Log: J> > Fix fallout from r240071. If destination interface lookup fails, J> > we should broadcast a packet, not try to deliver it to NULL. J> > J> > Reported by: rpaulo J> J> I wonder if this fixes the panic someone was reporting on net@ when removing J> an interface from a bridge? I failed to find it on net@ or bugs@ in a timeframe after I committed if_transmit patch to bridge. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 19:06: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 092C7530; Wed, 24 Oct 2012 19:06:03 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id E7AAC8FC18; Wed, 24 Oct 2012 19:06:01 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id b5so1659516lbd.13 for ; Wed, 24 Oct 2012 12:06:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=xGzHQJQlQlT8O+1JxsFAzSCCFYndWOBcIBs0qoZbL1c=; b=fXD1Q6HDDUGYbDAANp3pIHOjuFNyPoDiKtVncdFEjODrsm2QIDG9jIvraa9DShkAF8 NB0uDtKbhjw+yUNe8whKk9gc1mZpw7+Uh3hnmkzrGsxwaeGcjfgjPQYCaPipMFco7ypk eb2kDnY9Pq13B6JiDK5bnc78FYSHh9dFjALMGczDbX75FHrGoMRwji0+srz3yHnOTdWj CKGp/IfLe21wn4TrzgO15ilBTIPf0i0vywvH3SB59pde4XBBiUlVvDCOdSA7QPmDyYcl /qfMBI++t+OEo4DKUo5+aGC039kxoTgpGoqQSYGxfOgnICoQSJXLQebcdve+zO5c5fM+ WIxw== MIME-Version: 1.0 Received: by 10.112.41.36 with SMTP id c4mr6416229lbl.75.1351105560441; Wed, 24 Oct 2012 12:06:00 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.30.37 with HTTP; Wed, 24 Oct 2012 12:06:00 -0700 (PDT) In-Reply-To: References: <201210241836.q9OIafqo073002@svn.freebsd.org> <201210241443.25988.jhb@freebsd.org> Date: Wed, 24 Oct 2012 20:06:00 +0100 X-Google-Sender-Auth: Wfjq43DqREXdt4V1omWoTkc4kfU Message-ID: Subject: Re: svn commit: r242014 - head/sys/kern From: Attilio Rao To: Jim Harris Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: "SVN commit messages 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, 24 Oct 2012 19:06:03 -0000 On Wed, Oct 24, 2012 at 8:00 PM, Jim Harris wrote: > On Wed, Oct 24, 2012 at 11:43 AM, John Baldwin wrote: >> On Wednesday, October 24, 2012 2:36:41 pm Jim Harris wrote: >>> Author: jimharris >>> Date: Wed Oct 24 18:36:41 2012 >>> New Revision: 242014 >>> URL: http://svn.freebsd.org/changeset/base/242014 >>> >>> Log: >>> Pad tdq_lock to avoid false sharing with tdq_load and tdq_cpu_idle. >>> >>> This enables CPU searches (which read tdq_load) to operate independently >>> of any contention on the spinlock. Some scheduler-intensive workloads >>> running on an 8C single-socket SNB Xeon show considerable improvement with >>> this change (2-3% perf improvement, 5-6% decrease in CPU util). >>> >>> Sponsored by: Intel >>> Reviewed by: jeff >>> >>> Modified: >>> head/sys/kern/sched_ule.c >>> >>> Modified: head/sys/kern/sched_ule.c >>> >> ============================================================================== >>> --- head/sys/kern/sched_ule.c Wed Oct 24 18:33:44 2012 (r242013) >>> +++ head/sys/kern/sched_ule.c Wed Oct 24 18:36:41 2012 (r242014) >>> @@ -223,8 +223,13 @@ static int sched_idlespinthresh = -1; >>> * locking in sched_pickcpu(); >>> */ >>> struct tdq { >>> - /* Ordered to improve efficiency of cpu_search() and switch(). */ >>> + /* >>> + * Ordered to improve efficiency of cpu_search() and switch(). >>> + * tdq_lock is padded to avoid false sharing with tdq_load and >>> + * tdq_cpu_idle. >>> + */ >>> struct mtx tdq_lock; /* run queue lock. */ >>> + char pad[64 - sizeof(struct mtx)]; >> >> Can this use 'tdq_lock __aligned(CACHE_LINE_SIZE)' instead? >> > > No - that doesn't pad it. I believe that only works if it's global, > i.e. not part of a data structure. As I've already said in another thread __align() doesn't work on object declaration, so what that won't pad it either if it is global or part of a struct. It is just implemented as __attribute__((aligned(X))): http://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/Type-Attributes.html Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 19:08: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 34A587A3; Wed, 24 Oct 2012 19:08:35 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 13B448FC08; Wed, 24 Oct 2012 19:08:32 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id e12so684680lag.13 for ; Wed, 24 Oct 2012 12:08:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=3ZyRIFWg2hMBMkN4D0UbaI4cWfKLku5YqQ4ZPFFPT3s=; b=CsswHx/suuv44x2gRyyopTNSE3+bMGFFgndN66Q/en6AOGySgB4dlFiTRuTMq2CPx8 MexRx9EXYXOJ0P7ZPDxIVLJf1Fv6RsXISgKDWH/4QjTPYRo2GAUKZBXghvXLLZ5YV6OP fXixjD78UpOxKq+F/ta9/h6nrWSYhln8irQkwF7Xq1uEFMIxtYMXVZPojWxNiNic5a9W 5C8RZP8cnx+ZobQZEayH5heMV09+Z/cWd/0zhNbCEb5oUbm3V8wZGk8hCTDVwRNQvI9E j6ry6HaaA8tAYkcnjyKdZQVuLOUbCGPKJx0ne1AIZgktL1ujeZ2yJp0w1wJPIZvsy6sw oEow== MIME-Version: 1.0 Received: by 10.112.28.98 with SMTP id a2mr6609594lbh.110.1351105712101; Wed, 24 Oct 2012 12:08:32 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.30.37 with HTTP; Wed, 24 Oct 2012 12:08:32 -0700 (PDT) In-Reply-To: References: <201210241836.q9OIafqo073002@svn.freebsd.org> Date: Wed, 24 Oct 2012 20:08:32 +0100 X-Google-Sender-Auth: AF3U2RcOWJ96gpdNJloVHV1uc5E Message-ID: Subject: Re: svn commit: r242014 - head/sys/kern From: Attilio Rao To: Jim Harris Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: "SVN commit messages 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, 24 Oct 2012 19:08:35 -0000 On Wed, Oct 24, 2012 at 7:56 PM, Jim Harris wrote: > On Wed, Oct 24, 2012 at 11:41 AM, Adrian Chadd wrote: >> On 24 October 2012 11:36, Jim Harris wrote: >> >>> Pad tdq_lock to avoid false sharing with tdq_load and tdq_cpu_idle. >> >> Ok, but.. >> >> >>> struct mtx tdq_lock; /* run queue lock. */ >>> + char pad[64 - sizeof(struct mtx)]; >> >> .. don't we have an existing compile time macro for the cache line >> size, which can be used here? > > Yes, but I didn't use it for a couple of reasons: > > 1) struct tdq itself is currently using __aligned(64), so I wanted to > keep it consistent. > 2) CACHE_LINE_SIZE is currently defined as 128 on x86, due to > NetBurst-based processors having 128-byte cache sectors a while back. > I had planned to start a separate thread on arch@ about this today on > whether this was still appropriate. While you may want to bring CACHE_LINE_SIZE to 64, code in sched_ule should still use CACHE_LINE_SIZE, as MI code cannot make assumption on cache line sizes for all the architectures. Your reasons for using 64 are valid, but a further next step to cleanup CACHE_LINE_SIZE and then use it properly in sched_ule are due IMHO. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 19:11: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 6CC79939; Wed, 24 Oct 2012 19:11:29 +0000 (UTC) (envelope-from jim.harris@gmail.com) Received: from mail-qa0-f54.google.com (mail-qa0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id AE57A8FC0A; Wed, 24 Oct 2012 19:11:28 +0000 (UTC) Received: by mail-qa0-f54.google.com with SMTP id p27so1533804qat.13 for ; Wed, 24 Oct 2012 12:11:27 -0700 (PDT) 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; bh=1gzNXyu5110EkHDot+UgmknEISsOl5cJZwq05EFRuE4=; b=BWwzzPniPhx7gdyCiO0EKjPCnefGmJ5RYjIUFOsHmia0f5Hlnx4onSsQF+8GskC3f6 Bna78n1CwWuzbibTX2xiaOpJ5xUokw9mDixP78sHI/tuiabu1xrkClcKpntaiseUritJ GfOtitLjmvmsKH1KE9Vssrpd7TYgP8yYlLMGNDcCUmWaz0flo8Oppr5Bd/sPbNnkhYcN ms/lruewW0d08JGhiSegwOtrVxaj3eXObiR3GSa7gCjuOr6bCyUtY+jR2Z/+FZ+wpAGE iuz81YTbtXt45Cioorr9+LN1Ld9w6GlvL6wyMCKtnifJ+L79sXa24pOLVxe/Li/r8E6z XIUg== MIME-Version: 1.0 Received: by 10.224.42.8 with SMTP id q8mr7783100qae.77.1351105887698; Wed, 24 Oct 2012 12:11:27 -0700 (PDT) Received: by 10.49.35.37 with HTTP; Wed, 24 Oct 2012 12:11:27 -0700 (PDT) In-Reply-To: References: <201210241836.q9OIafqo073002@svn.freebsd.org> Date: Wed, 24 Oct 2012 12:11:27 -0700 Message-ID: Subject: Re: svn commit: r242014 - head/sys/kern From: Jim Harris To: attilio@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 19:11:29 -0000 On Wed, Oct 24, 2012 at 12:08 PM, Attilio Rao wrote: > On Wed, Oct 24, 2012 at 7:56 PM, Jim Harris wrote: >> On Wed, Oct 24, 2012 at 11:41 AM, Adrian Chadd wrote: >>> On 24 October 2012 11:36, Jim Harris wrote: >>> >>>> Pad tdq_lock to avoid false sharing with tdq_load and tdq_cpu_idle. >>> >>> Ok, but.. >>> >>> >>>> struct mtx tdq_lock; /* run queue lock. */ >>>> + char pad[64 - sizeof(struct mtx)]; >>> >>> .. don't we have an existing compile time macro for the cache line >>> size, which can be used here? >> >> Yes, but I didn't use it for a couple of reasons: >> >> 1) struct tdq itself is currently using __aligned(64), so I wanted to >> keep it consistent. >> 2) CACHE_LINE_SIZE is currently defined as 128 on x86, due to >> NetBurst-based processors having 128-byte cache sectors a while back. >> I had planned to start a separate thread on arch@ about this today on >> whether this was still appropriate. > > While you may want to bring CACHE_LINE_SIZE to 64, code in sched_ule > should still use CACHE_LINE_SIZE, as MI code cannot make assumption on > cache line sizes for all the architectures. > Your reasons for using 64 are valid, but a further next step to > cleanup CACHE_LINE_SIZE and then use it properly in sched_ule are due > IMHO. Yes - I agree. I wanted to get some sort of consensus on using CACHE_LINE_SIZE=64 on x86 before moving forward with this change. > Attilio > > > -- > Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 19:17:10 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 5EAF8CC5 for ; Wed, 24 Oct 2012 19:17:10 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id B0CE48FC12 for ; Wed, 24 Oct 2012 19:17:09 +0000 (UTC) Received: (qmail 35318 invoked from network); 24 Oct 2012 20:54:55 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 24 Oct 2012 20:54:55 -0000 Message-ID: <50883EA8.1010308@freebsd.org> Date: Wed, 24 Oct 2012 21:16:56 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: Jim Harris Subject: Re: svn commit: r242014 - head/sys/kern References: <201210241836.q9OIafqo073002@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 19:17:10 -0000 On 24.10.2012 20:56, Jim Harris wrote: > On Wed, Oct 24, 2012 at 11:41 AM, Adrian Chadd wrote: >> On 24 October 2012 11:36, Jim Harris wrote: >> >>> Pad tdq_lock to avoid false sharing with tdq_load and tdq_cpu_idle. >> >> Ok, but.. >> >> >>> struct mtx tdq_lock; /* run queue lock. */ >>> + char pad[64 - sizeof(struct mtx)]; >> >> .. don't we have an existing compile time macro for the cache line >> size, which can be used here? > > Yes, but I didn't use it for a couple of reasons: > > 1) struct tdq itself is currently using __aligned(64), so I wanted to > keep it consistent. > 2) CACHE_LINE_SIZE is currently defined as 128 on x86, due to > NetBurst-based processors having 128-byte cache sectors a while back. > I had planned to start a separate thread on arch@ about this today on > whether this was still appropriate. See also the discussion on svn-src-all regarding global struct mtx alignment. Thank you for proving my point. ;) Let's go back and see how we can do this the sanest way. These are the options I see at the moment: 1. sprinkle __aligned(CACHE_LINE_SIZE) all over the place 2. use a macro like MTX_ALIGN that can be SMP/UP aware and in the future possibly change to a different compiler dependent align attribute 3. embed __aligned(CACHE_LINE_SIZE) into struct mtx itself so it automatically gets aligned in all cases, even when dynamically allocated. Personally I'm undecided between #2 and #3. #1 is ugly. In favor of #3 is that there possibly isn't any case where you'd actually want the mutex to share a cache line with anything else, even a data structure. -- Andre From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 19:22: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 90337FDC; Wed, 24 Oct 2012 19:22: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 6C8498FC08; Wed, 24 Oct 2012 19:22: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 q9OJMisq079642; Wed, 24 Oct 2012 19:22:44 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9OJMi76079639; Wed, 24 Oct 2012 19:22:44 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201210241922.q9OJMi76079639@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 24 Oct 2012 19:22:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242016 - stable/9/usr.sbin/pciconf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 19:22:44 -0000 Author: gavin Date: Wed Oct 24 19:22:43 2012 New Revision: 242016 URL: http://svn.freebsd.org/changeset/base/242016 Log: Merge r240680 from head: Align the PCI Express #defines with the style used for the PCI-X #defines. This has the advantage that it makes the names more compact, and also allows us to correct the non-uniform naming of the PCIM_LINK_* defines, making them all consistent amongst themselves. This is a mostly mechanical rename: s/PCIR_EXPRESS_/PCIER_/g s/PCIM_EXP_/PCIEM_/g s/PCIM_LINK_/PCIEM_LINK_/g In this MFC, #defines have been added for the old names to assist out-of-tree drivers. Modified: stable/9/usr.sbin/pciconf/cap.c stable/9/usr.sbin/pciconf/err.c Directory Properties: stable/9/usr.sbin/pciconf/ (props changed) Modified: stable/9/usr.sbin/pciconf/cap.c ============================================================================== --- stable/9/usr.sbin/pciconf/cap.c Wed Oct 24 19:04:17 2012 (r242015) +++ stable/9/usr.sbin/pciconf/cap.c Wed Oct 24 19:22:43 2012 (r242016) @@ -369,53 +369,53 @@ cap_express(int fd, struct pci_conf *p, uint32_t val; uint16_t flags; - flags = read_config(fd, &p->pc_sel, ptr + PCIR_EXPRESS_FLAGS, 2); - printf("PCI-Express %d ", flags & PCIM_EXP_FLAGS_VERSION); - switch (flags & PCIM_EXP_FLAGS_TYPE) { - case PCIM_EXP_TYPE_ENDPOINT: + flags = read_config(fd, &p->pc_sel, ptr + PCIER_FLAGS, 2); + printf("PCI-Express %d ", flags & PCIEM_FLAGS_VERSION); + switch (flags & PCIEM_FLAGS_TYPE) { + case PCIEM_TYPE_ENDPOINT: printf("endpoint"); break; - case PCIM_EXP_TYPE_LEGACY_ENDPOINT: + case PCIEM_TYPE_LEGACY_ENDPOINT: printf("legacy endpoint"); break; - case PCIM_EXP_TYPE_ROOT_PORT: + case PCIEM_TYPE_ROOT_PORT: printf("root port"); break; - case PCIM_EXP_TYPE_UPSTREAM_PORT: + case PCIEM_TYPE_UPSTREAM_PORT: printf("upstream port"); break; - case PCIM_EXP_TYPE_DOWNSTREAM_PORT: + case PCIEM_TYPE_DOWNSTREAM_PORT: printf("downstream port"); break; - case PCIM_EXP_TYPE_PCI_BRIDGE: + case PCIEM_TYPE_PCI_BRIDGE: printf("PCI bridge"); break; - case PCIM_EXP_TYPE_PCIE_BRIDGE: + case PCIEM_TYPE_PCIE_BRIDGE: printf("PCI to PCIe bridge"); break; - case PCIM_EXP_TYPE_ROOT_INT_EP: + case PCIEM_TYPE_ROOT_INT_EP: printf("root endpoint"); break; - case PCIM_EXP_TYPE_ROOT_EC: + case PCIEM_TYPE_ROOT_EC: printf("event collector"); break; default: - printf("type %d", (flags & PCIM_EXP_FLAGS_TYPE) >> 4); + printf("type %d", (flags & PCIEM_FLAGS_TYPE) >> 4); break; } - if (flags & PCIM_EXP_FLAGS_SLOT) + if (flags & PCIEM_FLAGS_SLOT) printf(" slot"); - if (flags & PCIM_EXP_FLAGS_IRQ) - printf(" IRQ %d", (flags & PCIM_EXP_FLAGS_IRQ) >> 9); - val = read_config(fd, &p->pc_sel, ptr + PCIR_EXPRESS_DEVICE_CAP, 4); - flags = read_config(fd, &p->pc_sel, ptr + PCIR_EXPRESS_DEVICE_CTL, 2); + if (flags & PCIEM_FLAGS_IRQ) + printf(" IRQ %d", (flags & PCIEM_FLAGS_IRQ) >> 9); + val = read_config(fd, &p->pc_sel, ptr + PCIER_DEVICE_CAP, 4); + flags = read_config(fd, &p->pc_sel, ptr + PCIER_DEVICE_CTL, 2); printf(" max data %d(%d)", - MAX_PAYLOAD((flags & PCIM_EXP_CTL_MAX_PAYLOAD) >> 5), - MAX_PAYLOAD(val & PCIM_EXP_CAP_MAX_PAYLOAD)); - val = read_config(fd, &p->pc_sel, ptr + PCIR_EXPRESS_LINK_CAP, 4); - flags = read_config(fd, &p->pc_sel, ptr+ PCIR_EXPRESS_LINK_STA, 2); - printf(" link x%d(x%d)", (flags & PCIM_LINK_STA_WIDTH) >> 4, - (val & PCIM_LINK_CAP_MAX_WIDTH) >> 4); + MAX_PAYLOAD((flags & PCIEM_CTL_MAX_PAYLOAD) >> 5), + MAX_PAYLOAD(val & PCIEM_CAP_MAX_PAYLOAD)); + val = read_config(fd, &p->pc_sel, ptr + PCIER_LINK_CAP, 4); + flags = read_config(fd, &p->pc_sel, ptr+ PCIER_LINK_STA, 2); + printf(" link x%d(x%d)", (flags & PCIEM_LINK_STA_WIDTH) >> 4, + (val & PCIEM_LINK_CAP_MAX_WIDTH) >> 4); } static void Modified: stable/9/usr.sbin/pciconf/err.c ============================================================================== --- stable/9/usr.sbin/pciconf/err.c Wed Oct 24 19:04:17 2012 (r242015) +++ stable/9/usr.sbin/pciconf/err.c Wed Oct 24 19:22:43 2012 (r242016) @@ -63,18 +63,18 @@ static struct bit_table pci_status[] = { /* Error indicators in the PCI-Express device status register. */ static struct bit_table pcie_device_status[] = { - { PCIM_EXP_STA_CORRECTABLE_ERROR, "Correctable Error Detected" }, - { PCIM_EXP_STA_NON_FATAL_ERROR, "Non-Fatal Error Detected" }, - { PCIM_EXP_STA_FATAL_ERROR, "Fatal Error Detected" }, - { PCIM_EXP_STA_UNSUPPORTED_REQ, "Unsupported Request Detected" }, + { PCIEM_STA_CORRECTABLE_ERROR, "Correctable Error Detected" }, + { PCIEM_STA_NON_FATAL_ERROR, "Non-Fatal Error Detected" }, + { PCIEM_STA_FATAL_ERROR, "Fatal Error Detected" }, + { PCIEM_STA_UNSUPPORTED_REQ, "Unsupported Request Detected" }, { 0, NULL }, }; /* Valid error indicator bits in the PCI-Express device status register. */ -#define PCIE_ERRORS (PCIM_EXP_STA_CORRECTABLE_ERROR | \ - PCIM_EXP_STA_NON_FATAL_ERROR | \ - PCIM_EXP_STA_FATAL_ERROR | \ - PCIM_EXP_STA_UNSUPPORTED_REQ) +#define PCIE_ERRORS (PCIEM_STA_CORRECTABLE_ERROR | \ + PCIEM_STA_NON_FATAL_ERROR | \ + PCIEM_STA_FATAL_ERROR | \ + PCIEM_STA_UNSUPPORTED_REQ) /* AER Uncorrected errors. */ static struct bit_table aer_uc[] = { @@ -147,7 +147,7 @@ list_errors(int fd, struct pci_conf *p) return; /* Check for PCI-e errors. */ - sta = read_config(fd, &p->pc_sel, pcie + PCIR_EXPRESS_DEVICE_STA, 2); + sta = read_config(fd, &p->pc_sel, pcie + PCIER_DEVICE_STA, 2); print_bits("PCI-e errors", pcie_device_status, sta & PCIE_ERRORS); /* See if this device supports AER. */ From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 19:30: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 EC37324E; Wed, 24 Oct 2012 19:30:44 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 8BB7D8FC0C; Wed, 24 Oct 2012 19:30:43 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id e12so701596lag.13 for ; Wed, 24 Oct 2012 12:30:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=4YsOSMzejkNUeZxdhL9N3bKWuyCugIx6v4VujHYWPp4=; b=aqIKV1ZfECKqX8N6atkv8EcHlPAh/1EvV6SdCO5mAeGf4LLUuVkyQW8IAhQIMa6wxX 22PF61oowbajufKbhhDjalhzvsF7muQSButJVUAQCzFwwEu8LjrLt2FUgBsZSp5cTKHp EdFREoxUz27z0eDlSWIs0vqdE8s55TrpVklx5ghsp9vprVbf/trkgdTXSaVi6KQy96Xw R1vbsGQZN4ghsOn7EOvm4R/o/Ie3YD69TuToNj5l7DDFQWwPqxuO+9GVcMWo0XKQh0sA oVmwAFv0kZVf3Ds/IYkcAAQHdPk1d9GCmR38TC4PvDHpWR8BPp8Qwa4iMZThlDhJfWhn SOOQ== Received: by 10.112.29.9 with SMTP id f9mr6856134lbh.22.1351107041296; Wed, 24 Oct 2012 12:30:41 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (mavhome.mavhome.dp.ua. [213.227.240.37]) by mx.google.com with ESMTPS id q2sm5270673lbd.14.2012.10.24.12.30.39 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 24 Oct 2012 12:30:40 -0700 (PDT) Sender: Alexander Motin Message-ID: <508841DC.7040701@FreeBSD.org> Date: Wed, 24 Oct 2012 22:30:36 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120628 Thunderbird/13.0.1 MIME-Version: 1.0 To: Andre Oppermann Subject: Re: svn commit: r242014 - head/sys/kern References: <201210241836.q9OIafqo073002@svn.freebsd.org> <50883EA8.1010308@freebsd.org> In-Reply-To: <50883EA8.1010308@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Adrian Chadd , src-committers@freebsd.org, Jim Harris , svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 19:30:45 -0000 On 24.10.2012 22:16, Andre Oppermann wrote: > On 24.10.2012 20:56, Jim Harris wrote: >> On Wed, Oct 24, 2012 at 11:41 AM, Adrian Chadd >> wrote: >>> On 24 October 2012 11:36, Jim Harris wrote: >>> >>>> Pad tdq_lock to avoid false sharing with tdq_load and tdq_cpu_idle. >>> >>> Ok, but.. >>> >>> >>>> struct mtx tdq_lock; /* run queue lock. */ >>>> + char pad[64 - sizeof(struct mtx)]; >>> >>> .. don't we have an existing compile time macro for the cache line >>> size, which can be used here? >> >> Yes, but I didn't use it for a couple of reasons: >> >> 1) struct tdq itself is currently using __aligned(64), so I wanted to >> keep it consistent. >> 2) CACHE_LINE_SIZE is currently defined as 128 on x86, due to >> NetBurst-based processors having 128-byte cache sectors a while back. >> I had planned to start a separate thread on arch@ about this today on >> whether this was still appropriate. > > See also the discussion on svn-src-all regarding global struct mtx > alignment. > > Thank you for proving my point. ;) > > Let's go back and see how we can do this the sanest way. These are > the options I see at the moment: > > 1. sprinkle __aligned(CACHE_LINE_SIZE) all over the place > 2. use a macro like MTX_ALIGN that can be SMP/UP aware and in > the future possibly change to a different compiler dependent > align attribute > 3. embed __aligned(CACHE_LINE_SIZE) into struct mtx itself so it > automatically gets aligned in all cases, even when dynamically > allocated. > > Personally I'm undecided between #2 and #3. #1 is ugly. In favor > of #3 is that there possibly isn't any case where you'd actually > want the mutex to share a cache line with anything else, even a data > structure. I'm sorry, could you hint me with some theory? I think I can agree that cache line sharing can be a problem in case of spin locks -- waiting thread will constantly try to access page modified by other CPU, that I guess will cause cache line writes to the RAM. But why is it so bad to share lock with respective data in case of non-spin locks? Won't benefits from free regular prefetch of the right data while grabbing lock compensate penalties from relatively rare collisions? -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 19:49: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 EAF4BBEE; Wed, 24 Oct 2012 19:49:41 +0000 (UTC) (envelope-from jim.harris@gmail.com) Received: from mail-qa0-f54.google.com (mail-qa0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 576788FC0C; Wed, 24 Oct 2012 19:49:41 +0000 (UTC) Received: by mail-qa0-f54.google.com with SMTP id p27so1591476qat.13 for ; Wed, 24 Oct 2012 12:49:40 -0700 (PDT) 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; bh=P72cXlNUn+fL3jWFAQnllEHKQhqnqbpWl2sMvxH6Q5c=; b=j8zEGpnOJIPje3EmWwL0ljH4D7OhzbGYJyiixCRVhcgwdq+rbcbYVj1GhM9N4slt7w b11BSExQ5gF9vW4EbhAVy613Tiy6pcFYewXwLEHzVAhYpNChDP840iXBre8AceoLHYC9 ScAdW4oJpuoGbwYlel6y41CifBJXaPQ/RnusBbBFu10LsekER6KhkTMI+fREnRTID1Ow D7l3MX2uJ7Jg0Y2zQn9HRGl6JlZPcN0RLJwHHnmP4QSRgKNv9gPH1QUTlybTMpJE/PSt TkTnicbJgjGdVHFnRCZsJcOJM9Y6FNjABMrubqA7os7BBkFXv1vfMyVdya/jvyiMOHOC we9w== MIME-Version: 1.0 Received: by 10.224.60.17 with SMTP id n17mr8012298qah.63.1351108180424; Wed, 24 Oct 2012 12:49:40 -0700 (PDT) Received: by 10.49.35.37 with HTTP; Wed, 24 Oct 2012 12:49:40 -0700 (PDT) In-Reply-To: <50883EA8.1010308@freebsd.org> References: <201210241836.q9OIafqo073002@svn.freebsd.org> <50883EA8.1010308@freebsd.org> Date: Wed, 24 Oct 2012 12:49:40 -0700 Message-ID: Subject: Re: svn commit: r242014 - head/sys/kern From: Jim Harris To: Andre Oppermann Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 19:49:42 -0000 On Wed, Oct 24, 2012 at 12:16 PM, Andre Oppermann wrote: > > > See also the discussion on svn-src-all regarding global struct mtx > alignment. > > Thank you for proving my point. ;) > > Let's go back and see how we can do this the sanest way. These are > the options I see at the moment: > > 1. sprinkle __aligned(CACHE_LINE_SIZE) all over the place > 2. use a macro like MTX_ALIGN that can be SMP/UP aware and in > the future possibly change to a different compiler dependent > align attribute > 3. embed __aligned(CACHE_LINE_SIZE) into struct mtx itself so it > automatically gets aligned in all cases, even when dynamically > allocated. > > Personally I'm undecided between #2 and #3. #1 is ugly. In favor > of #3 is that there possibly isn't any case where you'd actually > want the mutex to share a cache line with anything else, even a data > structure. I've run my same tests with #3 as you describe, and I did see further noticeable improvement. I had a difficult time though quantifying the effect it would have on all of the different architectures. Putting it in ULE's tdq gained 60-70% of the overall benefit, and was well contained. I agree that sprinkling all over the place isn't pretty. But focused investigations into specific locks (spin mutexes, default mutexes, whatever) may find a few key additional ones that would benefit. I started down this path with the sleepq and turnstile locks, but none of those specifically showed noticeable improvement (at least in the tests I was running). There's still some additional ones I want to look at, but haven't had the time yet. Thanks, -Jim From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 19:49: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 C0D87D4D; Wed, 24 Oct 2012 19:49:53 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 7B0568FC0C; Wed, 24 Oct 2012 19:49:51 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id e12so715499lag.13 for ; Wed, 24 Oct 2012 12:49:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=zxzU7WxyT3ET+TwApPFUNYFnd7ykie7zpq2zZsY2n7Y=; b=D3sCJmdhDB+kMErF+IsZ3fqLSaFGm2MOT6y5aS9vVItQtA7/dONgtbj89rX4M2n6cv d/zo1laRP+VGJVXW5Og/ouhlY4X/faCjDhq9HWiDEKdloNPIaU3WZOiOGN8+oBXCXd7N WKwUNZzciqhIYyxtWtbLRm66RkvLjldHG5Xd77CvGk849lra9z7r4GShS5rQoTKOca6Y Bt2dgJlpq0fcbqeXHbNNS5OYPgs/hXedQplSUTObS6JNwk0zqxKengKdEEek+Tk3cXGo vABwFSiD1equHLfJIxPZyLu3xFSCKPx3/8CZUZ+61G83Bi3FV9WtNymr7qOaOeUkPEvP eJvQ== MIME-Version: 1.0 Received: by 10.152.105.103 with SMTP id gl7mr15273395lab.10.1351108190417; Wed, 24 Oct 2012 12:49:50 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.30.37 with HTTP; Wed, 24 Oct 2012 12:49:50 -0700 (PDT) In-Reply-To: <50883EA8.1010308@freebsd.org> References: <201210241836.q9OIafqo073002@svn.freebsd.org> <50883EA8.1010308@freebsd.org> Date: Wed, 24 Oct 2012 20:49:50 +0100 X-Google-Sender-Auth: RTSTaoqMaiydgDohnK8iBu8_5TQ Message-ID: Subject: Re: svn commit: r242014 - head/sys/kern From: Attilio Rao To: Andre Oppermann Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, Adrian Chadd , src-committers@freebsd.org, Jim Harris , svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: "SVN commit messages 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, 24 Oct 2012 19:49:53 -0000 On Wed, Oct 24, 2012 at 8:16 PM, Andre Oppermann wrote: > On 24.10.2012 20:56, Jim Harris wrote: >> >> On Wed, Oct 24, 2012 at 11:41 AM, Adrian Chadd wrote: >>> >>> On 24 October 2012 11:36, Jim Harris wrote: >>> >>>> Pad tdq_lock to avoid false sharing with tdq_load and tdq_cpu_idle. >>> >>> >>> Ok, but.. >>> >>> >>>> struct mtx tdq_lock; /* run queue lock. */ >>>> + char pad[64 - sizeof(struct mtx)]; >>> >>> >>> .. don't we have an existing compile time macro for the cache line >>> size, which can be used here? >> >> >> Yes, but I didn't use it for a couple of reasons: >> >> 1) struct tdq itself is currently using __aligned(64), so I wanted to >> keep it consistent. >> 2) CACHE_LINE_SIZE is currently defined as 128 on x86, due to >> NetBurst-based processors having 128-byte cache sectors a while back. >> I had planned to start a separate thread on arch@ about this today on >> whether this was still appropriate. > > > See also the discussion on svn-src-all regarding global struct mtx > alignment. > > Thank you for proving my point. ;) > > Let's go back and see how we can do this the sanest way. These are > the options I see at the moment: > > 1. sprinkle __aligned(CACHE_LINE_SIZE) all over the place This is wrong because it doesn't give padding. > 2. use a macro like MTX_ALIGN that can be SMP/UP aware and in > the future possibly change to a different compiler dependent > align attribute What is this macro supposed to do? I don't understand that from your description. > 3. embed __aligned(CACHE_LINE_SIZE) into struct mtx itself so it > automatically gets aligned in all cases, even when dynamically > allocated. This works but I think it is overkill for structures including sleep mutexes which are the vast majority. So I wouldn't certainly be in favor of such a patch. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 19:58: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 725C6127 for ; Wed, 24 Oct 2012 19:58:22 +0000 (UTC) (envelope-from jroberson@jroberson.net) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 34F208FC14 for ; Wed, 24 Oct 2012 19:58:21 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id rp8so1558185pbb.13 for ; Wed, 24 Oct 2012 12:58:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:x-x-sender:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version:content-type:x-gm-message-state; bh=kabrGDOq4oheVLS3hF4Ffw8TK9UxaxIjvhbpRw9XMfU=; b=EAAgLCX/1eT6n2uBYKuUSDDs5AY8fOKjSRN3dE4lmURlDgSTlUbo3eI36wieoKyHUS GxuCEvZqo6+KEdkkJ+W3888TOerOa8XAYBjzXKOCM6FwY9Z2XRo/o3gno6fKiNvr1rsY HpQ/XceTEbSzHhCt8QIuj3g5it6tA6o3oC9WMPXrnT5MnLUMHzQ0W/clNYqvNC9Js1q8 5psasxLqdHK0vwbm5rwF3H1P3nv+PPC3ZLNt3LSLQgQ+h1kqsFSKIKDG1Q2LDecrMwIq hLSaur8cUEeOqwp8tUdzXU8KZPbLLJGB60sXESADQ6jNNXoYLiohgW8aRruA17w8hTQD cwOA== Received: by 10.68.136.98 with SMTP id pz2mr53133501pbb.2.1351108701410; Wed, 24 Oct 2012 12:58:21 -0700 (PDT) Received: from rrcs-66-91-135-210.west.biz.rr.com (rrcs-66-91-135-210.west.biz.rr.com. [66.91.135.210]) by mx.google.com with ESMTPS id ro5sm9897028pbc.66.2012.10.24.12.58.18 (version=SSLv3 cipher=OTHER); Wed, 24 Oct 2012 12:58:20 -0700 (PDT) Date: Wed, 24 Oct 2012 09:57:18 -1000 (HST) From: Jeff Roberson X-X-Sender: jroberson@desktop To: Attilio Rao Subject: Re: svn commit: r242014 - head/sys/kern In-Reply-To: Message-ID: References: <201210241836.q9OIafqo073002@svn.freebsd.org> <50883EA8.1010308@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 X-Gm-Message-State: ALoCoQk2ghsuB8v5UfF3eiuiojrLnaqiAPzz5OZCpzj7SK9RB2+pftYRqjjm6N0HH2+VHLm6U7TE Cc: Adrian Chadd , src-committers@freebsd.org, Andre Oppermann , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Jim Harris X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 19:58:22 -0000 On Wed, 24 Oct 2012, Attilio Rao wrote: > On Wed, Oct 24, 2012 at 8:16 PM, Andre Oppermann wrote: >> On 24.10.2012 20:56, Jim Harris wrote: >>> >>> On Wed, Oct 24, 2012 at 11:41 AM, Adrian Chadd wrote: >>>> >>>> On 24 October 2012 11:36, Jim Harris wrote: >>>> >>>>> Pad tdq_lock to avoid false sharing with tdq_load and tdq_cpu_idle. >>>> >>>> >>>> Ok, but.. >>>> >>>> >>>>> struct mtx tdq_lock; /* run queue lock. */ >>>>> + char pad[64 - sizeof(struct mtx)]; >>>> >>>> >>>> .. don't we have an existing compile time macro for the cache line >>>> size, which can be used here? >>> >>> >>> Yes, but I didn't use it for a couple of reasons: >>> >>> 1) struct tdq itself is currently using __aligned(64), so I wanted to >>> keep it consistent. >>> 2) CACHE_LINE_SIZE is currently defined as 128 on x86, due to >>> NetBurst-based processors having 128-byte cache sectors a while back. >>> I had planned to start a separate thread on arch@ about this today on >>> whether this was still appropriate. >> >> >> See also the discussion on svn-src-all regarding global struct mtx >> alignment. >> >> Thank you for proving my point. ;) >> >> Let's go back and see how we can do this the sanest way. These are >> the options I see at the moment: >> >> 1. sprinkle __aligned(CACHE_LINE_SIZE) all over the place > > This is wrong because it doesn't give padding. > >> 2. use a macro like MTX_ALIGN that can be SMP/UP aware and in >> the future possibly change to a different compiler dependent >> align attribute > > What is this macro supposed to do? I don't understand that from your > description. > >> 3. embed __aligned(CACHE_LINE_SIZE) into struct mtx itself so it >> automatically gets aligned in all cases, even when dynamically >> allocated. > > This works but I think it is overkill for structures including sleep > mutexes which are the vast majority. So I wouldn't certainly be in > favor of such a patch. I agree. For locks with little contention we probably want smaller structures. For example, you wouldn't want to put a huge lock in every file descriptor. It would be nice to have an automatic way to pad every global lock though. I think it should be done as needed. Jeff > > Attilio > > > -- > Peace can only be achieved by understanding - A. Einstein > From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 20:02: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 BA50340E; Wed, 24 Oct 2012 20:02:44 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 387E08FC0C; Wed, 24 Oct 2012 20:02:42 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id b5so1701925lbd.13 for ; Wed, 24 Oct 2012 13:02:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=aPjs4fVlhpEOnXsoh/xv3Lh7V5UmsYqpV8RWxwGvwiY=; b=VrUf62HOcIXm9ni7hgSTG9SFK5idSlXhBgtPmgx4d/NI6R7fCE437TPRA2hneYIyuX aMul7qx5vUXFm+tw58756U0GMP8vw5IuNuKzOyfuHqCXZ11hTdsSjyuLB3glnjsxP7m+ U1Y4KCM/xqWoJhb/bx9cPRCDYGOL8uotOAfdETBr12C9LtEPxkw9vOn0FcJV7CqSHvQO Hak/kPfZlh3s21CdwAIhtVP7wxa0ZCwWcBGm91xpk+lKyEWCgUhK70zt5u1vci7EqAup zzFeUJXu2E0s69sYp5Fa98cmcrwWC9mfARPjJ41ZNut9UbPHzb/ZJHoRZgivLyizQckL 5E0g== MIME-Version: 1.0 Received: by 10.112.47.129 with SMTP id d1mr6699529lbn.115.1351108961882; Wed, 24 Oct 2012 13:02:41 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.30.37 with HTTP; Wed, 24 Oct 2012 13:02:41 -0700 (PDT) In-Reply-To: <508841DC.7040701@FreeBSD.org> References: <201210241836.q9OIafqo073002@svn.freebsd.org> <50883EA8.1010308@freebsd.org> <508841DC.7040701@FreeBSD.org> Date: Wed, 24 Oct 2012 21:02:41 +0100 X-Google-Sender-Auth: UG_0V6u43VOE4Ls94aco_uIDvKI Message-ID: Subject: Re: svn commit: r242014 - head/sys/kern From: Attilio Rao To: Alexander Motin Content-Type: text/plain; charset=UTF-8 Cc: Adrian Chadd , src-committers@freebsd.org, Andre Oppermann , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Jim Harris X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: "SVN commit messages 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, 24 Oct 2012 20:02:44 -0000 On Wed, Oct 24, 2012 at 8:30 PM, Alexander Motin wrote: > On 24.10.2012 22:16, Andre Oppermann wrote: >> >> On 24.10.2012 20:56, Jim Harris wrote: >>> >>> On Wed, Oct 24, 2012 at 11:41 AM, Adrian Chadd >>> wrote: >>>> >>>> On 24 October 2012 11:36, Jim Harris wrote: >>>> >>>>> Pad tdq_lock to avoid false sharing with tdq_load and tdq_cpu_idle. >>>> >>>> >>>> Ok, but.. >>>> >>>> >>>>> struct mtx tdq_lock; /* run queue lock. */ >>>>> + char pad[64 - sizeof(struct mtx)]; >>>> >>>> >>>> .. don't we have an existing compile time macro for the cache line >>>> size, which can be used here? >>> >>> >>> Yes, but I didn't use it for a couple of reasons: >>> >>> 1) struct tdq itself is currently using __aligned(64), so I wanted to >>> keep it consistent. >>> 2) CACHE_LINE_SIZE is currently defined as 128 on x86, due to >>> NetBurst-based processors having 128-byte cache sectors a while back. >>> I had planned to start a separate thread on arch@ about this today on >>> whether this was still appropriate. >> >> >> See also the discussion on svn-src-all regarding global struct mtx >> alignment. >> >> Thank you for proving my point. ;) >> >> Let's go back and see how we can do this the sanest way. These are >> the options I see at the moment: >> >> 1. sprinkle __aligned(CACHE_LINE_SIZE) all over the place >> 2. use a macro like MTX_ALIGN that can be SMP/UP aware and in >> the future possibly change to a different compiler dependent >> align attribute >> 3. embed __aligned(CACHE_LINE_SIZE) into struct mtx itself so it >> automatically gets aligned in all cases, even when dynamically >> allocated. >> >> Personally I'm undecided between #2 and #3. #1 is ugly. In favor >> of #3 is that there possibly isn't any case where you'd actually >> want the mutex to share a cache line with anything else, even a data >> structure. > > > I'm sorry, could you hint me with some theory? I think I can agree that > cache line sharing can be a problem in case of spin locks -- waiting thread > will constantly try to access page modified by other CPU, that I guess will > cause cache line writes to the RAM. But why is it so bad to share lock with > respective data in case of non-spin locks? Won't benefits from free regular > prefetch of the right data while grabbing lock compensate penalties from > relatively rare collisions? Yes, but be aware that adaptive spinning imposes the same type of cache sharing issues than spinlocks have. I just found this 4 years old patch that implements back-off algorithms for spinmutexes and adaptive spinning. I think it would be interesting if someone can find time to benchmark and tune it. I can clean it up and make a commit candidate if there is an interest: http://lists.freebsd.org/pipermail/freebsd-smp/2008-June/001561.html Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 20:09: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 4A6C95F6 for ; Wed, 24 Oct 2012 20:09:49 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 9551C8FC0A for ; Wed, 24 Oct 2012 20:09:48 +0000 (UTC) Received: (qmail 36240 invoked from network); 24 Oct 2012 21:47:34 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 24 Oct 2012 21:47:34 -0000 Message-ID: <50884AFF.5080203@freebsd.org> Date: Wed, 24 Oct 2012 22:09:35 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: Jim Harris Subject: Re: svn commit: r242014 - head/sys/kern References: <201210241836.q9OIafqo073002@svn.freebsd.org> <50883EA8.1010308@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 20:09:49 -0000 On 24.10.2012 21:49, Jim Harris wrote: > On Wed, Oct 24, 2012 at 12:16 PM, Andre Oppermann wrote: > > >> >> >> See also the discussion on svn-src-all regarding global struct mtx >> alignment. >> >> Thank you for proving my point. ;) >> >> Let's go back and see how we can do this the sanest way. These are >> the options I see at the moment: >> >> 1. sprinkle __aligned(CACHE_LINE_SIZE) all over the place >> 2. use a macro like MTX_ALIGN that can be SMP/UP aware and in >> the future possibly change to a different compiler dependent >> align attribute >> 3. embed __aligned(CACHE_LINE_SIZE) into struct mtx itself so it >> automatically gets aligned in all cases, even when dynamically >> allocated. >> >> Personally I'm undecided between #2 and #3. #1 is ugly. In favor >> of #3 is that there possibly isn't any case where you'd actually >> want the mutex to share a cache line with anything else, even a data >> structure. > > I've run my same tests with #3 as you describe, and I did see further > noticeable improvement. I had a difficult time though quantifying the > effect it would have on all of the different architectures. Putting > it in ULE's tdq gained 60-70% of the overall benefit, and was well > contained. I just experimented with different specifications of alignment and couldn't get the globals aligned at all. This seems to be because of the linker not understanding or not getting passed the alignment information when linking the kernel. > I agree that sprinkling all over the place isn't pretty. But focused > investigations into specific locks (spin mutexes, default mutexes, > whatever) may find a few key additional ones that would benefit. I > started down this path with the sleepq and turnstile locks, but none > of those specifically showed noticeable improvement (at least in the > tests I was running). There's still some additional ones I want to > look at, but haven't had the time yet. This runs the very great risk of optimizing for today's available architectures and then needs rejiggling every five years. Just as you've noticed the issue with 128B alignment from the Netburst days. We never know how the next micro-architecture will behave. Micro optimizing each individual invocation of common building blocks is the wrong path to go. I'd very much prefer the alignment *and* padding control to be done in one place for all of them, either through a magic macro or compiler __attribute__(whatever). -- Andre From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 20:25: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 9FB0BD85 for ; Wed, 24 Oct 2012 20:25:16 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 014EE8FC19 for ; Wed, 24 Oct 2012 20:25:15 +0000 (UTC) Received: (qmail 36527 invoked from network); 24 Oct 2012 22:03:02 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 24 Oct 2012 22:03:02 -0000 Message-ID: <50884E9F.3090706@freebsd.org> Date: Wed, 24 Oct 2012 22:25:03 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: attilio@FreeBSD.org Subject: Re: svn commit: r242014 - head/sys/kern References: <201210241836.q9OIafqo073002@svn.freebsd.org> <201210241443.25988.jhb@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Jim Harris , John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 20:25:16 -0000 On 24.10.2012 21:06, Attilio Rao wrote: > On Wed, Oct 24, 2012 at 8:00 PM, Jim Harris wrote: >> On Wed, Oct 24, 2012 at 11:43 AM, John Baldwin wrote: >>> On Wednesday, October 24, 2012 2:36:41 pm Jim Harris wrote: >>>> Author: jimharris >>>> Date: Wed Oct 24 18:36:41 2012 >>>> New Revision: 242014 >>>> URL: http://svn.freebsd.org/changeset/base/242014 >>>> >>>> Log: >>>> Pad tdq_lock to avoid false sharing with tdq_load and tdq_cpu_idle. >>>> >>>> This enables CPU searches (which read tdq_load) to operate independently >>>> of any contention on the spinlock. Some scheduler-intensive workloads >>>> running on an 8C single-socket SNB Xeon show considerable improvement with >>>> this change (2-3% perf improvement, 5-6% decrease in CPU util). >>>> >>>> Sponsored by: Intel >>>> Reviewed by: jeff >>>> >>>> Modified: >>>> head/sys/kern/sched_ule.c >>>> >>>> Modified: head/sys/kern/sched_ule.c >>>> >>> ============================================================================== >>>> --- head/sys/kern/sched_ule.c Wed Oct 24 18:33:44 2012 (r242013) >>>> +++ head/sys/kern/sched_ule.c Wed Oct 24 18:36:41 2012 (r242014) >>>> @@ -223,8 +223,13 @@ static int sched_idlespinthresh = -1; >>>> * locking in sched_pickcpu(); >>>> */ >>>> struct tdq { >>>> - /* Ordered to improve efficiency of cpu_search() and switch(). */ >>>> + /* >>>> + * Ordered to improve efficiency of cpu_search() and switch(). >>>> + * tdq_lock is padded to avoid false sharing with tdq_load and >>>> + * tdq_cpu_idle. >>>> + */ >>>> struct mtx tdq_lock; /* run queue lock. */ >>>> + char pad[64 - sizeof(struct mtx)]; >>> >>> Can this use 'tdq_lock __aligned(CACHE_LINE_SIZE)' instead? >>> >> >> No - that doesn't pad it. I believe that only works if it's global, >> i.e. not part of a data structure. > > As I've already said in another thread __align() doesn't work on > object declaration, so what that won't pad it either if it is global > or part of a struct. > It is just implemented as __attribute__((aligned(X))): > http://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/Type-Attributes.html Actually it seems gcc itself doesn't really care and it up to the linker to honor that. -- Andre From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 20:29: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 EBB8EC5; Wed, 24 Oct 2012 20:29:23 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id A43D28FC08; Wed, 24 Oct 2012 20:29:22 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id e12so744739lag.13 for ; Wed, 24 Oct 2012 13:29:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=kmFK8M8YV5N4VgYQAeDl5+8XX5bCEM6QIgp/ggrWYbM=; b=cisCq7ulPePCjlkrIbFJWOPRrAGlv0QOF2roBO0hULkpzZCWFVfwnQyZ1eTdc+hNeD fzvNJj5Cu/sa+1/0ih00gq7TKveMmz4wA7kerrQZZxFuuZkHdiXHTEmLfT7gBCTHNYXV Q//G+J8xUckY6WcY8aPl2p09Tn+rtPS2Dm8tnmxp3D+Uvx9Msu/zRWD0H9WYWTP0jJ4p mP5L58z81krEYGvxzO9+UDhw+vS1ikiqsATV8htjxShfDe4lgiMFu0IlpK/e6Bq6u52G 0OMZXSEOwL+2v5DlRyz83iIDFUrs5gO2fpw+7KJf9ZaASV8jkPuGxwsGFZSjiv+WnUDr 1SgA== MIME-Version: 1.0 Received: by 10.112.41.36 with SMTP id c4mr6503122lbl.75.1351110561535; Wed, 24 Oct 2012 13:29:21 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.30.37 with HTTP; Wed, 24 Oct 2012 13:29:21 -0700 (PDT) In-Reply-To: <50884E9F.3090706@freebsd.org> References: <201210241836.q9OIafqo073002@svn.freebsd.org> <201210241443.25988.jhb@freebsd.org> <50884E9F.3090706@freebsd.org> Date: Wed, 24 Oct 2012 21:29:21 +0100 X-Google-Sender-Auth: 1uW2pCK1ORDdDfMAZlH_Mwc9mis Message-ID: Subject: Re: svn commit: r242014 - head/sys/kern From: Attilio Rao To: Andre Oppermann Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Jim Harris , John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: "SVN commit messages 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, 24 Oct 2012 20:29:24 -0000 On Wed, Oct 24, 2012 at 9:25 PM, Andre Oppermann wrote: > On 24.10.2012 21:06, Attilio Rao wrote: >> >> On Wed, Oct 24, 2012 at 8:00 PM, Jim Harris wrote: >>> >>> On Wed, Oct 24, 2012 at 11:43 AM, John Baldwin wrote: >>>> >>>> On Wednesday, October 24, 2012 2:36:41 pm Jim Harris wrote: >>>>> >>>>> Author: jimharris >>>>> Date: Wed Oct 24 18:36:41 2012 >>>>> New Revision: 242014 >>>>> URL: http://svn.freebsd.org/changeset/base/242014 >>>>> >>>>> Log: >>>>> Pad tdq_lock to avoid false sharing with tdq_load and tdq_cpu_idle. >>>>> >>>>> This enables CPU searches (which read tdq_load) to operate >>>>> independently >>>>> of any contention on the spinlock. Some scheduler-intensive >>>>> workloads >>>>> running on an 8C single-socket SNB Xeon show considerable >>>>> improvement with >>>>> this change (2-3% perf improvement, 5-6% decrease in CPU util). >>>>> >>>>> Sponsored by: Intel >>>>> Reviewed by: jeff >>>>> >>>>> Modified: >>>>> head/sys/kern/sched_ule.c >>>>> >>>>> Modified: head/sys/kern/sched_ule.c >>>>> >>>> >>>> ============================================================================== >>>>> >>>>> --- head/sys/kern/sched_ule.c Wed Oct 24 18:33:44 2012 (r242013) >>>>> +++ head/sys/kern/sched_ule.c Wed Oct 24 18:36:41 2012 (r242014) >>>>> @@ -223,8 +223,13 @@ static int sched_idlespinthresh = -1; >>>>> * locking in sched_pickcpu(); >>>>> */ >>>>> struct tdq { >>>>> - /* Ordered to improve efficiency of cpu_search() and switch(). */ >>>>> + /* >>>>> + * Ordered to improve efficiency of cpu_search() and switch(). >>>>> + * tdq_lock is padded to avoid false sharing with tdq_load and >>>>> + * tdq_cpu_idle. >>>>> + */ >>>>> struct mtx tdq_lock; /* run queue lock. */ >>>>> + char pad[64 - sizeof(struct mtx)]; >>>> >>>> >>>> Can this use 'tdq_lock __aligned(CACHE_LINE_SIZE)' instead? >>>> >>> >>> No - that doesn't pad it. I believe that only works if it's global, >>> i.e. not part of a data structure. >> >> >> As I've already said in another thread __align() doesn't work on >> object declaration, so what that won't pad it either if it is global >> or part of a struct. >> It is just implemented as __attribute__((aligned(X))): >> http://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/Type-Attributes.html > > > Actually it seems gcc itself doesn't really care and it up to the > linker to honor that. Yes but the concept being that if you use __aligned() properly (when defining a struct) the object will be correctly sized, so you will get padding automatically. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 20:43:08 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 E0EAB371 for ; Wed, 24 Oct 2012 20:43:07 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 42AE88FC08 for ; Wed, 24 Oct 2012 20:43:06 +0000 (UTC) Received: (qmail 36598 invoked from network); 24 Oct 2012 22:20:52 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 24 Oct 2012 22:20:52 -0000 Message-ID: <508852CE.5030807@freebsd.org> Date: Wed, 24 Oct 2012 22:42:54 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: Alexander Motin Subject: Re: svn commit: r242014 - head/sys/kern References: <201210241836.q9OIafqo073002@svn.freebsd.org> <50883EA8.1010308@freebsd.org> <508841DC.7040701@FreeBSD.org> In-Reply-To: <508841DC.7040701@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Adrian Chadd , src-committers@freebsd.org, Jim Harris , svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 20:43:08 -0000 On 24.10.2012 21:30, Alexander Motin wrote: > On 24.10.2012 22:16, Andre Oppermann wrote: >> On 24.10.2012 20:56, Jim Harris wrote: >>> On Wed, Oct 24, 2012 at 11:41 AM, Adrian Chadd >>> wrote: >>>> On 24 October 2012 11:36, Jim Harris wrote: >>>> >>>>> Pad tdq_lock to avoid false sharing with tdq_load and tdq_cpu_idle. >>>> >>>> Ok, but.. >>>> >>>> >>>>> struct mtx tdq_lock; /* run queue lock. */ >>>>> + char pad[64 - sizeof(struct mtx)]; >>>> >>>> .. don't we have an existing compile time macro for the cache line >>>> size, which can be used here? >>> >>> Yes, but I didn't use it for a couple of reasons: >>> >>> 1) struct tdq itself is currently using __aligned(64), so I wanted to >>> keep it consistent. >>> 2) CACHE_LINE_SIZE is currently defined as 128 on x86, due to >>> NetBurst-based processors having 128-byte cache sectors a while back. >>> I had planned to start a separate thread on arch@ about this today on >>> whether this was still appropriate. >> >> See also the discussion on svn-src-all regarding global struct mtx >> alignment. >> >> Thank you for proving my point. ;) >> >> Let's go back and see how we can do this the sanest way. These are >> the options I see at the moment: >> >> 1. sprinkle __aligned(CACHE_LINE_SIZE) all over the place >> 2. use a macro like MTX_ALIGN that can be SMP/UP aware and in >> the future possibly change to a different compiler dependent >> align attribute >> 3. embed __aligned(CACHE_LINE_SIZE) into struct mtx itself so it >> automatically gets aligned in all cases, even when dynamically >> allocated. >> >> Personally I'm undecided between #2 and #3. #1 is ugly. In favor >> of #3 is that there possibly isn't any case where you'd actually >> want the mutex to share a cache line with anything else, even a data >> structure. > > I'm sorry, could you hint me with some theory? I think I can agree that cache line sharing can be a > problem in case of spin locks -- waiting thread will constantly try to access page modified by other > CPU, that I guess will cause cache line writes to the RAM. But why is it so bad to share lock with > respective data in case of non-spin locks? Won't benefits from free regular prefetch of the right > data while grabbing lock compensate penalties from relatively rare collisions? Cliff Click describes it in detail: http://www.azulsystems.com/blog/cliff/2009-04-14-odds-ends For a classic mutex it likely doesn't make much difference since the cache line is exclusive anyway while the lock is held. On LL/SC systems there may be cache line dirtying on a failed locking attempt. For spin mutexes it hurts badly as you noted. Especially on RW mutexes it hurts because a read lock dirties the cache line for all other CPU's. Here the RW mutex should be on its own cache line in all cases. -- Andre From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 20:56:08 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 37BEA875 for ; Wed, 24 Oct 2012 20:56:08 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 87D8F8FC19 for ; Wed, 24 Oct 2012 20:56:07 +0000 (UTC) Received: (qmail 36644 invoked from network); 24 Oct 2012 22:33:53 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 24 Oct 2012 22:33:53 -0000 Message-ID: <508855DA.1080903@freebsd.org> Date: Wed, 24 Oct 2012 22:55:54 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: attilio@FreeBSD.org Subject: Re: svn commit: r242014 - head/sys/kern References: <201210241836.q9OIafqo073002@svn.freebsd.org> <201210241443.25988.jhb@freebsd.org> <50884E9F.3090706@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Jim Harris , John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 20:56:08 -0000 On 24.10.2012 22:29, Attilio Rao wrote: > On Wed, Oct 24, 2012 at 9:25 PM, Andre Oppermann wrote: >> On 24.10.2012 21:06, Attilio Rao wrote: >>> As I've already said in another thread __align() doesn't work on >>> object declaration, so what that won't pad it either if it is global >>> or part of a struct. >>> It is just implemented as __attribute__((aligned(X))): >>> http://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/Type-Attributes.html >> >> >> Actually it seems gcc itself doesn't really care and it up to the >> linker to honor that. > > Yes but the concept being that if you use __aligned() properly (when > defining a struct) the object will be correctly sized, so you will get > padding automatically. Yes. With __aligned() the start of the element/structure should begin on an address evenly dividable by the align value *and* it should pad out any remaining space up to the next evenly dividable address. The problem we have is that is apparently doesn't work correctly within gcc when creating structs nor within the linker when placing such supposedly aligned structs in the .bss section (at least the padding is missing). It seems to come down to either a) fixing gcc+ld; or b) hacking around it by magically padding the structs that require it. -- Andre From owner-svn-src-all@FreeBSD.ORG Wed Oct 24 21:10: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 D6CB9C85; Wed, 24 Oct 2012 21:10:34 +0000 (UTC) (envelope-from jbeich@tormail.org) Received: from outgoing.tormail.org (outgoing.tormail.org [82.221.96.22]) by mx1.freebsd.org (Postfix) with ESMTP id 675F28FC17; Wed, 24 Oct 2012 21:10:34 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=internal.tormail.org) by outgoing.tormail.org with esmtp (Exim 4.72) (envelope-from ) id 1TR8DX-0002p9-J5; Thu, 25 Oct 2012 01:10:24 +0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tormail.org; s=tm; h=Message-Id:X-TorMail-User:Content-Type:MIME-Version:References:Date:In-Reply-To:Subject:Cc:To:From; bh=gBYxjWD1isndI6WM/ygpjXzSDExbeTJARLfaL2glagU=; b=uQTHxcOZR3HN03b+6fK7ShKwPjpYVNW2FHONdAgD19BQ7uAo6cS1phMmes4l5/UTrQmJ/fXG36Uz55ajAoJVinTvnQam2EvKLJrIdAS+e9PQVEr0RfzRrEAcQooq2bpSPniArumg21PnC8uKAdoTsSndqCJClKzLf4vse5JMYr4=; Received: from jbeich by internal.tormail.org with local (Exim 4.63) (envelope-from ) id 1TR8C0-000OzE-Es; Wed, 24 Oct 2012 21:08:50 +0000 From: Jan Beich To: Dimitry Andric Subject: Re: svn commit: r241823 - in head: . etc etc/atf etc/mtree lib lib/atf lib/atf/libatf-c lib/atf/libatf-c++ libexec libexec/atf libexec/atf/atf-check share share/atf share/doc share/doc/atf share/exampl... In-Reply-To: <1TR43g-000Bu7-4L@internal.tormail.org> (Dimitry Andric's message of "Wed, 24 Oct 2012 18:44:23 +0200") Date: Wed, 24 Oct 2012 23:08:44 +0200 References: <201210220118.q9M1Ifh5098857__14926.3614825488$1350868751$gmane$org@svn.freebsd.org> <1TQC0L-000AZG-Q5@internal.tormail.org> <1TQFrW-0008DN-S8@internal.tormail.org> <1TQJtx-000C9z-I6@internal.tormail.org> <50865DF3.7060302@FreeBSD.org> <1TR43g-000Bu7-4L@internal.tormail.org> MIME-Version: 1.0 Content-Type: text/plain X-TorMail-User: jbeich Message-Id: <1TR8C0-000OzE-Es@internal.tormail.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 24 Oct 2012 21:10:34 -0000 Dimitry Andric writes: > On 2012-10-23 11:05, Dimitry Andric wrote: > >> On 2012-10-22 16:58, Jan Beich wrote: >>> Dimitry Andric writes: >>>> On 2012-10-22 09:00, Jan Beich wrote: >> ... >>>>> undefined reference to `std::__1::basic_ios>>>> std::__1::char_traits >::clear(unsigned int)' >>>>> clang++: error: linker command failed with exit code 1 (use -v to >>>>> see invocation) >>>> Strange, for me it compiles (with a bunch of warnings, which I have >>>> fixed locally), and links just fine. However, I always use -std=c++11, >>>> which -std= flag are you using, if any? >>> Adding -std=c++11 doesn't help. Neither yours or Garrett's patches. >>> Instead, removing local -finline-functions (implied by -O3) does. >> With clang, -O3 does not imply -finline-functions, but it may have some >> influence on the threshold for inlining. >> >> This error is still very strange though, and it might be a real bug in >> the optimizer at -O3; at this level, it really seems to generate a call >> to a function that is declared inline, with the __always_inline >> attribute. > > I have cherry-picked r165367 from the llvm trunk, which should fix this > issue, and committed it into our head r242007. > > Can you please retry your buildworld with the -O3 flag after updating to > at least that revision? As of r242014, atf-run builds fine with -O3 and libc++ for me. Thanks. > > I will also MFC the fix to stable/9 later on. From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 00:45: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 12DE0B46; Thu, 25 Oct 2012 00:45:52 +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 E90758FC17; Thu, 25 Oct 2012 00:45: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 q9P0jp2w033685; Thu, 25 Oct 2012 00:45:51 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P0jp1Z033683; Thu, 25 Oct 2012 00:45:51 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201210250045.q9P0jp1Z033683@svn.freebsd.org> From: Rick Macklem Date: Thu, 25 Oct 2012 00:45:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242017 - stable/9/sys/rpc/rpcsec_gss X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 00:45:52 -0000 Author: rmacklem Date: Thu Oct 25 00:45:51 2012 New Revision: 242017 URL: http://svn.freebsd.org/changeset/base/242017 Log: MFC: r241582 Add a comment describing why r241097 was done. Modified: stable/9/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c ============================================================================== --- stable/9/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Wed Oct 24 19:22:43 2012 (r242016) +++ stable/9/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Thu Oct 25 00:45:51 2012 (r242017) @@ -1024,6 +1024,17 @@ svc_rpc_gss_validate(struct svc_rpc_gss_ if (maj_stat != GSS_S_COMPLETE) { rpc_gss_log_status("gss_verify_mic", client->cl_mech, maj_stat, min_stat); + /* + * Attila Bogar and Herbert Poeckl reported similar problems + * w.r.t. a Linux NFS client doing a krb5 NFS mount against the + * FreeBSD server. We determined this was a Linux bug: + * http://www.spinics.net/lists/linux-nfs/msg32466.html, where + * the mount failed to work because a Destroy operation with a + * bogus encrypted checksum destroyed the authenticator handle. + * Since the checksum is bogus (gss_verify_mic() failed), it + * doesn't make sense to destroy the handle and not doing so + * fixes the Linux mount. + */ if (gcproc != RPCSEC_GSS_DESTROY) client->cl_state = CLIENT_STALE; return (FALSE); From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 00: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 56A50CDF; Thu, 25 Oct 2012 00:50:15 +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 3D4978FC08; Thu, 25 Oct 2012 00:50: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 q9P0oFLI034613; Thu, 25 Oct 2012 00:50:15 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P0oFct034611; Thu, 25 Oct 2012 00:50:15 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201210250050.q9P0oFct034611@svn.freebsd.org> From: Rick Macklem Date: Thu, 25 Oct 2012 00:50:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242018 - stable/8/sys/rpc/rpcsec_gss X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 00:50:15 -0000 Author: rmacklem Date: Thu Oct 25 00:50:14 2012 New Revision: 242018 URL: http://svn.freebsd.org/changeset/base/242018 Log: MFC: r241582 Add a comment describing why r241097 was done. Modified: stable/8/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/rpc/ (props changed) Modified: stable/8/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c ============================================================================== --- stable/8/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Thu Oct 25 00:45:51 2012 (r242017) +++ stable/8/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Thu Oct 25 00:50:14 2012 (r242018) @@ -1024,6 +1024,17 @@ svc_rpc_gss_validate(struct svc_rpc_gss_ if (maj_stat != GSS_S_COMPLETE) { rpc_gss_log_status("gss_verify_mic", client->cl_mech, maj_stat, min_stat); + /* + * Attila Bogar and Herbert Poeckl reported similar problems + * w.r.t. a Linux NFS client doing a krb5 NFS mount against the + * FreeBSD server. We determined this was a Linux bug: + * http://www.spinics.net/lists/linux-nfs/msg32466.html, where + * the mount failed to work because a Destroy operation with a + * bogus encrypted checksum destroyed the authenticator handle. + * Since the checksum is bogus (gss_verify_mic() failed), it + * doesn't make sense to destroy the handle and not doing so + * fixes the Linux mount. + */ if (gcproc != RPCSEC_GSS_DESTROY) client->cl_state = CLIENT_STALE; return (FALSE); From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 01:19: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 7A40544D; Thu, 25 Oct 2012 01:19:03 +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 61F3B8FC12; Thu, 25 Oct 2012 01:19: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 q9P1J3es039101; Thu, 25 Oct 2012 01:19:03 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P1J324039099; Thu, 25 Oct 2012 01:19:03 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250119.q9P1J324039099@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 01:19:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242019 - stable/9/usr.bin/csup X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 01:19:03 -0000 Author: eadler Date: Thu Oct 25 01:19:02 2012 New Revision: 242019 URL: http://svn.freebsd.org/changeset/base/242019 Log: MFC r241835: Fix conditional expression: previously a bitvector would be operated on by a logical not. Approved by: cperciva (implicit) Modified: stable/9/usr.bin/csup/lister.c Directory Properties: stable/9/usr.bin/csup/ (props changed) Modified: stable/9/usr.bin/csup/lister.c ============================================================================== --- stable/9/usr.bin/csup/lister.c Thu Oct 25 00:50:14 2012 (r242018) +++ stable/9/usr.bin/csup/lister.c Thu Oct 25 01:19:02 2012 (r242019) @@ -530,7 +530,7 @@ lister_dorcsdead(struct lister *l, struc return (0); config = l->config; wr = l->wr; - if (!coll->co_options & CO_TRUSTSTATUSFILE) { + if (!(coll->co_options & CO_TRUSTSTATUSFILE)) { path = cvspath(coll->co_prefix, sr->sr_file, 1); if (path == NULL) { spath = coll_statuspath(coll); From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 01:19: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 8F58B44E; Thu, 25 Oct 2012 01:19:03 +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 775AB8FC14; Thu, 25 Oct 2012 01:19: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 q9P1J3Tf039105; Thu, 25 Oct 2012 01:19:03 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P1J35o039103; Thu, 25 Oct 2012 01:19:03 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250119.q9P1J35o039103@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 01:19:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242020 - stable/8/usr.bin/csup X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 01:19:03 -0000 Author: eadler Date: Thu Oct 25 01:19:03 2012 New Revision: 242020 URL: http://svn.freebsd.org/changeset/base/242020 Log: MFC r241835: Fix conditional expression: previously a bitvector would be operated on by a logical not. Approved by: cperciva (implicit) Modified: stable/8/usr.bin/csup/lister.c Directory Properties: stable/8/usr.bin/csup/ (props changed) Modified: stable/8/usr.bin/csup/lister.c ============================================================================== --- stable/8/usr.bin/csup/lister.c Thu Oct 25 01:19:02 2012 (r242019) +++ stable/8/usr.bin/csup/lister.c Thu Oct 25 01:19:03 2012 (r242020) @@ -530,7 +530,7 @@ lister_dorcsdead(struct lister *l, struc return (0); config = l->config; wr = l->wr; - if (!coll->co_options & CO_TRUSTSTATUSFILE) { + if (!(coll->co_options & CO_TRUSTSTATUSFILE)) { path = cvspath(coll->co_prefix, sr->sr_file, 1); if (path == NULL) { spath = coll_statuspath(coll); From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 01: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 3FE7E71D; Thu, 25 Oct 2012 01:20:20 +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 275848FC16; Thu, 25 Oct 2012 01: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 q9P1KJ7l039406; Thu, 25 Oct 2012 01:20:20 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P1KJw2039404; Thu, 25 Oct 2012 01:20:19 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250120.q9P1KJw2039404@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 01:20:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242021 - stable/8/usr.sbin/memcontrol X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 01:20:20 -0000 Author: eadler Date: Thu Oct 25 01:20:19 2012 New Revision: 242021 URL: http://svn.freebsd.org/changeset/base/242021 Log: MFC r241829: Fix conditional expression: previously a bit vector was being operated on by a logical not instead of the entire expression. Approved by: cperciva (implicit) Modified: stable/8/usr.sbin/memcontrol/memcontrol.c Directory Properties: stable/8/usr.sbin/memcontrol/ (props changed) Modified: stable/8/usr.sbin/memcontrol/memcontrol.c ============================================================================== --- stable/8/usr.sbin/memcontrol/memcontrol.c Thu Oct 25 01:19:03 2012 (r242020) +++ stable/8/usr.sbin/memcontrol/memcontrol.c Thu Oct 25 01:20:19 2012 (r242021) @@ -235,7 +235,7 @@ setfunc(int memfd, int argc, char *argv[ while(argc--) { for (i = 0; attrnames[i].name != NULL; i++) { if (!strcmp(attrnames[i].name, argv[0])) { - if (!attrnames[i].kind & MDF_SETTABLE) + if (!(attrnames[i].kind & MDF_SETTABLE)) help("flags"); mrd.mr_flags |= attrnames[i].val; break; From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 01: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 6724371E; Thu, 25 Oct 2012 01:20:20 +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 4F49C8FC17; Thu, 25 Oct 2012 01: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 q9P1KKEO039418; Thu, 25 Oct 2012 01:20:20 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P1KKMP039413; Thu, 25 Oct 2012 01:20:20 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250120.q9P1KKMP039413@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 01:20:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242022 - stable/9/usr.sbin/memcontrol X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 01:20:20 -0000 Author: eadler Date: Thu Oct 25 01:20:19 2012 New Revision: 242022 URL: http://svn.freebsd.org/changeset/base/242022 Log: MFC r241829: Fix conditional expression: previously a bit vector was being operated on by a logical not instead of the entire expression. Approved by: cperciva (implicit) Modified: stable/9/usr.sbin/memcontrol/memcontrol.c Directory Properties: stable/9/usr.sbin/memcontrol/ (props changed) Modified: stable/9/usr.sbin/memcontrol/memcontrol.c ============================================================================== --- stable/9/usr.sbin/memcontrol/memcontrol.c Thu Oct 25 01:20:19 2012 (r242021) +++ stable/9/usr.sbin/memcontrol/memcontrol.c Thu Oct 25 01:20:19 2012 (r242022) @@ -235,7 +235,7 @@ setfunc(int memfd, int argc, char *argv[ while(argc--) { for (i = 0; attrnames[i].name != NULL; i++) { if (!strcmp(attrnames[i].name, argv[0])) { - if (!attrnames[i].kind & MDF_SETTABLE) + if (!(attrnames[i].kind & MDF_SETTABLE)) help("flags"); mrd.mr_flags |= attrnames[i].val; break; From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 01:20: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 09E1571F; Thu, 25 Oct 2012 01:20: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 E4D208FC08; Thu, 25 Oct 2012 01: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 q9P1KKBe039433; Thu, 25 Oct 2012 01:20:20 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P1KK76039431; Thu, 25 Oct 2012 01:20:20 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250120.q9P1KK76039431@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 01:20:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r242023 - stable/7/usr.sbin/memcontrol X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 01:20:21 -0000 Author: eadler Date: Thu Oct 25 01:20:20 2012 New Revision: 242023 URL: http://svn.freebsd.org/changeset/base/242023 Log: MFC r241829: Fix conditional expression: previously a bit vector was being operated on by a logical not instead of the entire expression. Approved by: cperciva (implicit) Modified: stable/7/usr.sbin/memcontrol/memcontrol.c Directory Properties: stable/7/usr.sbin/memcontrol/ (props changed) Modified: stable/7/usr.sbin/memcontrol/memcontrol.c ============================================================================== --- stable/7/usr.sbin/memcontrol/memcontrol.c Thu Oct 25 01:20:19 2012 (r242022) +++ stable/7/usr.sbin/memcontrol/memcontrol.c Thu Oct 25 01:20:20 2012 (r242023) @@ -235,7 +235,7 @@ setfunc(int memfd, int argc, char *argv[ while(argc--) { for (i = 0; attrnames[i].name != NULL; i++) { if (!strcmp(attrnames[i].name, argv[0])) { - if (!attrnames[i].kind & MDF_SETTABLE) + if (!(attrnames[i].kind & MDF_SETTABLE)) help("flags"); mrd.mr_flags |= attrnames[i].val; break; From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 01:23: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 D4ED5B87; Thu, 25 Oct 2012 01:23:41 +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 BD8498FC08; Thu, 25 Oct 2012 01:23: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 q9P1Nf6e040027; Thu, 25 Oct 2012 01:23:41 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P1NfV1040022; Thu, 25 Oct 2012 01:23:41 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250123.q9P1NfV1040022@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 01:23:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242024 - stable/8/usr.bin/netstat X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 01:23:41 -0000 Author: eadler Date: Thu Oct 25 01:23:41 2012 New Revision: 242024 URL: http://svn.freebsd.org/changeset/base/242024 Log: MFC r241838: Remove unused variable. Newer versions of gcc care. Approved by: cperciva (implicit) Modified: stable/8/usr.bin/netstat/route.c (contents, props changed) Directory Properties: stable/8/usr.bin/netstat/ (props changed) Modified: stable/8/usr.bin/netstat/route.c ============================================================================== --- stable/8/usr.bin/netstat/route.c Thu Oct 25 01:20:20 2012 (r242023) +++ stable/8/usr.bin/netstat/route.c Thu Oct 25 01:23:41 2012 (r242024) @@ -1108,10 +1108,8 @@ ipx_phost(struct sockaddr *sa) struct sockaddr_ipx work; static union ipx_net ipx_zeronet; char *p; - struct ipx_addr in; work = *sipx; - in = work.sipx_addr; work.sipx_addr.x_port = 0; work.sipx_addr.x_net = ipx_zeronet; From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 01:23: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 E312AB88; Thu, 25 Oct 2012 01:23:41 +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 CB3168FC12; Thu, 25 Oct 2012 01:23: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 q9P1Nf8d040033; Thu, 25 Oct 2012 01:23:41 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P1NfJB040025; Thu, 25 Oct 2012 01:23:41 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250123.q9P1NfJB040025@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 01:23:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242025 - stable/9/usr.bin/netstat X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 01:23:42 -0000 Author: eadler Date: Thu Oct 25 01:23:41 2012 New Revision: 242025 URL: http://svn.freebsd.org/changeset/base/242025 Log: MFC r241838: Remove unused variable. Newer versions of gcc care. Approved by: cperciva (implicit) Modified: stable/9/usr.bin/netstat/route.c Directory Properties: stable/9/usr.bin/netstat/ (props changed) Modified: stable/9/usr.bin/netstat/route.c ============================================================================== --- stable/9/usr.bin/netstat/route.c Thu Oct 25 01:23:41 2012 (r242024) +++ stable/9/usr.bin/netstat/route.c Thu Oct 25 01:23:41 2012 (r242025) @@ -1104,10 +1104,8 @@ ipx_phost(struct sockaddr *sa) struct sockaddr_ipx work; static union ipx_net ipx_zeronet; char *p; - struct ipx_addr in; work = *sipx; - in = work.sipx_addr; work.sipx_addr.x_port = 0; work.sipx_addr.x_net = ipx_zeronet; From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 01:23: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 B2EF7B89; Thu, 25 Oct 2012 01:23:42 +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 9B8828FC0A; Thu, 25 Oct 2012 01:23: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 q9P1NgZS040055; Thu, 25 Oct 2012 01:23:42 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P1NgbU040053; Thu, 25 Oct 2012 01:23:42 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250123.q9P1NgbU040053@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 01:23:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r242026 - stable/7/usr.bin/netstat X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 01:23:42 -0000 Author: eadler Date: Thu Oct 25 01:23:42 2012 New Revision: 242026 URL: http://svn.freebsd.org/changeset/base/242026 Log: MFC r241838: Remove unused variable. Newer versions of gcc care. Approved by: cperciva (implicit) Modified: stable/7/usr.bin/netstat/route.c Directory Properties: stable/7/usr.bin/netstat/ (props changed) Modified: stable/7/usr.bin/netstat/route.c ============================================================================== --- stable/7/usr.bin/netstat/route.c Thu Oct 25 01:23:41 2012 (r242025) +++ stable/7/usr.bin/netstat/route.c Thu Oct 25 01:23:42 2012 (r242026) @@ -1111,10 +1111,8 @@ ipx_phost(struct sockaddr *sa) struct sockaddr_ipx work; static union ipx_net ipx_zeronet; char *p; - struct ipx_addr in; work = *sipx; - in = work.sipx_addr; work.sipx_addr.x_port = 0; work.sipx_addr.x_net = ipx_zeronet; From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 01:27: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 466C01ED; Thu, 25 Oct 2012 01:27:02 +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 2C9F38FC19; Thu, 25 Oct 2012 01:27: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 q9P1R2Ed040677; Thu, 25 Oct 2012 01:27:02 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P1R1ra040675; Thu, 25 Oct 2012 01:27:01 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250127.q9P1R1ra040675@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 01:27:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242027 - stable/8/sys/xen/interface/foreign X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 01:27:02 -0000 Author: eadler Date: Thu Oct 25 01:27:01 2012 New Revision: 242027 URL: http://svn.freebsd.org/changeset/base/242027 Log: MFC r241833: Make xen python scripts work with python3 Approved by: cperciva (implicit) Modified: stable/8/sys/xen/interface/foreign/mkheader.py Directory Properties: stable/8/sys/ (props changed) stable/8/sys/xen/ (props changed) Modified: stable/8/sys/xen/interface/foreign/mkheader.py ============================================================================== --- stable/8/sys/xen/interface/foreign/mkheader.py Thu Oct 25 01:23:42 2012 (r242026) +++ stable/8/sys/xen/interface/foreign/mkheader.py Thu Oct 25 01:27:01 2012 (r242027) @@ -155,7 +155,7 @@ for struct in structs: output = re.sub("\\b(%s)_t\\b" % struct, "\\1_%s_t" % arch, output); # replace: integer types -integers = inttypes[arch].keys(); +integers = list(inttypes[arch].keys()); integers.sort(lambda a, b: cmp(len(b),len(a))); for type in integers: output = re.sub("\\b%s\\b" % type, inttypes[arch][type], output); From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 01:27: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 5B9EA1EE; Thu, 25 Oct 2012 01:27:02 +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 430CE8FC1A; Thu, 25 Oct 2012 01:27: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 q9P1R2Za040681; Thu, 25 Oct 2012 01:27:02 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P1R2Xd040679; Thu, 25 Oct 2012 01:27:02 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250127.q9P1R2Xd040679@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 01:27:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242028 - stable/9/sys/xen/interface/foreign X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 01:27:02 -0000 Author: eadler Date: Thu Oct 25 01:27:01 2012 New Revision: 242028 URL: http://svn.freebsd.org/changeset/base/242028 Log: MFC r241833: Make xen python scripts work with python3 Approved by: cperciva (implicit) Modified: stable/9/sys/xen/interface/foreign/mkheader.py Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/xen/interface/foreign/mkheader.py ============================================================================== --- stable/9/sys/xen/interface/foreign/mkheader.py Thu Oct 25 01:27:01 2012 (r242027) +++ stable/9/sys/xen/interface/foreign/mkheader.py Thu Oct 25 01:27:01 2012 (r242028) @@ -155,7 +155,7 @@ for struct in structs: output = re.sub("\\b(%s)_t\\b" % struct, "\\1_%s_t" % arch, output); # replace: integer types -integers = inttypes[arch].keys(); +integers = list(inttypes[arch].keys()); integers.sort(lambda a, b: cmp(len(b),len(a))); for type in integers: output = re.sub("\\b%s\\b" % type, inttypes[arch][type], output); From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 01: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 6ACA4710; Thu, 25 Oct 2012 01:46:21 +0000 (UTC) (envelope-from alfred@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 53A718FC0A; Thu, 25 Oct 2012 01: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 q9P1kLDE043706; Thu, 25 Oct 2012 01:46:21 GMT (envelope-from alfred@svn.freebsd.org) Received: (from alfred@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P1kLi8043704; Thu, 25 Oct 2012 01:46:21 GMT (envelope-from alfred@svn.freebsd.org) Message-Id: <201210250146.q9P1kLi8043704@svn.freebsd.org> From: Alfred Perlstein Date: Thu, 25 Oct 2012 01:46:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242029 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 01:46:21 -0000 Author: alfred Date: Thu Oct 25 01:46:20 2012 New Revision: 242029 URL: http://svn.freebsd.org/changeset/base/242029 Log: Allow autotune maxusers > 384 on 64 bit machines A default install on large memory machines with multiple 10gigE interfaces were not being given enough mbufs to do full bandwidth TCP or NFS traffic. To keep the value somewhat reasonable, we scale back the number of maxuers by 1/6 past the 384 point. This gives us enough mbufs for most of our pretty basic 10gigE line-speed tests to complete. Modified: head/sys/kern/subr_param.c Modified: head/sys/kern/subr_param.c ============================================================================== --- head/sys/kern/subr_param.c Thu Oct 25 01:27:01 2012 (r242028) +++ head/sys/kern/subr_param.c Thu Oct 25 01:46:20 2012 (r242029) @@ -278,8 +278,16 @@ init_param2(long physpages) maxusers = physpages / (2 * 1024 * 1024 / PAGE_SIZE); if (maxusers < 32) maxusers = 32; - if (maxusers > 384) - maxusers = 384; + /* + * Clips maxusers to 384 on machines with <= 4GB RAM or 32bit. + * Scales it down 6x for large memory machines. + */ + if (maxusers > 384) { + if (sizeof(void *) <= 4) + maxusers = 384; + else + maxusers = 384 + ((maxusers - 384) / 6); + } } /* From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 02:07: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 0CBF7AE1 for ; Thu, 25 Oct 2012 02:07:42 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 5AF408FC16 for ; Thu, 25 Oct 2012 02:07:40 +0000 (UTC) Received: (qmail 37904 invoked from network); 25 Oct 2012 03:45:24 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 25 Oct 2012 03:45:24 -0000 Message-ID: <50889EE0.8030105@freebsd.org> Date: Thu, 25 Oct 2012 04:07:28 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: attilio@FreeBSD.org Subject: Re: svn commit: r242014 - head/sys/kern References: <201210241836.q9OIafqo073002@svn.freebsd.org> <201210241443.25988.jhb@freebsd.org> <50884E9F.3090706@freebsd.org> <508855DA.1080903@freebsd.org> In-Reply-To: <508855DA.1080903@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Jim Harris , John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 02:07:42 -0000 On 24.10.2012 22:55, Andre Oppermann wrote: > On 24.10.2012 22:29, Attilio Rao wrote: >> On Wed, Oct 24, 2012 at 9:25 PM, Andre Oppermann wrote: >>> On 24.10.2012 21:06, Attilio Rao wrote: >>>> As I've already said in another thread __align() doesn't work on >>>> object declaration, so what that won't pad it either if it is global >>>> or part of a struct. >>>> It is just implemented as __attribute__((aligned(X))): >>>> http://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/Type-Attributes.html >>> >>> >>> Actually it seems gcc itself doesn't really care and it up to the >>> linker to honor that. >> >> Yes but the concept being that if you use __aligned() properly (when >> defining a struct) the object will be correctly sized, so you will get >> padding automatically. > > Yes. With __aligned() the start of the element/structure should > begin on an address evenly dividable by the align value *and* it > should pad out any remaining space up to the next evenly dividable > address. > > The problem we have is that is apparently doesn't work correctly > within gcc when creating structs nor within the linker when placing > such supposedly aligned structs in the .bss section (at least the > padding is missing). I spoke too soon. Attilio is completely right in his assessment. It does work when done on the struct definition: struct mtx { ... } __aligned(CACHE_LINE_SIZE); /* works including .bss alignment & padding */ When creating a struct (in globals at least) it doesn't work: struct mtx __aligned(CACHE_LINE_SIZE) foo_mtx; /* doesn't work */ > It seems to come down to either a) fixing gcc+ld; or b) hacking > around it by magically padding the structs that require it. The question now becomes of whether we can (should?) make the latter case above work or find another workaround. -- Andre From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 02: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 0322CC6B; Thu, 25 Oct 2012 02:12:06 +0000 (UTC) (envelope-from alfred@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D4CC68FC0C; Thu, 25 Oct 2012 02:12:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9P2C5RK047744; Thu, 25 Oct 2012 02:12:05 GMT (envelope-from alfred@svn.freebsd.org) Received: (from alfred@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P2C5XT047742; Thu, 25 Oct 2012 02:12:05 GMT (envelope-from alfred@svn.freebsd.org) Message-Id: <201210250212.q9P2C5XT047742@svn.freebsd.org> From: Alfred Perlstein Date: Thu, 25 Oct 2012 02:12:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242030 - head/usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 02:12:06 -0000 Author: alfred Date: Thu Oct 25 02:12:05 2012 New Revision: 242030 URL: http://svn.freebsd.org/changeset/base/242030 Log: Show the number of times we block waiting for mbufs. Machines can stall out because mbufs are low, however sometimes we won't see "requests denied", instead we see user land processes or kernel threads blocking waiting for mbufs because they set M_WAIT. These consumers do not see errors, only stalling. Unfortunately until now, netstat did not export this information so you could have experienced an mbuf shortage and have no way of seeing it unless you happen to run netstat at the exact time of the shortage and see "in use" = "max". By exporting the number of times processes are blocked, we can effectively see how often non-interrupt context threads are effectively "denied". MFC after: 2 weeks Modified: head/usr.bin/netstat/mbuf.c Modified: head/usr.bin/netstat/mbuf.c ============================================================================== --- head/usr.bin/netstat/mbuf.c Thu Oct 25 01:46:20 2012 (r242029) +++ head/usr.bin/netstat/mbuf.c Thu Oct 25 02:12:05 2012 (r242030) @@ -67,16 +67,18 @@ mbpr(void *kvmd, u_long mbaddr) struct memory_type_list *mtlp; struct memory_type *mtp; uintmax_t mbuf_count, mbuf_bytes, mbuf_free, mbuf_failures, mbuf_size; + uintmax_t mbuf_sleeps; uintmax_t cluster_count, cluster_bytes, cluster_limit, cluster_free; - uintmax_t cluster_failures, cluster_size; + uintmax_t cluster_failures, cluster_size, cluster_sleeps; uintmax_t packet_count, packet_bytes, packet_free, packet_failures; + uintmax_t packet_sleeps; uintmax_t tag_count, tag_bytes; uintmax_t jumbop_count, jumbop_bytes, jumbop_limit, jumbop_free; - uintmax_t jumbop_failures, jumbop_size; + uintmax_t jumbop_failures, jumbop_sleeps, jumbop_size; uintmax_t jumbo9_count, jumbo9_bytes, jumbo9_limit, jumbo9_free; - uintmax_t jumbo9_failures, jumbo9_size; + uintmax_t jumbo9_failures, jumbo9_sleeps, jumbo9_size; uintmax_t jumbo16_count, jumbo16_bytes, jumbo16_limit, jumbo16_free; - uintmax_t jumbo16_failures, jumbo16_size; + uintmax_t jumbo16_failures, jumbo16_sleeps, jumbo16_size; uintmax_t bytes_inuse, bytes_incache, bytes_total; int nsfbufs, nsfbufspeak, nsfbufsused; struct mbstat mbstat; @@ -121,6 +123,7 @@ mbpr(void *kvmd, u_long mbaddr) mbuf_bytes = memstat_get_bytes(mtp); mbuf_free = memstat_get_free(mtp); mbuf_failures = memstat_get_failures(mtp); + mbuf_sleeps = memstat_get_sleeps(mtp); mbuf_size = memstat_get_size(mtp); mtp = memstat_mtl_find(mtlp, ALLOCATOR_UMA, MBUF_PACKET_MEM_NAME); @@ -132,6 +135,7 @@ mbpr(void *kvmd, u_long mbaddr) packet_count = memstat_get_count(mtp); packet_bytes = memstat_get_bytes(mtp); packet_free = memstat_get_free(mtp); + packet_sleeps = memstat_get_sleeps(mtp); packet_failures = memstat_get_failures(mtp); mtp = memstat_mtl_find(mtlp, ALLOCATOR_UMA, MBUF_CLUSTER_MEM_NAME); @@ -145,6 +149,7 @@ mbpr(void *kvmd, u_long mbaddr) cluster_limit = memstat_get_countlimit(mtp); cluster_free = memstat_get_free(mtp); cluster_failures = memstat_get_failures(mtp); + cluster_sleeps = memstat_get_sleeps(mtp); cluster_size = memstat_get_size(mtp); mtp = memstat_mtl_find(mtlp, ALLOCATOR_MALLOC, MBUF_TAG_MEM_NAME); @@ -167,6 +172,7 @@ mbpr(void *kvmd, u_long mbaddr) jumbop_limit = memstat_get_countlimit(mtp); jumbop_free = memstat_get_free(mtp); jumbop_failures = memstat_get_failures(mtp); + jumbop_sleeps = memstat_get_sleeps(mtp); jumbop_size = memstat_get_size(mtp); mtp = memstat_mtl_find(mtlp, ALLOCATOR_UMA, MBUF_JUMBO9_MEM_NAME); @@ -180,6 +186,7 @@ mbpr(void *kvmd, u_long mbaddr) jumbo9_limit = memstat_get_countlimit(mtp); jumbo9_free = memstat_get_free(mtp); jumbo9_failures = memstat_get_failures(mtp); + jumbo9_sleeps = memstat_get_sleeps(mtp); jumbo9_size = memstat_get_size(mtp); mtp = memstat_mtl_find(mtlp, ALLOCATOR_UMA, MBUF_JUMBO16_MEM_NAME); @@ -193,6 +200,7 @@ mbpr(void *kvmd, u_long mbaddr) jumbo16_limit = memstat_get_countlimit(mtp); jumbo16_free = memstat_get_free(mtp); jumbo16_failures = memstat_get_failures(mtp); + jumbo16_sleeps = memstat_get_sleeps(mtp); jumbo16_size = memstat_get_size(mtp); printf("%ju/%ju/%ju mbufs in use (current/cache/total)\n", @@ -279,7 +287,13 @@ mbpr(void *kvmd, u_long mbaddr) printf("%ju/%ju/%ju requests for mbufs denied (mbufs/clusters/" "mbuf+clusters)\n", mbuf_failures, cluster_failures, packet_failures); - + printf("%ju/%ju/%ju requests for mbufs delayed (mbufs/clusters/" + "mbuf+clusters)\n", mbuf_sleeps, cluster_sleeps, + packet_sleeps); + + printf("%ju/%ju/%ju requests for jumbo clusters delayed " + "(%juk/9k/16k)\n", jumbop_sleeps, jumbo9_sleeps, + jumbo16_sleeps, jumbop_size / 1024); printf("%ju/%ju/%ju requests for jumbo clusters denied " "(%juk/9k/16k)\n", jumbop_failures, jumbo9_failures, jumbo16_failures, jumbop_size / 1024); From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 02:28: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 F020116D; Thu, 25 Oct 2012 02:27:59 +0000 (UTC) (envelope-from rpaulo@felyko.com) Received: from felyko.com (unknown [IPv6:2607:f2f8:a528::3:1337:ca7]) by mx1.freebsd.org (Postfix) with ESMTP id C35018FC0C; Thu, 25 Oct 2012 02:27:59 +0000 (UTC) Received: from [IPv6:2601:9:4d00:85:9565:f33:57b3:2256] (unknown [IPv6:2601:9:4d00:85:9565:f33:57b3:2256]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by felyko.com (Postfix) with ESMTPSA id CF5333981E; Wed, 24 Oct 2012 19:27:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=felyko.com; s=mail; t=1351132079; bh=SSr+IvQ/GAZyGQkaSzvk4fJSwxnkgqWA3WLDtaJHiec=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=RcxtQWBxGlHQbEfBfafL6K42cgE8RHs62k7FbwUfMZ4pAJA/29/u3pMERyzi74DDU 1k3rA4Xb49zyN6M+RQ3h6rGh7c+/fUYlOB8kEZLCpYs2Sx0iSKki2IvKN6zfuTRxnz kvhA4PSry/2A/rmVY/vEVwnRqnn91iVemA/T7b/k= Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: svn commit: r241916 - in head/sys: netinet netinet6 From: Rui Paulo In-Reply-To: Date: Wed, 24 Oct 2012 19:27:58 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <8AF29997-538D-44A0-AC35-62442168303D@felyko.com> References: <201210222149.q9MLnvrt014543@svn.freebsd.org> <20121023142219.K1008@besplex.bde.org> <20121024052525.T4723@besplex.bde.org> To: Michael Tuexen X-Mailer: Apple Mail (2.1499) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Xin LI , Bruce Evans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 02:28:00 -0000 On 23 Oct 2012, at 11:43, Michael Tuexen wrote: > * My comment was regarding your list of formatting issues of the code. = Changing > the formatting would require changing the export script. > If someone "just" changes the FreeBSD sources and these changes are = not included > upstream, they are lost by the next commit of rrs@ or mine. Is this why sometimes your commits include more changes than described = in the commit log and/or include style changes not mentioned in the log? = They are usually minimal changes that don't bother a discussion, but I = always wondered why. Regards, -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 02:38: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 6368C426; Thu, 25 Oct 2012 02:38:06 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4975B8FC0A; Thu, 25 Oct 2012 02:38: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 q9P2c6Is052056; Thu, 25 Oct 2012 02:38:06 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P2c69a052054; Thu, 25 Oct 2012 02:38:06 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201210250238.q9P2c69a052054@svn.freebsd.org> From: Warner Losh Date: Thu, 25 Oct 2012 02:38:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242031 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 02:38:06 -0000 Author: imp Date: Thu Oct 25 02:38:05 2012 New Revision: 242031 URL: http://svn.freebsd.org/changeset/base/242031 Log: We need ucmpdi2 for XLR and XLP when compiled in 32-bit mode. Include it here unconditionally while I figure out why "optional mips | mipsel" didn't work. Modified: head/sys/conf/files.mips Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Thu Oct 25 02:12:05 2012 (r242030) +++ head/sys/conf/files.mips Thu Oct 25 02:38:05 2012 (r242031) @@ -62,6 +62,7 @@ libkern/flsl.c standard libkern/lshrdi3.c standard libkern/memchr.c optional fdt libkern/memmove.c standard +libkern/ucmpdi2.c standard # Compat32 stuff compat/freebsd32/freebsd32_ioctl.c optional compat_freebsd32 From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 03:11: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 7873AF03; Thu, 25 Oct 2012 03:11:19 +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 5E4AE8FC17; Thu, 25 Oct 2012 03:11: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 q9P3BJjF057779; Thu, 25 Oct 2012 03:11:19 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P3BJa0057774; Thu, 25 Oct 2012 03:11:19 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250311.q9P3BJa0057774@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 03:11:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r242033 - stable/7/lib/libfetch X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 03:11:19 -0000 Author: eadler Date: Thu Oct 25 03:11:18 2012 New Revision: 242033 URL: http://svn.freebsd.org/changeset/base/242033 Log: MFC r241839: Be a bit more lenient in the maximum number of redirects allowed. Chrome and Firefox have a limit of 20. IE has a limit of 8. Approved by: cperciva (implicit) Modified: stable/7/lib/libfetch/http.c Directory Properties: stable/7/lib/libfetch/ (props changed) Modified: stable/7/lib/libfetch/http.c ============================================================================== --- stable/7/lib/libfetch/http.c Thu Oct 25 03:11:18 2012 (r242032) +++ stable/7/lib/libfetch/http.c Thu Oct 25 03:11:18 2012 (r242033) @@ -86,7 +86,7 @@ __FBSDID("$FreeBSD$"); #include "httperr.h" /* Maximum number of redirects to follow */ -#define MAX_REDIRECT 5 +#define MAX_REDIRECT 20 /* Symbolic names for reply codes we care about */ #define HTTP_OK 200 From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 03:11: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 78D6BF04; Thu, 25 Oct 2012 03:11:19 +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 5F3928FC18; Thu, 25 Oct 2012 03:11: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 q9P3BJk5057778; Thu, 25 Oct 2012 03:11:19 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P3BJZW057775; Thu, 25 Oct 2012 03:11:19 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250311.q9P3BJZW057775@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 03:11:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242032 - stable/9/lib/libfetch X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 03:11:19 -0000 Author: eadler Date: Thu Oct 25 03:11:18 2012 New Revision: 242032 URL: http://svn.freebsd.org/changeset/base/242032 Log: MFC r241839: Be a bit more lenient in the maximum number of redirects allowed. Chrome and Firefox have a limit of 20. IE has a limit of 8. Approved by: cperciva (implicit) Modified: stable/9/lib/libfetch/http.c Directory Properties: stable/9/lib/libfetch/ (props changed) Modified: stable/9/lib/libfetch/http.c ============================================================================== --- stable/9/lib/libfetch/http.c Thu Oct 25 02:38:05 2012 (r242031) +++ stable/9/lib/libfetch/http.c Thu Oct 25 03:11:18 2012 (r242032) @@ -86,7 +86,7 @@ __FBSDID("$FreeBSD$"); #include "httperr.h" /* Maximum number of redirects to follow */ -#define MAX_REDIRECT 5 +#define MAX_REDIRECT 20 /* Symbolic names for reply codes we care about */ #define HTTP_OK 200 From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 03:11: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 92645F05; Thu, 25 Oct 2012 03:11:19 +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 7A2348FC19; Thu, 25 Oct 2012 03:11: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 q9P3BJWm057783; Thu, 25 Oct 2012 03:11:19 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P3BJcl057781; Thu, 25 Oct 2012 03:11:19 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250311.q9P3BJcl057781@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 03:11:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242034 - stable/8/lib/libfetch X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 03:11:19 -0000 Author: eadler Date: Thu Oct 25 03:11:18 2012 New Revision: 242034 URL: http://svn.freebsd.org/changeset/base/242034 Log: MFC r241839: Be a bit more lenient in the maximum number of redirects allowed. Chrome and Firefox have a limit of 20. IE has a limit of 8. Approved by: cperciva (implicit) Modified: stable/8/lib/libfetch/http.c Directory Properties: stable/8/lib/libfetch/ (props changed) Modified: stable/8/lib/libfetch/http.c ============================================================================== --- stable/8/lib/libfetch/http.c Thu Oct 25 03:11:18 2012 (r242033) +++ stable/8/lib/libfetch/http.c Thu Oct 25 03:11:18 2012 (r242034) @@ -86,7 +86,7 @@ __FBSDID("$FreeBSD$"); #include "httperr.h" /* Maximum number of redirects to follow */ -#define MAX_REDIRECT 5 +#define MAX_REDIRECT 20 /* Symbolic names for reply codes we care about */ #define HTTP_OK 200 From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 03:12: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 942B039E; Thu, 25 Oct 2012 03:12:20 +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 79CDA8FC08; Thu, 25 Oct 2012 03:12: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 q9P3CK5j058025; Thu, 25 Oct 2012 03:12:20 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P3CKG3058022; Thu, 25 Oct 2012 03:12:20 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250312.q9P3CKG3058022@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 03:12:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242035 - stable/9/games/fortune/tools X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 03:12:20 -0000 Author: eadler Date: Thu Oct 25 03:12:20 2012 New Revision: 242035 URL: http://svn.freebsd.org/changeset/base/242035 Log: MFC r241834: Make do_uniq work with python3 Approved by: cperciva (implicit) Modified: stable/9/games/fortune/tools/do_uniq.py Directory Properties: stable/9/games/fortune/ (props changed) Modified: stable/9/games/fortune/tools/do_uniq.py ============================================================================== --- stable/9/games/fortune/tools/do_uniq.py Thu Oct 25 03:11:18 2012 (r242034) +++ stable/9/games/fortune/tools/do_uniq.py Thu Oct 25 03:12:20 2012 (r242035) @@ -34,26 +34,26 @@ def edit(datfile): for line in file(datfile): if line == "%\n": key = hash(fortune) - if not dups.has_key(key): + if key not in dups: dups[key] = [] dups[key].append(fortune) fortunes.append(fortune) fortune = "" else: fortune += line - for key in dups.keys(): + for key in list(dups.keys()): if len(dups[key]) == 1: del dups[key] o = file(datfile + '~', "w") for fortune in fortunes: key = hash(fortune) if key in dups: - print '\n' * 50 + print('\n' * 50) for f in dups[key]: if f != fortune: - print f, '%' - print fortune, '%' - if raw_input("Remove last fortune? ") == 'y': + print(f, '%') + print(fortune, '%') + if input("Remove last fortune? ") == 'y': del dups[key] continue o.write(fortune + "%\n") From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 03:12: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 340354CF; Thu, 25 Oct 2012 03:12:32 +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 132408FC08; Thu, 25 Oct 2012 03:12: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 q9P3CV9w058089; Thu, 25 Oct 2012 03:12:31 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P3CVkH058087; Thu, 25 Oct 2012 03:12:31 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250312.q9P3CVkH058087@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 03:12:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242036 - stable/8/games/fortune/tools X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 03:12:32 -0000 Author: eadler Date: Thu Oct 25 03:12:31 2012 New Revision: 242036 URL: http://svn.freebsd.org/changeset/base/242036 Log: MFC r241834: Make do_uniq work with python3 Approved by: cperciva (implicit) Modified: stable/8/games/fortune/tools/do_uniq.py Directory Properties: stable/8/games/fortune/ (props changed) Modified: stable/8/games/fortune/tools/do_uniq.py ============================================================================== --- stable/8/games/fortune/tools/do_uniq.py Thu Oct 25 03:12:20 2012 (r242035) +++ stable/8/games/fortune/tools/do_uniq.py Thu Oct 25 03:12:31 2012 (r242036) @@ -34,26 +34,26 @@ def edit(datfile): for line in file(datfile): if line == "%\n": key = hash(fortune) - if not dups.has_key(key): + if key not in dups: dups[key] = [] dups[key].append(fortune) fortunes.append(fortune) fortune = "" else: fortune += line - for key in dups.keys(): + for key in list(dups.keys()): if len(dups[key]) == 1: del dups[key] o = file(datfile + '~', "w") for fortune in fortunes: key = hash(fortune) if key in dups: - print '\n' * 50 + print('\n' * 50) for f in dups[key]: if f != fortune: - print f, '%' - print fortune, '%' - if raw_input("Remove last fortune? ") == 'y': + print(f, '%') + print(fortune, '%') + if input("Remove last fortune? ") == 'y': del dups[key] continue o.write(fortune + "%\n") From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 03:12: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 2F6A2507; Thu, 25 Oct 2012 03:12:35 +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 1769F8FC16; Thu, 25 Oct 2012 03:12: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 q9P3CYRU058129; Thu, 25 Oct 2012 03:12:34 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P3CYh7058127; Thu, 25 Oct 2012 03:12:34 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250312.q9P3CYh7058127@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 03:12:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r242037 - stable/7/games/fortune/tools X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 03:12:35 -0000 Author: eadler Date: Thu Oct 25 03:12:34 2012 New Revision: 242037 URL: http://svn.freebsd.org/changeset/base/242037 Log: MFC r241834: Make do_uniq work with python3 Approved by: cperciva (implicit) Modified: stable/7/games/fortune/tools/do_uniq.py Directory Properties: stable/7/games/fortune/ (props changed) Modified: stable/7/games/fortune/tools/do_uniq.py ============================================================================== --- stable/7/games/fortune/tools/do_uniq.py Thu Oct 25 03:12:31 2012 (r242036) +++ stable/7/games/fortune/tools/do_uniq.py Thu Oct 25 03:12:34 2012 (r242037) @@ -34,26 +34,26 @@ def edit(datfile): for line in file(datfile): if line == "%\n": key = hash(fortune) - if not dups.has_key(key): + if key not in dups: dups[key] = [] dups[key].append(fortune) fortunes.append(fortune) fortune = "" else: fortune += line - for key in dups.keys(): + for key in list(dups.keys()): if len(dups[key]) == 1: del dups[key] o = file(datfile + '~', "w") for fortune in fortunes: key = hash(fortune) if key in dups: - print '\n' * 50 + print('\n' * 50) for f in dups[key]: if f != fortune: - print f, '%' - print fortune, '%' - if raw_input("Remove last fortune? ") == 'y': + print(f, '%') + print(fortune, '%') + if input("Remove last fortune? ") == 'y': del dups[key] continue o.write(fortune + "%\n") From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 03:14: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 C40207E6; Thu, 25 Oct 2012 03:14:17 +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 ABFBB8FC0A; Thu, 25 Oct 2012 03:14: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 q9P3EH7j058543; Thu, 25 Oct 2012 03:14:17 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P3EH5A058535; Thu, 25 Oct 2012 03:14:17 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250314.q9P3EH5A058535@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 03:14:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242038 - stable/8/usr.sbin/nfsd X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 03:14:17 -0000 Author: eadler Date: Thu Oct 25 03:14:17 2012 New Revision: 242038 URL: http://svn.freebsd.org/changeset/base/242038 Log: MFC r241849: Fix typo in error when unable to create TCP socket PR: bin/172490 Approved by: cperciva (implicit) Modified: stable/8/usr.sbin/nfsd/nfsd.c Directory Properties: stable/8/usr.sbin/nfsd/ (props changed) Modified: stable/8/usr.sbin/nfsd/nfsd.c ============================================================================== --- stable/8/usr.sbin/nfsd/nfsd.c Thu Oct 25 03:12:34 2012 (r242037) +++ stable/8/usr.sbin/nfsd/nfsd.c Thu Oct 25 03:14:17 2012 (r242038) @@ -591,7 +591,7 @@ main(int argc, char **argv) if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) { syslog(LOG_ERR, - "can't create tpc socket"); + "can't create tcp socket"); nfsd_exit(1); } if (setsockopt(tcpsock, SOL_SOCKET, From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 03:14: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 417847E7; Thu, 25 Oct 2012 03:14:18 +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 292F28FC0C; Thu, 25 Oct 2012 03:14: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 q9P3EICu058560; Thu, 25 Oct 2012 03:14:18 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P3EHGR058558; Thu, 25 Oct 2012 03:14:17 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250314.q9P3EHGR058558@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 03:14:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242039 - stable/9/usr.sbin/nfsd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 03:14:18 -0000 Author: eadler Date: Thu Oct 25 03:14:17 2012 New Revision: 242039 URL: http://svn.freebsd.org/changeset/base/242039 Log: MFC r241849: Fix typo in error when unable to create TCP socket PR: bin/172490 Approved by: cperciva (implicit) Modified: stable/9/usr.sbin/nfsd/nfsd.c Directory Properties: stable/9/usr.sbin/nfsd/ (props changed) Modified: stable/9/usr.sbin/nfsd/nfsd.c ============================================================================== --- stable/9/usr.sbin/nfsd/nfsd.c Thu Oct 25 03:14:17 2012 (r242038) +++ stable/9/usr.sbin/nfsd/nfsd.c Thu Oct 25 03:14:17 2012 (r242039) @@ -590,7 +590,7 @@ main(int argc, char **argv) if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) { syslog(LOG_ERR, - "can't create tpc socket"); + "can't create tcp socket"); nfsd_exit(1); } if (setsockopt(tcpsock, SOL_SOCKET, From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 03:14: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 8008C7E8; Thu, 25 Oct 2012 03:14:18 +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 67AFC8FC12; Thu, 25 Oct 2012 03:14: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 q9P3EImm058575; Thu, 25 Oct 2012 03:14:18 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P3EIb8058573; Thu, 25 Oct 2012 03:14:18 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250314.q9P3EIb8058573@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 03:14:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r242040 - stable/7/usr.sbin/nfsd X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 03:14:18 -0000 Author: eadler Date: Thu Oct 25 03:14:17 2012 New Revision: 242040 URL: http://svn.freebsd.org/changeset/base/242040 Log: MFC r241849: Fix typo in error when unable to create TCP socket PR: bin/172490 Approved by: cperciva (implicit) Modified: stable/7/usr.sbin/nfsd/nfsd.c Directory Properties: stable/7/usr.sbin/nfsd/ (props changed) Modified: stable/7/usr.sbin/nfsd/nfsd.c ============================================================================== --- stable/7/usr.sbin/nfsd/nfsd.c Thu Oct 25 03:14:17 2012 (r242039) +++ stable/7/usr.sbin/nfsd/nfsd.c Thu Oct 25 03:14:17 2012 (r242040) @@ -496,7 +496,7 @@ main(int argc, char **argv) if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0) { syslog(LOG_ERR, - "can't create tpc socket"); + "can't create tcp socket"); nfsd_exit(1); } if (setsockopt(tcpsock, SOL_SOCKET, From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 03: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 E124AD3D; Thu, 25 Oct 2012 03:15:24 +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 C859C8FC0C; Thu, 25 Oct 2012 03: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 q9P3FOmK058846; Thu, 25 Oct 2012 03:15:24 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P3FOT1058844; Thu, 25 Oct 2012 03:15:24 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250315.q9P3FOT1058844@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 03:15:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242041 - stable/9/tools/regression/netinet/ip_id_period X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 03:15:25 -0000 Author: eadler Date: Thu Oct 25 03:15:24 2012 New Revision: 242041 URL: http://svn.freebsd.org/changeset/base/242041 Log: MFC r241832: Covert regression test to python 3 Approved by: cperciva (implicit) Modified: stable/9/tools/regression/netinet/ip_id_period/ip_id_period.py Directory Properties: stable/9/tools/regression/netinet/ (props changed) Modified: stable/9/tools/regression/netinet/ip_id_period/ip_id_period.py ============================================================================== --- stable/9/tools/regression/netinet/ip_id_period/ip_id_period.py Thu Oct 25 03:14:17 2012 (r242040) +++ stable/9/tools/regression/netinet/ip_id_period/ip_id_period.py Thu Oct 25 03:15:24 2012 (r242041) @@ -51,26 +51,26 @@ id_minperiod = {} count = 0 for line in open('results.txt').readlines(): id = int(line.split(' id ')[1].split(',')[0]) - if id_lastseen.has_key(id): + if id in id_lastseen: period = count - id_lastseen[id] - if not id_minperiod.has_key(id) or period < id_minperiod[id]: + if id not in id_minperiod or period < id_minperiod[id]: id_minperiod[id] = period id_lastseen[id] = count count += 1 -sorted_minperiod = zip(*reversed(zip(*id_minperiod.items()))) +sorted_minperiod = list(zip(*reversed(list(zip(*list(id_minperiod.items())))))) sorted_minperiod.sort() -print "Lowest 10 ID periods detected:" +print("Lowest 10 ID periods detected:") x = 0 while x < 10: id_tuple = sorted_minperiod.pop(0) - print "id: %d period: %d" % (id_tuple[1], id_tuple[0]) + print("id: %d period: %d" % (id_tuple[1], id_tuple[0])) x += 1 -print "Highest 10 ID periods detected:" +print("Highest 10 ID periods detected:") x = 0 while x < 10: id_tuple = sorted_minperiod.pop() - print "id: %d period: %d" % (id_tuple[1], id_tuple[0]) + print("id: %d period: %d" % (id_tuple[1], id_tuple[0])) x += 1 From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 03:15: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 B5911E46; Thu, 25 Oct 2012 03:15:33 +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 9C9818FC12; Thu, 25 Oct 2012 03:15: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 q9P3FXdg058898; Thu, 25 Oct 2012 03:15:33 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P3FXu2058896; Thu, 25 Oct 2012 03:15:33 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250315.q9P3FXu2058896@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 03:15:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242042 - stable/8/tools/regression/netinet/ip_id_period X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 03:15:33 -0000 Author: eadler Date: Thu Oct 25 03:15:33 2012 New Revision: 242042 URL: http://svn.freebsd.org/changeset/base/242042 Log: MFC r241832: Covert regression test to python 3 Approved by: cperciva (implicit) Modified: stable/8/tools/regression/netinet/ip_id_period/ip_id_period.py Directory Properties: stable/8/tools/regression/netinet/ (props changed) Modified: stable/8/tools/regression/netinet/ip_id_period/ip_id_period.py ============================================================================== --- stable/8/tools/regression/netinet/ip_id_period/ip_id_period.py Thu Oct 25 03:15:24 2012 (r242041) +++ stable/8/tools/regression/netinet/ip_id_period/ip_id_period.py Thu Oct 25 03:15:33 2012 (r242042) @@ -51,26 +51,26 @@ id_minperiod = {} count = 0 for line in open('results.txt').readlines(): id = int(line.split(' id ')[1].split(',')[0]) - if id_lastseen.has_key(id): + if id in id_lastseen: period = count - id_lastseen[id] - if not id_minperiod.has_key(id) or period < id_minperiod[id]: + if id not in id_minperiod or period < id_minperiod[id]: id_minperiod[id] = period id_lastseen[id] = count count += 1 -sorted_minperiod = zip(*reversed(zip(*id_minperiod.items()))) +sorted_minperiod = list(zip(*reversed(list(zip(*list(id_minperiod.items())))))) sorted_minperiod.sort() -print "Lowest 10 ID periods detected:" +print("Lowest 10 ID periods detected:") x = 0 while x < 10: id_tuple = sorted_minperiod.pop(0) - print "id: %d period: %d" % (id_tuple[1], id_tuple[0]) + print("id: %d period: %d" % (id_tuple[1], id_tuple[0])) x += 1 -print "Highest 10 ID periods detected:" +print("Highest 10 ID periods detected:") x = 0 while x < 10: id_tuple = sorted_minperiod.pop() - print "id: %d period: %d" % (id_tuple[1], id_tuple[0]) + print("id: %d period: %d" % (id_tuple[1], id_tuple[0])) x += 1 From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 03:17: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 20EF277; Thu, 25 Oct 2012 03:17:03 +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 0968E8FC0A; Thu, 25 Oct 2012 03:17: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 q9P3H2IT059217; Thu, 25 Oct 2012 03:17:02 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P3H2WZ059207; Thu, 25 Oct 2012 03:17:02 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250317.q9P3H2WZ059207@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 03:17:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242043 - stable/8/share/misc X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 03:17:03 -0000 Author: eadler Date: Thu Oct 25 03:17:02 2012 New Revision: 242043 URL: http://svn.freebsd.org/changeset/base/242043 Log: MFC r241893: Update re members to reality Approved by: cperciva (implicit) Modified: stable/8/share/misc/organization.dot Directory Properties: stable/8/share/misc/ (props changed) Modified: stable/8/share/misc/organization.dot ============================================================================== --- stable/8/share/misc/organization.dot Thu Oct 25 03:15:33 2012 (r242042) +++ stable/8/share/misc/organization.dot Thu Oct 25 03:17:02 2012 (r242043) @@ -32,7 +32,7 @@ doceng [label="Documentation Engineering portscommitters [label="Ports Committers\nports-committers@FreeBSD.org"] portmgr [label="Port Management Team\nportmgr@FreeBSD.org\ntabthorpe, marcus, bapt, beat,\nerwin, linimon, pav,\nitetcu, miwi"] portmgrsecretary [label="Port Management Team Secretary\nportmgr-secretary@FreeBSD.org\ntabthorpe"] -re [label="Primary Release Engineering Team\nre@FreeBSD.org\nkib, blackend, jpaetzel, hrs, kensmith,\nrwatson, bz"] +re [label="Primary Release Engineering Team\nre@FreeBSD.org\nkib, blackend, jpaetzel, hrs, kensmith"] secteam [label="Security Team\nsecteam@FreeBSD.org\nsimon, qingli, delphij,\nremko, philip, stas, cperciva,\ncsjp, rwatson, miwi, bz"] portssecteam [label="Ports Security Team\nports-secteam@FreeBSD.org\nmiwi, rea, swills, wxs,\njgh, sbz, eadler, zi, remko, simon"] secteamsecretary [label="Security Team Secretary\nsecteam-secretary@FreeBSD.org\nremko"] From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 03:17: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 5F60478; Thu, 25 Oct 2012 03:17:03 +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 47CDF8FC0C; Thu, 25 Oct 2012 03:17: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 q9P3H3fx059238; Thu, 25 Oct 2012 03:17:03 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P3H33F059235; Thu, 25 Oct 2012 03:17:03 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250317.q9P3H33F059235@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 03:17:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242044 - stable/9/share/misc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 03:17:03 -0000 Author: eadler Date: Thu Oct 25 03:17:02 2012 New Revision: 242044 URL: http://svn.freebsd.org/changeset/base/242044 Log: MFC r241893: Update re members to reality Approved by: cperciva (implicit) Modified: stable/9/share/misc/organization.dot Directory Properties: stable/9/share/misc/ (props changed) Modified: stable/9/share/misc/organization.dot ============================================================================== --- stable/9/share/misc/organization.dot Thu Oct 25 03:17:02 2012 (r242043) +++ stable/9/share/misc/organization.dot Thu Oct 25 03:17:02 2012 (r242044) @@ -32,7 +32,7 @@ doceng [label="Documentation Engineering portscommitters [label="Ports Committers\nports-committers@FreeBSD.org"] portmgr [label="Port Management Team\nportmgr@FreeBSD.org\ntabthorpe, marcus, bapt, beat,\nerwin, linimon, pav,\nitetcu, miwi"] portmgrsecretary [label="Port Management Team Secretary\nportmgr-secretary@FreeBSD.org\ntabthorpe"] -re [label="Primary Release Engineering Team\nre@FreeBSD.org\nkib, blackend, jpaetzel, hrs, kensmith,\nrwatson, bz"] +re [label="Primary Release Engineering Team\nre@FreeBSD.org\nkib, blackend, jpaetzel, hrs, kensmith"] secteam [label="Security Team\nsecteam@FreeBSD.org\nsimon, qingli, delphij,\nremko, philip, stas, cperciva,\ncsjp, rwatson, miwi, bz"] portssecteam [label="Ports Security Team\nports-secteam@FreeBSD.org\nmiwi, rea, swills, wxs,\njgh, sbz, eadler, zi, remko, simon"] secteamsecretary [label="Security Team Secretary\nsecteam-secretary@FreeBSD.org\nremko"] From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 03:17: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 1CAA679; Thu, 25 Oct 2012 03:17: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 048028FC12; Thu, 25 Oct 2012 03: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 q9P3H3dw059254; Thu, 25 Oct 2012 03:17:03 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P3H3rg059252; Thu, 25 Oct 2012 03:17:03 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250317.q9P3H3rg059252@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 03:17:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r242045 - stable/7/share/misc X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 03:17:04 -0000 Author: eadler Date: Thu Oct 25 03:17:03 2012 New Revision: 242045 URL: http://svn.freebsd.org/changeset/base/242045 Log: MFC r241893: Update re members to reality Approved by: cperciva (implicit) Modified: stable/7/share/misc/organization.dot Directory Properties: stable/7/share/misc/ (props changed) Modified: stable/7/share/misc/organization.dot ============================================================================== --- stable/7/share/misc/organization.dot Thu Oct 25 03:17:02 2012 (r242044) +++ stable/7/share/misc/organization.dot Thu Oct 25 03:17:03 2012 (r242045) @@ -32,7 +32,7 @@ doceng [label="Documentation Engineering portscommitters [label="Ports Committers\nports-committers@FreeBSD.org"] portmgr [label="Port Management Team\nportmgr@FreeBSD.org\ntabthorpe, marcus, bapt, beat,\nerwin, linimon, pav,\nitetcu, miwi"] portmgrsecretary [label="Port Management Team Secretary\nportmgr-secretary@FreeBSD.org\ntabthorpe"] -re [label="Primary Release Engineering Team\nre@FreeBSD.org\nkib, blackend, jpaetzel, hrs, kensmith,\nrwatson, bz"] +re [label="Primary Release Engineering Team\nre@FreeBSD.org\nkib, blackend, jpaetzel, hrs, kensmith"] secteam [label="Security Team\nsecteam@FreeBSD.org\nsimon, qingli, delphij,\nremko, philip, stas, cperciva,\ncsjp, rwatson, miwi, bz"] portssecteam [label="Ports Security Team\nports-secteam@FreeBSD.org\nmiwi, rea, swills, wxs,\njgh, sbz, eadler, zi, remko, simon"] secteamsecretary [label="Security Team Secretary\nsecteam-secretary@FreeBSD.org\nremko"] From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 03: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 132965A3; Thu, 25 Oct 2012 03:20: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 EF3888FC14; Thu, 25 Oct 2012 03:20: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 q9P3K0YV059948; Thu, 25 Oct 2012 03:20:00 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P3K0gB059936; Thu, 25 Oct 2012 03:20:00 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250320.q9P3K0gB059936@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 03:20:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242046 - in stable/8/games: bcd caesar X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 03:20:01 -0000 Author: eadler Date: Thu Oct 25 03:20:00 2012 New Revision: 242046 URL: http://svn.freebsd.org/changeset/base/242046 Log: MFC r241846: bcd isn't installed setuid. caesar isn't installed setuid. For the archaeologists: it seems this call originally came from NetBSD PR 5970 and 5945 PR: 172566 Approved by: cperciva (implicit) Modified: stable/8/games/bcd/bcd.c stable/8/games/caesar/caesar.c Directory Properties: stable/8/games/bcd/ (props changed) stable/8/games/caesar/ (props changed) Modified: stable/8/games/bcd/bcd.c ============================================================================== --- stable/8/games/bcd/bcd.c Thu Oct 25 03:17:03 2012 (r242045) +++ stable/8/games/bcd/bcd.c Thu Oct 25 03:20:00 2012 (r242046) @@ -133,9 +133,6 @@ main(int argc, char **argv) { char cardline[80]; - /* revoke setgid privileges */ - setgid(getgid()); - /* * The original bcd prompts with a "%" when reading from stdin, * but this seems kind of silly. So this one doesn't. Modified: stable/8/games/caesar/caesar.c ============================================================================== --- stable/8/games/caesar/caesar.c Thu Oct 25 03:17:03 2012 (r242045) +++ stable/8/games/caesar/caesar.c Thu Oct 25 03:20:00 2012 (r242046) @@ -86,9 +86,6 @@ main(int argc, char **argv) char *inbuf; int obs[26], try, winner; - /* revoke setgid privileges */ - setgid(getgid()); - if (argc > 1) printit(argv[1]); From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 03: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 3D28B5A4; Thu, 25 Oct 2012 03:20: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 24DE28FC16; Thu, 25 Oct 2012 03: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 q9P3K0mb059963; Thu, 25 Oct 2012 03:20:00 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P3K0ID059957; Thu, 25 Oct 2012 03:20:00 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250320.q9P3K0ID059957@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 03:20:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242047 - in stable/9/games: bcd caesar X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 03:20:01 -0000 Author: eadler Date: Thu Oct 25 03:20:00 2012 New Revision: 242047 URL: http://svn.freebsd.org/changeset/base/242047 Log: MFC r241846: bcd isn't installed setuid. caesar isn't installed setuid. For the archaeologists: it seems this call originally came from NetBSD PR 5970 and 5945 PR: 172566 Approved by: cperciva (implicit) Modified: stable/9/games/bcd/bcd.c stable/9/games/caesar/caesar.c Directory Properties: stable/9/games/bcd/ (props changed) stable/9/games/caesar/ (props changed) Modified: stable/9/games/bcd/bcd.c ============================================================================== --- stable/9/games/bcd/bcd.c Thu Oct 25 03:20:00 2012 (r242046) +++ stable/9/games/bcd/bcd.c Thu Oct 25 03:20:00 2012 (r242047) @@ -129,9 +129,6 @@ main(int argc, char **argv) { char cardline[80]; - /* revoke setgid privileges */ - setgid(getgid()); - /* * The original bcd prompts with a "%" when reading from stdin, * but this seems kind of silly. So this one doesn't. Modified: stable/9/games/caesar/caesar.c ============================================================================== --- stable/9/games/caesar/caesar.c Thu Oct 25 03:20:00 2012 (r242046) +++ stable/9/games/caesar/caesar.c Thu Oct 25 03:20:00 2012 (r242047) @@ -82,9 +82,6 @@ main(int argc, char **argv) char *inbuf; int obs[26], try, winner; - /* revoke setgid privileges */ - setgid(getgid()); - if (argc > 1) printit(argv[1]); From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 03:20: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 2B7055A5; Thu, 25 Oct 2012 03:20:02 +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 133D68FC08; Thu, 25 Oct 2012 03:20: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 q9P3K1pU059996; Thu, 25 Oct 2012 03:20:01 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P3K1Hh059992; Thu, 25 Oct 2012 03:20:01 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250320.q9P3K1Hh059992@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 03:20:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r242048 - in stable/7/games: bcd caesar X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 03:20:02 -0000 Author: eadler Date: Thu Oct 25 03:20:01 2012 New Revision: 242048 URL: http://svn.freebsd.org/changeset/base/242048 Log: MFC r241846: bcd isn't installed setuid. caesar isn't installed setuid. For the archaeologists: it seems this call originally came from NetBSD PR 5970 and 5945 PR: 172566 Approved by: cperciva (implicit) Modified: stable/7/games/bcd/bcd.c stable/7/games/caesar/caesar.c Directory Properties: stable/7/games/bcd/ (props changed) stable/7/games/caesar/ (props changed) Modified: stable/7/games/bcd/bcd.c ============================================================================== --- stable/7/games/bcd/bcd.c Thu Oct 25 03:20:00 2012 (r242047) +++ stable/7/games/bcd/bcd.c Thu Oct 25 03:20:01 2012 (r242048) @@ -133,9 +133,6 @@ main(int argc, char **argv) { char cardline[80]; - /* revoke setgid privileges */ - setgid(getgid()); - /* * The original bcd prompts with a "%" when reading from stdin, * but this seems kind of silly. So this one doesn't. Modified: stable/7/games/caesar/caesar.c ============================================================================== --- stable/7/games/caesar/caesar.c Thu Oct 25 03:20:00 2012 (r242047) +++ stable/7/games/caesar/caesar.c Thu Oct 25 03:20:01 2012 (r242048) @@ -86,9 +86,6 @@ main(int argc, char **argv) char *inbuf; int obs[26], try, winner; - /* revoke setgid privileges */ - setgid(getgid()); - if (argc > 1) printit(argv[1]); From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 03:21: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 B51C79FA; Thu, 25 Oct 2012 03:21:43 +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 9D0378FC16; Thu, 25 Oct 2012 03:21: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 q9P3LhMW060321; Thu, 25 Oct 2012 03:21:43 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P3Lhhj060319; Thu, 25 Oct 2012 03:21:43 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250321.q9P3Lhhj060319@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 03:21:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242049 - stable/9/sys/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 03:21:43 -0000 Author: eadler Date: Thu Oct 25 03:21:43 2012 New Revision: 242049 URL: http://svn.freebsd.org/changeset/base/242049 Log: MFC r241837: Fix build if COMPAT_43 is defined without one of COMPAT_FREEBSD[4567] Approved by: cperciva (implicit) Modified: stable/9/sys/sys/ipc.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/sys/ipc.h ============================================================================== --- stable/9/sys/sys/ipc.h Thu Oct 25 03:20:01 2012 (r242048) +++ stable/9/sys/sys/ipc.h Thu Oct 25 03:21:43 2012 (r242049) @@ -70,7 +70,8 @@ typedef __uid_t uid_t; #endif #if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ - defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) + defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) || \ + defined(COMPAT_43) struct ipc_perm_old { unsigned short cuid; /* creator user id */ unsigned short cgid; /* creator group id */ From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 03:21: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 109319FB; Thu, 25 Oct 2012 03:21:47 +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 ED0418FC0A; Thu, 25 Oct 2012 03:21: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 q9P3Lkn8060365; Thu, 25 Oct 2012 03:21:46 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P3LkOb060363; Thu, 25 Oct 2012 03:21:46 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250321.q9P3LkOb060363@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 03:21:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242050 - stable/8/sys/sys X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 03:21:47 -0000 Author: eadler Date: Thu Oct 25 03:21:46 2012 New Revision: 242050 URL: http://svn.freebsd.org/changeset/base/242050 Log: MFC r241837: Fix build if COMPAT_43 is defined without one of COMPAT_FREEBSD[4567] Approved by: cperciva (implicit) Modified: stable/8/sys/sys/ipc.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/sys/ (props changed) Modified: stable/8/sys/sys/ipc.h ============================================================================== --- stable/8/sys/sys/ipc.h Thu Oct 25 03:21:43 2012 (r242049) +++ stable/8/sys/sys/ipc.h Thu Oct 25 03:21:46 2012 (r242050) @@ -70,7 +70,8 @@ typedef __uid_t uid_t; #endif #if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ - defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) + defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) || \ + defined(COMPAT_43) struct ipc_perm_old { unsigned short cuid; /* creator user id */ unsigned short cgid; /* creator group id */ From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 03:24: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 CA998D05; Thu, 25 Oct 2012 03:24:24 +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 B1A258FC08; Thu, 25 Oct 2012 03:24: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 q9P3OOR6060827; Thu, 25 Oct 2012 03:24:24 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P3OOuE060825; Thu, 25 Oct 2012 03:24:24 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250324.q9P3OOuE060825@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 03:24:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242051 - stable/9/sbin/dumpfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 03:24:24 -0000 Author: eadler Date: Thu Oct 25 03:24:24 2012 New Revision: 242051 URL: http://svn.freebsd.org/changeset/base/242051 Log: MFC r241842: Add support for gjournal to dumpfs PR: 165821 Approved by: cperciva (implicit) Modified: stable/9/sbin/dumpfs/dumpfs.c Directory Properties: stable/9/sbin/dumpfs/ (props changed) Modified: stable/9/sbin/dumpfs/dumpfs.c ============================================================================== --- stable/9/sbin/dumpfs/dumpfs.c Thu Oct 25 03:21:46 2012 (r242050) +++ stable/9/sbin/dumpfs/dumpfs.c Thu Oct 25 03:24:24 2012 (r242051) @@ -419,6 +419,8 @@ marshal(const char *name) /* -i is dumb */ if (fs->fs_flags & FS_SUJ) printf("-j "); + if (fs->fs_flags & FS_GJOURNAL) + printf("-J "); /* -k..l unimplemented */ printf("-m %d ", fs->fs_minfree); /* -n unimplemented */ From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 03:27: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 2905BEA9; Thu, 25 Oct 2012 03:27:54 +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 0D5B58FC0A; Thu, 25 Oct 2012 03:27: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 q9P3Rrvh061473; Thu, 25 Oct 2012 03:27:53 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P3RrBK061470; Thu, 25 Oct 2012 03:27:53 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250327.q9P3RrBK061470@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 03:27:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242052 - stable/8/games/random X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 03:27:54 -0000 Author: eadler Date: Thu Oct 25 03:27:53 2012 New Revision: 242052 URL: http://svn.freebsd.org/changeset/base/242052 Log: MFC r241847: Free buf when its no longer used. This helps eliminate a static analysis warning. PR: ports/172566 Approved by: cperciva (implicit) Modified: stable/8/games/random/randomize_fd.c Directory Properties: stable/8/games/random/ (props changed) Modified: stable/8/games/random/randomize_fd.c ============================================================================== --- stable/8/games/random/randomize_fd.c Thu Oct 25 03:24:24 2012 (r242051) +++ stable/8/games/random/randomize_fd.c Thu Oct 25 03:27:53 2012 (r242052) @@ -207,6 +207,8 @@ randomize_fd(int fd, int type, int uniqu goto make_token; } + free(buf); + for (i = numnode; i > 0; i--) { selected = random() % numnode; From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 03:27: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 65952EAA; Thu, 25 Oct 2012 03:27:54 +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 4D90E8FC0C; Thu, 25 Oct 2012 03:27: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 q9P3Rsac061496; Thu, 25 Oct 2012 03:27:54 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P3Rsh8061486; Thu, 25 Oct 2012 03:27:54 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250327.q9P3Rsh8061486@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 03:27:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242053 - stable/9/games/random X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 03:27:54 -0000 Author: eadler Date: Thu Oct 25 03:27:53 2012 New Revision: 242053 URL: http://svn.freebsd.org/changeset/base/242053 Log: MFC r241847: Free buf when its no longer used. This helps eliminate a static analysis warning. PR: ports/172566 Approved by: cperciva (implicit) Modified: stable/9/games/random/randomize_fd.c Directory Properties: stable/9/games/random/ (props changed) Modified: stable/9/games/random/randomize_fd.c ============================================================================== --- stable/9/games/random/randomize_fd.c Thu Oct 25 03:27:53 2012 (r242052) +++ stable/9/games/random/randomize_fd.c Thu Oct 25 03:27:53 2012 (r242053) @@ -207,6 +207,8 @@ randomize_fd(int fd, int type, int uniqu goto make_token; } + free(buf); + for (i = numnode; i > 0; i--) { selected = random() % numnode; From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 03:27: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 995BFEAB; Thu, 25 Oct 2012 03:27:54 +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 814028FC12; Thu, 25 Oct 2012 03:27: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 q9P3RsQC061502; Thu, 25 Oct 2012 03:27:54 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P3RsdI061498; Thu, 25 Oct 2012 03:27:54 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250327.q9P3RsdI061498@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 03:27:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r242054 - stable/7/games/random X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 03:27:54 -0000 Author: eadler Date: Thu Oct 25 03:27:53 2012 New Revision: 242054 URL: http://svn.freebsd.org/changeset/base/242054 Log: MFC r241847: Free buf when its no longer used. This helps eliminate a static analysis warning. PR: ports/172566 Approved by: cperciva (implicit) Modified: stable/7/games/random/randomize_fd.c Directory Properties: stable/7/games/random/ (props changed) Modified: stable/7/games/random/randomize_fd.c ============================================================================== --- stable/7/games/random/randomize_fd.c Thu Oct 25 03:27:53 2012 (r242053) +++ stable/7/games/random/randomize_fd.c Thu Oct 25 03:27:53 2012 (r242054) @@ -201,6 +201,8 @@ randomize_fd(int fd, int type, int uniqu goto make_token; } + free(buf); + for (i = numnode; i > 0; i--) { selected = ((int)denom * random())/(((double)RAND_MAX + 1) / numnode); From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 03:29: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 9BB4034C; Thu, 25 Oct 2012 03:29: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 8334D8FC08; Thu, 25 Oct 2012 03:29: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 q9P3T9P3061785; Thu, 25 Oct 2012 03:29:09 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P3T99e061783; Thu, 25 Oct 2012 03:29:09 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250329.q9P3T99e061783@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 03:29:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242055 - stable/8/sys/vm X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 03:29:09 -0000 Author: eadler Date: Thu Oct 25 03:29:08 2012 New Revision: 242055 URL: http://svn.freebsd.org/changeset/base/242055 Log: MFC r241825: Print flags as hex instead of an integer. PR: kern/168210 Approved by: cperciva (implicit) Modified: stable/8/sys/vm/uma_core.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/vm/ (props changed) Modified: stable/8/sys/vm/uma_core.c ============================================================================== --- stable/8/sys/vm/uma_core.c Thu Oct 25 03:27:53 2012 (r242054) +++ stable/8/sys/vm/uma_core.c Thu Oct 25 03:29:08 2012 (r242055) @@ -1378,7 +1378,7 @@ keg_ctor(void *mem, int size, void *udat hash_alloc(&keg->uk_hash); #ifdef UMA_DEBUG - printf("UMA: %s(%p) size %d(%d) flags %d ipers %d ppera %d out %d free %d\n", + printf("UMA: %s(%p) size %d(%d) flags %#x ipers %d ppera %d out %d free %d\n", zone->uz_name, zone, keg->uk_size, keg->uk_rsize, keg->uk_flags, keg->uk_ipers, keg->uk_ppera, (keg->uk_ipers * keg->uk_pages) - keg->uk_free, keg->uk_free); @@ -3109,7 +3109,7 @@ uma_print_keg(uma_keg_t keg) { uma_slab_t slab; - printf("keg: %s(%p) size %d(%d) flags %d ipers %d ppera %d " + printf("keg: %s(%p) size %d(%d) flags %#x ipers %d ppera %d " "out %d free %d limit %d\n", keg->uk_name, keg, keg->uk_size, keg->uk_rsize, keg->uk_flags, keg->uk_ipers, keg->uk_ppera, @@ -3133,7 +3133,7 @@ uma_print_zone(uma_zone_t zone) uma_klink_t kl; int i; - printf("zone: %s(%p) size %d flags %d\n", + printf("zone: %s(%p) size %d flags %#x\n", zone->uz_name, zone, zone->uz_size, zone->uz_flags); LIST_FOREACH(kl, &zone->uz_kegs, kl_link) uma_print_keg(kl->kl_keg); From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 03:29:10 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 794B134D; Thu, 25 Oct 2012 03:29:10 +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 622108FC0A; Thu, 25 Oct 2012 03:29: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 q9P3TArb061806; Thu, 25 Oct 2012 03:29:10 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P3TAsI061804; Thu, 25 Oct 2012 03:29:10 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250329.q9P3TAsI061804@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 03:29:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242056 - stable/9/sys/vm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 03:29:10 -0000 Author: eadler Date: Thu Oct 25 03:29:09 2012 New Revision: 242056 URL: http://svn.freebsd.org/changeset/base/242056 Log: MFC r241825: Print flags as hex instead of an integer. PR: kern/168210 Approved by: cperciva (implicit) Modified: stable/9/sys/vm/uma_core.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/uma_core.c ============================================================================== --- stable/9/sys/vm/uma_core.c Thu Oct 25 03:29:08 2012 (r242055) +++ stable/9/sys/vm/uma_core.c Thu Oct 25 03:29:09 2012 (r242056) @@ -1384,7 +1384,7 @@ keg_ctor(void *mem, int size, void *udat hash_alloc(&keg->uk_hash); #ifdef UMA_DEBUG - printf("UMA: %s(%p) size %d(%d) flags %d ipers %d ppera %d out %d free %d\n", + printf("UMA: %s(%p) size %d(%d) flags %#x ipers %d ppera %d out %d free %d\n", zone->uz_name, zone, keg->uk_size, keg->uk_rsize, keg->uk_flags, keg->uk_ipers, keg->uk_ppera, (keg->uk_ipers * keg->uk_pages) - keg->uk_free, keg->uk_free); @@ -3116,7 +3116,7 @@ uma_print_keg(uma_keg_t keg) { uma_slab_t slab; - printf("keg: %s(%p) size %d(%d) flags %d ipers %d ppera %d " + printf("keg: %s(%p) size %d(%d) flags %#x ipers %d ppera %d " "out %d free %d limit %d\n", keg->uk_name, keg, keg->uk_size, keg->uk_rsize, keg->uk_flags, keg->uk_ipers, keg->uk_ppera, @@ -3140,7 +3140,7 @@ uma_print_zone(uma_zone_t zone) uma_klink_t kl; int i; - printf("zone: %s(%p) size %d flags %d\n", + printf("zone: %s(%p) size %d flags %#x\n", zone->uz_name, zone, zone->uz_size, zone->uz_flags); LIST_FOREACH(kl, &zone->uz_kegs, kl_link) uma_print_keg(kl->kl_keg); From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 03:30: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 1A844617; Thu, 25 Oct 2012 03:30:07 +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 021878FC0C; Thu, 25 Oct 2012 03:30: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 q9P3U662062057; Thu, 25 Oct 2012 03:30:06 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P3U6KF062055; Thu, 25 Oct 2012 03:30:06 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250330.q9P3U6KF062055@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 03:30:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242057 - stable/9/usr.bin/ar X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 03:30:07 -0000 Author: eadler Date: Thu Oct 25 03:30:06 2012 New Revision: 242057 URL: http://svn.freebsd.org/changeset/base/242057 Log: MFC r241827: Mark bsdar_errc as __dead2 to help code analysis tools. PR: bin/172636 Approved by: cperciva (implicit) Modified: stable/9/usr.bin/ar/ar.h Directory Properties: stable/9/usr.bin/ar/ (props changed) Modified: stable/9/usr.bin/ar/ar.h ============================================================================== --- stable/9/usr.bin/ar/ar.h Thu Oct 25 03:29:09 2012 (r242056) +++ stable/9/usr.bin/ar/ar.h Thu Oct 25 03:30:06 2012 (r242057) @@ -111,7 +111,7 @@ struct bsdar { }; void bsdar_errc(struct bsdar *, int _eval, int _code, - const char *fmt, ...); + const char *fmt, ...) __dead2; void bsdar_warnc(struct bsdar *, int _code, const char *fmt, ...); void ar_mode_d(struct bsdar *bsdar); void ar_mode_m(struct bsdar *bsdar); From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 03:30: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 988BB726; Thu, 25 Oct 2012 03:30:16 +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 815058FC0A; Thu, 25 Oct 2012 03:30: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 q9P3UGTn062124; Thu, 25 Oct 2012 03:30:16 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P3UGGH062122; Thu, 25 Oct 2012 03:30:16 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210250330.q9P3UGGH062122@svn.freebsd.org> From: Eitan Adler Date: Thu, 25 Oct 2012 03:30:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242058 - stable/8/usr.bin/ar X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 03:30:16 -0000 Author: eadler Date: Thu Oct 25 03:30:16 2012 New Revision: 242058 URL: http://svn.freebsd.org/changeset/base/242058 Log: MFC r241827: Mark bsdar_errc as __dead2 to help code analysis tools. PR: bin/172636 Approved by: cperciva (implicit) Modified: stable/8/usr.bin/ar/ar.h Directory Properties: stable/8/usr.bin/ar/ (props changed) Modified: stable/8/usr.bin/ar/ar.h ============================================================================== --- stable/8/usr.bin/ar/ar.h Thu Oct 25 03:30:06 2012 (r242057) +++ stable/8/usr.bin/ar/ar.h Thu Oct 25 03:30:16 2012 (r242058) @@ -111,7 +111,7 @@ struct bsdar { }; void bsdar_errc(struct bsdar *, int _eval, int _code, - const char *fmt, ...); + const char *fmt, ...) __dead2; void bsdar_warnc(struct bsdar *, int _code, const char *fmt, ...); void ar_mode_d(struct bsdar *bsdar); void ar_mode_m(struct bsdar *bsdar); From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 03:49: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 CCC2AC15; Thu, 25 Oct 2012 03:49:49 +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 531D98FC14; Thu, 25 Oct 2012 03:49:48 +0000 (UTC) Received: from c122-106-175-26.carlnfd1.nsw.optusnet.com.au (c122-106-175-26.carlnfd1.nsw.optusnet.com.au [122.106.175.26]) by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q9P3nhgq007946 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 25 Oct 2012 14:49:46 +1100 Date: Thu, 25 Oct 2012 14:49:43 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Attilio Rao Subject: Re: svn commit: r242014 - head/sys/kern In-Reply-To: Message-ID: <20121025142313.S999@besplex.bde.org> References: <201210241836.q9OIafqo073002@svn.freebsd.org> <50883EA8.1010308@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-Cloudmark-Score: 0 X-Optus-Cloudmark-Analysis: v=2.0 cv=I9g936cg c=1 sm=1 a=fifllNzL0S0A:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=M4roAWbnUW4A:10 a=6I5d2MoRAAAA:8 a=AQWRXLbQ4SBuP_IEzsMA:9 a=CjuIK1q_8ugA:10 a=SV7veod9ZcQA:10 a=bxQHXO5Py4tHmhUgaywp5w==:117 Cc: Adrian Chadd , src-committers@FreeBSD.org, Andre Oppermann , svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org, Jim Harris X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 03:49:50 -0000 On Wed, 24 Oct 2012, Attilio Rao wrote: > On Wed, Oct 24, 2012 at 8:16 PM, Andre Oppermann wrote: >> ... >> Let's go back and see how we can do this the sanest way. These are >> the options I see at the moment: >> >> 1. sprinkle __aligned(CACHE_LINE_SIZE) all over the place > > This is wrong because it doesn't give padding. Unless it is sprinkled in struct declarations. >> 2. use a macro like MTX_ALIGN that can be SMP/UP aware and in >> the future possibly change to a different compiler dependent >> align attribute > > What is this macro supposed to do? I don't understand that from your > description. > >> 3. embed __aligned(CACHE_LINE_SIZE) into struct mtx itself so it >> automatically gets aligned in all cases, even when dynamically >> allocated. > > This works but I think it is overkill for structures including sleep > mutexes which are the vast majority. So I wouldn't certainly be in > favor of such a patch. This doesn't work either with fully dynamic (auto) allocations. Stack alignment is generally broken (limited, and pessimized for both space and time) in gcc (it works better in clang). On amd64, it is limited by the default of -mpreferred-stack-boundary=4. Since 2**4 is smaller than the cache line size and stack alignments larger than it are broken in gcc, __aligned(CACHE_LINE_SIZE) never works (except accidentally, 16/CACHE_LINE_SIZE of the time. On i386, we reduce the space/time pessimizations a little by overriding the default to -mpreferred-stack-boundary=2. 2**2 is even smaller than the cache line size. (The pessimizations are for both space and time, since time and code space is wasted for the code to keep the stack aligned, and cache space and thus also time are wasted for padding. Most functions don't benefit from more than sizeof(register_t) alignment.) Dynamic allocations via malloc() get whatever alignment malloc() gives. This is only required to be 4 or 8 or 16 or so (the maximum for a C object declared in conforming C (no __align()), but malloc() usually gives more. If it gives CACHE_LINE_SIZE, that is wasteful for most small allocations. __builtin_alloca() is broken in gcc-3.3.3, but works in gcc-4.2.1, at least on i386. In gcc-3.3.3, it assumes that the stack is the default 16-byte aligned even if -mpreferred-stack-boundary=2 is in CFLAGS to say otherwise, and just subtracts from the stack pointer. In gcc-4.2.1, it does the necessary andl of the stack pointer, but only 16-byte alignment. It is another bug that there sre no extensions of malloc() or alloca(). Since malloc() is in the library and may give CACHE_LINE_SIZE but __builtin_alloca() is in the compiler and only gives 16, these functions are not even as compatible as they should be. I don't know of any mutexes allocated on the stack, but there are stack frames with mcontexts in them that need special alignment so they cause problems on i386. They can't just be put on the stack due to the above bugs. They are laboriously allocated using malloc(). Since they are a quite large, 1 mcontext barely fits on the kernel stack, so kib didn't like my alloca() method for allocating them. Bruce From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 04:10: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 20781A7; Thu, 25 Oct 2012 04:10:33 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 094388FC12; Thu, 25 Oct 2012 04:10: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 q9P4AWqQ069250; Thu, 25 Oct 2012 04:10:32 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P4AWNB069248; Thu, 25 Oct 2012 04:10:32 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201210250410.q9P4AWNB069248@svn.freebsd.org> From: Tim Kientzle Date: Thu, 25 Oct 2012 04:10:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242061 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 04:10:33 -0000 Author: kientzle Date: Thu Oct 25 04:10:32 2012 New Revision: 242061 URL: http://svn.freebsd.org/changeset/base/242061 Log: Support boot loaders in the standard kernel. Modified: head/sys/arm/conf/RPI-B Modified: head/sys/arm/conf/RPI-B ============================================================================== --- head/sys/arm/conf/RPI-B Thu Oct 25 04:08:26 2012 (r242060) +++ head/sys/arm/conf/RPI-B Thu Oct 25 04:10:32 2012 (r242061) @@ -30,6 +30,8 @@ options KERNPHYSADDR=0x00100000 makeoptions KERNPHYSADDR=0x00100000 options PHYSADDR=0x00000000 options STARTUP_PAGETABLE_ADDR=0x01000000 +options FREEBSD_BOOT_LOADER +options LINUX_BOOT_ABI makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols options HZ=100 From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 04:12: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 E74C7226; Thu, 25 Oct 2012 04:12:33 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CFB3D8FC08; Thu, 25 Oct 2012 04: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 q9P4CXP4069727; Thu, 25 Oct 2012 04:12:33 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P4CXgS069724; Thu, 25 Oct 2012 04:12:33 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201210250412.q9P4CXgS069724@svn.freebsd.org> From: Tim Kientzle Date: Thu, 25 Oct 2012 04:12:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242062 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 04:12:34 -0000 Author: kientzle Date: Thu Oct 25 04:12:33 2012 New Revision: 242062 URL: http://svn.freebsd.org/changeset/base/242062 Log: Everybody needs bpf. Modified: head/sys/arm/conf/PANDABOARD Modified: head/sys/arm/conf/PANDABOARD ============================================================================== --- head/sys/arm/conf/PANDABOARD Thu Oct 25 04:10:32 2012 (r242061) +++ head/sys/arm/conf/PANDABOARD Thu Oct 25 04:12:33 2012 (r242062) @@ -127,7 +127,7 @@ device da # Direct Access (disks) device miibus #device axe # ASIX Electronics USB Ethernet device smsc # SMSC LAN95xx USB Ethernet - +device bpf # OMAP-specific devices device ti_sdma From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 04:14: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 CB92E3A2; Thu, 25 Oct 2012 04:14:42 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B2BDD8FC08; Thu, 25 Oct 2012 04:14: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 q9P4EgRu070154; Thu, 25 Oct 2012 04:14:42 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P4EglS070152; Thu, 25 Oct 2012 04:14:42 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201210250414.q9P4EglS070152@svn.freebsd.org> From: Tim Kientzle Date: Thu, 25 Oct 2012 04:14:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242063 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 04:14:42 -0000 Author: kientzle Date: Thu Oct 25 04:14:42 2012 New Revision: 242063 URL: http://svn.freebsd.org/changeset/base/242063 Log: Support FreeBSD Boot loaders. Modified: head/sys/arm/conf/PANDABOARD Modified: head/sys/arm/conf/PANDABOARD ============================================================================== --- head/sys/arm/conf/PANDABOARD Thu Oct 25 04:12:33 2012 (r242062) +++ head/sys/arm/conf/PANDABOARD Thu Oct 25 04:14:42 2012 (r242063) @@ -67,6 +67,7 @@ options SYSVMSG #SYSV-style message q options SYSVSEM #SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev +options FREEBSD_BOOT_LOADER options PREEMPTION From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 04:21: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 875CB592; Thu, 25 Oct 2012 04:21:06 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 701318FC16; Thu, 25 Oct 2012 04:21: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 q9P4L6wC071343; Thu, 25 Oct 2012 04:21:06 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P4L6oV071340; Thu, 25 Oct 2012 04:21:06 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201210250421.q9P4L6oV071340@svn.freebsd.org> From: Warner Losh Date: Thu, 25 Oct 2012 04:21:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242064 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 04:21:06 -0000 Author: imp Date: Thu Oct 25 04:21:05 2012 New Revision: 242064 URL: http://svn.freebsd.org/changeset/base/242064 Log: List all the mips MACHINE_ARCH values in the options file to allow conditional inclusion based on the MACHINE_ARCH we're compiling for. Make ucmpdi2 conditional on mips or mipsel. Modified: head/sys/conf/files.mips head/sys/conf/options.mips Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Thu Oct 25 04:14:42 2012 (r242063) +++ head/sys/conf/files.mips Thu Oct 25 04:21:05 2012 (r242064) @@ -62,7 +62,7 @@ libkern/flsl.c standard libkern/lshrdi3.c standard libkern/memchr.c optional fdt libkern/memmove.c standard -libkern/ucmpdi2.c standard +libkern/ucmpdi2.c optional mips | mipsel # Compat32 stuff compat/freebsd32/freebsd32_ioctl.c optional compat_freebsd32 Modified: head/sys/conf/options.mips ============================================================================== --- head/sys/conf/options.mips Thu Oct 25 04:14:42 2012 (r242063) +++ head/sys/conf/options.mips Thu Oct 25 04:21:05 2012 (r242064) @@ -39,6 +39,13 @@ CPU_RMI opt_global.h CPU_NLM opt_global.h CPU_BERI opt_global.h +# which MACHINE_ARCH architecture +MIPS +MIPSEL +MIPS64 +MIPS64EL +MIPSN32 + COMPAT_FREEBSD32 opt_compat.h YAMON opt_global.h From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 04:30: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 462F99C5; Thu, 25 Oct 2012 04:30:49 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 247088FC18; Thu, 25 Oct 2012 04:30: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 q9P4UmtQ073136; Thu, 25 Oct 2012 04:30:48 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P4UmPE073130; Thu, 25 Oct 2012 04:30:48 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201210250430.q9P4UmPE073130@svn.freebsd.org> From: Warner Losh Date: Thu, 25 Oct 2012 04:30:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242066 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 04:30:49 -0000 Author: imp Date: Thu Oct 25 04:30:48 2012 New Revision: 242066 URL: http://svn.freebsd.org/changeset/base/242066 Log: Hoist the MI compat_freebsd32 files up into files from files.*. Modified: head/sys/conf/files head/sys/conf/files.amd64 head/sys/conf/files.ia64 head/sys/conf/files.mips head/sys/conf/files.powerpc Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Oct 25 04:29:21 2012 (r242065) +++ head/sys/conf/files Thu Oct 25 04:30:48 2012 (r242066) @@ -270,6 +270,10 @@ cddl/contrib/opensolaris/uts/common/zmod cddl/contrib/opensolaris/uts/common/zmod/zmod.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/zmod/zmod_subr.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/zmod/zutil.c optional zfs compile-with "${ZFS_C}" +compat/freebsd32/freebsd32_ioctl.c optional compat_freebsd32 +compat/freebsd32/freebsd32_misc.c optional compat_freebsd32 +compat/freebsd32/freebsd32_syscalls.c optional compat_freebsd32 +compat/freebsd32/freebsd32_sysent.c optional compat_freebsd32 contrib/altq/altq/altq_cbq.c optional altq \ compile-with "${NORMAL_C}" contrib/altq/altq/altq_cdnr.c optional altq @@ -2573,6 +2577,7 @@ kern/clock_if.m standard kern/cpufreq_if.m standard kern/device_if.m standard kern/imgact_elf.c standard +kern/imgact_elf32.c optional compat_freebsd32 kern/imgact_shell.c standard kern/inflate.c optional gzip kern/init_main.c standard Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Thu Oct 25 04:29:21 2012 (r242065) +++ head/sys/conf/files.amd64 Thu Oct 25 04:30:48 2012 (r242066) @@ -403,14 +403,9 @@ amd64/ia32/ia32_signal.c optional compat amd64/ia32/ia32_sigtramp.S optional compat_freebsd32 amd64/ia32/ia32_syscall.c optional compat_freebsd32 amd64/ia32/ia32_misc.c optional compat_freebsd32 -compat/freebsd32/freebsd32_ioctl.c optional compat_freebsd32 -compat/freebsd32/freebsd32_misc.c optional compat_freebsd32 -compat/freebsd32/freebsd32_syscalls.c optional compat_freebsd32 -compat/freebsd32/freebsd32_sysent.c optional compat_freebsd32 compat/ia32/ia32_sysvec.c optional compat_freebsd32 compat/linprocfs/linprocfs.c optional linprocfs compat/linsysfs/linsysfs.c optional linsysfs -kern/imgact_elf32.c optional compat_freebsd32 # # Linux/i386 binary support # Modified: head/sys/conf/files.ia64 ============================================================================== --- head/sys/conf/files.ia64 Thu Oct 25 04:29:21 2012 (r242065) +++ head/sys/conf/files.ia64 Thu Oct 25 04:30:48 2012 (r242066) @@ -29,10 +29,6 @@ ukbdmap.h optional ukbd_dflt_keymap \ clean "ukbdmap.h" # cddl/contrib/opensolaris/common/atomic/ia64/opensolaris_atomic.S optional zfs compile-with "${ZFS_S}" -compat/freebsd32/freebsd32_ioctl.c optional compat_freebsd32 -compat/freebsd32/freebsd32_misc.c optional compat_freebsd32 -compat/freebsd32/freebsd32_syscalls.c optional compat_freebsd32 -compat/freebsd32/freebsd32_sysent.c optional compat_freebsd32 compat/ia32/ia32_sysvec.c optional compat_freebsd32 contrib/ia64/libuwx/src/uwx_bstream.c standard contrib/ia64/libuwx/src/uwx_context.c standard @@ -119,7 +115,6 @@ ia64/isa/isa_dma.c optional isa ia64/pci/pci_cfgreg.c optional pci isa/syscons_isa.c optional sc isa/vga_isa.c optional vga -kern/imgact_elf32.c optional compat_freebsd32 kern/kern_clocksource.c standard libkern/bcmp.c standard libkern/ffsl.c standard Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Thu Oct 25 04:29:21 2012 (r242065) +++ head/sys/conf/files.mips Thu Oct 25 04:30:48 2012 (r242066) @@ -18,6 +18,7 @@ mips/mips/dump_machdep.c standard mips/mips/elf_machdep.c standard mips/mips/exception.S standard mips/mips/fp.S standard +mips/mips/freebsd32_machdep.c optional compat_freebsd32 mips/mips/gdb_machdep.c standard mips/mips/in_cksum.c optional inet mips/mips/libkern_machdep.c standard @@ -64,14 +65,6 @@ libkern/memchr.c optional fdt libkern/memmove.c standard libkern/ucmpdi2.c optional mips | mipsel -# Compat32 stuff -compat/freebsd32/freebsd32_ioctl.c optional compat_freebsd32 -compat/freebsd32/freebsd32_misc.c optional compat_freebsd32 -compat/freebsd32/freebsd32_syscalls.c optional compat_freebsd32 -compat/freebsd32/freebsd32_sysent.c optional compat_freebsd32 -kern/imgact_elf32.c optional compat_freebsd32 -mips/mips/freebsd32_machdep.c optional compat_freebsd32 - # cfe support dev/cfe/cfe_api.c optional cfe dev/cfe/cfe_console.c optional cfe_console Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Thu Oct 25 04:29:21 2012 (r242065) +++ head/sys/conf/files.powerpc Thu Oct 25 04:30:48 2012 (r242066) @@ -234,10 +234,3 @@ powerpc/wii/wii_pic.c optional wii powerpc/wii/wii_fb.c optional wii powerpc/wii/wii_gpio.c optional wiigpio powerpc/wii/wii_ipc.c optional wii - -compat/freebsd32/freebsd32_ioctl.c optional compat_freebsd32 -compat/freebsd32/freebsd32_misc.c optional compat_freebsd32 -compat/freebsd32/freebsd32_syscalls.c optional compat_freebsd32 -compat/freebsd32/freebsd32_sysent.c optional compat_freebsd32 -kern/imgact_elf32.c optional compat_freebsd32 - From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 04:33: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 9C28BB9B; Thu, 25 Oct 2012 04:33:48 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 80F1A8FC08; Thu, 25 Oct 2012 04:33: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 q9P4Xm5v073734; Thu, 25 Oct 2012 04:33:48 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P4XmVS073732; Thu, 25 Oct 2012 04:33:48 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201210250433.q9P4XmVS073732@svn.freebsd.org> From: Tim Kientzle Date: Thu, 25 Oct 2012 04:33:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242067 - head/sys/arm/ti/cpsw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 04:33:48 -0000 Author: kientzle Date: Thu Oct 25 04:33:47 2012 New Revision: 242067 URL: http://svn.freebsd.org/changeset/base/242067 Log: Refer to headers locally. This makes it a lot easier to build this driver out-of-tree. Modified: head/sys/arm/ti/cpsw/if_cpsw.c Modified: head/sys/arm/ti/cpsw/if_cpsw.c ============================================================================== --- head/sys/arm/ti/cpsw/if_cpsw.c Thu Oct 25 04:30:48 2012 (r242066) +++ head/sys/arm/ti/cpsw/if_cpsw.c Thu Oct 25 04:33:47 2012 (r242067) @@ -69,8 +69,8 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include +#include "if_cpswreg.h" +#include "if_cpswvar.h" #include From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 04:37: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 1398DD46; Thu, 25 Oct 2012 04:37:48 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D29F38FC14; Thu, 25 Oct 2012 04:37: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 q9P4blXo074469; Thu, 25 Oct 2012 04:37:47 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P4blcV074467; Thu, 25 Oct 2012 04:37:47 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201210250437.q9P4blcV074467@svn.freebsd.org> From: Tim Kientzle Date: Thu, 25 Oct 2012 04:37:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242068 - head/sys/arm/ti/cpsw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 04:37:48 -0000 Author: kientzle Date: Thu Oct 25 04:37:47 2012 New Revision: 242068 URL: http://svn.freebsd.org/changeset/base/242068 Log: Do proper padding of runt packets using code copied from bge(4). Reviewed by: gnn Modified: head/sys/arm/ti/cpsw/if_cpsw.c Modified: head/sys/arm/ti/cpsw/if_cpsw.c ============================================================================== --- head/sys/arm/ti/cpsw/if_cpsw.c Thu Oct 25 04:33:47 2012 (r242067) +++ head/sys/arm/ti/cpsw/if_cpsw.c Thu Oct 25 04:37:47 2012 (r242068) @@ -581,8 +581,8 @@ cpsw_encap(struct cpsw_softc *sc, struct bd.next = 0; bd.bufptr = seg->ds_addr; bd.bufoff = 0; - bd.buflen = (seg->ds_len < 64 ? 64 : seg->ds_len); - bd.pktlen = (seg->ds_len < 64 ? 64 : seg->ds_len); + bd.buflen = seg->ds_len; + bd.pktlen = seg->ds_len; /* Set OWNERSHIP, SOP, EOP */ bd.flags = (7<<13); @@ -599,6 +599,49 @@ cpsw_encap(struct cpsw_softc *sc, struct return (0); } +/* + * Pad the packet to the minimum length for Ethernet. + * (CPSW hardware doesn't do this for us.) + */ +static int +cpsw_pad(struct mbuf *m) +{ + int padlen = ETHER_MIN_LEN - m->m_pkthdr.len; + struct mbuf *last, *n; + + if (padlen <= 0) + return (0); + + /* If there's only the packet-header and we can pad there, use it. */ + if (m->m_pkthdr.len == m->m_len && M_WRITABLE(m) && + M_TRAILINGSPACE(m) >= padlen) { + last = m; + } else { + /* + * Walk packet chain to find last mbuf. We will either + * pad there, or append a new mbuf and pad it. + */ + for (last = m; last->m_next != NULL; last = last->m_next) + ; + if (!(M_WRITABLE(last) && M_TRAILINGSPACE(last) >= padlen)) { + /* Allocate new empty mbuf, pad it. Compact later. */ + MGET(n, M_DONTWAIT, MT_DATA); + if (n == NULL) + return (ENOBUFS); + n->m_len = 0; + last->m_next = n; + last = n; + } + } + + /* Now zero the pad area. */ + memset(mtod(last, caddr_t) + last->m_len, 0, padlen); + last->m_len += padlen; + m->m_pkthdr.len += padlen; + + return (0); +} + static void cpsw_start(struct ifnet *ifp) { @@ -615,6 +658,7 @@ cpsw_start_locked(struct ifnet *ifp) struct cpsw_softc *sc = ifp->if_softc; struct mbuf *m0, *mtmp; uint32_t queued = 0; + int error; CPSW_TX_LOCK_ASSERT(sc); @@ -628,6 +672,11 @@ cpsw_start_locked(struct ifnet *ifp) if (m0 == NULL) break; + if ((error = cpsw_pad(m0))) { + m_freem(m0); + continue; + } + mtmp = m_defrag(m0, M_NOWAIT); if (mtmp) m0 = mtmp; From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 04:39: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 F1233EB7; Thu, 25 Oct 2012 04:39:19 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D9E498FC12; Thu, 25 Oct 2012 04:39: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 q9P4dJU7074779; Thu, 25 Oct 2012 04:39:19 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P4dJDx074777; Thu, 25 Oct 2012 04:39:19 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201210250439.q9P4dJDx074777@svn.freebsd.org> From: Warner Losh Date: Thu, 25 Oct 2012 04:39:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242069 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 04:39:20 -0000 Author: imp Date: Thu Oct 25 04:39:19 2012 New Revision: 242069 URL: http://svn.freebsd.org/changeset/base/242069 Log: Remove redunant geom_bsd and geom_mbr definitions. They are in files. Modified: head/sys/conf/files.arm Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Thu Oct 25 04:37:47 2012 (r242068) +++ head/sys/conf/files.arm Thu Oct 25 04:39:19 2012 (r242069) @@ -65,10 +65,6 @@ dev/kbd/kbd.c optional sc dev/syscons/scgfbrndr.c optional sc dev/syscons/scterm-teken.c optional sc dev/syscons/scvtb.c optional sc -geom/geom_bsd.c optional geom_bsd -geom/geom_bsd_enc.c optional geom_bsd -geom/geom_mbr.c optional geom_mbr -geom/geom_mbr_enc.c optional geom_mbr libkern/arm/divsi3.S standard libkern/arm/ffs.S standard libkern/arm/muldi3.c standard From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 04:41: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 03C32C3; Thu, 25 Oct 2012 04:41:17 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail13.syd.optusnet.com.au (mail13.syd.optusnet.com.au [211.29.132.194]) by mx1.freebsd.org (Postfix) with ESMTP id 870868FC08; Thu, 25 Oct 2012 04:41:16 +0000 (UTC) Received: from c122-106-175-26.carlnfd1.nsw.optusnet.com.au (c122-106-175-26.carlnfd1.nsw.optusnet.com.au [122.106.175.26]) by mail13.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q9P4f7ug027280 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 25 Oct 2012 15:41:14 +1100 Date: Thu, 25 Oct 2012 15:41:06 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Andre Oppermann Subject: Re: svn commit: r242014 - head/sys/kern In-Reply-To: <50889EE0.8030105@freebsd.org> Message-ID: <20121025145158.R999@besplex.bde.org> References: <201210241836.q9OIafqo073002@svn.freebsd.org> <201210241443.25988.jhb@freebsd.org> <50884E9F.3090706@freebsd.org> <508855DA.1080903@freebsd.org> <50889EE0.8030105@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: src-committers@FreeBSD.org, John Baldwin , svn-src-all@FreeBSD.org, attilio@FreeBSD.org, svn-src-head@FreeBSD.org, Jim Harris X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 04:41:17 -0000 On Thu, 25 Oct 2012, Andre Oppermann wrote: > ... > I spoke too soon. Attilio is completely right in his assessment. > > It does work when done on the struct definition: > > struct mtx { > ... > } __aligned(CACHE_LINE_SIZE); /* works including .bss alignment & padding > */ > > When creating a struct (in globals at least) it doesn't work: > > struct mtx __aligned(CACHE_LINE_SIZE) foo_mtx; /* doesn't work */ > >> It seems to come down to either a) fixing gcc+ld; or b) hacking >> around it by magically padding the structs that require it. > > The question now becomes of whether we can (should?) make the latter > case above work or find another workaround. The latter case already works correctly. The alignment directive only specifies the alignment requirement for the start of the object. The size of the object is whatever it is, and there is no directive for padding. Consider an array of objects: struct mtx __aligned(CACHE_LINE_SIZE) foo_mtx[128]; This aligns the first element in the array. There is no way that it can do special alignment for other elements. The elements must follow each other, with no padding in between. The struct size is whatever it is and is already padded for the correct alignment as known at the time of the struct declaration, and you can't change its size later. I once wrote the following mistake which gave excessive alignment, but also sort or what you want: static double __aligned(64) P1 = ..., P2 = ..., P3 = ...; This was intended to align the first double to 64 bytes and have the others follow with no padding, much like what would happen if the variables were in an array (they are named Pn mainly because this looks nicer than P[n]). What it actually does is align all the variables to 64 bytes and waste a lot of space and cache resources. The linker might fill in the gaps, but at least with static variables in a small program, it won't be able to find enough variables to fill them all. With static variables in a large program, dummy variables could probably be provided to fill in the gaps. For global mutexes, I would try putting them all in the same struct starting at a page boundary, a bit like pcpu, so that I can control the layout of them all. Bruce From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 04:44: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 5FF23253; Thu, 25 Oct 2012 04:44:18 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 489BD8FC14; Thu, 25 Oct 2012 04:44: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 q9P4iIe9075647; Thu, 25 Oct 2012 04:44:18 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P4iImF075645; Thu, 25 Oct 2012 04:44:18 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201210250444.q9P4iImF075645@svn.freebsd.org> From: Warner Losh Date: Thu, 25 Oct 2012 04:44:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242070 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 04:44:18 -0000 Author: imp Date: Thu Oct 25 04:44:17 2012 New Revision: 242070 URL: http://svn.freebsd.org/changeset/base/242070 Log: Restore r184194 | marcel | 2008-10-22 20:16:38 -0600 (Wed, 22 Oct 2008) | 11 lines which made geom_bsd and geom_mbr optional. They are redundant with the DEFAULTS BSD and MBR support for g_part, which is standard. Modified: head/sys/conf/files.mips Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Thu Oct 25 04:39:19 2012 (r242069) +++ head/sys/conf/files.mips Thu Oct 25 04:44:17 2012 (r242070) @@ -48,12 +48,6 @@ kern/kern_clocksource.c standard kern/link_elf_obj.c standard kern/subr_dummy_vdso_tc.c standard -# Common geom we need to support: MBR and BSD -geom/geom_bsd.c standard -geom/geom_bsd_enc.c standard -geom/geom_mbr.c standard -geom/geom_mbr_enc.c standard - # gcc/clang runtime libkern/ashldi3.c standard libkern/ashrdi3.c standard From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 04:46: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 538653DE; Thu, 25 Oct 2012 04:46:59 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E7328FC14; Thu, 25 Oct 2012 04: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 q9P4kwxP076098; Thu, 25 Oct 2012 04:46:58 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P4kwtD076097; Thu, 25 Oct 2012 04:46:58 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201210250446.q9P4kwtD076097@svn.freebsd.org> From: Warner Losh Date: Thu, 25 Oct 2012 04:46:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242071 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 04:46:59 -0000 Author: imp Date: Thu Oct 25 04:46:58 2012 New Revision: 242071 URL: http://svn.freebsd.org/changeset/base/242071 Log: This file is somewhat obsolete (last updated in 1995) list of #if code in the kernel. Retire it rather than catch up with the last 17 years. Deleted: head/sys/conf/defines From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 04:55: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 23AC65A2; Thu, 25 Oct 2012 04:55:05 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C7058FC0A; Thu, 25 Oct 2012 04:55:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9P4t4ma077547; Thu, 25 Oct 2012 04:55:04 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P4t4GD077545; Thu, 25 Oct 2012 04:55:04 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201210250455.q9P4t4GD077545@svn.freebsd.org> From: Warner Losh Date: Thu, 25 Oct 2012 04:55:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242072 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 04:55:05 -0000 Author: imp Date: Thu Oct 25 04:55:04 2012 New Revision: 242072 URL: http://svn.freebsd.org/changeset/base/242072 Log: Remove the links: target. It too is homelessly outdated since it relies on the outdated defines list. It likely hasn't been useful in 15 years, and certainly not in the last decade. Modified: head/sys/conf/kern.post.mk Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Thu Oct 25 04:46:58 2012 (r242071) +++ head/sys/conf/kern.post.mk Thu Oct 25 04:55:04 2012 (r242072) @@ -154,7 +154,7 @@ ${mfile:T:S/.m$/.h/}: ${mfile} kernel-clean: rm -f *.o *.so *.So *.ko *.s eddep errs \ ${FULLKERNEL} ${KERNEL_KO} ${KERNEL_KO}.symbols \ - linterrs makelinks tags vers.c \ + linterrs tags vers.c \ vnode_if.c vnode_if.h vnode_if_newproto.h vnode_if_typedef.h \ ${MFILES:T:S/.m$/.c/} ${MFILES:T:S/.m$/.h/} \ ${CLEAN} @@ -237,14 +237,6 @@ ${_ILINKS}: kernel-cleandepend: rm -f .depend ${_ILINKS} -links: - egrep '#if' ${CFILES} | sed -f $S/conf/defines | \ - sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink - ${MAKE} -V CFILES | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ - sort -u | comm -23 - dontlink | \ - sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks - sh makelinks; rm -f dontlink - kernel-tags: @[ -f .depend ] || { echo "you must make depend first"; exit 1; } sh $S/conf/systags.sh From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 05:20: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 06978865; Thu, 25 Oct 2012 05:20:42 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail04.syd.optusnet.com.au (mail04.syd.optusnet.com.au [211.29.132.185]) by mx1.freebsd.org (Postfix) with ESMTP id 7454C8FC12; Thu, 25 Oct 2012 05:20:41 +0000 (UTC) Received: from c122-106-175-26.carlnfd1.nsw.optusnet.com.au (c122-106-175-26.carlnfd1.nsw.optusnet.com.au [122.106.175.26]) by mail04.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q9P5KaS4014846 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 25 Oct 2012 16:20:39 +1100 Date: Thu, 25 Oct 2012 16:20:36 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Warner Losh Subject: Re: svn commit: r241886 - head/lib/msun/src In-Reply-To: <201210221320.q9MDKVTQ018108@svn.freebsd.org> Message-ID: <20121025162014.N1376@besplex.bde.org> References: <201210221320.q9MDKVTQ018108@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-Cloudmark-Score: 0 X-Optus-Cloudmark-Analysis: v=2.0 cv=eJBLFwV1 c=1 sm=1 a=pFyB1K6thUMA:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=Aet6fyW9sl8A:10 a=Av6KpgbhFWwH7a7ehPwA:9 a=CjuIK1q_8ugA:10 a=bxQHXO5Py4tHmhUgaywp5w==:117 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 05:20:42 -0000 On Mon, 22 Oct 2012, Warner Losh wrote: > Log: > Revert r241755 Thanks. Bruce From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 05:22: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 26605A07; Thu, 25 Oct 2012 05:22:26 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 043458FC08; Thu, 25 Oct 2012 05:22: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 q9P5MP81081972; Thu, 25 Oct 2012 05:22:25 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P5MPAT081969; Thu, 25 Oct 2012 05:22:25 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201210250522.q9P5MPAT081969@svn.freebsd.org> From: Warner Losh Date: Thu, 25 Oct 2012 05:22:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242073 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 05:22:26 -0000 Author: imp Date: Thu Oct 25 05:22:25 2012 New Revision: 242073 URL: http://svn.freebsd.org/changeset/base/242073 Log: Sort and remove a few long-obsolete comments. Modified: head/sys/conf/files.arm Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Thu Oct 25 04:55:04 2012 (r242072) +++ head/sys/conf/files.arm Thu Oct 25 05:22:25 2012 (r242073) @@ -1,11 +1,4 @@ # $FreeBSD$ -font.h optional sc \ - compile-with "uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x16.fnt && file2c 'u_char dflt_font_16[16*256] = {' '};' < ${SC_DFLT_FONT}-8x16 > font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x14.fnt && file2c 'u_char dflt_font_14[14*256] = {' '};' < ${SC_DFLT_FONT}-8x14 >> font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x8.fnt && file2c 'u_char dflt_font_8[8*256] = {' '};' < ${SC_DFLT_FONT}-8x8 >> font.h" \ - no-obj no-implicit-rule before-depend \ - clean "font.h ${SC_DFLT_FONT}-8x14 ${SC_DFLT_FONT}-8x16 ${SC_DFLT_FONT}-8x8" - -crypto/blowfish/bf_enc.c optional crypto | ipsec -crypto/des/des_enc.c optional crypto | ipsec arm/arm/autoconf.c standard arm/arm/bcopy_page.S standard arm/arm/bcopyinout.S standard @@ -58,13 +51,25 @@ arm/arm/vfp.c optional vfp arm/fpe-arm/armfpe_glue.S optional armfpe arm/fpe-arm/armfpe_init.c optional armfpe arm/fpe-arm/armfpe.S optional armfpe +board_id.h standard \ + dependency "$S/arm/conf/genboardid.awk $S/arm/conf/mach-types" \ + compile-with "${AWK} -f $S/arm/conf/genboardid.awk $S/arm/conf/mach-types > board_id.h" \ + no-obj no-implicit-rule before-depend \ + clean "board_id.h" cddl/compat/opensolaris/kern/opensolaris_atomic.c optional zfs compile-with "${ZFS_C}" +crypto/blowfish/bf_enc.c optional crypto | ipsec +crypto/des/des_enc.c optional crypto | ipsec dev/fb/fb.c optional sc dev/hwpmc/hwpmc_arm.c optional hwpmc dev/kbd/kbd.c optional sc dev/syscons/scgfbrndr.c optional sc dev/syscons/scterm-teken.c optional sc dev/syscons/scvtb.c optional sc +font.h optional sc \ + compile-with "uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x16.fnt && file2c 'u_char dflt_font_16[16*256] = {' '};' < ${SC_DFLT_FONT}-8x16 > font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x14.fnt && file2c 'u_char dflt_font_14[14*256] = {' '};' < ${SC_DFLT_FONT}-8x14 >> font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x8.fnt && file2c 'u_char dflt_font_8[8*256] = {' '};' < ${SC_DFLT_FONT}-8x8 >> font.h" \ + no-obj no-implicit-rule before-depend \ + clean "font.h ${SC_DFLT_FONT}-8x14 ${SC_DFLT_FONT}-8x16 ${SC_DFLT_FONT}-8x8" +kern/subr_dummy_vdso_tc.c standard libkern/arm/divsi3.S standard libkern/arm/ffs.S standard libkern/arm/muldi3.c standard @@ -81,13 +86,3 @@ libkern/qdivrem.c standard libkern/ucmpdi2.c standard libkern/udivdi3.c standard libkern/umoddi3.c standard -#XXX: We can't use these versions, as strcmp.c is included conf/files -#libkern/arm/strcmp.S standard -#libkern/arm/strncmp.S standard -# -kern/subr_dummy_vdso_tc.c standard -board_id.h standard \ - dependency "$S/arm/conf/genboardid.awk $S/arm/conf/mach-types" \ - compile-with "${AWK} -f $S/arm/conf/genboardid.awk $S/arm/conf/mach-types > board_id.h" \ - no-obj no-implicit-rule before-depend \ - clean "board_id.h" From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 08:05: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 88A7E551; Thu, 25 Oct 2012 08:05:58 +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 074B68FC08; Thu, 25 Oct 2012 08:05:57 +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 q9P863I1028237; Thu, 25 Oct 2012 11:06:03 +0300 (EEST) (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 q9P85pvQ038985; Thu, 25 Oct 2012 11:05:51 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q9P85p6Z038984; Thu, 25 Oct 2012 11:05:51 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 25 Oct 2012 11:05:51 +0300 From: Konstantin Belousov To: Alfred Perlstein Subject: Re: svn commit: r242029 - head/sys/kern Message-ID: <20121025080551.GG35915@deviant.kiev.zoral.com.ua> References: <201210250146.q9P1kLi8043704@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KgZklqIqQBPBi6XE" Content-Disposition: inline In-Reply-To: <201210250146.q9P1kLi8043704@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) 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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 08:05:58 -0000 --KgZklqIqQBPBi6XE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 25, 2012 at 01:46:21AM +0000, Alfred Perlstein wrote: > Author: alfred > Date: Thu Oct 25 01:46:20 2012 > New Revision: 242029 > URL: http://svn.freebsd.org/changeset/base/242029 >=20 > Log: > Allow autotune maxusers > 384 on 64 bit machines > =20 > A default install on large memory machines with multiple 10gigE interfa= ces > were not being given enough mbufs to do full bandwidth TCP or NFS traff= ic. > =20 > To keep the value somewhat reasonable, we scale back the number of > maxuers by 1/6 past the 384 point. This gives us enough mbufs for most > of our pretty basic 10gigE line-speed tests to complete. >=20 > Modified: > head/sys/kern/subr_param.c >=20 > Modified: head/sys/kern/subr_param.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/kern/subr_param.c Thu Oct 25 01:27:01 2012 (r242028) > +++ head/sys/kern/subr_param.c Thu Oct 25 01:46:20 2012 (r242029) > @@ -278,8 +278,16 @@ init_param2(long physpages) > maxusers =3D physpages / (2 * 1024 * 1024 / PAGE_SIZE); > if (maxusers < 32) > maxusers =3D 32; > - if (maxusers > 384) > - maxusers =3D 384; > + /* > + * Clips maxusers to 384 on machines with <=3D 4GB RAM or 32bit. > + * Scales it down 6x for large memory machines. > + */ > + if (maxusers > 384) { > + if (sizeof(void *) <=3D 4) > + maxusers =3D 384; > + else > + maxusers =3D 384 + ((maxusers - 384) / 6); > + } This is unbelievably weird way to express the '64bit'. The #ifdef _LP64 is enough there instead of the runtime check. Also, are you sure that all our 64bit arches do not have KVA limitations ? --KgZklqIqQBPBi6XE Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlCI8t4ACgkQC3+MBN1Mb4jjMACgrmWZ2+UxyxftDso2yCApjU9M KOkAoMXY4ogVT9jYPN5m5YLv1JzuZ2s5 =4QlO -----END PGP SIGNATURE----- --KgZklqIqQBPBi6XE-- From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 08:37: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 945A7F50; Thu, 25 Oct 2012 08:37:09 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7902B8FC17; Thu, 25 Oct 2012 08:37: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 q9P8b9S1012404; Thu, 25 Oct 2012 08:37:09 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P8b9ur012402; Thu, 25 Oct 2012 08:37:09 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <201210250837.q9P8b9ur012402@svn.freebsd.org> From: Brian Somers Date: Thu, 25 Oct 2012 08:37:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242074 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 08:37:09 -0000 Author: brian Date: Thu Oct 25 08:37:08 2012 New Revision: 242074 URL: http://svn.freebsd.org/changeset/base/242074 Log: Enable "accept_rtadvd" on interfaces running rtadvd. Without this, rtadvd runs but never advertises a default (IPv6) route. MFC after: 1 week Modified: head/etc/rc.d/rtadvd Modified: head/etc/rc.d/rtadvd ============================================================================== --- head/etc/rc.d/rtadvd Thu Oct 25 05:22:25 2012 (r242073) +++ head/etc/rc.d/rtadvd Thu Oct 25 08:37:08 2012 (r242074) @@ -36,17 +36,24 @@ rtadvd_precmd() # case ${rtadvd_interfaces} in [Aa][Uu][Tt][Oo]|'') + command_args= for i in `list_net_interfaces`; do case $i in lo0) continue ;; esac if ipv6if $i; then - rtadvd_interfaces="${rtadvd_interfaces} ${i}" + command_args="${command_args} ${i}" fi done ;; + *) + command_args="${rtadvd_interfaces}" + ;; esac - command_args="${rtadvd_interfaces}" + + for iface in ${command_args}; do + ifconfig ${iface} inet6 -accept_rtadv + done # Enable Router Renumbering, unicast case # (use correct src/dst addr) From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 08:38: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 1159F151; Thu, 25 Oct 2012 08:38:44 +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 EADF38FC0C; Thu, 25 Oct 2012 08:38: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 q9P8chg0012682; Thu, 25 Oct 2012 08:38:43 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P8chPe012680; Thu, 25 Oct 2012 08:38:43 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201210250838.q9P8chPe012680@svn.freebsd.org> From: Kevin Lo Date: Thu, 25 Oct 2012 08:38:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242075 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 08:38:44 -0000 Author: kevlo Date: Thu Oct 25 08:38:43 2012 New Revision: 242075 URL: http://svn.freebsd.org/changeset/base/242075 Log: Fix MINCLSIZE. It should be MHLEN + 1. Reviewed by: glebius Modified: head/share/man/man9/mbuf.9 Modified: head/share/man/man9/mbuf.9 ============================================================================== --- head/share/man/man9/mbuf.9 Thu Oct 25 08:37:08 2012 (r242074) +++ head/share/man/man9/mbuf.9 Thu Oct 25 08:38:43 2012 (r242075) @@ -331,10 +331,9 @@ The system defines an advisory macro .Dv MINCLSIZE , which is the smallest amount of data to put into an .Vt mbuf cluster . -It is equal to the sum of -.Dv MLEN -and -.Dv MHLEN . +It is equal to +.Dv MHLEN +plus one. It is typically preferable to store data into the data region of an .Vt mbuf , if size permits, as opposed to allocating a separate From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 09:00: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 B1708BEC; Thu, 25 Oct 2012 09:00:57 +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 96D618FC12; Thu, 25 Oct 2012 09:00: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 q9P90v54016347; Thu, 25 Oct 2012 09:00:57 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P90vb5016345; Thu, 25 Oct 2012 09:00:57 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210250900.q9P90vb5016345@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 25 Oct 2012 09:00:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242076 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 09:00:57 -0000 Author: glebius Date: Thu Oct 25 09:00:57 2012 New Revision: 242076 URL: http://svn.freebsd.org/changeset/base/242076 Log: Fix error in r241913 that had broken fragment reassembly. Modified: head/sys/netinet/ip_input.c Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Thu Oct 25 08:38:43 2012 (r242075) +++ head/sys/netinet/ip_input.c Thu Oct 25 09:00:57 2012 (r242076) @@ -904,7 +904,7 @@ found: * Make sure that fragments have a data length * that's a non-zero multiple of 8 bytes. */ - if (ntohs(ip->ip_len) == 0 || (ntohs(ip->ip_len & 0x7) != 0)) { + if (ip->ip_len == htons(0) || (ntohs(ip->ip_len) & 0x7) != 0) { IPSTAT_INC(ips_toosmall); /* XXX */ goto dropfrag; } From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 09:02: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 D1D5FE18; Thu, 25 Oct 2012 09:02:21 +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 B9D0A8FC0A; Thu, 25 Oct 2012 09:02: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 q9P92L31016621; Thu, 25 Oct 2012 09:02:21 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P92LBr016618; Thu, 25 Oct 2012 09:02:21 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210250902.q9P92LBr016618@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 25 Oct 2012 09:02:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242077 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 09:02:21 -0000 Author: glebius Date: Thu Oct 25 09:02:21 2012 New Revision: 242077 URL: http://svn.freebsd.org/changeset/base/242077 Log: After r241923 the updated ip_len no longer needed. Modified: head/sys/netinet/ip_input.c Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Thu Oct 25 09:00:57 2012 (r242076) +++ head/sys/netinet/ip_input.c Thu Oct 25 09:02:21 2012 (r242077) @@ -728,7 +728,6 @@ ours: ip = mtod(m, struct ip *); /* Get the header length of the reassembled packet */ hlen = ip->ip_hl << 2; - ip_len = ntohs(ip->ip_len); } #ifdef IPSEC From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 09:05: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 EF7CBFE9; Thu, 25 Oct 2012 09:05:21 +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 D73F38FC0A; Thu, 25 Oct 2012 09:05: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 q9P95L96017141; Thu, 25 Oct 2012 09:05:21 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P95L2I017137; Thu, 25 Oct 2012 09:05:21 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201210250905.q9P95L2I017137@svn.freebsd.org> From: Ed Schouten Date: Thu, 25 Oct 2012 09:05:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242078 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 09:05:22 -0000 Author: ed Date: Thu Oct 25 09:05:21 2012 New Revision: 242078 URL: http://svn.freebsd.org/changeset/base/242078 Log: Correct SIGTTIN handling. In the old TTY layer, SIGTTIN was correctly handled like this: while (data should be read) { send SIGTTIN if not foreground process group read data } In the new TTY layer, however, this behaviour was changed, based on a false interpretation of the standard: send SIGTTIN if not foreground process group while (data should be read) { read data } Correct this by pushing tty_wait_background() into the ttydisc_read_*() functions. Reported by: koitsu PR: kern/173010 MFC after: 2 weeks Modified: head/sys/kern/tty.c head/sys/kern/tty_ttydisc.c head/sys/sys/tty.h Modified: head/sys/kern/tty.c ============================================================================== --- head/sys/kern/tty.c Thu Oct 25 09:02:21 2012 (r242077) +++ head/sys/kern/tty.c Thu Oct 25 09:05:21 2012 (r242078) @@ -361,7 +361,7 @@ tty_is_ctty(struct tty *tp, struct proc return (p->p_session == tp->t_session && p->p_flag & P_CONTROLT); } -static int +int tty_wait_background(struct tty *tp, struct thread *td, int sig) { struct proc *p = td->td_proc; @@ -433,13 +433,6 @@ ttydev_read(struct cdev *dev, struct uio error = ttydev_enter(tp); if (error) goto done; - - error = tty_wait_background(tp, curthread, SIGTTIN); - if (error) { - tty_unlock(tp); - goto done; - } - error = ttydisc_read(tp, uio, ioflag); tty_unlock(tp); Modified: head/sys/kern/tty_ttydisc.c ============================================================================== --- head/sys/kern/tty_ttydisc.c Thu Oct 25 09:02:21 2012 (r242077) +++ head/sys/kern/tty_ttydisc.c Thu Oct 25 09:05:21 2012 (r242078) @@ -126,6 +126,10 @@ ttydisc_read_canonical(struct tty *tp, s breakc[n] = '\0'; do { + error = tty_wait_background(tp, curthread, SIGTTIN); + if (error) + return (error); + /* * Quite a tricky case: unlike the old TTY * implementation, this implementation copies data back @@ -192,6 +196,10 @@ ttydisc_read_raw_no_timer(struct tty *tp */ for (;;) { + error = tty_wait_background(tp, curthread, SIGTTIN); + if (error) + return (error); + error = ttyinq_read_uio(&tp->t_inq, tp, uio, uio->uio_resid, 0); if (error) @@ -229,6 +237,10 @@ ttydisc_read_raw_read_timer(struct tty * timevaladd(&end, &now); for (;;) { + error = tty_wait_background(tp, curthread, SIGTTIN); + if (error) + return (error); + error = ttyinq_read_uio(&tp->t_inq, tp, uio, uio->uio_resid, 0); if (error) @@ -278,6 +290,10 @@ ttydisc_read_raw_interbyte_timer(struct */ for (;;) { + error = tty_wait_background(tp, curthread, SIGTTIN); + if (error) + return (error); + error = ttyinq_read_uio(&tp->t_inq, tp, uio, uio->uio_resid, 0); if (error) Modified: head/sys/sys/tty.h ============================================================================== --- head/sys/sys/tty.h Thu Oct 25 09:02:21 2012 (r242077) +++ head/sys/sys/tty.h Thu Oct 25 09:05:21 2012 (r242078) @@ -180,6 +180,7 @@ void tty_signal_sessleader(struct tty *t void tty_signal_pgrp(struct tty *tp, int signal); /* Waking up readers/writers. */ int tty_wait(struct tty *tp, struct cv *cv); +int tty_wait_background(struct tty *tp, struct thread *td, int sig); int tty_timedwait(struct tty *tp, struct cv *cv, int timo); void tty_wakeup(struct tty *tp, int flags); From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 09:39: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 BB41CE26; Thu, 25 Oct 2012 09:39:15 +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 A135E8FC0C; Thu, 25 Oct 2012 09:39: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 q9P9dFde022989; Thu, 25 Oct 2012 09:39:15 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9P9dF0q022970; Thu, 25 Oct 2012 09:39:15 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201210250939.q9P9dF0q022970@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 25 Oct 2012 09:39:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242079 - in head: sbin/ipfw share/man/man4 sys/conf sys/net sys/netinet sys/netinet6 sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 09:39:15 -0000 Author: ae Date: Thu Oct 25 09:39:14 2012 New Revision: 242079 URL: http://svn.freebsd.org/changeset/base/242079 Log: Remove the IPFIREWALL_FORWARD kernel option and make possible to turn on the related functionality in the runtime via the sysctl variable net.pfil.forward. It is turned off by default. Sponsored by: Yandex LLC Discussed with: net@ MFC after: 2 weeks Modified: head/sbin/ipfw/ipfw.8 head/share/man/man4/ipfirewall.4 head/sys/conf/NOTES head/sys/conf/options head/sys/net/pfil.c head/sys/net/pfil.h head/sys/netinet/ip_fastfwd.c head/sys/netinet/ip_input.c head/sys/netinet/ip_output.c head/sys/netinet/tcp_input.c head/sys/netinet/udp_usrreq.c head/sys/netinet6/ip6_forward.c head/sys/netinet6/ip6_input.c head/sys/netinet6/ip6_output.c head/sys/netinet6/udp6_usrreq.c head/sys/netpfil/ipfw/ip_fw2.c head/sys/netpfil/ipfw/ip_fw_pfil.c head/sys/netpfil/ipfw/ip_fw_sockopt.c Modified: head/sbin/ipfw/ipfw.8 ============================================================================== --- head/sbin/ipfw/ipfw.8 Thu Oct 25 09:05:21 2012 (r242078) +++ head/sbin/ipfw/ipfw.8 Thu Oct 25 09:39:14 2012 (r242079) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 16, 2012 +.Dd October 25, 2012 .Dt IPFW 8 .Os .Sh NAME @@ -777,8 +777,11 @@ use with transparent proxy servers. .Pp To enable .Cm fwd -a custom kernel needs to be compiled with the option -.Cd "options IPFIREWALL_FORWARD" . +the +.Xr sysctl 8 +variable +.Va net.pfil.forward +should be set to 1. .It Cm nat Ar nat_nr | tablearg Pass packet to a nat instance Modified: head/share/man/man4/ipfirewall.4 ============================================================================== --- head/share/man/man4/ipfirewall.4 Thu Oct 25 09:05:21 2012 (r242078) +++ head/share/man/man4/ipfirewall.4 Thu Oct 25 09:39:14 2012 (r242079) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 1, 2006 +.Dd October 25, 2012 .Dt IPFW 4 .Os .Sh NAME @@ -20,7 +20,6 @@ Other related kernel options which may also be useful are: .Bd -ragged -offset indent .Cd "options IPFIREWALL_DEFAULT_TO_ACCEPT" -.Cd "options IPFIREWALL_FORWARD" .Cd "options IPFIREWALL_VERBOSE" .Cd "options IPFIREWALL_VERBOSE_LIMIT=100" .Ed @@ -71,12 +70,6 @@ from flooding system logs or causing loc This option may be set to the number of packets which will be logged on a per-entry basis before the entry is rate-limited. .Pp -Policy routing and transparent forwarding features of -.Nm -can be enabled by -.Dv IPFIREWALL_FORWARD -kernel option. -.Pp The user interface for .Nm is implemented by the Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Thu Oct 25 09:05:21 2012 (r242078) +++ head/sys/conf/NOTES Thu Oct 25 09:39:14 2012 (r242079) @@ -897,12 +897,6 @@ device lagg # IPDIVERT enables the divert IP sockets, used by ``ipfw divert''. It # depends on IPFIREWALL if compiled into the kernel. # -# IPFIREWALL_FORWARD enables changing of the packet destination either -# to do some sort of policy routing or transparent proxying. Used by -# ``ipfw forward''. All redirections apply to locally generated -# packets too. Because of this great care is required when -# crafting the ruleset. -# # IPFIREWALL_NAT adds support for in kernel nat in ipfw, and it requires # LIBALIAS. # @@ -923,7 +917,6 @@ options IPFIREWALL #firewall options IPFIREWALL_VERBOSE #enable logging to syslogd(8) options IPFIREWALL_VERBOSE_LIMIT=100 #limit verbosity options IPFIREWALL_DEFAULT_TO_ACCEPT #allow everything by default -options IPFIREWALL_FORWARD #packet destination changes options IPFIREWALL_NAT #ipfw kernel nat support options IPDIVERT #divert sockets options IPFILTER #ipfilter support Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Thu Oct 25 09:05:21 2012 (r242078) +++ head/sys/conf/options Thu Oct 25 09:39:14 2012 (r242079) @@ -398,7 +398,6 @@ IPFILTER_LOG opt_ipfilter.h IPFILTER_LOOKUP opt_ipfilter.h IPFIREWALL opt_ipfw.h IPFIREWALL_DEFAULT_TO_ACCEPT opt_ipfw.h -IPFIREWALL_FORWARD opt_ipfw.h IPFIREWALL_NAT opt_ipfw.h IPFIREWALL_VERBOSE opt_ipfw.h IPFIREWALL_VERBOSE_LIMIT opt_ipfw.h Modified: head/sys/net/pfil.c ============================================================================== --- head/sys/net/pfil.c Thu Oct 25 09:05:21 2012 (r242078) +++ head/sys/net/pfil.c Thu Oct 25 09:39:14 2012 (r242079) @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -64,6 +65,11 @@ VNET_DEFINE(struct pfilheadhead, pfil_he VNET_DEFINE(struct rmlock, pfil_lock); #define V_pfil_lock VNET(pfil_lock) +VNET_DEFINE(int, pfilforward) = 0; +SYSCTL_NODE(_net, OID_AUTO, pfil, CTLFLAG_RW, 0, "Packer filter interface"); +SYSCTL_VNET_INT(_net_pfil, OID_AUTO, forward, CTLFLAG_RW, + &VNET_NAME(pfilforward), 0, + "Enable forwarding performed by packet filters"); /* * pfil_run_hooks() runs the specified packet filter hooks. */ Modified: head/sys/net/pfil.h ============================================================================== --- head/sys/net/pfil.h Thu Oct 25 09:05:21 2012 (r242078) +++ head/sys/net/pfil.h Thu Oct 25 09:39:14 2012 (r242079) @@ -38,11 +38,14 @@ #include #include #include +#include struct mbuf; struct ifnet; struct inpcb; +VNET_DECLARE(int, pfilforward); +#define V_pfilforward VNET(pfilforward) /* * The packet filter hooks are designed for anything to call them to * possibly intercept the packet. Modified: head/sys/netinet/ip_fastfwd.c ============================================================================== --- head/sys/netinet/ip_fastfwd.c Thu Oct 25 09:05:21 2012 (r242078) +++ head/sys/netinet/ip_fastfwd.c Thu Oct 25 09:39:14 2012 (r242079) @@ -167,9 +167,7 @@ ip_fastforward(struct mbuf *m) uint16_t sum, ip_len, ip_off; int error = 0; int hlen, mtu; -#ifdef IPFIREWALL_FORWARD - struct m_tag *fwd_tag; -#endif + struct m_tag *fwd_tag = NULL; /* * Are we active and forwarding packets? @@ -372,14 +370,13 @@ ip_fastforward(struct mbuf *m) * Go on with new destination address */ } -#ifdef IPFIREWALL_FORWARD + if (m->m_flags & M_FASTFWD_OURS) { /* * ipfw changed it for a local address on this host. */ goto forwardlocal; } -#endif /* IPFIREWALL_FORWARD */ passin: /* @@ -449,20 +446,13 @@ passin: /* * Destination address changed? */ -#ifndef IPFIREWALL_FORWARD - if (odest.s_addr != dest.s_addr) { -#else - fwd_tag = m_tag_find(m, PACKET_TAG_IPFORWARD, NULL); + if (V_pfilforward != 0) + fwd_tag = m_tag_find(m, PACKET_TAG_IPFORWARD, NULL); if (odest.s_addr != dest.s_addr || fwd_tag != NULL) { -#endif /* IPFIREWALL_FORWARD */ /* * Is it now for a local address on this host? */ -#ifndef IPFIREWALL_FORWARD - if (in_localip(dest)) { -#else if (m->m_flags & M_FASTFWD_OURS || in_localip(dest)) { -#endif /* IPFIREWALL_FORWARD */ forwardlocal: /* * Return packet for processing by ip_input(). @@ -475,13 +465,11 @@ forwardlocal: /* * Redo route lookup with new destination address */ -#ifdef IPFIREWALL_FORWARD if (fwd_tag) { dest.s_addr = ((struct sockaddr_in *) (fwd_tag + 1))->sin_addr.s_addr; m_tag_delete(m, fwd_tag); } -#endif /* IPFIREWALL_FORWARD */ RTFREE(ro.ro_rt); if ((dst = ip_findroute(&ro, dest, m)) == NULL) return NULL; /* icmp unreach already sent */ Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Thu Oct 25 09:05:21 2012 (r242078) +++ head/sys/netinet/ip_input.c Thu Oct 25 09:39:14 2012 (r242079) @@ -509,7 +509,9 @@ tooshort: dchg = (odst.s_addr != ip->ip_dst.s_addr); ifp = m->m_pkthdr.rcvif; -#ifdef IPFIREWALL_FORWARD + if (V_pfilforward == 0) + goto passin; + if (m->m_flags & M_FASTFWD_OURS) { m->m_flags &= ~M_FASTFWD_OURS; goto ours; @@ -523,7 +525,6 @@ tooshort: ip_forward(m, dchg); return; } -#endif /* IPFIREWALL_FORWARD */ passin: Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Thu Oct 25 09:05:21 2012 (r242078) +++ head/sys/netinet/ip_output.c Thu Oct 25 09:39:14 2012 (r242079) @@ -129,9 +129,7 @@ ip_output(struct mbuf *m, struct mbuf *o struct route iproute; struct rtentry *rte; /* cache for ro->ro_rt */ struct in_addr odst; -#ifdef IPFIREWALL_FORWARD struct m_tag *fwd_tag = NULL; -#endif #ifdef IPSEC int no_route_but_check_spd = 0; #endif @@ -218,11 +216,7 @@ again: ro->ro_lle = NULL; rte = NULL; } -#ifdef IPFIREWALL_FORWARD if (rte == NULL && fwd_tag == NULL) { -#else - if (rte == NULL) { -#endif bzero(dst, sizeof(*dst)); dst->sin_family = AF_INET; dst->sin_len = sizeof(*dst); @@ -543,7 +537,9 @@ sendit: } } -#ifdef IPFIREWALL_FORWARD + if (V_pfilforward == 0) + goto passout; + /* See if local, if yes, send it to netisr with IP_FASTFWD_OURS. */ if (m->m_flags & M_FASTFWD_OURS) { if (m->m_pkthdr.rcvif == NULL) @@ -574,7 +570,6 @@ sendit: ifa_free(&ia->ia_ifa); goto again; } -#endif /* IPFIREWALL_FORWARD */ passout: /* 127/8 must not appear on wire - RFC1122. */ Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Thu Oct 25 09:05:21 2012 (r242078) +++ head/sys/netinet/tcp_input.c Thu Oct 25 09:39:14 2012 (r242079) @@ -75,6 +75,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -544,9 +545,7 @@ tcp_input(struct mbuf *m, int off0) uint8_t sig_checked = 0; #endif uint8_t iptos = 0; -#ifdef IPFIREWALL_FORWARD - struct m_tag *fwd_tag; -#endif + struct m_tag *fwd_tag = NULL; #ifdef INET6 struct ip6_hdr *ip6 = NULL; int isipv6; @@ -754,15 +753,13 @@ findpcb: } #endif -#ifdef IPFIREWALL_FORWARD /* * Grab info from PACKET_TAG_IPFORWARD tag prepended to the chain. */ - fwd_tag = m_tag_find(m, PACKET_TAG_IPFORWARD, NULL); -#endif /* IPFIREWALL_FORWARD */ + if (V_pfilforward != 0) + fwd_tag = m_tag_find(m, PACKET_TAG_IPFORWARD, NULL); #ifdef INET6 -#ifdef IPFIREWALL_FORWARD if (isipv6 && fwd_tag != NULL) { struct sockaddr_in6 *next_hop6; @@ -788,9 +785,7 @@ findpcb: } /* Remove the tag from the packet. We don't need it anymore. */ m_tag_delete(m, fwd_tag); - } else -#endif /* IPFIREWALL_FORWARD */ - if (isipv6) { + } else if (isipv6) { inp = in6_pcblookup_mbuf(&V_tcbinfo, &ip6->ip6_src, th->th_sport, &ip6->ip6_dst, th->th_dport, INPLOOKUP_WILDCARD | INPLOOKUP_WLOCKPCB, @@ -801,7 +796,6 @@ findpcb: else #endif #ifdef INET -#ifdef IPFIREWALL_FORWARD if (fwd_tag != NULL) { struct sockaddr_in *next_hop; @@ -828,7 +822,6 @@ findpcb: /* Remove the tag from the packet. We don't need it anymore. */ m_tag_delete(m, fwd_tag); } else -#endif /* IPFIREWALL_FORWARD */ inp = in_pcblookup_mbuf(&V_tcbinfo, ip->ip_src, th->th_sport, ip->ip_dst, th->th_dport, INPLOOKUP_WILDCARD | INPLOOKUP_WLOCKPCB, Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Thu Oct 25 09:05:21 2012 (r242078) +++ head/sys/netinet/udp_usrreq.c Thu Oct 25 09:39:14 2012 (r242079) @@ -65,6 +65,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -341,9 +342,7 @@ udp_input(struct mbuf *m, int off) uint16_t len, ip_len; struct ip save_ip; struct sockaddr_in udp_in; -#ifdef IPFIREWALL_FORWARD struct m_tag *fwd_tag; -#endif ifp = m->m_pkthdr.rcvif; UDPSTAT_INC(udps_ipackets); @@ -546,12 +545,12 @@ udp_input(struct mbuf *m, int off) /* * Locate pcb for datagram. */ -#ifdef IPFIREWALL_FORWARD + /* * Grab info from PACKET_TAG_IPFORWARD tag prepended to the chain. */ - fwd_tag = m_tag_find(m, PACKET_TAG_IPFORWARD, NULL); - if (fwd_tag != NULL) { + if (V_pfilforward != 0 && + (fwd_tag = m_tag_find(m, PACKET_TAG_IPFORWARD, NULL)) != NULL) { struct sockaddr_in *next_hop; next_hop = (struct sockaddr_in *)(fwd_tag + 1); @@ -577,7 +576,6 @@ udp_input(struct mbuf *m, int off) /* Remove the tag from the packet. We don't need it anymore. */ m_tag_delete(m, fwd_tag); } else -#endif /* IPFIREWALL_FORWARD */ inp = in_pcblookup_mbuf(&V_udbinfo, ip->ip_src, uh->uh_sport, ip->ip_dst, uh->uh_dport, INPLOOKUP_WILDCARD | INPLOOKUP_RLOCKPCB, ifp, m); Modified: head/sys/netinet6/ip6_forward.c ============================================================================== --- head/sys/netinet6/ip6_forward.c Thu Oct 25 09:05:21 2012 (r242078) +++ head/sys/netinet6/ip6_forward.c Thu Oct 25 09:39:14 2012 (r242079) @@ -108,9 +108,7 @@ ip6_forward(struct mbuf *m, int srcrt) #ifdef SCTP int sw_csum; #endif -#ifdef IPFIREWALL_FORWARD struct m_tag *fwd_tag; -#endif char ip6bufs[INET6_ADDRSTRLEN], ip6bufd[INET6_ADDRSTRLEN]; #ifdef IPSEC @@ -359,9 +357,7 @@ again: dst->sin6_len = sizeof(struct sockaddr_in6); dst->sin6_family = AF_INET6; dst->sin6_addr = ip6->ip6_dst; -#ifdef IPFIREWALL_FORWARD again2: -#endif rin6.ro_rt = in6_rtalloc1((struct sockaddr *)dst, 0, 0, M_GETFIB(m)); if (rin6.ro_rt != NULL) RT_UNLOCK(rin6.ro_rt); @@ -596,7 +592,8 @@ skip_routing: goto again; /* Redo the routing table lookup. */ } -#ifdef IPFIREWALL_FORWARD + if (V_pfilforward == 0) + goto pass; /* See if local, if yes, send it to netisr. */ if (m->m_flags & M_FASTFWD_OURS) { if (m->m_pkthdr.rcvif == NULL) @@ -622,7 +619,6 @@ skip_routing: m_tag_delete(m, fwd_tag); goto again2; } -#endif /* IPFIREWALL_FORWARD */ pass: error = nd6_output(rt->rt_ifp, origifp, m, dst, rt); Modified: head/sys/netinet6/ip6_input.c ============================================================================== --- head/sys/netinet6/ip6_input.c Thu Oct 25 09:05:21 2012 (r242078) +++ head/sys/netinet6/ip6_input.c Thu Oct 25 09:39:14 2012 (r242079) @@ -628,7 +628,8 @@ ip6_input(struct mbuf *m) ip6 = mtod(m, struct ip6_hdr *); srcrt = !IN6_ARE_ADDR_EQUAL(&odst, &ip6->ip6_dst); -#ifdef IPFIREWALL_FORWARD + if (V_pfilforward == 0) + goto passin; if (m->m_flags & M_FASTFWD_OURS) { m->m_flags &= ~M_FASTFWD_OURS; ours = 1; @@ -644,7 +645,6 @@ ip6_input(struct mbuf *m) ip6_forward(m, 1); goto out; } -#endif /* IPFIREWALL_FORWARD */ passin: /* Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Thu Oct 25 09:05:21 2012 (r242078) +++ head/sys/netinet6/ip6_output.c Thu Oct 25 09:39:14 2012 (r242079) @@ -257,9 +257,7 @@ ip6_output(struct mbuf *m0, struct ip6_p int segleft_org = 0; struct secpolicy *sp = NULL; #endif /* IPSEC */ -#ifdef IPFIREWALL_FORWARD struct m_tag *fwd_tag; -#endif ip6 = mtod(m, struct ip6_hdr *); if (ip6 == NULL) { @@ -915,7 +913,8 @@ again: goto again; /* Redo the routing table lookup. */ } -#ifdef IPFIREWALL_FORWARD + if (V_pfilforward == 0) + goto passout; /* See if local, if yes, send it to netisr. */ if (m->m_flags & M_FASTFWD_OURS) { if (m->m_pkthdr.rcvif == NULL) @@ -941,7 +940,6 @@ again: m_tag_delete(m, fwd_tag); goto again; } -#endif /* IPFIREWALL_FORWARD */ passout: /* Modified: head/sys/netinet6/udp6_usrreq.c ============================================================================== --- head/sys/netinet6/udp6_usrreq.c Thu Oct 25 09:05:21 2012 (r242078) +++ head/sys/netinet6/udp6_usrreq.c Thu Oct 25 09:39:14 2012 (r242079) @@ -92,6 +92,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -182,9 +183,7 @@ udp6_input(struct mbuf **mp, int *offp, int off = *offp; int plen, ulen; struct sockaddr_in6 fromsa; -#ifdef IPFIREWALL_FORWARD struct m_tag *fwd_tag; -#endif uint16_t uh_sum; ifp = m->m_pkthdr.rcvif; @@ -393,12 +392,12 @@ udp6_input(struct mbuf **mp, int *offp, /* * Locate pcb for datagram. */ -#ifdef IPFIREWALL_FORWARD + /* * Grab info from PACKET_TAG_IPFORWARD tag prepended to the chain. */ - fwd_tag = m_tag_find(m, PACKET_TAG_IPFORWARD, NULL); - if (fwd_tag != NULL) { + if (V_pfilforward != 0 && + (fwd_tag = m_tag_find(m, PACKET_TAG_IPFORWARD, NULL)) != NULL) { struct sockaddr_in6 *next_hop6; next_hop6 = (struct sockaddr_in6 *)(fwd_tag + 1); @@ -425,7 +424,6 @@ udp6_input(struct mbuf **mp, int *offp, /* Remove the tag from the packet. We don't need it anymore. */ m_tag_delete(m, fwd_tag); } else -#endif /* IPFIREWALL_FORWARD */ inp = in6_pcblookup_mbuf(&V_udbinfo, &ip6->ip6_src, uh->uh_sport, &ip6->ip6_dst, uh->uh_dport, INPLOOKUP_WILDCARD | INPLOOKUP_RLOCKPCB, Modified: head/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw2.c Thu Oct 25 09:05:21 2012 (r242078) +++ head/sys/netpfil/ipfw/ip_fw2.c Thu Oct 25 09:39:14 2012 (r242079) @@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -2534,12 +2535,7 @@ ipfw_init(void) "(+ipv6) " #endif "initialized, divert %s, nat %s, " - "rule-based forwarding " -#ifdef IPFIREWALL_FORWARD - "enabled, " -#else - "disabled, " -#endif + "rule-based forwarding turned %s, " "default to %s, logging ", #ifdef IPDIVERT "enabled", @@ -2551,6 +2547,7 @@ ipfw_init(void) #else "loadable", #endif + V_pfilforward ? "on": "off", default_to_accept ? "accept" : "deny"); /* Modified: head/sys/netpfil/ipfw/ip_fw_pfil.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_pfil.c Thu Oct 25 09:05:21 2012 (r242078) +++ head/sys/netpfil/ipfw/ip_fw_pfil.c Thu Oct 25 09:39:14 2012 (r242079) @@ -159,7 +159,9 @@ again: /* next_hop may be set by ipfw_chk */ if (args.next_hop == NULL && args.next_hop6 == NULL) break; /* pass */ -#if !defined(IPFIREWALL_FORWARD) || (!defined(INET6) && !defined(INET)) + if (V_pfilforward == 0) + break; +#if (!defined(INET6) && !defined(INET)) ret = EACCES; #else { @@ -210,7 +212,7 @@ again: #endif m_tag_prepend(*m0, fwd_tag); } -#endif /* IPFIREWALL_FORWARD */ +#endif /* INET || INET6 */ break; case IP_FW_DENY: Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_sockopt.c Thu Oct 25 09:05:21 2012 (r242078) +++ head/sys/netpfil/ipfw/ip_fw_sockopt.c Thu Oct 25 09:39:14 2012 (r242079) @@ -708,23 +708,14 @@ check_ipfw_struct(struct ip_fw *rule, in goto check_action; case O_FORWARD_IP: -#ifdef IPFIREWALL_FORWARD if (cmdlen != F_INSN_SIZE(ipfw_insn_sa)) goto bad_size; goto check_action; -#else - return EINVAL; -#endif - #ifdef INET6 case O_FORWARD_IP6: -#ifdef IPFIREWALL_FORWARD if (cmdlen != F_INSN_SIZE(ipfw_insn_sa6)) goto bad_size; goto check_action; -#else - return (EINVAL); -#endif #endif /* INET6 */ case O_DIVERT: From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 10:02: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 4EABE88D; Thu, 25 Oct 2012 10:02:29 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-oa0-f54.google.com (mail-oa0-f54.google.com [209.85.219.54]) by mx1.freebsd.org (Postfix) with ESMTP id 879DC8FC08; Thu, 25 Oct 2012 10:02:28 +0000 (UTC) Received: by mail-oa0-f54.google.com with SMTP id n9so1811727oag.13 for ; Thu, 25 Oct 2012 03:02:28 -0700 (PDT) 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; bh=rVGLDLIzg1fatdSRNnt7bKVq0G8MZtuidsHv0q0cI7U=; b=MRH7q1etD0o0R61+sei42zNJcI44wLQzpgC9KjcRn2ICyHlDMfmtU4YG5MfoyMBqRi zMLN3vTiKHGI3oki5Vo5sDukX+WvGAhDfKkU3yNRC4Zl+qFUlVzP2GkhPvir1e7bmTbT BYtqSlXIPMi9KzftaE4AsEdjs9dsYOza84MNQWtWJr3RFAs5jSfytNw0bfL7B3OXcKc8 3LshUZWakLYG+cXSH07+4hMSkXOy4D/EAm6WBdYMQTxDyZiBLgwL5jUsrpVqhnjmvZjD uTLRTZVxOTdyYRA2L6gcLmwiVwqjr9jj9nnLASfvVunXB9jgLtiaDm2ACOjyDSIS5dp6 vTog== MIME-Version: 1.0 Received: by 10.182.131.100 with SMTP id ol4mr15122178obb.38.1351159348078; Thu, 25 Oct 2012 03:02:28 -0700 (PDT) Received: by 10.76.143.33 with HTTP; Thu, 25 Oct 2012 03:02:27 -0700 (PDT) In-Reply-To: <201210250146.q9P1kLi8043704@svn.freebsd.org> References: <201210250146.q9P1kLi8043704@svn.freebsd.org> Date: Thu, 25 Oct 2012 03:02:27 -0700 Message-ID: Subject: Re: svn commit: r242029 - head/sys/kern From: Garrett Cooper To: Alfred Perlstein Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 10:02:29 -0000 On Wed, Oct 24, 2012 at 6:46 PM, Alfred Perlstein wrote: > Author: alfred > Date: Thu Oct 25 01:46:20 2012 > New Revision: 242029 > URL: http://svn.freebsd.org/changeset/base/242029 > > Log: > Allow autotune maxusers > 384 on 64 bit machines > > A default install on large memory machines with multiple 10gigE interfaces > were not being given enough mbufs to do full bandwidth TCP or NFS traffic. > > To keep the value somewhat reasonable, we scale back the number of > maxuers by 1/6 past the 384 point. This gives us enough mbufs for most > of our pretty basic 10gigE line-speed tests to complete. > > Modified: > head/sys/kern/subr_param.c > > Modified: head/sys/kern/subr_param.c > ============================================================================== > --- head/sys/kern/subr_param.c Thu Oct 25 01:27:01 2012 (r242028) > +++ head/sys/kern/subr_param.c Thu Oct 25 01:46:20 2012 (r242029) > @@ -278,8 +278,16 @@ init_param2(long physpages) > maxusers = physpages / (2 * 1024 * 1024 / PAGE_SIZE); > if (maxusers < 32) > maxusers = 32; > - if (maxusers > 384) > - maxusers = 384; > + /* > + * Clips maxusers to 384 on machines with <= 4GB RAM or 32bit. > + * Scales it down 6x for large memory machines. > + */ > + if (maxusers > 384) { > + if (sizeof(void *) <= 4) > + maxusers = 384; > + else > + maxusers = 384 + ((maxusers - 384) / 6); Why `/ 6` (other than the fact that it makes the value presumably a multiple of 64)? Also, shouldn't some kind of clamping be taking place to ensure that this the end result of the calculation is a multiple of a power of two, e.g. 16, 32, 64, etc? And as usual, got ministat :)? Thanks! -Garrett From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 10:13: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 5743AD1A; Thu, 25 Oct 2012 10:13:59 +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 343128FC0C; Thu, 25 Oct 2012 10:13: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 q9PADxRC029051; Thu, 25 Oct 2012 10:13:59 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9PADwYO029047; Thu, 25 Oct 2012 10:13:58 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201210251013.q9PADwYO029047@svn.freebsd.org> From: Ed Schouten Date: Thu, 25 Oct 2012 10:13:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242080 - in head/contrib/llvm/tools/clang: include/clang/Basic lib/Sema X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 10:13:59 -0000 Author: ed Date: Thu Oct 25 10:13:58 2012 New Revision: 242080 URL: http://svn.freebsd.org/changeset/base/242080 Log: Pull in r166498 from upstream clang trunk: Add a new warning -Wmissing-variable-declarations, to warn about variables defined without a previous declaration. This is similar to -Wmissing-prototypes, but for variables instead of functions. Modified: head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td head/contrib/llvm/tools/clang/lib/Sema/Sema.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp Modified: head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td ============================================================================== --- head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td Thu Oct 25 09:39:14 2012 (r242079) +++ head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td Thu Oct 25 10:13:58 2012 (r242080) @@ -3058,6 +3058,9 @@ def note_sentinel_here : Note< def warn_missing_prototype : Warning< "no previous prototype for function %0">, InGroup>, DefaultIgnore; +def warn_missing_variable_declarations : Warning< + "no previous extern declaration for non-static variable %0">, + InGroup>, DefaultIgnore; def err_redefinition : Error<"redefinition of %0">; def err_definition_of_implicitly_declared_member : Error< "definition of implicitly declared %select{default constructor|copy " Modified: head/contrib/llvm/tools/clang/lib/Sema/Sema.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Sema/Sema.cpp Thu Oct 25 09:39:14 2012 (r242079) +++ head/contrib/llvm/tools/clang/lib/Sema/Sema.cpp Thu Oct 25 10:13:58 2012 (r242080) @@ -648,6 +648,8 @@ void Sema::ActOnEndOfTranslationUnit() { diag::err_tentative_def_incomplete_type)) VD->setInvalidDecl(); + CheckCompleteVariableDeclaration(VD); + // Notify the consumer that we've completed a tentative definition. if (!VD->isInvalidDecl()) Consumer.CompleteTentativeDefinition(VD); Modified: head/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp Thu Oct 25 09:39:14 2012 (r242079) +++ head/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp Thu Oct 25 10:13:58 2012 (r242080) @@ -6957,6 +6957,17 @@ void Sema::CheckCompleteVariableDeclarat } } + if (var->isThisDeclarationADefinition() && + var->getLinkage() == ExternalLinkage) { + // Find a previous declaration that's not a definition. + VarDecl *prev = var->getPreviousDecl(); + while (prev && prev->isThisDeclarationADefinition()) + prev = prev->getPreviousDecl(); + + if (!prev) + Diag(var->getLocation(), diag::warn_missing_variable_declarations) << var; + } + // All the following checks are C++ only. if (!getLangOpts().CPlusPlus) return; From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 10:29: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 8CCB63A1; Thu, 25 Oct 2012 10:29:16 +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 6F0CD8FC08; Thu, 25 Oct 2012 10:29: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 q9PATGdd031853; Thu, 25 Oct 2012 10:29:16 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9PATGqV031837; Thu, 25 Oct 2012 10:29:16 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201210251029.q9PATGqV031837@svn.freebsd.org> From: Gavin Atkinson Date: Thu, 25 Oct 2012 10:29:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242081 - in stable/8: sys/dev/alc sys/dev/bge sys/dev/cxgb sys/dev/cxgbe sys/dev/e1000 sys/dev/et sys/dev/jme sys/dev/pci sys/dev/re usr.sbin/pciconf X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 10:29:16 -0000 Author: gavin Date: Thu Oct 25 10:29:15 2012 New Revision: 242081 URL: http://svn.freebsd.org/changeset/base/242081 Log: Merge r240680 from head: Align the PCI Express #defines with the style used for the PCI-X #defines. This has the advantage that it makes the names more compact, and also allows us to correct the non-uniform naming of the PCIM_LINK_* defines, making them all consistent amongst themselves. This is a mostly mechanical rename: s/PCIR_EXPRESS_/PCIER_/g s/PCIM_EXP_/PCIEM_/g s/PCIM_LINK_/PCIEM_LINK_/g In this MFC, #defines have been added for the old names to assist merges and out-of-tree drivers. Modified: stable/8/sys/dev/alc/if_alc.c stable/8/sys/dev/bge/if_bge.c stable/8/sys/dev/cxgb/cxgb_main.c stable/8/sys/dev/cxgb/cxgb_osdep.h stable/8/sys/dev/cxgbe/osdep.h stable/8/sys/dev/cxgbe/t4_main.c stable/8/sys/dev/e1000/if_em.c stable/8/sys/dev/et/if_et.c stable/8/sys/dev/jme/if_jme.c stable/8/sys/dev/pci/pci.c stable/8/sys/dev/pci/pcireg.h stable/8/sys/dev/re/if_re.c stable/8/usr.sbin/pciconf/cap.c stable/8/usr.sbin/pciconf/err.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/alc/ (props changed) stable/8/sys/dev/bge/ (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/cxgbe/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/sys/dev/et/ (props changed) stable/8/sys/dev/jme/ (props changed) stable/8/sys/dev/re/ (props changed) stable/8/sys/powerpc/ (props changed) stable/8/usr.sbin/pciconf/ (props changed) Modified: stable/8/sys/dev/alc/if_alc.c ============================================================================== --- stable/8/sys/dev/alc/if_alc.c Thu Oct 25 10:13:58 2012 (r242080) +++ stable/8/sys/dev/alc/if_alc.c Thu Oct 25 10:29:15 2012 (r242081) @@ -683,7 +683,7 @@ alc_aspm(struct alc_softc *sc, int media if ((sc->alc_flags & (ALC_FLAG_APS | ALC_FLAG_PCIE)) == (ALC_FLAG_APS | ALC_FLAG_PCIE)) linkcfg = CSR_READ_2(sc, sc->alc_expcap + - PCIR_EXPRESS_LINK_CTL); + PCIER_LINK_CTL); else linkcfg = 0; pmcfg &= ~PM_CFG_SERDES_PD_EX_L1; @@ -698,7 +698,7 @@ alc_aspm(struct alc_softc *sc, int media if (sc->alc_ident->deviceid == DEVICEID_ATHEROS_AR8152_B && sc->alc_rev == ATHEROS_AR8152_B_V10) linkcfg |= 0x80; - CSR_WRITE_2(sc, sc->alc_expcap + PCIR_EXPRESS_LINK_CTL, + CSR_WRITE_2(sc, sc->alc_expcap + PCIER_LINK_CTL, linkcfg); pmcfg &= ~(PM_CFG_EN_BUFS_RX_L0S | PM_CFG_SA_DLY_ENB | PM_CFG_HOTRST); @@ -798,10 +798,10 @@ alc_attach(device_t dev) if (pci_find_extcap(dev, PCIY_EXPRESS, &base) == 0) { sc->alc_flags |= ALC_FLAG_PCIE; sc->alc_expcap = base; - burst = CSR_READ_2(sc, base + PCIR_EXPRESS_DEVICE_CTL); + burst = CSR_READ_2(sc, base + PCIER_DEVICE_CTL); sc->alc_dma_rd_burst = - (burst & PCIM_EXP_CTL_MAX_READ_REQUEST) >> 12; - sc->alc_dma_wr_burst = (burst & PCIM_EXP_CTL_MAX_PAYLOAD) >> 5; + (burst & PCIEM_CTL_MAX_READ_REQUEST) >> 12; + sc->alc_dma_wr_burst = (burst & PCIEM_CTL_MAX_PAYLOAD) >> 5; if (bootverbose) { device_printf(dev, "Read request size : %u bytes.\n", alc_dma_burst[sc->alc_dma_rd_burst]); @@ -831,9 +831,9 @@ alc_attach(device_t dev) CSR_WRITE_4(sc, ALC_PCIE_PHYMISC2, val); } /* Disable ASPM L0S and L1. */ - cap = CSR_READ_2(sc, base + PCIR_EXPRESS_LINK_CAP); - if ((cap & PCIM_LINK_CAP_ASPM) != 0) { - ctl = CSR_READ_2(sc, base + PCIR_EXPRESS_LINK_CTL); + cap = CSR_READ_2(sc, base + PCIER_LINK_CAP); + if ((cap & PCIEM_LINK_CAP_ASPM) != 0) { + ctl = CSR_READ_2(sc, base + PCIER_LINK_CTL); if ((ctl & 0x08) != 0) sc->alc_rcb = DMA_CFG_RCB_128; if (bootverbose) Modified: stable/8/sys/dev/bge/if_bge.c ============================================================================== --- stable/8/sys/dev/bge/if_bge.c Thu Oct 25 10:13:58 2012 (r242080) +++ stable/8/sys/dev/bge/if_bge.c Thu Oct 25 10:29:15 2012 (r242081) @@ -3650,17 +3650,17 @@ bge_reset(struct bge_softc *sc) pci_write_config(dev, 0xC4, val | (1 << 15), 4); } devctl = pci_read_config(dev, - sc->bge_expcap + PCIR_EXPRESS_DEVICE_CTL, 2); + sc->bge_expcap + PCIER_DEVICE_CTL, 2); /* Clear enable no snoop and disable relaxed ordering. */ - devctl &= ~(PCIM_EXP_CTL_RELAXED_ORD_ENABLE | - PCIM_EXP_CTL_NOSNOOP_ENABLE); - pci_write_config(dev, sc->bge_expcap + PCIR_EXPRESS_DEVICE_CTL, + devctl &= ~(PCIEM_CTL_RELAXED_ORD_ENABLE | + PCIEM_CTL_NOSNOOP_ENABLE); + pci_write_config(dev, sc->bge_expcap + PCIER_DEVICE_CTL, devctl, 2); /* Clear error status. */ - pci_write_config(dev, sc->bge_expcap + PCIR_EXPRESS_DEVICE_STA, - PCIM_EXP_STA_CORRECTABLE_ERROR | - PCIM_EXP_STA_NON_FATAL_ERROR | PCIM_EXP_STA_FATAL_ERROR | - PCIM_EXP_STA_UNSUPPORTED_REQ, 2); + pci_write_config(dev, sc->bge_expcap + PCIER_DEVICE_STA, + PCIEM_STA_CORRECTABLE_ERROR | + PCIEM_STA_NON_FATAL_ERROR | PCIEM_STA_FATAL_ERROR | + PCIEM_STA_UNSUPPORTED_REQ, 2); } /* Reset some of the PCI state that got zapped by reset. */ Modified: stable/8/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/8/sys/dev/cxgb/cxgb_main.c Thu Oct 25 10:13:58 2012 (r242080) +++ stable/8/sys/dev/cxgb/cxgb_main.c Thu Oct 25 10:29:15 2012 (r242081) @@ -449,8 +449,8 @@ cxgb_controller_attach(device_t dev) if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) { uint16_t lnk; - lnk = pci_read_config(dev, reg + PCIR_EXPRESS_LINK_STA, 2); - sc->link_width = (lnk & PCIM_LINK_STA_WIDTH) >> 4; + lnk = pci_read_config(dev, reg + PCIER_LINK_STA, 2); + sc->link_width = (lnk & PCIEM_LINK_STA_WIDTH) >> 4; if (sc->link_width < 8 && (ai->caps & SUPPORTED_10000baseT_Full)) { device_printf(sc->dev, Modified: stable/8/sys/dev/cxgb/cxgb_osdep.h ============================================================================== --- stable/8/sys/dev/cxgb/cxgb_osdep.h Thu Oct 25 10:13:58 2012 (r242080) +++ stable/8/sys/dev/cxgb/cxgb_osdep.h Thu Oct 25 10:29:15 2012 (r242081) @@ -244,11 +244,11 @@ static const int debug_flags = DBG_RX; #define PCI_VPD_DATA PCIR_VPD_DATA #define PCI_CAP_ID_EXP PCIY_EXPRESS -#define PCI_EXP_DEVCTL PCIR_EXPRESS_DEVICE_CTL -#define PCI_EXP_DEVCTL_PAYLOAD PCIM_EXP_CTL_MAX_PAYLOAD -#define PCI_EXP_DEVCTL_READRQ PCIM_EXP_CTL_MAX_READ_REQUEST -#define PCI_EXP_LNKCTL PCIR_EXPRESS_LINK_CTL -#define PCI_EXP_LNKSTA PCIR_EXPRESS_LINK_STA +#define PCI_EXP_DEVCTL PCIER_DEVICE_CTL +#define PCI_EXP_DEVCTL_PAYLOAD PCIEM_CTL_MAX_PAYLOAD +#define PCI_EXP_DEVCTL_READRQ PCIEM_CTL_MAX_READ_REQUEST +#define PCI_EXP_LNKCTL PCIER_LINK_CTL +#define PCI_EXP_LNKSTA PCIER_LINK_STA /* * Linux compatibility macros Modified: stable/8/sys/dev/cxgbe/osdep.h ============================================================================== --- stable/8/sys/dev/cxgbe/osdep.h Thu Oct 25 10:13:58 2012 (r242080) +++ stable/8/sys/dev/cxgbe/osdep.h Thu Oct 25 10:29:15 2012 (r242081) @@ -117,13 +117,13 @@ typedef boolean_t bool; #define PCI_VPD_DATA PCIR_VPD_DATA #define PCI_CAP_ID_EXP PCIY_EXPRESS -#define PCI_EXP_DEVCTL PCIR_EXPRESS_DEVICE_CTL -#define PCI_EXP_DEVCTL_PAYLOAD PCIM_EXP_CTL_MAX_PAYLOAD -#define PCI_EXP_DEVCTL_READRQ PCIM_EXP_CTL_MAX_READ_REQUEST -#define PCI_EXP_LNKCTL PCIR_EXPRESS_LINK_CTL -#define PCI_EXP_LNKSTA PCIR_EXPRESS_LINK_STA -#define PCI_EXP_LNKSTA_CLS PCIM_LINK_STA_SPEED -#define PCI_EXP_LNKSTA_NLW PCIM_LINK_STA_WIDTH +#define PCI_EXP_DEVCTL PCIER_DEVICE_CTL +#define PCI_EXP_DEVCTL_PAYLOAD PCIEM_CTL_MAX_PAYLOAD +#define PCI_EXP_DEVCTL_READRQ PCIEM_CTL_MAX_READ_REQUEST +#define PCI_EXP_LNKCTL PCIER_LINK_CTL +#define PCI_EXP_LNKSTA PCIER_LINK_STA +#define PCI_EXP_LNKSTA_CLS PCIEM_LINK_STA_SPEED +#define PCI_EXP_LNKSTA_NLW PCIEM_LINK_STA_WIDTH #define PCI_EXP_DEVCTL2 0x28 static inline int Modified: stable/8/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/8/sys/dev/cxgbe/t4_main.c Thu Oct 25 10:13:58 2012 (r242080) +++ stable/8/sys/dev/cxgbe/t4_main.c Thu Oct 25 10:29:15 2012 (r242081) @@ -415,9 +415,9 @@ t4_attach(device_t dev) uint32_t v; pci_set_max_read_req(dev, 4096); - v = pci_read_config(dev, i + PCIR_EXPRESS_DEVICE_CTL, 2); - v |= PCIM_EXP_CTL_RELAXED_ORD_ENABLE; - pci_write_config(dev, i + PCIR_EXPRESS_DEVICE_CTL, v, 2); + v = pci_read_config(dev, i + PCIER_DEVICE_CTL, 2); + v |= PCIEM_CTL_RELAXED_ORD_ENABLE; + pci_write_config(dev, i + PCIER_DEVICE_CTL, v, 2); } snprintf(sc->lockname, sizeof(sc->lockname), "%s", Modified: stable/8/sys/dev/e1000/if_em.c ============================================================================== --- stable/8/sys/dev/e1000/if_em.c Thu Oct 25 10:13:58 2012 (r242080) +++ stable/8/sys/dev/e1000/if_em.c Thu Oct 25 10:29:15 2012 (r242081) @@ -5013,11 +5013,11 @@ em_disable_aspm(struct adapter *adapter) } if (pci_find_cap(dev, PCIY_EXPRESS, &base) != 0) return; - reg = base + PCIR_EXPRESS_LINK_CAP; + reg = base + PCIER_LINK_CAP; link_cap = pci_read_config(dev, reg, 2); - if ((link_cap & PCIM_LINK_CAP_ASPM) == 0) + if ((link_cap & PCIEM_LINK_CAP_ASPM) == 0) return; - reg = base + PCIR_EXPRESS_LINK_CTL; + reg = base + PCIER_LINK_CTL; link_ctrl = pci_read_config(dev, reg, 2); link_ctrl &= 0xFFFC; /* turn off bit 1 and 2 */ pci_write_config(dev, reg, link_ctrl, 2); Modified: stable/8/sys/dev/et/if_et.c ============================================================================== --- stable/8/sys/dev/et/if_et.c Thu Oct 25 10:13:58 2012 (r242080) +++ stable/8/sys/dev/et/if_et.c Thu Oct 25 10:29:15 2012 (r242081) @@ -701,8 +701,8 @@ et_bus_config(struct et_softc *sc) * max playload size */ val = pci_read_config(sc->dev, - sc->sc_expcap + PCIR_EXPRESS_DEVICE_CAP, 4); - max_plsz = val & PCIM_EXP_CAP_MAX_PAYLOAD; + sc->sc_expcap + PCIER_DEVICE_CAP, 4); + max_plsz = val & PCIEM_CAP_MAX_PAYLOAD; switch (max_plsz) { case ET_PCIV_DEVICE_CAPS_PLSZ_128: @@ -733,7 +733,7 @@ et_bus_config(struct et_softc *sc) * Set L0s and L1 latency timer to 2us */ val = pci_read_config(sc->dev, ET_PCIR_L0S_L1_LATENCY, 4); - val &= ~(PCIM_LINK_CAP_L0S_EXIT | PCIM_LINK_CAP_L1_EXIT); + val &= ~(PCIEM_LINK_CAP_L0S_EXIT | PCIEM_LINK_CAP_L1_EXIT); /* L0s exit latency : 2us */ val |= 0x00005000; /* L1 exit latency : 2us */ Modified: stable/8/sys/dev/jme/if_jme.c ============================================================================== --- stable/8/sys/dev/jme/if_jme.c Thu Oct 25 10:13:58 2012 (r242080) +++ stable/8/sys/dev/jme/if_jme.c Thu Oct 25 10:29:15 2012 (r242081) @@ -786,7 +786,7 @@ jme_attach(device_t dev) /* Set max allowable DMA size. */ if (pci_find_extcap(dev, PCIY_EXPRESS, &i) == 0) { sc->jme_flags |= JME_FLAG_PCIE; - burst = pci_read_config(dev, i + PCIR_EXPRESS_DEVICE_CTL, 2); + burst = pci_read_config(dev, i + PCIER_DEVICE_CTL, 2); if (bootverbose) { device_printf(dev, "Read request size : %d bytes.\n", 128 << ((burst >> 12) & 0x07)); Modified: stable/8/sys/dev/pci/pci.c ============================================================================== --- stable/8/sys/dev/pci/pci.c Thu Oct 25 10:13:58 2012 (r242080) +++ stable/8/sys/dev/pci/pci.c Thu Oct 25 10:29:15 2012 (r242081) @@ -1720,8 +1720,8 @@ pci_get_max_read_req(device_t dev) if (pci_find_cap(dev, PCIY_EXPRESS, &cap) != 0) return (0); - val = pci_read_config(dev, cap + PCIR_EXPRESS_DEVICE_CTL, 2); - val &= PCIM_EXP_CTL_MAX_READ_REQUEST; + val = pci_read_config(dev, cap + PCIER_DEVICE_CTL, 2); + val &= PCIEM_CTL_MAX_READ_REQUEST; val >>= 12; return (1 << (val + 7)); } @@ -1739,10 +1739,10 @@ pci_set_max_read_req(device_t dev, int s if (size > 4096) size = 4096; size = (1 << (fls(size) - 1)); - val = pci_read_config(dev, cap + PCIR_EXPRESS_DEVICE_CTL, 2); - val &= ~PCIM_EXP_CTL_MAX_READ_REQUEST; + val = pci_read_config(dev, cap + PCIER_DEVICE_CTL, 2); + val &= ~PCIEM_CTL_MAX_READ_REQUEST; val |= (fls(size) - 8) << 12; - pci_write_config(dev, cap + PCIR_EXPRESS_DEVICE_CTL, val, 2); + pci_write_config(dev, cap + PCIER_DEVICE_CTL, val, 2); return (size); } Modified: stable/8/sys/dev/pci/pcireg.h ============================================================================== --- stable/8/sys/dev/pci/pcireg.h Thu Oct 25 10:13:58 2012 (r242080) +++ stable/8/sys/dev/pci/pcireg.h Thu Oct 25 10:29:15 2012 (r242081) @@ -617,56 +617,258 @@ #define PCIR_SUBVENDCAP_ID 0x4 /* PCI Express definitions */ -#define PCIR_EXPRESS_FLAGS 0x2 -#define PCIM_EXP_FLAGS_VERSION 0x000F -#define PCIM_EXP_FLAGS_TYPE 0x00F0 -#define PCIM_EXP_TYPE_ENDPOINT 0x0000 -#define PCIM_EXP_TYPE_LEGACY_ENDPOINT 0x0010 -#define PCIM_EXP_TYPE_ROOT_PORT 0x0040 -#define PCIM_EXP_TYPE_UPSTREAM_PORT 0x0050 -#define PCIM_EXP_TYPE_DOWNSTREAM_PORT 0x0060 -#define PCIM_EXP_TYPE_PCI_BRIDGE 0x0070 -#define PCIM_EXP_TYPE_PCIE_BRIDGE 0x0080 -#define PCIM_EXP_TYPE_ROOT_INT_EP 0x0090 -#define PCIM_EXP_TYPE_ROOT_EC 0x00a0 -#define PCIM_EXP_FLAGS_SLOT 0x0100 -#define PCIM_EXP_FLAGS_IRQ 0x3e00 -#define PCIR_EXPRESS_DEVICE_CAP 0x4 -#define PCIM_EXP_CAP_MAX_PAYLOAD 0x0007 -#define PCIR_EXPRESS_DEVICE_CTL 0x8 -#define PCIM_EXP_CTL_NFER_ENABLE 0x0002 -#define PCIM_EXP_CTL_FER_ENABLE 0x0004 -#define PCIM_EXP_CTL_URR_ENABLE 0x0008 -#define PCIM_EXP_CTL_RELAXED_ORD_ENABLE 0x0010 -#define PCIM_EXP_CTL_MAX_PAYLOAD 0x00e0 -#define PCIM_EXP_CTL_NOSNOOP_ENABLE 0x0800 -#define PCIM_EXP_CTL_MAX_READ_REQUEST 0x7000 -#define PCIR_EXPRESS_DEVICE_STA 0xa -#define PCIM_EXP_STA_CORRECTABLE_ERROR 0x0001 -#define PCIM_EXP_STA_NON_FATAL_ERROR 0x0002 -#define PCIM_EXP_STA_FATAL_ERROR 0x0004 -#define PCIM_EXP_STA_UNSUPPORTED_REQ 0x0008 -#define PCIM_EXP_STA_AUX_POWER 0x0010 -#define PCIM_EXP_STA_TRANSACTION_PND 0x0020 -#define PCIR_EXPRESS_LINK_CAP 0xc -#define PCIM_LINK_CAP_MAX_SPEED 0x0000000f -#define PCIM_LINK_CAP_MAX_WIDTH 0x000003f0 -#define PCIM_LINK_CAP_ASPM 0x00000c00 -#define PCIM_LINK_CAP_L0S_EXIT 0x00007000 -#define PCIM_LINK_CAP_L1_EXIT 0x00038000 -#define PCIM_LINK_CAP_PORT 0xff000000 -#define PCIR_EXPRESS_LINK_CTL 0x10 -#define PCIR_EXPRESS_LINK_STA 0x12 -#define PCIM_LINK_STA_SPEED 0x000f -#define PCIM_LINK_STA_WIDTH 0x03f0 -#define PCIM_LINK_STA_TRAINING_ERROR 0x0400 -#define PCIM_LINK_STA_TRAINING 0x0800 -#define PCIM_LINK_STA_SLOT_CLOCK 0x1000 -#define PCIR_EXPRESS_SLOT_CAP 0x14 -#define PCIR_EXPRESS_SLOT_CTL 0x18 -#define PCIR_EXPRESS_SLOT_STA 0x1a -#define PCIR_EXPRESS_ROOT_CTL 0x1c -#define PCIR_EXPRESS_ROOT_STA 0x20 +#define PCIER_FLAGS 0x2 +#define PCIEM_FLAGS_VERSION 0x000F +#define PCIEM_FLAGS_TYPE 0x00F0 +#define PCIEM_TYPE_ENDPOINT 0x0000 +#define PCIEM_TYPE_LEGACY_ENDPOINT 0x0010 +#define PCIEM_TYPE_ROOT_PORT 0x0040 +#define PCIEM_TYPE_UPSTREAM_PORT 0x0050 +#define PCIEM_TYPE_DOWNSTREAM_PORT 0x0060 +#define PCIEM_TYPE_PCI_BRIDGE 0x0070 +#define PCIEM_TYPE_PCIE_BRIDGE 0x0080 +#define PCIEM_TYPE_ROOT_INT_EP 0x0090 +#define PCIEM_TYPE_ROOT_EC 0x00a0 +#define PCIEM_FLAGS_SLOT 0x0100 +#define PCIEM_FLAGS_IRQ 0x3e00 +#define PCIER_DEVICE_CAP 0x4 +#define PCIEM_CAP_MAX_PAYLOAD 0x00000007 +#define PCIEM_CAP_PHANTHOM_FUNCS 0x00000018 +#define PCIEM_CAP_EXT_TAG_FIELD 0x00000020 +#define PCIEM_CAP_L0S_LATENCY 0x000001c0 +#define PCIEM_CAP_L1_LATENCY 0x00000e00 +#define PCIEM_CAP_ROLE_ERR_RPT 0x00008000 +#define PCIEM_CAP_SLOT_PWR_LIM_VAL 0x03fc0000 +#define PCIEM_CAP_SLOT_PWR_LIM_SCALE 0x0c000000 +#define PCIEM_CAP_FLR 0x10000000 +#define PCIER_DEVICE_CTL 0x8 +#define PCIEM_CTL_COR_ENABLE 0x0001 +#define PCIEM_CTL_NFER_ENABLE 0x0002 +#define PCIEM_CTL_FER_ENABLE 0x0004 +#define PCIEM_CTL_URR_ENABLE 0x0008 +#define PCIEM_CTL_RELAXED_ORD_ENABLE 0x0010 +#define PCIEM_CTL_MAX_PAYLOAD 0x00e0 +#define PCIEM_CTL_EXT_TAG_FIELD 0x0100 +#define PCIEM_CTL_PHANTHOM_FUNCS 0x0200 +#define PCIEM_CTL_AUX_POWER_PM 0x0400 +#define PCIEM_CTL_NOSNOOP_ENABLE 0x0800 +#define PCIEM_CTL_MAX_READ_REQUEST 0x7000 +#define PCIEM_CTL_BRDG_CFG_RETRY 0x8000 /* PCI-E - PCI/PCI-X bridges */ +#define PCIEM_CTL_INITIATE_FLR 0x8000 /* FLR capable endpoints */ +#define PCIER_DEVICE_STA 0xa +#define PCIEM_STA_CORRECTABLE_ERROR 0x0001 +#define PCIEM_STA_NON_FATAL_ERROR 0x0002 +#define PCIEM_STA_FATAL_ERROR 0x0004 +#define PCIEM_STA_UNSUPPORTED_REQ 0x0008 +#define PCIEM_STA_AUX_POWER 0x0010 +#define PCIEM_STA_TRANSACTION_PND 0x0020 +#define PCIER_LINK_CAP 0xc +#define PCIEM_LINK_CAP_MAX_SPEED 0x0000000f +#define PCIEM_LINK_CAP_MAX_WIDTH 0x000003f0 +#define PCIEM_LINK_CAP_ASPM 0x00000c00 +#define PCIEM_LINK_CAP_L0S_EXIT 0x00007000 +#define PCIEM_LINK_CAP_L1_EXIT 0x00038000 +#define PCIEM_LINK_CAP_CLOCK_PM 0x00040000 +#define PCIEM_LINK_CAP_SURPRISE_DOWN 0x00080000 +#define PCIEM_LINK_CAP_DL_ACTIVE 0x00100000 +#define PCIEM_LINK_CAP_LINK_BW_NOTIFY 0x00200000 +#define PCIEM_LINK_CAP_ASPM_COMPLIANCE 0x00400000 +#define PCIEM_LINK_CAP_PORT 0xff000000 +#define PCIER_LINK_CTL 0x10 +#define PCIEM_LINK_CTL_ASPMC_DIS 0x0000 +#define PCIEM_LINK_CTL_ASPMC_L0S 0x0001 +#define PCIEM_LINK_CTL_ASPMC_L1 0x0002 +#define PCIEM_LINK_CTL_ASPMC 0x0003 +#define PCIEM_LINK_CTL_RCB 0x0008 +#define PCIEM_LINK_CTL_LINK_DIS 0x0010 +#define PCIEM_LINK_CTL_RETRAIN_LINK 0x0020 +#define PCIEM_LINK_CTL_COMMON_CLOCK 0x0040 +#define PCIEM_LINK_CTL_EXTENDED_SYNC 0x0080 +#define PCIEM_LINK_CTL_ECPM 0x0100 +#define PCIEM_LINK_CTL_HAWD 0x0200 +#define PCIEM_LINK_CTL_LBMIE 0x0400 +#define PCIEM_LINK_CTL_LABIE 0x0800 +#define PCIER_LINK_STA 0x12 +#define PCIEM_LINK_STA_SPEED 0x000f +#define PCIEM_LINK_STA_WIDTH 0x03f0 +#define PCIEM_LINK_STA_TRAINING_ERROR 0x0400 +#define PCIEM_LINK_STA_TRAINING 0x0800 +#define PCIEM_LINK_STA_SLOT_CLOCK 0x1000 +#define PCIEM_LINK_STA_DL_ACTIVE 0x2000 +#define PCIEM_LINK_STA_LINK_BW_MGMT 0x4000 +#define PCIEM_LINK_STA_LINK_AUTO_BW 0x8000 +#define PCIER_SLOT_CAP 0x14 +#define PCIEM_SLOT_CAP_APB 0x00000001 +#define PCIEM_SLOT_CAP_PCP 0x00000002 +#define PCIEM_SLOT_CAP_MRLSP 0x00000004 +#define PCIEM_SLOT_CAP_AIP 0x00000008 +#define PCIEM_SLOT_CAP_PIP 0x00000010 +#define PCIEM_SLOT_CAP_HPS 0x00000020 +#define PCIEM_SLOT_CAP_HPC 0x00000040 +#define PCIEM_SLOT_CAP_SPLV 0x00007f80 +#define PCIEM_SLOT_CAP_SPLS 0x00018000 +#define PCIEM_SLOT_CAP_EIP 0x00020000 +#define PCIEM_SLOT_CAP_NCCS 0x00040000 +#define PCIEM_SLOT_CAP_PSN 0xfff80000 +#define PCIER_SLOT_CTL 0x18 +#define PCIEM_SLOT_CTL_ABPE 0x0001 +#define PCIEM_SLOT_CTL_PFDE 0x0002 +#define PCIEM_SLOT_CTL_MRLSCE 0x0004 +#define PCIEM_SLOT_CTL_PDCE 0x0008 +#define PCIEM_SLOT_CTL_CCIE 0x0010 +#define PCIEM_SLOT_CTL_HPIE 0x0020 +#define PCIEM_SLOT_CTL_AIC 0x00c0 +#define PCIEM_SLOT_CTL_PIC 0x0300 +#define PCIEM_SLOT_CTL_PCC 0x0400 +#define PCIEM_SLOT_CTL_EIC 0x0800 +#define PCIEM_SLOT_CTL_DLLSCE 0x1000 +#define PCIER_SLOT_STA 0x1a +#define PCIEM_SLOT_STA_ABP 0x0001 +#define PCIEM_SLOT_STA_PFD 0x0002 +#define PCIEM_SLOT_STA_MRLSC 0x0004 +#define PCIEM_SLOT_STA_PDC 0x0008 +#define PCIEM_SLOT_STA_CC 0x0010 +#define PCIEM_SLOT_STA_MRLSS 0x0020 +#define PCIEM_SLOT_STA_PDS 0x0040 +#define PCIEM_SLOT_STA_EIS 0x0080 +#define PCIEM_SLOT_STA_DLLSC 0x0100 +#define PCIER_ROOT_CTL 0x1c +#define PCIER_ROOT_CAP 0x1e +#define PCIER_ROOT_STA 0x20 +#define PCIER_DEVICE_CAP2 0x24 +#define PCIER_DEVICE_CTL2 0x28 +#define PCIEM_CTL2_COMP_TIMEOUT_VAL 0x000f +#define PCIEM_CTL2_COMP_TIMEOUT_DIS 0x0010 +#define PCIEM_CTL2_ARI 0x0020 +#define PCIEM_CTL2_ATOMIC_REQ_ENABLE 0x0040 +#define PCIEM_CTL2_ATOMIC_EGR_BLOCK 0x0080 +#define PCIEM_CTL2_ID_ORDERED_REQ_EN 0x0100 +#define PCIEM_CTL2_ID_ORDERED_CMP_EN 0x0200 +#define PCIEM_CTL2_LTR_ENABLE 0x0400 +#define PCIEM_CTL2_OBFF 0x6000 +#define PCIEM_OBFF_DISABLE 0x0000 +#define PCIEM_OBFF_MSGA_ENABLE 0x2000 +#define PCIEM_OBFF_MSGB_ENABLE 0x4000 +#define PCIEM_OBFF_WAKE_ENABLE 0x6000 +#define PCIEM_CTL2_END2END_TLP 0x8000 +#define PCIER_DEVICE_STA2 0x2a +#define PCIER_LINK_CAP2 0x2c +#define PCIER_LINK_CTL2 0x30 +#define PCIER_LINK_STA2 0x32 +#define PCIER_SLOT_CAP2 0x34 +#define PCIER_SLOT_CTL2 0x38 +#define PCIER_SLOT_STA2 0x3a + +/* Old compatibility definitions for PCI Express registers */ +#define PCIR_EXPRESS_FLAGS PCIER_FLAGS +#define PCIM_EXP_FLAGS_VERSION PCIEM_FLAGS_VERSION +#define PCIM_EXP_FLAGS_TYPE PCIEM_FLAGS_TYPE +#define PCIM_EXP_TYPE_ENDPOINT PCIEM_TYPE_ENDPOINT +#define PCIM_EXP_TYPE_LEGACY_ENDPOINT PCIEM_TYPE_LEGACY_ENDPOINT +#define PCIM_EXP_TYPE_ROOT_PORT PCIEM_TYPE_ROOT_PORT +#define PCIM_EXP_TYPE_UPSTREAM_PORT PCIEM_TYPE_UPSTREAM_PORT +#define PCIM_EXP_TYPE_DOWNSTREAM_PORT PCIEM_TYPE_DOWNSTREAM_PORT +#define PCIM_EXP_TYPE_PCI_BRIDGE PCIEM_TYPE_PCI_BRIDGE +#define PCIM_EXP_TYPE_PCIE_BRIDGE PCIEM_TYPE_PCIE_BRIDGE +#define PCIM_EXP_TYPE_ROOT_INT_EP PCIEM_TYPE_ROOT_INT_EP +#define PCIM_EXP_TYPE_ROOT_EC PCIEM_TYPE_ROOT_EC +#define PCIM_EXP_FLAGS_SLOT PCIEM_FLAGS_SLOT +#define PCIM_EXP_FLAGS_IRQ PCIEM_FLAGS_IRQ +#define PCIR_EXPRESS_DEVICE_CAP PCIER_DEVICE_CAP +#define PCIM_EXP_CAP_MAX_PAYLOAD PCIEM_CAP_MAX_PAYLOAD +#define PCIM_EXP_CAP_PHANTHOM_FUNCS PCIEM_CAP_PHANTHOM_FUNCS +#define PCIM_EXP_CAP_EXT_TAG_FIELD PCIEM_CAP_EXT_TAG_FIELD +#define PCIM_EXP_CAP_L0S_LATENCY PCIEM_CAP_L0S_LATENCY +#define PCIM_EXP_CAP_L1_LATENCY PCIEM_CAP_L1_LATENCY +#define PCIM_EXP_CAP_ROLE_ERR_RPT PCIEM_CAP_ROLE_ERR_RPT +#define PCIM_EXP_CAP_SLOT_PWR_LIM_VAL PCIEM_CAP_SLOT_PWR_LIM_VAL +#define PCIM_EXP_CAP_SLOT_PWR_LIM_SCALE PCIEM_CAP_SLOT_PWR_LIM_SCALE +#define PCIM_EXP_CAP_FLR PCIEM_CAP_FLR +#define PCIR_EXPRESS_DEVICE_CTL PCIER_DEVICE_CTL +#define PCIM_EXP_CTL_COR_ENABLE PCIEM_CTL_COR_ENABLE +#define PCIM_EXP_CTL_NFER_ENABLE PCIEM_CTL_NFER_ENABLE +#define PCIM_EXP_CTL_FER_ENABLE PCIEM_CTL_FER_ENABLE +#define PCIM_EXP_CTL_URR_ENABLE PCIEM_CTL_URR_ENABLE +#define PCIM_EXP_CTL_RELAXED_ORD_ENABLE PCIEM_CTL_RELAXED_ORD_ENABLE +#define PCIM_EXP_CTL_MAX_PAYLOAD PCIEM_CTL_MAX_PAYLOAD +#define PCIM_EXP_CTL_EXT_TAG_FIELD PCIEM_CTL_EXT_TAG_FIELD +#define PCIM_EXP_CTL_PHANTHOM_FUNCS PCIEM_CTL_PHANTHOM_FUNCS +#define PCIM_EXP_CTL_AUX_POWER_PM PCIEM_CTL_AUX_POWER_PM +#define PCIM_EXP_CTL_NOSNOOP_ENABLE PCIEM_CTL_NOSNOOP_ENABLE +#define PCIM_EXP_CTL_MAX_READ_REQUEST PCIEM_CTL_MAX_READ_REQUEST +#define PCIM_EXP_CTL_BRDG_CFG_RETRY PCIEM_CTL_BRDG_CFG_RETRY +#define PCIM_EXP_CTL_INITIATE_FLR PCIEM_CTL_INITIATE_FLR +#define PCIR_EXPRESS_DEVICE_STA PCIER_DEVICE_STA +#define PCIM_EXP_STA_CORRECTABLE_ERROR PCIEM_STA_CORRECTABLE_ERROR +#define PCIM_EXP_STA_NON_FATAL_ERROR PCIEM_STA_NON_FATAL_ERROR +#define PCIM_EXP_STA_FATAL_ERROR PCIEM_STA_FATAL_ERROR +#define PCIM_EXP_STA_UNSUPPORTED_REQ PCIEM_STA_UNSUPPORTED_REQ +#define PCIM_EXP_STA_AUX_POWER PCIEM_STA_AUX_POWER +#define PCIM_EXP_STA_TRANSACTION_PND PCIEM_STA_TRANSACTION_PND +#define PCIR_EXPRESS_LINK_CAP PCIER_LINK_CAP +#define PCIM_LINK_CAP_MAX_SPEED PCIEM_LINK_CAP_MAX_SPEED +#define PCIM_LINK_CAP_MAX_WIDTH PCIEM_LINK_CAP_MAX_WIDTH +#define PCIM_LINK_CAP_ASPM PCIEM_LINK_CAP_ASPM +#define PCIM_LINK_CAP_L0S_EXIT PCIEM_LINK_CAP_L0S_EXIT +#define PCIM_LINK_CAP_L1_EXIT PCIEM_LINK_CAP_L1_EXIT +#define PCIM_LINK_CAP_CLOCK_PM PCIEM_LINK_CAP_CLOCK_PM +#define PCIM_LINK_CAP_SURPRISE_DOWN PCIEM_LINK_CAP_SURPRISE_DOWN +#define PCIM_LINK_CAP_DL_ACTIVE PCIEM_LINK_CAP_DL_ACTIVE +#define PCIM_LINK_CAP_LINK_BW_NOTIFY PCIEM_LINK_CAP_LINK_BW_NOTIFY +#define PCIM_LINK_CAP_ASPM_COMPLIANCE PCIEM_LINK_CAP_ASPM_COMPLIANCE +#define PCIM_LINK_CAP_PORT PCIEM_LINK_CAP_PORT +#define PCIR_EXPRESS_LINK_CTL PCIER_LINK_CTL +#define PCIM_EXP_LINK_CTL_ASPMC_DIS PCIEM_LINK_CTL_ASPMC_DIS +#define PCIM_EXP_LINK_CTL_ASPMC_L0S PCIEM_LINK_CTL_ASPMC_L0S +#define PCIM_EXP_LINK_CTL_ASPMC_L1 PCIEM_LINK_CTL_ASPMC_L1 +#define PCIM_EXP_LINK_CTL_ASPMC PCIEM_LINK_CTL_ASPMC +#define PCIM_EXP_LINK_CTL_RCB PCIEM_LINK_CTL_RCB +#define PCIM_EXP_LINK_CTL_LINK_DIS PCIEM_LINK_CTL_LINK_DIS +#define PCIM_EXP_LINK_CTL_RETRAIN_LINK PCIEM_LINK_CTL_RETRAIN_LINK +#define PCIM_EXP_LINK_CTL_COMMON_CLOCK PCIEM_LINK_CTL_COMMON_CLOCK +#define PCIM_EXP_LINK_CTL_EXTENDED_SYNC PCIEM_LINK_CTL_EXTENDED_SYNC +#define PCIM_EXP_LINK_CTL_ECPM PCIEM_LINK_CTL_ECPM +#define PCIM_EXP_LINK_CTL_HAWD PCIEM_LINK_CTL_HAWD +#define PCIM_EXP_LINK_CTL_LBMIE PCIEM_LINK_CTL_LBMIE +#define PCIM_EXP_LINK_CTL_LABIE PCIEM_LINK_CTL_LABIE +#define PCIR_EXPRESS_LINK_STA PCIER_LINK_STA +#define PCIM_LINK_STA_SPEED PCIEM_LINK_STA_SPEED +#define PCIM_LINK_STA_WIDTH PCIEM_LINK_STA_WIDTH +#define PCIM_LINK_STA_TRAINING_ERROR PCIEM_LINK_STA_TRAINING_ERROR +#define PCIM_LINK_STA_TRAINING PCIEM_LINK_STA_TRAINING +#define PCIM_LINK_STA_SLOT_CLOCK PCIEM_LINK_STA_SLOT_CLOCK +#define PCIM_LINK_STA_DL_ACTIVE PCIEM_LINK_STA_DL_ACTIVE +#define PCIM_LINK_STA_LINK_BW_MGMT PCIEM_LINK_STA_LINK_BW_MGMT +#define PCIM_LINK_STA_LINK_AUTO_BW PCIEM_LINK_STA_LINK_AUTO_BW +#define PCIR_EXPRESS_SLOT_CAP PCIER_SLOT_CAP +#define PCIR_EXPRESS_SLOT_CTL PCIER_SLOT_CTL +#define PCIR_EXPRESS_SLOT_STA PCIER_SLOT_STA +#define PCIR_EXPRESS_ROOT_CTL PCIER_ROOT_CTL +#define PCIR_EXPRESS_ROOT_CAP PCIER_ROOT_CAP +#define PCIR_EXPRESS_ROOT_STA PCIER_ROOT_STA +#define PCIR_EXPRESS_DEVICE_CAP2 PCIER_DEVICE_CAP2 +#define PCIR_EXPRESS_DEVICE_CTL2 PCIER_DEVICE_CTL2 +#define PCIM_EXP_CTL2_COMP_TIMEOUT_VAL PCIEM_CTL2_COMP_TIMEOUT_VAL +#define PCIM_EXP_CTL2_COMP_TIMEOUT_DIS PCIEM_CTL2_COMP_TIMEOUT_DIS +#define PCIM_EXP_CTL2_ARI PCIEM_CTL2_ARI +#define PCIM_EXP_CTL2_ATOMIC_REQ_ENABLE PCIEM_CTL2_ATOMIC_REQ_ENABLE +#define PCIM_EXP_CTL2_ATOMIC_EGR_BLOCK PCIEM_CTL2_ATOMIC_EGR_BLOCK +#define PCIM_EXP_CTL2_ID_ORDERED_REQ_EN PCIEM_CTL2_ID_ORDERED_REQ_EN +#define PCIM_EXP_CTL2_ID_ORDERED_CMP_EN PCIEM_CTL2_ID_ORDERED_CMP_EN +#define PCIM_EXP_CTL2_LTR_ENABLE PCIEM_CTL2_LTR_ENABLE +#define PCIM_EXP_CTL2_OBFF PCIEM_CTL2_OBFF +#define PCIM_EXP_OBFF_DISABLE PCIEM_OBFF_DISABLE +#define PCIM_EXP_OBFF_MSGA_ENABLE PCIEM_OBFF_MSGA_ENABLE +#define PCIM_EXP_OBFF_MSGB_ENABLE PCIEM_OBFF_MSGB_ENABLE +#define PCIM_EXP_OBFF_WAKE_ENABLE PCIEM_OBFF_WAKE_ENABLE +#define PCIM_EXP_CTL2_END2END_TLP PCIEM_CTL2_END2END_TLP +#define PCIR_EXPRESS_DEVICE_STA2 PCIER_DEVICE_STA2 +#define PCIR_EXPRESS_LINK_CAP2 PCIER_LINK_CAP2 +#define PCIR_EXPRESS_LINK_CTL2 PCIER_LINK_CTL2 +#define PCIR_EXPRESS_LINK_STA2 PCIER_LINK_STA2 +#define PCIR_EXPRESS_SLOT_CAP2 PCIER_SLOT_CAP2 +#define PCIR_EXPRESS_SLOT_CTL2 PCIER_SLOT_CTL2 +#define PCIR_EXPRESS_SLOT_STA2 PCIER_SLOT_STA2 /* MSI-X definitions */ #define PCIR_MSIX_CTRL 0x2 Modified: stable/8/sys/dev/re/if_re.c ============================================================================== --- stable/8/sys/dev/re/if_re.c Thu Oct 25 10:13:58 2012 (r242080) +++ stable/8/sys/dev/re/if_re.c Thu Oct 25 10:29:15 2012 (r242081) @@ -1339,14 +1339,14 @@ re_attach(device_t dev) /* Disable ASPM L0S/L1. */ if (sc->rl_expcap != 0) { cap = pci_read_config(dev, sc->rl_expcap + - PCIR_EXPRESS_LINK_CAP, 2); - if ((cap & PCIM_LINK_CAP_ASPM) != 0) { + PCIER_LINK_CAP, 2); + if ((cap & PCIEM_LINK_CAP_ASPM) != 0) { ctl = pci_read_config(dev, sc->rl_expcap + - PCIR_EXPRESS_LINK_CTL, 2); + PCIER_LINK_CTL, 2); if ((ctl & 0x0003) != 0) { ctl &= ~0x0003; pci_write_config(dev, sc->rl_expcap + - PCIR_EXPRESS_LINK_CTL, ctl, 2); + PCIER_LINK_CTL, ctl, 2); device_printf(dev, "ASPM disabled\n"); } } else Modified: stable/8/usr.sbin/pciconf/cap.c ============================================================================== --- stable/8/usr.sbin/pciconf/cap.c Thu Oct 25 10:13:58 2012 (r242080) +++ stable/8/usr.sbin/pciconf/cap.c Thu Oct 25 10:29:15 2012 (r242081) @@ -369,53 +369,53 @@ cap_express(int fd, struct pci_conf *p, uint32_t val; uint16_t flags; - flags = read_config(fd, &p->pc_sel, ptr + PCIR_EXPRESS_FLAGS, 2); - printf("PCI-Express %d ", flags & PCIM_EXP_FLAGS_VERSION); - switch (flags & PCIM_EXP_FLAGS_TYPE) { - case PCIM_EXP_TYPE_ENDPOINT: + flags = read_config(fd, &p->pc_sel, ptr + PCIER_FLAGS, 2); + printf("PCI-Express %d ", flags & PCIEM_FLAGS_VERSION); + switch (flags & PCIEM_FLAGS_TYPE) { + case PCIEM_TYPE_ENDPOINT: printf("endpoint"); break; - case PCIM_EXP_TYPE_LEGACY_ENDPOINT: + case PCIEM_TYPE_LEGACY_ENDPOINT: printf("legacy endpoint"); break; - case PCIM_EXP_TYPE_ROOT_PORT: + case PCIEM_TYPE_ROOT_PORT: printf("root port"); break; - case PCIM_EXP_TYPE_UPSTREAM_PORT: + case PCIEM_TYPE_UPSTREAM_PORT: printf("upstream port"); break; - case PCIM_EXP_TYPE_DOWNSTREAM_PORT: + case PCIEM_TYPE_DOWNSTREAM_PORT: printf("downstream port"); break; - case PCIM_EXP_TYPE_PCI_BRIDGE: + case PCIEM_TYPE_PCI_BRIDGE: printf("PCI bridge"); break; - case PCIM_EXP_TYPE_PCIE_BRIDGE: + case PCIEM_TYPE_PCIE_BRIDGE: printf("PCI to PCIe bridge"); break; - case PCIM_EXP_TYPE_ROOT_INT_EP: + case PCIEM_TYPE_ROOT_INT_EP: printf("root endpoint"); break; - case PCIM_EXP_TYPE_ROOT_EC: + case PCIEM_TYPE_ROOT_EC: printf("event collector"); break; default: - printf("type %d", (flags & PCIM_EXP_FLAGS_TYPE) >> 4); + printf("type %d", (flags & PCIEM_FLAGS_TYPE) >> 4); break; } - if (flags & PCIM_EXP_FLAGS_SLOT) + if (flags & PCIEM_FLAGS_SLOT) printf(" slot"); - if (flags & PCIM_EXP_FLAGS_IRQ) - printf(" IRQ %d", (flags & PCIM_EXP_FLAGS_IRQ) >> 9); - val = read_config(fd, &p->pc_sel, ptr + PCIR_EXPRESS_DEVICE_CAP, 4); - flags = read_config(fd, &p->pc_sel, ptr + PCIR_EXPRESS_DEVICE_CTL, 2); + if (flags & PCIEM_FLAGS_IRQ) + printf(" IRQ %d", (flags & PCIEM_FLAGS_IRQ) >> 9); + val = read_config(fd, &p->pc_sel, ptr + PCIER_DEVICE_CAP, 4); + flags = read_config(fd, &p->pc_sel, ptr + PCIER_DEVICE_CTL, 2); printf(" max data %d(%d)", - MAX_PAYLOAD((flags & PCIM_EXP_CTL_MAX_PAYLOAD) >> 5), - MAX_PAYLOAD(val & PCIM_EXP_CAP_MAX_PAYLOAD)); - val = read_config(fd, &p->pc_sel, ptr + PCIR_EXPRESS_LINK_CAP, 4); - flags = read_config(fd, &p->pc_sel, ptr+ PCIR_EXPRESS_LINK_STA, 2); - printf(" link x%d(x%d)", (flags & PCIM_LINK_STA_WIDTH) >> 4, - (val & PCIM_LINK_CAP_MAX_WIDTH) >> 4); + MAX_PAYLOAD((flags & PCIEM_CTL_MAX_PAYLOAD) >> 5), + MAX_PAYLOAD(val & PCIEM_CAP_MAX_PAYLOAD)); + val = read_config(fd, &p->pc_sel, ptr + PCIER_LINK_CAP, 4); + flags = read_config(fd, &p->pc_sel, ptr+ PCIER_LINK_STA, 2); + printf(" link x%d(x%d)", (flags & PCIEM_LINK_STA_WIDTH) >> 4, + (val & PCIEM_LINK_CAP_MAX_WIDTH) >> 4); } static void Modified: stable/8/usr.sbin/pciconf/err.c ============================================================================== --- stable/8/usr.sbin/pciconf/err.c Thu Oct 25 10:13:58 2012 (r242080) +++ stable/8/usr.sbin/pciconf/err.c Thu Oct 25 10:29:15 2012 (r242081) @@ -63,18 +63,18 @@ static struct bit_table pci_status[] = { /* Error indicators in the PCI-Express device status register. */ static struct bit_table pcie_device_status[] = { - { PCIM_EXP_STA_CORRECTABLE_ERROR, "Correctable Error Detected" }, - { PCIM_EXP_STA_NON_FATAL_ERROR, "Non-Fatal Error Detected" }, - { PCIM_EXP_STA_FATAL_ERROR, "Fatal Error Detected" }, - { PCIM_EXP_STA_UNSUPPORTED_REQ, "Unsupported Request Detected" }, + { PCIEM_STA_CORRECTABLE_ERROR, "Correctable Error Detected" }, + { PCIEM_STA_NON_FATAL_ERROR, "Non-Fatal Error Detected" }, + { PCIEM_STA_FATAL_ERROR, "Fatal Error Detected" }, + { PCIEM_STA_UNSUPPORTED_REQ, "Unsupported Request Detected" }, { 0, NULL }, }; /* Valid error indicator bits in the PCI-Express device status register. */ -#define PCIE_ERRORS (PCIM_EXP_STA_CORRECTABLE_ERROR | \ - PCIM_EXP_STA_NON_FATAL_ERROR | \ - PCIM_EXP_STA_FATAL_ERROR | \ - PCIM_EXP_STA_UNSUPPORTED_REQ) +#define PCIE_ERRORS (PCIEM_STA_CORRECTABLE_ERROR | \ + PCIEM_STA_NON_FATAL_ERROR | \ + PCIEM_STA_FATAL_ERROR | \ + PCIEM_STA_UNSUPPORTED_REQ) /* AER Uncorrected errors. */ static struct bit_table aer_uc[] = { @@ -147,7 +147,7 @@ list_errors(int fd, struct pci_conf *p) return; /* Check for PCI-e errors. */ - sta = read_config(fd, &p->pc_sel, pcie + PCIR_EXPRESS_DEVICE_STA, 2); + sta = read_config(fd, &p->pc_sel, pcie + PCIER_DEVICE_STA, 2); print_bits("PCI-e errors", pcie_device_status, sta & PCIE_ERRORS); /* See if this device supports AER. */ From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 10:35:08 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 C1FE55D7; Thu, 25 Oct 2012 10:35:08 +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 AAE768FC14; Thu, 25 Oct 2012 10:35: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 q9PAZ8qs032985; Thu, 25 Oct 2012 10:35:08 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9PAZ8l0032983; Thu, 25 Oct 2012 10:35:08 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201210251035.q9PAZ8l0032983@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Thu, 25 Oct 2012 10:35:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242082 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 10:35:08 -0000 Author: ae Date: Thu Oct 25 10:35:08 2012 New Revision: 242082 URL: http://svn.freebsd.org/changeset/base/242082 Log: Note the removal of the IPFIREWALL_FORWARD kernel option. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Thu Oct 25 10:29:15 2012 (r242081) +++ head/UPDATING Thu Oct 25 10:35:08 2012 (r242082) @@ -24,6 +24,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20121025: + The IPFIREWALL_FORWARD kernel option has been removed. Its + functionality now can be turned on using the net.pfil.forward + sysctl variable. + 20121023: The ZERO_COPY_SOCKET kernel option has been removed and split into SOCKET_SEND_COW and SOCKET_RECV_PFLIP. From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 11:37: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 1EA9653A; Thu, 25 Oct 2012 11:37:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) by mx1.freebsd.org (Postfix) with ESMTP id C891D8FC12; Thu, 25 Oct 2012 11:37:43 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:ed82:888c:f11e:aaaf] (unknown [IPv6:2001:7b8:3a7:0:ed82:888c:f11e:aaaf]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id EE5B55C59; Thu, 25 Oct 2012 13:37:41 +0200 (CEST) Message-ID: <50892486.9030201@FreeBSD.org> Date: Thu, 25 Oct 2012 13:37:42 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Brian Somers Subject: Re: svn commit: r242074 - head/etc/rc.d References: <201210250837.q9P8b9ur012402@svn.freebsd.org> In-Reply-To: <201210250837.q9P8b9ur012402@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 11:37:44 -0000 On 2012-10-25 10:37, Brian Somers wrote: ... > URL: http://svn.freebsd.org/changeset/base/242074 > > Log: > Enable "accept_rtadvd" on interfaces running rtadvd. ... > + for iface in ${command_args}; do > + ifconfig ${iface} inet6 -accept_rtadv > + done The commit message says it enables accept_rtadv, the code actually disables it. Which is correct? I assume the latter? From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 12:01: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 2F0C8E08; Thu, 25 Oct 2012 12:01:04 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) by mx1.freebsd.org (Postfix) with ESMTP id 7DB898FC18; Thu, 25 Oct 2012 12:01:03 +0000 (UTC) Received: from alph.allbsd.org (p1137-ipbf1505funabasi.chiba.ocn.ne.jp [118.7.212.137]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id q9PC0koH087685 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 25 Oct 2012 21:00:56 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) (authenticated bits=0) by alph.allbsd.org (8.14.5/8.14.5) with ESMTP id q9PC0ilT069549; Thu, 25 Oct 2012 21:00:45 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Thu, 25 Oct 2012 21:00:07 +0900 (JST) Message-Id: <20121025.210007.176692667026768547.hrs@allbsd.org> To: brian@FreeBSD.org, dim@FreeBSD.org Subject: Re: svn commit: r242074 - head/etc/rc.d From: Hiroki Sato In-Reply-To: <50892486.9030201@FreeBSD.org> References: <201210250837.q9P8b9ur012402@svn.freebsd.org> <50892486.9030201@FreeBSD.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.5 on Emacs 23.4 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Thu_Oct_25_21_00_07_2012_413)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Thu, 25 Oct 2012 21:00:56 +0900 (JST) X-Spam-Status: No, score=-98.1 required=13.0 tests=CONTENT_TYPE_PRESENT, ONLY1HOPDIRECT,SAMEHELOBY2HOP,USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 12:01:04 -0000 ----Security_Multipart(Thu_Oct_25_21_00_07_2012_413)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Dimitry Andric wrote in <50892486.9030201@FreeBSD.org>: di> On 2012-10-25 10:37, Brian Somers wrote: di> ... di> > URL: http://svn.freebsd.org/changeset/base/242074 di> > di> > Log: di> > Enable "accept_rtadvd" on interfaces running rtadvd. di> ... di> > + for iface in ${command_args}; do di> > + ifconfig ${iface} inet6 -accept_rtadv di> > + done di> di> The commit message says it enables accept_rtadv, the code actually di> disables it. Which is correct? I assume the latter? Enabling accept_rtadv should prevent rtadvd from sending RAs on the interface, so disabling it is a necessary step if one wants to send RAs. However, accept_rtadv is off by default in the current rc.d framework. Why forcibly disabling it is needed? -- Hiroki ----Security_Multipart(Thu_Oct_25_21_00_07_2012_413)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEABECAAYFAlCJKccACgkQTyzT2CeTzy3P6ACeKiWOJCnIyc+vXDYQvkC86VzC s2IAn0SNa5Whc3gLPsKi4MAnmxFwe8Sg =RltO -----END PGP SIGNATURE----- ----Security_Multipart(Thu_Oct_25_21_00_07_2012_413)---- From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 12:18: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 EC06F16E; Thu, 25 Oct 2012 12:18:19 +0000 (UTC) (envelope-from rdivacky@vlakno.cz) Received: from vlakno.cz (mail.vlakno.cz [178.238.39.38]) by mx1.freebsd.org (Postfix) with ESMTP id 83A4C8FC0C; Thu, 25 Oct 2012 12:18:18 +0000 (UTC) Received: by vlakno.cz (Postfix, from userid 1002) id B275F1CC55C6; Thu, 25 Oct 2012 14:12:23 +0200 (CEST) Date: Thu, 25 Oct 2012 14:12:23 +0200 From: Roman Divacky To: Ed Schouten Subject: Re: svn commit: r242080 - in head/contrib/llvm/tools/clang: include/clang/Basic lib/Sema Message-ID: <20121025121223.GA23573@freebsd.org> References: <201210251013.q9PADwYO029047@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201210251013.q9PADwYO029047@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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 12:18:20 -0000 Why? I can understand cherry picking revisions that fix bugs FreeBSD users hit but why additional features? Why cant this wait for next proper llvm/clang import? On Thu, Oct 25, 2012 at 10:13:58AM +0000, Ed Schouten wrote: > Author: ed > Date: Thu Oct 25 10:13:58 2012 > New Revision: 242080 > URL: http://svn.freebsd.org/changeset/base/242080 > > Log: > Pull in r166498 from upstream clang trunk: > > Add a new warning -Wmissing-variable-declarations, to warn about variables > defined without a previous declaration. This is similar to > -Wmissing-prototypes, but for variables instead of functions. > > Modified: > head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td > head/contrib/llvm/tools/clang/lib/Sema/Sema.cpp > head/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp > > Modified: head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td > ============================================================================== > --- head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td Thu Oct 25 09:39:14 2012 (r242079) > +++ head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td Thu Oct 25 10:13:58 2012 (r242080) > @@ -3058,6 +3058,9 @@ def note_sentinel_here : Note< > def warn_missing_prototype : Warning< > "no previous prototype for function %0">, > InGroup>, DefaultIgnore; > +def warn_missing_variable_declarations : Warning< > + "no previous extern declaration for non-static variable %0">, > + InGroup>, DefaultIgnore; > def err_redefinition : Error<"redefinition of %0">; > def err_definition_of_implicitly_declared_member : Error< > "definition of implicitly declared %select{default constructor|copy " > > Modified: head/contrib/llvm/tools/clang/lib/Sema/Sema.cpp > ============================================================================== > --- head/contrib/llvm/tools/clang/lib/Sema/Sema.cpp Thu Oct 25 09:39:14 2012 (r242079) > +++ head/contrib/llvm/tools/clang/lib/Sema/Sema.cpp Thu Oct 25 10:13:58 2012 (r242080) > @@ -648,6 +648,8 @@ void Sema::ActOnEndOfTranslationUnit() { > diag::err_tentative_def_incomplete_type)) > VD->setInvalidDecl(); > > + CheckCompleteVariableDeclaration(VD); > + > // Notify the consumer that we've completed a tentative definition. > if (!VD->isInvalidDecl()) > Consumer.CompleteTentativeDefinition(VD); > > Modified: head/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp > ============================================================================== > --- head/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp Thu Oct 25 09:39:14 2012 (r242079) > +++ head/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp Thu Oct 25 10:13:58 2012 (r242080) > @@ -6957,6 +6957,17 @@ void Sema::CheckCompleteVariableDeclarat > } > } > > + if (var->isThisDeclarationADefinition() && > + var->getLinkage() == ExternalLinkage) { > + // Find a previous declaration that's not a definition. > + VarDecl *prev = var->getPreviousDecl(); > + while (prev && prev->isThisDeclarationADefinition()) > + prev = prev->getPreviousDecl(); > + > + if (!prev) > + Diag(var->getLocation(), diag::warn_missing_variable_declarations) << var; > + } > + > // All the following checks are C++ only. > if (!getLangOpts().CPlusPlus) return; > From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 13:26: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 E2BAC522; Thu, 25 Oct 2012 13:26:00 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail04.syd.optusnet.com.au (mail04.syd.optusnet.com.au [211.29.132.185]) by mx1.freebsd.org (Postfix) with ESMTP id 5D3198FC08; Thu, 25 Oct 2012 13:25:59 +0000 (UTC) Received: from c122-106-175-26.carlnfd1.nsw.optusnet.com.au (c122-106-175-26.carlnfd1.nsw.optusnet.com.au [122.106.175.26]) by mail04.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q9PDPuG9025624 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 26 Oct 2012 00:25:57 +1100 Date: Fri, 26 Oct 2012 00:25:56 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov Subject: Re: svn commit: r242029 - head/sys/kern In-Reply-To: <20121025080551.GG35915@deviant.kiev.zoral.com.ua> Message-ID: <20121026001150.Q842@besplex.bde.org> References: <201210250146.q9P1kLi8043704@svn.freebsd.org> <20121025080551.GG35915@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-Cloudmark-Score: 0 X-Optus-Cloudmark-Analysis: v=2.0 cv=F/YP7ddN c=1 sm=1 a=w0_tA2oI8IYA:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=M4roAWbnUW4A:10 a=5ygRqN-VXvxw57WzJSIA:9 a=CjuIK1q_8ugA:10 a=bxQHXO5Py4tHmhUgaywp5w==:117 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Alfred Perlstein , src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 13:26:01 -0000 On Thu, 25 Oct 2012, Konstantin Belousov wrote: > On Thu, Oct 25, 2012 at 01:46:21AM +0000, Alfred Perlstein wrote: >> ... >> Modified: head/sys/kern/subr_param.c >> ============================================================================== >> --- head/sys/kern/subr_param.c Thu Oct 25 01:27:01 2012 (r242028) >> +++ head/sys/kern/subr_param.c Thu Oct 25 01:46:20 2012 (r242029) >> @@ -278,8 +278,16 @@ init_param2(long physpages) >> maxusers = physpages / (2 * 1024 * 1024 / PAGE_SIZE); >> if (maxusers < 32) >> maxusers = 32; >> - if (maxusers > 384) >> - maxusers = 384; >> + /* >> + * Clips maxusers to 384 on machines with <= 4GB RAM or 32bit. >> + * Scales it down 6x for large memory machines. >> + */ >> + if (maxusers > 384) { >> + if (sizeof(void *) <= 4) >> + maxusers = 384; >> + else >> + maxusers = 384 + ((maxusers - 384) / 6); >> + } > This is unbelievably weird way to express the '64bit'. The > #ifdef _LP64 is enough there instead of the runtime check. Such runtime checks are well optimized by compilers, giving nicer code than ifdefs. However, there are lots of other style bugs: - comments writtens not in English is - after deciphering the comments, we see that they match the code only in the unbelievably weird ways: (1) <= 4GB RAM isn't necessarily related to the size of void *. In fact, the size of physical memory certainly isn't related. The size of virtual memory is more closely related. But it is the physical memory size that is most relevant here. (2) 32 bitness isn't necessaril related to the size of void *. - after fixing the comments, they would just echo the code, and thus shouldn't be made. No comments are made for the other maxusers initializations, although it would be easy to write ones 10 times longer than this mail to describe all the historical bogus tuning given by maxusers. - half a level of indentation for the maxusers lines - excessive parentheses. Bruce From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 13:51: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 34111A31; Thu, 25 Oct 2012 13:51:02 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 05B3E8FC1D; Thu, 25 Oct 2012 13:51:02 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 5B51CB982; Thu, 25 Oct 2012 09:51:01 -0400 (EDT) From: John Baldwin To: "Andrey V. Elsukov" Subject: Re: svn commit: r242079 - in head: sbin/ipfw share/man/man4 sys/conf sys/net sys/netinet sys/netinet6 sys/netpfil/ipfw Date: Thu, 25 Oct 2012 09:28:38 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <201210250939.q9P9dF0q022970@svn.freebsd.org> In-Reply-To: <201210250939.q9P9dF0q022970@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201210250928.38465.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 25 Oct 2012 09:51:01 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 13:51:02 -0000 On Thursday, October 25, 2012 5:39:15 am Andrey V. Elsukov wrote: > Author: ae > Date: Thu Oct 25 09:39:14 2012 > New Revision: 242079 > URL: http://svn.freebsd.org/changeset/base/242079 > > Log: > Remove the IPFIREWALL_FORWARD kernel option and make possible to turn > on the related functionality in the runtime via the sysctl variable > net.pfil.forward. It is turned off by default. Certainly for MFC's I think it makes sense to retain the option, but make the option simply change the default from off to on. That avoids breaking existing kernel configurations. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 13:51: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 CAFBEA39; Thu, 25 Oct 2012 13:51:04 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 9B94D8FC20; Thu, 25 Oct 2012 13:51:04 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 3E5ECB9A8; Thu, 25 Oct 2012 09:51:03 -0400 (EDT) From: John Baldwin To: Gleb Smirnoff Subject: Re: svn commit: r242013 - head/sys/net Date: Thu, 25 Oct 2012 09:42:32 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <201210241833.q9OIXi77072545@svn.freebsd.org> <201210241442.33028.jhb@freebsd.org> <20121024190553.GM70741@FreeBSD.org> In-Reply-To: <20121024190553.GM70741@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Message-Id: <201210250942.32388.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 25 Oct 2012 09:51:04 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 13:51:04 -0000 On Wednesday, October 24, 2012 3:05:53 pm Gleb Smirnoff wrote: > On Wed, Oct 24, 2012 at 02:42:33PM -0400, John Baldwin wrote: > J> On Wednesday, October 24, 2012 2:33:44 pm Gleb Smirnoff wrote: > J> > Author: glebius > J> > Date: Wed Oct 24 18:33:44 2012 > J> > New Revision: 242013 > J> > URL: http://svn.freebsd.org/changeset/base/242013 > J> > > J> > Log: > J> > Fix fallout from r240071. If destination interface lookup fails, > J> > we should broadcast a packet, not try to deliver it to NULL. > J> > > J> > Reported by: rpaulo > J> > J> I wonder if this fixes the panic someone was reporting on net@ when removing > J> an interface from a bridge? > > I failed to find it on net@ or bugs@ in a timeframe after I committed > if_transmit patch to bridge. Ah, it was on current@: Subject: "panic possibly on on bridge member removal" It definitely had a null ifnet pointer. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 13:51: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 69BC9A3D; Thu, 25 Oct 2012 13:51:06 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 3AF948FC21; Thu, 25 Oct 2012 13:51:06 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 80DAEB982; Thu, 25 Oct 2012 09:51:05 -0400 (EDT) From: John Baldwin To: Konstantin Belousov Subject: Re: svn commit: r242029 - head/sys/kern Date: Thu, 25 Oct 2012 09:50:57 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <201210250146.q9P1kLi8043704@svn.freebsd.org> <20121025080551.GG35915@deviant.kiev.zoral.com.ua> In-Reply-To: <20121025080551.GG35915@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Message-Id: <201210250950.57161.jhb@freebsd.org> Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 25 Oct 2012 09:51:05 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 13:51:06 -0000 On Thursday, October 25, 2012 4:05:51 am Konstantin Belousov wrote: > On Thu, Oct 25, 2012 at 01:46:21AM +0000, Alfred Perlstein wrote: > > Author: alfred > > Date: Thu Oct 25 01:46:20 2012 > > New Revision: 242029 > > URL: http://svn.freebsd.org/changeset/base/242029 > > > > Log: > > Allow autotune maxusers > 384 on 64 bit machines > > > > A default install on large memory machines with multiple 10gigE interfaces > > were not being given enough mbufs to do full bandwidth TCP or NFS traffic. > > > > To keep the value somewhat reasonable, we scale back the number of > > maxuers by 1/6 past the 384 point. This gives us enough mbufs for most > > of our pretty basic 10gigE line-speed tests to complete. > > > > Modified: > > head/sys/kern/subr_param.c > > > > Modified: head/sys/kern/subr_param.c > > ============================================================================== > > --- head/sys/kern/subr_param.c Thu Oct 25 01:27:01 2012 (r242028) > > +++ head/sys/kern/subr_param.c Thu Oct 25 01:46:20 2012 (r242029) > > @@ -278,8 +278,16 @@ init_param2(long physpages) > > maxusers = physpages / (2 * 1024 * 1024 / PAGE_SIZE); > > if (maxusers < 32) > > maxusers = 32; > > - if (maxusers > 384) > > - maxusers = 384; > > + /* > > + * Clips maxusers to 384 on machines with <= 4GB RAM or 32bit. > > + * Scales it down 6x for large memory machines. > > + */ > > + if (maxusers > 384) { > > + if (sizeof(void *) <= 4) > > + maxusers = 384; > > + else > > + maxusers = 384 + ((maxusers - 384) / 6); > > + } > This is unbelievably weird way to express the '64bit'. The > #ifdef _LP64 is enough there instead of the runtime check. > > Also, are you sure that all our 64bit arches do not have KVA limitations ? There is an active thread on current@ with a different patch that uses a KVA constant to derive 384 instead. When we have updated tuning in the past (e.g. adjusting the cap on maxvnodes), there was a bit of discussion rather than a random drive by commit. I think we should probably hold off on making changes here and figure out what the right way to fix this is in the thread on current@ instead. Andre has already suggested divorcing mbuf tuning from maxusers entirely for example. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 13:55:10 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by hub.freebsd.org (Postfix) with ESMTP id 1F051186; Thu, 25 Oct 2012 13:55:10 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from [127.0.0.1] (hub.FreeBSD.org [8.8.178.136]) by mx2.freebsd.org (Postfix) with ESMTP id 8AB6E3B4EFE; Thu, 25 Oct 2012 13:55:08 +0000 (UTC) Message-ID: <508944AB.1010605@FreeBSD.org> Date: Thu, 25 Oct 2012 17:54:51 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:16.0) Gecko/20121023 Thunderbird/16.0.1 MIME-Version: 1.0 To: John Baldwin Subject: Re: svn commit: r242079 - in head: sbin/ipfw share/man/man4 sys/conf sys/net sys/netinet sys/netinet6 sys/netpfil/ipfw References: <201210250939.q9P9dF0q022970@svn.freebsd.org> <201210250928.38465.jhb@freebsd.org> In-Reply-To: <201210250928.38465.jhb@freebsd.org> X-Enigmail-Version: 1.4.5 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig23ED8362B9D088A8DBDC3FEB" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 13:55:10 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig23ED8362B9D088A8DBDC3FEB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 25.10.2012 17:28, John Baldwin wrote: >> Remove the IPFIREWALL_FORWARD kernel option and make possible to tur= n >> on the related functionality in the runtime via the sysctl variable >> net.pfil.forward. It is turned off by default. >=20 > Certainly for MFC's I think it makes sense to retain the option, but > make the option simply change the default from off to on. That avoids > breaking existing kernel configurations. Yes, this is exactly what i plan to do. --=20 WBR, Andrey V. Elsukov --------------enig23ED8362B9D088A8DBDC3FEB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBAgAGBQJQiUSyAAoJEAHF6gQQyKF6AjcH/0tW4CqOINZL/1H3lD5OnB7N 4YPyv8z4T47j8pc3y8C00y5FCo2Ev7SVJaTAxF1VLQ3Oi+wefsRk+T740RVRbFMA /Wfn/92mtepAKWSmRq5T6OJxhyiPbaRgq/ITwszJms99sPG5DdHc5S6U/iwxyMH5 zUx9o8kxKCRyTjm1Ras8l7pq0t49JMA/csf5B+oqlGih1SGDZUAkYTr64bpJRCzq SbntEgJLcETSmA8Vts91m4xG3I1p6mN1ufqNeXrIa+37eN5LCq7PhgDhxLIpwBkv +w5yxylt5kWbJkP9qgdRKFpxW4U0L9SFq35QIjhLgMY5oPCyfcvUOzjL7oWI0hw= =4bea -----END PGP SIGNATURE----- --------------enig23ED8362B9D088A8DBDC3FEB-- From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 15:25: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 72A0DDB7; Thu, 25 Oct 2012 15:25:18 +0000 (UTC) (envelope-from kuriyama@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4FA8C8FC14; Thu, 25 Oct 2012 15:25: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 q9PFPIw0087708; Thu, 25 Oct 2012 15:25:18 GMT (envelope-from kuriyama@svn.freebsd.org) Received: (from kuriyama@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9PFPI6Q087704; Thu, 25 Oct 2012 15:25:18 GMT (envelope-from kuriyama@svn.freebsd.org) Message-Id: <201210251525.q9PFPI6Q087704@svn.freebsd.org> From: Jun Kuriyama Date: Thu, 25 Oct 2012 15:25:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242083 - in stable/8/etc: defaults rc.d X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 15:25:18 -0000 Author: kuriyama Date: Thu Oct 25 15:25:17 2012 New Revision: 242083 URL: http://svn.freebsd.org/changeset/base/242083 Log: Merge r239382: - Allow to pass extra parameters for each jails. - To achieve above, convert jail(8) invocation to use new style command line "-c" flag. Thanks to: lstewart Modified: stable/8/etc/defaults/rc.conf stable/8/etc/rc.d/jail Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/defaults/rc.conf ============================================================================== --- stable/8/etc/defaults/rc.conf Thu Oct 25 10:35:08 2012 (r242082) +++ stable/8/etc/defaults/rc.conf Thu Oct 25 15:25:17 2012 (r242083) @@ -686,6 +686,7 @@ jail_sysvipc_allow="NO" # Allow SystemV #jail_example_mount_enable="NO" # mount/umount jail's fs #jail_example_fstab="" # fstab(5) for mount/umount #jail_example_flags="-l -U root" # flags for jail(8) +#jail_example_parameters="allow.raw_sockets=1" # extra parameters for this jail ############################################################## ### Define source_rc_confs, the mechanism used by /etc/rc.* ## Modified: stable/8/etc/rc.d/jail ============================================================================== --- stable/8/etc/rc.d/jail Thu Oct 25 10:35:08 2012 (r242082) +++ stable/8/etc/rc.d/jail Thu Oct 25 15:25:17 2012 (r242083) @@ -113,6 +113,8 @@ init_variables() [ -z "${_flags}" ] && _flags="-l -U root" eval _consolelog=\"\${jail_${_j}_consolelog:-${jail_consolelog}}\" [ -z "${_consolelog}" ] && _consolelog="/var/log/jail_${_j}_console.log" + eval _parameters=\"\${jail_${_j}_parameters:-${jail_parameters}}\" + [ -z "${_parameters}" ] && _parameters="" eval _fib=\"\${jail_${_j}_fib:-${jail_fib}}\" # Debugging aid @@ -191,6 +193,7 @@ init_variables() debug "$_j flags: $_flags" debug "$_j consolelog: $_consolelog" + debug "$_j parameters: $_parameters" if [ -z "${_hostname}" ]; then err 3 "$name: No hostname has been defined for ${_j}" @@ -482,9 +485,19 @@ jail_handle_ips_option() esac # Append address to list of addresses for the jail command. - case "${_addrl}" in - "") _addrl="${_addr}" ;; - *) _addrl="${_addrl},${_addr}" ;; + case "${_type}" in + inet) + case "${_addrl}" in + "") _addrl="${_addr}" ;; + *) _addrl="${_addrl},${_addr}" ;; + esac + ;; + inet6) + case "${_addr6l}" in + "") _addr6l="${_addr}" ;; + *) _addr6l="${_addr6l},${_addr}" ;; + esac + ;; esac # Configure interface alias if requested by a given interface @@ -567,6 +580,7 @@ jail_start() continue; fi _addrl="" + _addr6l="" jail_ips "add" if [ -n "${_fib}" ]; then _setfib="setfib -F '${_fib}'" @@ -632,8 +646,8 @@ jail_start() i=$((i + 1)) done - eval ${_setfib} jail ${_flags} -i ${_rootdir} ${_hostname} \ - \"${_addrl}\" ${_exec_start} > ${_tmp_jail} 2>&1 + eval ${_setfib} jail -n ${_jail} ${_flags} -i -c path=${_rootdir} host.hostname=${_hostname} \ + ip4.addr=\"${_addrl}\" ip6.addr=\"${_addr6l}\" ${_parameters} command=${_exec_start} > ${_tmp_jail} 2>&1 if [ "$?" -eq 0 ] ; then _jail_id=$(head -1 ${_tmp_jail}) From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 15:45: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 D2178294; Thu, 25 Oct 2012 15:45:32 +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 B6A5E8FC0C; Thu, 25 Oct 2012 15:45: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 q9PFjWg1091172; Thu, 25 Oct 2012 15:45:32 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9PFjWLJ091170; Thu, 25 Oct 2012 15:45:32 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210251545.q9PFjWLJ091170@svn.freebsd.org> From: Alexander Motin Date: Thu, 25 Oct 2012 15:45:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242084 - head/sys/boot/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 15:45:33 -0000 Author: mav Date: Thu Oct 25 15:45:32 2012 New Revision: 242084 URL: http://svn.freebsd.org/changeset/base/242084 Log: Remove new-line characters from the include() errors to make it consistent with the rest of code. Modified: head/sys/boot/common/interp.c Modified: head/sys/boot/common/interp.c ============================================================================== --- head/sys/boot/common/interp.c Thu Oct 25 15:25:17 2012 (r242083) +++ head/sys/boot/common/interp.c Thu Oct 25 15:45:32 2012 (r242084) @@ -211,7 +211,7 @@ include(const char *filename) #endif if (((fd = open(filename, O_RDONLY)) == -1)) { - sprintf(command_errbuf,"can't open '%s': %s\n", filename, strerror(errno)); + sprintf(command_errbuf,"can't open '%s': %s", filename, strerror(errno)); return(CMD_ERROR); } @@ -254,7 +254,7 @@ include(const char *filename) free(se); } sprintf(command_errbuf, "file '%s' line %d: memory allocation " - "failure - aborting\n", filename, line); + "failure - aborting", filename, line); return (CMD_ERROR); } strcpy(sp->text, cp); From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 15:55: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 A272D550 for ; Thu, 25 Oct 2012 15:55:02 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 06FD78FC1B for ; Thu, 25 Oct 2012 15:55:01 +0000 (UTC) Received: (qmail 41962 invoked from network); 25 Oct 2012 17:32:33 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 25 Oct 2012 17:32:33 -0000 Message-ID: <508960C2.6030003@freebsd.org> Date: Thu, 25 Oct 2012 17:54:42 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: "Andrey V. Elsukov" Subject: Re: svn commit: r242079 - in head: sbin/ipfw share/man/man4 sys/conf sys/net sys/netinet sys/netinet6 sys/netpfil/ipfw References: <201210250939.q9P9dF0q022970@svn.freebsd.org> In-Reply-To: <201210250939.q9P9dF0q022970@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 15:55:02 -0000 On 25.10.2012 11:39, Andrey V. Elsukov wrote: > Author: ae > Date: Thu Oct 25 09:39:14 2012 > New Revision: 242079 > URL: http://svn.freebsd.org/changeset/base/242079 > > Log: > Remove the IPFIREWALL_FORWARD kernel option and make possible to turn > on the related functionality in the runtime via the sysctl variable > net.pfil.forward. It is turned off by default. > > Sponsored by: Yandex LLC > Discussed with: net@ > MFC after: 2 weeks I still don't agree with naming the sysctl net.pfil.forward. This type of forwarding is a property of IPv4 and IPv6 and thus should be put there. Pfil hooking can be on layer 2, 2-bridging, 3 and who knows where else in the future. Forwarding works only for IPv46. You haven't even replied to my comment on net@. Please change the sysctl location and name to its appropriate place. Also an MFC's after 2 weeks must ensure that compiling with IPFIREWALL_ FORWARD enabled the sysctl at the same time to keep kernel configs within 9-stable working. -- Andre From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 16:23: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 914ECF56 for ; Thu, 25 Oct 2012 16:23:52 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id D8CDA8FC1B for ; Thu, 25 Oct 2012 16:23:51 +0000 (UTC) Received: (qmail 42229 invoked from network); 25 Oct 2012 18:01:28 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 25 Oct 2012 18:01:28 -0000 Message-ID: <5089678A.6070609@freebsd.org> Date: Thu, 25 Oct 2012 18:23:38 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: Bruce Evans Subject: Re: svn commit: r242014 - head/sys/kern References: <201210241836.q9OIafqo073002@svn.freebsd.org> <50883EA8.1010308@freebsd.org> <20121025142313.S999@besplex.bde.org> In-Reply-To: <20121025142313.S999@besplex.bde.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Adrian Chadd , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, Attilio Rao , svn-src-head@FreeBSD.org, Jim Harris X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 16:23:52 -0000 On 25.10.2012 05:49, Bruce Evans wrote: > On Wed, 24 Oct 2012, Attilio Rao wrote: > >> On Wed, Oct 24, 2012 at 8:16 PM, Andre Oppermann wrote: >>> ... >>> Let's go back and see how we can do this the sanest way. These are >>> the options I see at the moment: >>> >>> 1. sprinkle __aligned(CACHE_LINE_SIZE) all over the place >> >> This is wrong because it doesn't give padding. > > Unless it is sprinkled in struct declarations. > >>> 2. use a macro like MTX_ALIGN that can be SMP/UP aware and in >>> the future possibly change to a different compiler dependent >>> align attribute >> >> What is this macro supposed to do? I don't understand that from your >> description. >> >>> 3. embed __aligned(CACHE_LINE_SIZE) into struct mtx itself so it >>> automatically gets aligned in all cases, even when dynamically >>> allocated. >> >> This works but I think it is overkill for structures including sleep >> mutexes which are the vast majority. So I wouldn't certainly be in >> favor of such a patch. > > This doesn't work either with fully dynamic (auto) allocations. Stack > alignment is generally broken (limited, and pessimized for both space > and time) in gcc (it works better in clang). On amd64, it is limited > by the default of -mpreferred-stack-boundary=4. Since 2**4 is smaller > than the cache line size and stack alignments larger than it are broken > in gcc, __aligned(CACHE_LINE_SIZE) never works (except accidentally, > 16/CACHE_LINE_SIZE of the time. On i386, we reduce the space/time > pessimizations a little by overriding the default to > -mpreferred-stack-boundary=2. 2**2 is even smaller than the cache > line size. (The pessimizations are for both space and time, since > time and code space is wasted for the code to keep the stack aligned, > and cache space and thus also time are wasted for padding. Most > functions don't benefit from more than sizeof(register_t) alignment.) I'm not aware of stack allocated mutexes anywhere in the kernel. Even if there is a case it's very special and unique. I've verified that __aligned(CACHE_LINE_SIZE) on the definition of struct mtx itself (in sys/_mutex.h) correctly aligns and pads the global .bss resident mutexes for 64B and 128B cache line sizes. > Dynamic allocations via malloc() get whatever alignment malloc() gives. > This is only required to be 4 or 8 or 16 or so (the maximum for a C > object declared in conforming C (no __align()), but malloc() usually > gives more. If it gives CACHE_LINE_SIZE, that is wasteful for most > small allocations. Stand-alone mutexes are normally not malloc'ed. They're always embedded into some larger structure they protect. > __builtin_alloca() is broken in gcc-3.3.3, but works in gcc-4.2.1, at > least on i386. In gcc-3.3.3, it assumes that the stack is the default > 16-byte aligned even if -mpreferred-stack-boundary=2 is in CFLAGS to > say otherwise, and just subtracts from the stack pointer. In gcc-4.2.1, > it does the necessary andl of the stack pointer, but only 16-byte > alignment. > > It is another bug that there sre no extensions of malloc() or alloca(). > Since malloc() is in the library and may give CACHE_LINE_SIZE but > __builtin_alloca() is in the compiler and only gives 16, these functions > are not even as compatible as they should be. > > I don't know of any mutexes allocated on the stack, but there are stack > frames with mcontexts in them that need special alignment so they cause > problems on i386. They can't just be put on the stack due to the above > bugs. They are laboriously allocated using malloc(). Since they are a > quite large, 1 mcontext barely fits on the kernel stack, so kib didn't > like my alloca() method for allocating them. You lost me here. -- Andre From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 16:25:19 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by hub.freebsd.org (Postfix) with ESMTP id 672C915A; Thu, 25 Oct 2012 16:25:19 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from [127.0.0.1] (hub.FreeBSD.org [8.8.178.136]) by mx2.freebsd.org (Postfix) with ESMTP id C64263B4C1A; Thu, 25 Oct 2012 16:25:17 +0000 (UTC) Message-ID: <508967E3.3070508@FreeBSD.org> Date: Thu, 25 Oct 2012 20:25:07 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:16.0) Gecko/20121023 Thunderbird/16.0.1 MIME-Version: 1.0 To: Andre Oppermann Subject: Re: svn commit: r242079 - in head: sbin/ipfw share/man/man4 sys/conf sys/net sys/netinet sys/netinet6 sys/netpfil/ipfw References: <201210250939.q9P9dF0q022970@svn.freebsd.org> <508960C2.6030003@freebsd.org> In-Reply-To: <508960C2.6030003@freebsd.org> X-Enigmail-Version: 1.4.5 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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 16:25:19 -0000 On 25.10.2012 19:54, Andre Oppermann wrote: > I still don't agree with naming the sysctl net.pfil.forward. This > type of forwarding is a property of IPv4 and IPv6 and thus should > be put there. Pfil hooking can be on layer 2, 2-bridging, 3 and > who knows where else in the future. Forwarding works only for IPv46. > > You haven't even replied to my comment on net@. Please change the > sysctl location and name to its appropriate place. Hi Andre, There were two replies related to this subject, you did not replied to them and i thought that you became agree. So, if not, what you think about the name net.pfil.ipforward? > Also an MFC's after 2 weeks must ensure that compiling with IPFIREWALL_ > FORWARD enabled the sysctl at the same time to keep kernel configs > within 9-stable working. Yes, it will work like that. -- WBR, Andrey V. Elsukov From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 17:18: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 06981DC3; Thu, 25 Oct 2012 17:18:46 +0000 (UTC) (envelope-from brian@awfulhak.org) Received: from idcmail-mo2no.shaw.ca (idcmail-mo2no.shaw.ca [64.59.134.9]) by mx1.freebsd.org (Postfix) with ESMTP id 769E88FC0C; Thu, 25 Oct 2012 17:18:44 +0000 (UTC) Received: from lb7f8hsrpno-svcs.dcs.int.inet (HELO pd5ml3no-ssvc.prod.shaw.ca) ([10.0.144.222]) by pd6mo1no-svcs.prod.shaw.ca with ESMTP; 25 Oct 2012 11:18:38 -0600 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=lbZngtFpA+T3WvIHIl4wnoqCVcx9ie5HeyIhFFUqCgg= c=1 sm=1 a=wom5GMh1gUkA:10 a=gyNmXv_Ll5gA:10 a=dBRESv0yCI8A:10 a=BLceEmwcHowA:10 a=kj9zAlcOel0A:10 a=Jvqgub9IZPV2TmRqH1mFPg==:17 a=6I5d2MoRAAAA:8 a=MMwg4So0AAAA:8 a=k_g7LV2XLHczmujdHMkA:9 a=CjuIK1q_8ugA:10 a=SV7veod9ZcQA:10 a=WJ3hkfHDukgA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Received: from unknown (HELO gw.Awfulhak.org) ([174.7.169.46]) by pd5ml3no-dmz.prod.shaw.ca with ESMTP; 25 Oct 2012 11:18:36 -0600 Received: from thong.lan.Awfulhak.org (thong.lan.Awfulhak.org [172.16.0.31]) by gw.Awfulhak.org (8.14.5/8.14.5) with ESMTP id q9PHIRUi090112 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 25 Oct 2012 10:18:28 -0700 (PDT) (envelope-from brian@lan.Awfulhak.org) Received: from thong.lan.Awfulhak.org (localhost [127.0.0.1]) by thong.lan.Awfulhak.org (8.14.5/8.14.5) with ESMTP id q9PHIR9Q063794; Thu, 25 Oct 2012 10:18:27 -0700 (PDT) (envelope-from brian@thong.lan.Awfulhak.org) Received: (from brian@localhost) by thong.lan.Awfulhak.org (8.14.5/8.14.5/Submit) id q9PHIRHJ063793; Thu, 25 Oct 2012 10:18:27 -0700 (PDT) (envelope-from brian) Date: Thu, 25 Oct 2012 10:18:27 -0700 From: Brian Somers To: Hiroki Sato Subject: Re: svn commit: r242074 - head/etc/rc.d Message-ID: <20121025171827.GA59432@thong.lan.Awfulhak.org> References: <201210250837.q9P8b9ur012402@svn.freebsd.org> <50892486.9030201@FreeBSD.org> <20121025.210007.176692667026768547.hrs@allbsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20121025.210007.176692667026768547.hrs@allbsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-1.7 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gw.lan.Awfulhak.org Cc: svn-src-head@FreeBSD.org, dim@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, brian@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 17:18:46 -0000 On Thu, Oct 25, 2012 at 09:00:07PM +0900, Hiroki Sato wrote: > Dimitry Andric wrote > in <50892486.9030201@FreeBSD.org>: > > di> On 2012-10-25 10:37, Brian Somers wrote: > di> ... > di> > URL: http://svn.freebsd.org/changeset/base/242074 > di> > > di> > Log: > di> > Enable "accept_rtadvd" on interfaces running rtadvd. > di> ... > di> > + for iface in ${command_args}; do > di> > + ifconfig ${iface} inet6 -accept_rtadv > di> > + done > di> > di> The commit message says it enables accept_rtadv, the code actually > di> disables it. Which is correct? I assume the latter? Yes, the message should have read "Enable sending router advertisments". Sorry, the exact opposite came out - the naming does my head in :-/ > > Enabling accept_rtadv should prevent rtadvd from sending RAs on the > interface, so disabling it is a necessary step if one wants to send > RAs. > > However, accept_rtadv is off by default in the current rc.d > framework. Why forcibly disabling it is needed? After upgrading from 8-STABLE to 9-STABLE on Monday, IPv6 routing advertisments were broken. Disabling accept (enabling send) appeared to be necessary to get things up and running. As you say, net.inet6.ip6.accept_rtadv is set to zero (off, meaning that we *can* send advertisments), so I don't now what the issue is. Irrespective of this, I think it's useful to explicitly set the interface to be able to send advertisments when running rtadvd - just in case the sysctl is set to 1 elsewhere. Doing an "ifconfig inet6 accept_rtadv" after boot doesn't seem to disable sending advertisments, so I'm finding it difficult to test this remotely... testing is awkward when I'm not at home as this machine is also suffering from the "can't reboot" issue!! I'll look into why the sysctl doesn't seem to behave as expected when I get home this evening. -- Brian Somers Don't _EVER_ lose your sense of humour ! From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 17:22: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 E7C08F7A; Thu, 25 Oct 2012 17:22:37 +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 CFD3F8FC0A; Thu, 25 Oct 2012 17:22: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 q9PHMbOY007549; Thu, 25 Oct 2012 17:22:37 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9PHMbgh007546; Thu, 25 Oct 2012 17:22:37 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201210251722.q9PHMbgh007546@svn.freebsd.org> From: Jim Harris Date: Thu, 25 Oct 2012 17:22:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242085 - head/usr.sbin/pciconf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 17:22:38 -0000 Author: jimharris Date: Thu Oct 25 17:22:37 2012 New Revision: 242085 URL: http://svn.freebsd.org/changeset/base/242085 Log: For PCI Express capability, if max link width is greater than zero, print the current and max link speed. Sponsored by: Intel Discussed with: jhb MFC after: 1 week Modified: head/usr.sbin/pciconf/cap.c Modified: head/usr.sbin/pciconf/cap.c ============================================================================== --- head/usr.sbin/pciconf/cap.c Thu Oct 25 15:45:32 2012 (r242084) +++ head/usr.sbin/pciconf/cap.c Thu Oct 25 17:22:37 2012 (r242085) @@ -363,6 +363,22 @@ cap_subvendor(int fd, struct pci_conf *p #define MAX_PAYLOAD(field) (128 << (field)) +static const char * +link_speed_string(uint8_t speed) +{ + + switch (speed) { + case 1: + return ("2.5"); + case 2: + return ("5.0"); + case 3: + return ("8.0"); + default: + return ("undef"); + } +} + static void cap_express(int fd, struct pci_conf *p, uint8_t ptr) { @@ -418,6 +434,16 @@ cap_express(int fd, struct pci_conf *p, flags = read_config(fd, &p->pc_sel, ptr+ PCIER_LINK_STA, 2); printf(" link x%d(x%d)", (flags & PCIEM_LINK_STA_WIDTH) >> 4, (val & PCIEM_LINK_CAP_MAX_WIDTH) >> 4); + /* + * Only print link speed info if the link's max width is + * greater than 0. + */ + if ((val & PCIEM_LINK_CAP_MAX_WIDTH) != 0) { + printf("\n speed"); + printf(" %s(%s)", (flags & PCIEM_LINK_STA_WIDTH) == 0 ? + "0.0" : link_speed_string(flags & PCIEM_LINK_STA_SPEED), + link_speed_string(val & PCIEM_LINK_CAP_MAX_SPEED)); + } } static void From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 17:29: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 438E4353; Thu, 25 Oct 2012 17:29:12 +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 295CD8FC0C; Thu, 25 Oct 2012 17:29: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 q9PHTCP0008878; Thu, 25 Oct 2012 17:29:12 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9PHTC0f008874; Thu, 25 Oct 2012 17:29:12 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201210251729.q9PHTC0f008874@svn.freebsd.org> From: Xin LI Date: Thu, 25 Oct 2012 17:29:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242086 - in head: share/man/man4 sys/dev/hptiop X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 17:29:12 -0000 Author: delphij Date: Thu Oct 25 17:29:11 2012 New Revision: 242086 URL: http://svn.freebsd.org/changeset/base/242086 Log: Update hptiop(4) to version 1.8, which added support for HighPoint RocketRAID 4500 series. Many thanks to HighPoint Technologies for their continued support of FreeBSD! Submitted by: HighPoint Technologies MFC after: 3 days Modified: head/share/man/man4/hptiop.4 head/sys/dev/hptiop/hptiop.c head/sys/dev/hptiop/hptiop.h Modified: head/share/man/man4/hptiop.4 ============================================================================== --- head/share/man/man4/hptiop.4 Thu Oct 25 17:22:37 2012 (r242085) +++ head/share/man/man4/hptiop.4 Thu Oct 25 17:29:11 2012 (r242086) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 5, 2012 +.Dd October 25, 2012 .Dt HPTIOP 4 .Os .Sh NAME @@ -58,6 +58,10 @@ driver supports the following SAS and SA .Pp .Bl -bullet -compact .It +HighPoint RocketRAID 4522 +.It +HighPoint RocketRAID 4520 +.It HighPoint RocketRAID 4322 .It HighPoint RocketRAID 4321 Modified: head/sys/dev/hptiop/hptiop.c ============================================================================== --- head/sys/dev/hptiop/hptiop.c Thu Oct 25 17:22:37 2012 (r242085) +++ head/sys/dev/hptiop/hptiop.c Thu Oct 25 17:29:11 2012 (r242086) @@ -1,6 +1,6 @@ /* * HighPoint RR3xxx/4xxx RAID Driver for FreeBSD - * Copyright (C) 2007-2008 HighPoint Technologies, Inc. All Rights Reserved. + * Copyright (C) 2007-2012 HighPoint Technologies, Inc. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -89,8 +89,8 @@ __FBSDID("$FreeBSD$"); #include -static char driver_name[] = "hptiop"; -static char driver_version[] = "v1.3 (010208)"; +static const char driver_name[] = "hptiop"; +static const char driver_version[] = "v1.8"; static devclass_t hptiop_devclass; @@ -99,41 +99,62 @@ static int hptiop_send_sync_msg(struct h static void hptiop_request_callback_itl(struct hpt_iop_hba *hba, u_int32_t req); static void hptiop_request_callback_mv(struct hpt_iop_hba *hba, u_int64_t req); +static void hptiop_request_callback_mvfrey(struct hpt_iop_hba *hba, + u_int32_t req); static void hptiop_os_message_callback(struct hpt_iop_hba *hba, u_int32_t msg); static int hptiop_do_ioctl_itl(struct hpt_iop_hba *hba, struct hpt_iop_ioctl_param *pParams); static int hptiop_do_ioctl_mv(struct hpt_iop_hba *hba, struct hpt_iop_ioctl_param *pParams); +static int hptiop_do_ioctl_mvfrey(struct hpt_iop_hba *hba, + struct hpt_iop_ioctl_param *pParams); static int hptiop_rescan_bus(struct hpt_iop_hba *hba); static int hptiop_alloc_pci_res_itl(struct hpt_iop_hba *hba); static int hptiop_alloc_pci_res_mv(struct hpt_iop_hba *hba); +static int hptiop_alloc_pci_res_mvfrey(struct hpt_iop_hba *hba); static int hptiop_get_config_itl(struct hpt_iop_hba *hba, struct hpt_iop_request_get_config *config); static int hptiop_get_config_mv(struct hpt_iop_hba *hba, struct hpt_iop_request_get_config *config); +static int hptiop_get_config_mvfrey(struct hpt_iop_hba *hba, + struct hpt_iop_request_get_config *config); static int hptiop_set_config_itl(struct hpt_iop_hba *hba, struct hpt_iop_request_set_config *config); static int hptiop_set_config_mv(struct hpt_iop_hba *hba, struct hpt_iop_request_set_config *config); +static int hptiop_set_config_mvfrey(struct hpt_iop_hba *hba, + struct hpt_iop_request_set_config *config); static int hptiop_internal_memalloc_mv(struct hpt_iop_hba *hba); +static int hptiop_internal_memalloc_mvfrey(struct hpt_iop_hba *hba); +static int hptiop_internal_memfree_itl(struct hpt_iop_hba *hba); static int hptiop_internal_memfree_mv(struct hpt_iop_hba *hba); +static int hptiop_internal_memfree_mvfrey(struct hpt_iop_hba *hba); static int hptiop_post_ioctl_command_itl(struct hpt_iop_hba *hba, u_int32_t req32, struct hpt_iop_ioctl_param *pParams); static int hptiop_post_ioctl_command_mv(struct hpt_iop_hba *hba, struct hpt_iop_request_ioctl_command *req, struct hpt_iop_ioctl_param *pParams); +static int hptiop_post_ioctl_command_mvfrey(struct hpt_iop_hba *hba, + struct hpt_iop_request_ioctl_command *req, + struct hpt_iop_ioctl_param *pParams); static void hptiop_post_req_itl(struct hpt_iop_hba *hba, struct hpt_iop_srb *srb, bus_dma_segment_t *segs, int nsegs); static void hptiop_post_req_mv(struct hpt_iop_hba *hba, struct hpt_iop_srb *srb, bus_dma_segment_t *segs, int nsegs); +static void hptiop_post_req_mvfrey(struct hpt_iop_hba *hba, + struct hpt_iop_srb *srb, + bus_dma_segment_t *segs, int nsegs); static void hptiop_post_msg_itl(struct hpt_iop_hba *hba, u_int32_t msg); static void hptiop_post_msg_mv(struct hpt_iop_hba *hba, u_int32_t msg); +static void hptiop_post_msg_mvfrey(struct hpt_iop_hba *hba, u_int32_t msg); static void hptiop_enable_intr_itl(struct hpt_iop_hba *hba); static void hptiop_enable_intr_mv(struct hpt_iop_hba *hba); +static void hptiop_enable_intr_mvfrey(struct hpt_iop_hba *hba); static void hptiop_disable_intr_itl(struct hpt_iop_hba *hba); static void hptiop_disable_intr_mv(struct hpt_iop_hba *hba); +static void hptiop_disable_intr_mvfrey(struct hpt_iop_hba *hba); static void hptiop_free_srb(struct hpt_iop_hba *hba, struct hpt_iop_srb *srb); static int hptiop_os_query_remove_device(struct hpt_iop_hba *hba, int tid); static int hptiop_probe(device_t dev); @@ -146,8 +167,7 @@ static void hptiop_async(void *callback_ struct cam_path *path, void *arg); static void hptiop_pci_intr(void *arg); static void hptiop_release_resource(struct hpt_iop_hba *hba); -static int hptiop_reset_adapter(struct hpt_iop_hba *hba); - +static void hptiop_reset_adapter(void *argv); static d_open_t hptiop_open; static d_close_t hptiop_close; static d_ioctl_t hptiop_ioctl; @@ -193,6 +213,11 @@ static struct cdevsw hptiop_cdevsw = { #define BUS_SPACE_RD4_MV2(offset) bus_space_read_4(hba->bar2t,\ hba->bar2h, offsetof(struct hpt_iopmu_mv, offset)) +#define BUS_SPACE_WRT4_MVFREY2(offset, value) bus_space_write_4(hba->bar2t,\ + hba->bar2h, offsetof(struct hpt_iopmu_mvfrey, offset), value) +#define BUS_SPACE_RD4_MVFREY2(offset) bus_space_read_4(hba->bar2t,\ + hba->bar2h, offsetof(struct hpt_iopmu_mvfrey, offset)) + static int hptiop_open(ioctl_dev_t dev, int flags, int devtype, ioctl_thread_t proc) { @@ -294,6 +319,12 @@ static void hptiop_post_msg_mv(struct hp BUS_SPACE_RD4_MV0(outbound_intmask); } +static void hptiop_post_msg_mvfrey(struct hpt_iop_hba *hba, u_int32_t msg) +{ + BUS_SPACE_WRT4_MVFREY2(f0_to_cpu_msg_a, msg); + BUS_SPACE_RD4_MVFREY2(f0_to_cpu_msg_a); +} + static int hptiop_wait_ready_itl(struct hpt_iop_hba * hba, u_int32_t millisec) { u_int32_t req=0; @@ -323,6 +354,15 @@ static int hptiop_wait_ready_mv(struct h return 0; } +static int hptiop_wait_ready_mvfrey(struct hpt_iop_hba * hba, + u_int32_t millisec) +{ + if (hptiop_send_sync_msg(hba, IOPMU_INBOUND_MSG0_NOP, millisec)) + return -1; + + return 0; +} + static void hptiop_request_callback_itl(struct hpt_iop_hba * hba, u_int32_t index) { @@ -618,6 +658,111 @@ scsi_done: } } +static void hptiop_request_callback_mvfrey(struct hpt_iop_hba * hba, + u_int32_t _tag) +{ + u_int32_t req_type = _tag & 0xf; + + struct hpt_iop_srb *srb; + struct hpt_iop_request_scsi_command *req; + union ccb *ccb; + u_int8_t *cdb; + + switch (req_type) { + case IOP_REQUEST_TYPE_GET_CONFIG: + case IOP_REQUEST_TYPE_SET_CONFIG: + hba->config_done = 1; + break; + + case IOP_REQUEST_TYPE_SCSI_COMMAND: + srb = hba->srb[(_tag >> 4) & 0xff]; + req = (struct hpt_iop_request_scsi_command *)srb; + + ccb = (union ccb *)srb->ccb; + + untimeout(hptiop_reset_adapter, hba, ccb->ccb_h.timeout_ch); + + if (ccb->ccb_h.flags & CAM_CDB_POINTER) + cdb = ccb->csio.cdb_io.cdb_ptr; + else + cdb = ccb->csio.cdb_io.cdb_bytes; + + if (cdb[0] == SYNCHRONIZE_CACHE) { /* ??? */ + ccb->ccb_h.status = CAM_REQ_CMP; + goto scsi_done; + } + + if (_tag & MVFREYIOPMU_QUEUE_REQUEST_RESULT_BIT) + req->header.result = IOP_RESULT_SUCCESS; + + switch (req->header.result) { + case IOP_RESULT_SUCCESS: + switch (ccb->ccb_h.flags & CAM_DIR_MASK) { + case CAM_DIR_IN: + bus_dmamap_sync(hba->io_dmat, + srb->dma_map, BUS_DMASYNC_POSTREAD); + bus_dmamap_unload(hba->io_dmat, srb->dma_map); + break; + case CAM_DIR_OUT: + bus_dmamap_sync(hba->io_dmat, + srb->dma_map, BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(hba->io_dmat, srb->dma_map); + break; + } + ccb->ccb_h.status = CAM_REQ_CMP; + break; + case IOP_RESULT_BAD_TARGET: + ccb->ccb_h.status = CAM_DEV_NOT_THERE; + break; + case IOP_RESULT_BUSY: + ccb->ccb_h.status = CAM_BUSY; + break; + case IOP_RESULT_INVALID_REQUEST: + ccb->ccb_h.status = CAM_REQ_INVALID; + break; + case IOP_RESULT_FAIL: + ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR; + break; + case IOP_RESULT_RESET: + ccb->ccb_h.status = CAM_BUSY; + break; + case IOP_RESULT_CHECK_CONDITION: + memset(&ccb->csio.sense_data, 0, + sizeof(ccb->csio.sense_data)); + if (req->dataxfer_length < ccb->csio.sense_len) + ccb->csio.sense_resid = ccb->csio.sense_len - + req->dataxfer_length; + else + ccb->csio.sense_resid = 0; + memcpy(&ccb->csio.sense_data, &req->sg_list, + MIN(req->dataxfer_length, sizeof(ccb->csio.sense_data))); + ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR; + ccb->ccb_h.status |= CAM_AUTOSNS_VALID; + ccb->csio.scsi_status = SCSI_STATUS_CHECK_COND; + break; + default: + ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR; + break; + } +scsi_done: + ccb->csio.resid = ccb->csio.dxfer_len - req->dataxfer_length; + + hptiop_free_srb(hba, srb); + xpt_done(ccb); + break; + case IOP_REQUEST_TYPE_IOCTL_COMMAND: + if (_tag & MVFREYIOPMU_QUEUE_REQUEST_RESULT_BIT) + hba->config_done = 1; + else + hba->config_done = -1; + wakeup((struct hpt_iop_request_ioctl_command *)hba->ctlcfg_ptr); + break; + default: + device_printf(hba->pcidev, "wrong callback type\n"); + break; + } +} + static void hptiop_drain_outbound_queue_mv(struct hpt_iop_hba * hba) { u_int64_t req; @@ -656,6 +801,50 @@ static int hptiop_intr_mv(struct hpt_iop return ret; } +static int hptiop_intr_mvfrey(struct hpt_iop_hba * hba) +{ + u_int32_t status, _tag, cptr; + int ret = 0; + + if (hba->initialized) { + BUS_SPACE_WRT4_MVFREY2(pcie_f0_int_enable, 0); + } + + status = BUS_SPACE_RD4_MVFREY2(f0_doorbell); + if (status) { + BUS_SPACE_WRT4_MVFREY2(f0_doorbell, status); + if (status & CPU_TO_F0_DRBL_MSG_A_BIT) { + u_int32_t msg = BUS_SPACE_RD4_MVFREY2(cpu_to_f0_msg_a); + hptiop_os_message_callback(hba, msg); + } + ret = 1; + } + + status = BUS_SPACE_RD4_MVFREY2(isr_cause); + if (status) { + BUS_SPACE_WRT4_MVFREY2(isr_cause, status); + do { + cptr = *hba->u.mvfrey.outlist_cptr & 0xff; + while (hba->u.mvfrey.outlist_rptr != cptr) { + hba->u.mvfrey.outlist_rptr++; + if (hba->u.mvfrey.outlist_rptr == hba->u.mvfrey.list_count) { + hba->u.mvfrey.outlist_rptr = 0; + } + + _tag = hba->u.mvfrey.outlist[hba->u.mvfrey.outlist_rptr].val; + hptiop_request_callback_mvfrey(hba, _tag); + ret = 2; + } + } while (cptr != (*hba->u.mvfrey.outlist_cptr & 0xff)); + } + + if (hba->initialized) { + BUS_SPACE_WRT4_MVFREY2(pcie_f0_int_enable, 0x1010); + } + + return ret; +} + static int hptiop_send_sync_request_itl(struct hpt_iop_hba * hba, u_int32_t req32, u_int32_t millisec) { @@ -702,6 +891,48 @@ static int hptiop_send_sync_request_mv(s return -1; } +static int hptiop_send_sync_request_mvfrey(struct hpt_iop_hba *hba, + void *req, u_int32_t millisec) +{ + u_int32_t i, index; + u_int64_t phy_addr; + struct hpt_iop_request_header *reqhdr = + (struct hpt_iop_request_header *)req; + + hba->config_done = 0; + + phy_addr = hba->ctlcfgcmd_phy; + reqhdr->flags = IOP_REQUEST_FLAG_SYNC_REQUEST + | IOP_REQUEST_FLAG_OUTPUT_CONTEXT + | IOP_REQUEST_FLAG_ADDR_BITS + | ((phy_addr >> 16) & 0xffff0000); + reqhdr->context = ((phy_addr & 0xffffffff) << 32 ) + | IOPMU_QUEUE_ADDR_HOST_BIT | reqhdr->type; + + hba->u.mvfrey.inlist_wptr++; + index = hba->u.mvfrey.inlist_wptr & 0x3fff; + + if (index == hba->u.mvfrey.list_count) { + index = 0; + hba->u.mvfrey.inlist_wptr &= ~0x3fff; + hba->u.mvfrey.inlist_wptr ^= CL_POINTER_TOGGLE; + } + + hba->u.mvfrey.inlist[index].addr = phy_addr; + hba->u.mvfrey.inlist[index].intrfc_len = (reqhdr->size + 3) / 4; + + BUS_SPACE_WRT4_MVFREY2(inbound_write_ptr, hba->u.mvfrey.inlist_wptr); + BUS_SPACE_RD4_MVFREY2(inbound_write_ptr); + + for (i = 0; i < millisec; i++) { + hptiop_intr_mvfrey(hba); + if (hba->config_done) + return 0; + DELAY(1000); + } + return -1; +} + static int hptiop_send_sync_msg(struct hpt_iop_hba *hba, u_int32_t msg, u_int32_t millisec) { @@ -776,6 +1007,37 @@ static int hptiop_get_config_mv(struct h return 0; } +static int hptiop_get_config_mvfrey(struct hpt_iop_hba * hba, + struct hpt_iop_request_get_config * config) +{ + struct hpt_iop_request_get_config *info = hba->u.mvfrey.config; + + if (info->header.size != sizeof(struct hpt_iop_request_get_config) || + info->header.type != IOP_REQUEST_TYPE_GET_CONFIG) { + KdPrint(("hptiop: header size %x/%x type %x/%x", + info->header.size, (int)sizeof(struct hpt_iop_request_get_config), + info->header.type, IOP_REQUEST_TYPE_GET_CONFIG)); + return -1; + } + + config->interface_version = info->interface_version; + config->firmware_version = info->firmware_version; + config->max_requests = info->max_requests; + config->request_size = info->request_size; + config->max_sg_count = info->max_sg_count; + config->data_transfer_length = info->data_transfer_length; + config->alignment_mask = info->alignment_mask; + config->max_devices = info->max_devices; + config->sdram_size = info->sdram_size; + + KdPrint(("hptiop: maxreq %x reqsz %x datalen %x maxdev %x sdram %x", + config->max_requests, config->request_size, + config->data_transfer_length, config->max_devices, + config->sdram_size)); + + return 0; +} + static int hptiop_set_config_itl(struct hpt_iop_hba *hba, struct hpt_iop_request_set_config *config) { @@ -833,6 +1095,31 @@ static int hptiop_set_config_mv(struct h return 0; } +static int hptiop_set_config_mvfrey(struct hpt_iop_hba *hba, + struct hpt_iop_request_set_config *config) +{ + struct hpt_iop_request_set_config *req; + + if (!(req = hba->ctlcfg_ptr)) + return -1; + + memcpy((u_int8_t *)req + sizeof(struct hpt_iop_request_header), + (u_int8_t *)config + sizeof(struct hpt_iop_request_header), + sizeof(struct hpt_iop_request_set_config) - + sizeof(struct hpt_iop_request_header)); + + req->header.type = IOP_REQUEST_TYPE_SET_CONFIG; + req->header.size = sizeof(struct hpt_iop_request_set_config); + req->header.result = IOP_RESULT_PENDING; + + if (hptiop_send_sync_request_mvfrey(hba, req, 20000)) { + KdPrint(("hptiop: set config send cmd failed")); + return -1; + } + + return 0; +} + static int hptiop_post_ioctl_command_itl(struct hpt_iop_hba *hba, u_int32_t req32, struct hpt_iop_ioctl_param *pParams) @@ -884,7 +1171,8 @@ static int hptiop_post_ioctl_command_itl return 0; } -static int hptiop_bus_space_copyin(struct hpt_iop_hba *hba, u_int32_t bus, void *user, int size) +static int hptiop_bus_space_copyin(struct hpt_iop_hba *hba, u_int32_t bus, + void *user, int size) { unsigned char byte; int i; @@ -898,7 +1186,8 @@ static int hptiop_bus_space_copyin(struc return 0; } -static int hptiop_bus_space_copyout(struct hpt_iop_hba *hba, u_int32_t bus, void *user, int size) +static int hptiop_bus_space_copyout(struct hpt_iop_hba *hba, u_int32_t bus, + void *user, int size) { unsigned char byte; int i; @@ -1045,6 +1334,103 @@ invalid: } } +static int hptiop_post_ioctl_command_mvfrey(struct hpt_iop_hba *hba, + struct hpt_iop_request_ioctl_command *req, + struct hpt_iop_ioctl_param *pParams) +{ + u_int64_t phy_addr; + u_int32_t index; + + phy_addr = hba->ctlcfgcmd_phy; + + if ((((pParams->nInBufferSize + 3) & ~3) + pParams->nOutBufferSize) > + (hba->max_request_size - + offsetof(struct hpt_iop_request_ioctl_command, buf))) { + device_printf(hba->pcidev, "request size beyond max value"); + return -1; + } + + req->ioctl_code = HPT_CTL_CODE_BSD_TO_IOP(pParams->dwIoControlCode); + req->inbuf_size = pParams->nInBufferSize; + req->outbuf_size = pParams->nOutBufferSize; + req->header.size = offsetof(struct hpt_iop_request_ioctl_command, buf) + + pParams->nInBufferSize; + + req->header.type = IOP_REQUEST_TYPE_IOCTL_COMMAND; + req->header.result = IOP_RESULT_PENDING; + + req->header.flags = IOP_REQUEST_FLAG_SYNC_REQUEST + | IOP_REQUEST_FLAG_OUTPUT_CONTEXT + | IOP_REQUEST_FLAG_ADDR_BITS + | ((phy_addr >> 16) & 0xffff0000); + req->header.context = ((phy_addr & 0xffffffff) << 32 ) + | IOPMU_QUEUE_ADDR_HOST_BIT | req->header.type; + + hba->u.mvfrey.inlist_wptr++; + index = hba->u.mvfrey.inlist_wptr & 0x3fff; + + if (index == hba->u.mvfrey.list_count) { + index = 0; + hba->u.mvfrey.inlist_wptr &= ~0x3fff; + hba->u.mvfrey.inlist_wptr ^= CL_POINTER_TOGGLE; + } + + hba->u.mvfrey.inlist[index].addr = phy_addr; + hba->u.mvfrey.inlist[index].intrfc_len = (req->header.size + 3) / 4; + + BUS_SPACE_WRT4_MVFREY2(inbound_write_ptr, hba->u.mvfrey.inlist_wptr); + BUS_SPACE_RD4_MVFREY2(inbound_write_ptr); + + while (hba->config_done == 0) { + if (hptiop_sleep(hba, req, PPAUSE, + "hptctl", HPT_OSM_TIMEOUT)==0) + continue; + hptiop_send_sync_msg(hba, IOPMU_INBOUND_MSG0_RESET, 60000); + } + return 0; +} + +static int hptiop_do_ioctl_mvfrey(struct hpt_iop_hba *hba, + struct hpt_iop_ioctl_param *pParams) +{ + struct hpt_iop_request_ioctl_command *req; + + if ((pParams->Magic != HPT_IOCTL_MAGIC) && + (pParams->Magic != HPT_IOCTL_MAGIC32)) + return EFAULT; + + req = (struct hpt_iop_request_ioctl_command *)(hba->ctlcfg_ptr); + hba->config_done = 0; + hptiop_lock_adapter(hba); + if (pParams->nInBufferSize) + if (copyin((void *)pParams->lpInBuffer, + req->buf, pParams->nInBufferSize)) + goto invalid; + if (hptiop_post_ioctl_command_mvfrey(hba, req, pParams)) + goto invalid; + + if (hba->config_done == 1) { + if (pParams->nOutBufferSize) + if (copyout(req->buf + + ((pParams->nInBufferSize + 3) & ~3), + (void *)pParams->lpOutBuffer, + pParams->nOutBufferSize)) + goto invalid; + + if (pParams->lpBytesReturned) + if (copyout(&req->bytes_returned, + (void*)pParams->lpBytesReturned, + sizeof(u_int32_t))) + goto invalid; + hptiop_unlock_adapter(hba); + return 0; + } else{ +invalid: + hptiop_unlock_adapter(hba); + return EFAULT; + } +} + static int hptiop_rescan_bus(struct hpt_iop_hba * hba) { union ccb *ccb; @@ -1063,6 +1449,7 @@ static int hptiop_rescan_bus(struct hpt static bus_dmamap_callback_t hptiop_map_srb; static bus_dmamap_callback_t hptiop_post_scsi_command; static bus_dmamap_callback_t hptiop_mv_map_ctlcfg; +static bus_dmamap_callback_t hptiop_mvfrey_map_ctlcfg; static int hptiop_alloc_pci_res_itl(struct hpt_iop_hba *hba) { @@ -1139,6 +1526,56 @@ static int hptiop_alloc_pci_res_mv(struc return 0; } +static int hptiop_alloc_pci_res_mvfrey(struct hpt_iop_hba *hba) +{ + hba->bar0_rid = 0x10; + hba->bar0_res = bus_alloc_resource_any(hba->pcidev, + SYS_RES_MEMORY, &hba->bar0_rid, RF_ACTIVE); + + if (hba->bar0_res == NULL) { + device_printf(hba->pcidev, "failed to get iop bar0.\n"); + return -1; + } + hba->bar0t = rman_get_bustag(hba->bar0_res); + hba->bar0h = rman_get_bushandle(hba->bar0_res); + hba->u.mvfrey.config = (struct hpt_iop_request_get_config *) + rman_get_virtual(hba->bar0_res); + + if (!hba->u.mvfrey.config) { + bus_release_resource(hba->pcidev, SYS_RES_MEMORY, + hba->bar0_rid, hba->bar0_res); + device_printf(hba->pcidev, "alloc bar0 mem res failed\n"); + return -1; + } + + hba->bar2_rid = 0x18; + hba->bar2_res = bus_alloc_resource_any(hba->pcidev, + SYS_RES_MEMORY, &hba->bar2_rid, RF_ACTIVE); + + if (hba->bar2_res == NULL) { + bus_release_resource(hba->pcidev, SYS_RES_MEMORY, + hba->bar0_rid, hba->bar0_res); + device_printf(hba->pcidev, "failed to get iop bar2.\n"); + return -1; + } + + hba->bar2t = rman_get_bustag(hba->bar2_res); + hba->bar2h = rman_get_bushandle(hba->bar2_res); + hba->u.mvfrey.mu = + (struct hpt_iopmu_mvfrey *)rman_get_virtual(hba->bar2_res); + + if (!hba->u.mvfrey.mu) { + bus_release_resource(hba->pcidev, SYS_RES_MEMORY, + hba->bar0_rid, hba->bar0_res); + bus_release_resource(hba->pcidev, SYS_RES_MEMORY, + hba->bar2_rid, hba->bar2_res); + device_printf(hba->pcidev, "alloc mem bar2 res failed\n"); + return -1; + } + + return 0; +} + static void hptiop_release_pci_res_itl(struct hpt_iop_hba *hba) { if (hba->bar0_res) @@ -1156,6 +1593,16 @@ static void hptiop_release_pci_res_mv(st hba->bar2_rid, hba->bar2_res); } +static void hptiop_release_pci_res_mvfrey(struct hpt_iop_hba *hba) +{ + if (hba->bar0_res) + bus_release_resource(hba->pcidev, SYS_RES_MEMORY, + hba->bar0_rid, hba->bar0_res); + if (hba->bar2_res) + bus_release_resource(hba->pcidev, SYS_RES_MEMORY, + hba->bar2_rid, hba->bar2_res); +} + static int hptiop_internal_memalloc_mv(struct hpt_iop_hba *hba) { if (bus_dma_tag_create(hba->parent_dmat, @@ -1172,7 +1619,7 @@ static int hptiop_internal_memalloc_mv(s NULL, NULL, #endif - &hba->ctlcfg_dmat)) { + &hba->ctlcfg_dmat)) { device_printf(hba->pcidev, "alloc ctlcfg_dmat failed\n"); return -1; } @@ -1205,6 +1652,72 @@ static int hptiop_internal_memalloc_mv(s return 0; } +static int hptiop_internal_memalloc_mvfrey(struct hpt_iop_hba *hba) +{ + u_int32_t list_count = BUS_SPACE_RD4_MVFREY2(inbound_conf_ctl); + + list_count >>= 16; + + if (list_count == 0) { + return -1; + } + + hba->u.mvfrey.list_count = list_count; + hba->u.mvfrey.internal_mem_size = 0x800 + + list_count * sizeof(struct mvfrey_inlist_entry) + + list_count * sizeof(struct mvfrey_outlist_entry) + + sizeof(int); + if (bus_dma_tag_create(hba->parent_dmat, + 1, + 0, + BUS_SPACE_MAXADDR_32BIT, + BUS_SPACE_MAXADDR, + NULL, NULL, + hba->u.mvfrey.internal_mem_size, + 1, + BUS_SPACE_MAXSIZE_32BIT, + BUS_DMA_ALLOCNOW, +#if __FreeBSD_version > 502000 + NULL, + NULL, +#endif + &hba->ctlcfg_dmat)) { + device_printf(hba->pcidev, "alloc ctlcfg_dmat failed\n"); + return -1; + } + + if (bus_dmamem_alloc(hba->ctlcfg_dmat, (void **)&hba->ctlcfg_ptr, +#if __FreeBSD_version>501000 + BUS_DMA_WAITOK | BUS_DMA_COHERENT, +#else + BUS_DMA_WAITOK, +#endif + &hba->ctlcfg_dmamap) != 0) { + device_printf(hba->pcidev, + "bus_dmamem_alloc failed!\n"); + bus_dma_tag_destroy(hba->ctlcfg_dmat); + return -1; + } + + if (bus_dmamap_load(hba->ctlcfg_dmat, + hba->ctlcfg_dmamap, hba->ctlcfg_ptr, + hba->u.mvfrey.internal_mem_size, + hptiop_mvfrey_map_ctlcfg, hba, 0)) { + device_printf(hba->pcidev, "bus_dmamap_load failed!\n"); + if (hba->ctlcfg_dmat) + bus_dmamem_free(hba->ctlcfg_dmat, + hba->ctlcfg_ptr, hba->ctlcfg_dmamap); + bus_dma_tag_destroy(hba->ctlcfg_dmat); + return -1; + } + + return 0; +} + +static int hptiop_internal_memfree_itl(struct hpt_iop_hba *hba) { + return 0; +} + static int hptiop_internal_memfree_mv(struct hpt_iop_hba *hba) { if (hba->ctlcfg_dmat) { @@ -1217,6 +1730,54 @@ static int hptiop_internal_memfree_mv(st return 0; } +static int hptiop_internal_memfree_mvfrey(struct hpt_iop_hba *hba) +{ + if (hba->ctlcfg_dmat) { + bus_dmamap_unload(hba->ctlcfg_dmat, hba->ctlcfg_dmamap); + bus_dmamem_free(hba->ctlcfg_dmat, + hba->ctlcfg_ptr, hba->ctlcfg_dmamap); + bus_dma_tag_destroy(hba->ctlcfg_dmat); + } + + return 0; +} + +static int hptiop_reset_comm_mvfrey(struct hpt_iop_hba *hba) +{ + u_int32_t i = 100; + + if (hptiop_send_sync_msg(hba, IOPMU_INBOUND_MSG0_RESET_COMM, 3000)) + return -1; + + /* wait 100ms for MCU ready */ + while(i--) { + DELAY(1000); + } + + BUS_SPACE_WRT4_MVFREY2(inbound_base, + hba->u.mvfrey.inlist_phy & 0xffffffff); + BUS_SPACE_WRT4_MVFREY2(inbound_base_high, + (hba->u.mvfrey.inlist_phy >> 16) >> 16); + + BUS_SPACE_WRT4_MVFREY2(outbound_base, + hba->u.mvfrey.outlist_phy & 0xffffffff); + BUS_SPACE_WRT4_MVFREY2(outbound_base_high, + (hba->u.mvfrey.outlist_phy >> 16) >> 16); + + BUS_SPACE_WRT4_MVFREY2(outbound_shadow_base, + hba->u.mvfrey.outlist_cptr_phy & 0xffffffff); + BUS_SPACE_WRT4_MVFREY2(outbound_shadow_base_high, + (hba->u.mvfrey.outlist_cptr_phy >> 16) >> 16); + + hba->u.mvfrey.inlist_wptr = (hba->u.mvfrey.list_count - 1) + | CL_POINTER_TOGGLE; + *hba->u.mvfrey.outlist_cptr = (hba->u.mvfrey.list_count - 1) + | CL_POINTER_TOGGLE; + hba->u.mvfrey.outlist_rptr = hba->u.mvfrey.list_count - 1; + + return 0; +} + /* * CAM driver interface */ @@ -1230,9 +1791,10 @@ static device_method_t driver_methods[] }; static struct hptiop_adapter_ops hptiop_itl_ops = { + .family = INTEL_BASED_IOP, .iop_wait_ready = hptiop_wait_ready_itl, .internal_memalloc = 0, - .internal_memfree = 0, + .internal_memfree = hptiop_internal_memfree_itl, .alloc_pci_res = hptiop_alloc_pci_res_itl, .release_pci_res = hptiop_release_pci_res_itl, .enable_intr = hptiop_enable_intr_itl, @@ -1243,9 +1805,11 @@ static struct hptiop_adapter_ops hptiop_ .post_msg = hptiop_post_msg_itl, .post_req = hptiop_post_req_itl, .do_ioctl = hptiop_do_ioctl_itl, + .reset_comm = 0, }; static struct hptiop_adapter_ops hptiop_mv_ops = { + .family = MV_BASED_IOP, .iop_wait_ready = hptiop_wait_ready_mv, .internal_memalloc = hptiop_internal_memalloc_mv, .internal_memfree = hptiop_internal_memfree_mv, @@ -1259,6 +1823,25 @@ static struct hptiop_adapter_ops hptiop_ .post_msg = hptiop_post_msg_mv, .post_req = hptiop_post_req_mv, .do_ioctl = hptiop_do_ioctl_mv, + .reset_comm = 0, +}; + +static struct hptiop_adapter_ops hptiop_mvfrey_ops = { + .family = MVFREY_BASED_IOP, + .iop_wait_ready = hptiop_wait_ready_mvfrey, + .internal_memalloc = hptiop_internal_memalloc_mvfrey, + .internal_memfree = hptiop_internal_memfree_mvfrey, + .alloc_pci_res = hptiop_alloc_pci_res_mvfrey, + .release_pci_res = hptiop_release_pci_res_mvfrey, + .enable_intr = hptiop_enable_intr_mvfrey, + .disable_intr = hptiop_disable_intr_mvfrey, + .get_config = hptiop_get_config_mvfrey, + .set_config = hptiop_set_config_mvfrey, + .iop_intr = hptiop_intr_mvfrey, + .post_msg = hptiop_post_msg_mvfrey, + .post_req = hptiop_post_req_mvfrey, + .do_ioctl = hptiop_do_ioctl_mvfrey, + .reset_comm = hptiop_reset_comm_mvfrey, }; static driver_t hptiop_pci_driver = { @@ -1284,6 +1867,11 @@ static int hptiop_probe(device_t dev) id = pci_get_device(dev); switch (id) { + case 0x4520: + case 0x4522: + sas = 1; + ops = &hptiop_mvfrey_ops; + break; case 0x4210: case 0x4211: case 0x4310: @@ -1385,7 +1973,7 @@ static int hptiop_attach(device_t dev) goto release_pci_res; } - if (hba->ops->internal_memalloc) { + if (hba->ops->family == MV_BASED_IOP) { if (hba->ops->internal_memalloc(hba)) { device_printf(dev, "alloc srb_dmat failed\n"); goto destroy_parent_tag; @@ -1404,6 +1992,17 @@ static int hptiop_attach(device_t dev) hba->max_request_size = iop_config.request_size; hba->max_sg_count = iop_config.max_sg_count; + if (hba->ops->family == MVFREY_BASED_IOP) { + if (hba->ops->internal_memalloc(hba)) { + device_printf(dev, "alloc srb_dmat failed\n"); + goto destroy_parent_tag; + } + if (hba->ops->reset_comm(hba)) { + device_printf(dev, "reset comm failed\n"); + goto get_config_failed; + } + } + if (bus_dma_tag_create(hba->parent_dmat,/* parent */ 4, /* alignment */ BUS_SPACE_MAXADDR_32BIT+1, /* boundary */ @@ -1542,6 +2141,7 @@ static int hptiop_attach(device_t dev) } hba->ops->enable_intr(hba); + hba->initialized = 1; hba->ioctl_dev = make_dev(&hptiop_cdevsw, unit, UID_ROOT, GID_WHEEL /*GID_OPERATOR*/, @@ -1587,8 +2187,7 @@ destroy_io_dmat: bus_dma_tag_destroy(hba->io_dmat); get_config_failed: - if (hba->ops->internal_memfree) - hba->ops->internal_memfree(hba); + hba->ops->internal_memfree(hba); destroy_parent_tag: if (hba->parent_dmat) @@ -1682,6 +2281,18 @@ static void hptiop_enable_intr_mv(struct BUS_SPACE_WRT4_MV0(outbound_intmask,int_mask); } +static void hptiop_enable_intr_mvfrey(struct hpt_iop_hba *hba) +{ + BUS_SPACE_WRT4_MVFREY2(f0_doorbell_enable, CPU_TO_F0_DRBL_MSG_A_BIT); + BUS_SPACE_RD4_MVFREY2(f0_doorbell_enable); + + BUS_SPACE_WRT4_MVFREY2(isr_enable, 0x1); + BUS_SPACE_RD4_MVFREY2(isr_enable); + + BUS_SPACE_WRT4_MVFREY2(pcie_f0_int_enable, 0x1010); + BUS_SPACE_RD4_MVFREY2(pcie_f0_int_enable); +} + static void hptiop_disable_intr_itl(struct hpt_iop_hba *hba) { u_int32_t int_mask; @@ -1704,9 +2315,24 @@ static void hptiop_disable_intr_mv(struc BUS_SPACE_RD4_MV0(outbound_intmask); } -static int hptiop_reset_adapter(struct hpt_iop_hba * hba) +static void hptiop_disable_intr_mvfrey(struct hpt_iop_hba *hba) +{ + BUS_SPACE_WRT4_MVFREY2(f0_doorbell_enable, 0); + BUS_SPACE_RD4_MVFREY2(f0_doorbell_enable); + + BUS_SPACE_WRT4_MVFREY2(isr_enable, 0); + BUS_SPACE_RD4_MVFREY2(isr_enable); + + BUS_SPACE_WRT4_MVFREY2(pcie_f0_int_enable, 0); + BUS_SPACE_RD4_MVFREY2(pcie_f0_int_enable); +} + +static void hptiop_reset_adapter(void *argv) { - return hptiop_send_sync_msg(hba, IOPMU_INBOUND_MSG0_RESET, 60000); + struct hpt_iop_hba * hba = (struct hpt_iop_hba *)argv; + if (hptiop_send_sync_msg(hba, IOPMU_INBOUND_MSG0_RESET, 60000)) + return; + hptiop_send_sync_msg(hba, IOPMU_INBOUND_MSG0_START_BACKGROUND_TASK, 5000); } static void *hptiop_get_srb(struct hpt_iop_hba * hba) @@ -1910,7 +2536,8 @@ static void hptiop_post_req_itl(struct h bcopy(cdb, req.cdb, ccb->csio.cdb_len); - req.header.size = offsetof(struct hpt_iop_request_scsi_command, sg_list) + req.header.size = + offsetof(struct hpt_iop_request_scsi_command, sg_list) + nsegs*sizeof(struct hpt_iopsg); req.header.type = IOP_REQUEST_TYPE_SCSI_COMMAND; req.header.flags = 0; @@ -1956,7 +2583,8 @@ static void hptiop_post_req_itl(struct h req->channel = 0; req->target = ccb->ccb_h.target_id; req->lun = ccb->ccb_h.target_lun; - req->header.size = offsetof(struct hpt_iop_request_scsi_command, sg_list) + req->header.size = + offsetof(struct hpt_iop_request_scsi_command, sg_list) + nsegs*sizeof(struct hpt_iopsg); req->header.context = (u_int64_t)srb->index | IOPMU_QUEUE_ADDR_HOST_BIT; @@ -2044,6 +2672,78 @@ static void hptiop_post_req_mv(struct hp | (size > 3 ? 3 : size), hba); } +static void hptiop_post_req_mvfrey(struct hpt_iop_hba *hba, + struct hpt_iop_srb *srb, + bus_dma_segment_t *segs, int nsegs) +{ + int idx, index; + union ccb *ccb = srb->ccb; + u_int8_t *cdb; + struct hpt_iop_request_scsi_command *req; + u_int64_t req_phy; + + req = (struct hpt_iop_request_scsi_command *)srb; + req_phy = srb->phy_addr; + + if (ccb->csio.dxfer_len && nsegs > 0) { + struct hpt_iopsg *psg = req->sg_list; + for (idx = 0; idx < nsegs; idx++, psg++) { + psg->pci_address = (u_int64_t)segs[idx].ds_addr | 1; + psg->size = segs[idx].ds_len; + psg->eot = 0; + } + psg[-1].eot = 1; + } + if (ccb->ccb_h.flags & CAM_CDB_POINTER) + cdb = ccb->csio.cdb_io.cdb_ptr; + else + cdb = ccb->csio.cdb_io.cdb_bytes; + + bcopy(cdb, req->cdb, ccb->csio.cdb_len); + req->header.type = IOP_REQUEST_TYPE_SCSI_COMMAND; + req->header.result = IOP_RESULT_PENDING; + req->dataxfer_length = ccb->csio.dxfer_len; + req->channel = 0; + req->target = ccb->ccb_h.target_id; + req->lun = ccb->ccb_h.target_lun; + req->header.size = sizeof(struct hpt_iop_request_scsi_command) + - sizeof(struct hpt_iopsg) + + nsegs * sizeof(struct hpt_iopsg); + if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) { + bus_dmamap_sync(hba->io_dmat, + srb->dma_map, BUS_DMASYNC_PREREAD); + } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 17: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 1F986857; Thu, 25 Oct 2012 17:56:17 +0000 (UTC) (envelope-from alc@rice.edu) Received: from mh1.mail.rice.edu (mh1.mail.rice.edu [128.42.201.20]) by mx1.freebsd.org (Postfix) with ESMTP id D8BD88FC18; Thu, 25 Oct 2012 17:56:16 +0000 (UTC) Received: from mh1.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh1.mail.rice.edu (Postfix) with ESMTP id 9DA1C461DCE; Thu, 25 Oct 2012 12:49:37 -0500 (CDT) Received: from mh1.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh1.mail.rice.edu (Postfix) with ESMTP id 9AF6E461DCD; Thu, 25 Oct 2012 12:49:37 -0500 (CDT) X-Virus-Scanned: by amavis-2.7.0 at mh1.mail.rice.edu, auth channel Received: from mh1.mail.rice.edu ([127.0.0.1]) by mh1.mail.rice.edu (mh1.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id Eysf_qfF-euF; Thu, 25 Oct 2012 12:49:37 -0500 (CDT) Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh1.mail.rice.edu (Postfix) with ESMTPSA id C8037461DC3; Thu, 25 Oct 2012 12:49:36 -0500 (CDT) Message-ID: <50897BB0.7050601@rice.edu> Date: Thu, 25 Oct 2012 12:49:36 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:8.0) Gecko/20111113 Thunderbird/8.0 MIME-Version: 1.0 To: Andre Oppermann Subject: Re: svn commit: r242014 - head/sys/kern References: <201210241836.q9OIafqo073002@svn.freebsd.org> <50883EA8.1010308@freebsd.org> <20121025142313.S999@besplex.bde.org> <5089678A.6070609@freebsd.org> In-Reply-To: <5089678A.6070609@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Adrian Chadd , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, Attilio Rao , Bruce Evans , svn-src-head@FreeBSD.org, Jim Harris X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 17:56:17 -0000 On 10/25/2012 11:23, Andre Oppermann wrote: > On 25.10.2012 05:49, Bruce Evans wrote: >> On Wed, 24 Oct 2012, Attilio Rao wrote: >> >>> On Wed, Oct 24, 2012 at 8:16 PM, Andre Oppermann >>> wrote: >>>> ... >>>> Let's go back and see how we can do this the sanest way. These are >>>> the options I see at the moment: >>>> >>>> 1. sprinkle __aligned(CACHE_LINE_SIZE) all over the place >>> >>> This is wrong because it doesn't give padding. >> >> Unless it is sprinkled in struct declarations. >> >>>> 2. use a macro like MTX_ALIGN that can be SMP/UP aware and in >>>> the future possibly change to a different compiler dependent >>>> align attribute >>> >>> What is this macro supposed to do? I don't understand that from your >>> description. >>> >>>> 3. embed __aligned(CACHE_LINE_SIZE) into struct mtx itself so it >>>> automatically gets aligned in all cases, even when dynamically >>>> allocated. >>> >>> This works but I think it is overkill for structures including sleep >>> mutexes which are the vast majority. So I wouldn't certainly be in >>> favor of such a patch. >> >> This doesn't work either with fully dynamic (auto) allocations. Stack >> alignment is generally broken (limited, and pessimized for both space >> and time) in gcc (it works better in clang). On amd64, it is limited >> by the default of -mpreferred-stack-boundary=4. Since 2**4 is smaller >> than the cache line size and stack alignments larger than it are broken >> in gcc, __aligned(CACHE_LINE_SIZE) never works (except accidentally, >> 16/CACHE_LINE_SIZE of the time. On i386, we reduce the space/time >> pessimizations a little by overriding the default to >> -mpreferred-stack-boundary=2. 2**2 is even smaller than the cache >> line size. (The pessimizations are for both space and time, since >> time and code space is wasted for the code to keep the stack aligned, >> and cache space and thus also time are wasted for padding. Most >> functions don't benefit from more than sizeof(register_t) alignment.) > > I'm not aware of stack allocated mutexes anywhere in the kernel. > Even if there is a case it's very special and unique. > > I've verified that __aligned(CACHE_LINE_SIZE) on the definition of > struct mtx itself (in sys/_mutex.h) correctly aligns and pads the > global .bss resident mutexes for 64B and 128B cache line sizes. > Padding every mutex is going to have a non-trivial effect on the size of some dynamically allocated structures containing locks, like the vm object and the vnode. Moreover, the effect of this padding will be the greatest on address space limited systems, like i386, where the size of a vm object is only about 130 bytes. >> Dynamic allocations via malloc() get whatever alignment malloc() gives. >> This is only required to be 4 or 8 or 16 or so (the maximum for a C >> object declared in conforming C (no __align()), but malloc() usually >> gives more. If it gives CACHE_LINE_SIZE, that is wasteful for most >> small allocations. > > Stand-alone mutexes are normally not malloc'ed. They're always > embedded into some larger structure they protect. > >> __builtin_alloca() is broken in gcc-3.3.3, but works in gcc-4.2.1, at >> least on i386. In gcc-3.3.3, it assumes that the stack is the default >> 16-byte aligned even if -mpreferred-stack-boundary=2 is in CFLAGS to >> say otherwise, and just subtracts from the stack pointer. In gcc-4.2.1, >> it does the necessary andl of the stack pointer, but only 16-byte >> alignment. >> >> It is another bug that there sre no extensions of malloc() or alloca(). >> Since malloc() is in the library and may give CACHE_LINE_SIZE but >> __builtin_alloca() is in the compiler and only gives 16, these functions >> are not even as compatible as they should be. >> >> I don't know of any mutexes allocated on the stack, but there are stack >> frames with mcontexts in them that need special alignment so they cause >> problems on i386. They can't just be put on the stack due to the above >> bugs. They are laboriously allocated using malloc(). Since they are a >> quite large, 1 mcontext barely fits on the kernel stack, so kib didn't >> like my alloca() method for allocating them. > > You lost me here. > From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 18:11: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 82B09CDE; Thu, 25 Oct 2012 18:11:05 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6B0D98FC08; Thu, 25 Oct 2012 18:11:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9PIB5Jw016865; Thu, 25 Oct 2012 18:11:05 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9PIB5gp016863; Thu, 25 Oct 2012 18:11:05 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201210251811.q9PIB5gp016863@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 25 Oct 2012 18:11:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242087 - head/sys/dev/cxgb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 18:11:05 -0000 Author: np Date: Thu Oct 25 18:11:04 2012 New Revision: 242087 URL: http://svn.freebsd.org/changeset/base/242087 Log: Initialize the response queue mutex a bit earlier to avoid a panic that occurs if t3_sge_alloc_qset fails and then t3_free_qset attempts to destroy an uninitialized mutex. Submitted by: Vijay Singh MFC after: 3 days Modified: head/sys/dev/cxgb/cxgb_sge.c Modified: head/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- head/sys/dev/cxgb/cxgb_sge.c Thu Oct 25 17:29:11 2012 (r242086) +++ head/sys/dev/cxgb/cxgb_sge.c Thu Oct 25 18:11:04 2012 (r242087) @@ -2473,6 +2473,10 @@ t3_sge_alloc_qset(adapter_t *sc, u_int i goto err; } + snprintf(q->rspq.lockbuf, RSPQ_NAME_LEN, "t3 rspq lock %d:%d", + device_get_unit(sc->dev), irq_vec_idx); + MTX_INIT(&q->rspq.lock, q->rspq.lockbuf, NULL, MTX_DEF); + for (i = 0; i < ntxq; ++i) { size_t sz = i == TXQ_CTRL ? 0 : sizeof(struct tx_sw_desc); @@ -2590,11 +2594,7 @@ t3_sge_alloc_qset(adapter_t *sc, u_int i goto err_unlock; } } - - snprintf(q->rspq.lockbuf, RSPQ_NAME_LEN, "t3 rspq lock %d:%d", - device_get_unit(sc->dev), irq_vec_idx); - MTX_INIT(&q->rspq.lock, q->rspq.lockbuf, NULL, MTX_DEF); - + mtx_unlock_spin(&sc->sge.reg_lock); t3_update_qset_coalesce(q, p); From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 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 CDF03AB; Thu, 25 Oct 2012 18:39:09 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B44FF8FC17; Thu, 25 Oct 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 q9PId94A021260; Thu, 25 Oct 2012 18:39:09 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9PId9We021258; Thu, 25 Oct 2012 18:39:09 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201210251839.q9PId9We021258@svn.freebsd.org> From: "David E. O'Brien" Date: Thu, 25 Oct 2012 18:39:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242088 - head/sys/dev/filemon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 18:39:10 -0000 Author: obrien Date: Thu Oct 25 18:39:09 2012 New Revision: 242088 URL: http://svn.freebsd.org/changeset/base/242088 Log: Desupport pre-FreeBSD 7.1. Modified: head/sys/dev/filemon/filemon.c Modified: head/sys/dev/filemon/filemon.c ============================================================================== --- head/sys/dev/filemon/filemon.c Thu Oct 25 18:11:04 2012 (r242087) +++ head/sys/dev/filemon/filemon.c Thu Oct 25 18:39:09 2012 (r242088) @@ -103,47 +103,11 @@ static struct cv access_cv; static struct thread *access_owner = NULL; static struct thread *access_requester = NULL; -#if __FreeBSD_version < 701000 -static struct clonedevs *filemon_clones; -static eventhandler_tag eh_tag; -#else static struct cdev *filemon_dev; -#endif #include "filemon_lock.c" #include "filemon_wrapper.c" -#if __FreeBSD_version < 701000 -static void -filemon_clone(void *arg, struct ucred *cred, char *name, int namelen, - struct cdev **dev) -{ - int u = -1; - size_t len; - - if (*dev != NULL) - return; - - len = strlen(name); - - if (len != 7) - return; - - if (bcmp(name,"filemon", 7) != 0) - return; - - /* Clone the device to the new minor number. */ - if (clone_create(&filemon_clones, &filemon_cdevsw, &u, dev, 0) != 0) - /* Create the /dev/filemonNN entry. */ - *dev = make_dev_cred(&filemon_cdevsw, u, cred, UID_ROOT, - GID_WHEEL, 0666, "filemon%d", u); - if (*dev != NULL) { - dev_ref(*dev); - (*dev)->si_flags |= SI_CHEAPCLONE; - } -} -#endif - static void filemon_dtr(void *data) { @@ -179,11 +143,7 @@ filemon_ioctl(struct cdev *dev, u_long c int error = 0; struct filemon *filemon; -#if __FreeBSD_version < 701000 - filemon = dev->si_drv1; -#else devfs_get_cdevpriv((void **) &filemon); -#endif switch (cmd) { /* Set the output file descriptor. */ @@ -238,11 +198,7 @@ filemon_open(struct cdev *dev, int oflag filemon->pid = curproc->p_pid; -#if __FreeBSD_version < 701000 - dev->si_drv1 = filemon; -#else devfs_set_cdevpriv(filemon, filemon_dtr); -#endif /* Get exclusive write access. */ filemon_lock_write(); @@ -260,14 +216,6 @@ static int filemon_close(struct cdev *dev __unused, int flag __unused, int fmt __unused, struct thread *td __unused) { -#if __FreeBSD_version < 701000 - filemon_dtr(dev->si_drv1); - - dev->si_drv1 = NULL; - - /* Schedule this cloned device to be destroyed. */ - destroy_dev_sched(dev); -#endif return (0); } @@ -281,16 +229,8 @@ filemon_load(void *dummy __unused) /* Install the syscall wrappers. */ filemon_wrapper_install(); -#if __FreeBSD_version < 701000 - /* Enable device cloning. */ - clone_setup(&filemon_clones); - - /* Setup device cloning events. */ - eh_tag = EVENTHANDLER_REGISTER(dev_clone, filemon_clone, 0, 1000); -#else filemon_dev = make_dev(&filemon_cdevsw, 0, UID_ROOT, GID_WHEEL, 0666, "filemon"); -#endif } static int @@ -305,9 +245,7 @@ filemon_unload(void) if (TAILQ_FIRST(&filemons_inuse) != NULL) error = EBUSY; else { -#if __FreeBSD_version >= 701000 destroy_dev(filemon_dev); -#endif /* Deinstall the syscall wrappers. */ filemon_wrapper_deinstall(); @@ -317,19 +255,6 @@ filemon_unload(void) filemon_unlock_write(); if (error == 0) { -#if __FreeBSD_version < 701000 - /* - * Check if there is still an event handler callback registered. - */ - if (eh_tag != 0) { - /* De-register the device cloning event handler. */ - EVENTHANDLER_DEREGISTER(dev_clone, eh_tag); - eh_tag = 0; - - /* Stop device cloning. */ - clone_cleanup(&filemon_clones); - } -#endif /* free() filemon structs free list. */ filemon_lock_write(); while ((filemon = TAILQ_FIRST(&filemons_free)) != NULL) { From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 18:46: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 A6D17372; Thu, 25 Oct 2012 18:46:02 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8C0EA8FC08; Thu, 25 Oct 2012 18:46: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 q9PIk2Jo022399; Thu, 25 Oct 2012 18:46:02 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9PIk2Mp022397; Thu, 25 Oct 2012 18:46:02 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201210251846.q9PIk2Mp022397@svn.freebsd.org> From: Peter Wemm Date: Thu, 25 Oct 2012 18:46:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242089 - head/sys/dev/ciss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 18:46:02 -0000 Author: peter Date: Thu Oct 25 18:46:02 2012 New Revision: 242089 URL: http://svn.freebsd.org/changeset/base/242089 Log: Increase the driver-side limit on the number of logical volumes that the driver will recognize. I've tested this as far as 25 volumes. Modified: head/sys/dev/ciss/cissvar.h Modified: head/sys/dev/ciss/cissvar.h ============================================================================== --- head/sys/dev/ciss/cissvar.h Thu Oct 25 18:39:09 2012 (r242088) +++ head/sys/dev/ciss/cissvar.h Thu Oct 25 18:46:02 2012 (r242089) @@ -46,7 +46,7 @@ typedef STAILQ_HEAD(, ciss_request) cr_q /* * Maximum number of logical drives we support. */ -#define CISS_MAX_LOGICAL 15 +#define CISS_MAX_LOGICAL 63 /* * Maximum number of physical devices we support. From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 19:11: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 9F261BF8; Thu, 25 Oct 2012 19:11:30 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) by mx1.freebsd.org (Postfix) with ESMTP id EF5538FC14; Thu, 25 Oct 2012 19:11:29 +0000 (UTC) Received: from alph.allbsd.org (p1137-ipbf1505funabasi.chiba.ocn.ne.jp [118.7.212.137]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id q9PJBD9d040762 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 26 Oct 2012 04:11:23 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) (authenticated bits=0) by alph.allbsd.org (8.14.5/8.14.5) with ESMTP id q9PJBBW7075579; Fri, 26 Oct 2012 04:11:13 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Fri, 26 Oct 2012 03:52:15 +0900 (JST) Message-Id: <20121026.035215.1799343372729116466.hrs@allbsd.org> To: brian@FreeBSD.org Subject: Re: svn commit: r242074 - head/etc/rc.d From: Hiroki Sato In-Reply-To: <20121025171827.GA59432@thong.lan.Awfulhak.org> References: <50892486.9030201@FreeBSD.org> <20121025.210007.176692667026768547.hrs@allbsd.org> <20121025171827.GA59432@thong.lan.Awfulhak.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.5 on Emacs 23.4 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Fri_Oct_26_03_52_15_2012_767)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Fri, 26 Oct 2012 04:11:23 +0900 (JST) X-Spam-Status: No, score=-98.1 required=13.0 tests=CONTENT_TYPE_PRESENT, ONLY1HOPDIRECT,SAMEHELOBY2HOP,USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, dim@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 19:11:30 -0000 ----Security_Multipart(Fri_Oct_26_03_52_15_2012_767)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Brian Somers wrote in <20121025171827.GA59432@thong.lan.Awfulhak.org>: br> After upgrading from 8-STABLE to 9-STABLE on Monday, IPv6 routing br> advertisments were broken. Disabling accept (enabling send) appeared br> to be necessary to get things up and running. br> br> As you say, net.inet6.ip6.accept_rtadv is set to zero (off, meaning br> that we *can* send advertisments), so I don't now what the issue br> is. Irrespective of this, I think it's useful to explicitly set br> the interface to be able to send advertisments when running rtadvd br> - just in case the sysctl is set to 1 elsewhere. br> br> Doing an "ifconfig inet6 accept_rtadv" after boot doesn't br> seem to disable sending advertisments, so I'm finding it difficult br> to test this remotely... testing is awkward when I'm not at home br> as this machine is also suffering from the "can't reboot" issue!! br> br> I'll look into why the sysctl doesn't seem to behave as expected br> when I get home this evening. In 9.X and later the meaning of net.inet6.ip6.accept_rtadv has been changed and the flag for whether receiving RAs or not is now in a per-IF basis. 9.0R release note says the following: | The sysctl(8) variable net.inet6.ip6.accept_rtadv has been | changed. It was a system-wide configuration knob which controlled | whether the system accepts ICMPv6 Router Advertisement messages or | not. In FreeBSD 9.0-RELEASE, this knob is converted into a | per-interface inet6 accept_rtadv ifconfig(8) option. Although the | sysctl(8) variable is available still in FreeBSD 9.0-RELEASE, it | now controls whether the per-interface option is set by default or | not. The default value is 0 (not accept the RA messages). So, by default RAs can be sent on any interface even if setting net.inet6.ip6.accept_rtadv=1 manually after a boot because no accept_rtadv per-IF flag is set. I guess this was a source of the confusion. I am not sure why setting accept_rtadv flag on an interface did not prevent from sending RAs in your case. It is not an intended behavior. If it is reproducible, please let me know. The release notes explains more details of IPv6 configuration migration from 8.X to 9.X. -- Hiroki ----Security_Multipart(Fri_Oct_26_03_52_15_2012_767)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEABECAAYFAlCJil8ACgkQTyzT2CeTzy1oiwCdHp4BjvXFuuJQ6T2SD2MWI8lS EboAoJ7cC3OztwBqo+z8D5l63y5paXI8 =KGiY -----END PGP SIGNATURE----- ----Security_Multipart(Fri_Oct_26_03_52_15_2012_767)---- From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 19:30: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 EB5B8147; Thu, 25 Oct 2012 19:30:58 +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 D27598FC08; Thu, 25 Oct 2012 19:30: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 q9PJUwHq029657; Thu, 25 Oct 2012 19:30:58 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9PJUwmj029655; Thu, 25 Oct 2012 19:30:58 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201210251930.q9PJUwmj029655@svn.freebsd.org> From: Rick Macklem Date: Thu, 25 Oct 2012 19:30:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242090 - head/sys/rpc/rpcsec_gss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 19:30:59 -0000 Author: rmacklem Date: Thu Oct 25 19:30:58 2012 New Revision: 242090 URL: http://svn.freebsd.org/changeset/base/242090 Log: Modify the comment to take out the names and URL. Requested by: kib MFC after: 3 days Modified: head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Modified: head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c ============================================================================== --- head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Thu Oct 25 18:46:02 2012 (r242089) +++ head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Thu Oct 25 19:30:58 2012 (r242090) @@ -1025,12 +1025,9 @@ svc_rpc_gss_validate(struct svc_rpc_gss_ rpc_gss_log_status("gss_verify_mic", client->cl_mech, maj_stat, min_stat); /* - * Attila Bogar and Herbert Poeckl reported similar problems - * w.r.t. a Linux NFS client doing a krb5 NFS mount against the - * FreeBSD server. We determined this was a Linux bug: - * http://www.spinics.net/lists/linux-nfs/msg32466.html, where - * the mount failed to work because a Destroy operation with a - * bogus encrypted checksum destroyed the authenticator handle. + * A bug in some versions of the Linux client generates a + * Destroy operation with a bogus encrypted checksum. Deleting + * the credential handle for that case causes the mount to fail. * Since the checksum is bogus (gss_verify_mic() failed), it * doesn't make sense to destroy the handle and not doing so * fixes the Linux mount. From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 20:16: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 A063AB6B; Thu, 25 Oct 2012 20:16:39 +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 7DD3B8FC14; Thu, 25 Oct 2012 20:16: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 q9PKGdsD036906; Thu, 25 Oct 2012 20:16:39 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9PKGdxG036898; Thu, 25 Oct 2012 20:16:39 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201210252016.q9PKGdxG036898@svn.freebsd.org> From: Ed Schouten Date: Thu, 25 Oct 2012 20:16:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242091 - in head/usr.sbin/lpr: common_source filters X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 20:16:39 -0000 Author: ed Date: Thu Oct 25 20:16:38 2012 New Revision: 242091 URL: http://svn.freebsd.org/changeset/base/242091 Log: Let lpr build with -Wmissing-variable-declarations. Mark variables static where possible and place the uid/euid variables in lp.h, so that we can compile-time enforce that these variables have the same type. Modified: head/usr.sbin/lpr/common_source/common.c head/usr.sbin/lpr/common_source/displayq.c head/usr.sbin/lpr/common_source/lp.h head/usr.sbin/lpr/common_source/net.c head/usr.sbin/lpr/common_source/rmjob.c head/usr.sbin/lpr/common_source/startdaemon.c head/usr.sbin/lpr/filters/lpf.c Modified: head/usr.sbin/lpr/common_source/common.c ============================================================================== --- head/usr.sbin/lpr/common_source/common.c Thu Oct 25 19:30:58 2012 (r242090) +++ head/usr.sbin/lpr/common_source/common.c Thu Oct 25 20:16:38 2012 (r242091) @@ -70,8 +70,6 @@ __FBSDID("$FreeBSD$"); char line[BUFSIZ]; const char *progname; /* program name */ -extern uid_t uid, euid; - static int compar(const void *_p1, const void *_p2); /* Modified: head/usr.sbin/lpr/common_source/displayq.c ============================================================================== --- head/usr.sbin/lpr/common_source/displayq.c Thu Oct 25 19:30:58 2012 (r242090) +++ head/usr.sbin/lpr/common_source/displayq.c Thu Oct 25 20:16:38 2012 (r242091) @@ -75,8 +75,6 @@ __FBSDID("$FreeBSD$"); /* * Stuff for handling job specifications */ -extern uid_t uid, euid; - static int col; /* column on screen */ static char current[MAXNAMLEN+1]; /* current file being printed */ static char file[MAXNAMLEN+1]; /* print file name */ Modified: head/usr.sbin/lpr/common_source/lp.h ============================================================================== --- head/usr.sbin/lpr/common_source/lp.h Thu Oct 25 19:30:58 2012 (r242090) +++ head/usr.sbin/lpr/common_source/lp.h Thu Oct 25 20:16:38 2012 (r242091) @@ -252,6 +252,9 @@ typedef enum { TR_SENDING, TR_RECVING, T /* * seteuid() macros. */ + +extern uid_t uid, euid; + #define PRIV_START { \ if (seteuid(euid) != 0) err(1, "seteuid failed"); \ } Modified: head/usr.sbin/lpr/common_source/net.c ============================================================================== --- head/usr.sbin/lpr/common_source/net.c Thu Oct 25 19:30:58 2012 (r242090) +++ head/usr.sbin/lpr/common_source/net.c Thu Oct 25 20:16:38 2012 (r242091) @@ -80,8 +80,6 @@ u_char family = PF_UNSPEC; u_char family = PF_INET; #endif -extern uid_t uid, euid; - /* * Create a TCP connection to host "rhost" at port "rport". * If rport == 0, then use the printer service port. Modified: head/usr.sbin/lpr/common_source/rmjob.c ============================================================================== --- head/usr.sbin/lpr/common_source/rmjob.c Thu Oct 25 19:30:58 2012 (r242090) +++ head/usr.sbin/lpr/common_source/rmjob.c Thu Oct 25 20:16:38 2012 (r242091) @@ -69,8 +69,6 @@ static int all = 0; /* eliminate all fi static int cur_daemon; /* daemon's pid */ static char current[7+MAXHOSTNAMELEN]; /* active control file name */ -extern uid_t uid, euid; /* real and effective user id's */ - static void alarmhandler(int _signo); static void do_unlink(char *_file); static int isowner(char *_owner, char *_file, const char *_cfhost); Modified: head/usr.sbin/lpr/common_source/startdaemon.c ============================================================================== --- head/usr.sbin/lpr/common_source/startdaemon.c Thu Oct 25 19:30:58 2012 (r242090) +++ head/usr.sbin/lpr/common_source/startdaemon.c Thu Oct 25 20:16:38 2012 (r242091) @@ -49,8 +49,6 @@ __FBSDID("$FreeBSD$"); #include "lp.h" #include "pathnames.h" -extern uid_t uid, euid; - /* * Tell the printer daemon that there are new files in the spool directory. */ Modified: head/usr.sbin/lpr/filters/lpf.c ============================================================================== --- head/usr.sbin/lpr/filters/lpf.c Thu Oct 25 19:30:58 2012 (r242090) +++ head/usr.sbin/lpr/filters/lpf.c Thu Oct 25 20:16:38 2012 (r242091) @@ -60,17 +60,17 @@ __FBSDID("$FreeBSD$"); #define MAXWIDTH 132 #define MAXREP 10 -char buf[MAXREP][MAXWIDTH]; -int maxcol[MAXREP] = {-1}; -int lineno; -int width = 132; /* default line length */ -int length = 66; /* page length */ -int indent; /* indentation length */ -int npages = 1; -int literal; /* print control characters */ -char *name; /* user's login name */ -char *host; /* user's machine name */ -char *acctfile; /* accounting information file */ +static char buf[MAXREP][MAXWIDTH]; +static int maxcol[MAXREP] = {-1}; +static int lineno; +static int width = 132; /* default line length */ +static int length = 66; /* page length */ +static int indent; /* indentation length */ +static int npages = 1; +static int literal; /* print control characters */ +static char *name; /* user's login name */ +static char *host; /* user's machine name */ +static char *acctfile; /* accounting information file */ int main(int argc, char *argv[]) From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 20:23: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 A2E41EE1; Thu, 25 Oct 2012 20:23:05 +0000 (UTC) (envelope-from davide@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A1BE8FC18; Thu, 25 Oct 2012 20:23:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9PKN51O037994; Thu, 25 Oct 2012 20:23:05 GMT (envelope-from davide@svn.freebsd.org) Received: (from davide@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9PKN5dc037991; Thu, 25 Oct 2012 20:23:05 GMT (envelope-from davide@svn.freebsd.org) Message-Id: <201210252023.q9PKN5dc037991@svn.freebsd.org> From: Davide Italiano Date: Thu, 25 Oct 2012 20:23:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242092 - head/sys/fs/smbfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 20:23:05 -0000 Author: davide Date: Thu Oct 25 20:23:04 2012 New Revision: 242092 URL: http://svn.freebsd.org/changeset/base/242092 Log: - Remove the references to the deprecated zalloc kernel interface - Use M_ZERO flag in malloc() rather than bzero() - malloc() with M_NOWAIT can't return NULL so there's no need to check Reviewed by: alc Approved by: alc Modified: head/sys/fs/smbfs/smbfs_smb.c head/sys/fs/smbfs/smbfs_vfsops.c Modified: head/sys/fs/smbfs/smbfs_smb.c ============================================================================== --- head/sys/fs/smbfs/smbfs_smb.c Thu Oct 25 20:16:38 2012 (r242091) +++ head/sys/fs/smbfs/smbfs_smb.c Thu Oct 25 20:23:04 2012 (r242092) @@ -1165,8 +1165,6 @@ smbfs_findopenLM2(struct smbfs_fctx *ctx ctx->f_name = malloc(SMB_MAXFNAMELEN * 2, M_SMBFSDATA, M_WAITOK); } else ctx->f_name = malloc(SMB_MAXFNAMELEN, M_SMBFSDATA, M_WAITOK); - if (ctx->f_name == NULL) - return ENOMEM; ctx->f_infolevel = SMB_DIALECT(SSTOVC(ctx->f_ssp)) < SMB_DIALECT_NTLM0_12 ? SMB_INFO_STANDARD : SMB_FIND_FILE_DIRECTORY_INFO; ctx->f_attrmask = attr; @@ -1311,10 +1309,7 @@ smbfs_findopen(struct smbnode *dnp, cons struct smbfs_fctx *ctx; int error; - ctx = malloc(sizeof(*ctx), M_SMBFSDATA, M_WAITOK); - if (ctx == NULL) - return ENOMEM; - bzero(ctx, sizeof(*ctx)); + ctx = malloc(sizeof(*ctx), M_SMBFSDATA, M_WAITOK | M_ZERO); ctx->f_ssp = dnp->n_mount->sm_share; ctx->f_dnp = dnp; ctx->f_flags = SMBFS_RDD_FINDFIRST; Modified: head/sys/fs/smbfs/smbfs_vfsops.c ============================================================================== --- head/sys/fs/smbfs/smbfs_vfsops.c Thu Oct 25 20:16:38 2012 (r242091) +++ head/sys/fs/smbfs/smbfs_vfsops.c Thu Oct 25 20:23:04 2012 (r242092) @@ -54,13 +54,6 @@ static int smbfs_debuglevel = 0; static int smbfs_version = SMBFS_VERSION; -#ifdef SMBFS_USEZONE -#include -#include - -vm_zone_t smbfsmount_zone; -#endif - SYSCTL_NODE(_vfs, OID_AUTO, smbfs, CTLFLAG_RW, 0, "SMB/CIFS filesystem"); SYSCTL_INT(_vfs_smbfs, OID_AUTO, version, CTLFLAG_RD, &smbfs_version, 0, ""); SYSCTL_INT(_vfs_smbfs, OID_AUTO, debuglevel, CTLFLAG_RW, &smbfs_debuglevel, 0, ""); @@ -172,18 +165,7 @@ smbfs_mount(struct mount *mp) smb_share_unlock(ssp, 0); mp->mnt_stat.f_iosize = SSTOVC(ssp)->vc_txmax; -#ifdef SMBFS_USEZONE - smp = zalloc(smbfsmount_zone); -#else - smp = malloc(sizeof(*smp), M_SMBFSDATA, M_WAITOK); -#endif - if (smp == NULL) { - printf("could not alloc smbmount\n"); - vfs_mount_error(mp, "could not alloc smbmount", v, error); - error = ENOMEM; - goto bad; - } - bzero(smp, sizeof(*smp)); + smp = malloc(sizeof(*smp), M_SMBFSDATA, M_WAITOK | M_ZERO); mp->mnt_data = smp; smp->sm_hash = hashinit(desiredvnodes, M_SMBFSHASH, &smp->sm_hashlen); if (smp->sm_hash == NULL) @@ -261,11 +243,7 @@ bad: if (smp->sm_hash) free(smp->sm_hash, M_SMBFSHASH); sx_destroy(&smp->sm_hashlock); -#ifdef SMBFS_USEZONE - zfree(smbfsmount_zone, smp); -#else free(smp, M_SMBFSDATA); -#endif } if (ssp) smb_share_put(ssp, &scred); @@ -311,11 +289,7 @@ smbfs_unmount(struct mount *mp, int mntf if (smp->sm_hash) free(smp->sm_hash, M_SMBFSHASH); sx_destroy(&smp->sm_hashlock); -#ifdef SMBFS_USEZONE - zfree(smbfsmount_zone, smp); -#else free(smp, M_SMBFSDATA); -#endif MNT_ILOCK(mp); mp->mnt_flag &= ~MNT_LOCAL; MNT_IUNLOCK(mp); @@ -383,9 +357,6 @@ smbfs_quotactl(mp, cmd, uid, arg) int smbfs_init(struct vfsconf *vfsp) { -#ifdef SMBFS_USEZONE - smbfsmount_zone = zinit("SMBFSMOUNT", sizeof(struct smbmount), 0, 0, 1); -#endif smbfs_pbuf_freecnt = nswbuf / 2 + 1; SMBVDEBUG("done.\n"); return 0; From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 20:30: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 70980146 for ; Thu, 25 Oct 2012 20:30:06 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id C49D88FC1B for ; Thu, 25 Oct 2012 20:30:05 +0000 (UTC) Received: (qmail 43636 invoked from network); 25 Oct 2012 22:07:40 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 25 Oct 2012 22:07:40 -0000 Message-ID: <5089A13F.8080405@freebsd.org> Date: Thu, 25 Oct 2012 22:29:51 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: "Andrey V. Elsukov" Subject: Re: svn commit: r242079 - in head: sbin/ipfw share/man/man4 sys/conf sys/net sys/netinet sys/netinet6 sys/netpfil/ipfw References: <201210250939.q9P9dF0q022970@svn.freebsd.org> <508960C2.6030003@freebsd.org> <508967E3.3070508@FreeBSD.org> In-Reply-To: <508967E3.3070508@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 20:30:06 -0000 On 25.10.2012 18:25, Andrey V. Elsukov wrote: > On 25.10.2012 19:54, Andre Oppermann wrote: >> I still don't agree with naming the sysctl net.pfil.forward. This >> type of forwarding is a property of IPv4 and IPv6 and thus should >> be put there. Pfil hooking can be on layer 2, 2-bridging, 3 and >> who knows where else in the future. Forwarding works only for IPv46. >> >> You haven't even replied to my comment on net@. Please change the >> sysctl location and name to its appropriate place. > > Hi Andre, > > There were two replies related to this subject, you did not replied to > them and i thought that you became agree. I replied to your reply to mine. Other than that I didn't find anything else from you. > So, if not, what you think about the name net.pfil.ipforward? net.inet.ip.pfil_forward net.inet6.ip6.pfil_forward or something like that. If you can show with your performance profiling that the sysctl isn't even necessary, you could leave it completely away and have pfil_forward enabled permanently. That would be even better for everybody. >> Also an MFC's after 2 weeks must ensure that compiling with IPFIREWALL_ >> FORWARD enabled the sysctl at the same time to keep kernel configs >> within 9-stable working. > > Yes, it will work like that. Excellent. Thank you. -- Andre From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 20:31: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 051D9346; Thu, 25 Oct 2012 20:31:23 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE48E8FC0A; Thu, 25 Oct 2012 20:31: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 q9PKVM4V039423; Thu, 25 Oct 2012 20:31:22 GMT (envelope-from sjg@svn.freebsd.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9PKVMVD039417; Thu, 25 Oct 2012 20:31:22 GMT (envelope-from sjg@svn.freebsd.org) Message-Id: <201210252031.q9PKVMVD039417@svn.freebsd.org> From: "Simon J. Gerraty" Date: Thu, 25 Oct 2012 20:31:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r242093 - vendor/NetBSD/bmake/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 20:31:23 -0000 Author: sjg Date: Thu Oct 25 20:31:22 2012 New Revision: 242093 URL: http://svn.freebsd.org/changeset/base/242093 Log: Import bmake-20121010 Relevant items from ChangeLog: o [Makefile.in:] protect syntax that only bmake parses correctly. o compat.c: ignore empty commands - same as jobs mode. o make.1: document meta chars that cause use of shell Approved by: marcelm (mentor) Modified: vendor/NetBSD/bmake/dist/ChangeLog vendor/NetBSD/bmake/dist/Makefile.in vendor/NetBSD/bmake/dist/bmake.1 vendor/NetBSD/bmake/dist/bmake.cat1 vendor/NetBSD/bmake/dist/bsd.after-import.mk vendor/NetBSD/bmake/dist/compat.c vendor/NetBSD/bmake/dist/make.1 Modified: vendor/NetBSD/bmake/dist/ChangeLog ============================================================================== --- vendor/NetBSD/bmake/dist/ChangeLog Thu Oct 25 20:23:04 2012 (r242092) +++ vendor/NetBSD/bmake/dist/ChangeLog Thu Oct 25 20:31:22 2012 (r242093) @@ -1,3 +1,27 @@ +2012-10-10 Simon J. Gerraty + + * Makefile.in (MAKE_VERSION): 20121010 + o protect syntax that only bmake parses correctly. + o remove auto setting of FORCE_MACHINE, use configure's + --with-force-machine=whatever if that is desired. + +2012-10-08 Simon J. Gerraty + + * Makefile.in: do not lose history from make.1 when generating bmake.1 + +2012-10-07 Simon J. Gerraty + + * Makefile.in (MAKE_VERSION): 20121007 + Merge with NetBSD make, pick up + o compat.c: ignore empty commands - same as jobs mode. + o make.1: document meta chars that cause use of shell + +2012-09-11 Simon J. Gerraty + + * Makefile.in (MAKE_VERSION): bump version to 20120911 + * bsd.after-import.mk: include Makefile.inc early and allow it to + override PROG + 2012-08-31 Simon J. Gerraty * Makefile.in (MAKE_VERSION): bump version to 20120831 Modified: vendor/NetBSD/bmake/dist/Makefile.in ============================================================================== --- vendor/NetBSD/bmake/dist/Makefile.in Thu Oct 25 20:23:04 2012 (r242092) +++ vendor/NetBSD/bmake/dist/Makefile.in Thu Oct 25 20:31:22 2012 (r242093) @@ -1,7 +1,7 @@ # $NetBSD: Makefile,v 1.56 2012/05/30 21:54:23 sjg Exp $ # @(#)Makefile 5.2 (Berkeley) 12/28/90 -# $Id: Makefile.in,v 1.170 2012/08/31 06:46:22 sjg Exp $ +# $Id: Makefile.in,v 1.174 2012/10/10 18:46:24 sjg Exp $ PROG= bmake SRCS= arch.c buf.c compat.c cond.c dir.c for.c hash.c job.c main.c \ @@ -21,7 +21,7 @@ srcdir= @srcdir@ CC?= @CC@ # Base version on src date -MAKE_VERSION= 20120831 +MAKE_VERSION= 20121010 MACHINE=@machine@ MACHINE_ARCH=@machine_arch@ DEFAULT_SYS_PATH = @default_sys_path@ @@ -71,10 +71,9 @@ SUBDIR= PSD.doc .endif .endif +.if defined(.PARSEDIR) +# we cannot rely on anything but bmake to parse this correctly. .if empty(isBSD44:M${OS}) -# XXX not sure if we still want this given that configure -# lets us force or not the definition of MACHINE. -CFLAGS_main.o+= "-DFORCE_MACHINE=\"${MACHINE}\"" MANTARGET=cat INSTALL?=${srcdir}/install-sh .if (${MACHINE} == "sun386") @@ -85,7 +84,7 @@ SRCS+= sigcompat.c CFLAGS+= -DSIGNAL_FLAGS=SA_RESTART .endif .endif -.if defined(.PARSEDIR) + .if make(obj) || make(clean) SUBDIR+= unit-tests .endif @@ -104,14 +103,18 @@ EXTRACT_MAN=no MAN=${PROG}.1 .if (${PROG} != "make") -${MAN}: make.1 - @echo making ${PROG}.1 - @sed -e 's/^.Nx/NetBSD/' -e '/^.Nm/s/make/${PROG}/' -e '/^.Sh HISTORY/,$$d' ${srcdir}/make.1 > $@ - @(echo ".Sh HISTORY"; \ - echo ".Nm"; \ +my.history: ${MAKEFILE} + @(echo ".Nm"; \ echo "is derived from NetBSD"; \ echo ".Xr make 1 ."; \ - echo It uses autoconf to facilitate portability to other platforms.) >> $@ + echo "It uses autoconf to facilitate portability to other platforms."; \ + echo ".Pp") > $@ + +${MAN}: make.1 my.history + @echo making ${PROG}.1 + @sed -e 's/^.Nx/NetBSD/' -e '/^.Nm/s/make/${PROG}/' \ + -e '/^.Sh HISTORY/rmy.history' \ + -e '/^.Sh HISTORY/,$$s,^.Nm,make,' ${.CURDIR}/make.1 > $@ .endif Modified: vendor/NetBSD/bmake/dist/bmake.1 ============================================================================== --- vendor/NetBSD/bmake/dist/bmake.1 Thu Oct 25 20:23:04 2012 (r242092) +++ vendor/NetBSD/bmake/dist/bmake.1 Thu Oct 25 20:31:22 2012 (r242093) @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.206 2012/08/30 22:35:37 wiz Exp $ +.\" $NetBSD: make.1,v 1.209 2012/10/08 15:09:48 christos Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd August 30, 2012 +.Dd October 8, 2012 .Dt MAKE 1 .Os .Sh NAME @@ -2042,6 +2042,13 @@ or To be compatible with Makefiles that do this, one can use .Fl B to disable this behavior. +.Pp +In compatibility mode, each command is run in a separate process. +If the command contains any shell meta characters +.Pq Ql #=|^(){};&<>*?[]:$`\e\en +it will be passed to the shell, otherwise +.Nm +will attempt direct execution. .Sh SEE ALSO .Xr mkdep 1 .Sh HISTORY @@ -2049,3 +2056,26 @@ to disable this behavior. is derived from NetBSD .Xr make 1 . It uses autoconf to facilitate portability to other platforms. +.Pp +A +make +command appeared in +.At v7 . +This +make +implementation is based on Adam De Boor's pmake program which was written +for Sprite at Berkeley. +It was designed to be a parallel distributed make running jobs on different +machines using a daemon called +.Dq customs . +.Sh BUGS +The +make +syntax is difficult to parse without actually acting of the data. +For instance finding the end of a variable use should involve scanning each +the modifiers using the correct terminator for each field. +In many places +make +just counts {} and () in order to find the end of a variable expansion. +.Pp +There is no way of escaping a space character in a filename. Modified: vendor/NetBSD/bmake/dist/bmake.cat1 ============================================================================== --- vendor/NetBSD/bmake/dist/bmake.cat1 Thu Oct 25 20:23:04 2012 (r242092) +++ vendor/NetBSD/bmake/dist/bmake.cat1 Thu Oct 25 20:31:22 2012 (r242093) @@ -1301,1321 +1301,30 @@ CCOOMMPPAATTIIBBIILLIITTYY ``chdir''. To be compatible with Makefiles that do this, one can use --BB to disable this behavior. + In compatibility mode, each command is run in a separate process. If the + command contains any shell meta characters (`#=|^(){};&<>*?[]:$`\\n') it + will be passed to the shell, otherwise bbmmaakkee will attempt direct execu- + tion. + SSEEEE AALLSSOO mkdep(1) HHIISSTTOORRYY bbmmaakkee is derived from NetBSD make(1). It uses autoconf to facilitate -MAKE(1) NetBSD General Commands Manual MAKE(1) - portability to other platforms. -NNAAMMEE - bbmmaakkee -- maintain program dependencies - -SSYYNNOOPPSSIISS - bbmmaakkee [--BBeeiikkNNnnqqrrssttWWXX] [--CC _d_i_r_e_c_t_o_r_y] [--DD _v_a_r_i_a_b_l_e] [--dd _f_l_a_g_s] - [--ff _m_a_k_e_f_i_l_e] [--II _d_i_r_e_c_t_o_r_y] [--JJ _p_r_i_v_a_t_e] [--jj _m_a_x___j_o_b_s] - [--mm _d_i_r_e_c_t_o_r_y] [--TT _f_i_l_e] [--VV _v_a_r_i_a_b_l_e] [_v_a_r_i_a_b_l_e_=_v_a_l_u_e] - [_t_a_r_g_e_t _._._.] - -DDEESSCCRRIIPPTTIIOONN - bbmmaakkee is a program designed to simplify the maintenance of other pro- - grams. Its input is a list of specifications as to the files upon which - programs and other files depend. If no --ff _m_a_k_e_f_i_l_e makefile option is - given, bbmmaakkee will try to open `_m_a_k_e_f_i_l_e' then `_M_a_k_e_f_i_l_e' in order to find - the specifications. If the file `_._d_e_p_e_n_d' exists, it is read (see - mkdep(1)). - - This manual page is intended as a reference document only. For a more - thorough description of bbmmaakkee and makefiles, please refer to _P_M_a_k_e _- _A - _T_u_t_o_r_i_a_l. - - bbmmaakkee will prepend the contents of the _M_A_K_E_F_L_A_G_S environment variable to - the command line arguments before parsing them. - - The options are as follows: - - --BB Try to be backwards compatible by executing a single shell per - command and by executing the commands to make the sources of a - dependency line in sequence. - - --CC _d_i_r_e_c_t_o_r_y - Change to _d_i_r_e_c_t_o_r_y before reading the makefiles or doing any- - thing else. If multiple --CC options are specified, each is inter- - preted relative to the previous one: --CC _/ --CC _e_t_c is equivalent to - --CC _/_e_t_c. - - --DD _v_a_r_i_a_b_l_e - Define _v_a_r_i_a_b_l_e to be 1, in the global context. - - --dd _[_-_]_f_l_a_g_s - Turn on debugging, and specify which portions of bbmmaakkee are to - print debugging information. Unless the flags are preceded by - `-' they are added to the _M_A_K_E_F_L_A_G_S environment variable and will - be processed by any child make processes. By default, debugging - information is printed to standard error, but this can be changed - using the _F debugging flag. The debugging output is always - unbuffered; in addition, if debugging is enabled but debugging - output is not directed to standard output, then the standard out- - put is line buffered. _F_l_a_g_s is one or more of the following: - - _A Print all possible debugging information; equivalent to - specifying all of the debugging flags. - - _a Print debugging information about archive searching and - caching. - - _C Print debugging information about current working direc- - tory. - - _c Print debugging information about conditional evaluation. - - _d Print debugging information about directory searching and - caching. - - _e Print debugging information about failed commands and - targets. - - _F[++]_f_i_l_e_n_a_m_e - Specify where debugging output is written. This must be - the last flag, because it consumes the remainder of the - argument. If the character immediately after the `F' - flag is `+', then the file will be opened in append mode; - otherwise the file will be overwritten. If the file name - is `stdout' or `stderr' then debugging output will be - written to the standard output or standard error output - file descriptors respectively (and the `+' option has no - effect). Otherwise, the output will be written to the - named file. If the file name ends `.%d' then the `%d' is - replaced by the pid. - - _f Print debugging information about loop evaluation. - - _g_1 Print the input graph before making anything. - - _g_2 Print the input graph after making everything, or before - exiting on error. - - _g_3 Print the input graph before exiting on error. - - _j Print debugging information about running multiple - shells. - - _l Print commands in Makefiles regardless of whether or not - they are prefixed by `@' or other "quiet" flags. Also - known as "loud" behavior. - - _M Print debugging information about "meta" mode decisions - about targets. - - _m Print debugging information about making targets, includ- - ing modification dates. - - _n Don't delete the temporary command scripts created when - running commands. These temporary scripts are created in - the directory referred to by the TMPDIR environment vari- - able, or in _/_t_m_p if TMPDIR is unset or set to the empty - string. The temporary scripts are created by mkstemp(3), - and have names of the form _m_a_k_e_X_X_X_X_X_X. _N_O_T_E: This can - create many files in TMPDIR or _/_t_m_p, so use with care. - - _p Print debugging information about makefile parsing. - - _s Print debugging information about suffix-transformation - rules. - - _t Print debugging information about target list mainte- - nance. - - _V Force the --VV option to print raw value of variables. - - _v Print debugging information about variable assignment. - - _x Run shell commands with --xx so the actual commands are - printed as they are executed. - - --ee Specify that environment variables override macro assignments - within makefiles. - - --ff _m_a_k_e_f_i_l_e - Specify a makefile to read instead of the default `_m_a_k_e_f_i_l_e'. If - _m_a_k_e_f_i_l_e is `--', standard input is read. Multiple makefiles may - be specified, and are read in the order specified. - - --II _d_i_r_e_c_t_o_r_y - Specify a directory in which to search for makefiles and included - makefiles. The system makefile directory (or directories, see - the --mm option) is automatically included as part of this list. - - --ii Ignore non-zero exit of shell commands in the makefile. Equiva- - lent to specifying `--' before each command line in the makefile. - - --JJ _p_r_i_v_a_t_e - This option should _n_o_t be specified by the user. - - When the _j option is in use in a recursive build, this option is - passed by a make to child makes to allow all the make processes - in the build to cooperate to avoid overloading the system. - - --jj _m_a_x___j_o_b_s - Specify the maximum number of jobs that bbmmaakkee may have running at - any one time. The value is saved in _._M_A_K_E_._J_O_B_S. Turns compati- - bility mode off, unless the _B flag is also specified. When com- - patibility mode is off, all commands associated with a target are - executed in a single shell invocation as opposed to the tradi- - tional one shell invocation per line. This can break traditional - scripts which change directories on each command invocation and - then expect to start with a fresh environment on the next line. - It is more efficient to correct the scripts rather than turn - backwards compatibility on. - - --kk Continue processing after errors are encountered, but only on - those targets that do not depend on the target whose creation - caused the error. - - --mm _d_i_r_e_c_t_o_r_y - Specify a directory in which to search for sys.mk and makefiles - included via the <_f_i_l_e>-style include statement. The --mm option - can be used multiple times to form a search path. This path will - override the default system include path: /usr/share/mk. Fur- - thermore the system include path will be appended to the search - path used for "_f_i_l_e"-style include statements (see the --II - option). - - If a file or directory name in the --mm argument (or the - MAKESYSPATH environment variable) starts with the string ".../" - then bbmmaakkee will search for the specified file or directory named - in the remaining part of the argument string. The search starts - with the current directory of the Makefile and then works upward - towards the root of the filesystem. If the search is successful, - then the resulting directory replaces the ".../" specification in - the --mm argument. If used, this feature allows bbmmaakkee to easily - search in the current source tree for customized sys.mk files - (e.g., by using ".../mk/sys.mk" as an argument). - - --nn Display the commands that would have been executed, but do not - actually execute them unless the target depends on the .MAKE spe- - cial source (see below). - - --NN Display the commands which would have been executed, but do not - actually execute any of them; useful for debugging top-level - makefiles without descending into subdirectories. - - --qq Do not execute any commands, but exit 0 if the specified targets - are up-to-date and 1, otherwise. - - --rr Do not use the built-in rules specified in the system makefile. - - --ss Do not echo any commands as they are executed. Equivalent to - specifying `@@' before each command line in the makefile. - - --TT _t_r_a_c_e_f_i_l_e - When used with the --jj flag, append a trace record to _t_r_a_c_e_f_i_l_e - for each job started and completed. - - --tt Rather than re-building a target as specified in the makefile, - create it or update its modification time to make it appear up- - to-date. - - --VV _v_a_r_i_a_b_l_e - Print bbmmaakkee's idea of the value of _v_a_r_i_a_b_l_e, in the global con- - text. Do not build any targets. Multiple instances of this - option may be specified; the variables will be printed one per - line, with a blank line for each null or undefined variable. If - _v_a_r_i_a_b_l_e contains a `$' then the value will be expanded before - printing. - - --WW Treat any warnings during makefile parsing as errors. - - --XX Don't export variables passed on the command line to the environ- - ment individually. Variables passed on the command line are - still exported via the _M_A_K_E_F_L_A_G_S environment variable. This - option may be useful on systems which have a small limit on the - size of command arguments. - - _v_a_r_i_a_b_l_e_=_v_a_l_u_e - Set the value of the variable _v_a_r_i_a_b_l_e to _v_a_l_u_e. Normally, all - values passed on the command line are also exported to sub-makes - in the environment. The --XX flag disables this behavior. Vari- - able assignments should follow options for POSIX compatibility - but no ordering is enforced. - - There are seven different types of lines in a makefile: file dependency - specifications, shell commands, variable assignments, include statements, - conditional directives, for loops, and comments. - - In general, lines may be continued from one line to the next by ending - them with a backslash (`\'). The trailing newline character and initial - whitespace on the following line are compressed into a single space. - -FFIILLEE DDEEPPEENNDDEENNCCYY SSPPEECCIIFFIICCAATTIIOONNSS - Dependency lines consist of one or more targets, an operator, and zero or - more sources. This creates a relationship where the targets ``depend'' - on the sources and are usually created from them. The exact relationship - between the target and the source is determined by the operator that sep- - arates them. The three operators are as follows: - - :: A target is considered out-of-date if its modification time is less - than those of any of its sources. Sources for a target accumulate - over dependency lines when this operator is used. The target is - removed if bbmmaakkee is interrupted. - - !! Targets are always re-created, but not until all sources have been - examined and re-created as necessary. Sources for a target accumu- - late over dependency lines when this operator is used. The target - is removed if bbmmaakkee is interrupted. - - :::: If no sources are specified, the target is always re-created. Oth- - erwise, a target is considered out-of-date if any of its sources - has been modified more recently than the target. Sources for a - target do not accumulate over dependency lines when this operator - is used. The target will not be removed if bbmmaakkee is interrupted. - - Targets and sources may contain the shell wildcard values `?', `*', `[]', - and `{}'. The values `?', `*', and `[]' may only be used as part of the - final component of the target or source, and must be used to describe - existing files. The value `{}' need not necessarily be used to describe - existing files. Expansion is in directory order, not alphabetically as - done in the shell. - -SSHHEELLLL CCOOMMMMAANNDDSS - Each target may have associated with it a series of shell commands, nor- - mally used to create the target. Each of the commands in this script - _m_u_s_t be preceded by a tab. While any target may appear on a dependency - line, only one of these dependencies may be followed by a creation - script, unless the `::::' operator is used. - - If the first characters of the command line are any combination of `@@', - `++', or `--', the command is treated specially. A `@@' causes the command - not to be echoed before it is executed. A `++' causes the command to be - executed even when --nn is given. This is similar to the effect of the - .MAKE special source, except that the effect can be limited to a single - line of a script. A `--' causes any non-zero exit status of the command - line to be ignored. - -VVAARRIIAABBLLEE AASSSSIIGGNNMMEENNTTSS - Variables in make are much like variables in the shell, and, by tradi- - tion, consist of all upper-case letters. - - VVaarriiaabbllee aassssiiggnnmmeenntt mmooddiiffiieerrss - The five operators that can be used to assign values to variables are as - follows: - - == Assign the value to the variable. Any previous value is overrid- - den. - - ++== Append the value to the current value of the variable. - - ??== Assign the value to the variable if it is not already defined. - - ::== Assign with expansion, i.e. expand the value before assigning it - to the variable. Normally, expansion is not done until the vari- - able is referenced. _N_O_T_E: References to undefined variables are - _n_o_t expanded. This can cause problems when variable modifiers - are used. - - !!== Expand the value and pass it to the shell for execution and - assign the result to the variable. Any newlines in the result - are replaced with spaces. - - Any white-space before the assigned _v_a_l_u_e is removed; if the value is - being appended, a single space is inserted between the previous contents - of the variable and the appended value. - - Variables are expanded by surrounding the variable name with either curly - braces (`{}') or parentheses (`()') and preceding it with a dollar sign - (`$'). If the variable name contains only a single letter, the surround- - ing braces or parentheses are not required. This shorter form is not - recommended. - - If the variable name contains a dollar, then the name itself is expanded - first. This allows almost arbitrary variable names, however names con- - taining dollar, braces, parenthesis, or whitespace are really best - avoided! - - If the result of expanding a variable contains a dollar sign (`$') the - string is expanded again. - - Variable substitution occurs at three distinct times, depending on where - the variable is being used. - - 1. Variables in dependency lines are expanded as the line is read. - - 2. Variables in shell commands are expanded when the shell command is - executed. - - 3. ``.for'' loop index variables are expanded on each loop iteration. - Note that other variables are not expanded inside loops so the fol- - lowing example code: - - - .for i in 1 2 3 - a+= ${i} - j= ${i} - b+= ${j} - .endfor - - all: - @echo ${a} - @echo ${b} - - will print: - - 1 2 3 - 3 3 3 - - Because while ${a} contains ``1 2 3'' after the loop is executed, - ${b} contains ``${j} ${j} ${j}'' which expands to ``3 3 3'' since - after the loop completes ${j} contains ``3''. - - VVaarriiaabbllee ccllaasssseess - The four different classes of variables (in order of increasing prece- - dence) are: - - Environment variables - Variables defined as part of bbmmaakkee's environment. - - Global variables - Variables defined in the makefile or in included makefiles. - - Command line variables - Variables defined as part of the command line. - - Local variables - Variables that are defined specific to a certain target. The - seven local variables are as follows: - - _._A_L_L_S_R_C The list of all sources for this target; also known as - `_>'. - - _._A_R_C_H_I_V_E The name of the archive file. - - _._I_M_P_S_R_C In suffix-transformation rules, the name/path of the - source from which the target is to be transformed (the - ``implied'' source); also known as `_<'. It is not - defined in explicit rules. - - _._M_E_M_B_E_R The name of the archive member. - - _._O_O_D_A_T_E The list of sources for this target that were deemed - out-of-date; also known as `_?'. - - _._P_R_E_F_I_X The file prefix of the target, containing only the file - portion, no suffix or preceding directory components; - also known as `_*'. - - _._T_A_R_G_E_T The name of the target; also known as `_@'. - - The shorter forms `_@', `_?', `_<', `_>', and `_*' are permitted for - backward compatibility with historical makefiles and are not rec- - ommended. The six variables `_@_F', `_@_D', `_<_F', `_<_D', `_*_F', and - `_*_D' are permitted for compatibility with AT&T System V UNIX - makefiles and are not recommended. - - Four of the local variables may be used in sources on dependency - lines because they expand to the proper value for each target on - the line. These variables are `_._T_A_R_G_E_T', `_._P_R_E_F_I_X', `_._A_R_C_H_I_V_E', - and `_._M_E_M_B_E_R'. - - AAddddiittiioonnaall bbuuiilltt--iinn vvaarriiaabblleess - In addition, bbmmaakkee sets or knows about the following variables: - - _$ A single dollar sign `$', i.e. `$$' expands to a single - dollar sign. - - _._A_L_L_T_A_R_G_E_T_S The list of all targets encountered in the Makefile. If - evaluated during Makefile parsing, lists only those tar- - gets encountered thus far. - - _._C_U_R_D_I_R A path to the directory where bbmmaakkee was executed. Refer - to the description of `PWD' for more details. - - MAKE The name that bbmmaakkee was executed with (_a_r_g_v_[_0_]). For - compatibility bbmmaakkee also sets _._M_A_K_E with the same value. - The preferred variable to use is the environment variable - MAKE because it is more compatible with other versions of - bbmmaakkee and cannot be confused with the special target with - the same name. - - _._M_A_K_E_._D_E_P_E_N_D_F_I_L_E - Names the makefile (default `_._d_e_p_e_n_d') from which gener- - ated dependencies are read. - - _._M_A_K_E_._E_X_P_A_N_D___V_A_R_I_A_B_L_E_S - A boolean that controls the default behavior of the --VV - option. - - _._M_A_K_E_._E_X_P_O_R_T_E_D The list of variables exported by bbmmaakkee. - - _._M_A_K_E_._J_O_B_S The argument to the --jj option. - - _._M_A_K_E_._J_O_B_._P_R_E_F_I_X - If bbmmaakkee is run with _j then output for each target is - prefixed with a token `--- target ---' the first part of - which can be controlled via _._M_A_K_E_._J_O_B_._P_R_E_F_I_X. - For example: - .MAKE.JOB.PREFIX=${.newline}---${.MAKE:T}[${.MAKE.PID}] - would produce tokens like `---make[1234] target ---' mak- - ing it easier to track the degree of parallelism being - achieved. - - MAKEFLAGS The environment variable `MAKEFLAGS' may contain anything - that may be specified on bbmmaakkee's command line. Anything - specified on bbmmaakkee's command line is appended to the - `MAKEFLAGS' variable which is then entered into the envi- - ronment for all programs which bbmmaakkee executes. - - _._M_A_K_E_._L_E_V_E_L The recursion depth of bbmmaakkee. The initial instance of - bbmmaakkee will be 0, and an incremented value is put into the - environment to be seen by the next generation. This - allows tests like: .if ${.MAKE.LEVEL} == 0 to protect - things which should only be evaluated in the initial - instance of bbmmaakkee. - - _._M_A_K_E_._M_A_K_E_F_I_L_E___P_R_E_F_E_R_E_N_C_E - The ordered list of makefile names (default `_m_a_k_e_f_i_l_e', - `_M_a_k_e_f_i_l_e') that bbmmaakkee will look for. - - _._M_A_K_E_._M_A_K_E_F_I_L_E_S - The list of makefiles read by bbmmaakkee, which is useful for - tracking dependencies. Each makefile is recorded only - once, regardless of the number of times read. - - _._M_A_K_E_._M_O_D_E Processed after reading all makefiles. Can affect the - mode that bbmmaakkee runs in. It can contain a number of key- - words: - - _c_o_m_p_a_t Like --BB, puts bbmmaakkee into "compat" mode. - - _m_e_t_a Puts bbmmaakkee into "meta" mode, where meta files - are created for each target to capture the - command run, the output generated and if - filemon(4) is available, the system calls - which are of interest to bbmmaakkee. The captured - output can be very useful when diagnosing - errors. - - _c_u_r_d_i_r_O_k_= _b_f Normally bbmmaakkee will not create .meta files - in `_._C_U_R_D_I_R'. This can be overridden by set- - ting _b_f to a value which represents True. - - _e_n_v For debugging, it can be useful to inlcude - the environment in the .meta file. - - _v_e_r_b_o_s_e If in "meta" mode, print a clue about the - target being built. This is useful if the - build is otherwise running silently. The - message printed the value of: - _._M_A_K_E_._M_E_T_A_._P_R_E_F_I_X. - - _i_g_n_o_r_e_-_c_m_d Some makefiles have commands which are simply - not stable. This keyword causes them to be - ignored for determining whether a target is - out of date in "meta" mode. See also - ..NNOOMMEETTAA__CCMMPP. - - _s_i_l_e_n_t_= _b_f If _b_f is True, when a .meta file is created, - mark the target ..SSIILLEENNTT. - - _._M_A_K_E_._M_E_T_A_._B_A_I_L_I_W_I_C_K - In "meta" mode, provides a list of prefixes which match - the directories controlled by bbmmaakkee. If a file that was - generated outside of _._O_B_J_D_I_R but within said bailiwick is - missing, the current target is considered out-of-date. - - _._M_A_K_E_._M_E_T_A_._C_R_E_A_T_E_D - In "meta" mode, this variable contains a list of all the - meta files updated. If not empty, it can be used to - trigger processing of _._M_A_K_E_._M_E_T_A_._F_I_L_E_S. - - _._M_A_K_E_._M_E_T_A_._F_I_L_E_S - In "meta" mode, this variable contains a list of all the - meta files used (updated or not). This list can be used - to process the meta files to extract dependency informa- - tion. - - _._M_A_K_E_._M_E_T_A_._P_R_E_F_I_X - Defines the message printed for each meta file updated in - "meta verbose" mode. The default value is: - Building ${.TARGET:H:tA}/${.TARGET:T} - - _._M_A_K_E_O_V_E_R_R_I_D_E_S This variable is used to record the names of variables - assigned to on the command line, so that they may be - exported as part of `MAKEFLAGS'. This behaviour can be - disabled by assigning an empty value to `_._M_A_K_E_O_V_E_R_R_I_D_E_S' - within a makefile. Extra variables can be exported from - a makefile by appending their names to `_._M_A_K_E_O_V_E_R_R_I_D_E_S'. - `MAKEFLAGS' is re-exported whenever `_._M_A_K_E_O_V_E_R_R_I_D_E_S' is - modified. - - _._M_A_K_E_._P_I_D The process-id of bbmmaakkee. - - _._M_A_K_E_._P_P_I_D The parent process-id of bbmmaakkee. - - _M_A_K_E___P_R_I_N_T___V_A_R___O_N___E_R_R_O_R - When bbmmaakkee stops due to an error, it prints its name and - the value of `_._C_U_R_D_I_R' as well as the value of any vari- - ables named in `_M_A_K_E___P_R_I_N_T___V_A_R___O_N___E_R_R_O_R'. - - _._n_e_w_l_i_n_e This variable is simply assigned a newline character as - its value. This allows expansions using the ::@@ modifier - to put a newline between iterations of the loop rather - than a space. For example, the printing of - `_M_A_K_E___P_R_I_N_T___V_A_R___O_N___E_R_R_O_R' could be done as - ${MAKE_PRINT_VAR_ON_ERROR:@v@$v='${$v}'${.newline}@}. - - _._O_B_J_D_I_R A path to the directory where the targets are built. Its - value is determined by trying to chdir(2) to the follow- - ing directories in order and using the first match: - - 1. ${MAKEOBJDIRPREFIX}${.CURDIR} - - (Only if `MAKEOBJDIRPREFIX' is set in the environ- - ment or on the command line.) - - 2. ${MAKEOBJDIR} - - (Only if `MAKEOBJDIR' is set in the environment or - on the command line.) - - 3. ${.CURDIR}_/_o_b_j_.${MACHINE} - - 4. ${.CURDIR}_/_o_b_j - - 5. _/_u_s_r_/_o_b_j_/${.CURDIR} - - 6. ${.CURDIR} - - Variable expansion is performed on the value before it's - used, so expressions such as - ${.CURDIR:S,^/usr/src,/var/obj,} - may be used. This is especially useful with - `MAKEOBJDIR'. - - `_._O_B_J_D_I_R' may be modified in the makefile as a global - variable. In all cases, bbmmaakkee will chdir(2) to `_._O_B_J_D_I_R' - and set `PWD' to that directory before executing any tar- - gets. - - _._P_A_R_S_E_D_I_R A path to the directory of the current `_M_a_k_e_f_i_l_e' being - parsed. - - _._P_A_R_S_E_F_I_L_E The basename of the current `_M_a_k_e_f_i_l_e' being parsed. - This variable and `_._P_A_R_S_E_D_I_R' are both set only while the - `_M_a_k_e_f_i_l_e_s' are being parsed. If you want to retain - their current values, assign them to a variable using - assignment with expansion: (`::=='). - - _._P_A_T_H A variable that represents the list of directories that - bbmmaakkee will search for files. The search list should be - updated using the target `_._P_A_T_H' rather than the vari- - able. - - PWD Alternate path to the current directory. bbmmaakkee normally - sets `_._C_U_R_D_I_R' to the canonical path given by getcwd(3). - However, if the environment variable `PWD' is set and - gives a path to the current directory, then bbmmaakkee sets - `_._C_U_R_D_I_R' to the value of `PWD' instead. This behaviour - is disabled if `MAKEOBJDIRPREFIX' is set or `MAKEOBJDIR' - contains a variable transform. `PWD' is set to the value - of `_._O_B_J_D_I_R' for all programs which bbmmaakkee executes. - - .TARGETS The list of targets explicitly specified on the command - line, if any. - - VPATH Colon-separated (``:'') lists of directories that bbmmaakkee - will search for files. The variable is supported for - compatibility with old make programs only, use `_._P_A_T_H' - instead. - - VVaarriiaabbllee mmooddiiffiieerrss - Variable expansion may be modified to select or modify each word of the - variable (where a ``word'' is white-space delimited sequence of charac- - ters). The general format of a variable expansion is as follows: - - ${variable[:modifier[:...]]} - - Each modifier begins with a colon, which may be escaped with a backslash - (`\'). - - A set of modifiers can be specified via a variable, as follows: - - modifier_variable=modifier[:...] - ${variable:${modifier_variable}[:...]} - - In this case the first modifier in the modifier_variable does not start - with a colon, since that must appear in the referencing variable. If any - of the modifiers in the modifier_variable contain a dollar sign (`$'), - these must be doubled to avoid early expansion. - - The supported modifiers are: - - ::EE Replaces each word in the variable with its suffix. - - ::HH Replaces each word in the variable with everything but the last com- - ponent. - - ::MM_p_a_t_t_e_r_n - Select only those words that match _p_a_t_t_e_r_n. The standard shell - wildcard characters (`*', `?', and `[]') may be used. The wildcard - characters may be escaped with a backslash (`\'). - - ::NN_p_a_t_t_e_r_n - This is identical to `::MM', but selects all words which do not match - _p_a_t_t_e_r_n. - - ::OO Order every word in variable alphabetically. To sort words in - reverse order use the `::OO::[[--11....11]]' combination of modifiers. + A make command appeared in Version 7 AT&T UNIX. This make implementation + is based on Adam De Boor's pmake program which was written for Sprite at + Berkeley. It was designed to be a parallel distributed make running jobs + on different machines using a daemon called ``customs''. + +BBUUGGSS + The make syntax is difficult to parse without actually acting of the + data. For instance finding the end of a variable use should involve + scanning each the modifiers using the correct terminator for each field. + In many places make just counts {} and () in order to find the end of a + variable expansion. - ::OOxx Randomize words in variable. The results will be different each - time you are referring to the modified variable; use the assignment - with expansion (`::==') to prevent such behaviour. For example, - - LIST= uno due tre quattro - RANDOM_LIST= ${LIST:Ox} - STATIC_RANDOM_LIST:= ${LIST:Ox} - - all: - @echo "${RANDOM_LIST}" - @echo "${RANDOM_LIST}" - @echo "${STATIC_RANDOM_LIST}" - @echo "${STATIC_RANDOM_LIST}" - may produce output similar to: - - quattro due tre uno - tre due quattro uno - due uno quattro tre - due uno quattro tre - - ::QQ Quotes every shell meta-character in the variable, so that it can be - passed safely through recursive invocations of bbmmaakkee. - - ::RR Replaces each word in the variable with everything but its suffix. - - ::ggmmttiimmee - The value is a format string for strftime(3), using the current - gmtime(3). - - ::hhaasshh - Compute a 32bit hash of the value and encode it as hex digits. - - ::llooccaallttiimmee - The value is a format string for strftime(3), using the current - localtime(3). - - ::ttAA Attempt to convert variable to an absolute path using realpath(3), - if that fails, the value is unchanged. - - ::ttll Converts variable to lower-case letters. - - ::ttss_c - Words in the variable are normally separated by a space on expan- - sion. This modifier sets the separator to the character _c. If _c is - omitted, then no separator is used. The common escapes (including - octal numeric codes), work as expected. - - ::ttuu Converts variable to upper-case letters. - - ::ttWW Causes the value to be treated as a single word (possibly containing - embedded white space). See also `::[[**]]'. - - ::ttww Causes the value to be treated as a sequence of words delimited by - white space. See also `::[[@@]]'. - - ::SS/_o_l_d___s_t_r_i_n_g/_n_e_w___s_t_r_i_n_g/[11ggWW] - Modify the first occurrence of _o_l_d___s_t_r_i_n_g in the variable's value, - replacing it with _n_e_w___s_t_r_i_n_g. If a `g' is appended to the last - slash of the pattern, all occurrences in each word are replaced. If - a `1' is appended to the last slash of the pattern, only the first - word is affected. If a `W' is appended to the last slash of the - pattern, then the value is treated as a single word (possibly con- - taining embedded white space). If _o_l_d___s_t_r_i_n_g begins with a caret - (`^'), _o_l_d___s_t_r_i_n_g is anchored at the beginning of each word. If - _o_l_d___s_t_r_i_n_g ends with a dollar sign (`$'), it is anchored at the end - of each word. Inside _n_e_w___s_t_r_i_n_g, an ampersand (`&') is replaced by - _o_l_d___s_t_r_i_n_g (without any `^' or `$'). Any character may be used as a - delimiter for the parts of the modifier string. The anchoring, - ampersand and delimiter characters may be escaped with a backslash - (`\'). - - Variable expansion occurs in the normal fashion inside both - _o_l_d___s_t_r_i_n_g and _n_e_w___s_t_r_i_n_g with the single exception that a backslash - is used to prevent the expansion of a dollar sign (`$'), not a pre- - ceding dollar sign as is usual. - - ::CC/_p_a_t_t_e_r_n/_r_e_p_l_a_c_e_m_e_n_t/[11ggWW] - The ::CC modifier is just like the ::SS modifier except that the old and - new strings, instead of being simple strings, are a regular expres- - sion (see regex(3)) string _p_a_t_t_e_r_n and an ed(1)-style string - _r_e_p_l_a_c_e_m_e_n_t. Normally, the first occurrence of the pattern _p_a_t_t_e_r_n - in each word of the value is substituted with _r_e_p_l_a_c_e_m_e_n_t. The `1' - modifier causes the substitution to apply to at most one word; the - `g' modifier causes the substitution to apply to as many instances - of the search pattern _p_a_t_t_e_r_n as occur in the word or words it is - found in; the `W' modifier causes the value to be treated as a sin- - gle word (possibly containing embedded white space). Note that `1' - and `g' are orthogonal; the former specifies whether multiple words - are potentially affected, the latter whether multiple substitutions - can potentially occur within each affected word. - - ::TT Replaces each word in the variable with its last component. - - ::uu Remove adjacent duplicate words (like uniq(1)). - - ::??_t_r_u_e___s_t_r_i_n_g::_f_a_l_s_e___s_t_r_i_n_g - If the variable name (not its value), when parsed as a .if condi- - tional expression, evaluates to true, return as its value the - _t_r_u_e___s_t_r_i_n_g, otherwise return the _f_a_l_s_e___s_t_r_i_n_g. Since the variable - name is used as the expression, :? must be the first modifier after - the variable name itself - which will, of course, usually contain - variable expansions. A common error is trying to use expressions - like - ${NUMBERS:M42:?match:no} - which actually tests defined(NUMBERS), to determine is any words - match "42" you need to use something like: - ${"${NUMBERS:M42}" != "":?match:no}. - - _:_o_l_d___s_t_r_i_n_g_=_n_e_w___s_t_r_i_n_g - This is the AT&T System V UNIX style variable substitution. It must - be the last modifier specified. If _o_l_d___s_t_r_i_n_g or _n_e_w___s_t_r_i_n_g do not - contain the pattern matching character _% then it is assumed that - they are anchored at the end of each word, so only suffixes or - entire words may be replaced. Otherwise _% is the substring of - _o_l_d___s_t_r_i_n_g to be replaced in _n_e_w___s_t_r_i_n_g. - - Variable expansion occurs in the normal fashion inside both - _o_l_d___s_t_r_i_n_g and _n_e_w___s_t_r_i_n_g with the single exception that a backslash - is used to prevent the expansion of a dollar sign (`$'), not a pre- - ceding dollar sign as is usual. - - ::@@_t_e_m_p@@_s_t_r_i_n_g@@ - This is the loop expansion mechanism from the OSF Development Envi- - ronment (ODE) make. Unlike ..ffoorr loops expansion occurs at the time - of reference. Assign _t_e_m_p to each word in the variable and evaluate - _s_t_r_i_n_g. The ODE convention is that _t_e_m_p should start and end with a - period. For example. - ${LINKS:@.LINK.@${LN} ${TARGET} ${.LINK.}@} - - However a single character varaiable is often more readable: - ${MAKE_PRINT_VAR_ON_ERROR:@v@$v='${$v}'${.newline}@} - - ::UU_n_e_w_v_a_l - If the variable is undefined _n_e_w_v_a_l is the value. If the variable - is defined, the existing value is returned. This is another ODE - make feature. It is handy for setting per-target CFLAGS for - instance: - ${_${.TARGET:T}_CFLAGS:U${DEF_CFLAGS}} - If a value is only required if the variable is undefined, use: - ${VAR:D:Unewval} - - ::DD_n_e_w_v_a_l - If the variable is defined _n_e_w_v_a_l is the value. - - ::LL The name of the variable is the value. - - ::PP The path of the node which has the same name as the variable is the - value. If no such node exists or its path is null, then the name of - the variable is used. In order for this modifier to work, the name - (node) must at least have appeared on the rhs of a dependency. - - ::!!_c_m_d!! - The output of running _c_m_d is the value. - - ::sshh If the variable is non-empty it is run as a command and the output - becomes the new value. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 20:34: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 6D37F4EB; Thu, 25 Oct 2012 20:34:45 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3BA8D8FC0A; Thu, 25 Oct 2012 20:34: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 q9PKYjl7040041; Thu, 25 Oct 2012 20:34:45 GMT (envelope-from sjg@svn.freebsd.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9PKYjC5040040; Thu, 25 Oct 2012 20:34:45 GMT (envelope-from sjg@svn.freebsd.org) Message-Id: <201210252034.q9PKYjC5040040@svn.freebsd.org> From: "Simon J. Gerraty" Date: Thu, 25 Oct 2012 20:34:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r242094 - vendor/NetBSD/bmake/20121010 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 20:34:45 -0000 Author: sjg Date: Thu Oct 25 20:34:44 2012 New Revision: 242094 URL: http://svn.freebsd.org/changeset/base/242094 Log: Tag bmake/20121010 Approved by: marcel (mentor) Added: vendor/NetBSD/bmake/20121010/ - copied from r242093, vendor/NetBSD/bmake/dist/ From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 20:45: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 2A55F9DF; Thu, 25 Oct 2012 20:45:58 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 121B68FC0A; Thu, 25 Oct 2012 20:45: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 q9PKjve3042040; Thu, 25 Oct 2012 20:45:57 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9PKjvGB042036; Thu, 25 Oct 2012 20:45:57 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <201210252045.q9PKjvGB042036@svn.freebsd.org> From: Nick Hibma Date: Thu, 25 Oct 2012 20:45:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242095 - stable/9/usr.sbin/ppp X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 20:45:58 -0000 Author: n_hibma Date: Thu Oct 25 20:45:57 2012 New Revision: 242095 URL: http://svn.freebsd.org/changeset/base/242095 Log: MFC 241496: Some 3G modems return the wrong signature in echo packets and make it impossible to use LQR/ECHO. They return want_magic instead. With this change it is now possible to use enable lqr set lqrperiod 5 enable echo set echoperiod 5 in your ppp.conf file. Modified: stable/9/usr.sbin/ppp/lqr.c Directory Properties: stable/9/usr.sbin/ppp/ (props changed) Modified: stable/9/usr.sbin/ppp/lqr.c ============================================================================== --- stable/9/usr.sbin/ppp/lqr.c Thu Oct 25 20:34:44 2012 (r242094) +++ stable/9/usr.sbin/ppp/lqr.c Thu Oct 25 20:45:57 2012 (r242095) @@ -108,7 +108,8 @@ lqr_RecvEcho(struct fsm *fp, struct mbuf * die as a result. */ } - if (lqr.signature == SIGNATURE) { + if (lqr.signature == SIGNATURE + || lqr.signature == lcp->want_magic) { /* some implementations return the wrong magic */ /* careful not to update lqm.echo.seq_recv with older values */ if ((hdlc->lqm.echo.seq_recv > (u_int32_t)0 - 5 && lqr.sequence < 5) || (hdlc->lqm.echo.seq_recv <= (u_int32_t)0 - 5 && From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 21:04: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 3D2782C3; Thu, 25 Oct 2012 21:04:12 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 22ECE8FC19; Thu, 25 Oct 2012 21:04: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 q9PL4BFh045470; Thu, 25 Oct 2012 21:04:11 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9PL4BvW045467; Thu, 25 Oct 2012 21:04:11 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201210252104.q9PL4BvW045467@svn.freebsd.org> From: Devin Teske Date: Thu, 25 Oct 2012 21:04:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242096 - in head/usr.sbin/bsdconfig: . security X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 21:04:12 -0000 Author: dteske Date: Thu Oct 25 21:04:11 2012 New Revision: 242096 URL: http://svn.freebsd.org/changeset/base/242096 Log: When Xdialog(1) is passed a NULL argument to its `--help' option, Xdialog(1) acts like dialog(1) in that it returns exit status 2 when the help button is chosen. Approved by: adri (co-mentor) (implicit) Modified: head/usr.sbin/bsdconfig/bsdconfig head/usr.sbin/bsdconfig/security/kern_securelevel Modified: head/usr.sbin/bsdconfig/bsdconfig ============================================================================== --- head/usr.sbin/bsdconfig/bsdconfig Thu Oct 25 20:45:57 2012 (r242095) +++ head/usr.sbin/bsdconfig/bsdconfig Thu Oct 25 21:04:11 2012 (r242096) @@ -189,7 +189,7 @@ dialog_menu_main() --ok-label \"\$msg_ok\" \ --cancel-label \"\$msg_exit_bsdconfig\" \ --help-button \ - ${USE_XDIALOG:+--help \"\$( f_include_help BSDCONFIG )\"} \ + ${USE_XDIALOG:+--help \"\"} \ --menu \"\$prompt\" $size $menu_list \ 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD ) Modified: head/usr.sbin/bsdconfig/security/kern_securelevel ============================================================================== --- head/usr.sbin/bsdconfig/security/kern_securelevel Thu Oct 25 20:45:57 2012 (r242095) +++ head/usr.sbin/bsdconfig/security/kern_securelevel Thu Oct 25 21:04:11 2012 (r242096) @@ -76,7 +76,7 @@ dialog_menu_main() --ok-label \"\$msg_ok\" \ --cancel-label \"\$msg_cancel\" \ --help-button \ - ${USE_XDIALOG:+--help \"\$( f_include_help SECURELEVEL )\"} \ + ${USE_XDIALOG:+--help \"\"} \ --menu \"\$prompt\" $size \ $menu_list \ 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 21:08: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 790705FA; Thu, 25 Oct 2012 21:08:03 +0000 (UTC) (envelope-from davide@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 475AB8FC16; Thu, 25 Oct 2012 21: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 q9PL83EI046325; Thu, 25 Oct 2012 21:08:03 GMT (envelope-from davide@svn.freebsd.org) Received: (from davide@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9PL83sp046322; Thu, 25 Oct 2012 21:08:03 GMT (envelope-from davide@svn.freebsd.org) Message-Id: <201210252108.q9PL83sp046322@svn.freebsd.org> From: Davide Italiano Date: Thu, 25 Oct 2012 21:08:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242097 - head/sys/fs/smbfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 21:08:03 -0000 Author: davide Date: Thu Oct 25 21:08:02 2012 New Revision: 242097 URL: http://svn.freebsd.org/changeset/base/242097 Log: Fix build in case we have SMBVDEBUG turned on. Reviewed by: gnn Approved by: gnn Sponsored by: iXsystems inc. Modified: head/sys/fs/smbfs/smbfs_io.c head/sys/fs/smbfs/smbfs_vnops.c Modified: head/sys/fs/smbfs/smbfs_io.c ============================================================================== --- head/sys/fs/smbfs/smbfs_io.c Thu Oct 25 21:04:11 2012 (r242096) +++ head/sys/fs/smbfs/smbfs_io.c Thu Oct 25 21:08:02 2012 (r242097) @@ -241,7 +241,7 @@ smbfs_writevnode(struct vnode *vp, struc SMBERROR("vn types other than VREG unsupported !\n"); return EIO; } - SMBVDEBUG("ofs=%d,resid=%d\n",(int)uiop->uio_offset, uiop->uio_resid); + SMBVDEBUG("ofs=%d,resid=%zd\n",(int)uiop->uio_offset, uiop->uio_resid); if (uiop->uio_offset < 0) return EINVAL; /* if (uiop->uio_offset + uiop->uio_resid > smp->nm_maxfilesize) @@ -274,7 +274,7 @@ smbfs_writevnode(struct vnode *vp, struc smb_makescred(&scred, td, cred); error = smb_write(smp->sm_share, np->n_fid, uiop, &scred); - SMBVDEBUG("after: ofs=%d,resid=%d\n",(int)uiop->uio_offset, uiop->uio_resid); + SMBVDEBUG("after: ofs=%d,resid=%zd\n",(int)uiop->uio_offset, uiop->uio_resid); if (!error) { if (uiop->uio_offset > np->n_size) { np->n_size = uiop->uio_offset; @@ -601,7 +601,7 @@ smbfs_putpages(ap) uio.uio_segflg = UIO_SYSSPACE; uio.uio_rw = UIO_WRITE; uio.uio_td = td; - SMBVDEBUG("ofs=%d,resid=%d\n",(int)uio.uio_offset, uio.uio_resid); + SMBVDEBUG("ofs=%d,resid=%zd\n",(int)uio.uio_offset, uio.uio_resid); smb_makescred(&scred, td, cred); error = smb_write(smp->sm_share, np->n_fid, &uio, &scred); Modified: head/sys/fs/smbfs/smbfs_vnops.c ============================================================================== --- head/sys/fs/smbfs/smbfs_vnops.c Thu Oct 25 21:04:11 2012 (r242096) +++ head/sys/fs/smbfs/smbfs_vnops.c Thu Oct 25 21:08:02 2012 (r242097) @@ -452,7 +452,8 @@ smbfs_write(ap) struct vnode *vp = ap->a_vp; struct uio *uio = ap->a_uio; - SMBVDEBUG("%d,ofs=%d,sz=%d\n",vp->v_type, (int)uio->uio_offset, uio->uio_resid); + SMBVDEBUG("%d,ofs=%d,sz=%zd\n",vp->v_type, (int)uio->uio_offset, + uio->uio_resid); if (vp->v_type != VREG) return (EPERM); return smbfs_writevnode(vp, uio, ap->a_cred,ap->a_ioflag); From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 21:08: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 23A7072B; Thu, 25 Oct 2012 21:08:32 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B5C68FC0A; Thu, 25 Oct 2012 21:08: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 q9PL8VOG046420; Thu, 25 Oct 2012 21:08:31 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9PL8VJx046418; Thu, 25 Oct 2012 21:08:31 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <201210252108.q9PL8VJx046418@svn.freebsd.org> From: Nick Hibma Date: Thu, 25 Oct 2012 21:08:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242098 - stable/8/usr.sbin/ppp X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 21:08:32 -0000 Author: n_hibma Date: Thu Oct 25 21:08:31 2012 New Revision: 242098 URL: http://svn.freebsd.org/changeset/base/242098 Log: MFC 241496: Some 3G modems return the wrong signature in echo packets and make it impossible to use LQR/ECHO. They return want_magic instead. With this change it is now possible to use enable lqr set lqrperiod 5 enable echo set echoperiod 5 in your ppp.conf file. Modified: stable/8/usr.sbin/ppp/lqr.c Directory Properties: stable/8/usr.sbin/ppp/ (props changed) Modified: stable/8/usr.sbin/ppp/lqr.c ============================================================================== --- stable/8/usr.sbin/ppp/lqr.c Thu Oct 25 21:08:02 2012 (r242097) +++ stable/8/usr.sbin/ppp/lqr.c Thu Oct 25 21:08:31 2012 (r242098) @@ -108,7 +108,8 @@ lqr_RecvEcho(struct fsm *fp, struct mbuf * die as a result. */ } - if (lqr.signature == SIGNATURE) { + if (lqr.signature == SIGNATURE + || lqr.signature == lcp->want_magic) { /* some implementations return the wrong magic */ /* careful not to update lqm.echo.seq_recv with older values */ if ((hdlc->lqm.echo.seq_recv > (u_int32_t)0 - 5 && lqr.sequence < 5) || (hdlc->lqm.echo.seq_recv <= (u_int32_t)0 - 5 && From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 21:09: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 766BE913; Thu, 25 Oct 2012 21:09:44 +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 5DC518FC0A; Thu, 25 Oct 2012 21:09: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 q9PL9iqL046653; Thu, 25 Oct 2012 21:09:44 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9PL9iY9046651; Thu, 25 Oct 2012 21:09:44 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201210252109.q9PL9iY9046651@svn.freebsd.org> From: "George V. Neville-Neil" Date: Thu, 25 Oct 2012 21:09:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r242099 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 21:09:44 -0000 Author: gnn Date: Thu Oct 25 21:09:42 2012 New Revision: 242099 URL: http://svn.freebsd.org/changeset/base/242099 Log: Clean up the fact that davide was never added to the mentoring list. Modified: svnadmin/conf/mentors Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Thu Oct 25 21:08:31 2012 (r242098) +++ svnadmin/conf/mentors Thu Oct 25 21:09:42 2012 (r242099) @@ -15,6 +15,7 @@ art avg Co-mentor: marcel benl philip Co-mentor: simon bgray cognet davidcs gnn +davide gnn Co-mentor: alc eadler cperciva eri mlaier Co-mentor: thompsa erwin delphij From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 21:22: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 DF49CF3A; Thu, 25 Oct 2012 21:22:05 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C54358FC14; Thu, 25 Oct 2012 21:22:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9PLM5CJ048930; Thu, 25 Oct 2012 21:22:05 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9PLM5O4048928; Thu, 25 Oct 2012 21:22:05 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <201210252122.q9PLM5O4048928@svn.freebsd.org> From: Nick Hibma Date: Thu, 25 Oct 2012 21:22:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242100 - stable/9/sys/dev/usb/serial X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 21:22:06 -0000 Author: n_hibma Date: Thu Oct 25 21:22:05 2012 New Revision: 242100 URL: http://svn.freebsd.org/changeset/base/242100 Log: MFC 241555: Implement modem control in u3g. Tested on Option GTM382W, Huawei E220, and Sierra Wireless MC8790V. Also implement the .ucom_poll method. Note: It resolves ppp hanging during the PPp> phase. Modified: stable/9/sys/dev/usb/serial/u3g.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/9/sys/dev/usb/serial/u3g.c Thu Oct 25 21:09:42 2012 (r242099) +++ stable/9/sys/dev/usb/serial/u3g.c Thu Oct 25 21:22:05 2012 (r242100) @@ -53,6 +53,7 @@ #include #include #include +#include #include "usbdevs.h" #define USB_DEBUG_VAR u3g_debug @@ -99,6 +100,7 @@ SYSCTL_INT(_hw_usb_u3g, OID_AUTO, debug, enum { U3G_BULK_WR, U3G_BULK_RD, + U3G_INTR, U3G_N_TRANSFER, }; @@ -107,12 +109,15 @@ struct u3g_softc { struct ucom_softc sc_ucom[U3G_MAXPORTS]; struct usb_xfer *sc_xfer[U3G_MAXPORTS][U3G_N_TRANSFER]; + uint8_t sc_iface[U3G_MAXPORTS]; /* local status register */ + uint8_t sc_lsr[U3G_MAXPORTS]; /* local status register */ + uint8_t sc_msr[U3G_MAXPORTS]; /* u3g status register */ + uint16_t sc_line[U3G_MAXPORTS]; /* line status */ + struct usb_device *sc_udev; struct mtx sc_mtx; - uint8_t sc_lsr; /* local status register */ - uint8_t sc_msr; /* U3G status register */ - uint8_t sc_numports; + uint8_t sc_numports; }; static device_probe_t u3g_probe; @@ -122,12 +127,17 @@ static void u3g_free_softc(struct u3g_so static usb_callback_t u3g_write_callback; static usb_callback_t u3g_read_callback; +static usb_callback_t u3g_intr_callback; -static void u3g_free(struct ucom_softc *ucom); +static void u3g_cfg_get_status(struct ucom_softc *, uint8_t *, uint8_t *); +static void u3g_cfg_set_dtr(struct ucom_softc *, uint8_t); +static void u3g_cfg_set_rts(struct ucom_softc *, uint8_t); static void u3g_start_read(struct ucom_softc *ucom); static void u3g_stop_read(struct ucom_softc *ucom); static void u3g_start_write(struct ucom_softc *ucom); static void u3g_stop_write(struct ucom_softc *ucom); +static void u3g_poll(struct ucom_softc *ucom); +static void u3g_free(struct ucom_softc *ucom); static void u3g_test_autoinst(void *, struct usb_device *, @@ -155,13 +165,26 @@ static const struct usb_config u3g_confi .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, .callback = &u3g_read_callback, }, + + [U3G_INTR] = { + .type = UE_INTERRUPT, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_IN, + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,.no_pipe_ok = 1,}, + .bufsize = 0, /* use wMaxPacketSize */ + .callback = &u3g_intr_callback, + }, }; static const struct ucom_callback u3g_callback = { + .ucom_cfg_get_status = &u3g_cfg_get_status, + .ucom_cfg_set_dtr = &u3g_cfg_set_dtr, + .ucom_cfg_set_rts = &u3g_cfg_set_rts, .ucom_start_read = &u3g_start_read, .ucom_stop_read = &u3g_stop_read, .ucom_start_write = &u3g_start_write, .ucom_stop_write = &u3g_stop_write, + .ucom_poll = &u3g_poll, .ucom_free = &u3g_free, }; @@ -849,6 +872,15 @@ u3g_attach(device_t dev) continue; } + iface = usbd_get_iface(uaa->device, i); + id = usbd_get_interface_descriptor(iface); + sc->sc_iface[nports] = id->bInterfaceNumber; + + if (bootverbose && sc->sc_xfer[nports][U3G_INTR]) { + device_printf(dev, "port %d supports modem control", + nports); + } + /* set stall by default */ mtx_lock(&sc->sc_mtx); usbd_xfer_set_stall(sc->sc_xfer[nports][U3G_BULK_WR]); @@ -926,6 +958,9 @@ u3g_start_read(struct ucom_softc *ucom) { struct u3g_softc *sc = ucom->sc_parent; + /* start interrupt endpoint (if configured) */ + usbd_transfer_start(sc->sc_xfer[ucom->sc_subunit][U3G_INTR]); + /* start read endpoint */ usbd_transfer_start(sc->sc_xfer[ucom->sc_subunit][U3G_BULK_RD]); } @@ -935,6 +970,9 @@ u3g_stop_read(struct ucom_softc *ucom) { struct u3g_softc *sc = ucom->sc_parent; + /* stop interrupt endpoint (if configured) */ + usbd_transfer_stop(sc->sc_xfer[ucom->sc_subunit][U3G_INTR]); + /* stop read endpoint */ usbd_transfer_stop(sc->sc_xfer[ucom->sc_subunit][U3G_BULK_RD]); } @@ -1012,3 +1050,134 @@ tr_setup: break; } } + +static void +u3g_cfg_get_status(struct ucom_softc *ucom, uint8_t *lsr, uint8_t *msr) +{ + struct u3g_softc *sc = ucom->sc_parent; + + *lsr = sc->sc_lsr[ucom->sc_subunit]; + *msr = sc->sc_msr[ucom->sc_subunit]; +} + +static void +u3g_cfg_set_line(struct ucom_softc *ucom) +{ + struct u3g_softc *sc = ucom->sc_parent; + struct usb_device_request req; + + req.bmRequestType = UT_WRITE_CLASS_INTERFACE; + req.bRequest = UCDC_SET_CONTROL_LINE_STATE; + USETW(req.wValue, sc->sc_line[ucom->sc_subunit]); + req.wIndex[0] = sc->sc_iface[ucom->sc_subunit]; + req.wIndex[1] = 0; + USETW(req.wLength, 0); + + ucom_cfg_do_request(sc->sc_udev, ucom, + &req, NULL, 0, 1000); +} + +static void +u3g_cfg_set_dtr(struct ucom_softc *ucom, uint8_t onoff) +{ + struct u3g_softc *sc = ucom->sc_parent; + + DPRINTF("onoff = %d\n", onoff); + + if (onoff) + sc->sc_line[ucom->sc_subunit] |= UCDC_LINE_DTR; + else + sc->sc_line[ucom->sc_subunit] &= ~UCDC_LINE_DTR; + + u3g_cfg_set_line(ucom); +} + +static void +u3g_cfg_set_rts(struct ucom_softc *ucom, uint8_t onoff) +{ + struct u3g_softc *sc = ucom->sc_parent; + + DPRINTF("onoff = %d\n", onoff); + + if (onoff) + sc->sc_line[ucom->sc_subunit] |= UCDC_LINE_RTS; + else + sc->sc_line[ucom->sc_subunit] &= ~UCDC_LINE_RTS; + + u3g_cfg_set_line(ucom); +} + +static void +u3g_intr_callback(struct usb_xfer *xfer, usb_error_t error) +{ + struct ucom_softc *ucom = usbd_xfer_softc(xfer); + struct u3g_softc *sc = ucom->sc_parent; + struct usb_page_cache *pc; + struct usb_cdc_notification pkt; + int actlen; + uint16_t wLen; + uint8_t mstatus; + + usbd_xfer_status(xfer, &actlen, NULL, NULL, NULL); + + switch (USB_GET_STATE(xfer)) { + case USB_ST_TRANSFERRED: + if (actlen < 8) { /* usb_cdc_notification with 2 data bytes */ + DPRINTF("message too short (expected 8, received %d)\n", actlen); + goto tr_setup; + } + pc = usbd_xfer_get_frame(xfer, 0); + usbd_copy_out(pc, 0, &pkt, actlen); + + wLen = UGETW(pkt.wLength); + if (wLen < 2) { + DPRINTF("message too short (expected 2 data bytes, received %d)\n", wLen); + goto tr_setup; + } + + if (pkt.bmRequestType == UCDC_NOTIFICATION + && pkt.bNotification == UCDC_N_SERIAL_STATE) { + /* + * Set the serial state in ucom driver based on + * the bits from the notify message + */ + DPRINTF("notify bytes = 0x%02x, 0x%02x\n", + pkt.data[0], pkt.data[1]); + + /* currently, lsr is always zero. */ + sc->sc_lsr[ucom->sc_subunit] = 0; + sc->sc_msr[ucom->sc_subunit] = 0; + + mstatus = pkt.data[0]; + + if (mstatus & UCDC_N_SERIAL_RI) + sc->sc_msr[ucom->sc_subunit] |= SER_RI; + if (mstatus & UCDC_N_SERIAL_DSR) + sc->sc_msr[ucom->sc_subunit] |= SER_DSR; + if (mstatus & UCDC_N_SERIAL_DCD) + sc->sc_msr[ucom->sc_subunit] |= SER_DCD; + ucom_status_change(ucom); + } + + case USB_ST_SETUP: +tr_setup: + usbd_xfer_set_frame_len(xfer, 0, usbd_xfer_max_len(xfer)); + usbd_transfer_submit(xfer); + return; + + default: /* Error */ + if (error != USB_ERR_CANCELLED) { + /* try to clear stall first */ + usbd_xfer_set_stall(xfer); + goto tr_setup; + } + return; + } +} + +static void +u3g_poll(struct ucom_softc *ucom) +{ + struct u3g_softc *sc = ucom->sc_parent; + usbd_transfer_poll(sc->sc_xfer[ucom->sc_subunit], U3G_N_TRANSFER); +} From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 22:54: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 8E439C13; Thu, 25 Oct 2012 22:54:30 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 757EA8FC12; Thu, 25 Oct 2012 22:54: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 q9PMsUhS065340; Thu, 25 Oct 2012 22:54:30 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9PMsUFK065335; Thu, 25 Oct 2012 22:54:30 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <201210252254.q9PMsUFK065335@svn.freebsd.org> From: Maxim Sobolev Date: Thu, 25 Oct 2012 22:54:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242101 - in head/usr.sbin/cron: cron crontab lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 22:54:30 -0000 Author: sobomax Date: Thu Oct 25 22:54:29 2012 New Revision: 242101 URL: http://svn.freebsd.org/changeset/base/242101 Log: Second attempt to add @every_second keyword support. Due to multiple requests, default to the previous 60-seconds scheduling method unless there is any @every_second entries to conserve CPU cycles and power. This change also improves scheduling in the default mode by running as close to the beginning of the minnute as possible by replacing sleep(3) with nanosleep(2). Previously, the tasks would run anywhere within the first second of the minute and that offset drifted back and forth each time cron(8) was engaged. MFC after: 1 month Modified: head/usr.sbin/cron/cron/cron.c head/usr.sbin/cron/cron/cron.h head/usr.sbin/cron/crontab/crontab.5 head/usr.sbin/cron/lib/entry.c Modified: head/usr.sbin/cron/cron/cron.c ============================================================================== --- head/usr.sbin/cron/cron/cron.c Thu Oct 25 21:22:05 2012 (r242100) +++ head/usr.sbin/cron/cron/cron.c Thu Oct 25 22:54:29 2012 (r242101) @@ -35,9 +35,9 @@ static const char rcsid[] = static void usage(void), run_reboot_jobs(cron_db *), - cron_tick(cron_db *), - cron_sync(void), - cron_sleep(cron_db *), + cron_tick(cron_db *, int), + cron_sync(int), + cron_sleep(cron_db *, int), cron_clean(cron_db *), #ifdef USE_SIGCHLD sigchld_handler(int), @@ -45,6 +45,8 @@ static void usage(void), sighup_handler(int), parse_args(int c, char *v[]); +static int run_at_secres(cron_db *); + static time_t last_time = 0; static int dst_enabled = 0; struct pidfh *pfh; @@ -98,6 +100,9 @@ main(argc, argv) char *argv[]; { cron_db database; + int runnum; + int secres1, secres2; + struct tm *tm; ProgramName = argv[0]; @@ -147,23 +152,47 @@ main(argc, argv) database.tail = NULL; database.mtime = (time_t) 0; load_database(&database); + secres1 = secres2 = run_at_secres(&database); run_reboot_jobs(&database); - cron_sync(); + cron_sync(secres1); + runnum = 0; while (TRUE) { # if DEBUGGING /* if (!(DebugFlags & DTEST)) */ # endif /*DEBUGGING*/ - cron_sleep(&database); + cron_sleep(&database, secres1); - load_database(&database); + if (secres1 == 0 || runnum % 60 == 0) { + load_database(&database); + secres2 = run_at_secres(&database); + if (secres2 != secres1) { + secres1 = secres2; + if (secres1 != 0) { + runnum = 0; + } else { + /* + * Going from 1 sec to 60 sec res. If we + * are already at minute's boundary, so + * let it run, otherwise schedule for the + * next minute. + */ + tm = localtime(&TargetTime); + if (tm->tm_sec > 0) { + cron_sync(secres2); + continue; + } + } + } + } /* do this iteration */ - cron_tick(&database); + cron_tick(&database, secres1); - /* sleep 1 minute + /* sleep 1 or 60 seconds */ - TargetTime += 60; + TargetTime += (secres1 != 0) ? 1 : 60; + runnum += 1; } } @@ -187,29 +216,29 @@ run_reboot_jobs(db) static void -cron_tick(db) - cron_db *db; +cron_tick(cron_db *db, int secres) { static struct tm lasttm; static time_t diff = 0, /* time difference in seconds from the last offset change */ difflimit = 0; /* end point for the time zone correction */ struct tm otztm; /* time in the old time zone */ - int otzminute, otzhour, otzdom, otzmonth, otzdow; + int otzsecond, otzminute, otzhour, otzdom, otzmonth, otzdow; register struct tm *tm = localtime(&TargetTime); - register int minute, hour, dom, month, dow; + register int second, minute, hour, dom, month, dow; register user *u; register entry *e; /* make 0-based values out of these so we can use them as indicies */ + second = (secres == 0) ? 0 : tm->tm_sec -FIRST_SECOND; minute = tm->tm_min -FIRST_MINUTE; hour = tm->tm_hour -FIRST_HOUR; dom = tm->tm_mday -FIRST_DOM; month = tm->tm_mon +1 /* 0..11 -> 1..12 */ -FIRST_MONTH; dow = tm->tm_wday -FIRST_DOW; - Debug(DSCH, ("[%d] tick(%d,%d,%d,%d,%d)\n", - getpid(), minute, hour, dom, month, dow)) + Debug(DSCH, ("[%d] tick(%d,%d,%d,%d,%d,%d)\n", + getpid(), second, minute, hour, dom, month, dow)) if (dst_enabled && last_time != 0 && TargetTime > last_time /* exclude stepping back */ @@ -262,6 +291,7 @@ cron_tick(db) /* make 0-based values out of these so we can use them as indicies */ + otzsecond = (secres == 0) ? 0 : otztm.tm_sec -FIRST_SECOND; otzminute = otztm.tm_min -FIRST_MINUTE; otzhour = otztm.tm_hour -FIRST_HOUR; otzdom = otztm.tm_mday -FIRST_DOM; @@ -283,7 +313,8 @@ cron_tick(db) e->uid, e->gid, e->cmd)) if ( diff != 0 && (e->flags & (RUN_AT|NOT_UNTIL)) ) { - if (bit_test(e->minute, otzminute) + if (bit_test(e->second, otzsecond) + && bit_test(e->minute, otzminute) && bit_test(e->hour, otzhour) && bit_test(e->month, otzmonth) && ( ((e->flags & DOM_STAR) || (e->flags & DOW_STAR)) @@ -302,7 +333,8 @@ cron_tick(db) continue; } - if (bit_test(e->minute, minute) + if (bit_test(e->second, second) + && bit_test(e->minute, minute) && bit_test(e->hour, hour) && bit_test(e->month, month) && ( ((e->flags & DOM_STAR) || (e->flags & DOW_STAR)) @@ -332,38 +364,74 @@ cron_tick(db) * that's something sysadmin's know to expect what with crashing computers.. */ static void -cron_sync() { - register struct tm *tm; +cron_sync(int secres) { + struct tm *tm; TargetTime = time((time_t*)0); - tm = localtime(&TargetTime); - TargetTime += (60 - tm->tm_sec); + if (secres != 0) { + TargetTime += 1; + } else { + tm = localtime(&TargetTime); + TargetTime += (60 - tm->tm_sec); + } } +static int +timespec_subtract(struct timespec *result, struct timespec *x, + struct timespec *y) +{ + time_t nsec; + + /* Perform the carry for the later subtraction by updating y. */ + if (x->tv_nsec < y->tv_nsec) { + nsec = (y->tv_nsec - x->tv_nsec) / 10000000 + 1; + y->tv_nsec -= 1000000000 * nsec; + y->tv_sec += nsec; + } + if (x->tv_nsec - y->tv_nsec > 1000000000) { + nsec = (x->tv_nsec - y->tv_nsec) / 1000000000; + y->tv_nsec += 1000000000 * nsec; + y->tv_sec -= nsec; + } + + /* tv_nsec is certainly positive. */ + result->tv_sec = x->tv_sec - y->tv_sec; + result->tv_nsec = x->tv_nsec - y->tv_nsec; + + /* Return True if result is negative. */ + return (x->tv_sec < y->tv_sec); +} static void -cron_sleep(db) - cron_db *db; +cron_sleep(cron_db *db, int secres) { - int seconds_to_wait = 0; + int seconds_to_wait; + int rval; + struct timespec ctime, ttime, stime, remtime; /* * Loop until we reach the top of the next minute, sleep when possible. */ for (;;) { - seconds_to_wait = (int) (TargetTime - time((time_t*)0)); + clock_gettime(CLOCK_REALTIME, &ctime); + ttime.tv_sec = TargetTime; + ttime.tv_nsec = 0; + timespec_subtract(&stime, &ttime, &ctime); /* * If the seconds_to_wait value is insane, jump the cron */ - if (seconds_to_wait < -600 || seconds_to_wait > 600) { + if (stime.tv_sec < -600 || stime.tv_sec > 600) { cron_clean(db); - cron_sync(); + cron_sync(secres); continue; } + seconds_to_wait = (stime.tv_nsec > 0) ? stime.tv_sec + 1 : + stime.tv_sec; + Debug(DSCH, ("[%d] TargetTime=%ld, sec-to-wait=%d\n", getpid(), (long)TargetTime, seconds_to_wait)) @@ -372,13 +440,19 @@ cron_sleep(db) * to run, break */ - if (seconds_to_wait <= 0) + if (stime.tv_sec < 0) break; if (job_runqueue() == 0) { Debug(DSCH, ("[%d] sleeping for %d seconds\n", getpid(), seconds_to_wait)) - sleep(seconds_to_wait); + for (;;) { + rval = nanosleep(&stime, &remtime); + if (rval == 0 || errno != EINTR) + break; + stime.tv_sec = remtime.tv_sec; + stime.tv_nsec = remtime.tv_nsec; + } } } } @@ -484,3 +558,17 @@ parse_args(argc, argv) } } +static int +run_at_secres(cron_db *db) +{ + user *u; + entry *e; + + for (u = db->head; u != NULL; u = u->next) { + for (e = u->crontab; e != NULL; e = e->next) { + if ((e->flags & SEC_RES) != 0) + return 1; + } + } + return 0; +} Modified: head/usr.sbin/cron/cron/cron.h ============================================================================== --- head/usr.sbin/cron/cron/cron.h Thu Oct 25 21:22:05 2012 (r242100) +++ head/usr.sbin/cron/cron/cron.h Thu Oct 25 22:54:29 2012 (r242101) @@ -124,6 +124,10 @@ LineNumber = ln; \ } +#define FIRST_SECOND 0 +#define LAST_SECOND 59 +#define SECOND_COUNT (LAST_SECOND - FIRST_SECOND + 1) + #define FIRST_MINUTE 0 #define LAST_MINUTE 59 #define MINUTE_COUNT (LAST_MINUTE - FIRST_MINUTE + 1) @@ -165,6 +169,7 @@ typedef struct _entry { #endif char **envp; char *cmd; + bitstr_t bit_decl(second, SECOND_COUNT); bitstr_t bit_decl(minute, MINUTE_COUNT); bitstr_t bit_decl(hour, HOUR_COUNT); bitstr_t bit_decl(dom, DOM_COUNT); @@ -176,6 +181,7 @@ typedef struct _entry { #define WHEN_REBOOT 0x04 #define RUN_AT 0x08 #define NOT_UNTIL 0x10 +#define SEC_RES 0x20 time_t lastrun; } entry; Modified: head/usr.sbin/cron/crontab/crontab.5 ============================================================================== --- head/usr.sbin/cron/crontab/crontab.5 Thu Oct 25 21:22:05 2012 (r242100) +++ head/usr.sbin/cron/crontab/crontab.5 Thu Oct 25 22:54:29 2012 (r242101) @@ -232,6 +232,8 @@ string meaning @daily Run once a day, "0 0 * * *". @midnight (same as @daily) @hourly Run once an hour, "0 * * * *". +@every_minute Run once a minute, "*/1 * * * *". +@every_second Run once a second. .Ed .Sh EXAMPLE CRON FILE .Bd -literal Modified: head/usr.sbin/cron/lib/entry.c ============================================================================== --- head/usr.sbin/cron/lib/entry.c Thu Oct 25 21:22:05 2012 (r242100) +++ head/usr.sbin/cron/lib/entry.c Thu Oct 25 22:54:29 2012 (r242101) @@ -151,6 +151,7 @@ load_entry(file, error_func, pw, envp) e->flags |= WHEN_REBOOT; } else if (!strcmp("yearly", cmd) || !strcmp("annually", cmd)){ Debug(DPARS, ("load_entry()...yearly shortcut\n")) + bit_set(e->second, 0); bit_set(e->minute, 0); bit_set(e->hour, 0); bit_set(e->dom, 0); @@ -159,6 +160,7 @@ load_entry(file, error_func, pw, envp) e->flags |= DOW_STAR; } else if (!strcmp("monthly", cmd)) { Debug(DPARS, ("load_entry()...monthly shortcut\n")) + bit_set(e->second, 0); bit_set(e->minute, 0); bit_set(e->hour, 0); bit_set(e->dom, 0); @@ -167,6 +169,7 @@ load_entry(file, error_func, pw, envp) e->flags |= DOW_STAR; } else if (!strcmp("weekly", cmd)) { Debug(DPARS, ("load_entry()...weekly shortcut\n")) + bit_set(e->second, 0); bit_set(e->minute, 0); bit_set(e->hour, 0); bit_nset(e->dom, 0, (LAST_DOM-FIRST_DOM+1)); @@ -175,6 +178,7 @@ load_entry(file, error_func, pw, envp) bit_set(e->dow, 0); } else if (!strcmp("daily", cmd) || !strcmp("midnight", cmd)) { Debug(DPARS, ("load_entry()...daily shortcut\n")) + bit_set(e->second, 0); bit_set(e->minute, 0); bit_set(e->hour, 0); bit_nset(e->dom, 0, (LAST_DOM-FIRST_DOM+1)); @@ -182,11 +186,29 @@ load_entry(file, error_func, pw, envp) bit_nset(e->dow, 0, (LAST_DOW-FIRST_DOW+1)); } else if (!strcmp("hourly", cmd)) { Debug(DPARS, ("load_entry()...hourly shortcut\n")) + bit_set(e->second, 0); bit_set(e->minute, 0); bit_nset(e->hour, 0, (LAST_HOUR-FIRST_HOUR+1)); bit_nset(e->dom, 0, (LAST_DOM-FIRST_DOM+1)); bit_nset(e->month, 0, (LAST_MONTH-FIRST_MONTH+1)); bit_nset(e->dow, 0, (LAST_DOW-FIRST_DOW+1)); + } else if (!strcmp("every_minute", cmd)) { + Debug(DPARS, ("load_entry()...every_minute shortcut\n")) + bit_set(e->second, 0); + bit_nset(e->minute, 0, (LAST_MINUTE-FIRST_MINUTE+1)); + bit_nset(e->hour, 0, (LAST_HOUR-FIRST_HOUR+1)); + bit_nset(e->dom, 0, (LAST_DOM-FIRST_DOM+1)); + bit_nset(e->month, 0, (LAST_MONTH-FIRST_MONTH+1)); + bit_nset(e->dow, 0, (LAST_DOW-FIRST_DOW+1)); + } else if (!strcmp("every_second", cmd)) { + Debug(DPARS, ("load_entry()...every_second shortcut\n")) + e->flags |= SEC_RES; + bit_nset(e->second, 0, (LAST_SECOND-FIRST_SECOND+1)); + bit_nset(e->minute, 0, (LAST_MINUTE-FIRST_MINUTE+1)); + bit_nset(e->hour, 0, (LAST_HOUR-FIRST_HOUR+1)); + bit_nset(e->dom, 0, (LAST_DOM-FIRST_DOM+1)); + bit_nset(e->month, 0, (LAST_MONTH-FIRST_MONTH+1)); + bit_nset(e->dow, 0, (LAST_DOW-FIRST_DOW+1)); } else { ecode = e_timespec; goto eof; @@ -201,6 +223,7 @@ load_entry(file, error_func, pw, envp) } } else { Debug(DPARS, ("load_entry()...about to parse numerics\n")) + bit_set(e->second, 0); ch = get_list(e->minute, FIRST_MINUTE, LAST_MINUTE, PPC_NULL, ch, file); From owner-svn-src-all@FreeBSD.ORG Thu Oct 25 23:18: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 5C337419; Thu, 25 Oct 2012 23:18:06 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 42B428FC12; Thu, 25 Oct 2012 23:18: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 q9PNI6NX069467; Thu, 25 Oct 2012 23:18:06 GMT (envelope-from sjg@svn.freebsd.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9PNI6IQ069461; Thu, 25 Oct 2012 23:18:06 GMT (envelope-from sjg@svn.freebsd.org) Message-Id: <201210252318.q9PNI6IQ069461@svn.freebsd.org> From: "Simon J. Gerraty" Date: Thu, 25 Oct 2012 23:18:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242102 - in head: contrib/bmake usr.bin/bmake X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 25 Oct 2012 23:18:06 -0000 Author: sjg Date: Thu Oct 25 23:18:05 2012 New Revision: 242102 URL: http://svn.freebsd.org/changeset/base/242102 Log: Merge bmake-20121010 Approved by: marcel (mentor) Modified: head/contrib/bmake/ChangeLog head/contrib/bmake/Makefile.in head/contrib/bmake/bmake.1 head/contrib/bmake/bmake.cat1 head/contrib/bmake/bsd.after-import.mk head/contrib/bmake/compat.c head/contrib/bmake/make.1 head/usr.bin/bmake/Makefile Directory Properties: head/contrib/bmake/ (props changed) Modified: head/contrib/bmake/ChangeLog ============================================================================== --- head/contrib/bmake/ChangeLog Thu Oct 25 22:54:29 2012 (r242101) +++ head/contrib/bmake/ChangeLog Thu Oct 25 23:18:05 2012 (r242102) @@ -1,3 +1,27 @@ +2012-10-10 Simon J. Gerraty + + * Makefile.in (MAKE_VERSION): 20121010 + o protect syntax that only bmake parses correctly. + o remove auto setting of FORCE_MACHINE, use configure's + --with-force-machine=whatever if that is desired. + +2012-10-08 Simon J. Gerraty + + * Makefile.in: do not lose history from make.1 when generating bmake.1 + +2012-10-07 Simon J. Gerraty + + * Makefile.in (MAKE_VERSION): 20121007 + Merge with NetBSD make, pick up + o compat.c: ignore empty commands - same as jobs mode. + o make.1: document meta chars that cause use of shell + +2012-09-11 Simon J. Gerraty + + * Makefile.in (MAKE_VERSION): bump version to 20120911 + * bsd.after-import.mk: include Makefile.inc early and allow it to + override PROG + 2012-08-31 Simon J. Gerraty * Makefile.in (MAKE_VERSION): bump version to 20120831 Modified: head/contrib/bmake/Makefile.in ============================================================================== --- head/contrib/bmake/Makefile.in Thu Oct 25 22:54:29 2012 (r242101) +++ head/contrib/bmake/Makefile.in Thu Oct 25 23:18:05 2012 (r242102) @@ -1,7 +1,7 @@ # $NetBSD: Makefile,v 1.56 2012/05/30 21:54:23 sjg Exp $ # @(#)Makefile 5.2 (Berkeley) 12/28/90 -# $Id: Makefile.in,v 1.170 2012/08/31 06:46:22 sjg Exp $ +# $Id: Makefile.in,v 1.174 2012/10/10 18:46:24 sjg Exp $ PROG= bmake SRCS= arch.c buf.c compat.c cond.c dir.c for.c hash.c job.c main.c \ @@ -21,7 +21,7 @@ srcdir= @srcdir@ CC?= @CC@ # Base version on src date -MAKE_VERSION= 20120831 +MAKE_VERSION= 20121010 MACHINE=@machine@ MACHINE_ARCH=@machine_arch@ DEFAULT_SYS_PATH = @default_sys_path@ @@ -71,10 +71,9 @@ SUBDIR= PSD.doc .endif .endif +.if defined(.PARSEDIR) +# we cannot rely on anything but bmake to parse this correctly. .if empty(isBSD44:M${OS}) -# XXX not sure if we still want this given that configure -# lets us force or not the definition of MACHINE. -CFLAGS_main.o+= "-DFORCE_MACHINE=\"${MACHINE}\"" MANTARGET=cat INSTALL?=${srcdir}/install-sh .if (${MACHINE} == "sun386") @@ -85,7 +84,7 @@ SRCS+= sigcompat.c CFLAGS+= -DSIGNAL_FLAGS=SA_RESTART .endif .endif -.if defined(.PARSEDIR) + .if make(obj) || make(clean) SUBDIR+= unit-tests .endif @@ -104,14 +103,18 @@ EXTRACT_MAN=no MAN=${PROG}.1 .if (${PROG} != "make") -${MAN}: make.1 - @echo making ${PROG}.1 - @sed -e 's/^.Nx/NetBSD/' -e '/^.Nm/s/make/${PROG}/' -e '/^.Sh HISTORY/,$$d' ${srcdir}/make.1 > $@ - @(echo ".Sh HISTORY"; \ - echo ".Nm"; \ +my.history: ${MAKEFILE} + @(echo ".Nm"; \ echo "is derived from NetBSD"; \ echo ".Xr make 1 ."; \ - echo It uses autoconf to facilitate portability to other platforms.) >> $@ + echo "It uses autoconf to facilitate portability to other platforms."; \ + echo ".Pp") > $@ + +${MAN}: make.1 my.history + @echo making ${PROG}.1 + @sed -e 's/^.Nx/NetBSD/' -e '/^.Nm/s/make/${PROG}/' \ + -e '/^.Sh HISTORY/rmy.history' \ + -e '/^.Sh HISTORY/,$$s,^.Nm,make,' ${.CURDIR}/make.1 > $@ .endif Modified: head/contrib/bmake/bmake.1 ============================================================================== --- head/contrib/bmake/bmake.1 Thu Oct 25 22:54:29 2012 (r242101) +++ head/contrib/bmake/bmake.1 Thu Oct 25 23:18:05 2012 (r242102) @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.206 2012/08/30 22:35:37 wiz Exp $ +.\" $NetBSD: make.1,v 1.209 2012/10/08 15:09:48 christos Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd August 30, 2012 +.Dd October 8, 2012 .Dt MAKE 1 .Os .Sh NAME @@ -2042,6 +2042,13 @@ or To be compatible with Makefiles that do this, one can use .Fl B to disable this behavior. +.Pp +In compatibility mode, each command is run in a separate process. +If the command contains any shell meta characters +.Pq Ql #=|^(){};&<>*?[]:$`\e\en +it will be passed to the shell, otherwise +.Nm +will attempt direct execution. .Sh SEE ALSO .Xr mkdep 1 .Sh HISTORY @@ -2049,3 +2056,26 @@ to disable this behavior. is derived from NetBSD .Xr make 1 . It uses autoconf to facilitate portability to other platforms. +.Pp +A +make +command appeared in +.At v7 . +This +make +implementation is based on Adam De Boor's pmake program which was written +for Sprite at Berkeley. +It was designed to be a parallel distributed make running jobs on different +machines using a daemon called +.Dq customs . +.Sh BUGS +The +make +syntax is difficult to parse without actually acting of the data. +For instance finding the end of a variable use should involve scanning each +the modifiers using the correct terminator for each field. +In many places +make +just counts {} and () in order to find the end of a variable expansion. +.Pp +There is no way of escaping a space character in a filename. Modified: head/contrib/bmake/bmake.cat1 ============================================================================== --- head/contrib/bmake/bmake.cat1 Thu Oct 25 22:54:29 2012 (r242101) +++ head/contrib/bmake/bmake.cat1 Thu Oct 25 23:18:05 2012 (r242102) @@ -1301,1321 +1301,30 @@ CCOOMMPPAATTIIBBIILLIITTYY ``chdir''. To be compatible with Makefiles that do this, one can use --BB to disable this behavior. + In compatibility mode, each command is run in a separate process. If the + command contains any shell meta characters (`#=|^(){};&<>*?[]:$`\\n') it + will be passed to the shell, otherwise bbmmaakkee will attempt direct execu- + tion. + SSEEEE AALLSSOO mkdep(1) HHIISSTTOORRYY bbmmaakkee is derived from NetBSD make(1). It uses autoconf to facilitate -MAKE(1) NetBSD General Commands Manual MAKE(1) - portability to other platforms. -NNAAMMEE - bbmmaakkee -- maintain program dependencies - -SSYYNNOOPPSSIISS - bbmmaakkee [--BBeeiikkNNnnqqrrssttWWXX] [--CC _d_i_r_e_c_t_o_r_y] [--DD _v_a_r_i_a_b_l_e] [--dd _f_l_a_g_s] - [--ff _m_a_k_e_f_i_l_e] [--II _d_i_r_e_c_t_o_r_y] [--JJ _p_r_i_v_a_t_e] [--jj _m_a_x___j_o_b_s] - [--mm _d_i_r_e_c_t_o_r_y] [--TT _f_i_l_e] [--VV _v_a_r_i_a_b_l_e] [_v_a_r_i_a_b_l_e_=_v_a_l_u_e] - [_t_a_r_g_e_t _._._.] - -DDEESSCCRRIIPPTTIIOONN - bbmmaakkee is a program designed to simplify the maintenance of other pro- - grams. Its input is a list of specifications as to the files upon which - programs and other files depend. If no --ff _m_a_k_e_f_i_l_e makefile option is - given, bbmmaakkee will try to open `_m_a_k_e_f_i_l_e' then `_M_a_k_e_f_i_l_e' in order to find - the specifications. If the file `_._d_e_p_e_n_d' exists, it is read (see - mkdep(1)). - - This manual page is intended as a reference document only. For a more - thorough description of bbmmaakkee and makefiles, please refer to _P_M_a_k_e _- _A - _T_u_t_o_r_i_a_l. - - bbmmaakkee will prepend the contents of the _M_A_K_E_F_L_A_G_S environment variable to - the command line arguments before parsing them. - - The options are as follows: - - --BB Try to be backwards compatible by executing a single shell per - command and by executing the commands to make the sources of a - dependency line in sequence. - - --CC _d_i_r_e_c_t_o_r_y - Change to _d_i_r_e_c_t_o_r_y before reading the makefiles or doing any- - thing else. If multiple --CC options are specified, each is inter- - preted relative to the previous one: --CC _/ --CC _e_t_c is equivalent to - --CC _/_e_t_c. - - --DD _v_a_r_i_a_b_l_e - Define _v_a_r_i_a_b_l_e to be 1, in the global context. - - --dd _[_-_]_f_l_a_g_s - Turn on debugging, and specify which portions of bbmmaakkee are to - print debugging information. Unless the flags are preceded by - `-' they are added to the _M_A_K_E_F_L_A_G_S environment variable and will - be processed by any child make processes. By default, debugging - information is printed to standard error, but this can be changed - using the _F debugging flag. The debugging output is always - unbuffered; in addition, if debugging is enabled but debugging - output is not directed to standard output, then the standard out- - put is line buffered. _F_l_a_g_s is one or more of the following: - - _A Print all possible debugging information; equivalent to - specifying all of the debugging flags. - - _a Print debugging information about archive searching and - caching. - - _C Print debugging information about current working direc- - tory. - - _c Print debugging information about conditional evaluation. - - _d Print debugging information about directory searching and - caching. - - _e Print debugging information about failed commands and - targets. - - _F[++]_f_i_l_e_n_a_m_e - Specify where debugging output is written. This must be - the last flag, because it consumes the remainder of the - argument. If the character immediately after the `F' - flag is `+', then the file will be opened in append mode; - otherwise the file will be overwritten. If the file name - is `stdout' or `stderr' then debugging output will be - written to the standard output or standard error output - file descriptors respectively (and the `+' option has no - effect). Otherwise, the output will be written to the - named file. If the file name ends `.%d' then the `%d' is - replaced by the pid. - - _f Print debugging information about loop evaluation. - - _g_1 Print the input graph before making anything. - - _g_2 Print the input graph after making everything, or before - exiting on error. - - _g_3 Print the input graph before exiting on error. - - _j Print debugging information about running multiple - shells. - - _l Print commands in Makefiles regardless of whether or not - they are prefixed by `@' or other "quiet" flags. Also - known as "loud" behavior. - - _M Print debugging information about "meta" mode decisions - about targets. - - _m Print debugging information about making targets, includ- - ing modification dates. - - _n Don't delete the temporary command scripts created when - running commands. These temporary scripts are created in - the directory referred to by the TMPDIR environment vari- - able, or in _/_t_m_p if TMPDIR is unset or set to the empty - string. The temporary scripts are created by mkstemp(3), - and have names of the form _m_a_k_e_X_X_X_X_X_X. _N_O_T_E: This can - create many files in TMPDIR or _/_t_m_p, so use with care. - - _p Print debugging information about makefile parsing. - - _s Print debugging information about suffix-transformation - rules. - - _t Print debugging information about target list mainte- - nance. - - _V Force the --VV option to print raw value of variables. - - _v Print debugging information about variable assignment. - - _x Run shell commands with --xx so the actual commands are - printed as they are executed. - - --ee Specify that environment variables override macro assignments - within makefiles. - - --ff _m_a_k_e_f_i_l_e - Specify a makefile to read instead of the default `_m_a_k_e_f_i_l_e'. If - _m_a_k_e_f_i_l_e is `--', standard input is read. Multiple makefiles may - be specified, and are read in the order specified. - - --II _d_i_r_e_c_t_o_r_y - Specify a directory in which to search for makefiles and included - makefiles. The system makefile directory (or directories, see - the --mm option) is automatically included as part of this list. - - --ii Ignore non-zero exit of shell commands in the makefile. Equiva- - lent to specifying `--' before each command line in the makefile. - - --JJ _p_r_i_v_a_t_e - This option should _n_o_t be specified by the user. - - When the _j option is in use in a recursive build, this option is - passed by a make to child makes to allow all the make processes - in the build to cooperate to avoid overloading the system. - - --jj _m_a_x___j_o_b_s - Specify the maximum number of jobs that bbmmaakkee may have running at - any one time. The value is saved in _._M_A_K_E_._J_O_B_S. Turns compati- - bility mode off, unless the _B flag is also specified. When com- - patibility mode is off, all commands associated with a target are - executed in a single shell invocation as opposed to the tradi- - tional one shell invocation per line. This can break traditional - scripts which change directories on each command invocation and - then expect to start with a fresh environment on the next line. - It is more efficient to correct the scripts rather than turn - backwards compatibility on. - - --kk Continue processing after errors are encountered, but only on - those targets that do not depend on the target whose creation - caused the error. - - --mm _d_i_r_e_c_t_o_r_y - Specify a directory in which to search for sys.mk and makefiles - included via the <_f_i_l_e>-style include statement. The --mm option - can be used multiple times to form a search path. This path will - override the default system include path: /usr/share/mk. Fur- - thermore the system include path will be appended to the search - path used for "_f_i_l_e"-style include statements (see the --II - option). - - If a file or directory name in the --mm argument (or the - MAKESYSPATH environment variable) starts with the string ".../" - then bbmmaakkee will search for the specified file or directory named - in the remaining part of the argument string. The search starts - with the current directory of the Makefile and then works upward - towards the root of the filesystem. If the search is successful, - then the resulting directory replaces the ".../" specification in - the --mm argument. If used, this feature allows bbmmaakkee to easily - search in the current source tree for customized sys.mk files - (e.g., by using ".../mk/sys.mk" as an argument). - - --nn Display the commands that would have been executed, but do not - actually execute them unless the target depends on the .MAKE spe- - cial source (see below). - - --NN Display the commands which would have been executed, but do not - actually execute any of them; useful for debugging top-level - makefiles without descending into subdirectories. - - --qq Do not execute any commands, but exit 0 if the specified targets - are up-to-date and 1, otherwise. - - --rr Do not use the built-in rules specified in the system makefile. - - --ss Do not echo any commands as they are executed. Equivalent to - specifying `@@' before each command line in the makefile. - - --TT _t_r_a_c_e_f_i_l_e - When used with the --jj flag, append a trace record to _t_r_a_c_e_f_i_l_e - for each job started and completed. - - --tt Rather than re-building a target as specified in the makefile, - create it or update its modification time to make it appear up- - to-date. - - --VV _v_a_r_i_a_b_l_e - Print bbmmaakkee's idea of the value of _v_a_r_i_a_b_l_e, in the global con- - text. Do not build any targets. Multiple instances of this - option may be specified; the variables will be printed one per - line, with a blank line for each null or undefined variable. If - _v_a_r_i_a_b_l_e contains a `$' then the value will be expanded before - printing. - - --WW Treat any warnings during makefile parsing as errors. - - --XX Don't export variables passed on the command line to the environ- - ment individually. Variables passed on the command line are - still exported via the _M_A_K_E_F_L_A_G_S environment variable. This - option may be useful on systems which have a small limit on the - size of command arguments. - - _v_a_r_i_a_b_l_e_=_v_a_l_u_e - Set the value of the variable _v_a_r_i_a_b_l_e to _v_a_l_u_e. Normally, all - values passed on the command line are also exported to sub-makes - in the environment. The --XX flag disables this behavior. Vari- - able assignments should follow options for POSIX compatibility - but no ordering is enforced. - - There are seven different types of lines in a makefile: file dependency - specifications, shell commands, variable assignments, include statements, - conditional directives, for loops, and comments. - - In general, lines may be continued from one line to the next by ending - them with a backslash (`\'). The trailing newline character and initial - whitespace on the following line are compressed into a single space. - -FFIILLEE DDEEPPEENNDDEENNCCYY SSPPEECCIIFFIICCAATTIIOONNSS - Dependency lines consist of one or more targets, an operator, and zero or - more sources. This creates a relationship where the targets ``depend'' - on the sources and are usually created from them. The exact relationship - between the target and the source is determined by the operator that sep- - arates them. The three operators are as follows: - - :: A target is considered out-of-date if its modification time is less - than those of any of its sources. Sources for a target accumulate - over dependency lines when this operator is used. The target is - removed if bbmmaakkee is interrupted. - - !! Targets are always re-created, but not until all sources have been - examined and re-created as necessary. Sources for a target accumu- - late over dependency lines when this operator is used. The target - is removed if bbmmaakkee is interrupted. - - :::: If no sources are specified, the target is always re-created. Oth- - erwise, a target is considered out-of-date if any of its sources - has been modified more recently than the target. Sources for a - target do not accumulate over dependency lines when this operator - is used. The target will not be removed if bbmmaakkee is interrupted. - - Targets and sources may contain the shell wildcard values `?', `*', `[]', - and `{}'. The values `?', `*', and `[]' may only be used as part of the - final component of the target or source, and must be used to describe - existing files. The value `{}' need not necessarily be used to describe - existing files. Expansion is in directory order, not alphabetically as - done in the shell. - -SSHHEELLLL CCOOMMMMAANNDDSS - Each target may have associated with it a series of shell commands, nor- - mally used to create the target. Each of the commands in this script - _m_u_s_t be preceded by a tab. While any target may appear on a dependency - line, only one of these dependencies may be followed by a creation - script, unless the `::::' operator is used. - - If the first characters of the command line are any combination of `@@', - `++', or `--', the command is treated specially. A `@@' causes the command - not to be echoed before it is executed. A `++' causes the command to be - executed even when --nn is given. This is similar to the effect of the - .MAKE special source, except that the effect can be limited to a single - line of a script. A `--' causes any non-zero exit status of the command - line to be ignored. - -VVAARRIIAABBLLEE AASSSSIIGGNNMMEENNTTSS - Variables in make are much like variables in the shell, and, by tradi- - tion, consist of all upper-case letters. - - VVaarriiaabbllee aassssiiggnnmmeenntt mmooddiiffiieerrss - The five operators that can be used to assign values to variables are as - follows: - - == Assign the value to the variable. Any previous value is overrid- - den. - - ++== Append the value to the current value of the variable. - - ??== Assign the value to the variable if it is not already defined. - - ::== Assign with expansion, i.e. expand the value before assigning it - to the variable. Normally, expansion is not done until the vari- - able is referenced. _N_O_T_E: References to undefined variables are - _n_o_t expanded. This can cause problems when variable modifiers - are used. - - !!== Expand the value and pass it to the shell for execution and - assign the result to the variable. Any newlines in the result - are replaced with spaces. - - Any white-space before the assigned _v_a_l_u_e is removed; if the value is - being appended, a single space is inserted between the previous contents - of the variable and the appended value. - - Variables are expanded by surrounding the variable name with either curly - braces (`{}') or parentheses (`()') and preceding it with a dollar sign - (`$'). If the variable name contains only a single letter, the surround- - ing braces or parentheses are not required. This shorter form is not - recommended. - - If the variable name contains a dollar, then the name itself is expanded - first. This allows almost arbitrary variable names, however names con- - taining dollar, braces, parenthesis, or whitespace are really best - avoided! - - If the result of expanding a variable contains a dollar sign (`$') the - string is expanded again. - - Variable substitution occurs at three distinct times, depending on where - the variable is being used. - - 1. Variables in dependency lines are expanded as the line is read. - - 2. Variables in shell commands are expanded when the shell command is - executed. - - 3. ``.for'' loop index variables are expanded on each loop iteration. - Note that other variables are not expanded inside loops so the fol- - lowing example code: - - - .for i in 1 2 3 - a+= ${i} - j= ${i} - b+= ${j} - .endfor - - all: - @echo ${a} - @echo ${b} - - will print: - - 1 2 3 - 3 3 3 - - Because while ${a} contains ``1 2 3'' after the loop is executed, - ${b} contains ``${j} ${j} ${j}'' which expands to ``3 3 3'' since - after the loop completes ${j} contains ``3''. - - VVaarriiaabbllee ccllaasssseess - The four different classes of variables (in order of increasing prece- - dence) are: - - Environment variables - Variables defined as part of bbmmaakkee's environment. - - Global variables - Variables defined in the makefile or in included makefiles. - - Command line variables - Variables defined as part of the command line. - - Local variables - Variables that are defined specific to a certain target. The - seven local variables are as follows: - - _._A_L_L_S_R_C The list of all sources for this target; also known as - `_>'. - - _._A_R_C_H_I_V_E The name of the archive file. - - _._I_M_P_S_R_C In suffix-transformation rules, the name/path of the - source from which the target is to be transformed (the - ``implied'' source); also known as `_<'. It is not - defined in explicit rules. - - _._M_E_M_B_E_R The name of the archive member. - - _._O_O_D_A_T_E The list of sources for this target that were deemed - out-of-date; also known as `_?'. - - _._P_R_E_F_I_X The file prefix of the target, containing only the file - portion, no suffix or preceding directory components; - also known as `_*'. - - _._T_A_R_G_E_T The name of the target; also known as `_@'. - - The shorter forms `_@', `_?', `_<', `_>', and `_*' are permitted for - backward compatibility with historical makefiles and are not rec- - ommended. The six variables `_@_F', `_@_D', `_<_F', `_<_D', `_*_F', and - `_*_D' are permitted for compatibility with AT&T System V UNIX - makefiles and are not recommended. - - Four of the local variables may be used in sources on dependency - lines because they expand to the proper value for each target on - the line. These variables are `_._T_A_R_G_E_T', `_._P_R_E_F_I_X', `_._A_R_C_H_I_V_E', - and `_._M_E_M_B_E_R'. - - AAddddiittiioonnaall bbuuiilltt--iinn vvaarriiaabblleess - In addition, bbmmaakkee sets or knows about the following variables: - - _$ A single dollar sign `$', i.e. `$$' expands to a single - dollar sign. - - _._A_L_L_T_A_R_G_E_T_S The list of all targets encountered in the Makefile. If - evaluated during Makefile parsing, lists only those tar- - gets encountered thus far. - - _._C_U_R_D_I_R A path to the directory where bbmmaakkee was executed. Refer - to the description of `PWD' for more details. - - MAKE The name that bbmmaakkee was executed with (_a_r_g_v_[_0_]). For - compatibility bbmmaakkee also sets _._M_A_K_E with the same value. - The preferred variable to use is the environment variable - MAKE because it is more compatible with other versions of - bbmmaakkee and cannot be confused with the special target with - the same name. - - _._M_A_K_E_._D_E_P_E_N_D_F_I_L_E - Names the makefile (default `_._d_e_p_e_n_d') from which gener- - ated dependencies are read. - - _._M_A_K_E_._E_X_P_A_N_D___V_A_R_I_A_B_L_E_S - A boolean that controls the default behavior of the --VV - option. - - _._M_A_K_E_._E_X_P_O_R_T_E_D The list of variables exported by bbmmaakkee. - - _._M_A_K_E_._J_O_B_S The argument to the --jj option. - - _._M_A_K_E_._J_O_B_._P_R_E_F_I_X - If bbmmaakkee is run with _j then output for each target is - prefixed with a token `--- target ---' the first part of - which can be controlled via _._M_A_K_E_._J_O_B_._P_R_E_F_I_X. - For example: - .MAKE.JOB.PREFIX=${.newline}---${.MAKE:T}[${.MAKE.PID}] - would produce tokens like `---make[1234] target ---' mak- - ing it easier to track the degree of parallelism being - achieved. - - MAKEFLAGS The environment variable `MAKEFLAGS' may contain anything - that may be specified on bbmmaakkee's command line. Anything - specified on bbmmaakkee's command line is appended to the - `MAKEFLAGS' variable which is then entered into the envi- - ronment for all programs which bbmmaakkee executes. - - _._M_A_K_E_._L_E_V_E_L The recursion depth of bbmmaakkee. The initial instance of - bbmmaakkee will be 0, and an incremented value is put into the - environment to be seen by the next generation. This - allows tests like: .if ${.MAKE.LEVEL} == 0 to protect - things which should only be evaluated in the initial - instance of bbmmaakkee. - - _._M_A_K_E_._M_A_K_E_F_I_L_E___P_R_E_F_E_R_E_N_C_E - The ordered list of makefile names (default `_m_a_k_e_f_i_l_e', - `_M_a_k_e_f_i_l_e') that bbmmaakkee will look for. - - _._M_A_K_E_._M_A_K_E_F_I_L_E_S - The list of makefiles read by bbmmaakkee, which is useful for - tracking dependencies. Each makefile is recorded only - once, regardless of the number of times read. - - _._M_A_K_E_._M_O_D_E Processed after reading all makefiles. Can affect the - mode that bbmmaakkee runs in. It can contain a number of key- - words: - - _c_o_m_p_a_t Like --BB, puts bbmmaakkee into "compat" mode. - - _m_e_t_a Puts bbmmaakkee into "meta" mode, where meta files - are created for each target to capture the - command run, the output generated and if - filemon(4) is available, the system calls - which are of interest to bbmmaakkee. The captured - output can be very useful when diagnosing - errors. - - _c_u_r_d_i_r_O_k_= _b_f Normally bbmmaakkee will not create .meta files - in `_._C_U_R_D_I_R'. This can be overridden by set- - ting _b_f to a value which represents True. - - _e_n_v For debugging, it can be useful to inlcude - the environment in the .meta file. - - _v_e_r_b_o_s_e If in "meta" mode, print a clue about the - target being built. This is useful if the - build is otherwise running silently. The - message printed the value of: - _._M_A_K_E_._M_E_T_A_._P_R_E_F_I_X. - - _i_g_n_o_r_e_-_c_m_d Some makefiles have commands which are simply - not stable. This keyword causes them to be - ignored for determining whether a target is - out of date in "meta" mode. See also - ..NNOOMMEETTAA__CCMMPP. - - _s_i_l_e_n_t_= _b_f If _b_f is True, when a .meta file is created, - mark the target ..SSIILLEENNTT. - - _._M_A_K_E_._M_E_T_A_._B_A_I_L_I_W_I_C_K - In "meta" mode, provides a list of prefixes which match - the directories controlled by bbmmaakkee. If a file that was - generated outside of _._O_B_J_D_I_R but within said bailiwick is - missing, the current target is considered out-of-date. - - _._M_A_K_E_._M_E_T_A_._C_R_E_A_T_E_D - In "meta" mode, this variable contains a list of all the - meta files updated. If not empty, it can be used to - trigger processing of _._M_A_K_E_._M_E_T_A_._F_I_L_E_S. - - _._M_A_K_E_._M_E_T_A_._F_I_L_E_S - In "meta" mode, this variable contains a list of all the - meta files used (updated or not). This list can be used - to process the meta files to extract dependency informa- - tion. - - _._M_A_K_E_._M_E_T_A_._P_R_E_F_I_X - Defines the message printed for each meta file updated in - "meta verbose" mode. The default value is: - Building ${.TARGET:H:tA}/${.TARGET:T} - - _._M_A_K_E_O_V_E_R_R_I_D_E_S This variable is used to record the names of variables - assigned to on the command line, so that they may be - exported as part of `MAKEFLAGS'. This behaviour can be - disabled by assigning an empty value to `_._M_A_K_E_O_V_E_R_R_I_D_E_S' - within a makefile. Extra variables can be exported from - a makefile by appending their names to `_._M_A_K_E_O_V_E_R_R_I_D_E_S'. - `MAKEFLAGS' is re-exported whenever `_._M_A_K_E_O_V_E_R_R_I_D_E_S' is - modified. - - _._M_A_K_E_._P_I_D The process-id of bbmmaakkee. - - _._M_A_K_E_._P_P_I_D The parent process-id of bbmmaakkee. - - _M_A_K_E___P_R_I_N_T___V_A_R___O_N___E_R_R_O_R - When bbmmaakkee stops due to an error, it prints its name and - the value of `_._C_U_R_D_I_R' as well as the value of any vari- - ables named in `_M_A_K_E___P_R_I_N_T___V_A_R___O_N___E_R_R_O_R'. - - _._n_e_w_l_i_n_e This variable is simply assigned a newline character as - its value. This allows expansions using the ::@@ modifier - to put a newline between iterations of the loop rather - than a space. For example, the printing of - `_M_A_K_E___P_R_I_N_T___V_A_R___O_N___E_R_R_O_R' could be done as - ${MAKE_PRINT_VAR_ON_ERROR:@v@$v='${$v}'${.newline}@}. - - _._O_B_J_D_I_R A path to the directory where the targets are built. Its - value is determined by trying to chdir(2) to the follow- - ing directories in order and using the first match: - - 1. ${MAKEOBJDIRPREFIX}${.CURDIR} - - (Only if `MAKEOBJDIRPREFIX' is set in the environ- - ment or on the command line.) - - 2. ${MAKEOBJDIR} - - (Only if `MAKEOBJDIR' is set in the environment or - on the command line.) - - 3. ${.CURDIR}_/_o_b_j_.${MACHINE} - - 4. ${.CURDIR}_/_o_b_j - - 5. _/_u_s_r_/_o_b_j_/${.CURDIR} - - 6. ${.CURDIR} - - Variable expansion is performed on the value before it's - used, so expressions such as - ${.CURDIR:S,^/usr/src,/var/obj,} - may be used. This is especially useful with - `MAKEOBJDIR'. - - `_._O_B_J_D_I_R' may be modified in the makefile as a global - variable. In all cases, bbmmaakkee will chdir(2) to `_._O_B_J_D_I_R' - and set `PWD' to that directory before executing any tar- - gets. - - _._P_A_R_S_E_D_I_R A path to the directory of the current `_M_a_k_e_f_i_l_e' being - parsed. - - _._P_A_R_S_E_F_I_L_E The basename of the current `_M_a_k_e_f_i_l_e' being parsed. - This variable and `_._P_A_R_S_E_D_I_R' are both set only while the - `_M_a_k_e_f_i_l_e_s' are being parsed. If you want to retain - their current values, assign them to a variable using - assignment with expansion: (`::=='). - - _._P_A_T_H A variable that represents the list of directories that - bbmmaakkee will search for files. The search list should be - updated using the target `_._P_A_T_H' rather than the vari- - able. - - PWD Alternate path to the current directory. bbmmaakkee normally - sets `_._C_U_R_D_I_R' to the canonical path given by getcwd(3). - However, if the environment variable `PWD' is set and - gives a path to the current directory, then bbmmaakkee sets - `_._C_U_R_D_I_R' to the value of `PWD' instead. This behaviour - is disabled if `MAKEOBJDIRPREFIX' is set or `MAKEOBJDIR' - contains a variable transform. `PWD' is set to the value - of `_._O_B_J_D_I_R' for all programs which bbmmaakkee executes. - - .TARGETS The list of targets explicitly specified on the command - line, if any. - - VPATH Colon-separated (``:'') lists of directories that bbmmaakkee - will search for files. The variable is supported for - compatibility with old make programs only, use `_._P_A_T_H' - instead. - - VVaarriiaabbllee mmooddiiffiieerrss - Variable expansion may be modified to select or modify each word of the - variable (where a ``word'' is white-space delimited sequence of charac- - ters). The general format of a variable expansion is as follows: - - ${variable[:modifier[:...]]} - - Each modifier begins with a colon, which may be escaped with a backslash - (`\'). - - A set of modifiers can be specified via a variable, as follows: - - modifier_variable=modifier[:...] - ${variable:${modifier_variable}[:...]} - - In this case the first modifier in the modifier_variable does not start - with a colon, since that must appear in the referencing variable. If any - of the modifiers in the modifier_variable contain a dollar sign (`$'), - these must be doubled to avoid early expansion. - - The supported modifiers are: - - ::EE Replaces each word in the variable with its suffix. - - ::HH Replaces each word in the variable with everything but the last com- - ponent. - - ::MM_p_a_t_t_e_r_n - Select only those words that match _p_a_t_t_e_r_n. The standard shell - wildcard characters (`*', `?', and `[]') may be used. The wildcard - characters may be escaped with a backslash (`\'). - - ::NN_p_a_t_t_e_r_n - This is identical to `::MM', but selects all words which do not match - _p_a_t_t_e_r_n. - - ::OO Order every word in variable alphabetically. To sort words in - reverse order use the `::OO::[[--11....11]]' combination of modifiers. + A make command appeared in Version 7 AT&T UNIX. This make implementation + is based on Adam De Boor's pmake program which was written for Sprite at + Berkeley. It was designed to be a parallel distributed make running jobs + on different machines using a daemon called ``customs''. + +BBUUGGSS + The make syntax is difficult to parse without actually acting of the + data. For instance finding the end of a variable use should involve + scanning each the modifiers using the correct terminator for each field. + In many places make just counts {} and () in order to find the end of a + variable expansion. - ::OOxx Randomize words in variable. The results will be different each - time you are referring to the modified variable; use the assignment - with expansion (`::==') to prevent such behaviour. For example, - - LIST= uno due tre quattro - RANDOM_LIST= ${LIST:Ox} - STATIC_RANDOM_LIST:= ${LIST:Ox} - - all: - @echo "${RANDOM_LIST}" - @echo "${RANDOM_LIST}" - @echo "${STATIC_RANDOM_LIST}" - @echo "${STATIC_RANDOM_LIST}" - may produce output similar to: - - quattro due tre uno - tre due quattro uno - due uno quattro tre - due uno quattro tre - - ::QQ Quotes every shell meta-character in the variable, so that it can be - passed safely through recursive invocations of bbmmaakkee. - - ::RR Replaces each word in the variable with everything but its suffix. - - ::ggmmttiimmee - The value is a format string for strftime(3), using the current - gmtime(3). - - ::hhaasshh - Compute a 32bit hash of the value and encode it as hex digits. - - ::llooccaallttiimmee - The value is a format string for strftime(3), using the current - localtime(3). - - ::ttAA Attempt to convert variable to an absolute path using realpath(3), - if that fails, the value is unchanged. - - ::ttll Converts variable to lower-case letters. - - ::ttss_c - Words in the variable are normally separated by a space on expan- - sion. This modifier sets the separator to the character _c. If _c is - omitted, then no separator is used. The common escapes (including - octal numeric codes), work as expected. - - ::ttuu Converts variable to upper-case letters. - - ::ttWW Causes the value to be treated as a single word (possibly containing - embedded white space). See also `::[[**]]'. - - ::ttww Causes the value to be treated as a sequence of words delimited by - white space. See also `::[[@@]]'. - - ::SS/_o_l_d___s_t_r_i_n_g/_n_e_w___s_t_r_i_n_g/[11ggWW] - Modify the first occurrence of _o_l_d___s_t_r_i_n_g in the variable's value, - replacing it with _n_e_w___s_t_r_i_n_g. If a `g' is appended to the last - slash of the pattern, all occurrences in each word are replaced. If - a `1' is appended to the last slash of the pattern, only the first - word is affected. If a `W' is appended to the last slash of the - pattern, then the value is treated as a single word (possibly con- - taining embedded white space). If _o_l_d___s_t_r_i_n_g begins with a caret - (`^'), _o_l_d___s_t_r_i_n_g is anchored at the beginning of each word. If - _o_l_d___s_t_r_i_n_g ends with a dollar sign (`$'), it is anchored at the end - of each word. Inside _n_e_w___s_t_r_i_n_g, an ampersand (`&') is replaced by - _o_l_d___s_t_r_i_n_g (without any `^' or `$'). Any character may be used as a - delimiter for the parts of the modifier string. The anchoring, - ampersand and delimiter characters may be escaped with a backslash - (`\'). - - Variable expansion occurs in the normal fashion inside both - _o_l_d___s_t_r_i_n_g and _n_e_w___s_t_r_i_n_g with the single exception that a backslash - is used to prevent the expansion of a dollar sign (`$'), not a pre- - ceding dollar sign as is usual. - - ::CC/_p_a_t_t_e_r_n/_r_e_p_l_a_c_e_m_e_n_t/[11ggWW] - The ::CC modifier is just like the ::SS modifier except that the old and - new strings, instead of being simple strings, are a regular expres- - sion (see regex(3)) string _p_a_t_t_e_r_n and an ed(1)-style string - _r_e_p_l_a_c_e_m_e_n_t. Normally, the first occurrence of the pattern _p_a_t_t_e_r_n - in each word of the value is substituted with _r_e_p_l_a_c_e_m_e_n_t. The `1' - modifier causes the substitution to apply to at most one word; the - `g' modifier causes the substitution to apply to as many instances - of the search pattern _p_a_t_t_e_r_n as occur in the word or words it is - found in; the `W' modifier causes the value to be treated as a sin- - gle word (possibly containing embedded white space). Note that `1' - and `g' are orthogonal; the former specifies whether multiple words - are potentially affected, the latter whether multiple substitutions - can potentially occur within each affected word. - - ::TT Replaces each word in the variable with its last component. - - ::uu Remove adjacent duplicate words (like uniq(1)). - - ::??_t_r_u_e___s_t_r_i_n_g::_f_a_l_s_e___s_t_r_i_n_g - If the variable name (not its value), when parsed as a .if condi- - tional expression, evaluates to true, return as its value the - _t_r_u_e___s_t_r_i_n_g, otherwise return the _f_a_l_s_e___s_t_r_i_n_g. Since the variable - name is used as the expression, :? must be the first modifier after - the variable name itself - which will, of course, usually contain - variable expansions. A common error is trying to use expressions - like - ${NUMBERS:M42:?match:no} - which actually tests defined(NUMBERS), to determine is any words - match "42" you need to use something like: - ${"${NUMBERS:M42}" != "":?match:no}. - - _:_o_l_d___s_t_r_i_n_g_=_n_e_w___s_t_r_i_n_g - This is the AT&T System V UNIX style variable substitution. It must - be the last modifier specified. If _o_l_d___s_t_r_i_n_g or _n_e_w___s_t_r_i_n_g do not - contain the pattern matching character _% then it is assumed that - they are anchored at the end of each word, so only suffixes or - entire words may be replaced. Otherwise _% is the substring of - _o_l_d___s_t_r_i_n_g to be replaced in _n_e_w___s_t_r_i_n_g. - - Variable expansion occurs in the normal fashion inside both - _o_l_d___s_t_r_i_n_g and _n_e_w___s_t_r_i_n_g with the single exception that a backslash - is used to prevent the expansion of a dollar sign (`$'), not a pre- - ceding dollar sign as is usual. - - ::@@_t_e_m_p@@_s_t_r_i_n_g@@ - This is the loop expansion mechanism from the OSF Development Envi- - ronment (ODE) make. Unlike ..ffoorr loops expansion occurs at the time - of reference. Assign _t_e_m_p to each word in the variable and evaluate - _s_t_r_i_n_g. The ODE convention is that _t_e_m_p should start and end with a - period. For example. - ${LINKS:@.LINK.@${LN} ${TARGET} ${.LINK.}@} - - However a single character varaiable is often more readable: - ${MAKE_PRINT_VAR_ON_ERROR:@v@$v='${$v}'${.newline}@} - - ::UU_n_e_w_v_a_l - If the variable is undefined _n_e_w_v_a_l is the value. If the variable - is defined, the existing value is returned. This is another ODE - make feature. It is handy for setting per-target CFLAGS for - instance: - ${_${.TARGET:T}_CFLAGS:U${DEF_CFLAGS}} - If a value is only required if the variable is undefined, use: - ${VAR:D:Unewval} - - ::DD_n_e_w_v_a_l - If the variable is defined _n_e_w_v_a_l is the value. - - ::LL The name of the variable is the value. - - ::PP The path of the node which has the same name as the variable is the - value. If no such node exists or its path is null, then the name of - the variable is used. In order for this modifier to work, the name - (node) must at least have appeared on the rhs of a dependency. - - ::!!_c_m_d!! - The output of running _c_m_d is the value. - - ::sshh If the variable is non-empty it is run as a command and the output - becomes the new value. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 00:04: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 AAE8DAB6; Fri, 26 Oct 2012 00:04:05 +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 929358FC14; Fri, 26 Oct 2012 00:04:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9Q045S0077174; Fri, 26 Oct 2012 00:04:05 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9Q045Ss077172; Fri, 26 Oct 2012 00:04:05 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201210260004.q9Q045Ss077172@svn.freebsd.org> From: Juli Mallett Date: Fri, 26 Oct 2012 00:04:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242103 - head/sys/mips/cavium X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 00:04:05 -0000 Author: jmallett Date: Fri Oct 26 00:04:05 2012 New Revision: 242103 URL: http://svn.freebsd.org/changeset/base/242103 Log: Don't attach if the bootloader has not indicated that we're a PCI host. This fixes booting on systems which are PCI targets. Modified: head/sys/mips/cavium/octopci.c Modified: head/sys/mips/cavium/octopci.c ============================================================================== --- head/sys/mips/cavium/octopci.c Thu Oct 25 23:18:05 2012 (r242102) +++ head/sys/mips/cavium/octopci.c Fri Oct 26 00:04:05 2012 (r242103) @@ -104,7 +104,9 @@ static uint64_t octopci_cs_addr(unsigned static void octopci_identify(driver_t *drv, device_t parent) { - /* XXX Check sysinfo flag. */ + /* Check whether we are a PCI host. */ + if ((cvmx_sysinfo_get()->bootloader_config_flags & CVMX_BOOTINFO_CFG_FLAG_PCI_HOST) == 0) + return; BUS_ADD_CHILD(parent, 0, "pcib", 0); if (octeon_has_feature(OCTEON_FEATURE_PCIE)) From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 00:08: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 20FCCCE7; Fri, 26 Oct 2012 00:08:51 +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 087208FC0C; Fri, 26 Oct 2012 00:08: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 q9Q08oAf078068; Fri, 26 Oct 2012 00:08:50 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9Q08oFM078062; Fri, 26 Oct 2012 00:08:50 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201210260008.q9Q08oFM078062@svn.freebsd.org> From: Juli Mallett Date: Fri, 26 Oct 2012 00:08:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242104 - in head/sys: conf contrib/octeon-sdk mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 00:08:51 -0000 Author: jmallett Date: Fri Oct 26 00:08:50 2012 New Revision: 242104 URL: http://svn.freebsd.org/changeset/base/242104 Log: Add support for Radisys as a vendor of Octeon hardware. Add some preliminary support for what their boot loader refers to as the "RSYS4GBE", of which there are two instances ("Data Processing Blocks") on the Radisys ATCA-7220. Modified: head/sys/conf/options.mips head/sys/contrib/octeon-sdk/cvmx-app-init.h head/sys/contrib/octeon-sdk/cvmx-helper-board.c head/sys/contrib/octeon-sdk/cvmx-helper.c head/sys/mips/conf/OCTEON1 Modified: head/sys/conf/options.mips ============================================================================== --- head/sys/conf/options.mips Fri Oct 26 00:04:05 2012 (r242103) +++ head/sys/conf/options.mips Fri Oct 26 00:08:50 2012 (r242104) @@ -72,6 +72,7 @@ MAXMEM opt_global.h # Options that control the Cavium Simple Executive. # OCTEON_VENDOR_LANNER opt_cvmx.h +OCTEON_VENDOR_RADISYS opt_cvmx.h OCTEON_BOARD_CAPK_0100ND opt_cvmx.h # Modified: head/sys/contrib/octeon-sdk/cvmx-app-init.h ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-app-init.h Fri Oct 26 00:04:05 2012 (r242103) +++ head/sys/contrib/octeon-sdk/cvmx-app-init.h Fri Oct 26 00:08:50 2012 (r242104) @@ -299,6 +299,9 @@ enum cvmx_board_types_enum { CVMX_BOARD_TYPE_CUST_LANNER_MR320= 20002, CVMX_BOARD_TYPE_CUST_LANNER_MR321X=20007, #endif +#if defined(OCTEON_VENDOR_RADISYS) + CVMX_BOARD_TYPE_CUST_RADISYS_RSYS4GBE=20002, +#endif CVMX_BOARD_TYPE_CUST_PRIVATE_MAX = 30000, @@ -423,6 +426,9 @@ static inline const char *cvmx_board_typ ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_LANNER_MR320) ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_LANNER_MR321X) #endif +#if defined(OCTEON_VENDOR_RADISYS) + ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_RADISYS_RSYS4GBE) +#endif ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_PRIVATE_MAX) /* Module range */ Modified: head/sys/contrib/octeon-sdk/cvmx-helper-board.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-helper-board.c Fri Oct 26 00:04:05 2012 (r242103) +++ head/sys/contrib/octeon-sdk/cvmx-helper-board.c Fri Oct 26 00:08:50 2012 (r242104) @@ -1296,6 +1296,14 @@ int __cvmx_helper_board_interface_probe( return 12; break; #endif +#if defined(OCTEON_VENDOR_RADISYS) + case CVMX_BOARD_TYPE_CUST_RADISYS_RSYS4GBE: + if (interface == 0) + return 13; + if (interface == 1) + return 8; + return 0; +#endif } #ifdef CVMX_BUILD_FOR_UBOOT if (CVMX_HELPER_INTERFACE_MODE_SPI == cvmx_helper_interface_get_mode(interface) && getenv("disable_spi")) Modified: head/sys/contrib/octeon-sdk/cvmx-helper.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-helper.c Fri Oct 26 00:04:05 2012 (r242103) +++ head/sys/contrib/octeon-sdk/cvmx-helper.c Fri Oct 26 00:08:50 2012 (r242104) @@ -146,6 +146,10 @@ int cvmx_helper_get_number_of_interfaces case CVMX_BOARD_TYPE_CUST_LANNER_MR730: return 1; #endif +#if defined(OCTEON_VENDOR_RADISYS) + case CVMX_BOARD_TYPE_CUST_RADISYS_RSYS4GBE: + return 2; +#endif default: break; } Modified: head/sys/mips/conf/OCTEON1 ============================================================================== --- head/sys/mips/conf/OCTEON1 Fri Oct 26 00:04:05 2012 (r242103) +++ head/sys/mips/conf/OCTEON1 Fri Oct 26 00:08:50 2012 (r242104) @@ -38,6 +38,7 @@ makeoptions DEBUG=-g #Build kernel with # Board-specific support that cannot be auto-detected at runtime. #options OCTEON_VENDOR_LANNER # Support for Lanner boards. +#options OCTEON_VENDOR_RADISYS # Support for Radisys boards. #options OCTEON_BOARD_CAPK_0100ND # Support for CAPK-0100nd. options SCHED_ULE # ULE scheduler From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 00:28: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 17D942E7; Fri, 26 Oct 2012 00:28:30 +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 001628FC17; Fri, 26 Oct 2012 00:28: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 q9Q0SToS081188; Fri, 26 Oct 2012 00:28:29 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9Q0STY9081186; Fri, 26 Oct 2012 00:28:29 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201210260028.q9Q0STY9081186@svn.freebsd.org> From: Xin LI Date: Fri, 26 Oct 2012 00:28:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242105 - stable/9/sys/dev/hptmv X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 00:28:30 -0000 Author: delphij Date: Fri Oct 26 00:28:29 2012 New Revision: 242105 URL: http://svn.freebsd.org/changeset/base/242105 Log: MFC r240210: It seems that what the code really meant is that when a write is completed, do a BUS_DMASYNC_POSTWRITE over the DMA map. The way it currently is would only do POSTREAD for read transactions. Submitted by: Sascha Wildner Modified: stable/9/sys/dev/hptmv/entry.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/hptmv/entry.c ============================================================================== --- stable/9/sys/dev/hptmv/entry.c Fri Oct 26 00:08:50 2012 (r242104) +++ stable/9/sys/dev/hptmv/entry.c Fri Oct 26 00:28:29 2012 (r242105) @@ -3046,7 +3046,7 @@ fOsCommandDone(_VBUS_ARG PCommand pCmd) if (pCmd->cf_data_in) { bus_dmamap_sync(pAdapter->io_dma_parent, pmap->dma_map, BUS_DMASYNC_POSTREAD); } - else if (pCmd->cf_data_in) { + else if (pCmd->cf_data_out) { bus_dmamap_sync(pAdapter->io_dma_parent, pmap->dma_map, BUS_DMASYNC_POSTWRITE); } From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 00:30: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 B571E4EA; Fri, 26 Oct 2012 00:30:44 +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 9D2B78FC14; Fri, 26 Oct 2012 00:30: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 q9Q0UilV081579; Fri, 26 Oct 2012 00:30:44 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9Q0UieY081577; Fri, 26 Oct 2012 00:30:44 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201210260030.q9Q0UieY081577@svn.freebsd.org> From: Xin LI Date: Fri, 26 Oct 2012 00:30:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242106 - stable/8/sys/dev/hptmv X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 00:30:44 -0000 Author: delphij Date: Fri Oct 26 00:30:44 2012 New Revision: 242106 URL: http://svn.freebsd.org/changeset/base/242106 Log: MFC r240210: It seems that what the code really meant is that when a write is completed, do a BUS_DMASYNC_POSTWRITE over the DMA map. The way it currently is would only do POSTREAD for read transactions. Submitted by: Sascha Wildner Modified: stable/8/sys/dev/hptmv/entry.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/hptmv/ (props changed) Modified: stable/8/sys/dev/hptmv/entry.c ============================================================================== --- stable/8/sys/dev/hptmv/entry.c Fri Oct 26 00:28:29 2012 (r242105) +++ stable/8/sys/dev/hptmv/entry.c Fri Oct 26 00:30:44 2012 (r242106) @@ -3046,7 +3046,7 @@ fOsCommandDone(_VBUS_ARG PCommand pCmd) if (pCmd->cf_data_in) { bus_dmamap_sync(pAdapter->io_dma_parent, pmap->dma_map, BUS_DMASYNC_POSTREAD); } - else if (pCmd->cf_data_in) { + else if (pCmd->cf_data_out) { bus_dmamap_sync(pAdapter->io_dma_parent, pmap->dma_map, BUS_DMASYNC_POSTWRITE); } From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 00:31: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 CEEC865B; Fri, 26 Oct 2012 00:31:25 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B67B18FC0C; Fri, 26 Oct 2012 00:31: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 q9Q0VPrt081741; Fri, 26 Oct 2012 00:31:25 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9Q0VPWA081736; Fri, 26 Oct 2012 00:31:25 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201210260031.q9Q0VPWA081736@svn.freebsd.org> From: Devin Teske Date: Fri, 26 Oct 2012 00:31:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242107 - in head/usr.sbin/bsdconfig: . security share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 00:31:25 -0000 Author: dteske Date: Fri Oct 26 00:31:25 2012 New Revision: 242107 URL: http://svn.freebsd.org/changeset/base/242107 Log: Switch from using a msgbox to display help files to a textbox instead. The problem with using a msgbox was one of truncation in the case of Xdialog(1) and lack of screen real-estate (since the msgbox is not scrollable in X11 while a textbox is). The textbox renders the text much better and is more appropriate for this type of data display. Approved by: adrian (co-mentor) (implicit) Modified: head/usr.sbin/bsdconfig/bsdconfig head/usr.sbin/bsdconfig/security/kern_securelevel head/usr.sbin/bsdconfig/share/common.subr head/usr.sbin/bsdconfig/share/dialog.subr Modified: head/usr.sbin/bsdconfig/bsdconfig ============================================================================== --- head/usr.sbin/bsdconfig/bsdconfig Fri Oct 26 00:30:44 2012 (r242106) +++ head/usr.sbin/bsdconfig/bsdconfig Fri Oct 26 00:31:25 2012 (r242107) @@ -37,8 +37,9 @@ f_include $BSDCFG_SHARE/strings.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" f_include_lang $BSDCFG_LIBE/include/messages.subr -f_include_help BSDCONFIG $BSDCFG_LIBE/include/bsdconfig.hlp -f_include_help USAGE $BSDCFG_LIBE/include/usage.hlp + +BSDCONFIG_HELPFILE=$BSDCFG_LIBE/include/bsdconfig.hlp +USAGE_HELPFILE=$BSDCFG_LIBE/include/usage.hlp ############################################################ FUNCTIONS @@ -302,7 +303,7 @@ while :; do if [ $retval -eq 2 ]; then # The Help button was pressed - f_show_msg "%s" "$( f_include_help BSDCONFIG )" + f_show_help "$BSDCONFIG_HELPFILE" continue elif [ $retval -ne 0 ]; then f_die @@ -314,7 +315,7 @@ while :; do ;; 1) # Usage - f_show_msg "%s" "$( f_include_help USAGE )" + f_show_help "$USAGE_HELPFILE" continue ;; Modified: head/usr.sbin/bsdconfig/security/kern_securelevel ============================================================================== --- head/usr.sbin/bsdconfig/security/kern_securelevel Fri Oct 26 00:30:44 2012 (r242106) +++ head/usr.sbin/bsdconfig/security/kern_securelevel Fri Oct 26 00:31:25 2012 (r242107) @@ -36,7 +36,8 @@ f_include $BSDCFG_SHARE/sysrc.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="130.security" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr -f_include_help SECURELEVEL $BSDCFG_LIBE/$APP_DIR/include/securelevel.hlp + +SECURELEVEL_HELPFILE=$BSDCFG_LIBE/$APP_DIR/include/securelevel.hlp ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" @@ -119,7 +120,7 @@ while :; do if [ $retval -eq 2 ]; then # The Help button was pressed - f_show_msg "%s" "$( f_include_help SECURELEVEL )" + f_show_help "$SECURELEVEL_HELPFILE" continue elif [ $retval -ne 0 ]; then f_die Modified: head/usr.sbin/bsdconfig/share/common.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/common.subr Fri Oct 26 00:30:44 2012 (r242106) +++ head/usr.sbin/bsdconfig/share/common.subr Fri Oct 26 00:31:25 2012 (r242107) @@ -140,6 +140,37 @@ f_show_msg() fi } +# f_show_help $file +# +# Display a language help-file. Automatically takes $LANG and $LC_ALL into +# consideration when displaying $file (suffix ".$LC_ALL" or ".$LANG" will +# automatically be added prior to loading the language help-file). +# +# If a language has been requested by setting either $LANG or $LC_ALL in the +# environment and the language-specific help-file does not exist we will fall +# back to $file without-suffix. +# +# If the language help-file does not exist, an error is displayed instead. +# +f_show_help() +{ + local file="$1" + local lang="${LANG:-$LC_ALL}" + + [ -f "$file.$lang" ] && file="$file.$lang" + + # + # Use f_dialog_textbox from dialog.subr if possible, otherwise fall + # back to dialog(1) (without options, making it obvious when using + # un-aided system dialog). + # + if f_have f_dialog_textbox; then + f_dialog_textbox "$file" + else + dialog --msgbox "$( cat "$file" 2>&1 )" 0 0 + fi +} + # f_include $file # # Include a shell subroutine file. @@ -179,40 +210,6 @@ f_include_lang() fi } -# f_include_help NAME [$file] -# -# When given both arguments, cache the contents of a language help-file to -# later be retrieved by executing again with only the first argument. -# -# Automatically takes $LANG and $LC_ALL into consideration when reading $file -# (suffix ".$LC_ALL" or ".$LANG" will automatically be added prior to loading -# the language help-file). -# -# If a language has been requested by setting either $LANG or $LC_ALL in the -# environment and the language-specific help-file does not exist we will fall -# back to $file without-suffix. -# -# If the language help-file does not exist, an error is cached in place of the -# help-file contents. -# -f_include_help() -{ - local name="$1" file="$2" - - if [ "$file" ]; then - local lang="${LANG:-$LC_ALL}" - - f_dprintf "name=[$name] lang=[$lang]" - if [ -f "$file.$lang" ]; then - setvar HELP_${name}_$$ "$( cat "$file.$lang" 2>&1 )" - else - setvar HELP_${name}_$$ "$( cat "$file" 2>&1 )" - fi - else - eval echo \"\$HELP_${name}_$$\" - fi -} - # f_usage $file [ $key1 $value1 ... ] # # Display USAGE file with optional pre-processor macro definitions. The first Modified: head/usr.sbin/bsdconfig/share/dialog.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/dialog.subr Fri Oct 26 00:30:44 2012 (r242106) +++ head/usr.sbin/bsdconfig/share/dialog.subr Fri Oct 26 00:31:25 2012 (r242107) @@ -1015,6 +1015,48 @@ f_dialog_msgbox() --msgbox \"\$msg_text\" $size } +############################################################ TEXTBOX FUNCTIONS + +# f_dialog_textbox $file +# +# Display the contents of $file (or an error if $file does not exist, etc.) in +# a dialog(1) textbox (which has a scrollable region for the text). The textbox +# remains until the user presses ENTER or ESC, acknowledging the modal dialog. +# +# If the user presses ENTER, the exit status is zero (success), otherwise if +# the user presses ESC the exit status is 255. +# +f_dialog_textbox() +{ + [ "$DIALOG_SELF_INITIALIZE" ] && f_dialog_init + + local file="$1" + local contents retval size + + contents=$( cat "$file" 2>&1 ) + retval=$? + + size=$( f_dialog_buttonbox_size \ + "$DIALOG_TITLE" \ + "$DIALOG_BACKTITLE" \ + "$contents" ) + + if [ $retval -eq $SUCCESS ]; then + eval $DIALOG \ + --title \"\$DIALOG_TITLE\" \ + --backtitle \"\$DIALOG_BACKTITLE\" \ + --exit-label \"\$msg_ok\" \ + --no-cancel \ + --textbox \"\$file\" $size + else + eval $DIALOG \ + --title \"\$DIALOG_TITLE\" \ + --backtitle \"\$DIALOG_BACKTITLE\" \ + --ok-label \"\$msg_ok\" \ + --msgbox \"\$msg_text\" $size + fi +} + ############################################################ YESNO FUNCTIONS # f_dialog_yesno $msg_text ... From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 00:32: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 E3C087F4; Fri, 26 Oct 2012 00:32:28 +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 C96CD8FC0A; Fri, 26 Oct 2012 00:32: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 q9Q0WS0o081951; Fri, 26 Oct 2012 00:32:28 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9Q0WSa1081949; Fri, 26 Oct 2012 00:32:28 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201210260032.q9Q0WSa1081949@svn.freebsd.org> From: Xin LI Date: Fri, 26 Oct 2012 00:32:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r242108 - stable/7/sys/dev/hptmv X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 00:32:29 -0000 Author: delphij Date: Fri Oct 26 00:32:28 2012 New Revision: 242108 URL: http://svn.freebsd.org/changeset/base/242108 Log: MFC r240210: It seems that what the code really meant is that when a write is completed, do a BUS_DMASYNC_POSTWRITE over the DMA map. The way it currently is would only do POSTREAD for read transactions. Submitted by: Sascha Wildner Modified: stable/7/sys/dev/hptmv/entry.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/hptmv/entry.c ============================================================================== --- stable/7/sys/dev/hptmv/entry.c Fri Oct 26 00:31:25 2012 (r242107) +++ stable/7/sys/dev/hptmv/entry.c Fri Oct 26 00:32:28 2012 (r242108) @@ -3047,7 +3047,7 @@ fOsCommandDone(_VBUS_ARG PCommand pCmd) if (pCmd->cf_data_in) { bus_dmamap_sync(pAdapter->io_dma_parent, pmap->dma_map, BUS_DMASYNC_POSTREAD); } - else if (pCmd->cf_data_in) { + else if (pCmd->cf_data_out) { bus_dmamap_sync(pAdapter->io_dma_parent, pmap->dma_map, BUS_DMASYNC_POSTWRITE); } From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 00:34: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 230309C3; Fri, 26 Oct 2012 00:34: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 0B1C68FC0C; Fri, 26 Oct 2012 00:34: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 q9Q0YR3E082299; Fri, 26 Oct 2012 00:34:27 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9Q0YRmY082297; Fri, 26 Oct 2012 00:34:27 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210260034.q9Q0YRmY082297@svn.freebsd.org> From: Eitan Adler Date: Fri, 26 Oct 2012 00:34:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242109 - stable/9/games/fortune/datfiles X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 00:34:28 -0000 Author: eadler Date: Fri Oct 26 00:34:27 2012 New Revision: 242109 URL: http://svn.freebsd.org/changeset/base/242109 Log: MFC r241845,r241934: Sysinstall has been removed from base. Approved by: cperciva (implicit) Modified: stable/9/games/fortune/datfiles/freebsd-tips Directory Properties: stable/9/games/fortune/ (props changed) Modified: stable/9/games/fortune/datfiles/freebsd-tips ============================================================================== --- stable/9/games/fortune/datfiles/freebsd-tips Fri Oct 26 00:32:28 2012 (r242108) +++ stable/9/games/fortune/datfiles/freebsd-tips Fri Oct 26 00:34:27 2012 (r242109) @@ -40,7 +40,7 @@ Having trouble using fetch through a fir variable FTP_PASSIVE_MODE to yes, and see fetch(3) for more details. % If other operating systems have damaged your Master Boot Record, you can -reinstall it either with /usr/sbin/sysinstall or with boot0cfg(8). See +reinstall it with boot0cfg(8). See "man boot0cfg" for details. % If you accidentally end up inside vi, you can quit it by pressing Escape, colon From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 00:35: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 7B6F9B43; Fri, 26 Oct 2012 00:35:29 +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 62E458FC1A; Fri, 26 Oct 2012 00:35: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 q9Q0ZT0A082481; Fri, 26 Oct 2012 00:35:29 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9Q0ZTje082478; Fri, 26 Oct 2012 00:35:29 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210260035.q9Q0ZTje082478@svn.freebsd.org> From: Eitan Adler Date: Fri, 26 Oct 2012 00:35:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242110 - stable/8/games/fortune/datfiles X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 00:35:29 -0000 Author: eadler Date: Fri Oct 26 00:35:28 2012 New Revision: 242110 URL: http://svn.freebsd.org/changeset/base/242110 Log: MFC r241845,r241934: Sysinstall has been removed from base. MFC farther back to maintain consistency Approved by: cperciva (implicit) Modified: stable/8/games/fortune/datfiles/freebsd-tips Directory Properties: stable/8/games/fortune/ (props changed) Modified: stable/8/games/fortune/datfiles/freebsd-tips ============================================================================== --- stable/8/games/fortune/datfiles/freebsd-tips Fri Oct 26 00:34:27 2012 (r242109) +++ stable/8/games/fortune/datfiles/freebsd-tips Fri Oct 26 00:35:28 2012 (r242110) @@ -40,7 +40,7 @@ Having trouble using fetch through a fir variable FTP_PASSIVE_MODE to yes, and see fetch(3) for more details. % If other operating systems have damaged your Master Boot Record, you can -reinstall it either with /usr/sbin/sysinstall or with boot0cfg(8). See +reinstall it with boot0cfg(8). See "man boot0cfg" for details. % If you accidentally end up inside vi, you can quit it by pressing Escape, colon From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 00:35: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 E8AD6B44; Fri, 26 Oct 2012 00:35:30 +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 D076A8FC16; Fri, 26 Oct 2012 00:35: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 q9Q0ZUJB082517; Fri, 26 Oct 2012 00:35:30 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9Q0ZUft082515; Fri, 26 Oct 2012 00:35:30 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210260035.q9Q0ZUft082515@svn.freebsd.org> From: Eitan Adler Date: Fri, 26 Oct 2012 00:35:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r242111 - stable/7/games/fortune/datfiles X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 00:35:31 -0000 Author: eadler Date: Fri Oct 26 00:35:30 2012 New Revision: 242111 URL: http://svn.freebsd.org/changeset/base/242111 Log: MFC r241845,r241934: Sysinstall has been removed from base. MFC farther back to maintain consistency Approved by: cperciva (implicit) Modified: stable/7/games/fortune/datfiles/freebsd-tips Directory Properties: stable/7/games/fortune/ (props changed) Modified: stable/7/games/fortune/datfiles/freebsd-tips ============================================================================== --- stable/7/games/fortune/datfiles/freebsd-tips Fri Oct 26 00:35:28 2012 (r242110) +++ stable/7/games/fortune/datfiles/freebsd-tips Fri Oct 26 00:35:30 2012 (r242111) @@ -40,7 +40,7 @@ Having trouble using fetch through a fir variable FTP_PASSIVE_MODE to yes, and see fetch(3) for more details. % If other operating systems have damaged your Master Boot Record, you can -reinstall it either with /usr/sbin/sysinstall or with boot0cfg(8). See +reinstall it with boot0cfg(8). See "man boot0cfg" for details. % If you accidentally end up inside vi, you can quit it by pressing Escape, colon From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 00:44: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 2CF65D7; Fri, 26 Oct 2012 00:44:33 +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 135778FC0A; Fri, 26 Oct 2012 00:44: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 q9Q0iWHW084290; Fri, 26 Oct 2012 00:44:32 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9Q0iW7G084283; Fri, 26 Oct 2012 00:44:32 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210260044.q9Q0iW7G084283@svn.freebsd.org> From: Eitan Adler Date: Fri, 26 Oct 2012 00:44:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242112 - in stable/9: . sys/modules/3dfx sys/modules/cmx sys/modules/filemon tools/tools/sysdoc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 00:44:33 -0000 Author: eadler Date: Fri Oct 26 00:44:32 2012 New Revision: 242112 URL: http://svn.freebsd.org/changeset/base/242112 Log: MFC r241828,r241891: Finish migration of MAINTAINER entries Approved by: cperciva (implicit) Modified: stable/9/MAINTAINERS (contents, props changed) stable/9/sys/modules/3dfx/Makefile stable/9/sys/modules/cmx/Makefile stable/9/sys/modules/filemon/Makefile stable/9/tools/tools/sysdoc/Makefile Directory Properties: stable/9/sys/ (props changed) stable/9/sys/modules/ (props changed) stable/9/tools/tools/sysdoc/ (props changed) Modified: stable/9/MAINTAINERS ============================================================================== --- stable/9/MAINTAINERS Fri Oct 26 00:35:30 2012 (r242111) +++ stable/9/MAINTAINERS Fri Oct 26 00:44:32 2012 (r242112) @@ -127,16 +127,7 @@ sysinstall randi Please contact about an they can be co-ordinated. sbin/routed bms Pre-commit review; notify vendor at rhyolite.com isci(4) jimharris Pre-commit review requested. - -Following are the entries from the Makefiles, and a few other sources. -Please remove stale entries from both their origin, and this file. - -Please also consider removing the lines from the files listed below and -stating your preferences here instead. - -List below generated with: -$ cd /usr/src; find */* -type f|xargs egrep 'MAINTAINER[ ]*=' - -sys/modules/3dfx/Makefile:MAINTAINER= cokane@FreeBSD.org -sys/modules/urio/Makefile:MAINTAINER= Iwasa Kazmi -tools/tools/sysdoc/Makefile:MAINTAINER= trhodes@FreeBSD.org +3dfx cokane Pre-commit review preferred. +cmx daniel@roe.ch Pre-commit review preferred. +filemon obrien Pre-commit review preferred. +sysdoc trhodes Pre-commit review preferred. Modified: stable/9/sys/modules/3dfx/Makefile ============================================================================== --- stable/9/sys/modules/3dfx/Makefile Fri Oct 26 00:35:30 2012 (r242111) +++ stable/9/sys/modules/3dfx/Makefile Fri Oct 26 00:44:32 2012 (r242112) @@ -1,7 +1,5 @@ # $FreeBSD$ -MAINTAINER= cokane@FreeBSD.org - .PATH: $(.CURDIR)/../../dev/tdfx KMOD= 3dfx Modified: stable/9/sys/modules/cmx/Makefile ============================================================================== --- stable/9/sys/modules/cmx/Makefile Fri Oct 26 00:35:30 2012 (r242111) +++ stable/9/sys/modules/cmx/Makefile Fri Oct 26 00:44:32 2012 (r242112) @@ -1,7 +1,5 @@ # $FreeBSD$ # -MAINTAINER= daniel@roe.ch - .PATH: ${.CURDIR}/../../dev/cmx KMOD= cmx Modified: stable/9/sys/modules/filemon/Makefile ============================================================================== --- stable/9/sys/modules/filemon/Makefile Fri Oct 26 00:35:30 2012 (r242111) +++ stable/9/sys/modules/filemon/Makefile Fri Oct 26 00:44:32 2012 (r242112) @@ -1,7 +1,5 @@ # $FreeBSD$ -MAINTAINER= obrien@FreeBSD.org - .PATH: ${.CURDIR}/../../dev/filemon KMOD= filemon Modified: stable/9/tools/tools/sysdoc/Makefile ============================================================================== --- stable/9/tools/tools/sysdoc/Makefile Fri Oct 26 00:35:30 2012 (r242111) +++ stable/9/tools/tools/sysdoc/Makefile Fri Oct 26 00:44:32 2012 (r242112) @@ -1,7 +1,5 @@ # $FreeBSD$ -MAINTAINER= trhodes@FreeBSD.org - sysctl.5: sh ${.CURDIR}/sysdoc.sh -k /boot/kernel From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 00:44: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 6FCD9D8; Fri, 26 Oct 2012 00:44:35 +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 56DB98FC12; Fri, 26 Oct 2012 00:44: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 q9Q0iZAI084337; Fri, 26 Oct 2012 00:44:35 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9Q0iZWk084330; Fri, 26 Oct 2012 00:44:35 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210260044.q9Q0iZWk084330@svn.freebsd.org> From: Eitan Adler Date: Fri, 26 Oct 2012 00:44:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242113 - in stable/8: . sys/modules/3dfx sys/modules/cmx sys/modules/filemon tools/tools/sysdoc X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 00:44:35 -0000 Author: eadler Date: Fri Oct 26 00:44:34 2012 New Revision: 242113 URL: http://svn.freebsd.org/changeset/base/242113 Log: MFC r241828,r241891: Finish migration of MAINTAINER entries Approved by: cperciva (implicit) Modified: stable/8/MAINTAINERS (contents, props changed) stable/8/sys/modules/3dfx/Makefile stable/8/sys/modules/cmx/Makefile stable/8/sys/modules/filemon/Makefile stable/8/tools/tools/sysdoc/Makefile Directory Properties: stable/8/sys/ (props changed) stable/8/sys/modules/ (props changed) stable/8/tools/tools/sysdoc/ (props changed) Modified: stable/8/MAINTAINERS ============================================================================== --- stable/8/MAINTAINERS Fri Oct 26 00:44:32 2012 (r242112) +++ stable/8/MAINTAINERS Fri Oct 26 00:44:34 2012 (r242113) @@ -125,17 +125,7 @@ usr.sbin/bluetooth emax Pre-commit revie gnu/usr.bin/send-pr bugmaster Pre-commit review requested. ncurses rafan Heads-up appreciated, try not to break it. isci(4) jimharris Pre-commit review requested. - -Following are the entries from the Makefiles, and a few other sources. -Please remove stale entries from both their origin, and this file. - -Please also consider removing the lines from the files listed below and -stating your preferences here instead. - -List below generated with: -$ cd /usr/src; find */* -type f|xargs egrep 'MAINTAINER[ ]*=' - -sys/modules/3dfx/Makefile:MAINTAINER= cokane@FreeBSD.org -sys/modules/urio/Makefile:MAINTAINER= Iwasa Kazmi -tools/tools/sysdoc/Makefile:MAINTAINER= trhodes@FreeBSD.org -usr.sbin/zic/Makefile:MAINTAINER= wollman@FreeBSD.org +3dfx cokane Pre-commit review preferred. +cmx daniel@roe.ch Pre-commit review preferred. +filemon obrien Pre-commit review preferred. +sysdoc trhodes Pre-commit review preferred. Modified: stable/8/sys/modules/3dfx/Makefile ============================================================================== --- stable/8/sys/modules/3dfx/Makefile Fri Oct 26 00:44:32 2012 (r242112) +++ stable/8/sys/modules/3dfx/Makefile Fri Oct 26 00:44:34 2012 (r242113) @@ -1,7 +1,5 @@ # $FreeBSD$ -MAINTAINER= cokane@FreeBSD.org - .PATH: $(.CURDIR)/../../dev/tdfx KMOD= 3dfx Modified: stable/8/sys/modules/cmx/Makefile ============================================================================== --- stable/8/sys/modules/cmx/Makefile Fri Oct 26 00:44:32 2012 (r242112) +++ stable/8/sys/modules/cmx/Makefile Fri Oct 26 00:44:34 2012 (r242113) @@ -1,7 +1,5 @@ # $FreeBSD$ # -MAINTAINER= daniel@roe.ch - .PATH: ${.CURDIR}/../../dev/cmx KMOD= cmx Modified: stable/8/sys/modules/filemon/Makefile ============================================================================== --- stable/8/sys/modules/filemon/Makefile Fri Oct 26 00:44:32 2012 (r242112) +++ stable/8/sys/modules/filemon/Makefile Fri Oct 26 00:44:34 2012 (r242113) @@ -1,7 +1,5 @@ # $FreeBSD$ -MAINTAINER= obrien@FreeBSD.org - .PATH: ${.CURDIR}/../../dev/filemon KMOD= filemon Modified: stable/8/tools/tools/sysdoc/Makefile ============================================================================== --- stable/8/tools/tools/sysdoc/Makefile Fri Oct 26 00:44:32 2012 (r242112) +++ stable/8/tools/tools/sysdoc/Makefile Fri Oct 26 00:44:34 2012 (r242113) @@ -1,7 +1,5 @@ # $FreeBSD$ -MAINTAINER= trhodes@FreeBSD.org - sysctl.5: sh ${.CURDIR}/sysdoc.sh -k /boot/kernel From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 00:46:10 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 0DC203B7; Fri, 26 Oct 2012 00:46:10 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EAE4C8FC14; Fri, 26 Oct 2012 00:46: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 q9Q0k9BX084660; Fri, 26 Oct 2012 00:46:09 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9Q0k9RQ084658; Fri, 26 Oct 2012 00:46:09 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201210260046.q9Q0k9RQ084658@svn.freebsd.org> From: Devin Teske Date: Fri, 26 Oct 2012 00:46:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242114 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 00:46:10 -0000 Author: dteske Date: Fri Oct 26 00:46:09 2012 New Revision: 242114 URL: http://svn.freebsd.org/changeset/base/242114 Log: Fix copy/paste error. Approved by: adrian (co-mentor) (implicit) Modified: head/usr.sbin/bsdconfig/share/dialog.subr Modified: head/usr.sbin/bsdconfig/share/dialog.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/dialog.subr Fri Oct 26 00:44:34 2012 (r242113) +++ head/usr.sbin/bsdconfig/share/dialog.subr Fri Oct 26 00:46:09 2012 (r242114) @@ -1053,7 +1053,7 @@ f_dialog_textbox() --title \"\$DIALOG_TITLE\" \ --backtitle \"\$DIALOG_BACKTITLE\" \ --ok-label \"\$msg_ok\" \ - --msgbox \"\$msg_text\" $size + --msgbox \"\$contents\" $size fi } From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 01:13: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 94B2E9BA; Fri, 26 Oct 2012 01:13:00 +0000 (UTC) (envelope-from Devin.Teske@fisglobal.com) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) by mx1.freebsd.org (Postfix) with ESMTP id 46B698FC1B; Fri, 26 Oct 2012 01:12:59 +0000 (UTC) Received: from smtp.fisglobal.com ([10.132.206.17]) by ltcfislmsgpa07.fnfis.com (8.14.5/8.14.5) with ESMTP id q9Q1CwZn010427 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Thu, 25 Oct 2012 20:12:58 -0500 Received: from [10.0.0.101] (10.14.152.61) by smtp.fisglobal.com (10.132.206.17) with Microsoft SMTP Server (TLS) id 14.2.309.2; Thu, 25 Oct 2012 20:09:32 -0500 Subject: Re: svn commit: r241701 - in head/usr.sbin/bsdconfig: . include share MIME-Version: 1.0 (Apple Message framework v1283) From: Devin Teske In-Reply-To: <20121021181024.GE92674@FreeBSD.org> Date: Thu, 25 Oct 2012 18:09:31 -0700 Message-ID: <0F57FE3C-EA9C-4763-A8F1-FE2024044D03@fisglobal.com> References: <201210181843.q9IIhs6N099621@svn.freebsd.org> <20121019055442.GA9108@FreeBSD.org> <20121019170216.GB92674@FreeBSD.org> <44662B32-966F-4573-987D-EEE8A07C5A16@fisglobal.com> <20121021181024.GE92674@FreeBSD.org> To: Alexey Dokuchaev X-Mailer: Apple Mail (2.1283) X-Originating-IP: [10.14.152.61] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.7.7855, 1.0.431, 0.0.0000 definitions=2012-10-25_06:2012-10-25,2012-10-25,1970-01-01 signatures=0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Devin Teske , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Devin Teske List-Id: "SVN commit messages 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, 26 Oct 2012 01:13:00 -0000 On Oct 21, 2012, at 11:10 AM, Alexey Dokuchaev wrote: > On Fri, Oct 19, 2012 at 11:36:04AM -0700, Devin Teske wrote: >> On Oct 19, 2012, at 10:02 AM, Alexey Dokuchaev wrote: >>> Ah, I guess it might explain the shitty colors I see on newish FreeBSD >>> screenshots of dialog(1). >>=20 >> I actually prefer the colors in cdialog (more specifically, I prefer the >> lack-of-yellow!). >>=20 >> I'm curious about how others feel about the use of yellow (specifically >> that old dialog(1)/libdialog used it a lot and new cdialog-based dialog(= 1)/ >> libdialog doesn't use it hardly at all). >=20 > While you probably know my opinion at this point, I'd like to remark that= our > original dialog(1) colors seem like one of our distinctive features (simi= lar > to e.g. RedHat's or Debian's text-based installers) that had been around = for > years and are immediately recognizable. It is sad to loose them. >=20 Hmm, you make an interesting point and I think I know why the change in col= ors. I saw this hit my inbox recently: %begin excerpt% --- head/contrib/dialog/CHANGES Sun Oct 21 18:18:49 2012 (r241817) +++ head/contrib/dialog/CHANGES Sun Oct 21 18:25:12 2012 (r241818) @@ -1,9 +1,172 @@ --- $Id: CHANGES,v 1.360 2011/07/07 23:35:10 tom Exp $ +-- $Id: CHANGES,v 1.419 2012/07/06 18:18:48 tom Exp $ -- Thomas E. Dickey This version of dialog was originally from a Debian snapshot. I've done th= is to it: %end excerpt% The dialog(1) that we're using in 9+ was originally from Debian and then "t= om" makes a bunch of modifications (and I think our own nwhitehorn might ma= ke some more changes). I think this explains the [recent] similarity in color choices. I think you make a good point about diminished diversity. However, I'd inqu= ire with nwhitehorn about any/all changes to the dialog(1) contrib code as = it is still vendor maintained (and he's the one doing the importing these d= ays). >> It is possible to change the colorings by first creating (if you don't >> already have one) a ~/.dialogrc by executing the below command: >>=20 >> dialog --create-rc ~/.dialogrc >>=20 >> followed by editing said file. >>=20 >> So while the default look and feel has changed, it's possible to customi= ze >> it to your liking. >=20 > I would wholeheartedly prefer us to have original colors by default, and = to Changing the default colors introduces [more] maintenance for the importer/= maintainer of the contrib code. Exactly how much more maintenance, I'm unsu= re of. > provide alternative color scheme for those how experience some difficulti= es > with them (e.g. MacOSX users), not the other way around. >=20 Mac OS X was only one example, and I agree it should not be the sole source= of reasoning here. However, I experience the same problem using XTerm nati= vely on FreeBSD. My personal issue although has already been heard on the t= opic (unable to see the yellow titles, yellow hlines, or pretty much any ye= llow on a light background) -- so I'm inclined to not push too hard in rest= oring the original coloring _exactly_ as it was (read: I think we can do be= tter). --=20 Devin _____________ The information contained in this message is proprietary and/or confidentia= l. If you are not the intended recipient, please: (i) delete the message an= d all copies; (ii) do not disclose, distribute or use the message in any ma= nner; and (iii) notify the sender immediately. In addition, please be aware= that any message addressed to our domain is subject to archiving and revie= w by persons other than the intended recipient. Thank you. From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 01:48: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 4D195EB7; Fri, 26 Oct 2012 01:48:00 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E9F68FC08; Fri, 26 Oct 2012 01:48: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 q9Q1m0Fh095288; Fri, 26 Oct 2012 01:48:00 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9Q1lx52095278; Fri, 26 Oct 2012 01:47:59 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201210260147.q9Q1lx52095278@svn.freebsd.org> From: Devin Teske Date: Fri, 26 Oct 2012 01:47:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242115 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 01:48:00 -0000 Author: dteske Date: Fri Oct 26 01:47:59 2012 New Revision: 242115 URL: http://svn.freebsd.org/changeset/base/242115 Log: Tighten-up displays that use a NULL prompt (e.g., networking and usermgmt). Approved by: adrian (co-mentor) (implicit) Modified: head/usr.sbin/bsdconfig/share/dialog.subr Modified: head/usr.sbin/bsdconfig/share/dialog.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/dialog.subr Fri Oct 26 00:46:09 2012 (r242114) +++ head/usr.sbin/bsdconfig/share/dialog.subr Fri Oct 26 01:47:59 2012 (r242115) @@ -272,7 +272,7 @@ f_dialog_infobox_size() # # Set height based on number of rows in prompt # - height=$( echo "$prompt" | f_number_of_lines ) + height=$( echo -n "$prompt" | f_number_of_lines ) height=$(( $height + 2 )) # From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 02:09: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 4359A28C; Fri, 26 Oct 2012 02:09: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 223A58FC0C; Fri, 26 Oct 2012 02:09: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 q9Q29tCt098683; Fri, 26 Oct 2012 02:09:55 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9Q29t1G098681; Fri, 26 Oct 2012 02:09:55 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201210260209.q9Q29t1G098681@svn.freebsd.org> From: Juli Mallett Date: Fri, 26 Oct 2012 02:09:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242116 - head/sys/contrib/octeon-sdk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 02:09:56 -0000 Author: jmallett Date: Fri Oct 26 02:09:55 2012 New Revision: 242116 URL: http://svn.freebsd.org/changeset/base/242116 Log: No MII on the RSYS4GBE (AMC-7211/ATCA-7220). Modified: head/sys/contrib/octeon-sdk/cvmx-helper-board.c Modified: head/sys/contrib/octeon-sdk/cvmx-helper-board.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-helper-board.c Fri Oct 26 01:47:59 2012 (r242115) +++ head/sys/contrib/octeon-sdk/cvmx-helper-board.c Fri Oct 26 02:09:55 2012 (r242116) @@ -586,6 +586,11 @@ int cvmx_helper_board_get_mii_address(in return -1; } #endif +#if defined(OCTEON_VENDOR_RADISYS) + case CVMX_BOARD_TYPE_CUST_RADISYS_RSYS4GBE: + /* No MII. */ + return -1; +#endif } /* Some unknown board. Somebody forgot to update this function... */ From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 02:45: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 91F96753; Fri, 26 Oct 2012 02:45:30 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7805B8FC12; Fri, 26 Oct 2012 02:45: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 q9Q2jUVm004231; Fri, 26 Oct 2012 02:45:30 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9Q2jUQa004227; Fri, 26 Oct 2012 02:45:30 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201210260245.q9Q2jUQa004227@svn.freebsd.org> From: Devin Teske Date: Fri, 26 Oct 2012 02:45:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242117 - in head/usr.sbin/bsdconfig/networking: include share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 02:45:30 -0000 Author: dteske Date: Fri Oct 26 02:45:29 2012 New Revision: 242117 URL: http://svn.freebsd.org/changeset/base/242117 Log: Resurrect and integrate stable/9/sysinstall/help/tcp.hlp Approved by: adrian (co-mentor) (implicit) Added: head/usr.sbin/bsdconfig/networking/include/tcp.hlp (contents, props changed) Modified: head/usr.sbin/bsdconfig/networking/include/Makefile head/usr.sbin/bsdconfig/networking/share/device.subr Modified: head/usr.sbin/bsdconfig/networking/include/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/networking/include/Makefile Fri Oct 26 02:09:55 2012 (r242116) +++ head/usr.sbin/bsdconfig/networking/include/Makefile Fri Oct 26 02:45:29 2012 (r242117) @@ -3,7 +3,7 @@ NO_OBJ= FILESDIR= ${LIBEXECDIR}/bsdconfig/120.networking/include -FILES= messages.subr +FILES= messages.subr tcp.hlp beforeinstall: mkdir -p ${DESTDIR}${FILESDIR} Added: head/usr.sbin/bsdconfig/networking/include/tcp.hlp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bsdconfig/networking/include/tcp.hlp Fri Oct 26 02:45:29 2012 (r242117) @@ -0,0 +1,33 @@ +This screen allows you to set up your general network parameters +(hostname, domain name, DNS server, etc) as well as the settings for a +given interface (which was selected from the menu before this screen). + +PLIP/SLIP users - please read through to the end of this doc! + +The "options" field is kind of special (read: a hack :-): + +Any valid options to ifconfig can be specified here, so if you need +to do something "special" to get your interface working, then here +is the place to do it. + +If you're running SLIP or PLIP, you also need to use it for specifying +the remote end of the link (simply type the foreign IP address in). +In the specific case where you're running PLIP with a Linux host peer +rather than a FreeBSD one, you also must add the "-link0" flag after the +foreign address. + +If you're dealing with an ethernet adaptor with multiple media +connectors (e.g. AUI, 10BT, 10B2, etc), you can use this field to +specify which one to use. Examples of valid strings include: + + "media 10base5/AUI" - Select the AUI port. + "media 10baseT/UTP" - Select the twisted pair port. + "media 10base2/BNC" - Select the BNC connector. + "media 100baseTX" - Select 100BaseT on a 100/10 dual adaptor. + +If you have a wireless interface and must specify arguments such as a +WEP key here, you may use something like: + + "wepmode on wepkey 0xFEEDFACE" + +When you're done with this form, select OK. Modified: head/usr.sbin/bsdconfig/networking/share/device.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/device.subr Fri Oct 26 02:09:55 2012 (r242116) +++ head/usr.sbin/bsdconfig/networking/share/device.subr Fri Oct 26 02:45:29 2012 (r242117) @@ -42,6 +42,8 @@ f_include $BSDCFG_SHARE/networking/routi BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="120.networking" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr +TCP_HELPFILE=$BSDCFG_LIBE/$APP_DIR/include/tcp.hlp + ############################################################ GLOBALS # @@ -342,6 +344,8 @@ f_dialog_menu_netdev_edit() --hline \"\$hline\" \ --ok-label \"\$msg_ok\" \ --cancel-label \"\$msg_cancel\" \ + --help-button \ + ${USE_XDIALOG:+--help \"\"} \ --menu \"\$prompt\" $size \ $menu_list \ 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD @@ -351,8 +355,14 @@ f_dialog_menu_netdev_edit() setvar DIALOG_MENU_$$ "$dialog_menu" local tag="$( f_dialog_menutag )" - # Return if "Cancel" was chosen (-1) or ESC was pressed (255) - [ $retval -eq $SUCCESS ] || return $retval + if [ $retval -eq 2 ]; then + # The Help button was pressed + f_show_help "$TCP_HELPFILE" + continue + elif [ $retval -ne $SUCCESS ]; then + # "Cancel" was chosen (-1) or ESC was pressed (255) + return $retval + fi # # Call the below ``modifier functions'' whose job it is to take From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 02:49: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 656998D5; Fri, 26 Oct 2012 02:49:13 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4D2398FC0A; Fri, 26 Oct 2012 02:49: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 q9Q2nDbA004875; Fri, 26 Oct 2012 02:49:13 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9Q2nDwO004873; Fri, 26 Oct 2012 02:49:13 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201210260249.q9Q2nDwO004873@svn.freebsd.org> From: Devin Teske Date: Fri, 26 Oct 2012 02:49:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242118 - head/usr.sbin/bsdconfig/networking/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 02:49:13 -0000 Author: dteske Date: Fri Oct 26 02:49:12 2012 New Revision: 242118 URL: http://svn.freebsd.org/changeset/base/242118 Log: Don't mask fwe(4) lp(4) or plip(4) devices from ifconfig(8) list. Approved by: adrian (co-mentor) (implicit) Modified: head/usr.sbin/bsdconfig/networking/share/device.subr Modified: head/usr.sbin/bsdconfig/networking/share/device.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/device.subr Fri Oct 26 02:45:29 2012 (r242117) +++ head/usr.sbin/bsdconfig/networking/share/device.subr Fri Oct 26 02:49:12 2012 (r242118) @@ -205,10 +205,7 @@ f_dialog_menu_netdev() s/lo$d//g s/ppp$d//g s/sl$d//g - s/lp$d//g - s/fwe$d//g s/faith$d//g - s/plip$d//g # Convert all colons back into spaces y/:/ / From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 02: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 80552A5F; Fri, 26 Oct 2012 02:50:15 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 67F928FC08; Fri, 26 Oct 2012 02:50: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 q9Q2oFiO005102; Fri, 26 Oct 2012 02:50:15 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9Q2oF4e005099; Fri, 26 Oct 2012 02:50:15 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201210260250.q9Q2oF4e005099@svn.freebsd.org> From: Devin Teske Date: Fri, 26 Oct 2012 02:50:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242119 - head/usr.sbin/bsdconfig/networking/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 02:50:15 -0000 Author: dteske Date: Fri Oct 26 02:50:14 2012 New Revision: 242119 URL: http://svn.freebsd.org/changeset/base/242119 Log: Remove unnecessary quotation to clean things up. Approved by: adrian (co-mentor) (implicit) Modified: head/usr.sbin/bsdconfig/networking/share/device.subr Modified: head/usr.sbin/bsdconfig/networking/share/device.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/device.subr Fri Oct 26 02:49:12 2012 (r242118) +++ head/usr.sbin/bsdconfig/networking/share/device.subr Fri Oct 26 02:50:14 2012 (r242119) @@ -243,7 +243,7 @@ f_dialog_menu_netdev() } ' ) printf "'%s%s' '%s'\n" \ - "$ifn" "${active:+*}" "$(f_device_desc "$ifn")" + $ifn "${active:+*}" "$( f_device_desc $ifn )" done ) if [ ! "$interfaces" ]; then From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 02:50: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 A47E1A60; Fri, 26 Oct 2012 02:50:17 +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 8E03E8FC0A; Fri, 26 Oct 2012 02:50: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 q9Q2oHGb005139; Fri, 26 Oct 2012 02:50:17 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9Q2oH8P005136; Fri, 26 Oct 2012 02:50:17 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210260250.q9Q2oH8P005136@svn.freebsd.org> From: Eitan Adler Date: Fri, 26 Oct 2012 02:50:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242120 - head/usr.sbin/cpucontrol X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 02:50:17 -0000 Author: eadler Date: Fri Oct 26 02:50:16 2012 New Revision: 242120 URL: http://svn.freebsd.org/changeset/base/242120 Log: This utility builds without NO_WCAST_ALIGN Tested with make universe No objections from: stas Approved by: cperciva MFC after: 3 days Modified: head/usr.sbin/cpucontrol/Makefile Modified: head/usr.sbin/cpucontrol/Makefile ============================================================================== --- head/usr.sbin/cpucontrol/Makefile Fri Oct 26 02:50:14 2012 (r242119) +++ head/usr.sbin/cpucontrol/Makefile Fri Oct 26 02:50:16 2012 (r242120) @@ -4,6 +4,4 @@ PROG= cpucontrol MAN= cpucontrol.8 SRCS= cpucontrol.c intel.c amd.c via.c -NO_WCAST_ALIGN= - .include From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 03: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 F27CB141; Fri, 26 Oct 2012 03:02:39 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D93D88FC17; Fri, 26 Oct 2012 03:02: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 q9Q32dZk007306; Fri, 26 Oct 2012 03:02:39 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9Q32dFO007302; Fri, 26 Oct 2012 03:02:39 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201210260302.q9Q32dFO007302@svn.freebsd.org> From: Alan Cox Date: Fri, 26 Oct 2012 03:02:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242121 - in head/sys: conf ia64/ia64 ia64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 03:02:40 -0000 Author: alc Date: Fri Oct 26 03:02:39 2012 New Revision: 242121 URL: http://svn.freebsd.org/changeset/base/242121 Log: Port the new PV entry allocator from amd64/i386. This allocator has two advantages. First, PV entries are roughly half the size. Second, this allocator doesn't access the paging queues, and thus it allows for the removal of the page queues lock from this pmap. Replace all uses of the page queues lock by a R/W lock that is private to this pmap. Tested by: marcel Modified: head/sys/conf/options.ia64 head/sys/ia64/ia64/pmap.c head/sys/ia64/include/pmap.h Modified: head/sys/conf/options.ia64 ============================================================================== --- head/sys/conf/options.ia64 Fri Oct 26 02:50:16 2012 (r242120) +++ head/sys/conf/options.ia64 Fri Oct 26 03:02:39 2012 (r242121) @@ -11,6 +11,8 @@ UWX_TRACE_ENABLE opt_global.h COMPAT_FREEBSD32 opt_compat.h +PV_STATS opt_pmap.h + EXCEPTION_TRACING opt_xtrace.h VGA_ALT_SEQACCESS opt_vga.h Modified: head/sys/ia64/ia64/pmap.c ============================================================================== --- head/sys/ia64/ia64/pmap.c Fri Oct 26 02:50:16 2012 (r242120) +++ head/sys/ia64/ia64/pmap.c Fri Oct 26 03:02:39 2012 (r242121) @@ -48,12 +48,15 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_pmap.h" + #include #include #include #include #include #include +#include #include #include #include @@ -108,16 +111,18 @@ __FBSDID("$FreeBSD$"); /* XXX move to a header. */ extern uint64_t ia64_gateway_page[]; -#ifndef PMAP_SHPGPERPROC -#define PMAP_SHPGPERPROC 200 -#endif - #if !defined(DIAGNOSTIC) #define PMAP_INLINE __inline #else #define PMAP_INLINE #endif +#ifdef PV_STATS +#define PV_STAT(x) do { x ; } while (0) +#else +#define PV_STAT(x) do { } while (0) +#endif + #define pmap_accessed(lpte) ((lpte)->pte & PTE_ACCESSED) #define pmap_dirty(lpte) ((lpte)->pte & PTE_DIRTY) #define pmap_exec(lpte) ((lpte)->pte & PTE_AR_RX) @@ -187,10 +192,21 @@ static uint64_t *pmap_ridmap; struct mtx pmap_ridmutex; /* + * Isolate the global pv list lock from data and other locks to prevent false + * sharing within the cache. + */ +static struct { + struct rwlock lock; + char padding[CACHE_LINE_SIZE - sizeof(struct rwlock)]; +} pvh_global __aligned(CACHE_LINE_SIZE); + +#define pvh_global_lock pvh_global.lock + +/* * Data for the pv entry allocation mechanism */ -static uma_zone_t pvzone; -static int pv_entry_count = 0, pv_entry_max = 0, pv_entry_high_water = 0; +static TAILQ_HEAD(pch, pv_chunk) pv_chunks = TAILQ_HEAD_INITIALIZER(pv_chunks); +static int pv_entry_count; /* * Data for allocating PTEs for user processes. @@ -224,8 +240,10 @@ SYSCTL_PROC(_machdep_vhpt, OID_AUTO, pop static struct ia64_lpte *pmap_find_vhpt(vm_offset_t va); -static PMAP_INLINE void free_pv_entry(pv_entry_t pv); -static pv_entry_t get_pv_entry(pmap_t locked_pmap); +static void free_pv_chunk(struct pv_chunk *pc); +static void free_pv_entry(pmap_t pmap, pv_entry_t pv); +static pv_entry_t get_pv_entry(pmap_t pmap, boolean_t try); +static vm_page_t pmap_pv_reclaim(pmap_t locked_pmap); static void pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot); @@ -402,9 +420,14 @@ pmap_bootstrap() PMAP_LOCK_INIT(kernel_pmap); for (i = 0; i < IA64_VM_MINKERN_REGION; i++) kernel_pmap->pm_rid[i] = 0; - TAILQ_INIT(&kernel_pmap->pm_pvlist); + TAILQ_INIT(&kernel_pmap->pm_pvchunk); PCPU_SET(md.current_pmap, kernel_pmap); + /* + * Initialize the global pv list lock. + */ + rw_init(&pvh_global_lock, "pmap pv global"); + /* Region 5 is mapped via the VHPT. */ ia64_set_rr(IA64_RR_BASE(5), (5 << 8) | (PAGE_SHIFT << 2) | 1); @@ -449,7 +472,6 @@ pmap_page_init(vm_page_t m) { TAILQ_INIT(&m->md.pv_list); - m->md.pv_list_count = 0; m->md.memattr = VM_MEMATTR_DEFAULT; } @@ -461,19 +483,6 @@ pmap_page_init(vm_page_t m) void pmap_init(void) { - int shpgperproc = PMAP_SHPGPERPROC; - - /* - * Initialize the address space (zone) for the pv entries. Set a - * high water mark so that the system can recover from excessive - * numbers of pv entries. - */ - pvzone = uma_zcreate("PV ENTRY", sizeof(struct pv_entry), NULL, NULL, - NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM | UMA_ZONE_NOFREE); - TUNABLE_INT_FETCH("vm.pmap.shpgperproc", &shpgperproc); - pv_entry_max = shpgperproc * maxproc + cnt.v_page_count; - TUNABLE_INT_FETCH("vm.pmap.pv_entries", &pv_entry_max); - pv_entry_high_water = 9 * (pv_entry_max / 10); ptezone = uma_zcreate("PT ENTRY", sizeof (struct ia64_lpte), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM|UMA_ZONE_NOFREE); @@ -615,7 +624,7 @@ pmap_pinit(struct pmap *pmap) PMAP_LOCK_INIT(pmap); for (i = 0; i < IA64_VM_MINKERN_REGION; i++) pmap->pm_rid[i] = pmap_allocate_rid(); - TAILQ_INIT(&pmap->pm_pvlist); + TAILQ_INIT(&pmap->pm_pvchunk); bzero(&pmap->pm_stats, sizeof pmap->pm_stats); return (1); } @@ -683,14 +692,222 @@ pmap_growkernel(vm_offset_t addr) * page management routines. ***************************************************/ +CTASSERT(sizeof(struct pv_chunk) == PAGE_SIZE); +CTASSERT(_NPCM == 6); +CTASSERT(_NPCPV == 337); + +static __inline struct pv_chunk * +pv_to_chunk(pv_entry_t pv) +{ + + return ((struct pv_chunk *)((uintptr_t)pv & ~(uintptr_t)PAGE_MASK)); +} + +#define PV_PMAP(pv) (pv_to_chunk(pv)->pc_pmap) + +#define PC_FREE0_4 0xfffffffffffffffful +#define PC_FREE5 0x000000000001fffful + +static const u_long pc_freemask[_NPCM] = { + PC_FREE0_4, PC_FREE0_4, PC_FREE0_4, + PC_FREE0_4, PC_FREE0_4, PC_FREE5 +}; + +static SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD, 0, "VM/pmap parameters"); + +SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_count, CTLFLAG_RD, &pv_entry_count, 0, + "Current number of pv entries"); + +#ifdef PV_STATS +static int pc_chunk_count, pc_chunk_allocs, pc_chunk_frees, pc_chunk_tryfail; + +SYSCTL_INT(_vm_pmap, OID_AUTO, pc_chunk_count, CTLFLAG_RD, &pc_chunk_count, 0, + "Current number of pv entry chunks"); +SYSCTL_INT(_vm_pmap, OID_AUTO, pc_chunk_allocs, CTLFLAG_RD, &pc_chunk_allocs, 0, + "Current number of pv entry chunks allocated"); +SYSCTL_INT(_vm_pmap, OID_AUTO, pc_chunk_frees, CTLFLAG_RD, &pc_chunk_frees, 0, + "Current number of pv entry chunks frees"); +SYSCTL_INT(_vm_pmap, OID_AUTO, pc_chunk_tryfail, CTLFLAG_RD, &pc_chunk_tryfail, 0, + "Number of times tried to get a chunk page but failed."); + +static long pv_entry_frees, pv_entry_allocs; +static int pv_entry_spare; + +SYSCTL_LONG(_vm_pmap, OID_AUTO, pv_entry_frees, CTLFLAG_RD, &pv_entry_frees, 0, + "Current number of pv entry frees"); +SYSCTL_LONG(_vm_pmap, OID_AUTO, pv_entry_allocs, CTLFLAG_RD, &pv_entry_allocs, 0, + "Current number of pv entry allocs"); +SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_spare, CTLFLAG_RD, &pv_entry_spare, 0, + "Current number of spare pv entries"); +#endif + +/* + * We are in a serious low memory condition. Resort to + * drastic measures to free some pages so we can allocate + * another pv entry chunk. + */ +static vm_page_t +pmap_pv_reclaim(pmap_t locked_pmap) +{ + struct pch newtail; + struct pv_chunk *pc; + struct ia64_lpte *pte; + pmap_t pmap; + pv_entry_t pv; + vm_offset_t va; + vm_page_t m, m_pc; + u_long inuse; + int bit, field, freed, idx; + + PMAP_LOCK_ASSERT(locked_pmap, MA_OWNED); + pmap = NULL; + m_pc = NULL; + TAILQ_INIT(&newtail); + while ((pc = TAILQ_FIRST(&pv_chunks)) != NULL) { + TAILQ_REMOVE(&pv_chunks, pc, pc_lru); + if (pmap != pc->pc_pmap) { + if (pmap != NULL) { + if (pmap != locked_pmap) { + pmap_switch(locked_pmap); + PMAP_UNLOCK(pmap); + } + } + pmap = pc->pc_pmap; + /* Avoid deadlock and lock recursion. */ + if (pmap > locked_pmap) + PMAP_LOCK(pmap); + else if (pmap != locked_pmap && !PMAP_TRYLOCK(pmap)) { + pmap = NULL; + TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); + continue; + } + pmap_switch(pmap); + } + + /* + * Destroy every non-wired, 8 KB page mapping in the chunk. + */ + freed = 0; + for (field = 0; field < _NPCM; field++) { + for (inuse = ~pc->pc_map[field] & pc_freemask[field]; + inuse != 0; inuse &= ~(1UL << bit)) { + bit = ffsl(inuse) - 1; + idx = field * sizeof(inuse) * NBBY + bit; + pv = &pc->pc_pventry[idx]; + va = pv->pv_va; + pte = pmap_find_vhpt(va); + KASSERT(pte != NULL, ("pte")); + if (pmap_wired(pte)) + continue; + pmap_remove_vhpt(va); + pmap_invalidate_page(va); + m = PHYS_TO_VM_PAGE(pmap_ppn(pte)); + if (pmap_accessed(pte)) + vm_page_aflag_set(m, PGA_REFERENCED); + if (pmap_dirty(pte)) + vm_page_dirty(m); + pmap_free_pte(pte, va); + TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); + if (TAILQ_EMPTY(&m->md.pv_list)) + vm_page_aflag_clear(m, PGA_WRITEABLE); + pc->pc_map[field] |= 1UL << bit; + freed++; + } + } + if (freed == 0) { + TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); + continue; + } + /* Every freed mapping is for a 8 KB page. */ + pmap->pm_stats.resident_count -= freed; + PV_STAT(pv_entry_frees += freed); + PV_STAT(pv_entry_spare += freed); + pv_entry_count -= freed; + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); + for (field = 0; field < _NPCM; field++) + if (pc->pc_map[field] != pc_freemask[field]) { + TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, + pc_list); + TAILQ_INSERT_TAIL(&newtail, pc, pc_lru); + + /* + * One freed pv entry in locked_pmap is + * sufficient. + */ + if (pmap == locked_pmap) + goto out; + break; + } + if (field == _NPCM) { + PV_STAT(pv_entry_spare -= _NPCPV); + PV_STAT(pc_chunk_count--); + PV_STAT(pc_chunk_frees++); + /* Entire chunk is free; return it. */ + m_pc = PHYS_TO_VM_PAGE(IA64_RR_MASK((vm_offset_t)pc)); + break; + } + } +out: + TAILQ_CONCAT(&pv_chunks, &newtail, pc_lru); + if (pmap != NULL) { + if (pmap != locked_pmap) { + pmap_switch(locked_pmap); + PMAP_UNLOCK(pmap); + } + } + return (m_pc); +} + /* * free the pv_entry back to the free list */ -static PMAP_INLINE void -free_pv_entry(pv_entry_t pv) +static void +free_pv_entry(pmap_t pmap, pv_entry_t pv) { + struct pv_chunk *pc; + int bit, field, idx; + + rw_assert(&pvh_global_lock, RA_WLOCKED); + PMAP_LOCK_ASSERT(pmap, MA_OWNED); + PV_STAT(pv_entry_frees++); + PV_STAT(pv_entry_spare++); pv_entry_count--; - uma_zfree(pvzone, pv); + pc = pv_to_chunk(pv); + idx = pv - &pc->pc_pventry[0]; + field = idx / (sizeof(u_long) * NBBY); + bit = idx % (sizeof(u_long) * NBBY); + pc->pc_map[field] |= 1ul << bit; + for (idx = 0; idx < _NPCM; idx++) + if (pc->pc_map[idx] != pc_freemask[idx]) { + /* + * 98% of the time, pc is already at the head of the + * list. If it isn't already, move it to the head. + */ + if (__predict_false(TAILQ_FIRST(&pmap->pm_pvchunk) != + pc)) { + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); + TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, + pc_list); + } + return; + } + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); + free_pv_chunk(pc); +} + +static void +free_pv_chunk(struct pv_chunk *pc) +{ + vm_page_t m; + + TAILQ_REMOVE(&pv_chunks, pc, pc_lru); + PV_STAT(pv_entry_spare -= _NPCPV); + PV_STAT(pc_chunk_count--); + PV_STAT(pc_chunk_frees++); + /* entire chunk is free, return it */ + m = PHYS_TO_VM_PAGE(IA64_RR_MASK((vm_offset_t)pc)); + vm_page_unwire(m, 0); + vm_page_free(m); } /* @@ -698,82 +915,67 @@ free_pv_entry(pv_entry_t pv) * when needed. */ static pv_entry_t -get_pv_entry(pmap_t locked_pmap) +get_pv_entry(pmap_t pmap, boolean_t try) { - static const struct timeval printinterval = { 60, 0 }; - static struct timeval lastprint; - struct vpgqueues *vpq; - struct ia64_lpte *pte; - pmap_t oldpmap, pmap; - pv_entry_t allocated_pv, next_pv, pv; - vm_offset_t va; + struct pv_chunk *pc; + pv_entry_t pv; vm_page_t m; + int bit, field, idx; - PMAP_LOCK_ASSERT(locked_pmap, MA_OWNED); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); - allocated_pv = uma_zalloc(pvzone, M_NOWAIT); - if (allocated_pv != NULL) { - pv_entry_count++; - if (pv_entry_count > pv_entry_high_water) - pagedaemon_wakeup(); - else - return (allocated_pv); - } - - /* - * Reclaim pv entries: At first, destroy mappings to inactive - * pages. After that, if a pv entry is still needed, destroy - * mappings to active pages. - */ - if (ratecheck(&lastprint, &printinterval)) - printf("Approaching the limit on PV entries, " - "increase the vm.pmap.shpgperproc tunable.\n"); - vpq = &vm_page_queues[PQ_INACTIVE]; + rw_assert(&pvh_global_lock, RA_WLOCKED); + PMAP_LOCK_ASSERT(pmap, MA_OWNED); + PV_STAT(pv_entry_allocs++); + pv_entry_count++; retry: - TAILQ_FOREACH(m, &vpq->pl, pageq) { - if ((m->flags & PG_MARKER) != 0 || m->hold_count || m->busy) - continue; - TAILQ_FOREACH_SAFE(pv, &m->md.pv_list, pv_list, next_pv) { - va = pv->pv_va; - pmap = pv->pv_pmap; - /* Avoid deadlock and lock recursion. */ - if (pmap > locked_pmap) - PMAP_LOCK(pmap); - else if (pmap != locked_pmap && !PMAP_TRYLOCK(pmap)) - continue; - pmap->pm_stats.resident_count--; - oldpmap = pmap_switch(pmap); - pte = pmap_find_vhpt(va); - KASSERT(pte != NULL, ("pte")); - pmap_remove_vhpt(va); - pmap_invalidate_page(va); - pmap_switch(oldpmap); - if (pmap_accessed(pte)) - vm_page_aflag_set(m, PGA_REFERENCED); - if (pmap_dirty(pte)) - vm_page_dirty(m); - pmap_free_pte(pte, va); - TAILQ_REMOVE(&pmap->pm_pvlist, pv, pv_plist); - m->md.pv_list_count--; - TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); - if (pmap != locked_pmap) - PMAP_UNLOCK(pmap); - if (allocated_pv == NULL) - allocated_pv = pv; - else - free_pv_entry(pv); + pc = TAILQ_FIRST(&pmap->pm_pvchunk); + if (pc != NULL) { + for (field = 0; field < _NPCM; field++) { + if (pc->pc_map[field]) { + bit = ffsl(pc->pc_map[field]) - 1; + break; + } + } + if (field < _NPCM) { + idx = field * sizeof(pc->pc_map[field]) * NBBY + bit; + pv = &pc->pc_pventry[idx]; + pc->pc_map[field] &= ~(1ul << bit); + /* If this was the last item, move it to tail */ + for (field = 0; field < _NPCM; field++) + if (pc->pc_map[field] != 0) { + PV_STAT(pv_entry_spare--); + return (pv); /* not full, return */ + } + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); + TAILQ_INSERT_TAIL(&pmap->pm_pvchunk, pc, pc_list); + PV_STAT(pv_entry_spare--); + return (pv); } - if (TAILQ_EMPTY(&m->md.pv_list)) - vm_page_aflag_clear(m, PGA_WRITEABLE); } - if (allocated_pv == NULL) { - if (vpq == &vm_page_queues[PQ_INACTIVE]) { - vpq = &vm_page_queues[PQ_ACTIVE]; - goto retry; + /* No free items, allocate another chunk */ + m = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | + VM_ALLOC_WIRED); + if (m == NULL) { + if (try) { + pv_entry_count--; + PV_STAT(pc_chunk_tryfail++); + return (NULL); } - panic("get_pv_entry: increase the vm.pmap.shpgperproc tunable"); + m = pmap_pv_reclaim(pmap); + if (m == NULL) + goto retry; } - return (allocated_pv); + PV_STAT(pc_chunk_count++); + PV_STAT(pc_chunk_allocs++); + pc = (struct pv_chunk *)IA64_PHYS_TO_RR7(VM_PAGE_TO_PHYS(m)); + pc->pc_pmap = pmap; + pc->pc_map[0] = pc_freemask[0] & ~1ul; /* preallocated bit 0 */ + for (field = 1; field < _NPCM; field++) + pc->pc_map[field] = pc_freemask[field]; + TAILQ_INSERT_TAIL(&pv_chunks, pc, pc_lru); + pv = &pc->pc_pventry[0]; + TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); + PV_STAT(pv_entry_spare += _NPCPV - 1); + return (pv); } /* @@ -785,15 +987,10 @@ pmap_try_insert_pv_entry(pmap_t pmap, vm pv_entry_t pv; PMAP_LOCK_ASSERT(pmap, MA_OWNED); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); - if (pv_entry_count < pv_entry_high_water && - (pv = uma_zalloc(pvzone, M_NOWAIT)) != NULL) { - pv_entry_count++; + rw_assert(&pvh_global_lock, RA_WLOCKED); + if ((pv = get_pv_entry(pmap, TRUE)) != NULL) { pv->pv_va = va; - pv->pv_pmap = pmap; - TAILQ_INSERT_TAIL(&pmap->pm_pvlist, pv, pv_plist); TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); - m->md.pv_list_count++; return (TRUE); } else return (FALSE); @@ -899,28 +1096,21 @@ pmap_find_vhpt(vm_offset_t va) static int pmap_remove_entry(pmap_t pmap, vm_page_t m, vm_offset_t va, pv_entry_t pv) { + + rw_assert(&pvh_global_lock, RA_WLOCKED); if (!pv) { - if (m->md.pv_list_count < pmap->pm_stats.resident_count) { - TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { - if (pmap == pv->pv_pmap && va == pv->pv_va) - break; - } - } else { - TAILQ_FOREACH(pv, &pmap->pm_pvlist, pv_plist) { - if (va == pv->pv_va) - break; - } + TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { + if (pmap == PV_PMAP(pv) && va == pv->pv_va) + break; } } if (pv) { TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); - m->md.pv_list_count--; if (TAILQ_FIRST(&m->md.pv_list) == NULL) vm_page_aflag_clear(m, PGA_WRITEABLE); - TAILQ_REMOVE(&pmap->pm_pvlist, pv, pv_plist); - free_pv_entry(pv); + free_pv_entry(pmap, pv); return 0; } else { return ENOENT; @@ -936,15 +1126,10 @@ pmap_insert_entry(pmap_t pmap, vm_offset { pv_entry_t pv; - pv = get_pv_entry(pmap); - pv->pv_pmap = pmap; + rw_assert(&pvh_global_lock, RA_WLOCKED); + pv = get_pv_entry(pmap, FALSE); pv->pv_va = va; - - PMAP_LOCK_ASSERT(pmap, MA_OWNED); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); - TAILQ_INSERT_TAIL(&pmap->pm_pvlist, pv, pv_plist); TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); - m->md.pv_list_count++; } /* @@ -1317,53 +1502,32 @@ pmap_map(vm_offset_t *virt, vm_offset_t * * It is assumed that the start and end are properly * rounded to the page size. + * + * Sparsely used ranges are inefficiently removed. The VHPT is + * probed for every page within the range. XXX */ void pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) { pmap_t oldpmap; vm_offset_t va; - pv_entry_t npv, pv; struct ia64_lpte *pte; + /* + * Perform an unsynchronized read. This is, however, safe. + */ if (pmap->pm_stats.resident_count == 0) return; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); oldpmap = pmap_switch(pmap); - - /* - * special handling of removing one page. a very - * common operation and easy to short circuit some - * code. - */ - if (sva + PAGE_SIZE == eva) { - pte = pmap_find_vhpt(sva); + for (va = sva; va < eva; va += PAGE_SIZE) { + pte = pmap_find_vhpt(va); if (pte != NULL) - pmap_remove_pte(pmap, pte, sva, 0, 1); - goto out; - } - - if (pmap->pm_stats.resident_count < ((eva - sva) >> PAGE_SHIFT)) { - TAILQ_FOREACH_SAFE(pv, &pmap->pm_pvlist, pv_plist, npv) { - va = pv->pv_va; - if (va >= sva && va < eva) { - pte = pmap_find_vhpt(va); - KASSERT(pte != NULL, ("pte")); - pmap_remove_pte(pmap, pte, va, pv, 1); - } - } - } else { - for (va = sva; va < eva; va += PAGE_SIZE) { - pte = pmap_find_vhpt(va); - if (pte != NULL) - pmap_remove_pte(pmap, pte, va, 0, 1); - } + pmap_remove_pte(pmap, pte, va, 0, 1); } - -out: - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); pmap_switch(oldpmap); PMAP_UNLOCK(pmap); } @@ -1389,10 +1553,10 @@ pmap_remove_all(vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_remove_all: page %p is not managed", m)); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); while ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) { struct ia64_lpte *pte; - pmap_t pmap = pv->pv_pmap; + pmap_t pmap = PV_PMAP(pv); vm_offset_t va = pv->pv_va; PMAP_LOCK(pmap); @@ -1406,7 +1570,7 @@ pmap_remove_all(vm_page_t m) PMAP_UNLOCK(pmap); } vm_page_aflag_clear(m, PGA_WRITEABLE); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); } /* @@ -1485,7 +1649,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, struct ia64_lpte *pte; boolean_t icache_inval, managed; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); oldpmap = pmap_switch(pmap); @@ -1500,9 +1664,9 @@ pmap_enter(pmap_t pmap, vm_offset_t va, while ((pte = pmap_find_pte(va)) == NULL) { pmap_switch(oldpmap); PMAP_UNLOCK(pmap); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); VM_WAIT; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); oldpmap = pmap_switch(pmap); } @@ -1591,7 +1755,7 @@ validate: if ((prot & VM_PROT_WRITE) != 0 && managed) vm_page_aflag_set(m, PGA_WRITEABLE); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); pmap_switch(oldpmap); PMAP_UNLOCK(pmap); } @@ -1619,14 +1783,14 @@ pmap_enter_object(pmap_t pmap, vm_offset VM_OBJECT_LOCK_ASSERT(m_start->object, MA_OWNED); psize = atop(end - start); m = m_start; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); oldpmap = pmap_switch(pmap); while (m != NULL && (diff = m->pindex - m_start->pindex) < psize) { pmap_enter_quick_locked(pmap, start + ptoa(diff), m, prot); m = TAILQ_NEXT(m, listq); } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); pmap_switch(oldpmap); PMAP_UNLOCK(pmap); } @@ -1645,11 +1809,11 @@ pmap_enter_quick(pmap_t pmap, vm_offset_ { pmap_t oldpmap; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); oldpmap = pmap_switch(pmap); pmap_enter_quick_locked(pmap, va, m, prot); - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); pmap_switch(oldpmap); PMAP_UNLOCK(pmap); } @@ -1664,7 +1828,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva || (m->oflags & VPO_UNMANAGED) != 0, ("pmap_enter_quick_locked: managed mapping within the clean submap")); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); + rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); if ((pte = pmap_find_pte(va)) == NULL) @@ -1845,9 +2009,9 @@ pmap_page_exists_quick(pmap_t pmap, vm_p KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_page_exists_quick: page %p is not managed", m)); rv = FALSE; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { - if (pv->pv_pmap == pmap) { + if (PV_PMAP(pv) == pmap) { rv = TRUE; break; } @@ -1855,7 +2019,7 @@ pmap_page_exists_quick(pmap_t pmap, vm_p if (loops >= 16) break; } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (rv); } @@ -1876,9 +2040,9 @@ pmap_page_wired_mappings(vm_page_t m) count = 0; if ((m->oflags & VPO_UNMANAGED) != 0) return (count); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { - pmap = pv->pv_pmap; + pmap = PV_PMAP(pv); PMAP_LOCK(pmap); oldpmap = pmap_switch(pmap); pte = pmap_find_vhpt(pv->pv_va); @@ -1888,7 +2052,7 @@ pmap_page_wired_mappings(vm_page_t m) pmap_switch(oldpmap); PMAP_UNLOCK(pmap); } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (count); } @@ -1903,33 +2067,62 @@ pmap_page_wired_mappings(vm_page_t m) void pmap_remove_pages(pmap_t pmap) { - pmap_t oldpmap; - pv_entry_t pv, npv; + struct pv_chunk *pc, *npc; + struct ia64_lpte *pte; + pv_entry_t pv; + vm_offset_t va; + vm_page_t m; + u_long inuse, bitmask; + int allfree, bit, field, idx; if (pmap != vmspace_pmap(curthread->td_proc->p_vmspace)) { printf("warning: %s called with non-current pmap\n", __func__); return; } - - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); - oldpmap = pmap_switch(pmap); - - for (pv = TAILQ_FIRST(&pmap->pm_pvlist); pv; pv = npv) { - struct ia64_lpte *pte; - - npv = TAILQ_NEXT(pv, pv_plist); - - pte = pmap_find_vhpt(pv->pv_va); - KASSERT(pte != NULL, ("pte")); - if (!pmap_wired(pte)) - pmap_remove_pte(pmap, pte, pv->pv_va, pv, 1); + TAILQ_FOREACH_SAFE(pc, &pmap->pm_pvchunk, pc_list, npc) { + allfree = 1; + for (field = 0; field < _NPCM; field++) { + inuse = ~pc->pc_map[field] & pc_freemask[field]; + while (inuse != 0) { + bit = ffsl(inuse) - 1; + bitmask = 1UL << bit; + idx = field * sizeof(inuse) * NBBY + bit; + pv = &pc->pc_pventry[idx]; + inuse &= ~bitmask; + va = pv->pv_va; + pte = pmap_find_vhpt(va); + KASSERT(pte != NULL, ("pte")); + if (pmap_wired(pte)) { + allfree = 0; + continue; + } + pmap_remove_vhpt(va); + pmap_invalidate_page(va); + m = PHYS_TO_VM_PAGE(pmap_ppn(pte)); + if (pmap_dirty(pte)) + vm_page_dirty(m); + pmap_free_pte(pte, va); + /* Mark free */ + PV_STAT(pv_entry_frees++); + PV_STAT(pv_entry_spare++); + pv_entry_count--; + pc->pc_map[field] |= bitmask; + pmap->pm_stats.resident_count--; + TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); + if (TAILQ_EMPTY(&m->md.pv_list)) + vm_page_aflag_clear(m, PGA_WRITEABLE); + } + } + if (allfree) { + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); + free_pv_chunk(pc); + } } - - pmap_switch(oldpmap); + rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); - vm_page_unlock_queues(); } /* @@ -1948,16 +2141,17 @@ int pmap_ts_referenced(vm_page_t m) { struct ia64_lpte *pte; - pmap_t oldpmap; + pmap_t oldpmap, pmap; pv_entry_t pv; int count = 0; KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_ts_referenced: page %p is not managed", m)); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { - PMAP_LOCK(pv->pv_pmap); - oldpmap = pmap_switch(pv->pv_pmap); + pmap = PV_PMAP(pv); + PMAP_LOCK(pmap); + oldpmap = pmap_switch(pmap); pte = pmap_find_vhpt(pv->pv_va); KASSERT(pte != NULL, ("pte")); if (pmap_accessed(pte)) { @@ -1966,9 +2160,9 @@ pmap_ts_referenced(vm_page_t m) pmap_invalidate_page(pv->pv_va); } pmap_switch(oldpmap); - PMAP_UNLOCK(pv->pv_pmap); + PMAP_UNLOCK(pmap); } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (count); } @@ -1982,7 +2176,7 @@ boolean_t pmap_is_modified(vm_page_t m) { struct ia64_lpte *pte; - pmap_t oldpmap; + pmap_t oldpmap, pmap; pv_entry_t pv; boolean_t rv; @@ -1999,19 +2193,20 @@ pmap_is_modified(vm_page_t m) if ((m->oflags & VPO_BUSY) == 0 && (m->aflags & PGA_WRITEABLE) == 0) return (rv); - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { - PMAP_LOCK(pv->pv_pmap); - oldpmap = pmap_switch(pv->pv_pmap); + pmap = PV_PMAP(pv); + PMAP_LOCK(pmap); + oldpmap = pmap_switch(pmap); pte = pmap_find_vhpt(pv->pv_va); pmap_switch(oldpmap); KASSERT(pte != NULL, ("pte")); rv = pmap_dirty(pte) ? TRUE : FALSE; - PMAP_UNLOCK(pv->pv_pmap); + PMAP_UNLOCK(pmap); if (rv) break; } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (rv); } @@ -2042,26 +2237,27 @@ boolean_t pmap_is_referenced(vm_page_t m) { struct ia64_lpte *pte; - pmap_t oldpmap; + pmap_t oldpmap, pmap; pv_entry_t pv; boolean_t rv; KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_is_referenced: page %p is not managed", m)); rv = FALSE; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { - PMAP_LOCK(pv->pv_pmap); - oldpmap = pmap_switch(pv->pv_pmap); + pmap = PV_PMAP(pv); + PMAP_LOCK(pmap); + oldpmap = pmap_switch(pmap); pte = pmap_find_vhpt(pv->pv_va); pmap_switch(oldpmap); KASSERT(pte != NULL, ("pte")); rv = pmap_accessed(pte) ? TRUE : FALSE; - PMAP_UNLOCK(pv->pv_pmap); + PMAP_UNLOCK(pmap); if (rv) break; } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); return (rv); } @@ -2072,7 +2268,7 @@ void pmap_clear_modify(vm_page_t m) { struct ia64_lpte *pte; - pmap_t oldpmap; + pmap_t oldpmap, pmap; pv_entry_t pv; KASSERT((m->oflags & VPO_UNMANAGED) == 0, @@ -2088,10 +2284,11 @@ pmap_clear_modify(vm_page_t m) */ if ((m->aflags & PGA_WRITEABLE) == 0) return; - vm_page_lock_queues(); + rw_wlock(&pvh_global_lock); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { - PMAP_LOCK(pv->pv_pmap); - oldpmap = pmap_switch(pv->pv_pmap); + pmap = PV_PMAP(pv); + PMAP_LOCK(pmap); + oldpmap = pmap_switch(pmap); pte = pmap_find_vhpt(pv->pv_va); KASSERT(pte != NULL, ("pte")); if (pmap_dirty(pte)) { @@ -2099,9 +2296,9 @@ pmap_clear_modify(vm_page_t m) pmap_invalidate_page(pv->pv_va); } pmap_switch(oldpmap); - PMAP_UNLOCK(pv->pv_pmap); + PMAP_UNLOCK(pmap); } - vm_page_unlock_queues(); + rw_wunlock(&pvh_global_lock); } /* @@ -2113,15 +2310,16 @@ void pmap_clear_reference(vm_page_t m) { struct ia64_lpte *pte; - pmap_t oldpmap; + pmap_t oldpmap, pmap; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 03:20: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 B082A5F1; Fri, 26 Oct 2012 03:20:04 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 98D318FC1C; Fri, 26 Oct 2012 03:20: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 q9Q3K4hB010159; Fri, 26 Oct 2012 03:20:04 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9Q3K4xQ010154; Fri, 26 Oct 2012 03:20:04 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201210260320.q9Q3K4xQ010154@svn.freebsd.org> From: Devin Teske Date: Fri, 26 Oct 2012 03:20:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242123 - in head/usr.sbin/bsdconfig/usermgmt: . include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 03:20:04 -0000 Author: dteske Date: Fri Oct 26 03:20:04 2012 New Revision: 242123 URL: http://svn.freebsd.org/changeset/base/242123 Log: Resurrect and integrate stable/9/usr.sbin/sysinstall/help/usermgmt.hlp Approved by: adrian (co-mentor) (implicit) Added: head/usr.sbin/bsdconfig/usermgmt/include/usermgmt.hlp (contents, props changed) Modified: head/usr.sbin/bsdconfig/usermgmt/include/Makefile head/usr.sbin/bsdconfig/usermgmt/usermgmt Modified: head/usr.sbin/bsdconfig/usermgmt/include/Makefile ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/include/Makefile Fri Oct 26 03:12:40 2012 (r242122) +++ head/usr.sbin/bsdconfig/usermgmt/include/Makefile Fri Oct 26 03:20:04 2012 (r242123) @@ -3,7 +3,7 @@ NO_OBJ= FILESDIR= ${LIBEXECDIR}/bsdconfig/070.usermgmt/include -FILES= messages.subr +FILES= messages.subr usermgmt.hlp beforeinstall: mkdir -p ${DESTDIR}${FILESDIR} Added: head/usr.sbin/bsdconfig/usermgmt/include/usermgmt.hlp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bsdconfig/usermgmt/include/usermgmt.hlp Fri Oct 26 03:20:04 2012 (r242123) @@ -0,0 +1,76 @@ +These screens allow you to add groups and users to your system. + +Many of the settings get reasonable defaults if you leave them blank. +The first time you have entered the name of the new group or user, the +system will show you what it would chose for most of these fields. +You are free to change them, of course. + + +User groups +=========== + +It's certainly almost generally a good idea to first create a new +group for your users. Common names for such a group are "users", or +even simply "other". Group names are used to control file access +permissions for users that belong to the same group. Several group +names are already used for system files. + +The numerical user or group IDs are often nothing you want to care for +explicitly. If you don't fill in these fields, the system will choose +reasonable defaults. However, these numbers (rather than the +associated names) are what the operating system actually uses to +distinguish users and groups -- hence they should normally be unique +to each person or group, respectively. + + +Users +===== + +The user's login ID is a short (up to 15 characters) alphanumeric ID +that the user must enter when logging into the system. It's often the +initial letters of the user's name, and commonly used in lower case. +It's also the local mail name for this user (though it's possible to +also set up more descriptive mail alias names later). + +The user's login group determines which group access rights the user +will initially get when logging in. If an additional list of groups is +provided which the user will become a member of, (s)he will also be +able to access files of those groups later without providing any +additional password etc. Except for the "wheel" case mentioned below, +the additional group membership list should normally not contain the +login group again. + +The user's password can also be set here, and should be chosen with +care - 6 or more characters, intermixing punctuation and numerics, and +*not* a word from the dictionary or related to the username is a good +password choice. + +Some of the system's groups have a special meaning. In particular, +members of group "wheel" are the only people who are later allowed to +become superuser using the command su(1). So if you're going to add a +new user who should later perform administrative tasks, don't forget +to add him to this group! (Well, ``he'' will most likely be yourself +in the very first place. :) + +Also, members of group "operator" will by default get permissions for +minor administrative operations, like performing system backups, or +shutting down the system -- without first becoming superuser! So, +take care when adding people to this group. + +The ``full name'' field serves as a comment only. It is also used by +mail front ends to determine the real name of the user, hence you +should actually fill in the first and last name of this user. By +convention, this field can be divided into comma-separated subfields, +where the office location, the work phone number, and the home phone +number follow the full name of the user. + +The home directory is the directory in the filesystem where the user +is being logged into, and where his personalized setup files (``dot +files'', since they usually begin with a `.' and are not displayed by +the ls(1) command by default) will be looked up. It is often created +under /usr/home/ or /home/. + +Finally, the shell is the user's initial command interpreter. The +default shell is /bin/sh, some users prefer the more historic +/bin/csh. Other, often more user-friendly and comfortable shells can +be found in the ports and packages collection. Modified: head/usr.sbin/bsdconfig/usermgmt/usermgmt ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/usermgmt Fri Oct 26 03:12:40 2012 (r242122) +++ head/usr.sbin/bsdconfig/usermgmt/usermgmt Fri Oct 26 03:20:04 2012 (r242123) @@ -37,6 +37,8 @@ f_include $BSDCFG_SHARE/mustberoot.subr BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="070.usermgmt" f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr +USERMGMT_HELPFILE=$BSDCFG_LIBE/$APP_DIR/include/usermgmt.hlp + ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) [ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" @@ -69,6 +71,14 @@ dialog_menu_main() \"\$hline\" \ $menu_list ) + if [ "$USE_XDIALOG" ]; then + # need to bump the width for the buttons + local height menu_height + height="${size%%[$IFS]*}" # first word + menu_height="${size##*[$IFS]}" # last word + size="$height 40 $menu_height" + fi + local dialog_menu dialog_menu=$( eval $DIALOG \ --clear --title \"\$DIALOG_TITLE\" \ @@ -76,6 +86,8 @@ dialog_menu_main() --hline \"\$hline\" \ --ok-label \"\$msg_ok\" \ --cancel-label \"\$msg_cancel\" \ + --help-button \ + ${USE_XDIALOG:+--help \"\"} \ --menu \"\" $size $menu_list \ 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD ) @@ -116,7 +128,13 @@ while :; do mtag=$( f_dialog_menutag ) f_dprintf "retval=$retval mtag=[$mtag]" - [ $retval -eq 0 ] || f_die + if [ $retval -eq 2 ]; then + # The Help button was pressed + f_show_help "$USERMGMT_HELPFILE" + continue + elif [ $retval -ne $SUCCESS ]; then + f_die + fi case "$mtag" in X) # Exit From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 05:41: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 8E7C16C4; Fri, 26 Oct 2012 05:41:59 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 76E948FC08; Fri, 26 Oct 2012 05:41: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 q9Q5fxad031493; Fri, 26 Oct 2012 05:41:59 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9Q5fxt1031491; Fri, 26 Oct 2012 05:41:59 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201210260541.q9Q5fxt1031491@svn.freebsd.org> From: Tim Kientzle Date: Fri, 26 Oct 2012 05:41:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242124 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 05:41:59 -0000 Author: kientzle Date: Fri Oct 26 05:41:58 2012 New Revision: 242124 URL: http://svn.freebsd.org/changeset/base/242124 Log: Comment out the BOOTP/NFSROOT support. Transition this config file to support a production kernel mounted on an SD card. Modified: head/sys/arm/conf/PANDABOARD Modified: head/sys/arm/conf/PANDABOARD ============================================================================== --- head/sys/arm/conf/PANDABOARD Fri Oct 26 03:20:04 2012 (r242123) +++ head/sys/arm/conf/PANDABOARD Fri Oct 26 05:41:58 2012 (r242124) @@ -44,17 +44,18 @@ options FFS #Berkeley Fast Filesystem options SOFTUPDATES #Enable FFS soft updates support options UFS_ACL #Support for access control lists options UFS_DIRHASH #Improve performance on big directories -options NFSCLIENT #Network Filesystem Client device snp +options BREAK_TO_DEBUGGER + #options NFSCL +options NFSCLIENT #Network Filesystem Client #options NFSSERVER #Network Filesystem Server options NFS_ROOT #NFS usable as /, requires NFSCLIENT -options BREAK_TO_DEBUGGER -options BOOTP_NFSROOT -options BOOTP_COMPAT -options BOOTP +#options BOOTP_NFSROOT +#options BOOTP_COMPAT +#options BOOTP options BOOTP_NFSV3 -options BOOTP_WIRED_TO=ue0 +#options BOOTP_WIRED_TO=ue0 options MSDOSFS #MSDOS Filesystem #options CD9660 #ISO 9660 Filesystem #options PROCFS #Process filesystem (requires PSEUDOFS) From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 05:48: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 D75A9879; Fri, 26 Oct 2012 05:48:53 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BF2F88FC14; Fri, 26 Oct 2012 05:48: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 q9Q5mra5032677; Fri, 26 Oct 2012 05:48:53 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9Q5mr4k032675; Fri, 26 Oct 2012 05:48:53 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201210260548.q9Q5mr4k032675@svn.freebsd.org> From: Tim Kientzle Date: Fri, 26 Oct 2012 05:48:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242125 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 05:48:53 -0000 Author: kientzle Date: Fri Oct 26 05:48:53 2012 New Revision: 242125 URL: http://svn.freebsd.org/changeset/base/242125 Log: set the kernelname from the boot loader environment. This fixes kern.bootfile sysctl. Submitted by: Giovanni Trematerra Modified: head/sys/arm/ti/ti_machdep.c Modified: head/sys/arm/ti/ti_machdep.c ============================================================================== --- head/sys/arm/ti/ti_machdep.c Fri Oct 26 05:41:58 2012 (r242124) +++ head/sys/arm/ti/ti_machdep.c Fri Oct 26 05:48:53 2012 (r242125) @@ -306,6 +306,7 @@ initarm(struct arm_boot_params *abp) struct pv_addr dpcpu; vm_offset_t dtbp, freemempos, l2_start, lastaddr; uint32_t memsize, l2size; + char *env; void *kmdp; u_int l1pagetable; int i = 0, j = 0, err_devmap = 0; @@ -491,6 +492,10 @@ initarm(struct arm_boot_params *abp) print_kernel_section_addr(); print_kenv(); + env = getenv("kernelname"); + if (env != NULL) + strlcpy(kernelname, env, sizeof(kernelname); + if (err_devmap != 0) printf("WARNING: could not fully configure devmap, error=%d\n", err_devmap); From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 06:04: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 E4367BB6; Fri, 26 Oct 2012 06:04:47 +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 C710A8FC0A; Fri, 26 Oct 2012 06:04: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 q9Q64l4d035437; Fri, 26 Oct 2012 06:04:47 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9Q64lDg035418; Fri, 26 Oct 2012 06:04:47 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201210260604.q9Q64lDg035418@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 26 Oct 2012 06:04:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242126 - in head/sys/dev/usb: . controller input serial storage wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 06:04:48 -0000 Author: hselasky Date: Fri Oct 26 06:04:47 2012 New Revision: 242126 URL: http://svn.freebsd.org/changeset/base/242126 Log: Add missing CTLFLAG_TUN flag to tunable sysctls in USB stack. Rearrange the tunables and belonging sysctl declarations, so that they are next to eachother. Submitted by: n_hibma @ MFC after: 1 week Modified: head/sys/dev/usb/controller/dwc_otg.c head/sys/dev/usb/controller/ehci.c head/sys/dev/usb/controller/ohci.c head/sys/dev/usb/controller/uhci.c head/sys/dev/usb/controller/usb_controller.c head/sys/dev/usb/controller/xhci.c head/sys/dev/usb/input/ukbd.c head/sys/dev/usb/serial/usb_serial.c head/sys/dev/usb/storage/umass.c head/sys/dev/usb/usb_debug.c head/sys/dev/usb/usb_dev.c head/sys/dev/usb/usb_device.c head/sys/dev/usb/usb_generic.c head/sys/dev/usb/usb_hub.c head/sys/dev/usb/usb_process.c head/sys/dev/usb/wlan/if_uath.c head/sys/dev/usb/wlan/if_upgt.c head/sys/dev/usb/wlan/if_urtw.c Modified: head/sys/dev/usb/controller/dwc_otg.c ============================================================================== --- head/sys/dev/usb/controller/dwc_otg.c Fri Oct 26 05:48:53 2012 (r242125) +++ head/sys/dev/usb/controller/dwc_otg.c Fri Oct 26 06:04:47 2012 (r242126) @@ -105,9 +105,8 @@ static int dwc_otg_use_hsic; static SYSCTL_NODE(_hw_usb, OID_AUTO, dwc_otg, CTLFLAG_RW, 0, "USB DWC OTG"); -SYSCTL_INT(_hw_usb_dwc_otg, OID_AUTO, use_hsic, CTLFLAG_RD, +SYSCTL_INT(_hw_usb_dwc_otg, OID_AUTO, use_hsic, CTLFLAG_RD | CTLFLAG_TUN, &dwc_otg_use_hsic, 0, "DWC OTG uses HSIC interface"); - TUNABLE_INT("hw.usb.dwc_otg.use_hsic", &dwc_otg_use_hsic); #ifdef USB_DEBUG Modified: head/sys/dev/usb/controller/ehci.c ============================================================================== --- head/sys/dev/usb/controller/ehci.c Fri Oct 26 05:48:53 2012 (r242125) +++ head/sys/dev/usb/controller/ehci.c Fri Oct 26 06:04:47 2012 (r242126) @@ -95,20 +95,20 @@ static int ehciiaadbug = 0; static int ehcilostintrbug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, ehci, CTLFLAG_RW, 0, "USB ehci"); -SYSCTL_INT(_hw_usb_ehci, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_ehci, OID_AUTO, debug, CTLFLAG_RW | CTLFLAG_TUN, &ehcidebug, 0, "Debug level"); -SYSCTL_INT(_hw_usb_ehci, OID_AUTO, no_hs, CTLFLAG_RW, - &ehcinohighspeed, 0, "Disable High Speed USB"); -SYSCTL_INT(_hw_usb_ehci, OID_AUTO, iaadbug, CTLFLAG_RW, - &ehciiaadbug, 0, "Enable doorbell bug workaround"); -SYSCTL_INT(_hw_usb_ehci, OID_AUTO, lostintrbug, CTLFLAG_RW, - &ehcilostintrbug, 0, "Enable lost interrupt bug workaround"); - TUNABLE_INT("hw.usb.ehci.debug", &ehcidebug); +SYSCTL_INT(_hw_usb_ehci, OID_AUTO, no_hs, CTLFLAG_RW | CTLFLAG_TUN, + &ehcinohighspeed, 0, "Disable High Speed USB"); TUNABLE_INT("hw.usb.ehci.no_hs", &ehcinohighspeed); +SYSCTL_INT(_hw_usb_ehci, OID_AUTO, iaadbug, CTLFLAG_RW | CTLFLAG_TUN, + &ehciiaadbug, 0, "Enable doorbell bug workaround"); TUNABLE_INT("hw.usb.ehci.iaadbug", &ehciiaadbug); +SYSCTL_INT(_hw_usb_ehci, OID_AUTO, lostintrbug, CTLFLAG_RW | CTLFLAG_TUN, + &ehcilostintrbug, 0, "Enable lost interrupt bug workaround"); TUNABLE_INT("hw.usb.ehci.lostintrbug", &ehcilostintrbug); + static void ehci_dump_regs(ehci_softc_t *sc); static void ehci_dump_sqh(ehci_softc_t *sc, ehci_qh_t *sqh); Modified: head/sys/dev/usb/controller/ohci.c ============================================================================== --- head/sys/dev/usb/controller/ohci.c Fri Oct 26 05:48:53 2012 (r242125) +++ head/sys/dev/usb/controller/ohci.c Fri Oct 26 06:04:47 2012 (r242126) @@ -81,9 +81,8 @@ __FBSDID("$FreeBSD$"); static int ohcidebug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, ohci, CTLFLAG_RW, 0, "USB ohci"); -SYSCTL_INT(_hw_usb_ohci, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_ohci, OID_AUTO, debug, CTLFLAG_RW | CTLFLAG_TUN, &ohcidebug, 0, "ohci debug level"); - TUNABLE_INT("hw.usb.ohci.debug", &ohcidebug); static void ohci_dumpregs(ohci_softc_t *); Modified: head/sys/dev/usb/controller/uhci.c ============================================================================== --- head/sys/dev/usb/controller/uhci.c Fri Oct 26 05:48:53 2012 (r242125) +++ head/sys/dev/usb/controller/uhci.c Fri Oct 26 06:04:47 2012 (r242126) @@ -86,12 +86,11 @@ static int uhcidebug = 0; static int uhcinoloop = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, uhci, CTLFLAG_RW, 0, "USB uhci"); -SYSCTL_INT(_hw_usb_uhci, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_uhci, OID_AUTO, debug, CTLFLAG_RW | CTLFLAG_TUN, &uhcidebug, 0, "uhci debug level"); -SYSCTL_INT(_hw_usb_uhci, OID_AUTO, loop, CTLFLAG_RW, - &uhcinoloop, 0, "uhci noloop"); - TUNABLE_INT("hw.usb.uhci.debug", &uhcidebug); +SYSCTL_INT(_hw_usb_uhci, OID_AUTO, loop, CTLFLAG_RW | CTLFLAG_TUN, + &uhcinoloop, 0, "uhci noloop"); TUNABLE_INT("hw.usb.uhci.loop", &uhcinoloop); static void uhci_dumpregs(uhci_softc_t *sc); Modified: head/sys/dev/usb/controller/usb_controller.c ============================================================================== --- head/sys/dev/usb/controller/usb_controller.c Fri Oct 26 05:48:53 2012 (r242125) +++ head/sys/dev/usb/controller/usb_controller.c Fri Oct 26 06:04:47 2012 (r242126) @@ -86,7 +86,7 @@ SYSCTL_INT(_hw_usb_ctrl, OID_AUTO, debug static int usb_no_boot_wait = 0; TUNABLE_INT("hw.usb.no_boot_wait", &usb_no_boot_wait); -SYSCTL_INT(_hw_usb, OID_AUTO, no_boot_wait, CTLFLAG_RDTUN, &usb_no_boot_wait, 0, +SYSCTL_INT(_hw_usb, OID_AUTO, no_boot_wait, CTLFLAG_RD|CTLFLAG_TUN, &usb_no_boot_wait, 0, "No USB device enumerate waiting at boot."); static int usb_no_suspend_wait = 0; Modified: head/sys/dev/usb/controller/xhci.c ============================================================================== --- head/sys/dev/usb/controller/xhci.c Fri Oct 26 05:48:53 2012 (r242125) +++ head/sys/dev/usb/controller/xhci.c Fri Oct 26 06:04:47 2012 (r242126) @@ -88,12 +88,11 @@ static int xhcidebug; static int xhciroute; static SYSCTL_NODE(_hw_usb, OID_AUTO, xhci, CTLFLAG_RW, 0, "USB XHCI"); -SYSCTL_INT(_hw_usb_xhci, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_xhci, OID_AUTO, debug, CTLFLAG_RW | CTLFLAG_TUN, &xhcidebug, 0, "Debug level"); -SYSCTL_INT(_hw_usb_xhci, OID_AUTO, xhci_port_route, CTLFLAG_RW, - &xhciroute, 0, "Routing bitmap for switching EHCI ports to XHCI controller"); - TUNABLE_INT("hw.usb.xhci.debug", &xhcidebug); +SYSCTL_INT(_hw_usb_xhci, OID_AUTO, xhci_port_route, CTLFLAG_RW | CTLFLAG_TUN, + &xhciroute, 0, "Routing bitmap for switching EHCI ports to XHCI controller"); TUNABLE_INT("hw.usb.xhci.xhci_port_route", &xhciroute); #endif Modified: head/sys/dev/usb/input/ukbd.c ============================================================================== --- head/sys/dev/usb/input/ukbd.c Fri Oct 26 05:48:53 2012 (r242125) +++ head/sys/dev/usb/input/ukbd.c Fri Oct 26 06:04:47 2012 (r242126) @@ -94,12 +94,11 @@ static int ukbd_debug = 0; static int ukbd_no_leds = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, ukbd, CTLFLAG_RW, 0, "USB ukbd"); -SYSCTL_INT(_hw_usb_ukbd, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_ukbd, OID_AUTO, debug, CTLFLAG_RW | CTLFLAG_TUN, &ukbd_debug, 0, "Debug level"); -SYSCTL_INT(_hw_usb_ukbd, OID_AUTO, no_leds, CTLFLAG_RW, - &ukbd_no_leds, 0, "Disables setting of keyboard leds"); - TUNABLE_INT("hw.usb.ukbd.debug", &ukbd_debug); +SYSCTL_INT(_hw_usb_ukbd, OID_AUTO, no_leds, CTLFLAG_RW | CTLFLAG_TUN, + &ukbd_no_leds, 0, "Disables setting of keyboard leds"); TUNABLE_INT("hw.usb.ukbd.no_leds", &ukbd_no_leds); #endif Modified: head/sys/dev/usb/serial/usb_serial.c ============================================================================== --- head/sys/dev/usb/serial/usb_serial.c Fri Oct 26 05:48:53 2012 (r242125) +++ head/sys/dev/usb/serial/usb_serial.c Fri Oct 26 06:04:47 2012 (r242126) @@ -127,13 +127,13 @@ static int ucom_cons_baud = 9600; static struct ucom_softc *ucom_cons_softc = NULL; TUNABLE_INT("hw.usb.ucom.cons_unit", &ucom_cons_unit); -SYSCTL_INT(_hw_usb_ucom, OID_AUTO, cons_unit, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_ucom, OID_AUTO, cons_unit, CTLFLAG_RW | CTLFLAG_TUN, &ucom_cons_unit, 0, "console unit number"); TUNABLE_INT("hw.usb.ucom.cons_subunit", &ucom_cons_subunit); -SYSCTL_INT(_hw_usb_ucom, OID_AUTO, cons_subunit, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_ucom, OID_AUTO, cons_subunit, CTLFLAG_RW | CTLFLAG_TUN, &ucom_cons_subunit, 0, "console subunit number"); TUNABLE_INT("hw.usb.ucom.cons_baud", &ucom_cons_baud); -SYSCTL_INT(_hw_usb_ucom, OID_AUTO, cons_baud, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_ucom, OID_AUTO, cons_baud, CTLFLAG_RW | CTLFLAG_TUN, &ucom_cons_baud, 0, "console baud rate"); static usb_proc_callback_t ucom_cfg_start_transfers; Modified: head/sys/dev/usb/storage/umass.c ============================================================================== --- head/sys/dev/usb/storage/umass.c Fri Oct 26 05:48:53 2012 (r242125) +++ head/sys/dev/usb/storage/umass.c Fri Oct 26 06:04:47 2012 (r242126) @@ -166,9 +166,8 @@ __FBSDID("$FreeBSD$"); static int umass_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, umass, CTLFLAG_RW, 0, "USB umass"); -SYSCTL_INT(_hw_usb_umass, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_umass, OID_AUTO, debug, CTLFLAG_RW | CTLFLAG_TUN, &umass_debug, 0, "umass debug level"); - TUNABLE_INT("hw.usb.umass.debug", &umass_debug); #else #define DIF(...) do { } while (0) Modified: head/sys/dev/usb/usb_debug.c ============================================================================== --- head/sys/dev/usb/usb_debug.c Fri Oct 26 05:48:53 2012 (r242125) +++ head/sys/dev/usb/usb_debug.c Fri Oct 26 06:04:47 2012 (r242126) @@ -63,9 +63,8 @@ int usb_debug = 0; SYSCTL_NODE(_hw, OID_AUTO, usb, CTLFLAG_RW, 0, "USB debugging"); -SYSCTL_INT(_hw_usb, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb, OID_AUTO, debug, CTLFLAG_RW | CTLFLAG_TUN, &usb_debug, 0, "Debug level"); - TUNABLE_INT("hw.usb.debug", &usb_debug); #ifdef USB_DEBUG @@ -76,43 +75,43 @@ static SYSCTL_NODE(_hw_usb, OID_AUTO, ti static int usb_timings_sysctl_handler(SYSCTL_HANDLER_ARGS); TUNABLE_INT("hw.usb.timings.port_reset_delay", (int *)&usb_port_reset_delay); -SYSCTL_PROC(_hw_usb_timings, OID_AUTO, port_reset_delay, CTLTYPE_UINT | CTLFLAG_RW, +SYSCTL_PROC(_hw_usb_timings, OID_AUTO, port_reset_delay, CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_TUN, &usb_port_reset_delay, sizeof(usb_port_reset_delay), usb_timings_sysctl_handler, "IU", "Port Reset Delay"); TUNABLE_INT("hw.usb.timings.port_root_reset_delay", (int *)&usb_port_root_reset_delay); -SYSCTL_PROC(_hw_usb_timings, OID_AUTO, port_root_reset_delay, CTLTYPE_UINT | CTLFLAG_RW, +SYSCTL_PROC(_hw_usb_timings, OID_AUTO, port_root_reset_delay, CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_TUN, &usb_port_root_reset_delay, sizeof(usb_port_root_reset_delay), usb_timings_sysctl_handler, "IU", "Root Port Reset Delay"); TUNABLE_INT("hw.usb.timings.port_reset_recovery", (int *)&usb_port_reset_recovery); -SYSCTL_PROC(_hw_usb_timings, OID_AUTO, port_reset_recovery, CTLTYPE_UINT | CTLFLAG_RW, +SYSCTL_PROC(_hw_usb_timings, OID_AUTO, port_reset_recovery, CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_TUN, &usb_port_reset_recovery, sizeof(usb_port_reset_recovery), usb_timings_sysctl_handler, "IU", "Port Reset Recovery"); TUNABLE_INT("hw.usb.timings.port_powerup_delay", (int *)&usb_port_powerup_delay); -SYSCTL_PROC(_hw_usb_timings, OID_AUTO, port_powerup_delay, CTLTYPE_UINT | CTLFLAG_RW, +SYSCTL_PROC(_hw_usb_timings, OID_AUTO, port_powerup_delay, CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_TUN, &usb_port_powerup_delay, sizeof(usb_port_powerup_delay), usb_timings_sysctl_handler, "IU", "Port PowerUp Delay"); TUNABLE_INT("hw.usb.timings.port_resume_delay", (int *)&usb_port_resume_delay); -SYSCTL_PROC(_hw_usb_timings, OID_AUTO, port_resume_delay, CTLTYPE_UINT | CTLFLAG_RW, +SYSCTL_PROC(_hw_usb_timings, OID_AUTO, port_resume_delay, CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_TUN, &usb_port_resume_delay, sizeof(usb_port_resume_delay), usb_timings_sysctl_handler, "IU", "Port Resume Delay"); TUNABLE_INT("hw.usb.timings.set_address_settle", (int *)&usb_set_address_settle); -SYSCTL_PROC(_hw_usb_timings, OID_AUTO, set_address_settle, CTLTYPE_UINT | CTLFLAG_RW, +SYSCTL_PROC(_hw_usb_timings, OID_AUTO, set_address_settle, CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_TUN, &usb_set_address_settle, sizeof(usb_set_address_settle), usb_timings_sysctl_handler, "IU", "Set Address Settle"); TUNABLE_INT("hw.usb.timings.resume_delay", (int *)&usb_resume_delay); -SYSCTL_PROC(_hw_usb_timings, OID_AUTO, resume_delay, CTLTYPE_UINT | CTLFLAG_RW, +SYSCTL_PROC(_hw_usb_timings, OID_AUTO, resume_delay, CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_TUN, &usb_resume_delay, sizeof(usb_resume_delay), usb_timings_sysctl_handler, "IU", "Resume Delay"); TUNABLE_INT("hw.usb.timings.resume_wait", (int *)&usb_resume_wait); -SYSCTL_PROC(_hw_usb_timings, OID_AUTO, resume_wait, CTLTYPE_UINT | CTLFLAG_RW, +SYSCTL_PROC(_hw_usb_timings, OID_AUTO, resume_wait, CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_TUN, &usb_resume_wait, sizeof(usb_resume_wait), usb_timings_sysctl_handler, "IU", "Resume Wait"); TUNABLE_INT("hw.usb.timings.resume_recovery", (int *)&usb_resume_recovery); -SYSCTL_PROC(_hw_usb_timings, OID_AUTO, resume_recovery, CTLTYPE_UINT | CTLFLAG_RW, +SYSCTL_PROC(_hw_usb_timings, OID_AUTO, resume_recovery, CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_TUN, &usb_resume_recovery, sizeof(usb_resume_recovery), usb_timings_sysctl_handler, "IU", "Resume Recovery"); TUNABLE_INT("hw.usb.timings.extra_power_up_time", (int *)&usb_extra_power_up_time); -SYSCTL_PROC(_hw_usb_timings, OID_AUTO, extra_power_up_time, CTLTYPE_UINT | CTLFLAG_RW, +SYSCTL_PROC(_hw_usb_timings, OID_AUTO, extra_power_up_time, CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_TUN, &usb_extra_power_up_time, sizeof(usb_extra_power_up_time), usb_timings_sysctl_handler, "IU", "Extra PowerUp Time"); #endif Modified: head/sys/dev/usb/usb_dev.c ============================================================================== --- head/sys/dev/usb/usb_dev.c Fri Oct 26 05:48:53 2012 (r242125) +++ head/sys/dev/usb/usb_dev.c Fri Oct 26 06:04:47 2012 (r242126) @@ -82,9 +82,8 @@ static int usb_fifo_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, dev, CTLFLAG_RW, 0, "USB device"); -SYSCTL_INT(_hw_usb_dev, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_dev, OID_AUTO, debug, CTLFLAG_RW | CTLFLAG_TUN, &usb_fifo_debug, 0, "Debug Level"); - TUNABLE_INT("hw.usb.dev.debug", &usb_fifo_debug); #endif Modified: head/sys/dev/usb/usb_device.c ============================================================================== --- head/sys/dev/usb/usb_device.c Fri Oct 26 05:48:53 2012 (r242125) +++ head/sys/dev/usb/usb_device.c Fri Oct 26 06:04:47 2012 (r242126) @@ -111,7 +111,7 @@ static void usb_cdev_free(struct usb_dev int usb_template = 0; TUNABLE_INT("hw.usb.usb_template", &usb_template); -SYSCTL_INT(_hw_usb, OID_AUTO, template, CTLFLAG_RW, +SYSCTL_INT(_hw_usb, OID_AUTO, template, CTLFLAG_RW | CTLFLAG_TUN, &usb_template, 0, "Selected USB device side template"); /* English is default language */ @@ -120,11 +120,11 @@ static int usb_lang_id = 0x0009; static int usb_lang_mask = 0x00FF; TUNABLE_INT("hw.usb.usb_lang_id", &usb_lang_id); -SYSCTL_INT(_hw_usb, OID_AUTO, usb_lang_id, CTLFLAG_RW, +SYSCTL_INT(_hw_usb, OID_AUTO, usb_lang_id, CTLFLAG_RW | CTLFLAG_TUN, &usb_lang_id, 0, "Preferred USB language ID"); TUNABLE_INT("hw.usb.usb_lang_mask", &usb_lang_mask); -SYSCTL_INT(_hw_usb, OID_AUTO, usb_lang_mask, CTLFLAG_RW, +SYSCTL_INT(_hw_usb, OID_AUTO, usb_lang_mask, CTLFLAG_RW | CTLFLAG_TUN, &usb_lang_mask, 0, "Preferred USB language mask"); static const char* statestr[USB_STATE_MAX] = { Modified: head/sys/dev/usb/usb_generic.c ============================================================================== --- head/sys/dev/usb/usb_generic.c Fri Oct 26 05:48:53 2012 (r242125) +++ head/sys/dev/usb/usb_generic.c Fri Oct 26 06:04:47 2012 (r242126) @@ -127,9 +127,8 @@ struct usb_fifo_methods usb_ugen_methods static int ugen_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, ugen, CTLFLAG_RW, 0, "USB generic"); -SYSCTL_INT(_hw_usb_ugen, OID_AUTO, debug, CTLFLAG_RW, &ugen_debug, +SYSCTL_INT(_hw_usb_ugen, OID_AUTO, debug, CTLFLAG_RW | CTLFLAG_TUN, &ugen_debug, 0, "Debug level"); - TUNABLE_INT("hw.usb.ugen.debug", &ugen_debug); #endif Modified: head/sys/dev/usb/usb_hub.c ============================================================================== --- head/sys/dev/usb/usb_hub.c Fri Oct 26 05:48:53 2012 (r242125) +++ head/sys/dev/usb/usb_hub.c Fri Oct 26 06:04:47 2012 (r242126) @@ -77,9 +77,8 @@ static int uhub_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, uhub, CTLFLAG_RW, 0, "USB HUB"); -SYSCTL_INT(_hw_usb_uhub, OID_AUTO, debug, CTLFLAG_RW, &uhub_debug, 0, +SYSCTL_INT(_hw_usb_uhub, OID_AUTO, debug, CTLFLAG_RW | CTLFLAG_TUN, &uhub_debug, 0, "Debug level"); - TUNABLE_INT("hw.usb.uhub.debug", &uhub_debug); #endif Modified: head/sys/dev/usb/usb_process.c ============================================================================== --- head/sys/dev/usb/usb_process.c Fri Oct 26 05:48:53 2012 (r242125) +++ head/sys/dev/usb/usb_process.c Fri Oct 26 06:04:47 2012 (r242126) @@ -86,9 +86,8 @@ static int usb_pcount; static int usb_proc_debug; static SYSCTL_NODE(_hw_usb, OID_AUTO, proc, CTLFLAG_RW, 0, "USB process"); -SYSCTL_INT(_hw_usb_proc, OID_AUTO, debug, CTLFLAG_RW, &usb_proc_debug, 0, +SYSCTL_INT(_hw_usb_proc, OID_AUTO, debug, CTLFLAG_RW | CTLFLAG_TUN, &usb_proc_debug, 0, "Debug level"); - TUNABLE_INT("hw.usb.proc.debug", &usb_proc_debug); #endif Modified: head/sys/dev/usb/wlan/if_uath.c ============================================================================== --- head/sys/dev/usb/wlan/if_uath.c Fri Oct 26 05:48:53 2012 (r242125) +++ head/sys/dev/usb/wlan/if_uath.c Fri Oct 26 06:04:47 2012 (r242126) @@ -114,7 +114,7 @@ __FBSDID("$FreeBSD$"); static SYSCTL_NODE(_hw_usb, OID_AUTO, uath, CTLFLAG_RW, 0, "USB Atheros"); static int uath_countrycode = CTRY_DEFAULT; /* country code */ -SYSCTL_INT(_hw_usb_uath, OID_AUTO, countrycode, CTLFLAG_RW, &uath_countrycode, +SYSCTL_INT(_hw_usb_uath, OID_AUTO, countrycode, CTLFLAG_RW | CTLFLAG_TUN, &uath_countrycode, 0, "country code"); TUNABLE_INT("hw.usb.uath.countrycode", &uath_countrycode); static int uath_regdomain = 0; /* regulatory domain */ @@ -123,7 +123,7 @@ SYSCTL_INT(_hw_usb_uath, OID_AUTO, regdo #ifdef UATH_DEBUG int uath_debug = 0; -SYSCTL_INT(_hw_usb_uath, OID_AUTO, debug, CTLFLAG_RW, &uath_debug, 0, +SYSCTL_INT(_hw_usb_uath, OID_AUTO, debug, CTLFLAG_RW | CTLFLAG_TUN, &uath_debug, 0, "uath debug level"); TUNABLE_INT("hw.usb.uath.debug", &uath_debug); enum { Modified: head/sys/dev/usb/wlan/if_upgt.c ============================================================================== --- head/sys/dev/usb/wlan/if_upgt.c Fri Oct 26 05:48:53 2012 (r242125) +++ head/sys/dev/usb/wlan/if_upgt.c Fri Oct 26 06:04:47 2012 (r242126) @@ -75,7 +75,7 @@ static SYSCTL_NODE(_hw, OID_AUTO, upgt, #ifdef UPGT_DEBUG int upgt_debug = 0; -SYSCTL_INT(_hw_upgt, OID_AUTO, debug, CTLFLAG_RW, &upgt_debug, +SYSCTL_INT(_hw_upgt, OID_AUTO, debug, CTLFLAG_RW | CTLFLAG_TUN, &upgt_debug, 0, "control debugging printfs"); TUNABLE_INT("hw.upgt.debug", &upgt_debug); enum { Modified: head/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtw.c Fri Oct 26 05:48:53 2012 (r242125) +++ head/sys/dev/usb/wlan/if_urtw.c Fri Oct 26 06:04:47 2012 (r242126) @@ -64,7 +64,7 @@ __FBSDID("$FreeBSD$"); static SYSCTL_NODE(_hw_usb, OID_AUTO, urtw, CTLFLAG_RW, 0, "USB Realtek 8187L"); #ifdef URTW_DEBUG int urtw_debug = 0; -SYSCTL_INT(_hw_usb_urtw, OID_AUTO, debug, CTLFLAG_RW, &urtw_debug, 0, +SYSCTL_INT(_hw_usb_urtw, OID_AUTO, debug, CTLFLAG_RW | CTLFLAG_TUN, &urtw_debug, 0, "control debugging printfs"); TUNABLE_INT("hw.usb.urtw.debug", &urtw_debug); enum { @@ -89,7 +89,7 @@ enum { } while (0) #endif static int urtw_preamble_mode = URTW_PREAMBLE_MODE_LONG; -SYSCTL_INT(_hw_usb_urtw, OID_AUTO, preamble_mode, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_urtw, OID_AUTO, preamble_mode, CTLFLAG_RW | CTLFLAG_TUN, &urtw_preamble_mode, 0, "set the preable mode (long or short)"); TUNABLE_INT("hw.usb.urtw.preamble_mode", &urtw_preamble_mode); From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 10:18: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 313CB497; Fri, 26 Oct 2012 10:18:07 +0000 (UTC) (envelope-from ronald-freebsd8@klop.yi.org) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.78]) by mx1.freebsd.org (Postfix) with ESMTP id A52BF8FC08; Fri, 26 Oct 2012 10:18:05 +0000 (UTC) Received: from smtp.greenhost.nl ([213.108.104.138]) by smarthost1.greenhost.nl with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1TRgkQ-0000hs-Cd; Fri, 26 Oct 2012 12:02:38 +0200 Received: from [81.21.138.17] (helo=ronaldradial.versatec.local) by smtp.greenhost.nl with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1TRgkP-0000z9-2M; Fri, 26 Oct 2012 12:02:37 +0200 Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org, "Eitan Adler" Subject: Re: svn commit: r242109 - stable/9/games/fortune/datfiles References: <201210260034.q9Q0YRmY082297@svn.freebsd.org> Date: Fri, 26 Oct 2012 12:02:37 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: "Ronald Klop" Message-ID: In-Reply-To: <201210260034.q9Q0YRmY082297@svn.freebsd.org> User-Agent: Opera Mail/12.02 (Win32) X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: / X-Spam-Score: 0.0 X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_50 autolearn=disabled version=3.2.5 X-Scan-Signature: 2394e6fd9f1e9f86011669f8146dc264 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 10:18:07 -0000 Will sysinstall also be removed on stable/9? Although I don't really care about sysinstall I'm curious. Ronald. On Fri, 26 Oct 2012 02:34:27 +0200, Eitan Adler wrote: > Author: eadler > Date: Fri Oct 26 00:34:27 2012 > New Revision: 242109 > URL: http://svn.freebsd.org/changeset/base/242109 > > Log: > MFC r241845,r241934: > Sysinstall has been removed from base. > Approved by: cperciva (implicit) > > Modified: > stable/9/games/fortune/datfiles/freebsd-tips > Directory Properties: > stable/9/games/fortune/ (props changed) > > Modified: stable/9/games/fortune/datfiles/freebsd-tips > ============================================================================== > --- stable/9/games/fortune/datfiles/freebsd-tips Fri Oct 26 00:32:28 > 2012 (r242108) > +++ stable/9/games/fortune/datfiles/freebsd-tips Fri Oct 26 00:34:27 > 2012 (r242109) > @@ -40,7 +40,7 @@ Having trouble using fetch through a fir > variable FTP_PASSIVE_MODE to yes, and see fetch(3) for more details. > % > If other operating systems have damaged your Master Boot Record, you can > -reinstall it either with /usr/sbin/sysinstall or with boot0cfg(8). See > +reinstall it with boot0cfg(8). See > "man boot0cfg" for details. > % > If you accidentally end up inside vi, you can quit it by pressing > Escape, colon > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 11:17: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 EBD23F9A; Fri, 26 Oct 2012 11:17:32 +0000 (UTC) (envelope-from giovanni.trematerra@gmail.com) Received: from mail-qc0-f182.google.com (mail-qc0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 552758FC0A; Fri, 26 Oct 2012 11:17:32 +0000 (UTC) Received: by mail-qc0-f182.google.com with SMTP id k19so1210047qcs.13 for ; Fri, 26 Oct 2012 04:17:31 -0700 (PDT) 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; bh=qc5eYNuxjR5XKBQBDrQHqkwdw9KoGnV3/DAj7w3UACg=; b=R39RFGyWPYcLxhbL+yPoGhGSdVGmUPRNqIQxYrMbAJ7uSAcVT13z4neDUves9eoFSn CBXv7znqGabMgjj2wmZzlFcrj2FZRMP5JF9t7y/oYuSkGe4wBQE4KKoATbP1UBJmGrVM dyITKsiedzZhiHNNQw38Tgl512t4UnoVUR55yiM6qdmjAswCQvh9ohnwddmI76u/GOJa 822iPAnxd3gPWlmFH/mTRRT9YdQGWfVKHKBXxFVGTYYLoQTX9xHdu8PkiJQmUqspbiFN 0wXp4JQOd0qn/mkscRzIPzZEf63Kuq8FOVkRZ+4/tS8J7WubrYGXQLZXw0gdCscPI6P/ Op5g== MIME-Version: 1.0 Received: by 10.229.106.96 with SMTP id w32mr89035qco.151.1351250251593; Fri, 26 Oct 2012 04:17:31 -0700 (PDT) Sender: giovanni.trematerra@gmail.com Received: by 10.229.63.138 with HTTP; Fri, 26 Oct 2012 04:17:31 -0700 (PDT) In-Reply-To: <201210260541.q9Q5fxt1031491@svn.freebsd.org> References: <201210260541.q9Q5fxt1031491@svn.freebsd.org> Date: Fri, 26 Oct 2012 13:17:31 +0200 X-Google-Sender-Auth: QRU_tusvjFjZqzO-afJnHRHB8Ng Message-ID: Subject: Re: svn commit: r242124 - head/sys/arm/conf From: Giovanni Trematerra To: Tim Kientzle Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 11:17:33 -0000 On Fri, Oct 26, 2012 at 7:41 AM, Tim Kientzle wrote: > Author: kientzle > Date: Fri Oct 26 05:41:58 2012 > New Revision: 242124 > URL: http://svn.freebsd.org/changeset/base/242124 > > Log: > Comment out the BOOTP/NFSROOT support. Transition this > config file to support a production kernel mounted on an > SD card. > > Modified: > head/sys/arm/conf/PANDABOARD > > Modified: head/sys/arm/conf/PANDABOARD > ============================================================================== > --- head/sys/arm/conf/PANDABOARD Fri Oct 26 03:20:04 2012 (r242123) > +++ head/sys/arm/conf/PANDABOARD Fri Oct 26 05:41:58 2012 (r242124) > @@ -44,17 +44,18 @@ options FFS #Berkeley Fast Filesystem > options SOFTUPDATES #Enable FFS soft updates support > options UFS_ACL #Support for access control lists > options UFS_DIRHASH #Improve performance on big directories > -options NFSCLIENT #Network Filesystem Client > device snp > +options BREAK_TO_DEBUGGER > + > #options NFSCL > +options NFSCLIENT #Network Filesystem Client > #options NFSSERVER #Network Filesystem Server > options NFS_ROOT #NFS usable as /, requires NFSCLIENT > -options BREAK_TO_DEBUGGER > -options BOOTP_NFSROOT > -options BOOTP_COMPAT > -options BOOTP > +#options BOOTP_NFSROOT > +#options BOOTP_COMPAT > +#options BOOTP > options BOOTP_NFSV3 > -options BOOTP_WIRED_TO=ue0 > +#options BOOTP_WIRED_TO=ue0 > options MSDOSFS #MSDOS Filesystem > #options CD9660 #ISO 9660 Filesystem > #options PROCFS #Process filesystem (requires PSEUDOFS) Why did you leave BOOTP_NFSV3 uncommented? -- Gianni From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 11:26: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 566E1216; Fri, 26 Oct 2012 11:26:31 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id BFC678FC12; Fri, 26 Oct 2012 11:26:30 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q9QBQTXS011449; Fri, 26 Oct 2012 15:26:29 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q9QBQTh7011448; Fri, 26 Oct 2012 15:26:29 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 26 Oct 2012 15:26:29 +0400 From: Gleb Smirnoff To: Andre Oppermann Subject: Re: svn commit: r242079 - in head: sbin/ipfw share/man/man4 sys/conf sys/net sys/netinet sys/netinet6 sys/netpfil/ipfw Message-ID: <20121026112629.GC70741@FreeBSD.org> References: <201210250939.q9P9dF0q022970@svn.freebsd.org> <508960C2.6030003@freebsd.org> <508967E3.3070508@FreeBSD.org> <5089A13F.8080405@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <5089A13F.8080405@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, "Andrey V. Elsukov" , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 11:26:31 -0000 On Thu, Oct 25, 2012 at 10:29:51PM +0200, Andre Oppermann wrote: A> On 25.10.2012 18:25, Andrey V. Elsukov wrote: A> > On 25.10.2012 19:54, Andre Oppermann wrote: A> >> I still don't agree with naming the sysctl net.pfil.forward. This A> >> type of forwarding is a property of IPv4 and IPv6 and thus should A> >> be put there. Pfil hooking can be on layer 2, 2-bridging, 3 and A> >> who knows where else in the future. Forwarding works only for IPv46. A> >> A> >> You haven't even replied to my comment on net@. Please change the A> >> sysctl location and name to its appropriate place. A> > A> > Hi Andre, A> > A> > There were two replies related to this subject, you did not replied to A> > them and i thought that you became agree. A> A> I replied to your reply to mine. Other than that I didn't find A> anything else from you. A> A> > So, if not, what you think about the name net.pfil.ipforward? A> A> net.inet.ip.pfil_forward A> net.inet6.ip6.pfil_forward A> A> or something like that. A> A> If you can show with your performance profiling that the sysctl A> isn't even necessary, you could leave it completely away and have A> pfil_forward enabled permanently. That would be even better for A> everybody. I'd prefer to have the sysctl. Benchmarking will definitely show no regression, because in default case packets are tagless. But if packets would carry 1 or 2 tags each, which don't actually belong to PACKET_TAG_IPFORWARD, then processing would be pessimized. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 11:41: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 64D6570F; Fri, 26 Oct 2012 11:41:58 +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 3229A8FC17; Fri, 26 Oct 2012 11:41: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 q9QBfwfK090833; Fri, 26 Oct 2012 11:41:58 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QBfvHK090830; Fri, 26 Oct 2012 11:41:57 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201210261141.q9QBfvHK090830@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 26 Oct 2012 11:41:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242127 - in head/sys/dev/usb: . quirk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 11:41:58 -0000 Author: hselasky Date: Fri Oct 26 11:41:57 2012 New Revision: 242127 URL: http://svn.freebsd.org/changeset/base/242127 Log: Add support for Fast Track Ultra 8R from M-audio. MFC after: 1 week Modified: head/sys/dev/usb/quirk/usb_quirk.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- head/sys/dev/usb/quirk/usb_quirk.c Fri Oct 26 06:04:47 2012 (r242126) +++ head/sys/dev/usb/quirk/usb_quirk.c Fri Oct 26 11:41:57 2012 (r242127) @@ -472,6 +472,10 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(TEXTECH, U2M_2, 0x0000, 0xffff, UQ_SINGLE_CMD_MIDI), USB_QUIRK(WCH2, U2M, 0x0000, 0xffff, UQ_SINGLE_CMD_MIDI), + /* Non-standard USB AUDIO devices */ + USB_QUIRK(MAUDIO, FASTTRACKULTRA, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), + USB_QUIRK(MAUDIO, FASTTRACKULTRA8R, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), + /* * Quirks for manufacturers which USB devices does not respond * after issuing non-supported commands: Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Fri Oct 26 06:04:47 2012 (r242126) +++ head/sys/dev/usb/usbdevs Fri Oct 26 11:41:57 2012 (r242127) @@ -366,7 +366,7 @@ vendor EICON 0x0734 Eicon Networks vendor SYNTECH 0x0745 Syntech Information vendor DIGITALSTREAM 0x074e Digital Stream vendor AUREAL 0x0755 Aureal Semiconductor -vendor MIDIMAN 0x0763 Midiman +vendor MAUDIO 0x0763 M-Audio vendor CYBERPOWER 0x0764 Cyber Power Systems, Inc. vendor SURECOM 0x0769 Surecom Technology vendor HIDGLOBAL 0x076b HID Global @@ -2887,7 +2887,9 @@ product MICROTEK V6UL 0x80ac ScanMaker product MICROTUNE BT_DONGLE 0x1000 Bluetooth USB dongle /* Midiman products */ -product MIDIMAN MIDISPORT2X2 0x1001 Midisport 2x2 +product MAUDIO MIDISPORT2X2 0x1001 Midisport 2x2 +product MAUDIO FASTTRACKULTRA 0x2080 Fast Track Ultra +product MAUDIO FASTTRACKULTRA8R 0x2081 Fast Track Ultra 8R /* MindsAtWork products */ product MINDSATWORK WALLET 0x0001 Digital Wallet From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 11:43: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 DF1A4894 for ; Fri, 26 Oct 2012 11:43:44 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 45D868FC0A for ; Fri, 26 Oct 2012 11:43:43 +0000 (UTC) Received: (qmail 54886 invoked from network); 26 Oct 2012 13:21:12 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 26 Oct 2012 13:21:12 -0000 Message-ID: <508A7762.1040106@freebsd.org> Date: Fri, 26 Oct 2012 13:43:30 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r242079 - in head: sbin/ipfw share/man/man4 sys/conf sys/net sys/netinet sys/netinet6 sys/netpfil/ipfw References: <201210250939.q9P9dF0q022970@svn.freebsd.org> <508960C2.6030003@freebsd.org> <508967E3.3070508@FreeBSD.org> <5089A13F.8080405@freebsd.org> <20121026112629.GC70741@FreeBSD.org> In-Reply-To: <20121026112629.GC70741@FreeBSD.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, "Andrey V. Elsukov" , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 11:43:45 -0000 On 26.10.2012 13:26, Gleb Smirnoff wrote: > On Thu, Oct 25, 2012 at 10:29:51PM +0200, Andre Oppermann wrote: > A> On 25.10.2012 18:25, Andrey V. Elsukov wrote: > A> > On 25.10.2012 19:54, Andre Oppermann wrote: > A> >> I still don't agree with naming the sysctl net.pfil.forward. This > A> >> type of forwarding is a property of IPv4 and IPv6 and thus should > A> >> be put there. Pfil hooking can be on layer 2, 2-bridging, 3 and > A> >> who knows where else in the future. Forwarding works only for IPv46. > A> >> > A> >> You haven't even replied to my comment on net@. Please change the > A> >> sysctl location and name to its appropriate place. > A> > > A> > Hi Andre, > A> > > A> > There were two replies related to this subject, you did not replied to > A> > them and i thought that you became agree. > A> > A> I replied to your reply to mine. Other than that I didn't find > A> anything else from you. > A> > A> > So, if not, what you think about the name net.pfil.ipforward? > A> > A> net.inet.ip.pfil_forward > A> net.inet6.ip6.pfil_forward > A> > A> or something like that. > A> > A> If you can show with your performance profiling that the sysctl > A> isn't even necessary, you could leave it completely away and have > A> pfil_forward enabled permanently. That would be even better for > A> everybody. > > I'd prefer to have the sysctl. Benchmarking will definitely show > no regression, because in default case packets are tagless. But if > packets would carry 1 or 2 tags each, which don't actually belong > to PACKET_TAG_IPFORWARD, then processing would be pessimized. With M_FASTFWD_OURS I used an overlay of the protocol specific M_PROTO[1-5] mbuf flags. The same can be done with M_IPFORWARD. The ipfw code then will not only add the m_tag but also set M_IPFORWARD flag. That way no sysctl is required and the feature is always available. The overlay definition is in ip_var.h. -- Andre From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 11:57: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 2EC31C9E for ; Fri, 26 Oct 2012 11:57:36 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-da0-f54.google.com (mail-da0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id E7C908FC0A for ; Fri, 26 Oct 2012 11:57:35 +0000 (UTC) Received: by mail-da0-f54.google.com with SMTP id z9so1354770dad.13 for ; Fri, 26 Oct 2012 04:57:35 -0700 (PDT) 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=Dxdj7Rz+jBwp3WtwbmD6wKRKh+BjiQdCxAV4Lt5l+So=; b=KYNYxIOoeyx+SPDBoFeRggyIMd1KKF/WXJksPJXcULUstfRVy+nWG9H2E30jTrdNBI MjOcWn0KO32rpLjRUreUi/jYH+heSJ0n3JYOWZy15JpiChjqIJt/krngdlgnFfAHlX08 nkT2S72LGCh+/yjsdgXOpY4/aNAJf2bzOVG08= 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:cc:content-type :x-gm-message-state; bh=Dxdj7Rz+jBwp3WtwbmD6wKRKh+BjiQdCxAV4Lt5l+So=; b=VRv/8bqCLu5bLsc7txzMpVaNCAsRJXqAPGr39LF1PznAIoEku6Aj4Nrf4SS10mp7jh RRvzkUpwK3QIrjzSrkJGJmis9lS7lZRgM52ptsO/8x+FGfbQbUwTtFveviYnsHcGFeek RU8HvsCO9Ph+6zH94VoTUM/kgIzWzqvf8Ct3ko8R8ijTGNb+7L8iNXI8vPPGOlsbbk6I IGwvLQPkFx/ARdpV4RuYR4Jkd3lCyDaW0YDOvQx19NJeAY3KqaXZOPDDS/8cJmMgmCnX ESYVDxAaTdOmnpxCyNh30uIvDeQbO3/RRv5RSYD6fckLO1qGLjR4YEOCQRqDYmuLj2Ri cfIA== Received: by 10.68.222.105 with SMTP id ql9mr68595831pbc.97.1351252649692; Fri, 26 Oct 2012 04:57:29 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.66.161.163 with HTTP; Fri, 26 Oct 2012 04:56:59 -0700 (PDT) In-Reply-To: References: <201210260034.q9Q0YRmY082297@svn.freebsd.org> From: Eitan Adler Date: Fri, 26 Oct 2012 07:56:59 -0400 X-Google-Sender-Auth: vaDFsffH5nKwMcamFJnLJ_CRhW8 Message-ID: Subject: Re: svn commit: r242109 - stable/9/games/fortune/datfiles To: Ronald Klop Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQnPMHsgE+Lk93sOjpryuk/f9OQK3O/E0X9+rOBM8egyJynAIiRLKDNOV/BB6F1IPgStIQ/P Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 11:57:36 -0000 On 26 October 2012 06:02, Ronald Klop wrote: > Will sysinstall also be removed on stable/9? Although I don't really care > about sysinstall I'm curious. Not AFAIK. I MFCed this change to avoid pointless divergence when MFCing future changes. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 12:24: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 2A762613; Fri, 26 Oct 2012 12:24:39 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 113A48FC0C; Fri, 26 Oct 2012 12:24: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 q9QCOcLO097741; Fri, 26 Oct 2012 12:24:38 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QCOcZU097739; Fri, 26 Oct 2012 12:24:38 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <201210261224.q9QCOcZU097739@svn.freebsd.org> From: Nick Hibma Date: Fri, 26 Oct 2012 12:24:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242128 - stable/8/sys/dev/usb/serial X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 12:24:39 -0000 Author: n_hibma Date: Fri Oct 26 12:24:38 2012 New Revision: 242128 URL: http://svn.freebsd.org/changeset/base/242128 Log: MFC 241555: Implement modem control in u3g. Tested on Option GTM382W, Huawei E220, and Sierra Wireless MC8790V. Also implement the .ucom_poll method. Note: It resolves ppp hanging during the PPp> phase. Modified: stable/8/sys/dev/usb/serial/u3g.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/8/sys/dev/usb/serial/u3g.c Fri Oct 26 11:41:57 2012 (r242127) +++ stable/8/sys/dev/usb/serial/u3g.c Fri Oct 26 12:24:38 2012 (r242128) @@ -53,6 +53,7 @@ #include #include #include +#include #include "usbdevs.h" #define USB_DEBUG_VAR u3g_debug @@ -99,6 +100,7 @@ SYSCTL_INT(_hw_usb_u3g, OID_AUTO, debug, enum { U3G_BULK_WR, U3G_BULK_RD, + U3G_INTR, U3G_N_TRANSFER, }; @@ -107,12 +109,15 @@ struct u3g_softc { struct ucom_softc sc_ucom[U3G_MAXPORTS]; struct usb_xfer *sc_xfer[U3G_MAXPORTS][U3G_N_TRANSFER]; + uint8_t sc_iface[U3G_MAXPORTS]; /* local status register */ + uint8_t sc_lsr[U3G_MAXPORTS]; /* local status register */ + uint8_t sc_msr[U3G_MAXPORTS]; /* u3g status register */ + uint16_t sc_line[U3G_MAXPORTS]; /* line status */ + struct usb_device *sc_udev; struct mtx sc_mtx; - uint8_t sc_lsr; /* local status register */ - uint8_t sc_msr; /* U3G status register */ - uint8_t sc_numports; + uint8_t sc_numports; }; static device_probe_t u3g_probe; @@ -121,11 +126,16 @@ static device_detach_t u3g_detach; static usb_callback_t u3g_write_callback; static usb_callback_t u3g_read_callback; +static usb_callback_t u3g_intr_callback; +static void u3g_cfg_get_status(struct ucom_softc *, uint8_t *, uint8_t *); +static void u3g_cfg_set_dtr(struct ucom_softc *, uint8_t); +static void u3g_cfg_set_rts(struct ucom_softc *, uint8_t); static void u3g_start_read(struct ucom_softc *ucom); static void u3g_stop_read(struct ucom_softc *ucom); static void u3g_start_write(struct ucom_softc *ucom); static void u3g_stop_write(struct ucom_softc *ucom); +static void u3g_poll(struct ucom_softc *ucom); static void u3g_test_autoinst(void *, struct usb_device *, @@ -153,13 +163,26 @@ static const struct usb_config u3g_confi .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, .callback = &u3g_read_callback, }, + + [U3G_INTR] = { + .type = UE_INTERRUPT, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_IN, + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,.no_pipe_ok = 1,}, + .bufsize = 0, /* use wMaxPacketSize */ + .callback = &u3g_intr_callback, + }, }; static const struct ucom_callback u3g_callback = { + .ucom_cfg_get_status = &u3g_cfg_get_status, + .ucom_cfg_set_dtr = &u3g_cfg_set_dtr, + .ucom_cfg_set_rts = &u3g_cfg_set_rts, .ucom_start_read = &u3g_start_read, .ucom_stop_read = &u3g_stop_read, .ucom_start_write = &u3g_start_write, .ucom_stop_write = &u3g_stop_write, + .ucom_poll = &u3g_poll, }; static device_method_t u3g_methods[] = { @@ -839,6 +862,15 @@ u3g_attach(device_t dev) continue; } + iface = usbd_get_iface(uaa->device, i); + id = usbd_get_interface_descriptor(iface); + sc->sc_iface[nports] = id->bInterfaceNumber; + + if (bootverbose && sc->sc_xfer[nports][U3G_INTR]) { + device_printf(dev, "port %d supports modem control", + nports); + } + /* set stall by default */ mtx_lock(&sc->sc_mtx); usbd_xfer_set_stall(sc->sc_xfer[nports][U3G_BULK_WR]); @@ -896,6 +928,9 @@ u3g_start_read(struct ucom_softc *ucom) { struct u3g_softc *sc = ucom->sc_parent; + /* start interrupt endpoint (if configured) */ + usbd_transfer_start(sc->sc_xfer[ucom->sc_subunit][U3G_INTR]); + /* start read endpoint */ usbd_transfer_start(sc->sc_xfer[ucom->sc_subunit][U3G_BULK_RD]); return; @@ -906,6 +941,9 @@ u3g_stop_read(struct ucom_softc *ucom) { struct u3g_softc *sc = ucom->sc_parent; + /* stop interrupt endpoint (if configured) */ + usbd_transfer_stop(sc->sc_xfer[ucom->sc_subunit][U3G_INTR]); + /* stop read endpoint */ usbd_transfer_stop(sc->sc_xfer[ucom->sc_subunit][U3G_BULK_RD]); return; @@ -988,3 +1026,134 @@ tr_setup: } return; } + +static void +u3g_cfg_get_status(struct ucom_softc *ucom, uint8_t *lsr, uint8_t *msr) +{ + struct u3g_softc *sc = ucom->sc_parent; + + *lsr = sc->sc_lsr[ucom->sc_subunit]; + *msr = sc->sc_msr[ucom->sc_subunit]; +} + +static void +u3g_cfg_set_line(struct ucom_softc *ucom) +{ + struct u3g_softc *sc = ucom->sc_parent; + struct usb_device_request req; + + req.bmRequestType = UT_WRITE_CLASS_INTERFACE; + req.bRequest = UCDC_SET_CONTROL_LINE_STATE; + USETW(req.wValue, sc->sc_line[ucom->sc_subunit]); + req.wIndex[0] = sc->sc_iface[ucom->sc_subunit]; + req.wIndex[1] = 0; + USETW(req.wLength, 0); + + ucom_cfg_do_request(sc->sc_udev, ucom, + &req, NULL, 0, 1000); +} + +static void +u3g_cfg_set_dtr(struct ucom_softc *ucom, uint8_t onoff) +{ + struct u3g_softc *sc = ucom->sc_parent; + + DPRINTF("onoff = %d\n", onoff); + + if (onoff) + sc->sc_line[ucom->sc_subunit] |= UCDC_LINE_DTR; + else + sc->sc_line[ucom->sc_subunit] &= ~UCDC_LINE_DTR; + + u3g_cfg_set_line(ucom); +} + +static void +u3g_cfg_set_rts(struct ucom_softc *ucom, uint8_t onoff) +{ + struct u3g_softc *sc = ucom->sc_parent; + + DPRINTF("onoff = %d\n", onoff); + + if (onoff) + sc->sc_line[ucom->sc_subunit] |= UCDC_LINE_RTS; + else + sc->sc_line[ucom->sc_subunit] &= ~UCDC_LINE_RTS; + + u3g_cfg_set_line(ucom); +} + +static void +u3g_intr_callback(struct usb_xfer *xfer, usb_error_t error) +{ + struct ucom_softc *ucom = usbd_xfer_softc(xfer); + struct u3g_softc *sc = ucom->sc_parent; + struct usb_page_cache *pc; + struct usb_cdc_notification pkt; + int actlen; + uint16_t wLen; + uint8_t mstatus; + + usbd_xfer_status(xfer, &actlen, NULL, NULL, NULL); + + switch (USB_GET_STATE(xfer)) { + case USB_ST_TRANSFERRED: + if (actlen < 8) { /* usb_cdc_notification with 2 data bytes */ + DPRINTF("message too short (expected 8, received %d)\n", actlen); + goto tr_setup; + } + pc = usbd_xfer_get_frame(xfer, 0); + usbd_copy_out(pc, 0, &pkt, actlen); + + wLen = UGETW(pkt.wLength); + if (wLen < 2) { + DPRINTF("message too short (expected 2 data bytes, received %d)\n", wLen); + goto tr_setup; + } + + if (pkt.bmRequestType == UCDC_NOTIFICATION + && pkt.bNotification == UCDC_N_SERIAL_STATE) { + /* + * Set the serial state in ucom driver based on + * the bits from the notify message + */ + DPRINTF("notify bytes = 0x%02x, 0x%02x\n", + pkt.data[0], pkt.data[1]); + + /* currently, lsr is always zero. */ + sc->sc_lsr[ucom->sc_subunit] = 0; + sc->sc_msr[ucom->sc_subunit] = 0; + + mstatus = pkt.data[0]; + + if (mstatus & UCDC_N_SERIAL_RI) + sc->sc_msr[ucom->sc_subunit] |= SER_RI; + if (mstatus & UCDC_N_SERIAL_DSR) + sc->sc_msr[ucom->sc_subunit] |= SER_DSR; + if (mstatus & UCDC_N_SERIAL_DCD) + sc->sc_msr[ucom->sc_subunit] |= SER_DCD; + ucom_status_change(ucom); + } + + case USB_ST_SETUP: +tr_setup: + usbd_xfer_set_frame_len(xfer, 0, usbd_xfer_max_len(xfer)); + usbd_transfer_submit(xfer); + return; + + default: /* Error */ + if (error != USB_ERR_CANCELLED) { + /* try to clear stall first */ + usbd_xfer_set_stall(xfer); + goto tr_setup; + } + return; + } +} + +static void +u3g_poll(struct ucom_softc *ucom) +{ + struct u3g_softc *sc = ucom->sc_parent; + usbd_transfer_poll(sc->sc_xfer[ucom->sc_subunit], U3G_N_TRANSFER); +} From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 12:29:58 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by hub.freebsd.org (Postfix) with ESMTP id 980E58C3; Fri, 26 Oct 2012 12:29:58 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from [127.0.0.1] (hub.FreeBSD.org [8.8.178.136]) by mx2.freebsd.org (Postfix) with ESMTP id C807C3B4F16; Fri, 26 Oct 2012 12:29:56 +0000 (UTC) Message-ID: <508A823A.30308@FreeBSD.org> Date: Fri, 26 Oct 2012 16:29:46 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:16.0) Gecko/20121023 Thunderbird/16.0.1 MIME-Version: 1.0 To: Andre Oppermann Subject: Re: svn commit: r242079 - in head: sbin/ipfw share/man/man4 sys/conf sys/net sys/netinet sys/netinet6 sys/netpfil/ipfw References: <201210250939.q9P9dF0q022970@svn.freebsd.org> <508960C2.6030003@freebsd.org> <508967E3.3070508@FreeBSD.org> <5089A13F.8080405@freebsd.org> <20121026112629.GC70741@FreeBSD.org> <508A7762.1040106@freebsd.org> In-Reply-To: <508A7762.1040106@freebsd.org> X-Enigmail-Version: 1.4.5 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Gleb Smirnoff , src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 12:29:58 -0000 On 26.10.2012 15:43, Andre Oppermann wrote: >> A> If you can show with your performance profiling that the sysctl >> A> isn't even necessary, you could leave it completely away and have >> A> pfil_forward enabled permanently. That would be even better for >> A> everybody. >> >> I'd prefer to have the sysctl. Benchmarking will definitely show >> no regression, because in default case packets are tagless. But if >> packets would carry 1 or 2 tags each, which don't actually belong >> to PACKET_TAG_IPFORWARD, then processing would be pessimized. > > With M_FASTFWD_OURS I used an overlay of the protocol specific M_PROTO[1-5] > mbuf flags. The same can be done with M_IPFORWARD. The ipfw code then > will not only add the m_tag but also set M_IPFORWARD flag. That way no > sysctl is required and the feature is always available. The overlay > definition is in ip_var.h. It seems we have only one bit in the m_flags that can be used, so, maybe we left it to some things that can appear in the future? -- WBR, Andrey V. Elsukov From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 12:41: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 5E2B6D62; Fri, 26 Oct 2012 12:41:02 +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 45F1B8FC18; Fri, 26 Oct 2012 12:41: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 q9QCf2lY000496; Fri, 26 Oct 2012 12:41:02 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QCf2Xv000494; Fri, 26 Oct 2012 12:41:02 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201210261241.q9QCf2Xv000494@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 26 Oct 2012 12:41:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242129 - head/sys/dev/sound/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 12:41:02 -0000 Author: hselasky Date: Fri Oct 26 12:41:01 2012 New Revision: 242129 URL: http://svn.freebsd.org/changeset/base/242129 Log: Make sure the vendor class quirk only matches the vendor specific class, else multiple pcm devices can appear on certain USB audio devices. MFC after: 1 week Modified: head/sys/dev/sound/usb/uaudio.c Modified: head/sys/dev/sound/usb/uaudio.c ============================================================================== --- head/sys/dev/sound/usb/uaudio.c Fri Oct 26 12:24:38 2012 (r242128) +++ head/sys/dev/sound/usb/uaudio.c Fri Oct 26 12:41:01 2012 (r242129) @@ -618,7 +618,8 @@ uaudio_probe(device_t dev) /* lookup non-standard device */ if (uaa->info.bInterfaceClass != UICLASS_AUDIO) { - if (usb_test_quirk(uaa, UQ_AU_VENDOR_CLASS) == 0) + if (uaa->info.bInterfaceClass != UICLASS_VENDOR || + usb_test_quirk(uaa, UQ_AU_VENDOR_CLASS) == 0) return (ENXIO); } From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 12:46: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 D8386FF5; Fri, 26 Oct 2012 12:46:33 +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 BFDD88FC08; Fri, 26 Oct 2012 12:46: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 q9QCkXel001435; Fri, 26 Oct 2012 12:46:33 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QCkXPV001433; Fri, 26 Oct 2012 12:46:33 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201210261246.q9QCkXPV001433@svn.freebsd.org> From: Jaakko Heinonen Date: Fri, 26 Oct 2012 12:46:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242130 - head/lib/libgeom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 12:46:34 -0000 Author: jh Date: Fri Oct 26 12:46:33 2012 New Revision: 242130 URL: http://svn.freebsd.org/changeset/base/242130 Log: Improve libgeom XML parsing error handling. - Abort parsing and return an error if we run out of memory. - Return EILSEQ from geom_xml2tree() for XML syntax errors. Silence on: freebsd-geom Modified: head/lib/libgeom/geom_xml2tree.c Modified: head/lib/libgeom/geom_xml2tree.c ============================================================================== --- head/lib/libgeom/geom_xml2tree.c Fri Oct 26 12:41:01 2012 (r242129) +++ head/lib/libgeom/geom_xml2tree.c Fri Oct 26 12:46:33 2012 (r242130) @@ -56,6 +56,8 @@ struct mystate { struct sbuf *sbuf[20]; struct gconf *config; int nident; + XML_Parser parser; + int error; }; static void @@ -85,6 +87,8 @@ StartElement(void *userData, const char if (!strcmp(name, "class") && mt->class == NULL) { mt->class = calloc(1, sizeof *mt->class); if (mt->class == NULL) { + mt->error = errno; + XML_StopParser(mt->parser, 0); warn("Cannot allocate memory during processing of '%s' " "element", name); return; @@ -98,6 +102,8 @@ StartElement(void *userData, const char if (!strcmp(name, "geom") && mt->geom == NULL) { mt->geom = calloc(1, sizeof *mt->geom); if (mt->geom == NULL) { + mt->error = errno; + XML_StopParser(mt->parser, 0); warn("Cannot allocate memory during processing of '%s' " "element", name); return; @@ -116,6 +122,8 @@ StartElement(void *userData, const char if (!strcmp(name, "consumer") && mt->consumer == NULL) { mt->consumer = calloc(1, sizeof *mt->consumer); if (mt->consumer == NULL) { + mt->error = errno; + XML_StopParser(mt->parser, 0); warn("Cannot allocate memory during processing of '%s' " "element", name); return; @@ -137,6 +145,8 @@ StartElement(void *userData, const char if (!strcmp(name, "provider") && mt->provider == NULL) { mt->provider = calloc(1, sizeof *mt->provider); if (mt->provider == NULL) { + mt->error = errno; + XML_StopParser(mt->parser, 0); warn("Cannot allocate memory during processing of '%s' " "element", name); return; @@ -180,16 +190,19 @@ EndElement(void *userData, const char *n char *p; mt = userData; - sbuf_finish(mt->sbuf[mt->level]); - p = strdup(sbuf_data(mt->sbuf[mt->level])); + p = NULL; + if (sbuf_finish(mt->sbuf[mt->level]) == 0) + p = strdup(sbuf_data(mt->sbuf[mt->level])); + sbuf_delete(mt->sbuf[mt->level]); + mt->sbuf[mt->level] = NULL; + mt->level--; if (p == NULL) { + mt->error = errno; + XML_StopParser(mt->parser, 0); warn("Cannot allocate memory during processing of '%s' " "element", name); return; } - sbuf_delete(mt->sbuf[mt->level]); - mt->sbuf[mt->level] = NULL; - mt->level--; if (strlen(p) == 0) { free(p); p = NULL; @@ -249,12 +262,16 @@ EndElement(void *userData, const char *n if (mt->config != NULL) { gc = calloc(1, sizeof *gc); if (gc == NULL) { + mt->error = errno; + XML_StopParser(mt->parser, 0); warn("Cannot allocate memory during processing of '%s' " "element", name); return; } gc->lg_name = strdup(name); if (gc->lg_name == NULL) { + mt->error = errno; + XML_StopParser(mt->parser, 0); warn("Cannot allocate memory during processing of '%s' " "element", name); return; @@ -334,7 +351,7 @@ geom_xml2tree(struct gmesh *gmp, char *p struct ggeom *ge; struct gprovider *pr; struct gconsumer *co; - int i; + int error, i; memset(gmp, 0, sizeof *gmp); LIST_INIT(&gmp->lg_class); @@ -347,14 +364,22 @@ geom_xml2tree(struct gmesh *gmp, char *p return (ENOMEM); } mt->mesh = gmp; + mt->parser = parser; + error = 0; XML_SetUserData(parser, mt); XML_SetElementHandler(parser, StartElement, EndElement); XML_SetCharacterDataHandler(parser, CharData); i = XML_Parse(parser, p, strlen(p), 1); + if (mt->error != 0) + error = mt->error; + else if (i != 1) { + error = XML_GetErrorCode(parser) == XML_ERROR_NO_MEMORY ? + ENOMEM : EILSEQ; + } XML_ParserFree(parser); - if (i != 1) { + if (error != 0) { free(mt); - return (-1); + return (error); } gmp->lg_ident = calloc(sizeof *gmp->lg_ident, mt->nident + 1); free(mt); From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 13:24: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 46E05811 for ; Fri, 26 Oct 2012 13:24:57 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 8D8718FC16 for ; Fri, 26 Oct 2012 13:24:56 +0000 (UTC) Received: (qmail 56231 invoked from network); 26 Oct 2012 15:02:23 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 26 Oct 2012 15:02:23 -0000 Message-ID: <508A8F1A.7020902@freebsd.org> Date: Fri, 26 Oct 2012 15:24:42 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: "Andrey V. Elsukov" Subject: Re: svn commit: r242079 - in head: sbin/ipfw share/man/man4 sys/conf sys/net sys/netinet sys/netinet6 sys/netpfil/ipfw References: <201210250939.q9P9dF0q022970@svn.freebsd.org> <508960C2.6030003@freebsd.org> <508967E3.3070508@FreeBSD.org> <5089A13F.8080405@freebsd.org> <20121026112629.GC70741@FreeBSD.org> <508A7762.1040106@freebsd.org> <508A823A.30308@FreeBSD.org> In-Reply-To: <508A823A.30308@FreeBSD.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Gleb Smirnoff , src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 13:24:57 -0000 On 26.10.2012 14:29, Andrey V. Elsukov wrote: > On 26.10.2012 15:43, Andre Oppermann wrote: >>> A> If you can show with your performance profiling that the sysctl >>> A> isn't even necessary, you could leave it completely away and have >>> A> pfil_forward enabled permanently. That would be even better for >>> A> everybody. >>> >>> I'd prefer to have the sysctl. Benchmarking will definitely show >>> no regression, because in default case packets are tagless. But if >>> packets would carry 1 or 2 tags each, which don't actually belong >>> to PACKET_TAG_IPFORWARD, then processing would be pessimized. >> >> With M_FASTFWD_OURS I used an overlay of the protocol specific M_PROTO[1-5] >> mbuf flags. The same can be done with M_IPFORWARD. The ipfw code then >> will not only add the m_tag but also set M_IPFORWARD flag. That way no >> sysctl is required and the feature is always available. The overlay >> definition is in ip_var.h. > > It seems we have only one bit in the m_flags that can be used, so, maybe > we left it to some things that can appear in the future? That's what the M_PROTO flags are for: #define M_IPFW_FORWARD M_PROTO2 /* ip forwarding */ of course you have to do the same for ip6. The M_PROTO[1-5] flags are only valid within a protocol layer. For example they get cleared in ip_output() before the packet is handed to layer 2. -- Andre From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 13:30: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 4F282A32 for ; Fri, 26 Oct 2012 13:30:20 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id A5D3C8FC0C for ; Fri, 26 Oct 2012 13:30:19 +0000 (UTC) Received: (qmail 56260 invoked from network); 26 Oct 2012 15:07:47 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 26 Oct 2012 15:07:47 -0000 Message-ID: <508A905D.3080702@freebsd.org> Date: Fri, 26 Oct 2012 15:30:05 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: "Andrey V. Elsukov" Subject: Re: svn commit: r242079 - in head: sbin/ipfw share/man/man4 sys/conf sys/net sys/netinet sys/netinet6 sys/netpfil/ipfw References: <201210250939.q9P9dF0q022970@svn.freebsd.org> <508960C2.6030003@freebsd.org> <508967E3.3070508@FreeBSD.org> <5089A13F.8080405@freebsd.org> <20121026112629.GC70741@FreeBSD.org> <508A7762.1040106@freebsd.org> <508A823A.30308@FreeBSD.org> <508A8F1A.7020902@freebsd.org> In-Reply-To: <508A8F1A.7020902@freebsd.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Gleb Smirnoff , src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 13:30:20 -0000 On 26.10.2012 15:24, Andre Oppermann wrote: > On 26.10.2012 14:29, Andrey V. Elsukov wrote: >> On 26.10.2012 15:43, Andre Oppermann wrote: >>>> A> If you can show with your performance profiling that the sysctl >>>> A> isn't even necessary, you could leave it completely away and have >>>> A> pfil_forward enabled permanently. That would be even better for >>>> A> everybody. >>>> >>>> I'd prefer to have the sysctl. Benchmarking will definitely show >>>> no regression, because in default case packets are tagless. But if >>>> packets would carry 1 or 2 tags each, which don't actually belong >>>> to PACKET_TAG_IPFORWARD, then processing would be pessimized. >>> >>> With M_FASTFWD_OURS I used an overlay of the protocol specific M_PROTO[1-5] >>> mbuf flags. The same can be done with M_IPFORWARD. The ipfw code then >>> will not only add the m_tag but also set M_IPFORWARD flag. That way no >>> sysctl is required and the feature is always available. The overlay >>> definition is in ip_var.h. >> >> It seems we have only one bit in the m_flags that can be used, so, maybe >> we left it to some things that can appear in the future? > > That's what the M_PROTO flags are for: > > #define M_IPFW_FORWARD M_PROTO2 /* ip forwarding */ Actually looking at it technically this isn't forwarding but specifying a different nexthop. Hence the #define and description should be more like #define M_IP_NEXTHOP M_PROTO2 /* explicit ip nexthop */ Of course the userspace ipfw feature naming and usage doesn't change. But within the kernel it's really nexthop manipulation within the forwarding path. -- Andre > of course you have to do the same for ip6. > > The M_PROTO[1-5] flags are only valid within a protocol layer. For > example they get cleared in ip_output() before the packet is handed > to layer 2. > From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 13:39: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 8AC13CDB; Fri, 26 Oct 2012 13:39:30 +0000 (UTC) (envelope-from jbeich@tormail.org) Received: from outgoing.tormail.org (outgoing.tormail.org [82.221.96.22]) by mx1.freebsd.org (Postfix) with ESMTP id 0F5D68FC08; Fri, 26 Oct 2012 13:39:29 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=internal.tormail.org) by outgoing.tormail.org with esmtp (Exim 4.72) (envelope-from ) id 1TRk88-0000wr-Lg; Fri, 26 Oct 2012 17:39:21 +0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tormail.org; s=tm; h=Message-Id:X-TorMail-User:Content-Type:MIME-Version:References:Date:In-Reply-To:Subject:Cc:To:From; bh=Dxcwkng3a296ZLBiSsWKSVYgkr2VozZy0Bf6fo8WaMw=; b=kJ7AVIMv+1I1jAIpd+4786j5tSzidoisQCvykkHwJXIIBk5xA3rfh6Z7zsYoCowVDgGO/GL9uijnIqvL1faprwEZVLAWrQtq8ZoL21VbdbQv6HbwOxbiOHdlYvRru+Pcrhl+n0czYI7zReTPGftZ8FIgXz/hDIsXfOqk+uzMCc4=; Received: from jbeich by internal.tormail.org with local (Exim 4.63) (envelope-from ) id 1TRk6h-000L25-0p; Fri, 26 Oct 2012 13:37:53 +0000 From: Jan Beich To: Eitan Adler Subject: Re: svn commit: r242120 - head/usr.sbin/cpucontrol In-Reply-To: <201210260250.q9Q2oH8P005136__18925.7027851001$1351219846$gmane$org@svn.freebsd.org> (Eitan Adler's message of "Fri, 26 Oct 2012 02:50:17 +0000 (UTC)") Date: Fri, 26 Oct 2012 03:37:22 -1000 References: <201210260250.q9Q2oH8P005136__18925.7027851001$1351219846$gmane$org@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain X-TorMail-User: jbeich Message-Id: <1TRk6h-000L25-0p@internal.tormail.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 13:39:30 -0000 Eitan Adler writes: > Author: eadler > Date: Fri Oct 26 02:50:16 2012 > New Revision: 242120 > URL: http://svn.freebsd.org/changeset/base/242120 > > Log: > This utility builds without NO_WCAST_ALIGN Not for clang. It probably predates NO_WCAST_ALIGN.clang= support. intel.c:66:3: warning: cast from 'char *' to 'uint32_t *' (aka 'unsigned int *') increases required alignment from 1 to 4 [-Wcast-align] ((uint32_t *)vendor)[0] = idargs.data[1]; ^~~~~~~~~~~~~~~~~~ intel.c:67:3: warning: cast from 'char *' to 'uint32_t *' (aka 'unsigned int *') increases required alignment from 1 to 4 [-Wcast-align] ((uint32_t *)vendor)[1] = idargs.data[3]; ^~~~~~~~~~~~~~~~~~ intel.c:68:3: warning: cast from 'char *' to 'uint32_t *' (aka 'unsigned int *') increases required alignment from 1 to 4 [-Wcast-align] ((uint32_t *)vendor)[2] = idargs.data[2]; ^~~~~~~~~~~~~~~~~~ intel.c:211:7: warning: cast from 'char *' to 'intel_ext_header_t *' (aka 'struct intel_ext_header *') increases required alignment from 1 to 4 [-Wcast-align] (intel_ext_header_t *)((char *)fw_image + payload_size); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ amd.c:64:3: warning: cast from 'char *' to 'uint32_t *' (aka 'unsigned int *') increases required alignment from 1 to 4 [-Wcast-align] ((uint32_t *)vendor)[0] = idargs.data[1]; ^~~~~~~~~~~~~~~~~~ amd.c:65:3: warning: cast from 'char *' to 'uint32_t *' (aka 'unsigned int *') increases required alignment from 1 to 4 [-Wcast-align] ((uint32_t *)vendor)[1] = idargs.data[3]; ^~~~~~~~~~~~~~~~~~ amd.c:66:3: warning: cast from 'char *' to 'uint32_t *' (aka 'unsigned int *') increases required alignment from 1 to 4 [-Wcast-align] ((uint32_t *)vendor)[2] = idargs.data[2]; ^~~~~~~~~~~~~~~~~~ via.c:64:3: warning: cast from 'char *' to 'uint32_t *' (aka 'unsigned int *') increases required alignment from 1 to 4 [-Wcast-align] ((uint32_t *)vendor)[0] = idargs.data[1]; ^~~~~~~~~~~~~~~~~~ via.c:65:3: warning: cast from 'char *' to 'uint32_t *' (aka 'unsigned int *') increases required alignment from 1 to 4 [-Wcast-align] ((uint32_t *)vendor)[1] = idargs.data[3]; ^~~~~~~~~~~~~~~~~~ via.c:66:3: warning: cast from 'char *' to 'uint32_t *' (aka 'unsigned int *') increases required alignment from 1 to 4 [-Wcast-align] ((uint32_t *)vendor)[2] = idargs.data[2]; ^~~~~~~~~~~~~~~~~~ From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 14:02: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 ED1F7391; Fri, 26 Oct 2012 14:02:03 +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 A6BA18FC0C; Fri, 26 Oct 2012 14:02:03 +0000 (UTC) Received: from [192.168.0.6] (spaceball.home.andric.com [192.168.0.6]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 60C685C59; Fri, 26 Oct 2012 16:02:02 +0200 (CEST) Message-ID: <508A97DB.3080105@FreeBSD.org> Date: Fri, 26 Oct 2012 16:02:03 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Jan Beich Subject: Re: svn commit: r242120 - head/usr.sbin/cpucontrol References: <201210260250.q9Q2oH8P005136__18925.7027851001$1351219846$gmane$org@svn.freebsd.org> <1TRk6h-000L25-0p@internal.tormail.org> In-Reply-To: <1TRk6h-000L25-0p@internal.tormail.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Eitan Adler X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 14:02:04 -0000 On 2012-10-26 15:37, Jan Beich wrote: > Eitan Adler writes: > >> Author: eadler >> Date: Fri Oct 26 02:50:16 2012 >> New Revision: 242120 >> URL: http://svn.freebsd.org/changeset/base/242120 >> >> Log: >> This utility builds without NO_WCAST_ALIGN > > Not for clang. It probably predates NO_WCAST_ALIGN.clang= support. > > intel.c:66:3: warning: cast from 'char *' to 'uint32_t *' (aka 'unsigned int *') > increases required alignment from 1 to 4 [-Wcast-align] > ((uint32_t *)vendor)[0] = idargs.data[1]; > ^~~~~~~~~~~~~~~~~~ Yes, on x86, you can safely turn off the -Wcast-align warnings, if it is easier. It is probably not worth the trouble to go through the code and fix the alignment issues, if it will never be run on alignment-sensitive architectures. From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 14:10: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 4657B7F2; Fri, 26 Oct 2012 14:10:26 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from argol.doit.wisc.edu (argol.doit.wisc.edu [144.92.197.212]) by mx1.freebsd.org (Postfix) with ESMTP id D58F08FC18; Fri, 26 Oct 2012 14:10:25 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from avs-daemon.smtpauth3.wiscmail.wisc.edu by smtpauth3.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0MCI007047D7FL00@smtpauth3.wiscmail.wisc.edu>; Fri, 26 Oct 2012 09:10:19 -0500 (CDT) Received: from comporellon.tachypleus.net (adsl-71-150-249-157.dsl.mdsnwi.sbcglobal.net [71.150.249.157]) by smtpauth3.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0MCI00K9V7D0B720@smtpauth3.wiscmail.wisc.edu>; Fri, 26 Oct 2012 09:10:13 -0500 (CDT) Date: Fri, 26 Oct 2012 09:10:11 -0500 From: Nathan Whitehorn Subject: Re: svn commit: r242109 - stable/9/games/fortune/datfiles In-reply-to: To: Ronald Klop Message-id: <508A99C3.20705@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=71.150.249.157 X-Spam-PmxInfo: Server=avs-15, Version=5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.10.26.140026, SenderIP=71.150.249.157 References: <201210260034.q9Q0YRmY082297@svn.freebsd.org> User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:16.0) Gecko/20121019 Thunderbird/16.0.1 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Eitan Adler , svn-src-stable-9@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 14:10:26 -0000 No. It is staying for the duration of the branch. So this MFC may have been premature. -Nathan On 10/26/12 05:02, Ronald Klop wrote: > Will sysinstall also be removed on stable/9? Although I don't really > care about sysinstall I'm curious. > > Ronald. > > On Fri, 26 Oct 2012 02:34:27 +0200, Eitan Adler > wrote: > >> Author: eadler >> Date: Fri Oct 26 00:34:27 2012 >> New Revision: 242109 >> URL: http://svn.freebsd.org/changeset/base/242109 >> >> Log: >> MFC r241845,r241934: >> Sysinstall has been removed from base. >> Approved by: cperciva (implicit) >> >> Modified: >> stable/9/games/fortune/datfiles/freebsd-tips >> Directory Properties: >> stable/9/games/fortune/ (props changed) >> >> Modified: stable/9/games/fortune/datfiles/freebsd-tips >> ============================================================================== >> >> --- stable/9/games/fortune/datfiles/freebsd-tips Fri Oct 26 >> 00:32:28 2012 (r242108) >> +++ stable/9/games/fortune/datfiles/freebsd-tips Fri Oct 26 >> 00:34:27 2012 (r242109) >> @@ -40,7 +40,7 @@ Having trouble using fetch through a fir >> variable FTP_PASSIVE_MODE to yes, and see fetch(3) for more details. >> % >> If other operating systems have damaged your Master Boot Record, you >> can >> -reinstall it either with /usr/sbin/sysinstall or with boot0cfg(8). See >> +reinstall it with boot0cfg(8). See >> "man boot0cfg" for details. >> % >> If you accidentally end up inside vi, you can quit it by pressing >> Escape, colon >> _______________________________________________ >> svn-src-all@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/svn-src-all >> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 14:29: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 1CA8ADE9; Fri, 26 Oct 2012 14:29:58 +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 043868FC0A; Fri, 26 Oct 2012 14:29: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 q9QETvSw018162; Fri, 26 Oct 2012 14:29:57 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QETv3c018160; Fri, 26 Oct 2012 14:29:57 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201210261429.q9QETv3c018160@svn.freebsd.org> From: Nathan Whitehorn Date: Fri, 26 Oct 2012 14:29:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242132 - head/sys/dev/drm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 14:29:58 -0000 Author: nwhitehorn Date: Fri Oct 26 14:29:57 2012 New Revision: 242132 URL: http://svn.freebsd.org/changeset/base/242132 Log: Make sure to define __BIG_ENDIAN and __LITTLE_ENDIAN with the appropriate number of underscores for Linux compatibility in drm(4). Submitted by: sendtomatt at gmail dot com MFC after: 2 weeks Modified: head/sys/dev/drm/drmP.h Modified: head/sys/dev/drm/drmP.h ============================================================================== --- head/sys/dev/drm/drmP.h Fri Oct 26 13:40:12 2012 (r242131) +++ head/sys/dev/drm/drmP.h Fri Oct 26 14:29:57 2012 (r242132) @@ -85,6 +85,11 @@ struct drm_file; #endif #include #include +#if _BYTE_ORDER == _BIG_ENDIAN +#define __BIG_ENDIAN 1 +#else +#define __LITTLE_ENDIAN 1 +#endif #include #include #include From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 14:30: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 7FBD4F64; Fri, 26 Oct 2012 14:30:53 +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 614CA8FC08; Fri, 26 Oct 2012 14:30: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 q9QEUrWj018372; Fri, 26 Oct 2012 14:30:53 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QEUrhh018369; Fri, 26 Oct 2012 14:30:53 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201210261430.q9QEUrhh018369@svn.freebsd.org> From: "George V. Neville-Neil" Date: Fri, 26 Oct 2012 14:30:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r242133 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 14:30:53 -0000 Author: gnn Date: Fri Oct 26 14:30:52 2012 New Revision: 242133 URL: http://svn.freebsd.org/changeset/base/242133 Log: Remove davide and sson from mentorship. In the case of davide checked with alc@ (comentor). Modified: svnadmin/conf/mentors Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Fri Oct 26 14:29:57 2012 (r242132) +++ svnadmin/conf/mentors Fri Oct 26 14:30:52 2012 (r242133) @@ -15,7 +15,6 @@ art avg Co-mentor: marcel benl philip Co-mentor: simon bgray cognet davidcs gnn -davide gnn Co-mentor: alc eadler cperciva eri mlaier Co-mentor: thompsa erwin delphij @@ -33,7 +32,6 @@ peterj jhb Co-mentor: grog ray adrian sjg marcel snb dwmalone -sson gnn versus gavin Co-mentor: fjoe will ken zont kib From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 14:36: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 9B08934D; Fri, 26 Oct 2012 14:36:02 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 833238FC12; Fri, 26 Oct 2012 14:36: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 q9QEa22U019302; Fri, 26 Oct 2012 14:36:02 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QEa2Y5019300; Fri, 26 Oct 2012 14:36:02 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201210261436.q9QEa2Y5019300@svn.freebsd.org> From: Warner Losh Date: Fri, 26 Oct 2012 14:36:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242134 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 14:36:02 -0000 Author: imp Date: Fri Oct 26 14:36:02 2012 New Revision: 242134 URL: http://svn.freebsd.org/changeset/base/242134 Log: These no longer appera to be necessary for either 32-bit or 64-bit builds, eliminate them. Modified: head/sys/conf/files.mips Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Fri Oct 26 14:30:52 2012 (r242133) +++ head/sys/conf/files.mips Fri Oct 26 14:36:02 2012 (r242134) @@ -49,12 +49,9 @@ kern/link_elf_obj.c standard kern/subr_dummy_vdso_tc.c standard # gcc/clang runtime -libkern/ashldi3.c standard -libkern/ashrdi3.c standard libkern/ffsl.c standard libkern/fls.c standard libkern/flsl.c standard -libkern/lshrdi3.c standard libkern/memchr.c optional fdt libkern/memmove.c standard libkern/ucmpdi2.c optional mips | mipsel From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 14:50: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 5592A8F5; Fri, 26 Oct 2012 14:50:17 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3D06D8FC08; Fri, 26 Oct 2012 14:50: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 q9QEoHcD021614; Fri, 26 Oct 2012 14:50:17 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QEoHWB021612; Fri, 26 Oct 2012 14:50:17 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210261450.q9QEoHWB021612@svn.freebsd.org> From: Andriy Gapon Date: Fri, 26 Oct 2012 14:50:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242135 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 14:50:17 -0000 Author: avg Date: Fri Oct 26 14:50:16 2012 New Revision: 242135 URL: http://svn.freebsd.org/changeset/base/242135 Log: zfs: fix label validation code in vdev_geom_read_config POOL_STATE_SPARE and POOL_STATE_L2CACHE were not handled correctly and thus the cache and spare disks would not be correctly probed. Reported by: Michael Schmiedgen , Matthew D. Fuller Tested by: Michael Schmiedgen , flo MFC after: 5 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Fri Oct 26 14:36:02 2012 (r242134) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Fri Oct 26 14:50:16 2012 (r242135) @@ -270,14 +270,16 @@ vdev_geom_read_config(struct g_consumer continue; if (nvlist_lookup_uint64(*config, ZPOOL_CONFIG_POOL_STATE, - &state) != 0 || state >= POOL_STATE_DESTROYED) { + &state) != 0 || state == POOL_STATE_DESTROYED || + state > POOL_STATE_L2CACHE) { nvlist_free(*config); *config = NULL; continue; } - if (nvlist_lookup_uint64(*config, ZPOOL_CONFIG_POOL_TXG, - &txg) != 0 || txg == 0) { + if (state != POOL_STATE_SPARE && state != POOL_STATE_L2CACHE && + (nvlist_lookup_uint64(*config, ZPOOL_CONFIG_POOL_TXG, + &txg) != 0 || txg == 0)) { nvlist_free(*config); *config = NULL; continue; From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 15:21: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 60F621AC; Fri, 26 Oct 2012 15:21:24 +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 495AA8FC18; Fri, 26 Oct 2012 15:21: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 q9QFLOIh027728; Fri, 26 Oct 2012 15:21:24 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QFLObT027726; Fri, 26 Oct 2012 15:21:24 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210261521.q9QFLObT027726@svn.freebsd.org> From: Eitan Adler Date: Fri, 26 Oct 2012 15:21:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242136 - head/usr.bin/uuencode X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 15:21:24 -0000 Author: eadler Date: Fri Oct 26 15:21:23 2012 New Revision: 242136 URL: http://svn.freebsd.org/changeset/base/242136 Log: Prefer an example users born after myself might use. Approved by: bcr (mentor) MFC after: 3 days Modified: head/usr.bin/uuencode/uuencode.1 Modified: head/usr.bin/uuencode/uuencode.1 ============================================================================== --- head/usr.bin/uuencode/uuencode.1 Fri Oct 26 14:50:16 2012 (r242135) +++ head/usr.bin/uuencode/uuencode.1 Fri Oct 26 15:21:23 2012 (r242136) @@ -183,7 +183,7 @@ tree. .Pp .Bd -literal -offset indent -compact tar cf \- src_tree \&| compress \&| -uuencode src_tree.tar.Z \&| mail sys1!sys2!user +uuencode src_tree.tar.Z \&| mail user@example.com .Ed .Pp The following example unpacks all uuencoded From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 15:23: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 8FB05353 for ; Fri, 26 Oct 2012 15:23:54 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by mx1.freebsd.org (Postfix) with ESMTP id 539BF8FC17 for ; Fri, 26 Oct 2012 15:23:54 +0000 (UTC) Received: by mail-pa0-f54.google.com with SMTP id bi1so2135670pad.13 for ; Fri, 26 Oct 2012 08:23:48 -0700 (PDT) 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=8xhmbqN2+5VezHnxvoOuPuyOlSQOGHoLXZLmnGDcIuc=; b=EtP4aYz3+3Z9a/eGd/tzDaRY8ilCo9ZWiJlCVUO+kPv4dTPu1vNxfiy0ilnAKGzVM0 xIWcOUP66GV7XcgWUvl5fNbqLPYyLAVae2duVzBjmHUD2hQhIapYzYVlDo/jPfwD9MsB LnL52zENFULuZiYhLTWKXQL726nHb0g7QST7Q= 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:cc:content-type :x-gm-message-state; bh=8xhmbqN2+5VezHnxvoOuPuyOlSQOGHoLXZLmnGDcIuc=; b=NsxVik2tc/Gi79cUOGelbSxLXrjSAzTVGjdaXPFRENIf20AsUrUBaKRhc6F0wYYaY2 LC42deEWZDPW7XcF6Q848pa9uiwF/1tHK2pJzoMgQOXTD+h9dfNLO/BbvmKhm6f15bpj gPQdBEPcO9Ddh3AWf9WfWxLVKI7Mi6p5KiZHxst6OLOx8rscU446IZO20kgovaI2KAXL Tq3CsFc9aiIHF6L4GHwb1giVKaW/P/pZ0godIDMke3z47anyz4zk/hA7S/W78ZnIyqdK 3FAibBnxwE+IAHXG5Scc0Ixdtt9Q7OnrozBWN8VE9Pzw81MnImeto7v1vGlrA1HfxE6m r7GA== Received: by 10.68.129.72 with SMTP id nu8mr70308461pbb.29.1351265028006; Fri, 26 Oct 2012 08:23:48 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.66.161.163 with HTTP; Fri, 26 Oct 2012 08:23:17 -0700 (PDT) In-Reply-To: <508A99C3.20705@freebsd.org> References: <201210260034.q9Q0YRmY082297@svn.freebsd.org> <508A99C3.20705@freebsd.org> From: Eitan Adler Date: Fri, 26 Oct 2012 11:23:17 -0400 X-Google-Sender-Auth: DNro5PdMZyabR_nwy5zuHO0PStM Message-ID: Subject: Re: svn commit: r242109 - stable/9/games/fortune/datfiles To: Nathan Whitehorn Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQlH5Uj6i8SCuA6Ua7uhdy8KycXOV/vaRrSNAY9coutpFCSvaxs59v4tSlDgq9WFeehMsz7X Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org, Ronald Klop X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 15:23:54 -0000 On 26 October 2012 10:10, Nathan Whitehorn wrote: > No. It is staying for the duration of the branch. So this MFC may have been > premature. As I said previously: I MFCed this because it is a low-impact change and it makes future MFCs easier in the event that the fortune file changes again. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 15:44: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 965C3849; Fri, 26 Oct 2012 15:44:30 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7BD548FC12; Fri, 26 Oct 2012 15:44: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 q9QFiUZf031576; Fri, 26 Oct 2012 15:44:30 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QFiUuG031572; Fri, 26 Oct 2012 15:44:30 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201210261544.q9QFiUuG031572@svn.freebsd.org> From: "David E. O'Brien" Date: Fri, 26 Oct 2012 15:44:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242137 - in head: sys/dev/filemon tools/regression/filemon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 15:44:30 -0000 Author: obrien Date: Fri Oct 26 15:44:29 2012 New Revision: 242137 URL: http://svn.freebsd.org/changeset/base/242137 Log: Iterate rather than use recursion. We can blow out the kernel stack if there is a long chain of fork(2)s. Added: head/tools/regression/filemon/timed-forkb.c (contents, props changed) Modified: head/sys/dev/filemon/filemon_wrapper.c head/tools/regression/filemon/Makefile Modified: head/sys/dev/filemon/filemon_wrapper.c ============================================================================== --- head/sys/dev/filemon/filemon_wrapper.c Fri Oct 26 15:21:23 2012 (r242136) +++ head/sys/dev/filemon/filemon_wrapper.c Fri Oct 26 15:44:29 2012 (r242137) @@ -82,15 +82,14 @@ filemon_pid_check(struct proc *p) { struct filemon *filemon; - TAILQ_FOREACH(filemon, &filemons_inuse, link) { - if (p->p_pid == filemon->pid) - return (filemon); + while (p->p_pptr) { + TAILQ_FOREACH(filemon, &filemons_inuse, link) { + if (p->p_pid == filemon->pid) + return (filemon); + } + p = p->p_pptr; } - - if (p->p_pptr == NULL) - return (NULL); - - return (filemon_pid_check(p->p_pptr)); + return (NULL); } static void Modified: head/tools/regression/filemon/Makefile ============================================================================== --- head/tools/regression/filemon/Makefile Fri Oct 26 15:21:23 2012 (r242136) +++ head/tools/regression/filemon/Makefile Fri Oct 26 15:44:29 2012 (r242137) @@ -1,15 +1,33 @@ # $FreeBSD$ -PROG= filemontest +BINS= \ + filemontest \ + timed-forkb + +bins: filemontest timed-forkb +all: bins NO_MAN= WARNS?= 6 CFLAGS+= -I${.CURDIR}/../../../sys +# Should be "WITHOUT_CTF=" below, but stupid infastrurture fails: +# "/usr/share/mk/bsd.own.mk", line 489: WITH_CTF and WITHOUT_CTF can't both be set. +WITHOUT_CDDL= + +CLEANFILES+= ${BINS} + +tests: bins + kldstat | grep filemon + ${MAKE} test + ./timed-forkb + @echo "filemon(4) tests passed." + # Cannot use .OBJDIR -- 'filemontest' expects 'test_script.sh' in . -test: ${PROG} clean-test -.for BIN in ${PROG} ${PROG}32 +#FILEMONTEST32= filemontest32 +test: filemontest clean-test +.for BIN in filemontest ${FILEMONTEST32} cd ${.CURDIR} ; \ for A in 1 2 3 4 5 6 7 8 9 0; do \ for B in 1 2 3 4 5 6 7 8 9 0; do \ Added: head/tools/regression/filemon/timed-forkb.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/filemon/timed-forkb.c Fri Oct 26 15:44:29 2012 (r242137) @@ -0,0 +1,177 @@ +/*- + * Copyright (c) 2012 David O'Brien + * 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$ + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef SLEEP +#define SLEEP 20 /* seconds */ +#endif + +int verbose; + +static void +usage(void) +{ + fprintf(stderr, "usage: %s\n", getprogname()); + fprintf(stderr, "\t\t-n : length of fork(2) chain\n"); + fprintf(stderr, "\t\t-t : limit run-time seconds\n"); + exit(1); + /* NOTREACHED */ +} + +void term(int); +void +term(int signum) +{ + + if (getpid() == getpgrp() || verbose) { + fprintf(stderr, + "pid %d pgroup %d (ppid %d): Received SIGTERM(%d), exiting...\n", + getpid(), getpgrp(), getppid(), signum); + } + exit(1); +} + +void angel_of_mercy(int); +void +angel_of_mercy(int sig __unused) +{ + + signal(SIGALRM, SIG_IGN); /* ignore this signal */ + printf("Master process: alarmed waking up\n"); + killpg(0, SIGTERM); + return; +} + +int bombing_run(unsigned, int); +int +bombing_run(unsigned chainlen, int stime) +{ + struct rusage ru; + pid_t pid, cpid; + int status; + + if (chainlen) { + switch (pid = fork()) { + case -1: + errx(1, "%s: can't fork", __func__); + + case 0: + /* This is the code the child runs. */ + bombing_run(--chainlen, stime); + break; + + default: + /* This is the code the parent runs. */ + if (getpid() == getpgrp()) { + signal(SIGALRM, angel_of_mercy); + alarm(stime); // time for bombing run... + cpid = wait4(pid, &status, 0, &ru); + alarm(0); + printf( + "Cleanly shutting down - pid %d pgroup %d (ppid %d)\n", + getpid(), getpgrp(), getppid()); + } else { + cpid = wait4(pid, &status, 0, &ru); + } + } + } + + return 0; +} + +int +main(int argc, char *argv[]) +{ + time_t start /*,tvec*/; + char *endptr, *ctm; + size_t len; + int nflag, tflag; + int ch, k, maxprocperuid; + + (void)signal(SIGTERM, term); + + nflag = 0; + tflag = SLEEP; + + start = time(NULL); + ctm = ctime(&start); + ctm[24] = '\0'; // see: man 3 ctime + fprintf(stderr, "*** fork() generation started on \"%s\" ***\n", ctm); + + while ((ch = getopt(argc, argv, "n:t:v")) != -1) + switch (ch) { + case 'n': + nflag = strtol(optarg, &endptr, 10); + if (nflag <= 0 || *endptr != '\0') + errx(1, "illegal number, -n argument -- %s", + optarg); + break; + case 't': + tflag = strtol(optarg, &endptr, 10); + if (tflag <= 0 || *endptr != '\0') + errx(1, "illegal number, -t argument -- %s", + optarg); + break; + case 'v': + ++verbose; + break; + default: + usage(); + } + argv += optind; + + if (!nflag) { + len = sizeof(maxprocperuid); + k = sysctlbyname("kern.maxprocperuid", &maxprocperuid, &len, + NULL, 0); + assert(k != ENOMEM); + /* Try to allow a shell to still be started. */ + nflag = maxprocperuid - 10; + } + + // Ensure a unique process group to make killing all children easier. + setpgrp(0,0); + printf(" pid %d pgroup %d (ppid %d), %d fork chain over %d sec\n", + getpid(), getpgrp(), getppid(), nflag - 1, tflag); + + return bombing_run(nflag, tflag); +} From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 15:56: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 77EFCBB9; Fri, 26 Oct 2012 15:56:29 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 539858FC08; Fri, 26 Oct 2012 15:56: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 q9QFuTcv033625; Fri, 26 Oct 2012 15:56:29 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QFuTMM033621; Fri, 26 Oct 2012 15:56:29 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201210261556.q9QFuTMM033621@svn.freebsd.org> From: "David E. O'Brien" Date: Fri, 26 Oct 2012 15:56:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242138 - head/usr.bin/script X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 15:56:29 -0000 Author: obrien Date: Fri Oct 26 15:56:28 2012 New Revision: 242138 URL: http://svn.freebsd.org/changeset/base/242138 Log: Add "-f" to also output filemon(4) information. Modified: head/usr.bin/script/script.1 head/usr.bin/script/script.c Modified: head/usr.bin/script/script.1 ============================================================================== --- head/usr.bin/script/script.1 Fri Oct 26 15:44:29 2012 (r242137) +++ head/usr.bin/script/script.1 Fri Oct 26 15:56:28 2012 (r242138) @@ -28,7 +28,7 @@ .\" @(#)script.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd July 30, 2012 +.Dd Oct 27, 2012 .Dt SCRIPT 1 .Os .Sh NAME @@ -36,7 +36,7 @@ .Nd make typescript of terminal session .Sh SYNOPSIS .Nm -.Op Fl adkpqr +.Op Fl adfkpqr .Op Fl t Ar time .Op Ar file Op Ar command ... .Sh DESCRIPTION @@ -76,6 +76,13 @@ retaining the prior contents. When playing back a session with the .Fl p flag, do not sleep between records when playing back a timestamped session. +.It Fl f +Create +.Ar file.filemon +or +.Pa typescript.filemon +using +.Xr filemon 4 . .It Fl k Log keys sent to the program as well as output. .It Fl p @@ -151,6 +158,7 @@ is assumed. .El .Sh SEE ALSO .Xr csh 1 +.Xr filemon 4 .Po for the .Em history Modified: head/usr.bin/script/script.c ============================================================================== --- head/usr.bin/script/script.c Fri Oct 26 15:44:29 2012 (r242137) +++ head/usr.bin/script/script.c Fri Oct 26 15:56:28 2012 (r242138) @@ -1,4 +1,5 @@ /* + * Copyright (c) 2010, 2012 David E. O'Brien * Copyright (c) 1980, 1992, 1993 * The Regents of the University of California. All rights reserved. * @@ -44,6 +45,7 @@ static const char sccsid[] = "@(#)script #include #include #include +#include #include #include @@ -70,7 +72,8 @@ static FILE *fscript; static int master, slave; static int child; static const char *fname; -static int qflg, ttyflg; +static char *fmfname; +static int fflg, qflg, ttyflg; static int usesleep, rawout; static struct termios tt; @@ -90,21 +93,23 @@ main(int argc, char *argv[]) int cc; struct termios rtt, stt; struct winsize win; - int aflg, kflg, pflg, ch, n; struct timeval tv, *tvp; time_t tvec, start; char obuf[BUFSIZ]; char ibuf[BUFSIZ]; fd_set rfd; - int flushtime = 30; - int readstdin; - int k; + int aflg, kflg, pflg, ch, k, n; + int flushtime, readstdin; + int fm_fd, fm_log; aflg = kflg = pflg = 0; usesleep = 1; rawout = 0; + flushtime = 30; + fm_fd = -1; /* Shut up stupid "may be used uninitialized" GCC + warning. (not needed w/clang) */ - while ((ch = getopt(argc, argv, "adkpqrt:")) != -1) + while ((ch = getopt(argc, argv, "adfkpqrt:")) != -1) switch(ch) { case 'a': aflg = 1; @@ -112,6 +117,9 @@ main(int argc, char *argv[]) case 'd': usesleep = 0; break; + case 'f': + fflg = 1; + break; case 'k': kflg = 1; break; @@ -146,6 +154,23 @@ main(int argc, char *argv[]) if ((fscript = fopen(fname, pflg ? "r" : aflg ? "a" : "w")) == NULL) err(1, "%s", fname); + if (fflg) { + asprintf(&fmfname, "%s.filemon", fname); + if (!fmfname) + err(1, "%s.filemon", fname); + if ((fm_fd = open("/dev/filemon", O_RDWR)) == -1) + err(1, "open(\"/dev/filemon\", O_RDWR)"); + if ((fm_log = open(fmfname, O_WRONLY | O_CREAT | O_TRUNC, + S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) == -1) + err(1, "open(%s)", fmfname); + if (ioctl(fm_fd, FILEMON_SET_FD, &fm_log) < 0) + err(1, "Cannot set filemon log file descriptor"); + + /* Set up these two fd's to close on exec. */ + (void)fcntl(fm_fd, F_SETFD, FD_CLOEXEC); + (void)fcntl(fm_log, F_SETFD, FD_CLOEXEC); + } + if (pflg) playback(fscript); @@ -169,7 +194,7 @@ main(int argc, char *argv[]) (void)printf("Script started, output file is %s\n", fname); if (!rawout) { (void)fprintf(fscript, "Script started on %s", - ctime(&tvec)); + ctime(&tvec)); if (argv[0]) { fprintf(fscript, "command: "); for (k = 0 ; argv[k] ; ++k) @@ -179,6 +204,10 @@ main(int argc, char *argv[]) } } fflush(fscript); + if (fflg) { + (void)printf("Filemon started, output file is %s\n", + fmfname); + } } if (ttyflg) { rtt = tt; @@ -196,6 +225,9 @@ main(int argc, char *argv[]) doshell(argv); close(slave); + if (fflg && ioctl(fm_fd, FILEMON_SET_PID, &child) < 0) + err(1, "Cannot set filemon PID"); + start = tvec = time(0); readstdin = 1; for (;;) { @@ -260,7 +292,7 @@ static void usage(void) { (void)fprintf(stderr, - "usage: script [-adkpqr] [-t time] [file [command ...]]\n"); + "usage: script [-adfkpqr] [-t time] [file [command ...]]\n"); exit(1); } @@ -291,6 +323,7 @@ doshell(char **av) (void)close(master); (void)fclose(fscript); + free(fmfname); login_tty(slave); setenv("SCRIPT", fname, 1); if (av[0]) { @@ -323,8 +356,12 @@ done(int eno) if (!qflg) { if (!rawout) (void)fprintf(fscript,"\nScript done on %s", - ctime(&tvec)); + ctime(&tvec)); (void)printf("\nScript done, output file is %s\n", fname); + if (fflg) { + (void)printf("Filemon done, output file is %s\n", + fmfname); + } } (void)fclose(fscript); (void)close(master); From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 16:01: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 17409E8A; Fri, 26 Oct 2012 16:01:09 +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 F1E438FC1F; Fri, 26 Oct 2012 16:01: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 q9QG18AT034493; Fri, 26 Oct 2012 16:01:08 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QG18Rv034483; Fri, 26 Oct 2012 16:01:08 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201210261601.q9QG18Rv034483@svn.freebsd.org> From: Edward Tomasz Napierala Date: Fri, 26 Oct 2012 16:01:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242139 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 16:01:09 -0000 Author: trasz Date: Fri Oct 26 16:01:08 2012 New Revision: 242139 URL: http://svn.freebsd.org/changeset/base/242139 Log: Add CPU percentage limit enforcement to RCTL. The resouce name is "pcpu". It was implemented by Rudolf Tomori during Google Summer of Code 2012. Modified: head/sys/kern/kern_racct.c head/sys/kern/kern_rctl.c head/sys/kern/sched_4bsd.c head/sys/kern/subr_trap.c head/sys/sys/proc.h head/sys/sys/racct.h head/sys/sys/rctl.h head/sys/sys/sched.h Modified: head/sys/kern/kern_racct.c ============================================================================== --- head/sys/kern/kern_racct.c Fri Oct 26 15:56:28 2012 (r242138) +++ head/sys/kern/kern_racct.c Fri Oct 26 16:01:08 2012 (r242139) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include "opt_kdtrace.h" +#include "opt_sched.h" #include #include @@ -50,10 +51,13 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include #include +#include #ifdef RCTL #include @@ -63,6 +67,23 @@ __FBSDID("$FreeBSD$"); FEATURE(racct, "Resource Accounting"); +/* + * Do not block processes that have their %cpu usage <= pcpu_threshold. + */ +static int pcpu_threshold = 1; + +SYSCTL_NODE(_kern, OID_AUTO, racct, CTLFLAG_RW, 0, "Resource Accounting"); +SYSCTL_UINT(_kern_racct, OID_AUTO, pcpu_threshold, CTLFLAG_RW, &pcpu_threshold, + 0, "Processes with higher %cpu usage than this value can be throttled."); + +/* + * How many seconds it takes to use the scheduler %cpu calculations. When a + * process starts, we compute its %cpu usage by dividing its runtime by the + * process wall clock time. After RACCT_PCPU_SECS pass, we use the value + * provided by the scheduler. + */ +#define RACCT_PCPU_SECS 3 + static struct mtx racct_lock; MTX_SYSINIT(racct_lock, &racct_lock, "racct lock", MTX_DEF); @@ -140,7 +161,217 @@ int racct_types[] = { [RACCT_SHMSIZE] = RACCT_RECLAIMABLE | RACCT_DENIABLE | RACCT_SLOPPY, [RACCT_WALLCLOCK] = - RACCT_IN_MILLIONS }; + RACCT_IN_MILLIONS, + [RACCT_PCTCPU] = + RACCT_DECAYING | RACCT_DENIABLE | RACCT_IN_MILLIONS }; + +static const fixpt_t RACCT_DECAY_FACTOR = 0.3 * FSCALE; + +#ifdef SCHED_4BSD +/* + * Contains intermediate values for %cpu calculations to avoid using floating + * point in the kernel. + * ccpu_exp[k] = FSCALE * (ccpu/FSCALE)^k = FSCALE * exp(-k/20) + * It is needed only for the 4BSD scheduler, because in ULE, the ccpu equals to + * zero so the calculations are more straightforward. + */ +fixpt_t ccpu_exp[] = { + [0] = FSCALE * 1, + [1] = FSCALE * 0.95122942450071400909, + [2] = FSCALE * 0.90483741803595957316, + [3] = FSCALE * 0.86070797642505780722, + [4] = FSCALE * 0.81873075307798185866, + [5] = FSCALE * 0.77880078307140486824, + [6] = FSCALE * 0.74081822068171786606, + [7] = FSCALE * 0.70468808971871343435, + [8] = FSCALE * 0.67032004603563930074, + [9] = FSCALE * 0.63762815162177329314, + [10] = FSCALE * 0.60653065971263342360, + [11] = FSCALE * 0.57694981038048669531, + [12] = FSCALE * 0.54881163609402643262, + [13] = FSCALE * 0.52204577676101604789, + [14] = FSCALE * 0.49658530379140951470, + [15] = FSCALE * 0.47236655274101470713, + [16] = FSCALE * 0.44932896411722159143, + [17] = FSCALE * 0.42741493194872666992, + [18] = FSCALE * 0.40656965974059911188, + [19] = FSCALE * 0.38674102345450120691, + [20] = FSCALE * 0.36787944117144232159, + [21] = FSCALE * 0.34993774911115535467, + [22] = FSCALE * 0.33287108369807955328, + [23] = FSCALE * 0.31663676937905321821, + [24] = FSCALE * 0.30119421191220209664, + [25] = FSCALE * 0.28650479686019010032, + [26] = FSCALE * 0.27253179303401260312, + [27] = FSCALE * 0.25924026064589150757, + [28] = FSCALE * 0.24659696394160647693, + [29] = FSCALE * 0.23457028809379765313, + [30] = FSCALE * 0.22313016014842982893, + [31] = FSCALE * 0.21224797382674305771, + [32] = FSCALE * 0.20189651799465540848, + [33] = FSCALE * 0.19204990862075411423, + [34] = FSCALE * 0.18268352405273465022, + [35] = FSCALE * 0.17377394345044512668, + [36] = FSCALE * 0.16529888822158653829, + [37] = FSCALE * 0.15723716631362761621, + [38] = FSCALE * 0.14956861922263505264, + [39] = FSCALE * 0.14227407158651357185, + [40] = FSCALE * 0.13533528323661269189, + [41] = FSCALE * 0.12873490358780421886, + [42] = FSCALE * 0.12245642825298191021, + [43] = FSCALE * 0.11648415777349695786, + [44] = FSCALE * 0.11080315836233388333, + [45] = FSCALE * 0.10539922456186433678, + [46] = FSCALE * 0.10025884372280373372, + [47] = FSCALE * 0.09536916221554961888, + [48] = FSCALE * 0.09071795328941250337, + [49] = FSCALE * 0.08629358649937051097, + [50] = FSCALE * 0.08208499862389879516, + [51] = FSCALE * 0.07808166600115315231, + [52] = FSCALE * 0.07427357821433388042, + [53] = FSCALE * 0.07065121306042958674, + [54] = FSCALE * 0.06720551273974976512, + [55] = FSCALE * 0.06392786120670757270, + [56] = FSCALE * 0.06081006262521796499, + [57] = FSCALE * 0.05784432087483846296, + [58] = FSCALE * 0.05502322005640722902, + [59] = FSCALE * 0.05233970594843239308, + [60] = FSCALE * 0.04978706836786394297, + [61] = FSCALE * 0.04735892439114092119, + [62] = FSCALE * 0.04504920239355780606, + [63] = FSCALE * 0.04285212686704017991, + [64] = FSCALE * 0.04076220397836621516, + [65] = FSCALE * 0.03877420783172200988, + [66] = FSCALE * 0.03688316740124000544, + [67] = FSCALE * 0.03508435410084502588, + [68] = FSCALE * 0.03337326996032607948, + [69] = FSCALE * 0.03174563637806794323, + [70] = FSCALE * 0.03019738342231850073, + [71] = FSCALE * 0.02872463965423942912, + [72] = FSCALE * 0.02732372244729256080, + [73] = FSCALE * 0.02599112877875534358, + [74] = FSCALE * 0.02472352647033939120, + [75] = FSCALE * 0.02351774585600910823, + [76] = FSCALE * 0.02237077185616559577, + [77] = FSCALE * 0.02127973643837716938, + [78] = FSCALE * 0.02024191144580438847, + [79] = FSCALE * 0.01925470177538692429, + [80] = FSCALE * 0.01831563888873418029, + [81] = FSCALE * 0.01742237463949351138, + [82] = FSCALE * 0.01657267540176124754, + [83] = FSCALE * 0.01576441648485449082, + [84] = FSCALE * 0.01499557682047770621, + [85] = FSCALE * 0.01426423390899925527, + [86] = FSCALE * 0.01356855901220093175, + [87] = FSCALE * 0.01290681258047986886, + [88] = FSCALE * 0.01227733990306844117, + [89] = FSCALE * 0.01167856697039544521, + [90] = FSCALE * 0.01110899653824230649, + [91] = FSCALE * 0.01056720438385265337, + [92] = FSCALE * 0.01005183574463358164, + [93] = FSCALE * 0.00956160193054350793, + [94] = FSCALE * 0.00909527710169581709, + [95] = FSCALE * 0.00865169520312063417, + [96] = FSCALE * 0.00822974704902002884, + [97] = FSCALE * 0.00782837754922577143, + [98] = FSCALE * 0.00744658307092434051, + [99] = FSCALE * 0.00708340892905212004, + [100] = FSCALE * 0.00673794699908546709, + [101] = FSCALE * 0.00640933344625638184, + [102] = FSCALE * 0.00609674656551563610, + [103] = FSCALE * 0.00579940472684214321, + [104] = FSCALE * 0.00551656442076077241, + [105] = FSCALE * 0.00524751839918138427, + [106] = FSCALE * 0.00499159390691021621, + [107] = FSCALE * 0.00474815099941147558, + [108] = FSCALE * 0.00451658094261266798, + [109] = FSCALE * 0.00429630469075234057, + [110] = FSCALE * 0.00408677143846406699, +}; +#endif + +#define CCPU_EXP_MAX 110 + +/* + * This function is analogical to the getpcpu() function in the ps(1) command. + * They should both calculate in the same way so that the racct %cpu + * calculations are consistent with the values showed by the ps(1) tool. + * The calculations are more complex in the 4BSD scheduler because of the value + * of the ccpu variable. In ULE it is defined to be zero which saves us some + * work. + */ +static uint64_t +racct_getpcpu(struct proc *p, u_int pcpu) +{ + u_int swtime; +#ifdef SCHED_4BSD + fixpt_t pctcpu, pctcpu_next; +#endif +#ifdef SMP + struct pcpu *pc; + int found; +#endif + fixpt_t p_pctcpu; + struct thread *td; + + /* + * If the process is swapped out, we count its %cpu usage as zero. + * This behaviour is consistent with the userland ps(1) tool. + */ + if ((p->p_flag & P_INMEM) == 0) + return (0); + swtime = (ticks - p->p_swtick) / hz; + + /* + * For short-lived processes, the sched_pctcpu() returns small + * values even for cpu intensive processes. Therefore we use + * our own estimate in this case. + */ + if (swtime < RACCT_PCPU_SECS) + return (pcpu); + + p_pctcpu = 0; + FOREACH_THREAD_IN_PROC(p, td) { + if (td == PCPU_GET(idlethread)) + continue; +#ifdef SMP + found = 0; + STAILQ_FOREACH(pc, &cpuhead, pc_allcpu) { + if (td == pc->pc_idlethread) { + found = 1; + break; + } + } + if (found) + continue; +#endif + thread_lock(td); +#ifdef SCHED_4BSD + pctcpu = sched_pctcpu(td); + /* Count also the yet unfinished second. */ + pctcpu_next = (pctcpu * ccpu_exp[1]) >> FSHIFT; + pctcpu_next += sched_pctcpu_delta(td); + p_pctcpu += max(pctcpu, pctcpu_next); +#else + /* + * In ULE the %cpu statistics are updated on every + * sched_pctcpu() call. So special calculations to + * account for the latest (unfinished) second are + * not needed. + */ + p_pctcpu += sched_pctcpu(td); +#endif + thread_unlock(td); + } + +#ifdef SCHED_4BSD + if (swtime <= CCPU_EXP_MAX) + return ((100 * (uint64_t)p_pctcpu * 1000000) / + (FSCALE - ccpu_exp[swtime])); +#endif + + return ((100 * (uint64_t)p_pctcpu * 1000000) / FSCALE); +} static void racct_add_racct(struct racct *dest, const struct racct *src) @@ -180,7 +411,7 @@ racct_sub_racct(struct racct *dest, cons KASSERT(src->r_resources[i] <= dest->r_resources[i], ("racct propagation meltdown: src > dest")); } - if (RACCT_IS_RECLAIMABLE(i)) { + if (RACCT_CAN_DROP(i)) { dest->r_resources[i] -= src->r_resources[i]; if (dest->r_resources[i] < 0) { KASSERT(RACCT_IS_SLOPPY(i), @@ -254,10 +485,23 @@ racct_alloc_resource(struct racct *racct racct->r_resources[resource] += amount; if (racct->r_resources[resource] < 0) { - KASSERT(RACCT_IS_SLOPPY(resource), + KASSERT(RACCT_IS_SLOPPY(resource) || RACCT_IS_DECAYING(resource), ("racct_alloc_resource: usage < 0")); racct->r_resources[resource] = 0; } + + /* + * There are some cases where the racct %cpu resource would grow + * beyond 100%. + * For example in racct_proc_exit() we add the process %cpu usage + * to the ucred racct containers. If too many processes terminated + * in a short time span, the ucred %cpu resource could grow too much. + * Also, the 4BSD scheduler sometimes returns for a thread more than + * 100% cpu usage. So we set a boundary here to 100%. + */ + if ((resource == RACCT_PCTCPU) && + (racct->r_resources[RACCT_PCTCPU] > 100 * 1000000)) + racct->r_resources[RACCT_PCTCPU] = 100 * 1000000; } static int @@ -357,7 +601,8 @@ racct_add_force(struct proc *p, int reso static int racct_set_locked(struct proc *p, int resource, uint64_t amount) { - int64_t diff; + int64_t old_amount, decayed_amount; + int64_t diff_proc, diff_cred; #ifdef RCTL int error; #endif @@ -369,15 +614,30 @@ racct_set_locked(struct proc *p, int res */ PROC_LOCK_ASSERT(p, MA_OWNED); - diff = amount - p->p_racct->r_resources[resource]; + old_amount = p->p_racct->r_resources[resource]; + /* + * The diffs may be negative. + */ + diff_proc = amount - old_amount; + if (RACCT_IS_DECAYING(resource)) { + /* + * Resources in per-credential racct containers may decay. + * If this is the case, we need to calculate the difference + * between the new amount and the proportional value of the + * old amount that has decayed in the ucred racct containers. + */ + decayed_amount = old_amount * RACCT_DECAY_FACTOR / FSCALE; + diff_cred = amount - decayed_amount; + } else + diff_cred = diff_proc; #ifdef notyet - KASSERT(diff >= 0 || RACCT_IS_RECLAIMABLE(resource), - ("racct_set: usage of non-reclaimable resource %d dropping", + KASSERT(diff_proc >= 0 || RACCT_CAN_DROP(resource), + ("racct_set: usage of non-droppable resource %d dropping", resource)); #endif #ifdef RCTL - if (diff > 0) { - error = rctl_enforce(p, resource, diff); + if (diff_proc > 0) { + error = rctl_enforce(p, resource, diff_proc); if (error && RACCT_IS_DENIABLE(resource)) { SDT_PROBE(racct, kernel, rusage, set_failure, p, resource, amount, 0, 0); @@ -385,11 +645,11 @@ racct_set_locked(struct proc *p, int res } } #endif - racct_alloc_resource(p->p_racct, resource, diff); - if (diff > 0) - racct_add_cred_locked(p->p_ucred, resource, diff); - else if (diff < 0) - racct_sub_cred_locked(p->p_ucred, resource, -diff); + racct_alloc_resource(p->p_racct, resource, diff_proc); + if (diff_cred > 0) + racct_add_cred_locked(p->p_ucred, resource, diff_cred); + else if (diff_cred < 0) + racct_sub_cred_locked(p->p_ucred, resource, -diff_cred); return (0); } @@ -412,10 +672,11 @@ racct_set(struct proc *p, int resource, return (error); } -void -racct_set_force(struct proc *p, int resource, uint64_t amount) +static void +racct_set_force_locked(struct proc *p, int resource, uint64_t amount) { - int64_t diff; + int64_t old_amount, decayed_amount; + int64_t diff_proc, diff_cred; SDT_PROBE(racct, kernel, rusage, set, p, resource, amount, 0, 0); @@ -424,13 +685,35 @@ racct_set_force(struct proc *p, int reso */ PROC_LOCK_ASSERT(p, MA_OWNED); + old_amount = p->p_racct->r_resources[resource]; + /* + * The diffs may be negative. + */ + diff_proc = amount - old_amount; + if (RACCT_IS_DECAYING(resource)) { + /* + * Resources in per-credential racct containers may decay. + * If this is the case, we need to calculate the difference + * between the new amount and the proportional value of the + * old amount that has decayed in the ucred racct containers. + */ + decayed_amount = old_amount * RACCT_DECAY_FACTOR / FSCALE; + diff_cred = amount - decayed_amount; + } else + diff_cred = diff_proc; + + racct_alloc_resource(p->p_racct, resource, diff_proc); + if (diff_cred > 0) + racct_add_cred_locked(p->p_ucred, resource, diff_cred); + else if (diff_cred < 0) + racct_sub_cred_locked(p->p_ucred, resource, -diff_cred); +} + +void +racct_set_force(struct proc *p, int resource, uint64_t amount) +{ mtx_lock(&racct_lock); - diff = amount - p->p_racct->r_resources[resource]; - racct_alloc_resource(p->p_racct, resource, diff); - if (diff > 0) - racct_add_cred_locked(p->p_ucred, resource, diff); - else if (diff < 0) - racct_sub_cred_locked(p->p_ucred, resource, -diff); + racct_set_force_locked(p, resource, amount); mtx_unlock(&racct_lock); } @@ -469,6 +752,22 @@ racct_get_available(struct proc *p, int } /* + * Returns amount of the %cpu resource that process 'p' can add to its %cpu + * utilization. Adding more than that would lead to the process being + * throttled. + */ +static int64_t +racct_pcpu_available(struct proc *p) +{ + +#ifdef RCTL + return (rctl_pcpu_available(p)); +#else + return (INT64_MAX); +#endif +} + +/* * Decrease allocation of 'resource' by 'amount' for process 'p'. */ void @@ -481,8 +780,8 @@ racct_sub(struct proc *p, int resource, * We need proc lock to dereference p->p_ucred. */ PROC_LOCK_ASSERT(p, MA_OWNED); - KASSERT(RACCT_IS_RECLAIMABLE(resource), - ("racct_sub: called for non-reclaimable resource %d", resource)); + KASSERT(RACCT_CAN_DROP(resource), + ("racct_sub: called for non-droppable resource %d", resource)); mtx_lock(&racct_lock); KASSERT(amount <= p->p_racct->r_resources[resource], @@ -504,8 +803,8 @@ racct_sub_cred_locked(struct ucred *cred 0, 0); #ifdef notyet - KASSERT(RACCT_IS_RECLAIMABLE(resource), - ("racct_sub_cred: called for non-reclaimable resource %d", + KASSERT(RACCT_CAN_DROP(resource), + ("racct_sub_cred: called for resource %d which can not drop", resource)); #endif @@ -551,6 +850,10 @@ racct_proc_fork(struct proc *parent, str goto out; #endif + /* Init process cpu time. */ + child->p_prev_runtime = 0; + child->p_throttled = 0; + /* * Inherit resource usage. */ @@ -602,6 +905,8 @@ racct_proc_exit(struct proc *p) { int i; uint64_t runtime; + struct timeval wallclock; + uint64_t pct_estimate, pct; PROC_LOCK(p); /* @@ -614,8 +919,16 @@ racct_proc_exit(struct proc *p) if (runtime < p->p_prev_runtime) runtime = p->p_prev_runtime; #endif + microuptime(&wallclock); + timevalsub(&wallclock, &p->p_stats->p_start); + pct_estimate = (1000000 * runtime * 100) / + ((uint64_t)wallclock.tv_sec * 1000000 + + wallclock.tv_usec); + pct = racct_getpcpu(p, pct_estimate); + mtx_lock(&racct_lock); racct_set_locked(p, RACCT_CPU, runtime); + racct_add_cred_locked(p->p_ucred, RACCT_PCTCPU, pct); for (i = 0; i <= RACCT_MAX; i++) { if (p->p_racct->r_resources[i] == 0) @@ -692,23 +1005,124 @@ racct_move(struct racct *dest, struct ra } static void +racct_proc_throttle(struct proc *p) +{ + struct thread *td; +#ifdef SMP + int cpuid; +#endif + + PROC_LOCK_ASSERT(p, MA_OWNED); + + /* + * Do not block kernel processes. Also do not block processes with + * low %cpu utilization to improve interactivity. + */ + if (((p->p_flag & (P_SYSTEM | P_KTHREAD)) != 0) || + (p->p_racct->r_resources[RACCT_PCTCPU] <= pcpu_threshold)) + return; + p->p_throttled = 1; + + FOREACH_THREAD_IN_PROC(p, td) { + switch (td->td_state) { + case TDS_RUNQ: + /* + * If the thread is on the scheduler run-queue, we can + * not just remove it from there. So we set the flag + * TDF_NEEDRESCHED for the thread, so that once it is + * running, it is taken off the cpu as soon as possible. + */ + thread_lock(td); + td->td_flags |= TDF_NEEDRESCHED; + thread_unlock(td); + break; + case TDS_RUNNING: + /* + * If the thread is running, we request a context + * switch for it by setting the TDF_NEEDRESCHED flag. + */ + thread_lock(td); + td->td_flags |= TDF_NEEDRESCHED; +#ifdef SMP + cpuid = td->td_oncpu; + if ((cpuid != NOCPU) && (td != curthread)) + ipi_cpu(cpuid, IPI_AST); +#endif + thread_unlock(td); + break; + default: + break; + } + } +} + +static void +racct_proc_wakeup(struct proc *p) +{ + PROC_LOCK_ASSERT(p, MA_OWNED); + + if (p->p_throttled) { + p->p_throttled = 0; + wakeup(p->p_racct); + } +} + +static void +racct_decay_resource(struct racct *racct, void * res, void* dummy) +{ + int resource; + int64_t r_old, r_new; + + resource = *(int *)res; + r_old = racct->r_resources[resource]; + + /* If there is nothing to decay, just exit. */ + if (r_old <= 0) + return; + + mtx_lock(&racct_lock); + r_new = r_old * RACCT_DECAY_FACTOR / FSCALE; + racct->r_resources[resource] = r_new; + mtx_unlock(&racct_lock); +} + +static void +racct_decay(int resource) +{ + ui_racct_foreach(racct_decay_resource, &resource, NULL); + loginclass_racct_foreach(racct_decay_resource, &resource, NULL); + prison_racct_foreach(racct_decay_resource, &resource, NULL); +} + +static void racctd(void) { struct thread *td; struct proc *p; struct timeval wallclock; uint64_t runtime; + uint64_t pct, pct_estimate; for (;;) { + racct_decay(RACCT_PCTCPU); + sx_slock(&allproc_lock); + LIST_FOREACH(p, &zombproc, p_list) { + PROC_LOCK(p); + racct_set(p, RACCT_PCTCPU, 0); + PROC_UNLOCK(p); + } + FOREACH_PROC_IN_SYSTEM(p) { - if (p->p_state != PRS_NORMAL) + PROC_LOCK(p); + if (p->p_state != PRS_NORMAL) { + PROC_UNLOCK(p); continue; + } microuptime(&wallclock); timevalsub(&wallclock, &p->p_stats->p_start); - PROC_LOCK(p); PROC_SLOCK(p); FOREACH_THREAD_IN_PROC(p, td) ruxagg(p, td); @@ -722,7 +1136,12 @@ racctd(void) runtime = p->p_prev_runtime; #endif p->p_prev_runtime = runtime; + pct_estimate = (1000000 * runtime * 100) / + ((uint64_t)wallclock.tv_sec * 1000000 + + wallclock.tv_usec); + pct = racct_getpcpu(p, pct_estimate); mtx_lock(&racct_lock); + racct_set_force_locked(p, RACCT_PCTCPU, pct); racct_set_locked(p, RACCT_CPU, runtime); racct_set_locked(p, RACCT_WALLCLOCK, (uint64_t)wallclock.tv_sec * 1000000 + @@ -730,6 +1149,26 @@ racctd(void) mtx_unlock(&racct_lock); PROC_UNLOCK(p); } + + /* + * To ensure that processes are throttled in a fair way, we need + * to iterate over all processes again and check the limits + * for %cpu resource only after ucred racct containers have been + * properly filled. + */ + FOREACH_PROC_IN_SYSTEM(p) { + PROC_LOCK(p); + if (p->p_state != PRS_NORMAL) { + PROC_UNLOCK(p); + continue; + } + + if (racct_pcpu_available(p) <= 0) + racct_proc_throttle(p); + else if (p->p_throttled) + racct_proc_wakeup(p); + PROC_UNLOCK(p); + } sx_sunlock(&allproc_lock); pause("-", hz); } Modified: head/sys/kern/kern_rctl.c ============================================================================== --- head/sys/kern/kern_rctl.c Fri Oct 26 15:56:28 2012 (r242138) +++ head/sys/kern/kern_rctl.c Fri Oct 26 16:01:08 2012 (r242139) @@ -76,6 +76,8 @@ FEATURE(rctl, "Resource Limits"); #define RCTL_MAX_INBUFLEN 4096 #define RCTL_LOG_BUFSIZE 128 +#define RCTL_PCPU_SHIFT (10 * 1000000) + /* * 'rctl_rule_link' connects a rule with every racct it's related to. * For example, rule 'user:X:openfiles:deny=N/process' is linked @@ -120,6 +122,7 @@ static struct dict resourcenames[] = { { "nshm", RACCT_NSHM }, { "shmsize", RACCT_SHMSIZE }, { "wallclock", RACCT_WALLCLOCK }, + { "pcpu", RACCT_PCTCPU }, { NULL, -1 }}; static struct dict actionnames[] = { @@ -271,6 +274,51 @@ rctl_would_exceed(const struct proc *p, } /* + * Special version of rctl_available() function for the %cpu resource. + * We slightly cheat here and return less than we normally would. + */ +int64_t +rctl_pcpu_available(const struct proc *p) { + struct rctl_rule *rule; + struct rctl_rule_link *link; + int64_t available, minavailable, limit; + + minavailable = INT64_MAX; + limit = 0; + + rw_rlock(&rctl_lock); + + LIST_FOREACH(link, &p->p_racct->r_rule_links, rrl_next) { + rule = link->rrl_rule; + if (rule->rr_resource != RACCT_PCTCPU) + continue; + if (rule->rr_action != RCTL_ACTION_DENY) + continue; + available = rctl_available_resource(p, rule); + if (available < minavailable) { + minavailable = available; + limit = rule->rr_amount; + } + } + + rw_runlock(&rctl_lock); + + /* + * Return slightly less than actual value of the available + * %cpu resource. This makes %cpu throttling more agressive + * and lets us act sooner than the limits are already exceeded. + */ + if (limit != 0) { + if (limit > 2 * RCTL_PCPU_SHIFT) + minavailable -= RCTL_PCPU_SHIFT; + else + minavailable -= (limit / 2); + } + + return (minavailable); +} + +/* * Check whether the proc 'p' can allocate 'amount' of 'resource' in addition * to what it keeps allocated now. Returns non-zero if the allocation should * be denied, 0 otherwise. Modified: head/sys/kern/sched_4bsd.c ============================================================================== --- head/sys/kern/sched_4bsd.c Fri Oct 26 15:56:28 2012 (r242138) +++ head/sys/kern/sched_4bsd.c Fri Oct 26 16:01:08 2012 (r242139) @@ -1585,6 +1585,40 @@ sched_pctcpu(struct thread *td) return (ts->ts_pctcpu); } +#ifdef RACCT +/* + * Calculates the contribution to the thread cpu usage for the latest + * (unfinished) second. + */ +fixpt_t +sched_pctcpu_delta(struct thread *td) +{ + struct td_sched *ts; + fixpt_t delta; + int realstathz; + + THREAD_LOCK_ASSERT(td, MA_OWNED); + ts = td->td_sched; + delta = 0; + realstathz = stathz ? stathz : hz; + if (ts->ts_cpticks != 0) { +#if (FSHIFT >= CCPU_SHIFT) + delta = (realstathz == 100) + ? ((fixpt_t) ts->ts_cpticks) << + (FSHIFT - CCPU_SHIFT) : + 100 * (((fixpt_t) ts->ts_cpticks) + << (FSHIFT - CCPU_SHIFT)) / realstathz; +#else + delta = ((FSCALE - ccpu) * + (ts->ts_cpticks * + FSCALE / realstathz)) >> FSHIFT; +#endif + } + + return (delta); +} +#endif + void sched_tick(int cnt) { Modified: head/sys/kern/subr_trap.c ============================================================================== --- head/sys/kern/subr_trap.c Fri Oct 26 15:56:28 2012 (r242138) +++ head/sys/kern/subr_trap.c Fri Oct 26 16:01:08 2012 (r242139) @@ -100,6 +100,9 @@ void userret(struct thread *td, struct trapframe *frame) { struct proc *p = td->td_proc; +#ifdef RACCT + int sig; +#endif CTR3(KTR_SYSC, "userret: thread %p (pid %d, %s)", td, p->p_pid, td->td_name); @@ -163,6 +166,16 @@ userret(struct thread *td, struct trapfr __func__, td, p->p_pid, td->td_name, curvnet, (td->td_vnet_lpush != NULL) ? td->td_vnet_lpush : "N/A")); #endif +#ifdef RACCT + PROC_LOCK(p); + while (p->p_throttled == 1) { + sig = msleep(p->p_racct, &p->p_mtx, PCATCH | PBDRY, "racct", + hz); + if ((sig == EINTR) || (sig == ERESTART)) + break; + } + PROC_UNLOCK(p); +#endif } /* Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Fri Oct 26 15:56:28 2012 (r242138) +++ head/sys/sys/proc.h Fri Oct 26 16:01:08 2012 (r242139) @@ -584,6 +584,7 @@ struct proc { after fork. */ uint64_t p_prev_runtime; /* (c) Resource usage accounting. */ struct racct *p_racct; /* (b) Resource accounting. */ + u_char p_throttled; /* (c) Flag for racct pcpu throttling */ /* * An orphan is the child that has beed re-parented to the * debugger as a result of attaching to it. Need to keep Modified: head/sys/sys/racct.h ============================================================================== --- head/sys/sys/racct.h Fri Oct 26 15:56:28 2012 (r242138) +++ head/sys/sys/racct.h Fri Oct 26 16:01:08 2012 (r242139) @@ -68,7 +68,8 @@ struct ucred; #define RACCT_NSHM 17 #define RACCT_SHMSIZE 18 #define RACCT_WALLCLOCK 19 -#define RACCT_MAX RACCT_WALLCLOCK +#define RACCT_PCTCPU 20 +#define RACCT_MAX RACCT_PCTCPU /* * Resource properties. @@ -78,6 +79,7 @@ struct ucred; #define RACCT_INHERITABLE 0x04 #define RACCT_DENIABLE 0x08 #define RACCT_SLOPPY 0x10 +#define RACCT_DECAYING 0x20 extern int racct_types[]; @@ -89,7 +91,9 @@ extern int racct_types[]; #define RACCT_IS_IN_MILLIONS(X) (racct_types[X] & RACCT_IN_MILLIONS) /* - * Resource usage can drop, as opposed to only grow. + * Resource usage can drop, as opposed to only grow. When the process + * terminates, its resource usage is freed from the respective + * per-credential racct containers. */ #define RACCT_IS_RECLAIMABLE(X) (racct_types[X] & RACCT_RECLAIMABLE) @@ -113,6 +117,20 @@ extern int racct_types[]; #define RACCT_IS_SLOPPY(X) (racct_types[X] & RACCT_SLOPPY) /* + * When a process terminates, its resource usage is not automatically + * subtracted from per-credential racct containers. Instead, the resource + * usage of per-credential racct containers decays in time. + * Resource usage can olso drop for such resource. + * So far, the only such resource is RACCT_PCTCPU. + */ +#define RACCT_IS_DECAYING(X) (racct_types[X] & RACCT_DECAYING) + +/* + * Resource usage can drop, as opposed to only grow. + */ +#define RACCT_CAN_DROP(X) (RACCT_IS_RECLAIMABLE(X) | RACCT_IS_DECAYING(X)) + +/* * The 'racct' structure defines resource consumption for a particular * subject, such as process or jail. * Modified: head/sys/sys/rctl.h ============================================================================== --- head/sys/sys/rctl.h Fri Oct 26 15:56:28 2012 (r242138) +++ head/sys/sys/rctl.h Fri Oct 26 16:01:08 2012 (r242139) @@ -140,6 +140,7 @@ void rctl_rule_release(struct rctl_rule int rctl_rule_add(struct rctl_rule *rule); int rctl_rule_remove(struct rctl_rule *filter); int rctl_enforce(struct proc *p, int resource, uint64_t amount); +int64_t rctl_pcpu_available(const struct proc *p); uint64_t rctl_get_limit(struct proc *p, int resource); uint64_t rctl_get_available(struct proc *p, int resource); const char *rctl_resource_name(int resource); Modified: head/sys/sys/sched.h ============================================================================== --- head/sys/sys/sched.h Fri Oct 26 15:56:28 2012 (r242138) +++ head/sys/sys/sched.h Fri Oct 26 16:01:08 2012 (r242139) @@ -103,6 +103,11 @@ void sched_user_prio(struct thread *td, void sched_userret(struct thread *td); void sched_wakeup(struct thread *td); void sched_preempt(struct thread *td); +#ifdef RACCT +#ifdef SCHED_4BSD +fixpt_t sched_pctcpu_delta(struct thread *td); +#endif +#endif /* * Threads are moved on and off of run queues From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 16:03: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 190889E; Fri, 26 Oct 2012 16:03:14 +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 014958FC16; Fri, 26 Oct 2012 16:03: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 q9QG3De8034862; Fri, 26 Oct 2012 16:03:13 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QG3D21034859; Fri, 26 Oct 2012 16:03:13 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201210261603.q9QG3D21034859@svn.freebsd.org> From: Edward Tomasz Napierala Date: Fri, 26 Oct 2012 16:03:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242140 - head/usr.bin/rctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 16:03:14 -0000 Author: trasz Date: Fri Oct 26 16:03:13 2012 New Revision: 242140 URL: http://svn.freebsd.org/changeset/base/242140 Log: Add pcpu to the the rctl(8) manual page. Modified: head/usr.bin/rctl/rctl.8 Modified: head/usr.bin/rctl/rctl.8 ============================================================================== --- head/usr.bin/rctl/rctl.8 Fri Oct 26 16:01:08 2012 (r242139) +++ head/usr.bin/rctl/rctl.8 Fri Oct 26 16:03:13 2012 (r242140) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 16, 2012 +.Dd October 26, 2012 .Dt RCTL 8 .Os .Sh NAME @@ -146,6 +146,7 @@ A filter that matches all defined rules .It nshm Ta "number of SysV shared memory segments" .It shmsize Ta "SysV shared memory size, in bytes" .It wallclock Ta "wallclock time, in seconds" +.It pcpu Ta "%CPU, in percents of a single CPU core" .El .Sh ACTIONS .Bl -column -offset 3n "pseudoterminals" From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 16:07: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 42500397; Fri, 26 Oct 2012 16:07:54 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 278D28FC12; Fri, 26 Oct 2012 16:07: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 q9QG7sEq035741; Fri, 26 Oct 2012 16:07:54 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QG7raE035736; Fri, 26 Oct 2012 16:07:53 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201210261607.q9QG7raE035736@svn.freebsd.org> From: "David E. O'Brien" Date: Fri, 26 Oct 2012 16:07:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242142 - in stable/9: sys/dev/filemon tools/regression/filemon X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 16:07:54 -0000 Author: obrien Date: Fri Oct 26 16:07:53 2012 New Revision: 242142 URL: http://svn.freebsd.org/changeset/base/242142 Log: MFC: r242137: Iterate rather than use recursion. We can blow out the kernel stack if there is a long chain of fork(2)s. Added: stable/9/tools/regression/filemon/timed-forkb.c - copied unchanged from r242137, head/tools/regression/filemon/timed-forkb.c Modified: stable/9/sys/dev/filemon/filemon_wrapper.c stable/9/tools/regression/filemon/Makefile Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/tools/ (props changed) Modified: stable/9/sys/dev/filemon/filemon_wrapper.c ============================================================================== --- stable/9/sys/dev/filemon/filemon_wrapper.c Fri Oct 26 16:06:26 2012 (r242141) +++ stable/9/sys/dev/filemon/filemon_wrapper.c Fri Oct 26 16:07:53 2012 (r242142) @@ -82,15 +82,14 @@ filemon_pid_check(struct proc *p) { struct filemon *filemon; - TAILQ_FOREACH(filemon, &filemons_inuse, link) { - if (p->p_pid == filemon->pid) - return (filemon); + while (p->p_pptr) { + TAILQ_FOREACH(filemon, &filemons_inuse, link) { + if (p->p_pid == filemon->pid) + return (filemon); + } + p = p->p_pptr; } - - if (p->p_pptr == NULL) - return (NULL); - - return (filemon_pid_check(p->p_pptr)); + return (NULL); } static void Modified: stable/9/tools/regression/filemon/Makefile ============================================================================== --- stable/9/tools/regression/filemon/Makefile Fri Oct 26 16:06:26 2012 (r242141) +++ stable/9/tools/regression/filemon/Makefile Fri Oct 26 16:07:53 2012 (r242142) @@ -1,15 +1,33 @@ # $FreeBSD$ -PROG= filemontest +BINS= \ + filemontest \ + timed-forkb + +bins: filemontest timed-forkb +all: bins NO_MAN= WARNS?= 6 CFLAGS+= -I${.CURDIR}/../../../sys +# Should be "WITHOUT_CTF=" below, but stupid infastrurture fails: +# "/usr/share/mk/bsd.own.mk", line 489: WITH_CTF and WITHOUT_CTF can't both be set. +WITHOUT_CDDL= + +CLEANFILES+= ${BINS} + +tests: bins + kldstat | grep filemon + ${MAKE} test + ./timed-forkb + @echo "filemon(4) tests passed." + # Cannot use .OBJDIR -- 'filemontest' expects 'test_script.sh' in . -test: ${PROG} clean-test -.for BIN in ${PROG} ${PROG}32 +#FILEMONTEST32= filemontest32 +test: filemontest clean-test +.for BIN in filemontest ${FILEMONTEST32} cd ${.CURDIR} ; \ for A in 1 2 3 4 5 6 7 8 9 0; do \ for B in 1 2 3 4 5 6 7 8 9 0; do \ Copied: stable/9/tools/regression/filemon/timed-forkb.c (from r242137, head/tools/regression/filemon/timed-forkb.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/tools/regression/filemon/timed-forkb.c Fri Oct 26 16:07:53 2012 (r242142, copy of r242137, head/tools/regression/filemon/timed-forkb.c) @@ -0,0 +1,177 @@ +/*- + * Copyright (c) 2012 David O'Brien + * 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$ + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef SLEEP +#define SLEEP 20 /* seconds */ +#endif + +int verbose; + +static void +usage(void) +{ + fprintf(stderr, "usage: %s\n", getprogname()); + fprintf(stderr, "\t\t-n : length of fork(2) chain\n"); + fprintf(stderr, "\t\t-t : limit run-time seconds\n"); + exit(1); + /* NOTREACHED */ +} + +void term(int); +void +term(int signum) +{ + + if (getpid() == getpgrp() || verbose) { + fprintf(stderr, + "pid %d pgroup %d (ppid %d): Received SIGTERM(%d), exiting...\n", + getpid(), getpgrp(), getppid(), signum); + } + exit(1); +} + +void angel_of_mercy(int); +void +angel_of_mercy(int sig __unused) +{ + + signal(SIGALRM, SIG_IGN); /* ignore this signal */ + printf("Master process: alarmed waking up\n"); + killpg(0, SIGTERM); + return; +} + +int bombing_run(unsigned, int); +int +bombing_run(unsigned chainlen, int stime) +{ + struct rusage ru; + pid_t pid, cpid; + int status; + + if (chainlen) { + switch (pid = fork()) { + case -1: + errx(1, "%s: can't fork", __func__); + + case 0: + /* This is the code the child runs. */ + bombing_run(--chainlen, stime); + break; + + default: + /* This is the code the parent runs. */ + if (getpid() == getpgrp()) { + signal(SIGALRM, angel_of_mercy); + alarm(stime); // time for bombing run... + cpid = wait4(pid, &status, 0, &ru); + alarm(0); + printf( + "Cleanly shutting down - pid %d pgroup %d (ppid %d)\n", + getpid(), getpgrp(), getppid()); + } else { + cpid = wait4(pid, &status, 0, &ru); + } + } + } + + return 0; +} + +int +main(int argc, char *argv[]) +{ + time_t start /*,tvec*/; + char *endptr, *ctm; + size_t len; + int nflag, tflag; + int ch, k, maxprocperuid; + + (void)signal(SIGTERM, term); + + nflag = 0; + tflag = SLEEP; + + start = time(NULL); + ctm = ctime(&start); + ctm[24] = '\0'; // see: man 3 ctime + fprintf(stderr, "*** fork() generation started on \"%s\" ***\n", ctm); + + while ((ch = getopt(argc, argv, "n:t:v")) != -1) + switch (ch) { + case 'n': + nflag = strtol(optarg, &endptr, 10); + if (nflag <= 0 || *endptr != '\0') + errx(1, "illegal number, -n argument -- %s", + optarg); + break; + case 't': + tflag = strtol(optarg, &endptr, 10); + if (tflag <= 0 || *endptr != '\0') + errx(1, "illegal number, -t argument -- %s", + optarg); + break; + case 'v': + ++verbose; + break; + default: + usage(); + } + argv += optind; + + if (!nflag) { + len = sizeof(maxprocperuid); + k = sysctlbyname("kern.maxprocperuid", &maxprocperuid, &len, + NULL, 0); + assert(k != ENOMEM); + /* Try to allow a shell to still be started. */ + nflag = maxprocperuid - 10; + } + + // Ensure a unique process group to make killing all children easier. + setpgrp(0,0); + printf(" pid %d pgroup %d (ppid %d), %d fork chain over %d sec\n", + getpid(), getpgrp(), getppid(), nflag - 1, tflag); + + return bombing_run(nflag, tflag); +} From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 16:21: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 1BFAA762 for ; Fri, 26 Oct 2012 16:21:06 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from mail-gg0-f182.google.com (mail-gg0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id AF8AC8FC12 for ; Fri, 26 Oct 2012 16:21:05 +0000 (UTC) Received: by mail-gg0-f182.google.com with SMTP id l1so609703ggn.13 for ; Fri, 26 Oct 2012 09:20:59 -0700 (PDT) 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:cc:content-type :x-gm-message-state; bh=WubDYeuIkQFM55o7OXJMJe5o0Rt4LISNAKbYNn97d8I=; b=KtQyx1vFbM0u5jW2BRP/Ybod30RUXUbJuN/4InCZbfrTYHJM8zxExCwjIaot2TRWXp SwybLaZRCDlFSMN7It+NtBUC+J8oUkJlRmdMN7eVednkaZtlVAWcsQ4OBtCEwbyyy15Y WVnD5V7VhoushjUCHVYJlnhjOxl8xdp5chxCmGNzcey4jfxZXCIjsok4VXBBrxFc9wDD xt9Xj6gGHpDvmQ9qZDLo5XnaEDBLfznQcllU9QM9WHvQ85mc6POo/2jhu53GIl/eiNPX RpgM8xSuRch+sBq1RK6vxn0ggRurUmUFFmNR0jInF5Yv1J4reGnK/8ConL4xvqzDdNMJ jn5g== Received: by 10.236.190.194 with SMTP id e42mr22715177yhn.28.1351268459717; Fri, 26 Oct 2012 09:20:59 -0700 (PDT) MIME-Version: 1.0 Sender: juli@clockworksquid.com Received: by 10.146.227.39 with HTTP; Fri, 26 Oct 2012 09:20:39 -0700 (PDT) In-Reply-To: <201210261607.q9QG7raE035736@svn.freebsd.org> References: <201210261607.q9QG7raE035736@svn.freebsd.org> From: Juli Mallett Date: Fri, 26 Oct 2012 09:20:39 -0700 X-Google-Sender-Auth: CodnZBYfa6O5UwN-dzYagHacHgA Message-ID: Subject: Re: svn commit: r242142 - in stable/9: sys/dev/filemon tools/regression/filemon To: "David E. O'Brien" Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQlc5kFvykKbwCuaXVUHeEPmPnOyhujQSoIinBqyIBrNEz5B3khDACtQGDUXwH5wknGtDkuT Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 16:21:06 -0000 On Fri, Oct 26, 2012 at 9:07 AM, David E. O'Brien wrote: > Author: obrien > Date: Fri Oct 26 16:07:53 2012 > New Revision: 242142 > URL: http://svn.freebsd.org/changeset/base/242142 > > Log: > MFC: r242137: Iterate rather than use recursion. We can blow out the > kernel stack if there is a long chain of fork(2)s. Under half an hour of MFC time seems rather too quick. If this was being insta-MFC'd because of some kind of security concern, then it would be nice to have seen it signed off by SO, and treated like a security issue. From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 16:30: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 0F9C3A4E; Fri, 26 Oct 2012 16:30:50 +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 EBCCB8FC08; Fri, 26 Oct 2012 16:30: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 q9QGUnls039994; Fri, 26 Oct 2012 16:30:49 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QGUnM4039992; Fri, 26 Oct 2012 16:30:49 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201210261630.q9QGUnM4039992@svn.freebsd.org> From: Dimitry Andric Date: Fri, 26 Oct 2012 16:30:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242143 - stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 16:30:50 -0000 Author: dim Date: Fri Oct 26 16:30:49 2012 New Revision: 242143 URL: http://svn.freebsd.org/changeset/base/242143 Log: MFC r241895: Pull in r165878 from upstream llvm trunk: X86: Disable long nops for all cpus prior to pentiumpro/i686. This is the safest approach for now. If you think long nops matter a lot for performance, compile with -march=i686 or higher. :) Modified: stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) Modified: stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp Fri Oct 26 16:07:53 2012 (r242142) +++ stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp Fri Oct 26 16:30:49 2012 (r242143) @@ -307,7 +307,9 @@ bool X86AsmBackend::writeNopData(uint64_ }; // This CPU doesnt support long nops. If needed add more. - if (CPU == "geode") { + // FIXME: Can we get this from the subtarget somehow? + if (CPU == "generic" || CPU == "i386" || CPU == "i486" || CPU == "i586" || + CPU == "pentium" || CPU == "pentium-mmx" || CPU == "geode") { for (uint64_t i = 0; i < Count; ++i) OW->Write8(0x90); return true; From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 16:31: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 AC82DBB1; Fri, 26 Oct 2012 16:31:12 +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 8739D8FC17; Fri, 26 Oct 2012 16:31: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 q9QGVC2R040110; Fri, 26 Oct 2012 16:31:12 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QGVCnF040108; Fri, 26 Oct 2012 16:31:12 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201210261631.q9QGVCnF040108@svn.freebsd.org> From: Adrian Chadd Date: Fri, 26 Oct 2012 16:31:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242144 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 16:31:12 -0000 Author: adrian Date: Fri Oct 26 16:31:12 2012 New Revision: 242144 URL: http://svn.freebsd.org/changeset/base/242144 Log: Since it's not immediately obvious whether the current TX path handles fragment rate lookups correctly, add a comment describing exactly that. The assumption in the fragment duration code is the duration of the next fragment will match the rate used by the current fragment. But I think a rate lookup is being done for _each_ fragment. For older pre-sample rate control this would almost always be the case, but for sample it may be incorrect more often then correct. 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 Oct 26 16:30:49 2012 (r242143) +++ head/sys/dev/ath/if_ath_tx.c Fri Oct 26 16:31:12 2012 (r242144) @@ -1067,6 +1067,10 @@ ath_tx_calc_duration(struct ath_softc *s * Include the size of next fragment so NAV is * updated properly. The last fragment uses only * the ACK duration + * + * XXX TODO: ensure that the rate lookup for each + * fragment is the same as the rate used by the + * first fragment! */ dur += ath_hal_computetxtime(ah, rt, bf->bf_m->m_nextpkt->m_pkthdr.len, From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 16:32: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 736D1D28; Fri, 26 Oct 2012 16:32:21 +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 5984F8FC14; Fri, 26 Oct 2012 16:32: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 q9QGWL1w040351; Fri, 26 Oct 2012 16:32:21 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QGWLuO040348; Fri, 26 Oct 2012 16:32:21 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210261632.q9QGWLuO040348@svn.freebsd.org> From: Alexander Motin Date: Fri, 26 Oct 2012 16:32:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242145 - head/sys/boot/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 16:32:21 -0000 Author: mav Date: Fri Oct 26 16:32:20 2012 New Revision: 242145 URL: http://svn.freebsd.org/changeset/base/242145 Log: Fix loader crash when some unhalted exception happens during `include` command execution. In case of such unhandled exception, vmReset() inside ficlExecC() flushes the VM state. Attempt to return back to Forth after that cause garbage dereference with unexpected results. To avoid that situation call vmThrow() directly instead of expecting Forth to do it. Modified: head/sys/boot/common/interp_forth.c Modified: head/sys/boot/common/interp_forth.c ============================================================================== --- head/sys/boot/common/interp_forth.c Fri Oct 26 16:31:12 2012 (r242144) +++ head/sys/boot/common/interp_forth.c Fri Oct 26 16:32:20 2012 (r242145) @@ -132,6 +132,12 @@ bf_command(FICL_VM *vm) result=BF_PARSE; } free(line); + /* + * If there was error during nested ficlExec(), we may no longer have + * valid environment to return. Throw all exceptions from here. + */ + if (result != 0) + vmThrow(vm, result); /* This is going to be thrown!!! */ stackPushINT(vm->pStack,result); } From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 16:40: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 F3C553A4; Fri, 26 Oct 2012 16:40:03 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD0378FC08; Fri, 26 Oct 2012 16:40: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 q9QGe3EX041773; Fri, 26 Oct 2012 16:40:03 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QGe3nO041771; Fri, 26 Oct 2012 16:40:03 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201210261640.q9QGe3nO041771@svn.freebsd.org> From: Joel Dahl Date: Fri, 26 Oct 2012 16:40:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242146 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 16:40:04 -0000 Author: joel (doc committer) Date: Fri Oct 26 16:40:03 2012 New Revision: 242146 URL: http://svn.freebsd.org/changeset/base/242146 Log: mdoc: sort sections. Modified: head/share/man/man9/zero_copy.9 Modified: head/share/man/man9/zero_copy.9 ============================================================================== --- head/share/man/man9/zero_copy.9 Fri Oct 26 16:32:20 2012 (r242145) +++ head/share/man/man9/zero_copy.9 Fri Oct 26 16:40:03 2012 (r242146) @@ -156,8 +156,6 @@ variables respectively. .Xr sendfile 2 , .Xr socket 2 , .Xr ti 4 -.Sh BUGS -The COW based send mechanism is not safe and may result in kernel crashes. .Sh HISTORY The zero copy sockets code first appeared in .Fx 5.0 , @@ -169,3 +167,5 @@ The zero copy sockets code was originall .An Andrew Gallatin Aq gallatin@FreeBSD.org and substantially modified and updated by .An Kenneth Merry Aq ken@FreeBSD.org . +.Sh BUGS +The COW based send mechanism is not safe and may result in kernel crashes. From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 16:40:04 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 664) id 21C8F3A6; Fri, 26 Oct 2012 16:40:04 +0000 (UTC) Date: Fri, 26 Oct 2012 09:40:03 -0700 From: David O'Brien To: Juli Mallett Subject: Re: svn commit: r242142 - in stable/9: sys/dev/filemon tools/regression/filemon Message-ID: <20121026164003.GG43045@dragon.NUXI.org> References: <201210261607.q9QG7raE035736@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 10.0-CURRENT X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: obrien@freebsd.org List-Id: "SVN commit messages 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, 26 Oct 2012 16:40:04 -0000 On Fri, Oct 26, 2012 at 09:20:39AM -0700, Juli Mallett wrote: > Under half an hour of MFC time seems rather too quick. If this was > being insta-MFC'd because of some kind of security concern, then it > would be nice to have seen it signed off by SO, and treated like a > security issue. It paniced several boxes at work, and I'm asking RE@ if its possible to get into 9.1-R for some new deployments we'd like to do (and trying to track stock FreeBSD for). Getting into stable/9 is a 1st requirement. [ I expect a "NO" from RE@, but I want to try and thus need to submit the request with 'svn merged' patch. ] -- -- David From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 16:42: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 6609D689; Fri, 26 Oct 2012 16:42:00 +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 CAF128FC16; Fri, 26 Oct 2012 16:41:59 +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 q9QGg8OA030207; Fri, 26 Oct 2012 19:42:08 +0300 (EEST) (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 q9QGfu6j049457; Fri, 26 Oct 2012 19:41:56 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q9QGfuWX049456; Fri, 26 Oct 2012 19:41:56 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 26 Oct 2012 19:41:56 +0300 From: Konstantin Belousov To: "David O'Brien" Subject: Re: svn commit: r242142 - in stable/9: sys/dev/filemon tools/regression/filemon Message-ID: <20121026164156.GR35915@deviant.kiev.zoral.com.ua> References: <201210261607.q9QG7raE035736@svn.freebsd.org> <20121026164003.GG43045@dragon.NUXI.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4Y2Rj1EjdQE2iTVT" Content-Disposition: inline In-Reply-To: <20121026164003.GG43045@dragon.NUXI.org> User-Agent: Mutt/1.5.21 (2010-09-15) 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: Juli Mallett , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 16:42:00 -0000 --4Y2Rj1EjdQE2iTVT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 26, 2012 at 09:40:03AM -0700, David O'Brien wrote: > On Fri, Oct 26, 2012 at 09:20:39AM -0700, Juli Mallett wrote: > > Under half an hour of MFC time seems rather too quick. If this was > > being insta-MFC'd because of some kind of security concern, then it > > would be nice to have seen it signed off by SO, and treated like a > > security issue. >=20 > It paniced several boxes at work, and I'm asking RE@ if its possible to > get into 9.1-R for some new deployments we'd like to do (and trying to > track stock FreeBSD for). Getting into stable/9 is a 1st requirement. >=20 > [ I expect a "NO" from RE@, but I want to try and thus need to submit the > request with 'svn merged' patch. ] This cannot be a valid reason for insta-MFC. Juli is absolutely right. --4Y2Rj1EjdQE2iTVT Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlCKvVQACgkQC3+MBN1Mb4i97wCfd+YX6FeQTt4VdFb8Q5NIBUZP ELcAn1VEbnY0rqOC3U/6C1vqj4nm5NNS =u8Pd -----END PGP SIGNATURE----- --4Y2Rj1EjdQE2iTVT-- From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 16:56: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 2F6C1ED1; Fri, 26 Oct 2012 16:56:56 +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 174988FC0A; Fri, 26 Oct 2012 16:56: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 q9QGutHp045018; Fri, 26 Oct 2012 16:56:55 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QGutjl045015; Fri, 26 Oct 2012 16:56:55 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201210261656.q9QGutjl045015@svn.freebsd.org> From: Adrian Chadd Date: Fri, 26 Oct 2012 16:56:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242149 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 16:56:56 -0000 Author: adrian Date: Fri Oct 26 16:56:55 2012 New Revision: 242149 URL: http://svn.freebsd.org/changeset/base/242149 Log: Fix up some initial issues with creation and deletion of hotplugged net80211 devices and vaps. * vnet sets vnet0 during kldload and device probe/attach, but not for the hotplug event. Thus, plugging in a NIC causes things to panic. So, add a CURVNET_SET(vnet0) for now during the attach phase, until the hotplug code is taught to set CURVNET_SET(vnet0). * there's also no implied detach vnet context - so teach the detach path about ifp->if_vnet. * When creating/deleting vaps, also set the vnet context appropriately. These can be done at any time. Now, the problems! * ieee80211.c is supposed to be OS-portable code, with no OS-specific stuff like vnet. That should be fixed. * When the device hotplug code gets taught about CURVNET_SET(vnet0), the device vnet set can go away; but the VAP vnet set still needs to be there. * .. and there still is the question about potentially adding an implied CURVNET_SET(ifp->if_vnet) on if_free(), since any/all devices may end up being detached by a hotplug event in today's world. That's going to be a topic of a subsequent commit. Modified: head/sys/net80211/ieee80211.c head/sys/net80211/ieee80211_freebsd.c Modified: head/sys/net80211/ieee80211.c ============================================================================== --- head/sys/net80211/ieee80211.c Fri Oct 26 16:52:56 2012 (r242148) +++ head/sys/net80211/ieee80211.c Fri Oct 26 16:56:55 2012 (r242149) @@ -317,7 +317,11 @@ ieee80211_ifattach(struct ieee80211com * ifp->if_addrlen = IEEE80211_ADDR_LEN; ifp->if_hdrlen = 0; + + CURVNET_SET(vnet0); + if_attach(ifp); + ifp->if_mtu = IEEE80211_MTU_MAX; ifp->if_broadcastaddr = ieee80211broadcastaddr; ifp->if_output = null_output; @@ -331,6 +335,8 @@ ieee80211_ifattach(struct ieee80211com * sdl->sdl_alen = IEEE80211_ADDR_LEN; IEEE80211_ADDR_COPY(LLADDR(sdl), macaddr); ifa_free(ifa); + + CURVNET_RESTORE(); } /* @@ -345,8 +351,18 @@ ieee80211_ifdetach(struct ieee80211com * struct ifnet *ifp = ic->ic_ifp; struct ieee80211vap *vap; + /* + * This detaches the main interface, but not the vaps. + * Each VAP may be in a separate VIMAGE. + */ + CURVNET_SET(ifp->if_vnet); if_detach(ifp); + CURVNET_RESTORE(); + /* + * The VAP is responsible for setting and clearing + * the VIMAGE context. + */ while ((vap = TAILQ_FIRST(&ic->ic_vaps)) != NULL) ieee80211_vap_destroy(vap); ieee80211_waitfor_parent(ic); @@ -365,7 +381,9 @@ ieee80211_ifdetach(struct ieee80211com * ieee80211_power_detach(ic); ieee80211_node_detach(ic); + /* XXX VNET needed? */ ifmedia_removeall(&ic->ic_media); + taskqueue_free(ic->ic_tq); IEEE80211_LOCK_DESTROY(ic); } @@ -586,6 +604,8 @@ ieee80211_vap_detach(struct ieee80211vap struct ieee80211com *ic = vap->iv_ic; struct ifnet *ifp = vap->iv_ifp; + CURVNET_SET(ifp->if_vnet); + IEEE80211_DPRINTF(vap, IEEE80211_MSG_STATE, "%s: %s parent %s\n", __func__, ieee80211_opmode_name[vap->iv_opmode], ic->ic_ifp->if_xname); @@ -638,6 +658,8 @@ ieee80211_vap_detach(struct ieee80211vap ieee80211_sysctl_vdetach(vap); if_free(ifp); + + CURVNET_RESTORE(); } /* Modified: head/sys/net80211/ieee80211_freebsd.c ============================================================================== --- head/sys/net80211/ieee80211_freebsd.c Fri Oct 26 16:52:56 2012 (r242148) +++ head/sys/net80211/ieee80211_freebsd.c Fri Oct 26 16:56:55 2012 (r242149) @@ -152,7 +152,9 @@ wlan_clone_destroy(struct ifnet *ifp) void ieee80211_vap_destroy(struct ieee80211vap *vap) { + CURVNET_SET(vap->iv_ifp->if_vnet); if_clone_destroyif(wlan_cloner, vap->iv_ifp); + CURVNET_RESTORE(); } int From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 17:00: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 0D19B1EA; Fri, 26 Oct 2012 17:00:04 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id BC6698FC08; Fri, 26 Oct 2012 17:00:03 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id rp8so3104164pbb.13 for ; Fri, 26 Oct 2012 10:00:02 -0700 (PDT) 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; bh=a4YhruTn0XRrJkDa694P0ecN4oZIgjRyTBVd8kvMplk=; b=0HbzX0SNAl2kOSpDAEKwpS0AXXEOrUTTlDjpEzrGpzLTUFseWM3k62vX9Eg8r6SjOv rf2+3Znbz8Okq+GT3Aky32xkVs0BBv4FiJs2U5IU9eWOslPuoatfYmLfG8J/CD9X1zV6 yV2muvTy9YqGIDXGsdBEeG1v2IWmuWU5wZMaW6g69OxMnhmXKW7vXniJgnfHa6lBI3Xp E+8Vfgwuco6jiS4zxBUj3ouQaw+WFewmDSsUdGfQywVhiwri2GMYl5zxornRYknt5FY3 lclabPL9Wv+elAzFst90dxZkCMQFLKE7snDLpoKWBJBvy5oIYXtsbX2dBysqUGhqZE+J 4Idg== MIME-Version: 1.0 Received: by 10.66.78.199 with SMTP id d7mr63521607pax.77.1351270802811; Fri, 26 Oct 2012 10:00:02 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.68.146.233 with HTTP; Fri, 26 Oct 2012 10:00:02 -0700 (PDT) In-Reply-To: <201210161337.q9GDbtr8049924@svn.freebsd.org> References: <201210161337.q9GDbtr8049924@svn.freebsd.org> Date: Fri, 26 Oct 2012 10:00:02 -0700 X-Google-Sender-Auth: RRdBXIG8asLHu1LN6kaIq2Yl0h8 Message-ID: Subject: Re: svn commit: r241610 - in head: . sys/dev/usb sys/net sys/net80211 sys/netpfil/ipfw sys/netpfil/pf sys/sys From: Adrian Chadd To: Gleb Smirnoff Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 17:00:04 -0000 So with this change, you've broken building -HEAD net80211 on -9. Can we please sit down and make this work on both freebsd-9 and freebsd-head? I do a lot of wifi development on -9 with -HEAD wireless and this change broke everything for me. You could've at least asked the maintainers first before you did this. Thanks, Adrian On 16 October 2012 06:37, Gleb Smirnoff wrote: > Author: glebius > Date: Tue Oct 16 13:37:54 2012 > New Revision: 241610 > URL: http://svn.freebsd.org/changeset/base/241610 > > Log: > Make the "struct if_clone" opaque to users of the cloning API. Users > now use function calls: > > if_clone_simple() > if_clone_advanced() > > to initialize a cloner, instead of macros that initialize if_clone > structure. > > Discussed with: brooks, bz, 1 year ago > > Modified: > head/UPDATING > head/sys/dev/usb/usb_pf.c > head/sys/net/if_bridge.c > head/sys/net/if_clone.c > head/sys/net/if_clone.h > head/sys/net/if_disc.c > head/sys/net/if_edsc.c > head/sys/net/if_enc.c > head/sys/net/if_epair.c > head/sys/net/if_faith.c > head/sys/net/if_gif.c > head/sys/net/if_gre.c > head/sys/net/if_lagg.c > head/sys/net/if_loop.c > head/sys/net/if_stf.c > head/sys/net/if_tap.c > head/sys/net/if_tun.c > head/sys/net/if_vlan.c > head/sys/net80211/ieee80211_freebsd.c > head/sys/netpfil/ipfw/ip_fw_log.c > head/sys/netpfil/pf/if_pflog.c > head/sys/netpfil/pf/if_pfsync.c > head/sys/sys/param.h > > Modified: head/UPDATING > ============================================================================== > --- head/UPDATING Tue Oct 16 13:27:20 2012 (r241609) > +++ head/UPDATING Tue Oct 16 13:37:54 2012 (r241610) > @@ -24,6 +24,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 > disable the most expensive debugging functionality run > "ln -s 'abort:false,junk:false' /etc/malloc.conf".) > > +20121016: > + The interface cloning API and ABI has changed. The following > + modules need to be recompiled together with kernel: > + ipfw(4), pfsync(4), pflog(4), usb(4), wlan(4), stf(4), > + vlan(4), disc(4), edsc(4), if_bridge(4), gif(4), tap(4), > + faith(4), epair(4), enc(4), tun(4), if_lagg(4), gre(4). > + > 20121015: > The sdhci driver was split in two parts: sdhci (generic SD Host > Controller logic) and sdhci_pci (actual hardware driver). > > Modified: head/sys/dev/usb/usb_pf.c > ============================================================================== > --- head/sys/dev/usb/usb_pf.c Tue Oct 16 13:27:20 2012 (r241609) > +++ head/sys/dev/usb/usb_pf.c Tue Oct 16 13:37:54 2012 (r241610) > @@ -60,8 +60,6 @@ __FBSDID("$FreeBSD$"); > #include > #include > > -#define USBUSNAME "usbus" > - > static void usbpf_init(void); > static void usbpf_uninit(void); > static int usbpf_ioctl(struct ifnet *, u_long, caddr_t); > @@ -74,9 +72,8 @@ static uint32_t usbpf_aggregate_status(s > static int usbpf_xfer_frame_is_read(struct usb_xfer *, uint32_t); > static uint32_t usbpf_xfer_precompute_size(struct usb_xfer *, int); > > -static struct if_clone usbpf_cloner = IFC_CLONE_INITIALIZER( > - USBUSNAME, NULL, IF_MAXUNIT, > - NULL, usbpf_clone_match, usbpf_clone_create, usbpf_clone_destroy); > +static struct if_clone *usbpf_cloner; > +static const char usbusname[] = "usbus"; > > SYSINIT(usbpf_init, SI_SUB_PSEUDO, SI_ORDER_MIDDLE, usbpf_init, NULL); > SYSUNINIT(usbpf_uninit, SI_SUB_PSEUDO, SI_ORDER_MIDDLE, usbpf_uninit, NULL); > @@ -85,7 +82,8 @@ static void > usbpf_init(void) > { > > - if_clone_attach(&usbpf_cloner); > + usbpf_cloner = if_clone_advanced(usbusname, 0, usbpf_clone_match, > + usbpf_clone_create, usbpf_clone_destroy); > } > > static void > @@ -98,9 +96,9 @@ usbpf_uninit(void) > int error; > int i; > > - if_clone_detach(&usbpf_cloner); > + if_clone_detach(usbpf_cloner); > > - dc = devclass_find(USBUSNAME); > + dc = devclass_find(usbusname); > if (dc == NULL) > return; > error = devclass_get_devices(dc, &devlp, &devlcnt); > @@ -109,7 +107,7 @@ usbpf_uninit(void) > for (i = 0; i < devlcnt; i++) { > ubus = device_get_softc(devlp[i]); > if (ubus != NULL && ubus->ifp != NULL) > - usbpf_clone_destroy(&usbpf_cloner, ubus->ifp); > + usbpf_clone_destroy(usbpf_cloner, ubus->ifp); > } > free(devlp, M_TEMP); > } > @@ -130,12 +128,12 @@ usbpf_ifname2ubus(const char *ifname) > int unit; > int error; > > - if (strncmp(ifname, USBUSNAME, sizeof(USBUSNAME) - 1) != 0) > + if (strncmp(ifname, usbusname, sizeof(usbusname) - 1) != 0) > return (NULL); > error = ifc_name2unit(ifname, &unit); > if (error || unit < 0) > return (NULL); > - dc = devclass_find(USBUSNAME); > + dc = devclass_find(usbusname); > if (dc == NULL) > return (NULL); > dev = devclass_get_device(dc, unit); > @@ -195,7 +193,7 @@ usbpf_clone_create(struct if_clone *ifc, > } > strlcpy(ifp->if_xname, name, sizeof(ifp->if_xname)); > ifp->if_softc = ubus; > - ifp->if_dname = ifc->ifc_name; > + ifp->if_dname = usbusname; > ifp->if_dunit = unit; > ifp->if_ioctl = usbpf_ioctl; > if_attach(ifp); > @@ -242,7 +240,7 @@ usbpf_detach(struct usb_bus *ubus) > { > > if (ubus->ifp != NULL) > - usbpf_clone_destroy(&usbpf_cloner, ubus->ifp); > + usbpf_clone_destroy(usbpf_cloner, ubus->ifp); > if (bootverbose) > device_printf(ubus->parent, "usbpf: Detached\n"); > } > > Modified: head/sys/net/if_bridge.c > ============================================================================== > --- head/sys/net/if_bridge.c Tue Oct 16 13:27:20 2012 (r241609) > +++ head/sys/net/if_bridge.c Tue Oct 16 13:37:54 2012 (r241610) > @@ -481,7 +481,8 @@ const int bridge_control_table_size = > > LIST_HEAD(, bridge_softc) bridge_list; > > -IFC_SIMPLE_DECLARE(bridge, 0); > +static struct if_clone *bridge_cloner; > +static const char bridge_name[] = "bridge"; > > static int > bridge_modevent(module_t mod, int type, void *data) > @@ -490,7 +491,8 @@ bridge_modevent(module_t mod, int type, > switch (type) { > case MOD_LOAD: > mtx_init(&bridge_list_mtx, "if_bridge list", NULL, MTX_DEF); > - if_clone_attach(&bridge_cloner); > + bridge_cloner = if_clone_simple(bridge_name, > + bridge_clone_create, bridge_clone_destroy, 0); > bridge_rtnode_zone = uma_zcreate("bridge_rtnode", > sizeof(struct bridge_rtnode), NULL, NULL, NULL, NULL, > UMA_ALIGN_PTR, 0); > @@ -506,7 +508,7 @@ bridge_modevent(module_t mod, int type, > case MOD_UNLOAD: > EVENTHANDLER_DEREGISTER(ifnet_departure_event, > bridge_detach_cookie); > - if_clone_detach(&bridge_cloner); > + if_clone_detach(bridge_cloner); > uma_zdestroy(bridge_rtnode_zone); > bridge_input_p = NULL; > bridge_output_p = NULL; > @@ -595,7 +597,7 @@ bridge_clone_create(struct if_clone *ifc > LIST_INIT(&sc->sc_spanlist); > > ifp->if_softc = sc; > - if_initname(ifp, ifc->ifc_name, unit); > + if_initname(ifp, bridge_name, unit); > ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; > ifp->if_ioctl = bridge_ioctl; > ifp->if_transmit = bridge_transmit; > > Modified: head/sys/net/if_clone.c > ============================================================================== > --- head/sys/net/if_clone.c Tue Oct 16 13:27:20 2012 (r241609) > +++ head/sys/net/if_clone.c Tue Oct 16 13:37:54 2012 (r241610) > @@ -1,4 +1,5 @@ > /*- > + * Copyright (c) 2012 Gleb Smirnoff > * Copyright (c) 1980, 1986, 1993 > * The Regents of the University of California. All rights reserved. > * > @@ -42,19 +43,65 @@ > > #include > #include > -#if 0 > -#include > -#endif > -#include > #include > #include > #include > #include > > +/* Current IF_MAXUNIT expands maximum to 5 characters. */ > +#define IFCLOSIZ (IFNAMSIZ - 5) > + > +/* > + * Structure describing a `cloning' interface. > + * > + * List of locks > + * (c) const until freeing > + * (d) driver specific data, may need external protection. > + * (e) locked by if_cloners_mtx > + * (i) locked by ifc_mtx mtx > + */ > +struct if_clone { > + char ifc_name[IFCLOSIZ]; /* (c) Name of device, e.g. `gif' */ > + struct unrhdr *ifc_unrhdr; /* (c) alloc_unr(9) header */ > + int ifc_maxunit; /* (c) maximum unit number */ > + long ifc_refcnt; /* (i) Reference count. */ > + LIST_HEAD(, ifnet) ifc_iflist; /* (i) List of cloned interfaces */ > + struct mtx ifc_mtx; /* Mutex to protect members. */ > + > + enum { SIMPLE, ADVANCED } ifc_type; /* (c) */ > + > + /* (c) Driver specific cloning functions. Called with no locks held. */ > + union { > + struct { /* advanced cloner */ > + ifc_match_t *_ifc_match; > + ifc_create_t *_ifc_create; > + ifc_destroy_t *_ifc_destroy; > + } A; > + struct { /* simple cloner */ > + ifcs_create_t *_ifcs_create; > + ifcs_destroy_t *_ifcs_destroy; > + int _ifcs_minifs; /* minimum ifs */ > + > + } S; > + } U; > +#define ifc_match U.A._ifc_match > +#define ifc_create U.A._ifc_create > +#define ifc_destroy U.A._ifc_destroy > +#define ifcs_create U.S._ifcs_create > +#define ifcs_destroy U.S._ifcs_destroy > +#define ifcs_minifs U.S._ifcs_minifs > + > + LIST_ENTRY(if_clone) ifc_list; /* (e) On list of cloners */ > +}; > + > static void if_clone_free(struct if_clone *ifc); > static int if_clone_createif(struct if_clone *ifc, char *name, size_t len, > caddr_t params); > > +static int ifc_simple_match(struct if_clone *, const char *); > +static int ifc_simple_create(struct if_clone *, char *, size_t, caddr_t); > +static int ifc_simple_destroy(struct if_clone *, struct ifnet *); > + > static struct mtx if_cloners_mtx; > static VNET_DEFINE(int, if_cloners_count); > VNET_DEFINE(LIST_HEAD(, if_clone), if_cloners); > @@ -138,18 +185,25 @@ if_clone_create(char *name, size_t len, > > /* Try to find an applicable cloner for this request */ > IF_CLONERS_LOCK(); > - LIST_FOREACH(ifc, &V_if_cloners, ifc_list) { > - if (ifc->ifc_match(ifc, name)) { > - break; > + LIST_FOREACH(ifc, &V_if_cloners, ifc_list) > + if (ifc->ifc_type == SIMPLE) { > + if (ifc_simple_match(ifc, name)) > + break; > + } else { > + if (ifc->ifc_match(ifc, name)) > + break; > } > - } > #ifdef VIMAGE > if (ifc == NULL && !IS_DEFAULT_VNET(curvnet)) { > CURVNET_SET_QUIET(vnet0); > - LIST_FOREACH(ifc, &V_if_cloners, ifc_list) { > - if (ifc->ifc_match(ifc, name)) > - break; > - } > + LIST_FOREACH(ifc, &V_if_cloners, ifc_list) > + if (ifc->ifc_type == SIMPLE) { > + if (ifc_simple_match(ifc, name)) > + break; > + } else { > + if (ifc->ifc_match(ifc, name)) > + break; > + } > CURVNET_RESTORE(); > } > #endif > @@ -173,7 +227,10 @@ if_clone_createif(struct if_clone *ifc, > if (ifunit(name) != NULL) > return (EEXIST); > > - err = (*ifc->ifc_create)(ifc, name, len, params); > + if (ifc->ifc_type == SIMPLE) > + err = ifc_simple_create(ifc, name, len, params); > + else > + err = (*ifc->ifc_create)(ifc, name, len, params); > > if (!err) { > ifp = ifunit(name); > @@ -214,10 +271,14 @@ if_clone_destroy(const char *name) > #ifdef VIMAGE > if (ifc == NULL && !IS_DEFAULT_VNET(curvnet)) { > CURVNET_SET_QUIET(vnet0); > - LIST_FOREACH(ifc, &V_if_cloners, ifc_list) { > - if (ifc->ifc_match(ifc, name)) > - break; > - } > + LIST_FOREACH(ifc, &V_if_cloners, ifc_list) > + if (ifc->type == SIMPLE) { > + if (ifc_simple_match(ifc, name)) > + break; > + } else { > + if (ifc->ifc_match(ifc, name)) > + break; > + } > CURVNET_RESTORE(); > } > #endif > @@ -241,7 +302,7 @@ if_clone_destroyif(struct if_clone *ifc, > int err; > struct ifnet *ifcifp; > > - if (ifc->ifc_destroy == NULL) > + if (ifc->ifc_type == ADVANCED && ifc->ifc_destroy == NULL) > return(EOPNOTSUPP); > > /* > @@ -266,7 +327,10 @@ if_clone_destroyif(struct if_clone *ifc, > > if_delgroup(ifp, ifc->ifc_name); > > - err = (*ifc->ifc_destroy)(ifc, ifp); > + if (ifc->ifc_type == SIMPLE) > + err = ifc_simple_destroy(ifc, ifp); > + else > + err = (*ifc->ifc_destroy)(ifc, ifp); > > if (err != 0) { > if_addgroup(ifp, ifc->ifc_name); > @@ -279,21 +343,29 @@ if_clone_destroyif(struct if_clone *ifc, > return (err); > } > > -/* > - * Register a network interface cloner. > - */ > -int > -if_clone_attach(struct if_clone *ifc) > +static struct if_clone * > +if_clone_alloc(const char *name, int maxunit) > { > - struct if_clone *ifc1; > + struct if_clone *ifc; > > - KASSERT(ifc->ifc_name != NULL, ("%s: no name\n", __func__)); > + KASSERT(name != NULL, ("%s: no name\n", __func__)); > > + ifc = malloc(sizeof(struct if_clone), M_CLONE, M_WAITOK | M_ZERO); > + strncpy(ifc->ifc_name, name, IFCLOSIZ-1); > IF_CLONE_LOCK_INIT(ifc); > IF_CLONE_ADDREF(ifc); > + ifc->ifc_maxunit = maxunit ? maxunit : IF_MAXUNIT; > ifc->ifc_unrhdr = new_unrhdr(0, ifc->ifc_maxunit, &ifc->ifc_mtx); > LIST_INIT(&ifc->ifc_iflist); > > + return (ifc); > +} > + > +static int > +if_clone_attach(struct if_clone *ifc) > +{ > + struct if_clone *ifc1; > + > IF_CLONERS_LOCK(); > LIST_FOREACH(ifc1, &V_if_cloners, ifc_list) > if (strcmp(ifc->ifc_name, ifc1->ifc_name) == 0) { > @@ -305,11 +377,63 @@ if_clone_attach(struct if_clone *ifc) > V_if_cloners_count++; > IF_CLONERS_UNLOCK(); > > - if (ifc->ifc_attach != NULL) > - (*ifc->ifc_attach)(ifc); > + return (0); > +} > + > +struct if_clone * > +if_clone_advanced(const char *name, u_int maxunit, ifc_match_t match, > + ifc_create_t create, ifc_destroy_t destroy) > +{ > + struct if_clone *ifc; > + > + ifc = if_clone_alloc(name, maxunit); > + ifc->ifc_type = ADVANCED; > + ifc->ifc_match = match; > + ifc->ifc_create = create; > + ifc->ifc_destroy = destroy; > + > + if (if_clone_attach(ifc) != 0) { > + if_clone_free(ifc); > + return (NULL); > + } > + > EVENTHANDLER_INVOKE(if_clone_event, ifc); > > - return (0); > + return (ifc); > +} > + > +struct if_clone * > +if_clone_simple(const char *name, ifcs_create_t create, ifcs_destroy_t destroy, > + u_int minifs) > +{ > + struct if_clone *ifc; > + u_int unit; > + > + ifc = if_clone_alloc(name, 0); > + ifc->ifc_type = SIMPLE; > + ifc->ifcs_create = create; > + ifc->ifcs_destroy = destroy; > + ifc->ifcs_minifs = minifs; > + > + if (if_clone_attach(ifc) != 0) { > + if_clone_free(ifc); > + return (NULL); > + } > + > + for (unit = 0; unit < minifs; unit++) { > + char name[IFNAMSIZ]; > + int error; > + > + snprintf(name, IFNAMSIZ, "%s%d", ifc->ifc_name, unit); > + error = if_clone_createif(ifc, name, IFNAMSIZ, NULL); > + KASSERT(error == 0, > + ("%s: failed to create required interface %s", > + __func__, name)); > + } > + > + EVENTHANDLER_INVOKE(if_clone_event, ifc); > + > + return (ifc); > } > > /* > @@ -318,7 +442,6 @@ if_clone_attach(struct if_clone *ifc) > void > if_clone_detach(struct if_clone *ifc) > { > - struct ifc_simple_data *ifcs = ifc->ifc_data; > > IF_CLONERS_LOCK(); > LIST_REMOVE(ifc, ifc_list); > @@ -326,8 +449,8 @@ if_clone_detach(struct if_clone *ifc) > IF_CLONERS_UNLOCK(); > > /* Allow all simples to be destroyed */ > - if (ifc->ifc_attach == ifc_simple_attach) > - ifcs->ifcs_minifs = 0; > + if (ifc->ifc_type == SIMPLE) > + ifc->ifcs_minifs = 0; > > /* destroy all interfaces for this cloner */ > while (!LIST_EMPTY(&ifc->ifc_iflist)) > @@ -345,6 +468,7 @@ if_clone_free(struct if_clone *ifc) > > IF_CLONE_LOCK_DESTROY(ifc); > delete_unrhdr(ifc->ifc_unrhdr); > + free(ifc, M_CLONE); > } > > /* > @@ -483,29 +607,7 @@ ifc_free_unit(struct if_clone *ifc, int > IF_CLONE_REMREF(ifc); > } > > -void > -ifc_simple_attach(struct if_clone *ifc) > -{ > - int err; > - int unit; > - char name[IFNAMSIZ]; > - struct ifc_simple_data *ifcs = ifc->ifc_data; > - > - KASSERT(ifcs->ifcs_minifs - 1 <= ifc->ifc_maxunit, > - ("%s: %s requested more units than allowed (%d > %d)", > - __func__, ifc->ifc_name, ifcs->ifcs_minifs, > - ifc->ifc_maxunit + 1)); > - > - for (unit = 0; unit < ifcs->ifcs_minifs; unit++) { > - snprintf(name, IFNAMSIZ, "%s%d", ifc->ifc_name, unit); > - err = if_clone_createif(ifc, name, IFNAMSIZ, NULL); > - KASSERT(err == 0, > - ("%s: failed to create required interface %s", > - __func__, name)); > - } > -} > - > -int > +static int > ifc_simple_match(struct if_clone *ifc, const char *name) > { > const char *cp; > @@ -526,14 +628,13 @@ ifc_simple_match(struct if_clone *ifc, c > return (1); > } > > -int > +static int > ifc_simple_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) > { > char *dp; > int wildcard; > int unit; > int err; > - struct ifc_simple_data *ifcs = ifc->ifc_data; > > err = ifc_name2unit(name, &unit); > if (err != 0) > @@ -545,7 +646,7 @@ ifc_simple_create(struct if_clone *ifc, > if (err != 0) > return (err); > > - err = ifcs->ifcs_create(ifc, unit, params); > + err = ifc->ifcs_create(ifc, unit, params); > if (err != 0) { > ifc_free_unit(ifc, unit); > return (err); > @@ -569,18 +670,17 @@ ifc_simple_create(struct if_clone *ifc, > return (0); > } > > -int > +static int > ifc_simple_destroy(struct if_clone *ifc, struct ifnet *ifp) > { > int unit; > - struct ifc_simple_data *ifcs = ifc->ifc_data; > > unit = ifp->if_dunit; > > - if (unit < ifcs->ifcs_minifs) > + if (unit < ifc->ifcs_minifs) > return (EINVAL); > > - ifcs->ifcs_destroy(ifp); > + ifc->ifcs_destroy(ifp); > > ifc_free_unit(ifc, unit); > > > Modified: head/sys/net/if_clone.h > ============================================================================== > --- head/sys/net/if_clone.h Tue Oct 16 13:27:20 2012 (r241609) > +++ head/sys/net/if_clone.h Tue Oct 16 13:37:54 2012 (r241610) > @@ -35,87 +35,42 @@ > > #ifdef _KERNEL > > -#define IFC_CLONE_INITIALIZER(name, data, maxunit, \ > - attach, match, create, destroy) \ > - { \ > - .ifc_name = name, \ > - .ifc_maxunit = maxunit, \ > - .ifc_data = data, \ > - .ifc_attach = attach, \ > - .ifc_match = match, \ > - .ifc_create = create, \ > - .ifc_destroy = destroy, \ > - } > - > -/* > - * Structure describing a `cloning' interface. > - * > - * List of locks > - * (c) const until freeing > - * (d) driver specific data, may need external protection. > - * (e) locked by if_cloners_mtx > - * (i) locked by ifc_mtx mtx > - */ > -struct if_clone { > - LIST_ENTRY(if_clone) ifc_list; /* (e) On list of cloners */ > - const char *ifc_name; /* (c) Name of device, e.g. `gif' */ > - int ifc_maxunit; /* (c) Maximum unit number */ > - struct unrhdr *ifc_unrhdr; /* (c) alloc_unr(9) header */ > - void *ifc_data; /* (*) Data for ifc_* functions. */ > - > - /* (c) Driver specific cloning functions. Called with no locks held. */ > - void (*ifc_attach)(struct if_clone *); > - int (*ifc_match)(struct if_clone *, const char *); > - int (*ifc_create)(struct if_clone *, char *, size_t, caddr_t); > - int (*ifc_destroy)(struct if_clone *, struct ifnet *); > - > - long ifc_refcnt; /* (i) Refrence count. */ > - struct mtx ifc_mtx; /* Mutex to protect members. */ > - LIST_HEAD(, ifnet) ifc_iflist; /* (i) List of cloned interfaces */ > -}; > +struct if_clone; > > -void if_clone_init(void); > -int if_clone_attach(struct if_clone *); > +/* Methods. */ > +typedef int ifc_match_t(struct if_clone *, const char *); > +typedef int ifc_create_t(struct if_clone *, char *, size_t, caddr_t); > +typedef int ifc_destroy_t(struct if_clone *, struct ifnet *); > + > +typedef int ifcs_create_t(struct if_clone *, int, caddr_t); > +typedef void ifcs_destroy_t(struct ifnet *); > + > +/* Interface cloner (de)allocating functions. */ > +struct if_clone * > + if_clone_advanced(const char *, u_int, ifc_match_t, ifc_create_t, > + ifc_destroy_t); > +struct if_clone * > + if_clone_simple(const char *, ifcs_create_t, ifcs_destroy_t, u_int); > void if_clone_detach(struct if_clone *); > -void vnet_if_clone_init(void); > - > -int if_clone_create(char *, size_t, caddr_t); > -int if_clone_destroy(const char *); > -int if_clone_destroyif(struct if_clone *, struct ifnet *); > -int if_clone_list(struct if_clonereq *); > > +/* Unit (de)allocating fucntions. */ > int ifc_name2unit(const char *name, int *unit); > int ifc_alloc_unit(struct if_clone *, int *); > void ifc_free_unit(struct if_clone *, int); > > -/* > - * The ifc_simple functions, structures, and macros implement basic > - * cloning as in 5.[012]. > - */ > - > -struct ifc_simple_data { > - int ifcs_minifs; /* minimum number of interfaces */ > - > - int (*ifcs_create)(struct if_clone *, int, caddr_t); > - void (*ifcs_destroy)(struct ifnet *); > -}; > - > -/* interface clone event */ > +/* Interface clone event. */ > typedef void (*if_clone_event_handler_t)(void *, struct if_clone *); > EVENTHANDLER_DECLARE(if_clone_event, if_clone_event_handler_t); > > -#define IFC_SIMPLE_DECLARE(name, minifs) \ > -struct ifc_simple_data name##_cloner_data = \ > - {minifs, name##_clone_create, name##_clone_destroy}; \ > -struct if_clone name##_cloner = \ > - IFC_CLONE_INITIALIZER(#name, &name##_cloner_data, IF_MAXUNIT, \ > - ifc_simple_attach, ifc_simple_match, ifc_simple_create, ifc_simple_destroy) > - > -void ifc_simple_attach(struct if_clone *); > -int ifc_simple_match(struct if_clone *, const char *); > -int ifc_simple_create(struct if_clone *, char *, size_t, caddr_t); > -int ifc_simple_destroy(struct if_clone *, struct ifnet *); > +/* The below interfaces used only by net/if.c. */ > +void if_clone_init(void); > +void vnet_if_clone_init(void); > +int if_clone_create(char *, size_t, caddr_t); > +int if_clone_destroy(const char *); > +int if_clone_list(struct if_clonereq *); > > -#endif /* _KERNEL */ > +/* The below interface used only by epair(4). */ > +int if_clone_destroyif(struct if_clone *, struct ifnet *); > > +#endif /* _KERNEL */ > #endif /* !_NET_IF_CLONE_H_ */ > > Modified: head/sys/net/if_disc.c > ============================================================================== > --- head/sys/net/if_disc.c Tue Oct 16 13:27:20 2012 (r241609) > +++ head/sys/net/if_disc.c Tue Oct 16 13:37:54 2012 (r241610) > @@ -59,8 +59,6 @@ > #define DSMTU 65532 > #endif > > -#define DISCNAME "disc" > - > struct disc_softc { > struct ifnet *sc_ifp; > }; > @@ -72,9 +70,10 @@ static int discioctl(struct ifnet *, u_l > static int disc_clone_create(struct if_clone *, int, caddr_t); > static void disc_clone_destroy(struct ifnet *); > > -static MALLOC_DEFINE(M_DISC, DISCNAME, "Discard interface"); > +static const char discname[] = "disc"; > +static MALLOC_DEFINE(M_DISC, discname, "Discard interface"); > > -IFC_SIMPLE_DECLARE(disc, 0); > +static struct if_clone *disc_cloner; > > static int > disc_clone_create(struct if_clone *ifc, int unit, caddr_t params) > @@ -90,7 +89,7 @@ disc_clone_create(struct if_clone *ifc, > } > > ifp->if_softc = sc; > - if_initname(ifp, ifc->ifc_name, unit); > + if_initname(ifp, discname, unit); > ifp->if_mtu = DSMTU; > /* > * IFF_LOOPBACK should not be removed from disc's flags because > @@ -135,10 +134,11 @@ disc_modevent(module_t mod, int type, vo > > switch (type) { > case MOD_LOAD: > - if_clone_attach(&disc_cloner); > + disc_cloner = if_clone_simple(discname, disc_clone_create, > + disc_clone_destroy, 0); > break; > case MOD_UNLOAD: > - if_clone_detach(&disc_cloner); > + if_clone_detach(disc_cloner); > break; > default: > return (EOPNOTSUPP); > > Modified: head/sys/net/if_edsc.c > ============================================================================== > --- head/sys/net/if_edsc.c Tue Oct 16 13:27:20 2012 (r241609) > +++ head/sys/net/if_edsc.c Tue Oct 16 13:37:54 2012 (r241610) > @@ -51,6 +51,8 @@ > #include /* IFT_ETHER and friends */ > #include /* kernel-only part of ifnet(9) */ > > +static const char edscname[] = "edsc"; > + > /* > * Software configuration of an interface specific to this device type. > */ > @@ -64,9 +66,9 @@ struct edsc_softc { > }; > > /* > - * Simple cloning methods. > - * IFC_SIMPLE_DECLARE() expects precisely these names. > + * Attach to the interface cloning framework. > */ > +static struct if_clone *edsc_cloner; > static int edsc_clone_create(struct if_clone *, int, caddr_t); > static void edsc_clone_destroy(struct ifnet *); > > @@ -81,15 +83,7 @@ static void edsc_start(struct ifnet *ifp > /* > * We'll allocate softc instances from this. > */ > -static MALLOC_DEFINE(M_EDSC, "edsc", "Ethernet discard interface"); > - > -/* > - * Attach to the interface cloning framework under the name of "edsc". > - * The second argument is the number of units to be created from > - * the outset. It's also the minimum number of units allowed. > - * We don't want any units created as soon as the driver is loaded. > - */ > -IFC_SIMPLE_DECLARE(edsc, 0); > +static MALLOC_DEFINE(M_EDSC, edscname, "Ethernet discard interface"); > > /* > * Create an interface instance. > @@ -116,7 +110,7 @@ edsc_clone_create(struct if_clone *ifc, > /* > * Get a name for this particular interface in its ifnet structure. > */ > - if_initname(ifp, ifc->ifc_name, unit); > + if_initname(ifp, edscname, unit); > > /* > * Typical Ethernet interface flags: we can do broadcast and > @@ -323,8 +317,13 @@ edsc_modevent(module_t mod, int type, vo > case MOD_LOAD: > /* > * Connect to the network interface cloning framework. > + * The last argument is the number of units to be created > + * from the outset. It's also the minimum number of units > + * allowed. We don't want any units created as soon as the > + * driver is loaded. > */ > - if_clone_attach(&edsc_cloner); > + edsc_cloner = if_clone_simple(edscname, edsc_clone_create, > + edsc_clone_destroy, 0); > break; > > case MOD_UNLOAD: > @@ -332,7 +331,7 @@ edsc_modevent(module_t mod, int type, vo > * Disconnect from the cloning framework. > * Existing interfaces will be disposed of properly. > */ > - if_clone_detach(&edsc_cloner); > + if_clone_detach(edsc_cloner); > break; > > default: > > Modified: head/sys/net/if_enc.c > ============================================================================== > --- head/sys/net/if_enc.c Tue Oct 16 13:27:20 2012 (r241609) > +++ head/sys/net/if_enc.c Tue Oct 16 13:37:54 2012 (r241610) > @@ -91,8 +91,8 @@ static int enc_output(struct ifnet *ifp, > struct sockaddr *dst, struct route *ro); > static int enc_clone_create(struct if_clone *, int, caddr_t); > static void enc_clone_destroy(struct ifnet *); > - > -IFC_SIMPLE_DECLARE(enc, 1); > +static struct if_clone *enc_cloner; > +static const char encname[] = "enc"; > > /* > * Sysctls. > @@ -143,7 +143,7 @@ enc_clone_create(struct if_clone *ifc, i > return (ENOSPC); > } > > - if_initname(ifp, ifc->ifc_name, unit); > + if_initname(ifp, encname, unit); > ifp->if_mtu = ENCMTU; > ifp->if_ioctl = enc_ioctl; > ifp->if_output = enc_output; > @@ -167,7 +167,8 @@ enc_modevent(module_t mod, int type, voi > switch (type) { > case MOD_LOAD: > mtx_init(&enc_mtx, "enc mtx", NULL, MTX_DEF); > - if_clone_attach(&enc_cloner); > + enc_cloner = if_clone_simple(encname, enc_clone_create, > + enc_clone_destroy, 0); > break; > case MOD_UNLOAD: > printf("enc module unload - not possible for this module\n"); > > Modified: head/sys/net/if_epair.c > ============================================================================== > --- head/sys/net/if_epair.c Tue Oct 16 13:27:20 2012 (r241609) > +++ head/sys/net/if_epair.c Tue Oct 16 13:37:54 2012 (r241610) > @@ -72,8 +72,6 @@ __FBSDID("$FreeBSD$"); > #include > #include > > -#define EPAIRNAME "epair" > - > SYSCTL_DECL(_net_link); > static SYSCTL_NODE(_net_link, OID_AUTO, epair, CTLFLAG_RW, 0, "epair sysctl"); > > @@ -100,9 +98,11 @@ static int epair_clone_match(struct if_c > static int epair_clone_create(struct if_clone *, char *, size_t, caddr_t); > static int epair_clone_destroy(struct if_clone *, struct ifnet *); > > +static const char epairname[] = "epair"; > + > /* Netisr realted definitions and sysctl. */ > static struct netisr_handler epair_nh = { > - .nh_name = EPAIRNAME, > + .nh_name = epairname, > .nh_proto = NETISR_EPAIR, > .nh_policy = NETISR_POLICY_CPU, > .nh_handler = epair_nh_sintr, > @@ -168,12 +168,10 @@ STAILQ_HEAD(eid_list, epair_ifp_drain); > #define EPAIR_REFCOUNT_ASSERT(a, p) > #endif > > -static MALLOC_DEFINE(M_EPAIR, EPAIRNAME, > +static MALLOC_DEFINE(M_EPAIR, epairname, > "Pair of virtual cross-over connected Ethernet-like interfaces"); > > -static struct if_clone epair_cloner = IFC_CLONE_INITIALIZER( > - EPAIRNAME, NULL, IF_MAXUNIT, > - NULL, epair_clone_match, epair_clone_create, epair_clone_destroy); > +static struct if_clone *epair_cloner; > > /* > * DPCPU area and functions. > @@ -692,10 +690,10 @@ epair_clone_match(struct if_clone *ifc, > * - epair > * but not the epair[ab] versions. > */ > - if (strncmp(EPAIRNAME, name, sizeof(EPAIRNAME)-1) != 0) > + if (strncmp(epairname, name, sizeof(epairname)-1) != 0) > return (0); > > - for (cp = name + sizeof(EPAIRNAME) - 1; *cp != '\0'; cp++) { > + for (cp = name + sizeof(epairname) - 1; *cp != '\0'; cp++) { > if (*cp < '0' || *cp > '9') > return (0); > } > @@ -714,7 +712,7 @@ epair_clone_create(struct if_clone *ifc, > > /* > * We are abusing params to create our second interface. > - * Actually we already created it and called if_clone_createif() > + * Actually we already created it and called if_clone_create() > * for it to do the official insertion procedure the moment we knew > * it cannot fail anymore. So just do attach it here. > */ > @@ -807,7 +805,7 @@ epair_clone_create(struct if_clone *ifc, > ifp = sca->ifp; > ifp->if_softc = sca; > strlcpy(ifp->if_xname, name, IFNAMSIZ); > - ifp->if_dname = ifc->ifc_name; > + ifp->if_dname = epairname; > ifp->if_dunit = unit; > ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; > ifp->if_capabilities = IFCAP_VLAN_MTU; > @@ -833,7 +831,7 @@ epair_clone_create(struct if_clone *ifc, > ifp = scb->ifp; > ifp->if_softc = scb; > strlcpy(ifp->if_xname, name, IFNAMSIZ); > - ifp->if_dname = ifc->ifc_name; > + ifp->if_dname = epairname; > ifp->if_dunit = unit; > ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; > ifp->if_capabilities = IFCAP_VLAN_MTU; > @@ -843,10 +841,10 @@ epair_clone_create(struct if_clone *ifc, > ifp->if_init = epair_init; > ifp->if_snd.ifq_maxlen = ifqmaxlen; > /* We need to play some tricks here for the second interface. */ > - strlcpy(name, EPAIRNAME, len); > + strlcpy(name, epairname, len); > error = if_clone_create(name, len, (caddr_t)scb); > if (error) > - panic("%s: if_clone_createif() for our 2nd iface failed: %d", > + panic("%s: if_clone_create() for our 2nd iface failed: %d", > __func__, error); > scb->if_qflush = ifp->if_qflush; > ifp->if_qflush = epair_qflush; > @@ -958,16 +956,17 @@ epair_modevent(module_t mod, int type, v > if (TUNABLE_INT_FETCH("net.link.epair.netisr_maxqlen", &qlimit)) > epair_nh.nh_qlimit = qlimit; > netisr_register(&epair_nh); > - if_clone_attach(&epair_cloner); > + epair_cloner = if_clone_advanced(epairname, 0, > + epair_clone_match, epair_clone_create, epair_clone_destroy); > if (bootverbose) > - printf("%s initialized.\n", EPAIRNAME); > + printf("%s initialized.\n", epairname); > break; > case MOD_UNLOAD: > - if_clone_detach(&epair_cloner); > + if_clone_detach(epair_cloner); > netisr_unregister(&epair_nh); > epair_dpcpu_detach(); > if (bootverbose) > - printf("%s unloaded.\n", EPAIRNAME); > + printf("%s unloaded.\n", epairname); > break; > default: > return (EOPNOTSUPP); > > Modified: head/sys/net/if_faith.c > ============================================================================== > --- head/sys/net/if_faith.c Tue Oct 16 13:27:20 2012 (r241609) > +++ head/sys/net/if_faith.c Tue Oct 16 13:37:54 2012 (r241610) > @@ -79,8 +79,6 @@ > #include > #endif > > -#define FAITHNAME "faith" > - > struct faith_softc { > struct ifnet *sc_ifp; > }; > @@ -95,12 +93,12 @@ static int faithprefix(struct in6_addr * > > static int faithmodevent(module_t, int, void *); > > -static MALLOC_DEFINE(M_FAITH, FAITHNAME, "Firewall Assisted Tunnel Interface"); > +static const char faithname[] = "faith"; > +static MALLOC_DEFINE(M_FAITH, faithname, "Firewall Assisted Tunnel Interface"); > > static int faith_clone_create(struct if_clone *, int, caddr_t); > static void faith_clone_destroy(struct ifnet *); > - > -IFC_SIMPLE_DECLARE(faith, 0); > +static struct if_clone *faith_cloner; > > #define FAITHMTU 1500 > > @@ -113,8 +111,8 @@ faithmodevent(mod, type, data) > > switch (type) { > case MOD_LOAD: > - if_clone_attach(&faith_cloner); > - > + faith_cloner = if_clone_simple(faithname, faith_clone_create, > + faith_clone_destroy, 0); > #ifdef INET6 > faithprefix_p = faithprefix; > #endif > @@ -125,7 +123,7 @@ faithmodevent(mod, type, data) > faithprefix_p = NULL; > #endif > > - if_clone_detach(&faith_cloner); > + if_clone_detach(faith_cloner); > break; > default: > return EOPNOTSUPP; > @@ -159,7 +157,7 @@ faith_clone_create(ifc, unit, params) > } > > ifp->if_softc = sc; > - if_initname(sc->sc_ifp, ifc->ifc_name, unit); > + if_initname(sc->sc_ifp, faithname, unit); > > ifp->if_mtu = FAITHMTU; > /* Change to BROADCAST experimentaly to announce its prefix. */ > > Modified: head/sys/net/if_gif.c > ============================================================================== > --- head/sys/net/if_gif.c Tue Oct 16 13:27:20 2012 (r241609) > +++ head/sys/net/if_gif.c Tue Oct 16 13:37:54 2012 (r241610) > @@ -88,7 +88,7 @@ > > #include > > -#define GIFNAME "gif" > +static const char gifname[] = "gif"; > > /* > * gif_mtx protects the global gif_softc_list. > @@ -106,8 +106,7 @@ void (*ng_gif_detach_p)(struct ifnet *if > static void gif_start(struct ifnet *); > static int gif_clone_create(struct if_clone *, int, caddr_t); > static void gif_clone_destroy(struct ifnet *); > - > -IFC_SIMPLE_DECLARE(gif, 0); > +static struct if_clone *gif_cloner; > > static int gifmodevent(module_t, int, void *); > > @@ -171,7 +170,7 @@ gif_clone_create(ifc, unit, params) > GIF_LOCK_INIT(sc); > > GIF2IFP(sc)->if_softc = sc; > - if_initname(GIF2IFP(sc), ifc->ifc_name, unit); > + if_initname(GIF2IFP(sc), gifname, unit); > > sc->encap_cookie4 = sc->encap_cookie6 = NULL; > sc->gif_options = GIF_ACCEPT_REVETHIP; > @@ -256,11 +255,12 @@ gifmodevent(mod, type, data) > switch (type) { > case MOD_LOAD: > mtx_init(&gif_mtx, "gif_mtx", NULL, MTX_DEF); > - if_clone_attach(&gif_cloner); > + gif_cloner = if_clone_simple(gifname, gif_clone_create, > + gif_clone_destroy, 0); > break; > > case MOD_UNLOAD: > - if_clone_detach(&gif_cloner); > + if_clone_detach(gif_cloner); > mtx_destroy(&gif_mtx); > break; > default: > > Modified: head/sys/net/if_gre.c > ============================================================================== > --- head/sys/net/if_gre.c Tue Oct 16 13:27:20 2012 (r241609) > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 17:31: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 B482BC35; Fri, 26 Oct 2012 17:31:36 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 81B948FC08; Fri, 26 Oct 2012 17:31: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 q9QHVaXP051632; Fri, 26 Oct 2012 17:31:36 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QHVamD051629; Fri, 26 Oct 2012 17:31:36 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201210261731.q9QHVamD051629@svn.freebsd.org> From: Andre Oppermann Date: Fri, 26 Oct 2012 17:31:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242151 - in head/sys: vm xen/evtchn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 17:31:36 -0000 Author: andre Date: Fri Oct 26 17:31:35 2012 New Revision: 242151 URL: http://svn.freebsd.org/changeset/base/242151 Log: Move the corresponding MTX_SYSINIT() next to their struct mtx declaration to make their relationship more obvious as done with the other such mutexs. Modified: head/sys/vm/vm_glue.c head/sys/xen/evtchn/evtchn.c Modified: head/sys/vm/vm_glue.c ============================================================================== --- head/sys/vm/vm_glue.c Fri Oct 26 17:02:50 2012 (r242150) +++ head/sys/vm/vm_glue.c Fri Oct 26 17:31:35 2012 (r242151) @@ -307,6 +307,8 @@ struct kstack_cache_entry *kstack_cache; static int kstack_cache_size = 128; static int kstacks; static struct mtx kstack_cache_mtx; +MTX_SYSINIT(kstack_cache, &kstack_cache_mtx, "kstkch", MTX_DEF); + SYSCTL_INT(_vm, OID_AUTO, kstack_cache_size, CTLFLAG_RW, &kstack_cache_size, 0, ""); SYSCTL_INT(_vm, OID_AUTO, kstacks, CTLFLAG_RD, &kstacks, 0, @@ -486,7 +488,6 @@ kstack_cache_init(void *nulll) EVENTHANDLER_PRI_ANY); } -MTX_SYSINIT(kstack_cache, &kstack_cache_mtx, "kstkch", MTX_DEF); SYSINIT(vm_kstacks, SI_SUB_KTHREAD_INIT, SI_ORDER_ANY, kstack_cache_init, NULL); #ifndef NO_SWAPPING Modified: head/sys/xen/evtchn/evtchn.c ============================================================================== --- head/sys/xen/evtchn/evtchn.c Fri Oct 26 17:02:50 2012 (r242150) +++ head/sys/xen/evtchn/evtchn.c Fri Oct 26 17:31:35 2012 (r242151) @@ -44,7 +44,15 @@ static inline unsigned long __ffs(unsign return word; } +/* + * irq_mapping_update_lock: in order to allow an interrupt to occur in a critical + * section, to set pcpu->ipending (etc...) properly, we + * must be able to get the icu lock, so it can't be + * under witness. + */ static struct mtx irq_mapping_update_lock; +MTX_SYSINIT(irq_mapping_update_lock, &irq_mapping_update_lock, "xp", MTX_SPIN); + static struct xenpic *xp; struct xenpic_intsrc { struct intsrc xp_intsrc; @@ -1130,11 +1138,4 @@ evtchn_init(void *dummy __unused) } SYSINIT(evtchn_init, SI_SUB_INTR, SI_ORDER_MIDDLE, evtchn_init, NULL); - /* - * irq_mapping_update_lock: in order to allow an interrupt to occur in a critical - * section, to set pcpu->ipending (etc...) properly, we - * must be able to get the icu lock, so it can't be - * under witness. - */ -MTX_SYSINIT(irq_mapping_update_lock, &irq_mapping_update_lock, "xp", MTX_SPIN); From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 17:51: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 EDBD6196; Fri, 26 Oct 2012 17:51:05 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C7FE58FC0C; Fri, 26 Oct 2012 17:51:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9QHp5sl055601; Fri, 26 Oct 2012 17:51:05 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QHp5VL055596; Fri, 26 Oct 2012 17:51:05 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201210261751.q9QHp5VL055596@svn.freebsd.org> From: Matthew D Fleming Date: Fri, 26 Oct 2012 17:51:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242152 - in head: lib/libmemstat sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 17:51:06 -0000 Author: mdf Date: Fri Oct 26 17:51:05 2012 New Revision: 242152 URL: http://svn.freebsd.org/changeset/base/242152 Log: Const-ify the zone name argument to uma_zcreate(9). MFC after: 3 days Modified: head/lib/libmemstat/memstat_uma.c head/sys/vm/uma.h head/sys/vm/uma_core.c head/sys/vm/uma_int.h Modified: head/lib/libmemstat/memstat_uma.c ============================================================================== --- head/lib/libmemstat/memstat_uma.c Fri Oct 26 17:31:35 2012 (r242151) +++ head/lib/libmemstat/memstat_uma.c Fri Oct 26 17:51:05 2012 (r242152) @@ -254,7 +254,7 @@ kread(kvm_t *kvm, void *kvm_pointer, voi } static int -kread_string(kvm_t *kvm, void *kvm_pointer, char *buffer, int buflen) +kread_string(kvm_t *kvm, const void *kvm_pointer, char *buffer, int buflen) { ssize_t ret; int i; Modified: head/sys/vm/uma.h ============================================================================== --- head/sys/vm/uma.h Fri Oct 26 17:31:35 2012 (r242151) +++ head/sys/vm/uma.h Fri Oct 26 17:51:05 2012 (r242152) @@ -165,9 +165,9 @@ typedef void (*uma_fini)(void *mem, int * A pointer to a structure which is intended to be opaque to users of * the interface. The value may be null if the wait flag is not set. */ -uma_zone_t uma_zcreate(char *name, size_t size, uma_ctor ctor, uma_dtor dtor, - uma_init uminit, uma_fini fini, int align, - u_int32_t flags); +uma_zone_t uma_zcreate(const char *name, size_t size, uma_ctor ctor, + uma_dtor dtor, uma_init uminit, uma_fini fini, + int align, u_int32_t flags); /* * Create a secondary uma zone Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Fri Oct 26 17:31:35 2012 (r242151) +++ head/sys/vm/uma_core.c Fri Oct 26 17:51:05 2012 (r242152) @@ -158,7 +158,7 @@ static struct callout uma_callout; * a special allocation function just for zones. */ struct uma_zctor_args { - char *name; + const char *name; size_t size; uma_ctor ctor; uma_dtor dtor; @@ -1828,7 +1828,7 @@ uma_set_align(int align) /* See uma.h */ uma_zone_t -uma_zcreate(char *name, size_t size, uma_ctor ctor, uma_dtor dtor, +uma_zcreate(const char *name, size_t size, uma_ctor ctor, uma_dtor dtor, uma_init uminit, uma_fini fini, int align, u_int32_t flags) { Modified: head/sys/vm/uma_int.h ============================================================================== --- head/sys/vm/uma_int.h Fri Oct 26 17:31:35 2012 (r242151) +++ head/sys/vm/uma_int.h Fri Oct 26 17:51:05 2012 (r242152) @@ -202,7 +202,7 @@ struct uma_keg { struct mtx uk_lock; /* Lock for the keg */ struct uma_hash uk_hash; - char *uk_name; /* Name of creating zone. */ + const char *uk_name; /* Name of creating zone. */ LIST_HEAD(,uma_zone) uk_zones; /* Keg's zones */ LIST_HEAD(,uma_slab) uk_part_slab; /* partially allocated slabs */ LIST_HEAD(,uma_slab) uk_free_slab; /* empty slab list */ @@ -305,7 +305,7 @@ typedef struct uma_klink *uma_klink_t; * */ struct uma_zone { - char *uz_name; /* Text name of the zone */ + const char *uz_name; /* Text name of the zone */ struct mtx *uz_lock; /* Lock for the zone (keg's lock) */ LIST_ENTRY(uma_zone) uz_link; /* List of all zones in keg */ From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 18:06: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 671238BE; Fri, 26 Oct 2012 18:06:50 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A8DC8FC12; Fri, 26 Oct 2012 18:06: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 q9QI6oWK059004; Fri, 26 Oct 2012 18:06:50 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QI6nJB058974; Fri, 26 Oct 2012 18:06:49 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201210261806.q9QI6nJB058974@svn.freebsd.org> From: "David E. O'Brien" Date: Fri, 26 Oct 2012 18:06:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242153 - stable/9/etc/rc.d X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 18:06:50 -0000 Author: obrien Date: Fri Oct 26 18:06:49 2012 New Revision: 242153 URL: http://svn.freebsd.org/changeset/base/242153 Log: MFC: r240336: Simply things so that "#REQUIRE: FILESYSTEMS" means the file systems are fully "ready to go". 'FILESYSTEMS' states: "This is a dummy dependency, for services which require file systems to be mounted before starting." However, we have 'var' which is was run after 'FILESYSTEMS' and can mount /var if it already isn't mounted. Furthermore, several scripts cannot use /var until 'cleanvar' has done its thing. Thus "FILESYSTEMS" hasn't really meant all critical file systems are fully usable. Modified: stable/9/etc/rc.d/FILESYSTEMS stable/9/etc/rc.d/addswap stable/9/etc/rc.d/amd stable/9/etc/rc.d/cleanvar stable/9/etc/rc.d/cron stable/9/etc/rc.d/dmesg stable/9/etc/rc.d/ftpd stable/9/etc/rc.d/inetd stable/9/etc/rc.d/ipmon stable/9/etc/rc.d/jail stable/9/etc/rc.d/ldconfig stable/9/etc/rc.d/mixer stable/9/etc/rc.d/mountcritremote stable/9/etc/rc.d/moused stable/9/etc/rc.d/mrouted stable/9/etc/rc.d/named stable/9/etc/rc.d/netif stable/9/etc/rc.d/newsyslog stable/9/etc/rc.d/ntpd stable/9/etc/rc.d/pflog stable/9/etc/rc.d/random stable/9/etc/rc.d/rarpd stable/9/etc/rc.d/resolv stable/9/etc/rc.d/sendmail stable/9/etc/rc.d/sshd stable/9/etc/rc.d/syslogd stable/9/etc/rc.d/var stable/9/etc/rc.d/watchdogd Directory Properties: stable/9/ (props changed) stable/9/etc/ (props changed) Modified: stable/9/etc/rc.d/FILESYSTEMS ============================================================================== --- stable/9/etc/rc.d/FILESYSTEMS Fri Oct 26 17:51:05 2012 (r242152) +++ stable/9/etc/rc.d/FILESYSTEMS Fri Oct 26 18:06:49 2012 (r242153) @@ -4,7 +4,7 @@ # # PROVIDE: FILESYSTEMS -# REQUIRE: root mountcritlocal zfs +# REQUIRE: root mountcritlocal cleanvar zfs # This is a dummy dependency, for services which require file systems # to be mounted before starting. It also serves as the default early / Modified: stable/9/etc/rc.d/addswap ============================================================================== --- stable/9/etc/rc.d/addswap Fri Oct 26 17:51:05 2012 (r242152) +++ stable/9/etc/rc.d/addswap Fri Oct 26 18:06:49 2012 (r242153) @@ -7,6 +7,7 @@ # PROVIDE: addswap # REQUIRE: FILESYSTEMS kld +# BEFORE: netif # KEYWORD: nojail . /etc/rc.subr Modified: stable/9/etc/rc.d/amd ============================================================================== --- stable/9/etc/rc.d/amd Fri Oct 26 17:51:05 2012 (r242152) +++ stable/9/etc/rc.d/amd Fri Oct 26 18:06:49 2012 (r242153) @@ -4,7 +4,7 @@ # # PROVIDE: amd -# REQUIRE: rpcbind ypset nfsclient cleanvar ldconfig +# REQUIRE: rpcbind ypset nfsclient FILESYSTEMS ldconfig # BEFORE: DAEMON # KEYWORD: nojail shutdown Modified: stable/9/etc/rc.d/cleanvar ============================================================================== --- stable/9/etc/rc.d/cleanvar Fri Oct 26 17:51:05 2012 (r242152) +++ stable/9/etc/rc.d/cleanvar Fri Oct 26 18:06:49 2012 (r242153) @@ -4,7 +4,7 @@ # # PROVIDE: cleanvar -# REQUIRE: FILESYSTEMS var +# REQUIRE: var . /etc/rc.subr Modified: stable/9/etc/rc.d/cron ============================================================================== --- stable/9/etc/rc.d/cron Fri Oct 26 17:51:05 2012 (r242152) +++ stable/9/etc/rc.d/cron Fri Oct 26 18:06:49 2012 (r242153) @@ -4,7 +4,7 @@ # # PROVIDE: cron -# REQUIRE: LOGIN cleanvar +# REQUIRE: LOGIN FILESYSTEMS # BEFORE: securelevel # KEYWORD: shutdown Modified: stable/9/etc/rc.d/dmesg ============================================================================== --- stable/9/etc/rc.d/dmesg Fri Oct 26 17:51:05 2012 (r242152) +++ stable/9/etc/rc.d/dmesg Fri Oct 26 18:06:49 2012 (r242153) @@ -4,7 +4,7 @@ # # PROVIDE: dmesg -# REQUIRE: mountcritremote cleanvar +# REQUIRE: mountcritremote FILESYSTEMS # BEFORE: DAEMON # KEYWORD: nojail Modified: stable/9/etc/rc.d/ftpd ============================================================================== --- stable/9/etc/rc.d/ftpd Fri Oct 26 17:51:05 2012 (r242152) +++ stable/9/etc/rc.d/ftpd Fri Oct 26 18:06:49 2012 (r242153) @@ -4,7 +4,7 @@ # # PROVIDE: ftpd -# REQUIRE: LOGIN cleanvar +# REQUIRE: LOGIN FILESYSTEMS # KEYWORD: shutdown . /etc/rc.subr Modified: stable/9/etc/rc.d/inetd ============================================================================== --- stable/9/etc/rc.d/inetd Fri Oct 26 17:51:05 2012 (r242152) +++ stable/9/etc/rc.d/inetd Fri Oct 26 18:06:49 2012 (r242153) @@ -4,7 +4,7 @@ # # PROVIDE: inetd -# REQUIRE: DAEMON LOGIN cleanvar +# REQUIRE: DAEMON LOGIN FILESYSTEMS # KEYWORD: shutdown . /etc/rc.subr Modified: stable/9/etc/rc.d/ipmon ============================================================================== --- stable/9/etc/rc.d/ipmon Fri Oct 26 17:51:05 2012 (r242152) +++ stable/9/etc/rc.d/ipmon Fri Oct 26 18:06:49 2012 (r242153) @@ -4,7 +4,7 @@ # # PROVIDE: ipmon -# REQUIRE: FILESYSTEMS hostname sysctl cleanvar ipfilter +# REQUIRE: FILESYSTEMS hostname sysctl FILESYSTEMS ipfilter # BEFORE: SERVERS # KEYWORD: nojail Modified: stable/9/etc/rc.d/jail ============================================================================== --- stable/9/etc/rc.d/jail Fri Oct 26 17:51:05 2012 (r242152) +++ stable/9/etc/rc.d/jail Fri Oct 26 18:06:49 2012 (r242153) @@ -4,7 +4,7 @@ # # PROVIDE: jail -# REQUIRE: LOGIN cleanvar +# REQUIRE: LOGIN FILESYSTEMS # BEFORE: securelevel # KEYWORD: nojail shutdown Modified: stable/9/etc/rc.d/ldconfig ============================================================================== --- stable/9/etc/rc.d/ldconfig Fri Oct 26 17:51:05 2012 (r242152) +++ stable/9/etc/rc.d/ldconfig Fri Oct 26 18:06:49 2012 (r242153) @@ -4,7 +4,7 @@ # # PROVIDE: ldconfig -# REQUIRE: mountcritremote cleanvar +# REQUIRE: mountcritremote FILESYSTEMS # BEFORE: DAEMON . /etc/rc.subr Modified: stable/9/etc/rc.d/mixer ============================================================================== --- stable/9/etc/rc.d/mixer Fri Oct 26 17:51:05 2012 (r242152) +++ stable/9/etc/rc.d/mixer Fri Oct 26 18:06:49 2012 (r242153) @@ -28,7 +28,7 @@ # # PROVIDE: mixer -# REQUIRE: cleanvar +# REQUIRE: FILESYSTEMS # KEYWORD: nojail shutdown . /etc/rc.subr Modified: stable/9/etc/rc.d/mountcritremote ============================================================================== --- stable/9/etc/rc.d/mountcritremote Fri Oct 26 17:51:05 2012 (r242152) +++ stable/9/etc/rc.d/mountcritremote Fri Oct 26 18:06:49 2012 (r242153) @@ -4,7 +4,7 @@ # # PROVIDE: mountcritremote -# REQUIRE: NETWORKING FILESYSTEMS cleanvar ipsec netwait +# REQUIRE: NETWORKING FILESYSTEMS ipsec netwait # KEYWORD: nojail . /etc/rc.subr Modified: stable/9/etc/rc.d/moused ============================================================================== --- stable/9/etc/rc.d/moused Fri Oct 26 17:51:05 2012 (r242152) +++ stable/9/etc/rc.d/moused Fri Oct 26 18:06:49 2012 (r242153) @@ -4,7 +4,7 @@ # # PROVIDE: moused -# REQUIRE: DAEMON cleanvar +# REQUIRE: DAEMON FILESYSTEMS # KEYWORD: nojail shutdown . /etc/rc.subr Modified: stable/9/etc/rc.d/mrouted ============================================================================== --- stable/9/etc/rc.d/mrouted Fri Oct 26 17:51:05 2012 (r242152) +++ stable/9/etc/rc.d/mrouted Fri Oct 26 18:06:49 2012 (r242153) @@ -4,7 +4,7 @@ # # PROVIDE: mrouted -# REQUIRE: netif routing cleanvar +# REQUIRE: netif routing FILESYSTEMS # KEYWORD: nojail . /etc/rc.subr Modified: stable/9/etc/rc.d/named ============================================================================== --- stable/9/etc/rc.d/named Fri Oct 26 17:51:05 2012 (r242152) +++ stable/9/etc/rc.d/named Fri Oct 26 18:06:49 2012 (r242153) @@ -4,7 +4,7 @@ # # PROVIDE: named -# REQUIRE: SERVERS cleanvar +# REQUIRE: SERVERS FILESYSTEMS # KEYWORD: shutdown . /etc/rc.subr Modified: stable/9/etc/rc.d/netif ============================================================================== --- stable/9/etc/rc.d/netif Fri Oct 26 17:51:05 2012 (r242152) +++ stable/9/etc/rc.d/netif Fri Oct 26 18:06:49 2012 (r242153) @@ -26,7 +26,7 @@ # # PROVIDE: netif -# REQUIRE: atm1 cleanvar FILESYSTEMS serial sppp sysctl +# REQUIRE: atm1 FILESYSTEMS serial sppp sysctl # REQUIRE: ipfilter ipfs # KEYWORD: nojail Modified: stable/9/etc/rc.d/newsyslog ============================================================================== --- stable/9/etc/rc.d/newsyslog Fri Oct 26 17:51:05 2012 (r242152) +++ stable/9/etc/rc.d/newsyslog Fri Oct 26 18:06:49 2012 (r242153) @@ -4,7 +4,7 @@ # # PROVIDE: newsyslog -# REQUIRE: cleanvar mountcritremote +# REQUIRE: FILESYSTEMS mountcritremote . /etc/rc.subr Modified: stable/9/etc/rc.d/ntpd ============================================================================== --- stable/9/etc/rc.d/ntpd Fri Oct 26 17:51:05 2012 (r242152) +++ stable/9/etc/rc.d/ntpd Fri Oct 26 18:06:49 2012 (r242153) @@ -4,7 +4,7 @@ # # PROVIDE: ntpd -# REQUIRE: DAEMON ntpdate cleanvar devfs +# REQUIRE: DAEMON ntpdate FILESYSTEMS devfs # BEFORE: LOGIN # KEYWORD: nojail shutdown Modified: stable/9/etc/rc.d/pflog ============================================================================== --- stable/9/etc/rc.d/pflog Fri Oct 26 17:51:05 2012 (r242152) +++ stable/9/etc/rc.d/pflog Fri Oct 26 18:06:49 2012 (r242153) @@ -4,7 +4,7 @@ # # PROVIDE: pflog -# REQUIRE: FILESYSTEMS netif cleanvar +# REQUIRE: FILESYSTEMS netif FILESYSTEMS # KEYWORD: nojail . /etc/rc.subr Modified: stable/9/etc/rc.d/random ============================================================================== --- stable/9/etc/rc.d/random Fri Oct 26 17:51:05 2012 (r242152) +++ stable/9/etc/rc.d/random Fri Oct 26 18:06:49 2012 (r242153) @@ -4,7 +4,7 @@ # # PROVIDE: random -# REQUIRE: var initrandom +# REQUIRE: initrandom FILESYSTEMS # BEFORE: netif # KEYWORD: nojail shutdown Modified: stable/9/etc/rc.d/rarpd ============================================================================== --- stable/9/etc/rc.d/rarpd Fri Oct 26 17:51:05 2012 (r242152) +++ stable/9/etc/rc.d/rarpd Fri Oct 26 18:06:49 2012 (r242153) @@ -4,7 +4,7 @@ # # PROVIDE: rarpd -# REQUIRE: DAEMON cleanvar +# REQUIRE: DAEMON FILESYSTEMS # BEFORE: LOGIN # KEYWORD: nojail Modified: stable/9/etc/rc.d/resolv ============================================================================== --- stable/9/etc/rc.d/resolv Fri Oct 26 17:51:05 2012 (r242152) +++ stable/9/etc/rc.d/resolv Fri Oct 26 18:06:49 2012 (r242153) @@ -28,7 +28,7 @@ # # PROVIDE: resolv -# REQUIRE: netif var +# REQUIRE: netif FILESYSTEMS # KEYWORD: nojail . /etc/rc.subr Modified: stable/9/etc/rc.d/sendmail ============================================================================== --- stable/9/etc/rc.d/sendmail Fri Oct 26 17:51:05 2012 (r242152) +++ stable/9/etc/rc.d/sendmail Fri Oct 26 18:06:49 2012 (r242153) @@ -4,7 +4,7 @@ # # PROVIDE: mail -# REQUIRE: LOGIN cleanvar +# REQUIRE: LOGIN FILESYSTEMS # we make mail start late, so that things like .forward's are not # processed until the system is fully operational # KEYWORD: shutdown Modified: stable/9/etc/rc.d/sshd ============================================================================== --- stable/9/etc/rc.d/sshd Fri Oct 26 17:51:05 2012 (r242152) +++ stable/9/etc/rc.d/sshd Fri Oct 26 18:06:49 2012 (r242153) @@ -4,7 +4,7 @@ # # PROVIDE: sshd -# REQUIRE: LOGIN cleanvar +# REQUIRE: LOGIN FILESYSTEMS # KEYWORD: shutdown . /etc/rc.subr Modified: stable/9/etc/rc.d/syslogd ============================================================================== --- stable/9/etc/rc.d/syslogd Fri Oct 26 17:51:05 2012 (r242152) +++ stable/9/etc/rc.d/syslogd Fri Oct 26 18:06:49 2012 (r242153) @@ -4,7 +4,7 @@ # # PROVIDE: syslogd -# REQUIRE: mountcritremote cleanvar newsyslog +# REQUIRE: mountcritremote FILESYSTEMS newsyslog # BEFORE: SERVERS . /etc/rc.subr Modified: stable/9/etc/rc.d/var ============================================================================== --- stable/9/etc/rc.d/var Fri Oct 26 17:51:05 2012 (r242152) +++ stable/9/etc/rc.d/var Fri Oct 26 18:06:49 2012 (r242153) @@ -28,7 +28,9 @@ # # PROVIDE: var -# REQUIRE: FILESYSTEMS kld addswap +# REQUIRE: mountcritlocal zfs + +# NFS /var is not supported, unless NFS /var is part of diskless NFS / . /etc/rc.subr Modified: stable/9/etc/rc.d/watchdogd ============================================================================== --- stable/9/etc/rc.d/watchdogd Fri Oct 26 17:51:05 2012 (r242152) +++ stable/9/etc/rc.d/watchdogd Fri Oct 26 18:06:49 2012 (r242153) @@ -28,7 +28,7 @@ # # PROVIDE: watchdogd -# REQUIRE: FILESYSTEMS cleanvar syslogd +# REQUIRE: FILESYSTEMS syslogd # KEYWORD: nojail shutdown . /etc/rc.subr From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 19:06: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 A9654913; Fri, 26 Oct 2012 19:06:25 +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 78C278FC0A; Fri, 26 Oct 2012 19: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 q9QJ6Pdp072189; Fri, 26 Oct 2012 19:06:25 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QJ6PpV072187; Fri, 26 Oct 2012 19:06:25 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201210261906.q9QJ6PpV072187@svn.freebsd.org> From: Adrian Chadd Date: Fri, 26 Oct 2012 19:06:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242154 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 19:06:25 -0000 Author: adrian Date: Fri Oct 26 19:06:24 2012 New Revision: 242154 URL: http://svn.freebsd.org/changeset/base/242154 Log: Allow net80211 to be built on -9 and -8. There are some people who use the -HEAD net80211 and wireless drivers on earlier FreeBSD versions in order to get the updated 802.11n support. The previous if_clone API changes broke this. Modified: head/sys/net80211/ieee80211_freebsd.c Modified: head/sys/net80211/ieee80211_freebsd.c ============================================================================== --- head/sys/net80211/ieee80211_freebsd.c Fri Oct 26 18:06:49 2012 (r242153) +++ head/sys/net80211/ieee80211_freebsd.c Fri Oct 26 19:06:24 2012 (r242154) @@ -65,9 +65,10 @@ SYSCTL_INT(_net_wlan, OID_AUTO, debug, C static MALLOC_DEFINE(M_80211_COM, "80211com", "802.11 com state"); +#if __FreeBSD_version >= 1000020 static const char wlanname[] = "wlan"; - static struct if_clone *wlan_cloner; +#endif /* * Allocate/free com structure in conjunction with ifnet; @@ -133,10 +134,19 @@ wlan_clone_create(struct if_clone *ifc, if_printf(ifp, "TDMA not supported\n"); return EOPNOTSUPP; } +#if __FreeBSD_version >= 1000020 vap = ic->ic_vap_create(ic, wlanname, unit, cp.icp_opmode, cp.icp_flags, cp.icp_bssid, cp.icp_flags & IEEE80211_CLONE_MACADDR ? cp.icp_macaddr : (const uint8_t *)IF_LLADDR(ifp)); +#else + vap = ic->ic_vap_create(ic, ifc->ifc_name, unit, + cp.icp_opmode, cp.icp_flags, cp.icp_bssid, + cp.icp_flags & IEEE80211_CLONE_MACADDR ? + cp.icp_macaddr : (const uint8_t *)IF_LLADDR(ifp)); + +#endif + return (vap == NULL ? EIO : 0); } @@ -149,11 +159,17 @@ wlan_clone_destroy(struct ifnet *ifp) ic->ic_vap_delete(vap); } +IFC_SIMPLE_DECLARE(wlan, 0); + void ieee80211_vap_destroy(struct ieee80211vap *vap) { CURVNET_SET(vap->iv_ifp->if_vnet); +#if __FreeBSD_version >= 1000020 if_clone_destroyif(wlan_cloner, vap->iv_ifp); +#else + if_clone_destroyif(&wlan_cloner, vap->iv_ifp); +#endif CURVNET_RESTORE(); } @@ -811,13 +827,21 @@ wlan_modevent(module_t mod, int type, vo EVENTHANDLER_DEREGISTER(bpf_track, wlan_bpfevent); return ENOMEM; } +#if __FreeBSD_version >= 1000020 wlan_cloner = if_clone_simple(wlanname, wlan_clone_create, wlan_clone_destroy, 0); +#else + if_clone_attach(&wlan_cloner); +#endif if_register_com_alloc(IFT_IEEE80211, wlan_alloc, wlan_free); return 0; case MOD_UNLOAD: if_deregister_com_alloc(IFT_IEEE80211); +#if __FreeBSD_version >= 1000020 if_clone_detach(wlan_cloner); +#else + if_clone_detach(&wlan_cloner); +#endif EVENTHANDLER_DEREGISTER(bpf_track, wlan_bpfevent); EVENTHANDLER_DEREGISTER(iflladdr_event, wlan_ifllevent); return 0; @@ -826,7 +850,11 @@ wlan_modevent(module_t mod, int type, vo } static moduledata_t wlan_mod = { +#if __FreeBSD_version >= 1000020 wlanname, +#else + "wlan", +#endif wlan_modevent, 0 }; From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 19:46: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 A9722EE8; Fri, 26 Oct 2012 19:46:55 +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 8DDAC8FC0C; Fri, 26 Oct 2012 19:46: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 q9QJkttr081023; Fri, 26 Oct 2012 19:46:55 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QJktbf081021; Fri, 26 Oct 2012 19:46:55 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201210261946.q9QJktbf081021@svn.freebsd.org> From: Adrian Chadd Date: Fri, 26 Oct 2012 19:46:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242155 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 19:46:55 -0000 Author: adrian Date: Fri Oct 26 19:46:55 2012 New Revision: 242155 URL: http://svn.freebsd.org/changeset/base/242155 Log: Oops, missed in my last commit. Modified: head/sys/net80211/ieee80211_freebsd.c Modified: head/sys/net80211/ieee80211_freebsd.c ============================================================================== --- head/sys/net80211/ieee80211_freebsd.c Fri Oct 26 19:06:24 2012 (r242154) +++ head/sys/net80211/ieee80211_freebsd.c Fri Oct 26 19:46:55 2012 (r242155) @@ -159,7 +159,9 @@ wlan_clone_destroy(struct ifnet *ifp) ic->ic_vap_delete(vap); } +#if __FreeBSD_version < 1000020 IFC_SIMPLE_DECLARE(wlan, 0); +#endif void ieee80211_vap_destroy(struct ieee80211vap *vap) From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 20:03: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 1AF1A40A; Fri, 26 Oct 2012 20:03: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 EC0F08FC0A; Fri, 26 Oct 2012 20:03: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 q9QK38GZ084464; Fri, 26 Oct 2012 20:03:08 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QK38uH084458; Fri, 26 Oct 2012 20:03:08 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210262003.q9QK38uH084458@svn.freebsd.org> From: Alexander Motin Date: Fri, 26 Oct 2012 20:03:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242156 - in head/sys/dev/ata: . chipsets X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 20:03:09 -0000 Author: mav Date: Fri Oct 26 20:03:08 2012 New Revision: 242156 URL: http://svn.freebsd.org/changeset/base/242156 Log: Implement CAM_ATAIO_NEEDRESULT (fetching full set of result registers) for ata(4) driver in ATA_CAM mode. That slighty improves error reporting and also should fix `smartctl -l scterc /dev/adaX` operation. MFC after: 3 weeks Modified: head/sys/dev/ata/ata-all.c head/sys/dev/ata/ata-all.h head/sys/dev/ata/ata-lowlevel.c head/sys/dev/ata/chipsets/ata-ahci.c head/sys/dev/ata/chipsets/ata-siliconimage.c Modified: head/sys/dev/ata/ata-all.c ============================================================================== --- head/sys/dev/ata/ata-all.c Fri Oct 26 19:46:55 2012 (r242155) +++ head/sys/dev/ata/ata-all.c Fri Oct 26 20:03:08 2012 (r242156) @@ -1492,6 +1492,8 @@ ata_cam_begin_transaction(device_t dev, request->u.ata.lba |= ((uint64_t)ccb->ataio.cmd.lba_high << 16) | ((uint64_t)ccb->ataio.cmd.lba_mid << 8) | (uint64_t)ccb->ataio.cmd.lba_low; + if (ccb->ataio.cmd.flags & CAM_ATAIO_NEEDRESULT) + request->flags |= ATA_R_NEEDRESULT; if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE && ccb->ataio.cmd.flags & CAM_ATAIO_DMA) request->flags |= ATA_R_DMA; Modified: head/sys/dev/ata/ata-all.h ============================================================================== --- head/sys/dev/ata/ata-all.h Fri Oct 26 19:46:55 2012 (r242155) +++ head/sys/dev/ata/ata-all.h Fri Oct 26 20:03:08 2012 (r242156) @@ -397,6 +397,7 @@ struct ata_request { #define ATA_R_REQUEUE 0x00000400 #define ATA_R_THREAD 0x00000800 #define ATA_R_DIRECT 0x00001000 +#define ATA_R_NEEDRESULT 0x00002000 #define ATA_R_ATAPI16 0x00010000 #define ATA_R_ATAPI_INTR 0x00020000 Modified: head/sys/dev/ata/ata-lowlevel.c ============================================================================== --- head/sys/dev/ata/ata-lowlevel.c Fri Oct 26 19:46:55 2012 (r242155) +++ head/sys/dev/ata/ata-lowlevel.c Fri Oct 26 20:03:08 2012 (r242156) @@ -116,6 +116,7 @@ ata_begin_transaction(struct ata_request } while (request->status & ATA_S_BUSY && timeout--); if (request->status & ATA_S_ERROR) request->error = ATA_IDX_INB(ch, ATA_ERROR); + ch->hw.tf_read(request); goto begin_finished; } @@ -253,8 +254,9 @@ ata_end_transaction(struct ata_request * if (request->flags & ATA_R_TIMEOUT) goto end_finished; - /* on control commands read back registers to the request struct */ - if (request->flags & ATA_R_CONTROL) { + /* Read back registers to the request struct. */ + if ((request->status & ATA_S_ERROR) || + (request->flags & (ATA_R_CONTROL | ATA_R_NEEDRESULT))) { ch->hw.tf_read(request); } @@ -332,6 +334,12 @@ ata_end_transaction(struct ata_request * else if (!(request->flags & ATA_R_TIMEOUT)) request->donecount = request->bytecount; + /* Read back registers to the request struct. */ + if ((request->status & ATA_S_ERROR) || + (request->flags & (ATA_R_CONTROL | ATA_R_NEEDRESULT))) { + ch->hw.tf_read(request); + } + /* release SG list etc */ ch->dma.unload(request); Modified: head/sys/dev/ata/chipsets/ata-ahci.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-ahci.c Fri Oct 26 19:46:55 2012 (r242155) +++ head/sys/dev/ata/chipsets/ata-ahci.c Fri Oct 26 20:03:08 2012 (r242156) @@ -555,8 +555,10 @@ ata_ahci_end_transaction(struct ata_requ if (request->status & ATA_S_ERROR) request->error = tf_data >> 8; - /* on control commands read back registers to the request struct */ - if (request->flags & ATA_R_CONTROL) { + /* Read back registers to the request struct. */ + if ((request->flags & ATA_R_ATAPI) == 0 && + ((request->status & ATA_S_ERROR) || + (request->flags & (ATA_R_CONTROL | ATA_R_NEEDRESULT)))) { u_int8_t *fis = ch->dma.work + ATA_AHCI_FB_OFFSET + 0x40; request->u.ata.count = fis[12] | ((u_int16_t)fis[13] << 8); Modified: head/sys/dev/ata/chipsets/ata-siliconimage.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-siliconimage.c Fri Oct 26 19:46:55 2012 (r242155) +++ head/sys/dev/ata/chipsets/ata-siliconimage.c Fri Oct 26 20:03:08 2012 (r242156) @@ -658,8 +658,10 @@ ata_siiprb_end_transaction(struct ata_re } } - /* on control commands read back registers to the request struct */ - if (request->flags & ATA_R_CONTROL) { + /* Read back registers to the request struct. */ + if ((request->flags & ATA_R_ATAPI) == 0 && + ((request->status & ATA_S_ERROR) || + (request->flags & (ATA_R_CONTROL | ATA_R_NEEDRESULT)))) { request->u.ata.count = prb->fis[12] | ((u_int16_t)prb->fis[13] << 8); request->u.ata.lba = prb->fis[4] | ((u_int64_t)prb->fis[5] << 8) | ((u_int64_t)prb->fis[6] << 16); From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 20:14: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 2AE05ABB; Fri, 26 Oct 2012 20:14:41 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0FCFB8FC08; Fri, 26 Oct 2012 20:14: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 q9QKEefB087097; Fri, 26 Oct 2012 20:14:40 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QKEe93087094; Fri, 26 Oct 2012 20:14:40 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201210262014.q9QKEe93087094@svn.freebsd.org> From: "David E. O'Brien" Date: Fri, 26 Oct 2012 20:14:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242157 - head/tools/regression/filemon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 20:14:41 -0000 Author: obrien Date: Fri Oct 26 20:14:40 2012 New Revision: 242157 URL: http://svn.freebsd.org/changeset/base/242157 Log: Test both active and non-active cases. Modified: head/tools/regression/filemon/Makefile Modified: head/tools/regression/filemon/Makefile ============================================================================== --- head/tools/regression/filemon/Makefile Fri Oct 26 20:03:08 2012 (r242156) +++ head/tools/regression/filemon/Makefile Fri Oct 26 20:14:40 2012 (r242157) @@ -21,7 +21,11 @@ CLEANFILES+= ${BINS} tests: bins kldstat | grep filemon ${MAKE} test + @echo "Without filemon(4) active:" ./timed-forkb + @echo "With filemon(4) active:" + script -f typescript-timed-forkb ./timed-forkb + ls -l typescript-timed-forkb.filemon @echo "filemon(4) tests passed." # Cannot use .OBJDIR -- 'filemontest' expects 'test_script.sh' in . @@ -40,7 +44,11 @@ test: filemontest clean-test grep -q -v '\.[0-9][0-9][0-9][0-9][0-9][0-9]$$' || echo "Time stamp format OK" .endfor +CLEANFILES+= typescript-timed-forkb typescript-timed-forkb.filemon + clean-test: cd ${.CURDIR} ; rm -f filemon_log.* +clean-tests: clean-test + .include From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 20:23: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 A1617E9A for ; Fri, 26 Oct 2012 20:23:48 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by mx1.freebsd.org (Postfix) with ESMTP id 5D9D28FC0C for ; Fri, 26 Oct 2012 20:23:48 +0000 (UTC) Received: by mail-pa0-f54.google.com with SMTP id bi1so2309128pad.13 for ; Fri, 26 Oct 2012 13:23:47 -0700 (PDT) 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=cutt/jHt0On46akyHudWJnzLstk2FbWpejr8cGzgkU4=; b=X4KV22GLdTzQOpB9nUzCMIYnB9pfRSLSBTR29xIBJUwY6QqCgTcPsQsxPEJHQXulH8 YSlLcmDSFd1bwxXunR6LPkiPxcJVAuwzjSFGqpsQ6o0gub+oKHJ++MQdKuAkoqCX0Osl VrZmsILifCGXmlbWKbpIH7PGV1Mo0wejqnExI= 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:cc:content-type :x-gm-message-state; bh=cutt/jHt0On46akyHudWJnzLstk2FbWpejr8cGzgkU4=; b=CW0EzZ2y+m3/QXUZuVNCLpnz0mzN9zkx2TjoLX0trMz/dul145qPbImUReX2P/kSsy zApevQ8XwmIClfQxYjo5uTgYC2PSYOgNPht4bn9zSL094l9k/yCbZLMr3oef9SRoAqXP 4/AFm+vtiJpVvZiyqjYSW/CfJ7oJx7HTqcO8T4DF0ODqOat3+H1SvrZ6+ggu2uWT0j4z DhQgdJpU8xBXbmbu1c6GvK88i7B87Va/xsMwRctLX5cjdBPn+odkuhqI900/rK7y142M VUmuNwA4mCV2WdRskyI8NEtGypFEQpi5qPFvq9c2WU8GwWWJ74FgU95j4ae0ZJjSlT86 Juaw== Received: by 10.66.73.225 with SMTP id o1mr13245234pav.70.1351283027737; Fri, 26 Oct 2012 13:23:47 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.66.161.163 with HTTP; Fri, 26 Oct 2012 13:23:17 -0700 (PDT) In-Reply-To: <508A97DB.3080105@FreeBSD.org> References: <201210260250.q9Q2oH8P005136__18925.7027851001$1351219846$gmane$org@svn.freebsd.org> <1TRk6h-000L25-0p@internal.tormail.org> <508A97DB.3080105@FreeBSD.org> From: Eitan Adler Date: Fri, 26 Oct 2012 16:23:17 -0400 X-Google-Sender-Auth: QDVltK80UHrzkkBscvARdfjTLoM Message-ID: Subject: Re: svn commit: r242120 - head/usr.sbin/cpucontrol To: Dimitry Andric Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQkzyvAxYT3/YdMcp/rg673Qhm7kQZ/bp8l8Q6++Aky/Pnnqiacol9A4tpxnFozYvIie5ZWl Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Jan Beich X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 20:23:48 -0000 On 26 October 2012 10:02, Dimitry Andric wrote: > Yes, on x86, you can safely turn off the -Wcast-align warnings, if it is > easier. It is probably not worth the trouble to go through the code and > fix the alignment issues, if it will never be run on alignment-sensitive > architectures. Oh joy, I'll remember to test "universe on clang; universe on gcc" next time. :( -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 20:24: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 D681772; Fri, 26 Oct 2012 20:24:13 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE0AA8FC16; Fri, 26 Oct 2012 20:24: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 q9QKODv8091703; Fri, 26 Oct 2012 20:24:13 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QKODkm091701; Fri, 26 Oct 2012 20:24:13 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201210262024.q9QKODkm091701@svn.freebsd.org> From: "David E. O'Brien" Date: Fri, 26 Oct 2012 20:24:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242158 - head/sys/dev/filemon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 20:24:13 -0000 Author: obrien Date: Fri Oct 26 20:24:13 2012 New Revision: 242158 URL: http://svn.freebsd.org/changeset/base/242158 Log: A little bit easier to read. Modified: head/sys/dev/filemon/filemon.c Modified: head/sys/dev/filemon/filemon.c ============================================================================== --- head/sys/dev/filemon/filemon.c Fri Oct 26 20:14:40 2012 (r242157) +++ head/sys/dev/filemon/filemon.c Fri Oct 26 20:24:13 2012 (r242158) @@ -136,6 +136,12 @@ filemon_dtr(void *data) } } +#if __FreeBSD_version < 900041 +#define FGET_WRITE(a1, a2, a3) fget_write((a1), (a2), (a3)) +#else +#define FGET_WRITE(a1, a2, a3) fget_write((a1), (a2), CAP_WRITE | CAP_SEEK, (a3)) +#endif + static int filemon_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag __unused, struct thread *td) @@ -148,11 +154,6 @@ filemon_ioctl(struct cdev *dev, u_long c switch (cmd) { /* Set the output file descriptor. */ case FILEMON_SET_FD: -#if __FreeBSD_version < 900041 -#define FGET_WRITE(a1, a2, a3) fget_write((a1), (a2), (a3)) -#else -#define FGET_WRITE(a1, a2, a3) fget_write((a1), (a2), CAP_WRITE | CAP_SEEK, (a3)) -#endif if ((error = FGET_WRITE(td, *(int *)data, &filemon->fp)) == 0) /* Write the file header. */ filemon_comment(filemon); @@ -160,7 +161,7 @@ filemon_ioctl(struct cdev *dev, u_long c /* Set the monitored process ID. */ case FILEMON_SET_PID: - filemon->pid = *((pid_t *) data); + filemon->pid = *((pid_t *)data); break; default: From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 20:25: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 1086B3D3; Fri, 26 Oct 2012 20:25: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 EC4448FC1C; Fri, 26 Oct 2012 20:25:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9QKP50S091941; Fri, 26 Oct 2012 20:25:05 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QKP5HG091939; Fri, 26 Oct 2012 20:25:05 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210262025.q9QKP5HG091939@svn.freebsd.org> From: Eitan Adler Date: Fri, 26 Oct 2012 20:25:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242159 - head/usr.sbin/cpucontrol X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 20:25:06 -0000 Author: eadler Date: Fri Oct 26 20:25:05 2012 New Revision: 242159 URL: http://svn.freebsd.org/changeset/base/242159 Log: While 'make universe' passed this didn't work with clang. This reverts r242120 Submitted by: Jan Beich Approved by: cperciva (implicit) Modified: head/usr.sbin/cpucontrol/Makefile Modified: head/usr.sbin/cpucontrol/Makefile ============================================================================== --- head/usr.sbin/cpucontrol/Makefile Fri Oct 26 20:24:13 2012 (r242158) +++ head/usr.sbin/cpucontrol/Makefile Fri Oct 26 20:25:05 2012 (r242159) @@ -4,4 +4,6 @@ PROG= cpucontrol MAN= cpucontrol.8 SRCS= cpucontrol.c intel.c amd.c via.c +NO_WCAST_ALIGN= + .include From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 20:43: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 299C37F1; Fri, 26 Oct 2012 20:43:31 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 105358FC16; Fri, 26 Oct 2012 20:43: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 q9QKhUv6095877; Fri, 26 Oct 2012 20:43:30 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QKhUr3095875; Fri, 26 Oct 2012 20:43:30 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201210262043.q9QKhUr3095875@svn.freebsd.org> From: Warner Losh Date: Fri, 26 Oct 2012 20:43:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242160 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 20:43:31 -0000 Author: imp Date: Fri Oct 26 20:43:30 2012 New Revision: 242160 URL: http://svn.freebsd.org/changeset/base/242160 Log: Siba, in theory, is a architecturally neutral bus, so place it in files. It used to be in files.mips before the clean-room rewrite and really doesn't belong there. If we need to grow arch specific code, we can move it into $ARCH/$ACH/siba_machdep.c. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri Oct 26 20:25:05 2012 (r242159) +++ head/sys/conf/files Fri Oct 26 20:43:30 2012 (r242160) @@ -1940,8 +1940,11 @@ dev/si/si3_t225.c optional si dev/si/si_eisa.c optional si eisa dev/si/si_isa.c optional si isa dev/si/si_pci.c optional si pci +dev/siba/siba.c optional siba dev/siba/siba_bwn.c optional siba_bwn pci -dev/siba/siba_core.c optional siba_bwn pci +dev/siba/siba_cc.c optional siba +dev/siba/siba_core.c optional siba | siba_bwn pci +dev/siba/siba_pcib.c optional siba pci dev/siis/siis.c optional siis pci dev/sis/if_sis.c optional sis pci dev/sk/if_sk.c optional sk pci From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 21:06: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 7BFDA161; Fri, 26 Oct 2012 21:06:34 +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 62A348FC0A; Fri, 26 Oct 2012 21:06: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 q9QL6YOd000951; Fri, 26 Oct 2012 21:06:34 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QL6YgY000943; Fri, 26 Oct 2012 21:06:34 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210262106.q9QL6YgY000943@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 26 Oct 2012 21:06:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242161 - in head/sys: net netinet netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 21:06:34 -0000 Author: glebius Date: Fri Oct 26 21:06:33 2012 New Revision: 242161 URL: http://svn.freebsd.org/changeset/base/242161 Log: o Remove last argument to ip_fragment(), and obtain all needed information on checksums directly from mbuf flags. This simplifies code. o Clear CSUM_IP from the mbuf in ip_fragment() if we did checksums in hardware. Some driver may not announce CSUM_IP in theur if_hwassist, although try to do checksums if CSUM_IP set on mbuf. Example is em(4). o While here, consistently use CSUM_IP instead of its alias CSUM_DELAY_IP. After this change CSUM_DELAY_IP vanishes from the stack. Submitted by: Sebastian Kuzminsky Modified: head/sys/net/if_bridge.c head/sys/netinet/ip_fastfwd.c head/sys/netinet/ip_mroute.c head/sys/netinet/ip_output.c head/sys/netinet/ip_var.h head/sys/netpfil/pf/pf.c Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Fri Oct 26 20:43:30 2012 (r242160) +++ head/sys/net/if_bridge.c Fri Oct 26 21:06:33 2012 (r242161) @@ -3379,8 +3379,8 @@ bridge_fragment(struct ifnet *ifp, struc goto out; ip = mtod(m, struct ip *); - error = ip_fragment(ip, &m, ifp->if_mtu, ifp->if_hwassist, - CSUM_DELAY_IP); + m->m_pkthdr.csum_flags |= CSUM_IP; + error = ip_fragment(ip, &m, ifp->if_mtu, ifp->if_hwassist); if (error) goto out; Modified: head/sys/netinet/ip_fastfwd.c ============================================================================== --- head/sys/netinet/ip_fastfwd.c Fri Oct 26 20:43:30 2012 (r242160) +++ head/sys/netinet/ip_fastfwd.c Fri Oct 26 21:06:33 2012 (r242161) @@ -542,10 +542,8 @@ passout: * We have to fragment the packet */ m->m_pkthdr.csum_flags |= CSUM_IP; - if (ip_fragment(ip, &m, mtu, ifp->if_hwassist, - (~ifp->if_hwassist & CSUM_DELAY_IP))) { + if (ip_fragment(ip, &m, mtu, ifp->if_hwassist)) goto drop; - } KASSERT(m != NULL, ("null mbuf and no error")); /* * Send off the fragments via outgoing interface Modified: head/sys/netinet/ip_mroute.c ============================================================================== --- head/sys/netinet/ip_mroute.c Fri Oct 26 20:43:30 2012 (r242160) +++ head/sys/netinet/ip_mroute.c Fri Oct 26 21:06:33 2012 (r242161) @@ -2404,7 +2404,8 @@ pim_register_prepare(struct ip *ip, stru ip->ip_sum = in_cksum(mb_copy, ip->ip_hl << 2); } else { /* Fragment the packet */ - if (ip_fragment(ip, &mb_copy, mtu, 0, CSUM_DELAY_IP) != 0) { + mb_copy->m_pkthdr.csum_flags |= CSUM_IP; + if (ip_fragment(ip, &mb_copy, mtu, 0) != 0) { m_freem(mb_copy); return NULL; } Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Fri Oct 26 20:43:30 2012 (r242160) +++ head/sys/netinet/ip_output.c Fri Oct 26 21:06:33 2012 (r242161) @@ -125,7 +125,7 @@ ip_output(struct mbuf *m, struct mbuf *o struct sockaddr_in *dst; struct in_ifaddr *ia; int isbroadcast; - uint16_t ip_len, ip_off, sw_csum; + uint16_t ip_len, ip_off; struct route iproute; struct rtentry *rte; /* cache for ro->ro_rt */ struct in_addr odst; @@ -583,18 +583,16 @@ passout: } m->m_pkthdr.csum_flags |= CSUM_IP; - sw_csum = m->m_pkthdr.csum_flags & ~ifp->if_hwassist; - if (sw_csum & CSUM_DELAY_DATA) { + if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA & ~ifp->if_hwassist) { in_delayed_cksum(m); - sw_csum &= ~CSUM_DELAY_DATA; + m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; } #ifdef SCTP - if (sw_csum & CSUM_SCTP) { + if (m->m_pkthdr.csum_flags & CSUM_SCTP & ~ifp->if_hwassist) { sctp_delayed_cksum(m, (uint32_t)(ip->ip_hl << 2)); - sw_csum &= ~CSUM_SCTP; + m->m_pkthdr.csum_flags &= ~CSUM_SCTP; } #endif - m->m_pkthdr.csum_flags &= ifp->if_hwassist; /* * If small enough for interface, or the interface will take @@ -604,8 +602,10 @@ passout: (m->m_pkthdr.csum_flags & ifp->if_hwassist & CSUM_TSO) != 0 || ((ip_off & IP_DF) == 0 && (ifp->if_hwassist & CSUM_FRAGMENT))) { ip->ip_sum = 0; - if (sw_csum & CSUM_DELAY_IP) + if (m->m_pkthdr.csum_flags & CSUM_IP & ~ifp->if_hwassist) { ip->ip_sum = in_cksum(m, hlen); + m->m_pkthdr.csum_flags &= ~CSUM_IP; + } /* * Record statistics for this interface address. @@ -646,7 +646,7 @@ passout: * Too large for interface; fragment if possible. If successful, * on return, m will point to a list of packets to be sent. */ - error = ip_fragment(ip, &m, mtu, ifp->if_hwassist, sw_csum); + error = ip_fragment(ip, &m, mtu, ifp->if_hwassist); if (error) goto bad; for (; m; m = m0) { @@ -691,11 +691,10 @@ bad: * chain of fragments that should be freed by the caller. * * if_hwassist_flags is the hw offload capabilities (see if_data.ifi_hwassist) - * sw_csum contains the delayed checksums flags (e.g., CSUM_DELAY_IP). */ int ip_fragment(struct ip *ip, struct mbuf **m_frag, int mtu, - u_long if_hwassist_flags, int sw_csum) + u_long if_hwassist_flags) { int error = 0; int hlen = ip->ip_hl << 2; @@ -833,8 +832,10 @@ smart_frag_failure: m->m_pkthdr.csum_flags = m0->m_pkthdr.csum_flags; mhip->ip_off = htons(mhip->ip_off); mhip->ip_sum = 0; - if (sw_csum & CSUM_DELAY_IP) + if (m->m_pkthdr.csum_flags & CSUM_IP & ~if_hwassist_flags) { mhip->ip_sum = in_cksum(m, mhlen); + m->m_pkthdr.csum_flags &= ~CSUM_IP; + } *mnext = m; mnext = &m->m_nextpkt; } @@ -853,8 +854,10 @@ smart_frag_failure: ip->ip_len = htons((u_short)m0->m_pkthdr.len); ip->ip_off = htons(ip_off | IP_MF); ip->ip_sum = 0; - if (sw_csum & CSUM_DELAY_IP) + if (m0->m_pkthdr.csum_flags & CSUM_IP & ~if_hwassist_flags) { ip->ip_sum = in_cksum(m0, hlen); + m0->m_pkthdr.csum_flags &= ~CSUM_IP; + } done: *m_frag = m0; Modified: head/sys/netinet/ip_var.h ============================================================================== --- head/sys/netinet/ip_var.h Fri Oct 26 20:43:30 2012 (r242160) +++ head/sys/netinet/ip_var.h Fri Oct 26 21:06:33 2012 (r242161) @@ -210,7 +210,7 @@ int inp_setmoptions(struct inpcb *, stru int ip_ctloutput(struct socket *, struct sockopt *sopt); void ip_drain(void); int ip_fragment(struct ip *ip, struct mbuf **m_frag, int mtu, - u_long if_hwassist_flags, int sw_csum); + u_long if_hwassist_flags); void ip_forward(struct mbuf *m, int srcrt); void ip_init(void); #ifdef VIMAGE Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Fri Oct 26 20:43:30 2012 (r242160) +++ head/sys/netpfil/pf/pf.c Fri Oct 26 21:06:33 2012 (r242161) @@ -5140,7 +5140,7 @@ pf_route(struct mbuf **m, struct pf_rule struct pf_addr naddr; struct pf_src_node *sn = NULL; int error = 0; - uint16_t ip_len, ip_off, sw_csum; + uint16_t ip_len, ip_off; KASSERT(m && *m && r && oifp, ("%s: invalid parameters", __func__)); KASSERT(dir == PF_IN || dir == PF_OUT, ("%s: invalid direction", @@ -5240,18 +5240,16 @@ pf_route(struct mbuf **m, struct pf_rule /* Copied from FreeBSD 10.0-CURRENT ip_output. */ m0->m_pkthdr.csum_flags |= CSUM_IP; - sw_csum = m0->m_pkthdr.csum_flags & ~ifp->if_hwassist; - if (sw_csum & CSUM_DELAY_DATA) { + if (m0->m_pkthdr.csum_flags & CSUM_DELAY_DATA & ~ifp->if_hwassist) { in_delayed_cksum(m0); - sw_csum &= ~CSUM_DELAY_DATA; + m0->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; } #ifdef SCTP - if (sw_csum & CSUM_SCTP) { + if (m0->m_pkthdr.csum_flags & CSUM_SCTP & ~ifp->if_hwassist) { sctp_delayed_cksum(m, (uint32_t)(ip->ip_hl << 2)); - sw_csum &= ~CSUM_SCTP; + m0->m_pkthdr.csum_flags &= ~CSUM_SCTP; } #endif - m0->m_pkthdr.csum_flags &= ifp->if_hwassist; /* * If small enough for interface, or the interface will take @@ -5261,8 +5259,10 @@ pf_route(struct mbuf **m, struct pf_rule (m0->m_pkthdr.csum_flags & ifp->if_hwassist & CSUM_TSO) != 0 || ((ip_off & IP_DF) == 0 && (ifp->if_hwassist & CSUM_FRAGMENT))) { ip->ip_sum = 0; - if (sw_csum & CSUM_DELAY_IP) + if (m0->m_pkthdr.csum_flags & CSUM_IP & ~ifp->if_hwassist) { ip->ip_sum = in_cksum(m0, ip->ip_hl << 2); + m0->m_pkthdr.csum_flags &= ~CSUM_IP; + } m0->m_flags &= ~(M_PROTOFLAGS); error = (*ifp->if_output)(ifp, m0, sintosa(&dst), NULL); goto done; @@ -5280,7 +5280,7 @@ pf_route(struct mbuf **m, struct pf_rule goto bad; } - error = ip_fragment(ip, &m0, ifp->if_mtu, ifp->if_hwassist, sw_csum); + error = ip_fragment(ip, &m0, ifp->if_mtu, ifp->if_hwassist); if (error) goto bad; From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 21: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 4A43253D; Fri, 26 Oct 2012 21:25:11 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3264B8FC08; Fri, 26 Oct 2012 21: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 q9QLPBoB005040; Fri, 26 Oct 2012 21:25:11 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9QLPAu9005038; Fri, 26 Oct 2012 21:25:10 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201210262125.q9QLPAu9005038@svn.freebsd.org> From: Warner Losh Date: Fri, 26 Oct 2012 21:25:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242162 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 21:25:11 -0000 Author: imp Date: Fri Oct 26 21:25:10 2012 New Revision: 242162 URL: http://svn.freebsd.org/changeset/base/242162 Log: stack_machdep.c is dependent on ddb or stack options, not standard. Modified: head/sys/conf/files.mips Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Fri Oct 26 21:06:33 2012 (r242161) +++ head/sys/conf/files.mips Fri Oct 26 21:25:10 2012 (r242162) @@ -33,7 +33,7 @@ mips/mips/pm_machdep.c standard mips/mips/pmap.c standard mips/mips/ptrace_machdep.c standard mips/mips/sc_machdep.c standard -mips/mips/stack_machdep.c standard +mips/mips/stack_machdep.c optional ddb | stack mips/mips/support.S standard mips/mips/swtch.S standard mips/mips/sys_machdep.c standard From owner-svn-src-all@FreeBSD.ORG Fri Oct 26 23:50: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 D0D745C9; Fri, 26 Oct 2012 23:50:49 +0000 (UTC) (envelope-from brian@awfulhak.org) Received: from idcmail-mo1so.shaw.ca (idcmail-mo1so.shaw.ca [24.71.223.10]) by mx1.freebsd.org (Postfix) with ESMTP id 493E88FC08; Fri, 26 Oct 2012 23:50:48 +0000 (UTC) Received: from pd2ml1so-ssvc.prod.shaw.ca ([10.0.141.139]) by pd3mo1so-svcs.prod.shaw.ca with ESMTP; 26 Oct 2012 17:50:48 -0600 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=lMXy1fBCObW/TGCEpyiX83m3mzeH2bqjICxJXDiWie4= c=1 sm=1 a=wom5GMh1gUkA:10 a=gyNmXv_Ll5gA:10 a=dBRESv0yCI8A:10 a=BLceEmwcHowA:10 a=Jvqgub9IZPV2TmRqH1mFPg==:17 a=6I5d2MoRAAAA:8 a=MMwg4So0AAAA:8 a=8C10p_537-_vUS6M4xUA:9 a=CjuIK1q_8ugA:10 a=SV7veod9ZcQA:10 a=WJ3hkfHDukgA:10 a=RYNqSDtogUxve4PkrLQA:9 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Received: from unknown (HELO gw.Awfulhak.org) ([174.7.169.46]) by pd2ml1so-dmz.prod.shaw.ca with ESMTP; 26 Oct 2012 17:50:47 -0600 Received: from thong.lan.Awfulhak.org (thong.lan.Awfulhak.org [172.16.0.31]) by gw.Awfulhak.org (8.14.5/8.14.5) with ESMTP id q9QNoj1T015470 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 26 Oct 2012 16:50:45 -0700 (PDT) (envelope-from brian@lan.Awfulhak.org) Received: from thong.lan.Awfulhak.org (localhost [127.0.0.1]) by thong.lan.Awfulhak.org (8.14.5/8.14.5) with ESMTP id q9QNojNd077695; Fri, 26 Oct 2012 16:50:45 -0700 (PDT) (envelope-from brian@thong.lan.Awfulhak.org) Received: (from brian@localhost) by thong.lan.Awfulhak.org (8.14.5/8.14.5/Submit) id q9QNoiZg077694; Fri, 26 Oct 2012 16:50:44 -0700 (PDT) (envelope-from brian) Date: Fri, 26 Oct 2012 16:50:44 -0700 From: Brian Somers To: Hiroki Sato Subject: Re: svn commit: r242074 - head/etc/rc.d Message-ID: <20121026235044.GA77528@thong.lan.Awfulhak.org> References: <50892486.9030201@FreeBSD.org> <20121025.210007.176692667026768547.hrs@allbsd.org> <20121025171827.GA59432@thong.lan.Awfulhak.org> <20121026.035215.1799343372729116466.hrs@allbsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HlL+5n6rz5pIUxbD" Content-Disposition: inline In-Reply-To: <20121026.035215.1799343372729116466.hrs@allbsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-1.7 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gw.lan.Awfulhak.org Cc: svn-src-head@FreeBSD.org, dim@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, brian@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 26 Oct 2012 23:50:49 -0000 --HlL+5n6rz5pIUxbD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 26, 2012 at 03:52:15AM +0900, Hiroki Sato wrote: > Brian Somers wrote > in <20121025171827.GA59432@thong.lan.Awfulhak.org>: >=20 > br> After upgrading from 8-STABLE to 9-STABLE on Monday, IPv6 routing > br> advertisments were broken. Disabling accept (enabling send) appeared > br> to be necessary to get things up and running. > br> > br> As you say, net.inet6.ip6.accept_rtadv is set to zero (off, meaning > br> that we *can* send advertisments), so I don't now what the issue > br> is. Irrespective of this, I think it's useful to explicitly set > br> the interface to be able to send advertisments when running rtadvd > br> - just in case the sysctl is set to 1 elsewhere. > br> > br> Doing an "ifconfig inet6 accept_rtadv" after boot doesn't > br> seem to disable sending advertisments, so I'm finding it difficult > br> to test this remotely... testing is awkward when I'm not at home > br> as this machine is also suffering from the "can't reboot" issue!! > br> > br> I'll look into why the sysctl doesn't seem to behave as expected > br> when I get home this evening. >=20 > In 9.X and later the meaning of net.inet6.ip6.accept_rtadv has been > changed and the flag for whether receiving RAs or not is now in a > per-IF basis. 9.0R release note says the following: >=20 > | The sysctl(8) variable net.inet6.ip6.accept_rtadv has been > | changed. It was a system-wide configuration knob which controlled > | whether the system accepts ICMPv6 Router Advertisement messages or > | not. In FreeBSD 9.0-RELEASE, this knob is converted into a > | per-interface inet6 accept_rtadv ifconfig(8) option. Although the > | sysctl(8) variable is available still in FreeBSD 9.0-RELEASE, it > | now controls whether the per-interface option is set by default or > | not. The default value is 0 (not accept the RA messages). >=20 > So, by default RAs can be sent on any interface even if setting > net.inet6.ip6.accept_rtadv=3D1 manually after a boot because no > accept_rtadv per-IF flag is set. I guess this was a source of the > confusion. I am not sure why setting accept_rtadv flag on an > interface did not prevent from sending RAs in your case. It is not > an intended behavior. If it is reproducible, please let me know. >=20 > The release notes explains more details of IPv6 configuration > migration from 8.X to 9.X. When I reboot and don't use -accept_rtadv (and leave net.inet6.ip6.accept_rtadv set to zero), I repeatedly see this in /var/log/messages: Oct 26 16:31:26 gw rtadvd[2879]: non-zero lifetime RA on RA receiving inter= face sk0. Ignored. Oct 26 16:31:33 gw rtadvd[2879]: non-zero lifetime RA on RA receiving inter= face bridge0. Ignored. Oct 26 16:31:42 gw rtadvd[2879]: non-zero lifetime RA on RA receiving inter= face sk0. Ignored. Oct 26 16:31:49 gw rtadvd[2879]: non-zero lifetime RA on RA receiving inter= face bridge0. Ignored. This seems to be the problem. Because check_accept_rtadv() (in rtadvd) reports the interface as being able to accept RAs (it finds the ND6_IFF_ACCEPT_RTADV flag), it drops outgoing RAs and nothing happens. --=20 Brian Somers Don't _EVER_ lose your sense of humour ! --HlL+5n6rz5pIUxbD Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQCVAwUBUIsh1A7tvOdmanQhAQKGagP/dGQE8cEkxdBNH6XeHmzlXN1NpGBTfiI3 hRLS3hrf/KGKaYLuXlBPjOceO/3p/coe0lxoKqoIeuCtjS52cl49EhJFF+v6yxZn wtkf/waQri+s/X8YUkat1wjpO2fTOAvKzQlG4LPI9pZl1GbndJ+bvqS4cmImIIzg y5uQerh8pcc= =cUbP -----END PGP SIGNATURE----- --HlL+5n6rz5pIUxbD-- From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 01:20: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 3603A1CB; Sat, 27 Oct 2012 01:20: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 12FA38FC18; Sat, 27 Oct 2012 01:20: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 q9R1KmCa051329; Sat, 27 Oct 2012 01:20:48 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9R1Km1i051308; Sat, 27 Oct 2012 01:20:48 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210270120.q9R1Km1i051308@svn.freebsd.org> From: Eitan Adler Date: Sat, 27 Oct 2012 01:20:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242164 - in stable/8: libexec/tftpd sbin/ccdconfig sbin/restore usr.bin/lock usr.bin/msgs usr.bin/wall usr.sbin/edquota usr.sbin/kgmon X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 01:20:49 -0000 Author: eadler Date: Sat Oct 27 01:20:48 2012 New Revision: 242164 URL: http://svn.freebsd.org/changeset/base/242164 Log: MFC r241848: Check the return error of set[e][ug]id. While this can never fail in the current version of FreeBSD, this isn't guarenteed by the API. Custom security modules, or future implementations of the setuid and setgid may fail. Approved by: cperciva (implicit) Modified: stable/8/libexec/tftpd/tftpd.c stable/8/sbin/ccdconfig/ccdconfig.c stable/8/sbin/restore/tape.c stable/8/usr.bin/lock/lock.c stable/8/usr.bin/msgs/msgs.c stable/8/usr.bin/wall/wall.c stable/8/usr.sbin/edquota/edquota.c stable/8/usr.sbin/kgmon/kgmon.c Directory Properties: stable/8/libexec/tftpd/ (props changed) stable/8/sbin/ccdconfig/ (props changed) stable/8/sbin/restore/ (props changed) stable/8/usr.bin/lock/ (props changed) stable/8/usr.bin/msgs/ (props changed) stable/8/usr.bin/wall/ (props changed) stable/8/usr.sbin/edquota/ (props changed) stable/8/usr.sbin/kgmon/ (props changed) Modified: stable/8/libexec/tftpd/tftpd.c ============================================================================== --- stable/8/libexec/tftpd/tftpd.c Fri Oct 26 22:32:26 2012 (r242163) +++ stable/8/libexec/tftpd/tftpd.c Sat Oct 27 01:20:48 2012 (r242164) @@ -371,7 +371,10 @@ main(int argc, char *argv[]) } chdir("/"); setgroups(1, &nobody->pw_gid); - setuid(nobody->pw_uid); + if (setuid(nobody->pw_uid) != 0) { + tftp_log(LOG_ERR, "setuid failed"); + exit(1); + } } len = sizeof(me_sock); Modified: stable/8/sbin/ccdconfig/ccdconfig.c ============================================================================== --- stable/8/sbin/ccdconfig/ccdconfig.c Fri Oct 26 22:32:26 2012 (r242163) +++ stable/8/sbin/ccdconfig/ccdconfig.c Sat Oct 27 01:20:48 2012 (r242164) @@ -289,13 +289,16 @@ do_all(int action) rval = 0; egid = getegid(); - setegid(getgid()); + if (setegid(getgid()) != 0) + err(1, "setegid failed"); if ((f = fopen(ccdconf, "r")) == NULL) { - setegid(egid); + if (setegid(egid) != 0) + err(1, "setegid failed"); warn("fopen: %s", ccdconf); return (1); } - setegid(egid); + if (setegid(egid) != 0) + err(1, "setegid failed"); while (fgets(line, sizeof(line), f) != NULL) { argc = 0; Modified: stable/8/sbin/restore/tape.c ============================================================================== --- stable/8/sbin/restore/tape.c Fri Oct 26 22:32:26 2012 (r242163) +++ stable/8/sbin/restore/tape.c Sat Oct 27 01:20:48 2012 (r242164) @@ -164,7 +164,11 @@ setinput(char *source, int ispipecommand } pipein++; } - setuid(getuid()); /* no longer need or want root privileges */ + /* no longer need or want root privileges */ + if (setuid(getuid()) != 0) { + fprintf(stderr, "setuid failed\n"); + done(1); + } magtape = strdup(source); if (magtape == NULL) { fprintf(stderr, "Cannot allocate space for magtape buffer\n"); Modified: stable/8/usr.bin/lock/lock.c ============================================================================== --- stable/8/usr.bin/lock/lock.c Fri Oct 26 22:32:26 2012 (r242163) +++ stable/8/usr.bin/lock/lock.c Sat Oct 27 01:20:48 2012 (r242164) @@ -132,7 +132,9 @@ main(int argc, char **argv) } timeout.tv_sec = sectimeout * 60; - setuid(getuid()); /* discard privs */ + /* discard privs */ + if (setuid(getuid()) != 0) + errx(1, "setuid failed"); if (tcgetattr(0, &tty)) /* get information for header */ exit(1); Modified: stable/8/usr.bin/msgs/msgs.c ============================================================================== --- stable/8/usr.bin/msgs/msgs.c Fri Oct 26 22:32:26 2012 (r242163) +++ stable/8/usr.bin/msgs/msgs.c Sat Oct 27 01:20:48 2012 (r242164) @@ -179,7 +179,8 @@ main(int argc, char *argv[]) setlocale(LC_ALL, ""); time(&t); - setuid(uid = getuid()); + if (setuid(uid = getuid()) != 0) + err(1, "setuid failed"); ruptible = (signal(SIGINT, SIG_IGN) == SIG_DFL); if (ruptible) signal(SIGINT, SIG_DFL); Modified: stable/8/usr.bin/wall/wall.c ============================================================================== --- stable/8/usr.bin/wall/wall.c Fri Oct 26 22:32:26 2012 (r242163) +++ stable/8/usr.bin/wall/wall.c Sat Oct 27 01:20:48 2012 (r242164) @@ -249,7 +249,8 @@ makemsg(char *fname) setegid(getgid()); if (freopen(fname, "r", stdin) == NULL) err(1, "can't read %s", fname); - setegid(egid); + if (setegid(egid) != 0) + err(1, "setegid failed"); } cnt = 0; while (fgets(lbuf, sizeof(lbuf), stdin)) { Modified: stable/8/usr.sbin/edquota/edquota.c ============================================================================== --- stable/8/usr.sbin/edquota/edquota.c Fri Oct 26 22:32:26 2012 (r242163) +++ stable/8/usr.sbin/edquota/edquota.c Sat Oct 27 01:20:48 2012 (r242164) @@ -515,8 +515,10 @@ editit(char *tmpf) const char *ed; sigsetmask(omask); - setgid(getgid()); - setuid(getuid()); + if (setgid(getgid()) != 0) + err(1, "setgid failed"); + if (setuid(getuid()) != 0) + err(1, "setuid failed"); if ((ed = getenv("EDITOR")) == (char *)0) ed = _PATH_VI; execlp(ed, ed, tmpf, (char *)0); Modified: stable/8/usr.sbin/kgmon/kgmon.c ============================================================================== --- stable/8/usr.sbin/kgmon/kgmon.c Fri Oct 26 22:32:26 2012 (r242163) +++ stable/8/usr.sbin/kgmon/kgmon.c Sat Oct 27 01:20:48 2012 (r242164) @@ -90,7 +90,9 @@ main(int argc, char **argv) struct kvmvars kvmvars; char *system, *kmemf; - seteuid(getuid()); + if (seteuid(getuid()) != 0) { + err(1, "seteuid failed\n"); + } kmemf = NULL; system = NULL; while ((ch = getopt(argc, argv, "M:N:Bbhpr")) != -1) { From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 01:20: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 613FA1CC; Sat, 27 Oct 2012 01:20: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 3E8308FC19; Sat, 27 Oct 2012 01:20: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 q9R1KnJL051342; Sat, 27 Oct 2012 01:20:49 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9R1Kmh2051327; Sat, 27 Oct 2012 01:20:48 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210270120.q9R1Kmh2051327@svn.freebsd.org> From: Eitan Adler Date: Sat, 27 Oct 2012 01:20:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r242165 - in stable/7: libexec/tftpd sbin/ccdconfig sbin/restore usr.bin/lock usr.bin/msgs usr.bin/wall usr.sbin/edquota usr.sbin/kgmon X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 01:20:49 -0000 Author: eadler Date: Sat Oct 27 01:20:48 2012 New Revision: 242165 URL: http://svn.freebsd.org/changeset/base/242165 Log: MFC r241848: Check the return error of set[e][ug]id. While this can never fail in the current version of FreeBSD, this isn't guarenteed by the API. Custom security modules, or future implementations of the setuid and setgid may fail. Approved by: cperciva (implicit) Modified: stable/7/libexec/tftpd/tftpd.c stable/7/sbin/ccdconfig/ccdconfig.c stable/7/sbin/restore/tape.c stable/7/usr.bin/lock/lock.c stable/7/usr.bin/msgs/msgs.c stable/7/usr.bin/wall/wall.c stable/7/usr.sbin/edquota/edquota.c stable/7/usr.sbin/kgmon/kgmon.c Directory Properties: stable/7/libexec/tftpd/ (props changed) stable/7/sbin/ccdconfig/ (props changed) stable/7/sbin/restore/ (props changed) stable/7/usr.bin/lock/ (props changed) stable/7/usr.bin/msgs/ (props changed) stable/7/usr.bin/wall/ (props changed) stable/7/usr.sbin/edquota/ (props changed) stable/7/usr.sbin/kgmon/ (props changed) Modified: stable/7/libexec/tftpd/tftpd.c ============================================================================== --- stable/7/libexec/tftpd/tftpd.c Sat Oct 27 01:20:48 2012 (r242164) +++ stable/7/libexec/tftpd/tftpd.c Sat Oct 27 01:20:48 2012 (r242165) @@ -371,7 +371,10 @@ main(int argc, char *argv[]) } chdir("/"); setgroups(1, &nobody->pw_gid); - setuid(nobody->pw_uid); + if (setuid(nobody->pw_uid) != 0) { + tftp_log(LOG_ERR, "setuid failed"); + exit(1); + } } len = sizeof(me_sock); Modified: stable/7/sbin/ccdconfig/ccdconfig.c ============================================================================== --- stable/7/sbin/ccdconfig/ccdconfig.c Sat Oct 27 01:20:48 2012 (r242164) +++ stable/7/sbin/ccdconfig/ccdconfig.c Sat Oct 27 01:20:48 2012 (r242165) @@ -289,13 +289,16 @@ do_all(int action) rval = 0; egid = getegid(); - setegid(getgid()); + if (setegid(getgid()) != 0) + err(1, "setegid failed"); if ((f = fopen(ccdconf, "r")) == NULL) { - setegid(egid); + if (setegid(egid) != 0) + err(1, "setegid failed"); warn("fopen: %s", ccdconf); return (1); } - setegid(egid); + if (setegid(egid) != 0) + err(1, "setegid failed"); while (fgets(line, sizeof(line), f) != NULL) { argc = 0; Modified: stable/7/sbin/restore/tape.c ============================================================================== --- stable/7/sbin/restore/tape.c Sat Oct 27 01:20:48 2012 (r242164) +++ stable/7/sbin/restore/tape.c Sat Oct 27 01:20:48 2012 (r242165) @@ -164,7 +164,11 @@ setinput(char *source, int ispipecommand } pipein++; } - setuid(getuid()); /* no longer need or want root privileges */ + /* no longer need or want root privileges */ + if (setuid(getuid()) != 0) { + fprintf(stderr, "setuid failed\n"); + done(1); + } magtape = strdup(source); if (magtape == NULL) { fprintf(stderr, "Cannot allocate space for magtape buffer\n"); Modified: stable/7/usr.bin/lock/lock.c ============================================================================== --- stable/7/usr.bin/lock/lock.c Sat Oct 27 01:20:48 2012 (r242164) +++ stable/7/usr.bin/lock/lock.c Sat Oct 27 01:20:48 2012 (r242165) @@ -130,7 +130,9 @@ main(int argc, char **argv) } timeout.tv_sec = sectimeout * 60; - setuid(getuid()); /* discard privs */ + /* discard privs */ + if (setuid(getuid()) != 0) + errx(1, "setuid failed"); if (tcgetattr(0, &tty)) /* get information for header */ exit(1); Modified: stable/7/usr.bin/msgs/msgs.c ============================================================================== --- stable/7/usr.bin/msgs/msgs.c Sat Oct 27 01:20:48 2012 (r242164) +++ stable/7/usr.bin/msgs/msgs.c Sat Oct 27 01:20:48 2012 (r242165) @@ -178,7 +178,8 @@ main(int argc, char *argv[]) setlocale(LC_ALL, ""); time(&t); - setuid(uid = getuid()); + if (setuid(uid = getuid()) != 0) + err(1, "setuid failed"); ruptible = (signal(SIGINT, SIG_IGN) == SIG_DFL); if (ruptible) signal(SIGINT, SIG_DFL); Modified: stable/7/usr.bin/wall/wall.c ============================================================================== --- stable/7/usr.bin/wall/wall.c Sat Oct 27 01:20:48 2012 (r242164) +++ stable/7/usr.bin/wall/wall.c Sat Oct 27 01:20:48 2012 (r242165) @@ -249,7 +249,8 @@ makemsg(char *fname) setegid(getgid()); if (freopen(fname, "r", stdin) == NULL) err(1, "can't read %s", fname); - setegid(egid); + if (setegid(egid) != 0) + err(1, "setegid failed"); } cnt = 0; while (fgets(lbuf, sizeof(lbuf), stdin)) { Modified: stable/7/usr.sbin/edquota/edquota.c ============================================================================== --- stable/7/usr.sbin/edquota/edquota.c Sat Oct 27 01:20:48 2012 (r242164) +++ stable/7/usr.sbin/edquota/edquota.c Sat Oct 27 01:20:48 2012 (r242165) @@ -524,8 +524,10 @@ editit(tmpf) register const char *ed; sigsetmask(omask); - setgid(getgid()); - setuid(getuid()); + if (setgid(getgid()) != 0) + err(1, "setgid failed"); + if (setuid(getuid()) != 0) + err(1, "setuid failed"); if ((ed = getenv("EDITOR")) == (char *)0) ed = _PATH_VI; execlp(ed, ed, tmpf, (char *)0); Modified: stable/7/usr.sbin/kgmon/kgmon.c ============================================================================== --- stable/7/usr.sbin/kgmon/kgmon.c Sat Oct 27 01:20:48 2012 (r242164) +++ stable/7/usr.sbin/kgmon/kgmon.c Sat Oct 27 01:20:48 2012 (r242165) @@ -90,7 +90,9 @@ main(int argc, char **argv) struct kvmvars kvmvars; char *system, *kmemf; - seteuid(getuid()); + if (seteuid(getuid()) != 0) { + err(1, "seteuid failed\n"); + } kmemf = NULL; system = NULL; while ((ch = getopt(argc, argv, "M:N:Bbhpr")) != -1) { From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 01:20: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 825B91CF; Sat, 27 Oct 2012 01:20: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 606EB8FC1A; Sat, 27 Oct 2012 01:20: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 q9R1Knco051350; Sat, 27 Oct 2012 01:20:49 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9R1Knc4051338; Sat, 27 Oct 2012 01:20:49 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210270120.q9R1Knc4051338@svn.freebsd.org> From: Eitan Adler Date: Sat, 27 Oct 2012 01:20:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242166 - in stable/9: libexec/tftpd sbin/ccdconfig sbin/restore usr.bin/lock usr.bin/msgs usr.bin/wall usr.sbin/edquota usr.sbin/kgmon X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 01:20:49 -0000 Author: eadler Date: Sat Oct 27 01:20:48 2012 New Revision: 242166 URL: http://svn.freebsd.org/changeset/base/242166 Log: MFC r241848: Check the return error of set[e][ug]id. While this can never fail in the current version of FreeBSD, this isn't guarenteed by the API. Custom security modules, or future implementations of the setuid and setgid may fail. Approved by: cperciva (implicit) Modified: stable/9/libexec/tftpd/tftpd.c stable/9/sbin/ccdconfig/ccdconfig.c stable/9/sbin/restore/tape.c stable/9/usr.bin/lock/lock.c stable/9/usr.bin/msgs/msgs.c stable/9/usr.bin/wall/wall.c stable/9/usr.sbin/edquota/edquota.c stable/9/usr.sbin/kgmon/kgmon.c Directory Properties: stable/9/libexec/tftpd/ (props changed) stable/9/sbin/ccdconfig/ (props changed) stable/9/sbin/restore/ (props changed) stable/9/usr.bin/lock/ (props changed) stable/9/usr.bin/msgs/ (props changed) stable/9/usr.bin/wall/ (props changed) stable/9/usr.sbin/edquota/ (props changed) stable/9/usr.sbin/kgmon/ (props changed) stable/9/usr.sbin/lpr/ (props changed) Modified: stable/9/libexec/tftpd/tftpd.c ============================================================================== --- stable/9/libexec/tftpd/tftpd.c Sat Oct 27 01:20:48 2012 (r242165) +++ stable/9/libexec/tftpd/tftpd.c Sat Oct 27 01:20:48 2012 (r242166) @@ -371,7 +371,10 @@ main(int argc, char *argv[]) } chdir("/"); setgroups(1, &nobody->pw_gid); - setuid(nobody->pw_uid); + if (setuid(nobody->pw_uid) != 0) { + tftp_log(LOG_ERR, "setuid failed"); + exit(1); + } } len = sizeof(me_sock); Modified: stable/9/sbin/ccdconfig/ccdconfig.c ============================================================================== --- stable/9/sbin/ccdconfig/ccdconfig.c Sat Oct 27 01:20:48 2012 (r242165) +++ stable/9/sbin/ccdconfig/ccdconfig.c Sat Oct 27 01:20:48 2012 (r242166) @@ -288,13 +288,16 @@ do_all(int action) rval = 0; egid = getegid(); - setegid(getgid()); + if (setegid(getgid()) != 0) + err(1, "setegid failed"); if ((f = fopen(ccdconf, "r")) == NULL) { - setegid(egid); + if (setegid(egid) != 0) + err(1, "setegid failed"); warn("fopen: %s", ccdconf); return (1); } - setegid(egid); + if (setegid(egid) != 0) + err(1, "setegid failed"); while (fgets(line, sizeof(line), f) != NULL) { argc = 0; Modified: stable/9/sbin/restore/tape.c ============================================================================== --- stable/9/sbin/restore/tape.c Sat Oct 27 01:20:48 2012 (r242165) +++ stable/9/sbin/restore/tape.c Sat Oct 27 01:20:48 2012 (r242166) @@ -164,7 +164,11 @@ setinput(char *source, int ispipecommand } pipein++; } - setuid(getuid()); /* no longer need or want root privileges */ + /* no longer need or want root privileges */ + if (setuid(getuid()) != 0) { + fprintf(stderr, "setuid failed\n"); + done(1); + } magtape = strdup(source); if (magtape == NULL) { fprintf(stderr, "Cannot allocate space for magtape buffer\n"); Modified: stable/9/usr.bin/lock/lock.c ============================================================================== --- stable/9/usr.bin/lock/lock.c Sat Oct 27 01:20:48 2012 (r242165) +++ stable/9/usr.bin/lock/lock.c Sat Oct 27 01:20:48 2012 (r242166) @@ -129,7 +129,9 @@ main(int argc, char **argv) } timeout.tv_sec = sectimeout * 60; - setuid(getuid()); /* discard privs */ + /* discard privs */ + if (setuid(getuid()) != 0) + errx(1, "setuid failed"); if (tcgetattr(0, &tty)) /* get information for header */ exit(1); Modified: stable/9/usr.bin/msgs/msgs.c ============================================================================== --- stable/9/usr.bin/msgs/msgs.c Sat Oct 27 01:20:48 2012 (r242165) +++ stable/9/usr.bin/msgs/msgs.c Sat Oct 27 01:20:48 2012 (r242166) @@ -175,7 +175,8 @@ main(int argc, char *argv[]) setlocale(LC_ALL, ""); time(&t); - setuid(uid = getuid()); + if (setuid(uid = getuid()) != 0) + err(1, "setuid failed"); ruptible = (signal(SIGINT, SIG_IGN) == SIG_DFL); if (ruptible) signal(SIGINT, SIG_DFL); Modified: stable/9/usr.bin/wall/wall.c ============================================================================== --- stable/9/usr.bin/wall/wall.c Sat Oct 27 01:20:48 2012 (r242165) +++ stable/9/usr.bin/wall/wall.c Sat Oct 27 01:20:48 2012 (r242166) @@ -240,7 +240,8 @@ makemsg(char *fname) setegid(getgid()); if (freopen(fname, "r", stdin) == NULL) err(1, "can't read %s", fname); - setegid(egid); + if (setegid(egid) != 0) + err(1, "setegid failed"); } cnt = 0; while (fgetws(lbuf, sizeof(lbuf)/sizeof(wchar_t), stdin)) { Modified: stable/9/usr.sbin/edquota/edquota.c ============================================================================== --- stable/9/usr.sbin/edquota/edquota.c Sat Oct 27 01:20:48 2012 (r242165) +++ stable/9/usr.sbin/edquota/edquota.c Sat Oct 27 01:20:48 2012 (r242166) @@ -453,8 +453,10 @@ editit(char *tmpf) const char *ed; sigsetmask(omask); - setgid(getgid()); - setuid(getuid()); + if (setgid(getgid()) != 0) + err(1, "setgid failed"); + if (setuid(getuid()) != 0) + err(1, "setuid failed"); if ((ed = getenv("EDITOR")) == (char *)0) ed = _PATH_VI; execlp(ed, ed, tmpf, (char *)0); Modified: stable/9/usr.sbin/kgmon/kgmon.c ============================================================================== --- stable/9/usr.sbin/kgmon/kgmon.c Sat Oct 27 01:20:48 2012 (r242165) +++ stable/9/usr.sbin/kgmon/kgmon.c Sat Oct 27 01:20:48 2012 (r242166) @@ -90,7 +90,9 @@ main(int argc, char **argv) struct kvmvars kvmvars; char *system, *kmemf; - seteuid(getuid()); + if (seteuid(getuid()) != 0) { + err(1, "seteuid failed\n"); + } kmemf = NULL; system = NULL; while ((ch = getopt(argc, argv, "M:N:Bbhpr")) != -1) { From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 01:24: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 C22417E8; Sat, 27 Oct 2012 01:24:25 +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 A979A8FC14; Sat, 27 Oct 2012 01:24: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 q9R1OPE1052045; Sat, 27 Oct 2012 01:24:25 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9R1OP4H052035; Sat, 27 Oct 2012 01:24:25 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210270124.q9R1OP4H052035@svn.freebsd.org> From: Eitan Adler Date: Sat, 27 Oct 2012 01:24:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242167 - stable/8/sys/cam/ata X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 01:24:25 -0000 Author: eadler Date: Sat Oct 27 01:24:24 2012 New Revision: 242167 URL: http://svn.freebsd.org/changeset/base/242167 Log: MFC r241784: Adds 4K quirks for the some SSD's which all perform better when 4K aligned and only except 4K deletes (TRIM). PR: kern/169974 Approved by: cperciva (implicit) Modified: stable/8/sys/cam/ata/ata_da.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cam/ (props changed) Modified: stable/8/sys/cam/ata/ata_da.c ============================================================================== --- stable/8/sys/cam/ata/ata_da.c Sat Oct 27 01:20:48 2012 (r242166) +++ stable/8/sys/cam/ata/ata_da.c Sat Oct 27 01:24:24 2012 (r242167) @@ -269,6 +269,116 @@ static struct ada_quirk_entry ada_quirk_ /*quirks*/ADA_Q_4K }, { + /* + * Corsair Force 2 SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + * Submitted by: Steven Hartland + * PR: 169974 + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "Corsair CSSD-F*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* + * Corsair Force 3 SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + * Submitted by: Steven Hartland + * PR: 169974 + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "Corsair Force 3*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* + * OCZ Agility 3 SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + * Submitted by: Steven Hartland + * PR: 169974 + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "OCZ-AGILITY3*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* + * OCZ Vertex 2 SSDs (inc pro series) + * 4k optimised & trim only works in 4k requests + 4k aligned + * Submitted by: Steven Hartland + * PR: 169974 + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "OCZ?VERTEX2*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* + * OCZ Vertex 3 SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + * Submitted by: Steven Hartland + * PR: 169974 + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "OCZ-VERTEX3*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* + * SuperTalent TeraDrive CT SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + * Submitted by: Steven Hartland + * PR: 169974 + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "FTM??CT25H*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* + * Crucial RealSSD C300 SSDs + * 4k optimised + * Submitted by: Steven Hartland + * PR: 169974 + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "C300-CTFDDAC???MAG*", + "*" }, /*quirks*/ADA_Q_4K + }, + { + /* + * XceedIOPS SATA SSDs + * 4k optimised + * Submitted by: Steven Hartland + * PR: 169974 + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "SG9XCS2D*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* + * Intel 330 Series SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + * Submitted by: Steven Hartland + * PR: 169974 + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "INTEL SSDSC2ct*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* + * OCZ Deneva R Series SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + * Submitted by: Steven Hartland + * PR: 169974 + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "DENRSTE251M45*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* + * Kingston HyperX 3k SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + * Submitted by: Steven Hartland + * PR: 169974 + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "KINGSTON SH103S3*", "*" }, + /*quirks*/ADA_Q_4K + }, + { /* Default */ { T_ANY, SIP_MEDIA_REMOVABLE|SIP_MEDIA_FIXED, From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 01:24: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 E84E57E9; Sat, 27 Oct 2012 01:24:25 +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 CF8FD8FC16; Sat, 27 Oct 2012 01:24: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 q9R1OPiK052051; Sat, 27 Oct 2012 01:24:25 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9R1OPSO052047; Sat, 27 Oct 2012 01:24:25 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210270124.q9R1OPSO052047@svn.freebsd.org> From: Eitan Adler Date: Sat, 27 Oct 2012 01:24:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242168 - stable/9/sys/cam/ata X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 01:24:26 -0000 Author: eadler Date: Sat Oct 27 01:24:25 2012 New Revision: 242168 URL: http://svn.freebsd.org/changeset/base/242168 Log: MFC r241784: Adds 4K quirks for the some SSD's which all perform better when 4K aligned and only except 4K deletes (TRIM). PR: kern/169974 Approved by: cperciva (implicit) Modified: stable/9/sys/cam/ata/ata_da.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ata/ata_da.c ============================================================================== --- stable/9/sys/cam/ata/ata_da.c Sat Oct 27 01:24:24 2012 (r242167) +++ stable/9/sys/cam/ata/ata_da.c Sat Oct 27 01:24:25 2012 (r242168) @@ -269,6 +269,116 @@ static struct ada_quirk_entry ada_quirk_ /*quirks*/ADA_Q_4K }, { + /* + * Corsair Force 2 SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + * Submitted by: Steven Hartland + * PR: 169974 + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "Corsair CSSD-F*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* + * Corsair Force 3 SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + * Submitted by: Steven Hartland + * PR: 169974 + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "Corsair Force 3*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* + * OCZ Agility 3 SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + * Submitted by: Steven Hartland + * PR: 169974 + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "OCZ-AGILITY3*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* + * OCZ Vertex 2 SSDs (inc pro series) + * 4k optimised & trim only works in 4k requests + 4k aligned + * Submitted by: Steven Hartland + * PR: 169974 + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "OCZ?VERTEX2*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* + * OCZ Vertex 3 SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + * Submitted by: Steven Hartland + * PR: 169974 + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "OCZ-VERTEX3*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* + * SuperTalent TeraDrive CT SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + * Submitted by: Steven Hartland + * PR: 169974 + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "FTM??CT25H*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* + * Crucial RealSSD C300 SSDs + * 4k optimised + * Submitted by: Steven Hartland + * PR: 169974 + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "C300-CTFDDAC???MAG*", + "*" }, /*quirks*/ADA_Q_4K + }, + { + /* + * XceedIOPS SATA SSDs + * 4k optimised + * Submitted by: Steven Hartland + * PR: 169974 + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "SG9XCS2D*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* + * Intel 330 Series SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + * Submitted by: Steven Hartland + * PR: 169974 + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "INTEL SSDSC2ct*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* + * OCZ Deneva R Series SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + * Submitted by: Steven Hartland + * PR: 169974 + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "DENRSTE251M45*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* + * Kingston HyperX 3k SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + * Submitted by: Steven Hartland + * PR: 169974 + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "KINGSTON SH103S3*", "*" }, + /*quirks*/ADA_Q_4K + }, + { /* Default */ { T_ANY, SIP_MEDIA_REMOVABLE|SIP_MEDIA_FIXED, From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 04:02: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 B7CEEC99; Sat, 27 Oct 2012 04:02:13 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A06998FC0A; Sat, 27 Oct 2012 04:02: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 q9R42Dml080123; Sat, 27 Oct 2012 04:02:13 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9R42DKZ080121; Sat, 27 Oct 2012 04:02:13 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201210270402.q9R42DKZ080121@svn.freebsd.org> From: Tim Kientzle Date: Sat, 27 Oct 2012 04:02:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242171 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 04:02:13 -0000 Author: kientzle Date: Sat Oct 27 04:02:12 2012 New Revision: 242171 URL: http://svn.freebsd.org/changeset/base/242171 Log: Comment out the other BOOTP option This should make PANDABOARD suitable for building bootable SD images. Submitted by: Giovanni Trematerra Modified: head/sys/arm/conf/PANDABOARD Modified: head/sys/arm/conf/PANDABOARD ============================================================================== --- head/sys/arm/conf/PANDABOARD Sat Oct 27 02:39:08 2012 (r242170) +++ head/sys/arm/conf/PANDABOARD Sat Oct 27 04:02:12 2012 (r242171) @@ -54,7 +54,7 @@ options NFS_ROOT #NFS usable as /, req #options BOOTP_NFSROOT #options BOOTP_COMPAT #options BOOTP -options BOOTP_NFSV3 +#options BOOTP_NFSV3 #options BOOTP_WIRED_TO=ue0 options MSDOSFS #MSDOS Filesystem #options CD9660 #ISO 9660 Filesystem From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 04:16: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 150FA14C; Sat, 27 Oct 2012 04:16:20 +0000 (UTC) (envelope-from rpaulo@felyko.com) Received: from felyko.com (unknown [IPv6:2607:f2f8:a528::3:1337:ca7]) by mx1.freebsd.org (Postfix) with ESMTP id D0CC78FC1A; Sat, 27 Oct 2012 04:16:19 +0000 (UTC) Received: from [IPv6:2601:9:4d00:85:1117:1a26:2e86:b9a5] (unknown [IPv6:2601:9:4d00:85:1117:1a26:2e86:b9a5]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by felyko.com (Postfix) with ESMTPSA id C15E63981E; Fri, 26 Oct 2012 21:16:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=felyko.com; s=mail; t=1351311373; bh=5Mfdqybi+aPMTiymY72dsob0frWIhz3/Z6UI8IENNSA=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=BdvPiYHBn8uJqDB0xI6YqAz+icHGhNfBVVJXJx9+A+A1GVUGkpTdmbvcZ4m/i/9mM 9aL1eBncwb/ZGuuA+mosCw+QNnNPrqoM7FwmBpt1g7+Gt85gRfUnHJ0LZ+PIRI/G6c mNDsXBTHZOSEXQl38Q4PojByhamfR/9sqSgkEcek= Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: svn commit: r241610 - in head: . sys/dev/usb sys/net sys/net80211 sys/netpfil/ipfw sys/netpfil/pf sys/sys From: Rui Paulo In-Reply-To: Date: Fri, 26 Oct 2012 21:16:08 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201210161337.q9GDbtr8049924@svn.freebsd.org> To: Adrian Chadd X-Mailer: Apple Mail (2.1499) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 04:16:20 -0000 I second Adrian's comments and I would like to add that you must NOT = commit something like this, breaking the ABI, when you discussed this = *ONE YEAR* ago with only two people (one of them is not very active in = the networking stack). This is against all reasonable software = development practices. On 26 Oct 2012, at 10:00, Adrian Chadd wrote: > So with this change, you've broken building -HEAD net80211 on -9. >=20 > Can we please sit down and make this work on both freebsd-9 and > freebsd-head? I do a lot of wifi development on -9 with -HEAD wireless > and this change broke everything for me. >=20 > You could've at least asked the maintainers first before you did this. >=20 > Thanks, >=20 >=20 > Adrian >=20 > On 16 October 2012 06:37, Gleb Smirnoff wrote: >> Author: glebius >> Date: Tue Oct 16 13:37:54 2012 >> New Revision: 241610 >> URL: http://svn.freebsd.org/changeset/base/241610 >>=20 >> Log: >> Make the "struct if_clone" opaque to users of the cloning API. Users >> now use function calls: >>=20 >> if_clone_simple() >> if_clone_advanced() >>=20 >> to initialize a cloner, instead of macros that initialize if_clone >> structure. >>=20 >> Discussed with: brooks, bz, 1 year ago Regards, -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 04:45: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 879BF627; Sat, 27 Oct 2012 04:45:26 +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 6BF7C8FC12; Sat, 27 Oct 2012 04:45: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 q9R4jQef088160; Sat, 27 Oct 2012 04:45:26 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9R4jQ7R088158; Sat, 27 Oct 2012 04:45:26 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201210270445.q9R4jQ7R088158@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 27 Oct 2012 04:45:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242172 - stable/9/sys/i386/i386 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 04:45:26 -0000 Author: kib Date: Sat Oct 27 04:45:25 2012 New Revision: 242172 URL: http://svn.freebsd.org/changeset/base/242172 Log: MFC r242010: Add missed sched_pin(). Modified: stable/9/sys/i386/i386/pmap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/i386/i386/pmap.c ============================================================================== --- stable/9/sys/i386/i386/pmap.c Sat Oct 27 04:02:12 2012 (r242171) +++ stable/9/sys/i386/i386/pmap.c Sat Oct 27 04:45:25 2012 (r242172) @@ -3228,6 +3228,7 @@ resume: PMAP_UNLOCK(pmap); goto resume; } + sched_pin(); } if (!pmap_demote_pde(pmap, &pmap->pm_pdir[pdirindex], sva)) { From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 06:57: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 873B5FE6; Sat, 27 Oct 2012 06:57:35 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) by mx1.freebsd.org (Postfix) with ESMTP id D24028FC08; Sat, 27 Oct 2012 06:57:34 +0000 (UTC) Received: from alph.allbsd.org (p1137-ipbf1505funabasi.chiba.ocn.ne.jp [118.7.212.137]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id q9R6vI2D001515 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 27 Oct 2012 15:57:28 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) (authenticated bits=0) by alph.allbsd.org (8.14.5/8.14.5) with ESMTP id q9R6vGL1000750; Sat, 27 Oct 2012 15:57:17 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Sat, 27 Oct 2012 15:57:07 +0900 (JST) Message-Id: <20121027.155707.2226765252880570777.hrs@allbsd.org> To: brian@FreeBSD.org Subject: Re: svn commit: r242074 - head/etc/rc.d From: Hiroki Sato In-Reply-To: <20121026235044.GA77528@thong.lan.Awfulhak.org> References: <20121025171827.GA59432@thong.lan.Awfulhak.org> <20121026.035215.1799343372729116466.hrs@allbsd.org> <20121026235044.GA77528@thong.lan.Awfulhak.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.5 on Emacs 23.4 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Sat_Oct_27_15_57_07_2012_122)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Sat, 27 Oct 2012 15:57:28 +0900 (JST) X-Spam-Status: No, score=-98.1 required=13.0 tests=CONTENT_TYPE_PRESENT, ONLY1HOPDIRECT,SAMEHELOBY2HOP,USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, dim@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 06:57:35 -0000 ----Security_Multipart(Sat_Oct_27_15_57_07_2012_122)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Brian Somers wrote in <20121026235044.GA77528@thong.lan.Awfulhak.org>: br> When I reboot and don't use -accept_rtadv (and leave br> net.inet6.ip6.accept_rtadv set to zero), I repeatedly see this in br> /var/log/messages: br> br> Oct 26 16:31:26 gw rtadvd[2879]: non-zero lifetime RA on RA receiving interface sk0. Ignored. br> Oct 26 16:31:33 gw rtadvd[2879]: non-zero lifetime RA on RA receiving interface bridge0. Ignored. br> Oct 26 16:31:42 gw rtadvd[2879]: non-zero lifetime RA on RA receiving interface sk0. Ignored. br> Oct 26 16:31:49 gw rtadvd[2879]: non-zero lifetime RA on RA receiving interface bridge0. Ignored. br> br> This seems to be the problem. Because check_accept_rtadv() (in br> rtadvd) reports the interface as being able to accept RAs (it finds br> the ND6_IFF_ACCEPT_RTADV flag), it drops outgoing RAs and nothing br> happens. Can you send me your /etc/rc.conf and /etc/sysctl.conf? I guess you are still using ipv6_enable=YES on 9.X. -- Hiroki ----Security_Multipart(Sat_Oct_27_15_57_07_2012_122)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEABECAAYFAlCLhcMACgkQTyzT2CeTzy10wwCgmYzKrUH2NFWRg9Vm6q+62x76 dUgAnR7QehCP8uobHLAOz68T9J2oz1cZ =pX+J -----END PGP SIGNATURE----- ----Security_Multipart(Sat_Oct_27_15_57_07_2012_122)---- From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 07:20: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 3A9FA242; Sat, 27 Oct 2012 07:20:53 +0000 (UTC) (envelope-from brian@awfulhak.org) Received: from idcmail-mo2no.shaw.ca (idcmail-mo2no.shaw.ca [64.59.134.9]) by mx1.freebsd.org (Postfix) with ESMTP id 8510E8FC08; Sat, 27 Oct 2012 07:20:52 +0000 (UTC) Received: from lb7f8hsrpno-svcs.dcs.int.inet (HELO pd7ml3no-ssvc.prod.shaw.ca) ([10.0.144.222]) by pd7mo1no-svcs.prod.shaw.ca with ESMTP; 27 Oct 2012 01:20:52 -0600 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=7/EMZfWbaVtDMdTqnk9efwidrOfQb3DZMdpNhNw5Oc4= c=1 sm=1 a=wom5GMh1gUkA:10 a=gyNmXv_Ll5gA:10 a=dBRESv0yCI8A:10 a=BLceEmwcHowA:10 a=Jvqgub9IZPV2TmRqH1mFPg==:17 a=6I5d2MoRAAAA:8 a=MMwg4So0AAAA:8 a=2PyMOFc78AZHJGynTmcA:9 a=CjuIK1q_8ugA:10 a=GALlD18Yr0IA:10 a=SV7veod9ZcQA:10 a=WJ3hkfHDukgA:10 a=mQ248kowQ4er70y9YfMA:9 a=9OkjiA5aW4egAk79oncA:9 a=Qmgu6FkwSqBMwSyfNJ8A:9 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Received: from unknown (HELO gw.Awfulhak.org) ([174.7.169.46]) by pd7ml3no-dmz.prod.shaw.ca with ESMTP; 27 Oct 2012 01:20:51 -0600 Received: from thong.lan.Awfulhak.org (thong.lan.Awfulhak.org [172.16.0.31]) by gw.Awfulhak.org (8.14.5/8.14.5) with ESMTP id q9R7Knrk023895 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 27 Oct 2012 00:20:49 -0700 (PDT) (envelope-from brian@lan.Awfulhak.org) Received: from thong.lan.Awfulhak.org (localhost [127.0.0.1]) by thong.lan.Awfulhak.org (8.14.5/8.14.5) with ESMTP id q9R7Know080538; Sat, 27 Oct 2012 00:20:49 -0700 (PDT) (envelope-from brian@thong.lan.Awfulhak.org) Received: (from brian@localhost) by thong.lan.Awfulhak.org (8.14.5/8.14.5/Submit) id q9R7Kmc1080537; Sat, 27 Oct 2012 00:20:48 -0700 (PDT) (envelope-from brian) Date: Sat, 27 Oct 2012 00:20:48 -0700 From: Brian Somers To: Hiroki Sato Subject: Re: svn commit: r242074 - head/etc/rc.d Message-ID: <20121027072048.GB77528@thong.lan.Awfulhak.org> References: <20121025171827.GA59432@thong.lan.Awfulhak.org> <20121026.035215.1799343372729116466.hrs@allbsd.org> <20121026235044.GA77528@thong.lan.Awfulhak.org> <20121027.155707.2226765252880570777.hrs@allbsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UFHRwCdBEJvubb2X" Content-Disposition: inline In-Reply-To: <20121027.155707.2226765252880570777.hrs@allbsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-1.7 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gw.lan.Awfulhak.org Cc: svn-src-head@FreeBSD.org, dim@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, brian@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 07:20:53 -0000 --UFHRwCdBEJvubb2X Content-Type: multipart/mixed; boundary="cmJC7u66zC7hs+87" Content-Disposition: inline --cmJC7u66zC7hs+87 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Oct 27, 2012 at 03:57:07PM +0900, Hiroki Sato wrote: > Brian Somers wrote > in <20121026235044.GA77528@thong.lan.Awfulhak.org>: >=20 > br> When I reboot and don't use -accept_rtadv (and leave > br> net.inet6.ip6.accept_rtadv set to zero), I repeatedly see this in > br> /var/log/messages: > br> > br> Oct 26 16:31:26 gw rtadvd[2879]: non-zero lifetime RA on RA receiving= interface sk0. Ignored. > br> Oct 26 16:31:33 gw rtadvd[2879]: non-zero lifetime RA on RA receiving= interface bridge0. Ignored. > br> Oct 26 16:31:42 gw rtadvd[2879]: non-zero lifetime RA on RA receiving= interface sk0. Ignored. > br> Oct 26 16:31:49 gw rtadvd[2879]: non-zero lifetime RA on RA receiving= interface bridge0. Ignored. > br> > br> This seems to be the problem. Because check_accept_rtadv() (in > br> rtadvd) reports the interface as being able to accept RAs (it finds > br> the ND6_IFF_ACCEPT_RTADV flag), it drops outgoing RAs and nothing > br> happens. >=20 > Can you send me your /etc/rc.conf and /etc/sysctl.conf? I guess you > are still using ipv6_enable=3DYES on 9.X. Sure (attached). I'm not sure what is supposed to change in rc.conf when upgrading from 8 to 9. There's nothing obvious that I can see... maybe I'm looking in the wrong place? http://www.freebsd.org/releases/9.0R/relnotes.html This issue seems to be with rtadvd (as per above). Eliding the return after the above non-zero lifetime message in rtadvd.c makes everything work again (without using ifconfig iface inet6 -accept_rtadv). --=20 Brian Somers Don't _EVER_ lose your sense of humour ! --cmJC7u66zC7hs+87 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="rc.conf" Content-Transfer-Encoding: quoted-printable hostname=3Dgw.lan.Awfulhak.org nisdomainname=3DAwfulhak.org firewall_enable=3DYES firewall_flags=3D"-p /usr/bin/m4" firewall_type=3D/etc/firewall.rules firewall_quiet=3DYES #network_interfaces=3D"fxp0 re0 lo0 bridge0" #network_interfaces=3D"fxp1 sk0 lo0 bridge0" ifconfig_sk0=3D"inet 172.16.0.1 netmask 0xffffff00" ifconfig_sk0_alias0=3D"inet 172.16.0.23 netmask 0xffffffff" ifconfig_lo0_alias0=3D"inet 127.0.0.2 netmask 0xffffffff" ifconfig_fxp0=3DDHCP #static_routes=3Dupstairs #route_upstairs=3D"172.16.2.128/25 172.16.2.34" ifconfig_fxp1=3Dup vlans_sk0=3D167 ifconfig_sk0_167=3Dup cloned_interfaces=3Dbridge0 ifconfig_bridge0=3D"addm sk0.167 addm fxp1 172.16.2.2 netmask 0xffffff80" bsdstats_enable=3DYES ipv6_enable=3DYES ipv6_gateway_enable=3DYES ipv6_ifconfig_sk0=3D"2001:1938:27d:0:240:f4ff:feb1:1c85 prefixlen 64" ipv6_ifconfig_bridge0=3D"2001:1938:27d:1:20d:61ff:fe45:2c3f prefixlen 64" rtadvd_enable=3DYES rtadvd_interfaces=3D"sk0 bridge0" fsck_y_enable=3DYES natd_enable=3DYES natd_interface=3Dfxp0 natd_flags=3D"-f /etc/natd.conf" rpcbind_enable=3DYES syslogd_enable=3DYES syslogd_flags=3D-ss dnscrypt_proxy_enable=3DYES dnscrypt_proxy_flags=3D'-a 127.0.0.2' named_enable=3DYES rwhod_enable=3DYES amd_enable=3DYES amd_flags=3D nfs_client_enable=3DYES nfs_server_enable=3DYES mountd_enable=3DYES mountd_flags=3D"-p 1007" rpc_lockd_enable=3DYES rpc_statd_enable=3DYES timed_flags=3D"-F localhost" nis_client_enable=3DYES nis_client_flags=3D"-S $nisdomainname,172.16.0.1 -m" nis_server_enable=3DYES nis_yppasswdd_enable=3DYES gateway_enable=3DYES cursor=3Ddestructive lpd_enable=3DYES lpd_flags=3D-lc dumpdev=3D/dev/ad0s1b clear_tmp_enable=3DYES ldconfig_paths_aout=3DNO sshd_enable=3DYES ntpd_enable=3DYES ntpd_sync_on_start=3DYES usbd_enable=3DYES snmpd_enable=3DYES snmpd_flags=3D-Lsd moused_enable=3DYES moused_type=3Dps/2 moused_port=3D/dev/psm0 sendmail_enable=3DYES inetd_enable=3DYES sixxs_aiccu_enable=3DYES cyrus_pwcheck_enable=3DYES #slapd_enable=3DYES #slapd_flags=3D'-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/ ldap://0.0.0.0= /"' #slapd_sockets=3D"/var/run/openldap/ldapi" =20 apache22_enable=3DYES apache22ssl_enable=3DYES dhcpd_enable=3DYES dhcpd_ifaces=3D"sk0 bridge0" dhcpd_chuser_enable=3DNO mysql_enable=3DYES cyrus_imapd_enable=3DYES saslauthd_enable=3DYES saslauthd_flags=3D"-a pam" squid_enable=3DYES samba_enable=3DYES #winbindd_enable=3DYES #winbindd_flags=3D"-d10" mt_daapd_enable=3DYES arpwatch_enable=3DYES arpwatch_interfaces=3D"sk0 bridge0" cupsd_enable=3DYES nagios_enable=3DYES nsca_enable=3DYES sshblock_enable=3DYES saver=3Dgreen # added by xorg-libraries port local_startup=3D"/usr/local/etc/rc.d" ddclient_enable=3DYES daily_ddclient_force_enable=3DYES spamd_enable=3DYES spamass_milter_enable=3DYES --cmJC7u66zC7hs+87 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="sysctl.conf" # $FreeBSD: stable/9/etc/sysctl.conf 112200 2003-03-13 18:43:50Z mux $ # # This file is read when going to multi-user and its contents piped thru # ``sysctl'' to adjust kernel values. ``man 5 sysctl.conf'' for details. # kern.maxfilesperproc=1024 # Uncomment this to prevent users from seeing information about processes that # are being run under another UID. #security.bsd.see_other_uids=0 # I want to see firewall log messages in /var/log/security net.inet.ip.fw.verbose=1 --cmJC7u66zC7hs+87-- --UFHRwCdBEJvubb2X Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQCVAwUBUIuLUA7tvOdmanQhAQL7zAP7BU2BnNsYmgwINAs8HVJS03lskuTGINeb i7YCCZWOXXbg0L/GoyD6aXroaEOHogfMX86/vBNs1zxMlOi4Pc5MAuzZ199musXb 2z9R1lKxn26DiSVtYqiqagxQ29AHVbhBReI3KdpFS2hhb4V6L+pD5N5ESTrWNZXm 6AJ2RhI+Cv0= =Im8H -----END PGP SIGNATURE----- --UFHRwCdBEJvubb2X-- From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 07:51: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 BE7BB61B; Sat, 27 Oct 2012 07:51:57 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) by mx1.freebsd.org (Postfix) with ESMTP id 0C1988FC08; Sat, 27 Oct 2012 07:51:56 +0000 (UTC) Received: from alph.allbsd.org (p1137-ipbf1505funabasi.chiba.ocn.ne.jp [118.7.212.137]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id q9R7pfel008157 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 27 Oct 2012 16:51:51 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) (authenticated bits=0) by alph.allbsd.org (8.14.5/8.14.5) with ESMTP id q9R7pd7m001399; Sat, 27 Oct 2012 16:51:40 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Sat, 27 Oct 2012 16:51:29 +0900 (JST) Message-Id: <20121027.165129.351491404794553651.hrs@allbsd.org> To: brian@FreeBSD.org Subject: Re: svn commit: r242074 - head/etc/rc.d From: Hiroki Sato In-Reply-To: <20121027072048.GB77528@thong.lan.Awfulhak.org> References: <20121026235044.GA77528@thong.lan.Awfulhak.org> <20121027.155707.2226765252880570777.hrs@allbsd.org> <20121027072048.GB77528@thong.lan.Awfulhak.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.5 on Emacs 23.4 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart0(Sat_Oct_27_16_51_29_2012_211)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Sat, 27 Oct 2012 16:51:51 +0900 (JST) X-Spam-Status: No, score=-98.1 required=13.0 tests=CONTENT_TYPE_PRESENT, ONLY1HOPDIRECT,SAMEHELOBY2HOP,USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, dim@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 07:51:58 -0000 ----Security_Multipart0(Sat_Oct_27_16_51_29_2012_211)-- Content-Type: Multipart/Mixed; boundary="--Next_Part(Sat_Oct_27_16_51_29_2012_951)--" Content-Transfer-Encoding: 7bit ----Next_Part(Sat_Oct_27_16_51_29_2012_951)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Brian Somers wrote in <20121027072048.GB77528@thong.lan.Awfulhak.org>: br> On Sat, Oct 27, 2012 at 03:57:07PM +0900, Hiroki Sato wrote: br> > Brian Somers wrote br> > in <20121026235044.GA77528@thong.lan.Awfulhak.org>: br> > br> > br> When I reboot and don't use -accept_rtadv (and leave br> > br> net.inet6.ip6.accept_rtadv set to zero), I repeatedly see this in br> > br> /var/log/messages: br> > br> br> > br> Oct 26 16:31:26 gw rtadvd[2879]: non-zero lifetime RA on RA receiving interface sk0. Ignored. br> > br> Oct 26 16:31:33 gw rtadvd[2879]: non-zero lifetime RA on RA receiving interface bridge0. Ignored. br> > br> Oct 26 16:31:42 gw rtadvd[2879]: non-zero lifetime RA on RA receiving interface sk0. Ignored. br> > br> Oct 26 16:31:49 gw rtadvd[2879]: non-zero lifetime RA on RA receiving interface bridge0. Ignored. br> > br> br> > br> This seems to be the problem. Because check_accept_rtadv() (in br> > br> rtadvd) reports the interface as being able to accept RAs (it finds br> > br> the ND6_IFF_ACCEPT_RTADV flag), it drops outgoing RAs and nothing br> > br> happens. br> > br> > Can you send me your /etc/rc.conf and /etc/sysctl.conf? I guess you br> > are still using ipv6_enable=YES on 9.X. br> br> Sure (attached). I'm not sure what is supposed to change in rc.conf br> when upgrading from 8 to 9. There's nothing obvious that I can br> see... maybe I'm looking in the wrong place? br> br> http://www.freebsd.org/releases/9.0R/relnotes.html Thank you. It is explained in section 3.2.4 in http://www.freebsd.org/releases/9.0R/relnotes-detailed.html#UPGRADE I think it will work as 8.X just after removing the ipv6_enable=YES line in your rc.conf, but after investigating the network.subr closely I found a bug in backward compatibility of ipv6_enable=YES on 9.X... Can you try the attached patch? This should fix the issue even if ipv6_enable=YES exists on a 9.X's rc.conf without a patch to rc.d/rtadvd. -- Hiroki ----Next_Part(Sat_Oct_27_16_51_29_2012_951)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="network.subr.20121027-1.diff" Index: etc/network.subr =================================================================== --- etc/network.subr (revision 242172) +++ etc/network.subr (working copy) @@ -504,7 +504,11 @@ # backward compatibility: $ipv6_enable case $ipv6_enable in [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) - return 0 + if checkyesno ipv6_gateway_enable; then + return 1 + else + return 0 + fi ;; esac ----Next_Part(Sat_Oct_27_16_51_29_2012_951)---- ----Security_Multipart0(Sat_Oct_27_16_51_29_2012_211)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEABECAAYFAlCLkoEACgkQTyzT2CeTzy2P1wCgtoaCTtEG7mwmoMJabvvxPzbP NhUAnRDMBsiEa8uQGshlZwTv4pVMgGEv =QYFL -----END PGP SIGNATURE----- ----Security_Multipart0(Sat_Oct_27_16_51_29_2012_211)---- From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 08:02: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 5E655833; Sat, 27 Oct 2012 08:02:36 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) by mx1.freebsd.org (Postfix) with ESMTP id 99D0B8FC0C; Sat, 27 Oct 2012 08:02:35 +0000 (UTC) Received: from alph.allbsd.org (p1137-ipbf1505funabasi.chiba.ocn.ne.jp [118.7.212.137]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id q9R82GIM009396 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 27 Oct 2012 17:02:26 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) (authenticated bits=0) by alph.allbsd.org (8.14.5/8.14.5) with ESMTP id q9R82Fcm001596; Sat, 27 Oct 2012 17:02:16 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Sat, 27 Oct 2012 17:01:39 +0900 (JST) Message-Id: <20121027.170139.1459930438153883844.hrs@allbsd.org> To: brian@FreeBSD.org Subject: Re: svn commit: r242074 - head/etc/rc.d From: Hiroki Sato In-Reply-To: <20121027.165129.351491404794553651.hrs@allbsd.org> References: <20121027.155707.2226765252880570777.hrs@allbsd.org> <20121027072048.GB77528@thong.lan.Awfulhak.org> <20121027.165129.351491404794553651.hrs@allbsd.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.5 on Emacs 23.4 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart0(Sat_Oct_27_17_01_39_2012_786)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Sat, 27 Oct 2012 17:02:27 +0900 (JST) X-Spam-Status: No, score=-98.1 required=13.0 tests=CONTENT_TYPE_PRESENT, ONLY1HOPDIRECT,SAMEHELOBY2HOP,USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, dim@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 08:02:36 -0000 ----Security_Multipart0(Sat_Oct_27_17_01_39_2012_786)-- Content-Type: Multipart/Mixed; boundary="--Next_Part(Sat_Oct_27_17_01_39_2012_097)--" Content-Transfer-Encoding: 7bit ----Next_Part(Sat_Oct_27_17_01_39_2012_097)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hiroki Sato wrote in <20121027.165129.351491404794553651.hrs@allbsd.org>: hr> Brian Somers wrote hr> in <20121027072048.GB77528@thong.lan.Awfulhak.org>: hr> hr> br> On Sat, Oct 27, 2012 at 03:57:07PM +0900, Hiroki Sato wrote: hr> br> > Brian Somers wrote hr> br> > in <20121026235044.GA77528@thong.lan.Awfulhak.org>: hr> br> > hr> br> > br> When I reboot and don't use -accept_rtadv (and leave hr> br> > br> net.inet6.ip6.accept_rtadv set to zero), I repeatedly see this in hr> br> > br> /var/log/messages: hr> br> > br> hr> br> > br> Oct 26 16:31:26 gw rtadvd[2879]: non-zero lifetime RA on RA receiving interface sk0. Ignored. hr> br> > br> Oct 26 16:31:33 gw rtadvd[2879]: non-zero lifetime RA on RA receiving interface bridge0. Ignored. hr> br> > br> Oct 26 16:31:42 gw rtadvd[2879]: non-zero lifetime RA on RA receiving interface sk0. Ignored. hr> br> > br> Oct 26 16:31:49 gw rtadvd[2879]: non-zero lifetime RA on RA receiving interface bridge0. Ignored. hr> br> > br> hr> br> > br> This seems to be the problem. Because check_accept_rtadv() (in hr> br> > br> rtadvd) reports the interface as being able to accept RAs (it finds hr> br> > br> the ND6_IFF_ACCEPT_RTADV flag), it drops outgoing RAs and nothing hr> br> > br> happens. hr> br> > hr> br> > Can you send me your /etc/rc.conf and /etc/sysctl.conf? I guess you hr> br> > are still using ipv6_enable=YES on 9.X. hr> br> hr> br> Sure (attached). I'm not sure what is supposed to change in rc.conf hr> br> when upgrading from 8 to 9. There's nothing obvious that I can hr> br> see... maybe I'm looking in the wrong place? hr> br> hr> br> http://www.freebsd.org/releases/9.0R/relnotes.html hr> hr> Thank you. It is explained in section 3.2.4 in hr> hr> http://www.freebsd.org/releases/9.0R/relnotes-detailed.html#UPGRADE hr> hr> I think it will work as 8.X just after removing the ipv6_enable=YES hr> line in your rc.conf, but after investigating the network.subr hr> closely I found a bug in backward compatibility of ipv6_enable=YES on hr> 9.X... Can you try the attached patch? This should fix the issue hr> even if ipv6_enable=YES exists on a 9.X's rc.conf without a patch to hr> rc.d/rtadvd. Gr, sorry. The previous patch was wrong. The correct one is attached to this mail. -- Hiroki ----Next_Part(Sat_Oct_27_17_01_39_2012_097)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="network.subr.20121027-2.diff" Index: etc/network.subr =================================================================== --- etc/network.subr (revision 242114) +++ etc/network.subr (working copy) @@ -109,7 +109,9 @@ # backward compatibility: $ipv6_enable case $ipv6_enable in [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) - _ipv6_opts="${_ipv6_opts} accept_rtadv" + if ! checkyesno ipv6_gateway_enable; then + _ipv6_opts="${_ipv6_opts} accept_rtadv" + fi ;; esac @@ -488,7 +490,11 @@ # backward compatibility: $ipv6_enable case $ipv6_enable in [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) - return 0 + if checkyesno ipv6_gateway_enable; then + return 1 + else + return 0 + fi ;; esac ----Next_Part(Sat_Oct_27_17_01_39_2012_097)---- ----Security_Multipart0(Sat_Oct_27_17_01_39_2012_786)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEABECAAYFAlCLlOMACgkQTyzT2CeTzy16dwCgqHqraj6nXt4BeVo9MwDPzyy0 +X0AoJRAuB4S1Y6hliDYf709ZM1/84bt =XbpB -----END PGP SIGNATURE----- ----Security_Multipart0(Sat_Oct_27_17_01_39_2012_786)---- From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 08:10: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 BC31CACF; Sat, 27 Oct 2012 08:10:38 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by mx1.freebsd.org (Postfix) with ESMTP id 75EA28FC0A; Sat, 27 Oct 2012 08:10:37 +0000 (UTC) Received: by mail-pa0-f54.google.com with SMTP id bi1so2545966pad.13 for ; Sat, 27 Oct 2012 01:10:36 -0700 (PDT) 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=I/jMdrjmjZUZLUw/sXnF5QZvv3KojB33+sv+vzmT3s0=; b=Tgom5rrG2MeFgIzXARELtPiV5cXJdxInKZBcmfdLqWCJBpBAfo8q8qHSNf0YAOtA17 qTYcZvBceoOpIHkJQ9NgFPtX06Aturi2vIKWOVUOrNHoL97WsAq4Jy01cug9IHnfAbqd GiyJ1VukHrOvKh3wNIHJlOvIjUr+b4MBHlmuad+12E9Awd912b2Ti2Cn5KkGoouq42+2 qbF/njixxhdIByCvk6VD8kF/K2ZsHyPL2Kq/ADhLIUj7eMZokEMCx5dYJMikdsxhbjfo VKPWUadv99YdcCHN4Ol+IJnJBirIwIEq9641tzrx4yipHBXStyOxNZUoLYPlsEmrHZAh 5EBQ== MIME-Version: 1.0 Received: by 10.68.229.201 with SMTP id ss9mr76230524pbc.80.1351325436904; Sat, 27 Oct 2012 01:10:36 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.68.146.233 with HTTP; Sat, 27 Oct 2012 01:10:36 -0700 (PDT) In-Reply-To: References: <201210161337.q9GDbtr8049924@svn.freebsd.org> Date: Sat, 27 Oct 2012 01:10:36 -0700 X-Google-Sender-Auth: F5mywVWxj09anbj6TqAaTinmWiA Message-ID: Subject: Re: svn commit: r241610 - in head: . sys/dev/usb sys/net sys/net80211 sys/netpfil/ipfw sys/netpfil/pf sys/sys From: Adrian Chadd To: Rui Paulo Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 08:10:38 -0000 On 26 October 2012 21:16, Rui Paulo wrote: > I second Adrian's comments and I would like to add that you must NOT comm= it something like this, breaking the ABI, when you discussed this *ONE YEAR= * ago with only two people (one of them is not very active in the networkin= g stack). This is against all reasonable software development practices. It's fine now; I've fixed the net80211 case. Please, just next time give us all a bit more of a heads up before you drop this stuff in. You won't hear me saying "hell no" - I'll be saying "ok, how do I teach my code to still work on -9." Which is what I ended up doing. Your work is sorely needed, don't get me wrong. :-) I'm glad you're doing i= t. Thanks, Adrian From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 08:32: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 17BBE9E; Sat, 27 Oct 2012 08:32:01 +0000 (UTC) (envelope-from brian@awfulhak.org) Received: from idcmail-mo1so.shaw.ca (idcmail-mo1so.shaw.ca [24.71.223.10]) by mx1.freebsd.org (Postfix) with ESMTP id 826F08FC08; Sat, 27 Oct 2012 08:32:00 +0000 (UTC) Received: from pd4ml1so-ssvc.prod.shaw.ca ([10.0.141.141]) by pd2mo1so-svcs.prod.shaw.ca with ESMTP; 27 Oct 2012 02:31:59 -0600 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=YV/ZfMFUOxaYfNdUyKHndRAzOL9/4mKBz/+5TfOlk9g= c=1 sm=1 a=wom5GMh1gUkA:10 a=gyNmXv_Ll5gA:10 a=dBRESv0yCI8A:10 a=BLceEmwcHowA:10 a=Jvqgub9IZPV2TmRqH1mFPg==:17 a=6I5d2MoRAAAA:8 a=Wi8YH2NmAAAA:8 a=MMwg4So0AAAA:8 a=RhZB3JRgOTxT6rRC0fkA:9 a=CjuIK1q_8ugA:10 a=feu_IAEBeuoA:10 a=SV7veod9ZcQA:10 a=2_Ak67o2eQwA:10 a=WJ3hkfHDukgA:10 a=LPLRibRuTFt_r7GVflgA:9 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Received: from unknown (HELO gw.Awfulhak.org) ([174.7.169.46]) by pd4ml1so-dmz.prod.shaw.ca with ESMTP; 27 Oct 2012 02:31:59 -0600 Received: from thong.lan.Awfulhak.org (thong.lan.Awfulhak.org [172.16.0.31]) by gw.Awfulhak.org (8.14.5/8.14.5) with ESMTP id q9R8VuVW003391 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 27 Oct 2012 01:31:56 -0700 (PDT) (envelope-from brian@lan.Awfulhak.org) Received: from thong.lan.Awfulhak.org (localhost [127.0.0.1]) by thong.lan.Awfulhak.org (8.14.5/8.14.5) with ESMTP id q9R8VueT081074; Sat, 27 Oct 2012 01:31:56 -0700 (PDT) (envelope-from brian@thong.lan.Awfulhak.org) Received: (from brian@localhost) by thong.lan.Awfulhak.org (8.14.5/8.14.5/Submit) id q9R8Vu5t081073; Sat, 27 Oct 2012 01:31:56 -0700 (PDT) (envelope-from brian) Date: Sat, 27 Oct 2012 01:31:56 -0700 From: Brian Somers To: Hiroki Sato Subject: Re: svn commit: r242074 - head/etc/rc.d Message-ID: <20121027083156.GA81040@thong.lan.Awfulhak.org> References: <20121027.155707.2226765252880570777.hrs@allbsd.org> <20121027072048.GB77528@thong.lan.Awfulhak.org> <20121027.165129.351491404794553651.hrs@allbsd.org> <20121027.170139.1459930438153883844.hrs@allbsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="nFreZHaLTZJo0R7j" Content-Disposition: inline In-Reply-To: <20121027.170139.1459930438153883844.hrs@allbsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-1.7 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gw.lan.Awfulhak.org Cc: svn-src-head@FreeBSD.org, dim@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, brian@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 08:32:01 -0000 --nFreZHaLTZJo0R7j Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Oct 27, 2012 at 05:01:39PM +0900, Hiroki Sato wrote: > Hiroki Sato wrote > in <20121027.165129.351491404794553651.hrs@allbsd.org>: > hr> Thank you. It is explained in section 3.2.4 in > hr> > hr> http://www.freebsd.org/releases/9.0R/relnotes-detailed.html#UPGRADE > hr> > hr> I think it will work as 8.X just after removing the ipv6_enable=3DYES > hr> line in your rc.conf, but after investigating the network.subr > hr> closely I found a bug in backward compatibility of ipv6_enable=3DYES= on > hr> 9.X... Can you try the attached patch? This should fix the issue > hr> even if ipv6_enable=3DYES exists on a 9.X's rc.conf without a patch = to > hr> rc.d/rtadvd. >=20 > Gr, sorry. The previous patch was wrong. The correct one is > attached to this mail. >=20 > -- Hiroki > Index: etc/network.subr > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- etc/network.subr (revision 242114) > +++ etc/network.subr (working copy) > @@ -109,7 +109,9 @@ > # backward compatibility: $ipv6_enable > case $ipv6_enable in > [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) > - _ipv6_opts=3D"${_ipv6_opts} accept_rtadv" > + if ! checkyesno ipv6_gateway_enable; then > + _ipv6_opts=3D"${_ipv6_opts} accept_rtadv" > + fi > ;; > esac >=20 > @@ -488,7 +490,11 @@ > # backward compatibility: $ipv6_enable > case $ipv6_enable in > [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) > - return 0 > + if checkyesno ipv6_gateway_enable; then > + return 1 > + else > + return 0 > + fi > ;; > esac >=20 Yep, that fixes the issue. Everything works now both with and without ipv6_enable in rc.conf. Thanks for your help. It might be worth asking re@ if the above patch can be squeezed into 9.1 before the release? I'm also ok with backing the original /etc/rc.d/rtadvd change out if you prefer? Thanks again. --=20 Brian Somers Don't _EVER_ lose your sense of humour ! --nFreZHaLTZJo0R7j Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQCVAwUBUIub/A7tvOdmanQhAQK19gQAlK4L2yyMJ4rwSoZgYABKmV7MaNsncPF0 +5TjCnLhO89m57Skq92nnIR5VBVEFaPGnAcbwcFOclu7rq/LNwi8rEtvuey4g9Zv uSf9e6nvvH8FoA+kFBZzokfet/M9GGD7fSJGZqpuzm5+wmYDVV5I+Ulr+QqO0e8r cBIIycuQ4QA= =tdj8 -----END PGP SIGNATURE----- --nFreZHaLTZJo0R7j-- From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 08:52: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 B1D7B5C0; Sat, 27 Oct 2012 08:52:33 +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 97ADC8FC08; Sat, 27 Oct 2012 08:52: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 q9R8qXLr030773; Sat, 27 Oct 2012 08:52:33 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9R8qXSI030769; Sat, 27 Oct 2012 08:52:33 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210270852.q9R8qXSI030769@svn.freebsd.org> From: Alexander Motin Date: Sat, 27 Oct 2012 08:52:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242173 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 08:52:33 -0000 Author: mav Date: Sat Oct 27 08:52:33 2012 New Revision: 242173 URL: http://svn.freebsd.org/changeset/base/242173 Log: Remove one more numeric priority constant. Modified: head/sys/cam/scsi/scsi_enc.c Modified: head/sys/cam/scsi/scsi_enc.c ============================================================================== --- head/sys/cam/scsi/scsi_enc.c Sat Oct 27 04:45:25 2012 (r242172) +++ head/sys/cam/scsi/scsi_enc.c Sat Oct 27 08:52:33 2012 (r242173) @@ -559,7 +559,7 @@ enc_runcmd(struct enc_softc *enc, char * cdbl = IOCDBLEN; } - ccb = cam_periph_getccb(enc->periph, 1); + ccb = cam_periph_getccb(enc->periph, CAM_PRIORITY_NORMAL); if (enc->enc_type == ENC_SEMB_SES || enc->enc_type == ENC_SEMB_SAFT) { tdlen = min(dlen, 1020); tdlen = (tdlen + 3) & ~3; From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 09:03: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 DE9DAD9C; Sat, 27 Oct 2012 09:03:46 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) by mx1.freebsd.org (Postfix) with ESMTP id 2A0958FC0A; Sat, 27 Oct 2012 09:03:45 +0000 (UTC) Received: from alph.allbsd.org (p1137-ipbf1505funabasi.chiba.ocn.ne.jp [118.7.212.137]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id q9R93Ut3016577 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 27 Oct 2012 18:03:40 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) (authenticated bits=0) by alph.allbsd.org (8.14.5/8.14.5) with ESMTP id q9R93SZF002304; Sat, 27 Oct 2012 18:03:29 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Sat, 27 Oct 2012 18:03:21 +0900 (JST) Message-Id: <20121027.180321.1646410521945318717.hrs@allbsd.org> To: brian@FreeBSD.org Subject: Re: svn commit: r242074 - head/etc/rc.d From: Hiroki Sato In-Reply-To: <20121027083156.GA81040@thong.lan.Awfulhak.org> References: <20121027.165129.351491404794553651.hrs@allbsd.org> <20121027.170139.1459930438153883844.hrs@allbsd.org> <20121027083156.GA81040@thong.lan.Awfulhak.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.5 on Emacs 23.4 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Sat_Oct_27_18_03_21_2012_661)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Sat, 27 Oct 2012 18:03:40 +0900 (JST) X-Spam-Status: No, score=-98.1 required=13.0 tests=CONTENT_TYPE_PRESENT, ONLY1HOPDIRECT,SAMEHELOBY2HOP,USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, dim@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 09:03:47 -0000 ----Security_Multipart(Sat_Oct_27_18_03_21_2012_661)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Brian Somers wrote in <20121027083156.GA81040@thong.lan.Awfulhak.org>: br> On Sat, Oct 27, 2012 at 05:01:39PM +0900, Hiroki Sato wrote: br> > Hiroki Sato wrote br> > in <20121027.165129.351491404794553651.hrs@allbsd.org>: br> > hr> Thank you. It is explained in section 3.2.4 in br> > hr> br> > hr> http://www.freebsd.org/releases/9.0R/relnotes-detailed.html#UPGRADE br> > hr> br> > hr> I think it will work as 8.X just after removing the ipv6_enable=YES br> > hr> line in your rc.conf, but after investigating the network.subr br> > hr> closely I found a bug in backward compatibility of ipv6_enable=YES on br> > hr> 9.X... Can you try the attached patch? This should fix the issue br> > hr> even if ipv6_enable=YES exists on a 9.X's rc.conf without a patch to br> > hr> rc.d/rtadvd. br> > br> > Gr, sorry. The previous patch was wrong. The correct one is br> > attached to this mail. br> > br> > -- Hiroki br> br> > Index: etc/network.subr br> > =================================================================== br> > --- etc/network.subr (revision 242114) br> > +++ etc/network.subr (working copy) br> > @@ -109,7 +109,9 @@ br> > # backward compatibility: $ipv6_enable br> > case $ipv6_enable in br> > [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) br> > - _ipv6_opts="${_ipv6_opts} accept_rtadv" br> > + if ! checkyesno ipv6_gateway_enable; then br> > + _ipv6_opts="${_ipv6_opts} accept_rtadv" br> > + fi br> > ;; br> > esac br> > br> > @@ -488,7 +490,11 @@ br> > # backward compatibility: $ipv6_enable br> > case $ipv6_enable in br> > [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) br> > - return 0 br> > + if checkyesno ipv6_gateway_enable; then br> > + return 1 br> > + else br> > + return 0 br> > + fi br> > ;; br> > esac br> > br> br> Yep, that fixes the issue. Everything works now both with and br> without ipv6_enable in rc.conf. Thanks for your help. br> br> It might be worth asking re@ if the above patch can be squeezed br> into 9.1 before the release? br> br> I'm also ok with backing the original /etc/rc.d/rtadvd change out br> if you prefer? Thank you for testing it! Today I will commit them including revert of rc.d/rtadvd to head (since network.subr on head is also broken partially) and then send a merge request of the fix. -- Hiroki ----Security_Multipart(Sat_Oct_27_18_03_21_2012_661)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEABECAAYFAlCLo1kACgkQTyzT2CeTzy2/PwCgu67V4iWvvDPK8iPTshtuA1ib WfEAn1XzeUyVnZaNJBnfwDWsM4G3D9u5 =7Vri -----END PGP SIGNATURE----- ----Security_Multipart(Sat_Oct_27_18_03_21_2012_661)---- From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 09:40: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 9E85D5D1; Sat, 27 Oct 2012 09:40:30 +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 6D9AF8FC0C; Sat, 27 Oct 2012 09:40: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 q9R9eUpq039382; Sat, 27 Oct 2012 09:40:30 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9R9eUEU039378; Sat, 27 Oct 2012 09:40:30 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210270940.q9R9eUEU039378@svn.freebsd.org> From: Alexander Motin Date: Sat, 27 Oct 2012 09:40:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242174 - in head/sys/cam: ctl scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 09:40:30 -0000 Author: mav Date: Sat Oct 27 09:40:29 2012 New Revision: 242174 URL: http://svn.freebsd.org/changeset/base/242174 Log: Remove several uses of numeric priorities from immediate CCB setups. Modified: head/sys/cam/ctl/ctl_frontend_cam_sim.c head/sys/cam/ctl/scsi_ctl.c head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_cam_sim.c Sat Oct 27 08:52:33 2012 (r242173) +++ head/sys/cam/ctl/ctl_frontend_cam_sim.c Sat Oct 27 09:40:29 2012 (r242174) @@ -240,7 +240,7 @@ cfcs_init(void) goto bailout; } - xpt_setup_ccb(&csa.ccb_h, softc->path, /*priority*/ 5); + xpt_setup_ccb(&csa.ccb_h, softc->path, CAM_PRIORITY_NONE); csa.ccb_h.func_code = XPT_SASYNC_CB; csa.event_enable = AC_LOST_DEVICE; csa.callback = cfcs_async; Modified: head/sys/cam/ctl/scsi_ctl.c ============================================================================== --- head/sys/cam/ctl/scsi_ctl.c Sat Oct 27 08:52:33 2012 (r242173) +++ head/sys/cam/ctl/scsi_ctl.c Sat Oct 27 09:40:29 2012 (r242174) @@ -334,7 +334,7 @@ ctlfeasync(void *callback_arg, uint32_t return; } xpt_setup_ccb(&ccb->ccb_h, cpi->ccb_h.path, - /*priority*/ 1); + CAM_PRIORITY_NONE); sim = xpt_path_sim(cpi->ccb_h.path); @@ -571,7 +571,7 @@ ctlferegister(struct cam_periph *periph, callout_init_mtx(&softc->dma_callout, sim->mtx, /*flags*/ 0); periph->softc = softc; - xpt_setup_ccb(&en_lun_ccb.ccb_h, periph->path, /*priority*/ 1); + xpt_setup_ccb(&en_lun_ccb.ccb_h, periph->path, CAM_PRIORITY_NONE); en_lun_ccb.ccb_h.func_code = XPT_EN_LUN; en_lun_ccb.cel.grp6_len = 0; en_lun_ccb.cel.grp7_len = 0; @@ -668,7 +668,7 @@ ctlfeoninvalidate(struct cam_periph *per softc = (struct ctlfe_lun_softc *)periph->softc; - xpt_setup_ccb(&en_lun_ccb.ccb_h, periph->path, /*priority*/ 1); + xpt_setup_ccb(&en_lun_ccb.ccb_h, periph->path, CAM_PRIORITY_NONE); en_lun_ccb.ccb_h.func_code = XPT_EN_LUN; en_lun_ccb.cel.grp6_len = 0; en_lun_ccb.cel.grp7_len = 0; @@ -1694,7 +1694,7 @@ ctlfe_onoffline(void *arg, int online) return; } ccb = (union ccb *)malloc(sizeof(*ccb), M_TEMP, M_WAITOK | M_ZERO); - xpt_setup_ccb(&ccb->ccb_h, path, /*priority*/ 1); + xpt_setup_ccb(&ccb->ccb_h, path, CAM_PRIORITY_NONE); sim = xpt_path_sim(path); Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Sat Oct 27 08:52:33 2012 (r242173) +++ head/sys/cam/scsi/scsi_da.c Sat Oct 27 09:40:29 2012 (r242174) @@ -1510,7 +1510,7 @@ dasysctlinit(void *context, int pending) * Add some addressing info. */ memset(&cts, 0, sizeof (cts)); - xpt_setup_ccb(&cts.ccb_h, periph->path, /*priority*/1); + xpt_setup_ccb(&cts.ccb_h, periph->path, CAM_PRIORITY_NONE); cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; cts.type = CTS_TYPE_CURRENT_SETTINGS; cam_periph_lock(periph); From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 10:07: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 348E2C5D; Sat, 27 Oct 2012 10:07:22 +0000 (UTC) (envelope-from edschouten@gmail.com) Received: from mail-oa0-f54.google.com (mail-oa0-f54.google.com [209.85.219.54]) by mx1.freebsd.org (Postfix) with ESMTP id B522D8FC12; Sat, 27 Oct 2012 10:07:21 +0000 (UTC) Received: by mail-oa0-f54.google.com with SMTP id n9so4383976oag.13 for ; Sat, 27 Oct 2012 03:07:20 -0700 (PDT) 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; bh=jX5o1PGf1pDUliHXnbTeJEvXO3I2GTxLnYucIdBEBYE=; b=vVJx/2PoYnnLRYziKyb3yt8QMt4BP3DzC1rW1k90WosxdE5G/s0IEYGA2O/4Jq7cyU iLd6jbBKeZLwFxbfrejNEQLGtlhu3HflWuSx2SKkc8t+bZq61nHtV+Car83x3ct9No1Z mRvkvBPG3htKDmQC5KMv2rE9dPq0mKtO/2At5BzEjlMi/3k2WRxVhCYWWPsOyLQx39Jz 7+ervRNvJIRbx+JclPKV8+CaKkvo0u3V9UKp5tx7uhWfNkoLGmUvLO+sH1i8wx2Th3VR z7l8eGAaKPJmZs6Hp+Sn+DPvTpqZwQcZ/2QhBSxjU4kXW657C9bfYV2y5Y3OUEGNemVg xJcQ== MIME-Version: 1.0 Received: by 10.60.30.104 with SMTP id r8mr22241622oeh.60.1351332440872; Sat, 27 Oct 2012 03:07:20 -0700 (PDT) Sender: edschouten@gmail.com Received: by 10.76.151.39 with HTTP; Sat, 27 Oct 2012 03:07:20 -0700 (PDT) In-Reply-To: <20121025121223.GA23573@freebsd.org> References: <201210251013.q9PADwYO029047@svn.freebsd.org> <20121025121223.GA23573@freebsd.org> Date: Sat, 27 Oct 2012 12:07:20 +0200 X-Google-Sender-Auth: TQw2pVPGrd58z8lMEYsTCMsuLo0 Message-ID: Subject: Re: svn commit: r242080 - in head/contrib/llvm/tools/clang: include/clang/Basic lib/Sema From: Ed Schouten To: Roman Divacky Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 10:07:22 -0000 Hi Roman, 2012/10/25 Roman Divacky : > Why? I can understand cherry picking revisions that fix bugs FreeBSD > users hit but why additional features? Because I discussed this specific warning/compiler flag with others at EuroBSDCon and most people seemed interested. By having it in our compiler binary, it lowers the barrier for people to try it on their code. Also, I am considering adding this to WARNS=6 (or maybe a WARNS=7?) by the time we make Clang the default on amd64/i386. I discussed it with the respective maintainer (dim@) and he approved, so I don't see the problem. -- Ed Schouten From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 10:14: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 B4704DFE; Sat, 27 Oct 2012 10:14:13 +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 90BC08FC08; Sat, 27 Oct 2012 10:14: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 q9RAED8D045420; Sat, 27 Oct 2012 10:14:13 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9RAEDiC045416; Sat, 27 Oct 2012 10:14:13 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210271014.q9RAEDiC045416@svn.freebsd.org> From: Alexander Motin Date: Sat, 27 Oct 2012 10:14:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242175 - in head/sys/cam: . scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 10:14:13 -0000 Author: mav Date: Sat Oct 27 10:14:12 2012 New Revision: 242175 URL: http://svn.freebsd.org/changeset/base/242175 Log: Remove priority enforcement from xpt_ation(). It is not good and even not safe in some cases to reduce CCB priority after it was scheduled with high priority. This fixes reproducible deadlock when command sent through the pass interface while ATA XPT recovers from command timeout. Instead of that enforce priority at passioctl(). libcam provides no obvious interface to specify CCB priority and so much (all?) code specifies zero (highest) priority. This change limits pass CCBs priority to NORMAL run level, allowing XPT to complete bus and device recovery after reset before running any payload. Modified: head/sys/cam/cam.h head/sys/cam/cam_xpt.c head/sys/cam/scsi/scsi_pass.c Modified: head/sys/cam/cam.h ============================================================================== --- head/sys/cam/cam.h Sat Oct 27 09:40:29 2012 (r242174) +++ head/sys/cam/cam.h Sat Oct 27 10:14:12 2012 (r242175) @@ -83,6 +83,7 @@ typedef struct { #define CAM_PRIORITY_NORMAL ((CAM_RL_NORMAL << 8) + 0x80) #define CAM_PRIORITY_NONE (u_int32_t)-1 #define CAM_PRIORITY_TO_RL(x) ((x) >> 8) +#define CAM_RL_TO_PRIORITY(x) ((x) << 8) u_int32_t generation; int index; #define CAM_UNQUEUED_INDEX -1 Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Sat Oct 27 09:40:29 2012 (r242174) +++ head/sys/cam/cam_xpt.c Sat Oct 27 10:14:12 2012 (r242175) @@ -2468,9 +2468,6 @@ xpt_action(union ccb *start_ccb) CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("xpt_action\n")); start_ccb->ccb_h.status = CAM_REQ_INPROG; - /* Compatibility for RL-unaware code. */ - if (CAM_PRIORITY_TO_RL(start_ccb->ccb_h.pinfo.priority) == 0) - start_ccb->ccb_h.pinfo.priority += CAM_PRIORITY_NORMAL - 1; (*(start_ccb->ccb_h.path->bus->xport->action))(start_ccb); } Modified: head/sys/cam/scsi/scsi_pass.c ============================================================================== --- head/sys/cam/scsi/scsi_pass.c Sat Oct 27 09:40:29 2012 (r242174) +++ head/sys/cam/scsi/scsi_pass.c Sat Oct 27 10:14:12 2012 (r242175) @@ -521,6 +521,7 @@ passioctl(struct cdev *dev, u_long cmd, struct cam_periph *periph; struct pass_softc *softc; int error; + uint32_t priority; periph = (struct cam_periph *)dev->si_drv1; if (periph == NULL) @@ -553,6 +554,11 @@ passioctl(struct cdev *dev, u_long cmd, break; } + /* Compatibility for RL/priority-unaware code. */ + priority = inccb->ccb_h.pinfo.priority; + if (priority < CAM_RL_TO_PRIORITY(CAM_RL_NORMAL)) + priority += CAM_RL_TO_PRIORITY(CAM_RL_NORMAL); + /* * Non-immediate CCBs need a CCB from the per-device pool * of CCBs, which is scheduled by the transport layer. @@ -561,15 +567,14 @@ passioctl(struct cdev *dev, u_long cmd, */ if ((inccb->ccb_h.func_code & XPT_FC_QUEUED) && ((inccb->ccb_h.func_code & XPT_FC_USER_CCB) == 0)) { - ccb = cam_periph_getccb(periph, - inccb->ccb_h.pinfo.priority); + ccb = cam_periph_getccb(periph, priority); ccb_malloced = 0; } else { ccb = xpt_alloc_ccb_nowait(); if (ccb != NULL) xpt_setup_ccb(&ccb->ccb_h, periph->path, - inccb->ccb_h.pinfo.priority); + priority); ccb_malloced = 1; } From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 10:59:08 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 C07C0588 for ; Sat, 27 Oct 2012 10:59:08 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 27D4C8FC14 for ; Sat, 27 Oct 2012 10:59:07 +0000 (UTC) Received: (qmail 71583 invoked from network); 27 Oct 2012 12:36:25 -0000 Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 27 Oct 2012 12:36:25 -0000 Message-ID: <508BBE6C.7010409@freebsd.org> Date: Sat, 27 Oct 2012 12:58:52 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r242161 - in head/sys: net netinet netpfil/pf References: <201210262106.q9QL6YgY000943@svn.freebsd.org> In-Reply-To: <201210262106.q9QL6YgY000943@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 10:59:08 -0000 On 26.10.2012 23:06, Gleb Smirnoff wrote: > Author: glebius > Date: Fri Oct 26 21:06:33 2012 > New Revision: 242161 > URL: http://svn.freebsd.org/changeset/base/242161 > > Log: > o Remove last argument to ip_fragment(), and obtain all needed information > on checksums directly from mbuf flags. This simplifies code. > o Clear CSUM_IP from the mbuf in ip_fragment() if we did checksums in > hardware. Some driver may not announce CSUM_IP in theur if_hwassist, > although try to do checksums if CSUM_IP set on mbuf. Example is em(4). I'm not getting your description here? Why work around a bug in a driver in ip_fragment() when we can fix the bug in the driver? > o While here, consistently use CSUM_IP instead of its alias CSUM_DELAY_IP. > After this change CSUM_DELAY_IP vanishes from the stack. Good. :) > Submitted by: Sebastian Kuzminsky -- Andre From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 16:07: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 E5248826; Sat, 27 Oct 2012 16:07:38 +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 CCA9C8FC0A; Sat, 27 Oct 2012 16:07: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 q9RG7chB009581; Sat, 27 Oct 2012 16:07:38 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9RG7caC009578; Sat, 27 Oct 2012 16:07:38 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201210271607.q9RG7caC009578@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 27 Oct 2012 16:07:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242179 - head/sys/modules X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 16:07:39 -0000 Author: nwhitehorn Date: Sat Oct 27 16:07:38 2012 New Revision: 242179 URL: http://svn.freebsd.org/changeset/base/242179 Log: drm(4) works just fine on PowerPC, so connect it to the build. MFC after: 2 weeks Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Sat Oct 27 14:41:45 2012 (r242178) +++ head/sys/modules/Makefile Sat Oct 27 16:07:38 2012 (r242179) @@ -783,6 +783,7 @@ _cardbus= cardbus _cbb= cbb _cfi= cfi _cpufreq= cpufreq +_drm= drm _exca= exca _nvram= powermac_nvram _pccard= pccard From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 17:06: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 215105BE; Sat, 27 Oct 2012 17:06:27 +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 0974F8FC08; Sat, 27 Oct 2012 17:06: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 q9RH6QpP019000; Sat, 27 Oct 2012 17:06:26 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9RH6Qu4018997; Sat, 27 Oct 2012 17:06:26 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201210271706.q9RH6Qu4018997@svn.freebsd.org> From: Hiroki Sato Date: Sat, 27 Oct 2012 17:06:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242181 - in head/etc: . rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 17:06:27 -0000 Author: hrs Date: Sat Oct 27 17:06:26 2012 New Revision: 242181 URL: http://svn.freebsd.org/changeset/base/242181 Log: Fix an issue when ipv6_enable=YES && ipv6_gateway_enable=YES which could prevent rtadvd(8) from working as intended. Spotted by: brian Discussed with: brian Modified: head/etc/network.subr head/etc/rc.d/rtadvd Modified: head/etc/network.subr ============================================================================== --- head/etc/network.subr Sat Oct 27 16:44:41 2012 (r242180) +++ head/etc/network.subr Sat Oct 27 17:06:26 2012 (r242181) @@ -504,7 +504,11 @@ ipv6_autoconfif() # backward compatibility: $ipv6_enable case $ipv6_enable in [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) - return 0 + if checkyesno ipv6_gateway_enable; then + return 1 + else + return 0 + fi ;; esac Modified: head/etc/rc.d/rtadvd ============================================================================== --- head/etc/rc.d/rtadvd Sat Oct 27 16:44:41 2012 (r242180) +++ head/etc/rc.d/rtadvd Sat Oct 27 17:06:26 2012 (r242181) @@ -51,10 +51,6 @@ rtadvd_precmd() ;; esac - for iface in ${command_args}; do - ifconfig ${iface} inet6 -accept_rtadv - done - # Enable Router Renumbering, unicast case # (use correct src/dst addr) # rtadvd -R "in ipsec ah/transport/fec0:0:0:1::1-fec0:0:0:10::1/require" ${ipv6_network_interfaces} From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 17:09: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 87C3483C; Sat, 27 Oct 2012 17:09:00 +0000 (UTC) (envelope-from utisoft@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 83E468FC19; Sat, 27 Oct 2012 17:08:59 +0000 (UTC) Received: by mail-bk0-f54.google.com with SMTP id jf20so1620163bkc.13 for ; Sat, 27 Oct 2012 10:08:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=T1um28tJl68+b7dwetRDQGk/EGTnYp6sr+Dd1AhEuQc=; b=IAvxe5RGiwImAwn7gLHPW/Vj6ietJZerDVm9qhx5gHSc8FLDZRyYqxtkg7SgTQF8rI k6LqeRK7e/U2afFwS10P4wmCopRWguuyLuqnF4ABgpphxyfg1ifzicgw95UUy2+Vybpz BI26Dnp54hpBirOScdnSvVb+SBV1jEaWmUvYzAoUT7EwaGvRE9at5UXtWVSN6lZ4i+Uh bCKDOY9dRZ5rNMZpyRMIC7GT64HI+JFjWaOc1Lh7sk5DMqUoFc2O4VI/VeVkzzxzcf9+ UWdXsBFrRbVhP+0Uatg/YCXyxfC9/1VFEkSzv1hw4RJ09ioC2Q3j02xz6uOzA/0sEjFK Qi9Q== Received: by 10.205.137.7 with SMTP id im7mr7857133bkc.25.1351357738442; Sat, 27 Oct 2012 10:08:58 -0700 (PDT) MIME-Version: 1.0 Sender: utisoft@gmail.com Received: by 10.204.50.197 with HTTP; Sat, 27 Oct 2012 10:08:28 -0700 (PDT) In-Reply-To: <201210271706.q9RH6Qu4018997@svn.freebsd.org> References: <201210271706.q9RH6Qu4018997@svn.freebsd.org> From: Chris Rees Date: Sat, 27 Oct 2012 18:08:28 +0100 X-Google-Sender-Auth: AYXTG77qu2OgDokwLT3zccIusX0 Message-ID: Subject: Re: svn commit: r242181 - in head/etc: . rc.d To: Hiroki Sato Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 17:09:00 -0000 On 27 October 2012 18:06, Hiroki Sato wrote: > Author: hrs > Date: Sat Oct 27 17:06:26 2012 > New Revision: 242181 > URL: http://svn.freebsd.org/changeset/base/242181 > > Log: > Fix an issue when ipv6_enable=YES && ipv6_gateway_enable=YES which could > prevent rtadvd(8) from working as intended. > > Spotted by: brian > Discussed with: brian > > Modified: > head/etc/network.subr > head/etc/rc.d/rtadvd > > Modified: head/etc/network.subr > ============================================================================== > --- head/etc/network.subr Sat Oct 27 16:44:41 2012 (r242180) > +++ head/etc/network.subr Sat Oct 27 17:06:26 2012 (r242181) > @@ -504,7 +504,11 @@ ipv6_autoconfif() > # backward compatibility: $ipv6_enable > case $ipv6_enable in > [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) > - return 0 > + if checkyesno ipv6_gateway_enable; then > + return 1 > + else > + return 0 > + fi While there, any chance to use checkyesno ipv6_enable too? Chris From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 17:21: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 24DD6B8C; Sat, 27 Oct 2012 17:21:05 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) by mx1.freebsd.org (Postfix) with ESMTP id 177158FC17; Sat, 27 Oct 2012 17:21:03 +0000 (UTC) Received: from alph.allbsd.org (p1137-ipbf1505funabasi.chiba.ocn.ne.jp [118.7.212.137]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id q9RHKlPQ076557 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 28 Oct 2012 02:20:57 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) (authenticated bits=0) by alph.allbsd.org (8.14.5/8.14.5) with ESMTP id q9RHKjZt049917; Sun, 28 Oct 2012 02:20:47 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Sun, 28 Oct 2012 02:20:34 +0900 (JST) Message-Id: <20121028.022034.1805071030218844630.hrs@allbsd.org> To: crees@FreeBSD.org Subject: Re: svn commit: r242181 - in head/etc: . rc.d From: Hiroki Sato In-Reply-To: References: <201210271706.q9RH6Qu4018997@svn.freebsd.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.5 on Emacs 23.4 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Sun_Oct_28_02_20_34_2012_763)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Sun, 28 Oct 2012 02:20:57 +0900 (JST) X-Spam-Status: No, score=-98.1 required=13.0 tests=CONTENT_TYPE_PRESENT, ONLY1HOPDIRECT,SAMEHELOBY2HOP,USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 17:21:05 -0000 ----Security_Multipart(Sun_Oct_28_02_20_34_2012_763)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Chris Rees wrote in : cr> On 27 October 2012 18:06, Hiroki Sato wrote: cr> > Author: hrs cr> > Date: Sat Oct 27 17:06:26 2012 cr> > New Revision: 242181 cr> > URL: http://svn.freebsd.org/changeset/base/242181 cr> > cr> > Log: cr> > Fix an issue when ipv6_enable=YES && ipv6_gateway_enable=YES which could cr> > prevent rtadvd(8) from working as intended. cr> > cr> > Spotted by: brian cr> > Discussed with: brian cr> > cr> > Modified: cr> > head/etc/network.subr cr> > head/etc/rc.d/rtadvd cr> > cr> > Modified: head/etc/network.subr cr> > ============================================================================== cr> > --- head/etc/network.subr Sat Oct 27 16:44:41 2012 (r242180) cr> > +++ head/etc/network.subr Sat Oct 27 17:06:26 2012 (r242181) cr> > @@ -504,7 +504,11 @@ ipv6_autoconfif() cr> > # backward compatibility: $ipv6_enable cr> > case $ipv6_enable in cr> > [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) cr> > - return 0 cr> > + if checkyesno ipv6_gateway_enable; then cr> > + return 1 cr> > + else cr> > + return 0 cr> > + fi cr> cr> While there, any chance to use checkyesno ipv6_enable too? No, this is intentional because ipv6_enable is a deprecated variable and a "not set properly" warning should not be displayed even if it is not defined. -- Hiroki ----Security_Multipart(Sun_Oct_28_02_20_34_2012_763)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEUEABECAAYFAlCMF+IACgkQTyzT2CeTzy3rrACgksfKcerpXpCBiOGcEnDZ6Ujq ibEAl2BB2iStZjV66X3nfCbpkB5hhV8= =XobH -----END PGP SIGNATURE----- ----Security_Multipart(Sun_Oct_28_02_20_34_2012_763)---- From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 17:26:10 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 BC927D4F; Sat, 27 Oct 2012 17:26:10 +0000 (UTC) (envelope-from utisoft@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 B57E68FC0A; Sat, 27 Oct 2012 17:26:09 +0000 (UTC) Received: by mail-bk0-f54.google.com with SMTP id jf20so1622173bkc.13 for ; Sat, 27 Oct 2012 10:26:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=FZLBnMCUlcgo6D6JHEiUhPqSK3AI5ypUkVnYvn6XAEo=; b=UbAgU7EQvBsVUjj0AIpoaJ7LXTLMhWSJfP0X236PokpqykkM+tTWQAShXn8ziXOK6E UVcMVI9Kgl8Q4EY0M9nqF4reWpYcI4uKbcg1SlLf0paCyOX6r35xLz2P+n2o0nzS/4qi liDq24edq4GPn6FX/EXp3M8HT9LbLz5pMwaqlaV3SllWRjiTqwtcXo75y9B/cS0nZkmE yyPQTIMfKFq4uN3TYkaSIGY/XiOVJwGMZucvTouDC8hUKdktRzZ+xoDsqFhv6F5/67Or iGYdibmdpZgD6+hIJ5b0GwVx87G9v7a5fj4wmwP/c1CVxy45ovCDO5lsy18fnzGDiHjk lvQg== Received: by 10.204.150.213 with SMTP id z21mr8231493bkv.45.1351358768457; Sat, 27 Oct 2012 10:26:08 -0700 (PDT) MIME-Version: 1.0 Sender: utisoft@gmail.com Received: by 10.204.50.197 with HTTP; Sat, 27 Oct 2012 10:25:38 -0700 (PDT) In-Reply-To: <20121028.022034.1805071030218844630.hrs@allbsd.org> References: <201210271706.q9RH6Qu4018997@svn.freebsd.org> <20121028.022034.1805071030218844630.hrs@allbsd.org> From: Chris Rees Date: Sat, 27 Oct 2012 18:25:38 +0100 X-Google-Sender-Auth: C5pwmrEWolFcp7Ip2J7Q9bcO6_Q Message-ID: Subject: Re: svn commit: r242181 - in head/etc: . rc.d To: Hiroki Sato Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 17:26:10 -0000 On 27 October 2012 18:20, Hiroki Sato wrote: > Chris Rees wrote > in : > > cr> On 27 October 2012 18:06, Hiroki Sato wrote: > cr> > Author: hrs > cr> > Date: Sat Oct 27 17:06:26 2012 > cr> > New Revision: 242181 > cr> > URL: http://svn.freebsd.org/changeset/base/242181 > cr> > > cr> > Log: > cr> > Fix an issue when ipv6_enable=YES && ipv6_gateway_enable=YES which could > cr> > prevent rtadvd(8) from working as intended. > cr> > > cr> > Spotted by: brian > cr> > Discussed with: brian > cr> > > cr> > Modified: > cr> > head/etc/network.subr > cr> > head/etc/rc.d/rtadvd > cr> > > cr> > Modified: head/etc/network.subr > cr> > ============================================================================== > cr> > --- head/etc/network.subr Sat Oct 27 16:44:41 2012 (r242180) > cr> > +++ head/etc/network.subr Sat Oct 27 17:06:26 2012 (r242181) > cr> > @@ -504,7 +504,11 @@ ipv6_autoconfif() > cr> > # backward compatibility: $ipv6_enable > cr> > case $ipv6_enable in > cr> > [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) > cr> > - return 0 > cr> > + if checkyesno ipv6_gateway_enable; then > cr> > + return 1 > cr> > + else > cr> > + return 0 > cr> > + fi > cr> > cr> While there, any chance to use checkyesno ipv6_enable too? > > No, this is intentional because ipv6_enable is a deprecated variable > and a "not set properly" warning should not be displayed even if it > is not defined. Thanks for clarifying. Chris From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 17:39: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 2940524A; Sat, 27 Oct 2012 17:39:37 +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 09BA38FC0C; Sat, 27 Oct 2012 17:39: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 q9RHdaYE024527; Sat, 27 Oct 2012 17:39:36 GMT (envelope-from kan@svn.freebsd.org) Received: (from kan@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9RHdaLX024525; Sat, 27 Oct 2012 17:39:36 GMT (envelope-from kan@svn.freebsd.org) Message-Id: <201210271739.q9RHdaLX024525@svn.freebsd.org> From: Alexander Kabaev Date: Sat, 27 Oct 2012 17:39:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242182 - head/contrib/gcc/config/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 17:39:37 -0000 Author: kan Date: Sat Oct 27 17:39:36 2012 New Revision: 242182 URL: http://svn.freebsd.org/changeset/base/242182 Log: Follow clang lead and include mm_malloc.h only in hosted configurations. This makes the use of intrinsics easier in kernel environment, according to the submitter. Requested by: jmg Modified: head/contrib/gcc/config/i386/xmmintrin.h Modified: head/contrib/gcc/config/i386/xmmintrin.h ============================================================================== --- head/contrib/gcc/config/i386/xmmintrin.h Sat Oct 27 17:06:26 2012 (r242181) +++ head/contrib/gcc/config/i386/xmmintrin.h Sat Oct 27 17:39:36 2012 (r242182) @@ -39,7 +39,9 @@ #include /* Get _mm_malloc () and _mm_free (). */ +#if __STDC_HOSTED__ #include +#endif /* The Intel API is flexible enough that we must allow aliasing with other vector types, and their scalar components. */ From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 17:43: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 60B7053D; Sat, 27 Oct 2012 17:43:31 +0000 (UTC) (envelope-from crees@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 491A18FC16; Sat, 27 Oct 2012 17:43: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 q9RHhV4i025245; Sat, 27 Oct 2012 17:43:31 GMT (envelope-from crees@svn.freebsd.org) Received: (from crees@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9RHhVv5025243; Sat, 27 Oct 2012 17:43:31 GMT (envelope-from crees@svn.freebsd.org) Message-Id: <201210271743.q9RHhVv5025243@svn.freebsd.org> From: Chris Rees Date: Sat, 27 Oct 2012 17:43:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242183 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 17:43:31 -0000 Author: crees (ports committer) Date: Sat Oct 27 17:43:30 2012 New Revision: 242183 URL: http://svn.freebsd.org/changeset/base/242183 Log: Allow spaces in _chroot Noticed by: adj (IRC/#bsdports) Approved by: hrs MFC after: 1 month Modified: head/etc/rc.subr Modified: head/etc/rc.subr ============================================================================== --- head/etc/rc.subr Sat Oct 27 17:39:36 2012 (r242182) +++ head/etc/rc.subr Sat Oct 27 17:43:30 2012 (r242183) @@ -261,8 +261,8 @@ _find_processes() _pref= if [ $_interpreter != "." ]; then # an interpreted script - _script=${_chroot}${_chroot:+"/"}$_procname - if [ -r $_script ]; then + _script="${_chroot}${_chroot:+/}$_procname" + if [ -r "$_script" ]; then read _interp < $_script # read interpreter name case "$_interp" in \#!*) @@ -705,7 +705,7 @@ run_rc_command() return 1 fi - if [ ! -x ${_chroot}${_chroot:+"/"}${command} ]; then + if [ ! -x "${_chroot}${_chroot:+/}${command}" ]; then warn "run_rc_command: cannot run $command" return 1 fi From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 19:09:10 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 4F00B220; Sat, 27 Oct 2012 19:09:10 +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 1E0668FC08; Sat, 27 Oct 2012 19:09: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 q9RJ99WG039300; Sat, 27 Oct 2012 19:09:09 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9RJ99fi039297; Sat, 27 Oct 2012 19:09:09 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201210271909.q9RJ99fi039297@svn.freebsd.org> From: Hiroki Sato Date: Sat, 27 Oct 2012 19:09:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242184 - in head: etc share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 19:09:10 -0000 Author: hrs Date: Sat Oct 27 19:09:09 2012 New Revision: 242184 URL: http://svn.freebsd.org/changeset/base/242184 Log: Add setfib(1) support for services as _fib in rc.conf. Modified: head/etc/rc.subr head/share/man/man5/rc.conf.5 Modified: head/etc/rc.subr ============================================================================== --- head/etc/rc.subr Sat Oct 27 17:43:30 2012 (r242183) +++ head/etc/rc.subr Sat Oct 27 19:09:09 2012 (r242184) @@ -462,6 +462,8 @@ check_startmsgs() # NOTE: $flags from the parent environment # can be used to override this. # +# ${name}_fib n Routing table number to run ${command} with. +# # ${name}_nice n Nice level to run ${command} at. # # ${name}_user n User to run ${command} as, using su(1) if not @@ -640,7 +642,8 @@ run_rc_command() fi eval _chdir=\$${name}_chdir _chroot=\$${name}_chroot \ _nice=\$${name}_nice _user=\$${name}_user \ - _group=\$${name}_group _groups=\$${name}_groups + _group=\$${name}_group _groups=\$${name}_groups \ + _fib=\$${name}_fib if [ -n "$_user" ]; then # unset $_user if running as that user if [ "$_user" = "$(eval $IDCMD)" ]; then @@ -721,11 +724,13 @@ run_rc_command() if [ -n "$_chroot" ]; then _doit="\ ${_nice:+nice -n $_nice }\ +${_fib:+setfib -F $_fib }\ chroot ${_user:+-u $_user }${_group:+-g $_group }${_groups:+-G $_groups }\ $_chroot $command $rc_flags $command_args" else _doit="\ ${_chdir:+cd $_chdir && }\ +${_fib:+setfib -F $_fib }\ $command $rc_flags $command_args" if [ -n "$_user" ]; then _doit="su -m $_user -c 'sh -c \"$_doit\"'" Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Sat Oct 27 17:43:30 2012 (r242183) +++ head/share/man/man5/rc.conf.5 Sat Oct 27 19:09:09 2012 (r242184) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 22, 2012 +.Dd October 27, 2012 .Dt RC.CONF 5 .Os .Sh NAME @@ -179,6 +179,11 @@ Run the service under this user account. .Pq Vt str Run the chrooted service under this system group. Unlike the _user setting, this setting has no effect if the service is not chrooted. +.It Ao Ar name Ac Ns Va _fib +.Pq Vt int +The +.Xr setfib 1 +value to run the service under. .It Ao Ar name Ac Ns Va _nice .Pq Vt int The From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 19:25: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 4426D8A4; Sat, 27 Oct 2012 19:25:30 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id 03B038FC0A; Sat, 27 Oct 2012 19:25:29 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id 74A6ACD; Sat, 27 Oct 2012 21:24:03 +0200 (CEST) Date: Sat, 27 Oct 2012 21:26:17 +0200 From: Pawel Jakub Dawidek To: Davide Italiano Subject: Re: svn commit: r242097 - head/sys/fs/smbfs Message-ID: <20121027192617.GC1405@garage.freebsd.pl> References: <201210252108.q9PL83sp046322@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gr/z0/N6AeWAPJVB" Content-Disposition: inline In-Reply-To: <201210252108.q9PL83sp046322@svn.freebsd.org> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 19:25:30 -0000 --gr/z0/N6AeWAPJVB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 25, 2012 at 09:08:03PM +0000, Davide Italiano wrote: > Author: davide > Date: Thu Oct 25 21:08:02 2012 > New Revision: 242097 > URL: http://svn.freebsd.org/changeset/base/242097 >=20 > Log: > Fix build in case we have SMBVDEBUG turned on. [...] > - SMBVDEBUG("ofs=3D%d,resid=3D%d\n",(int)uiop->uio_offset, uiop->uio_resi= d); > + SMBVDEBUG("ofs=3D%d,resid=3D%zd\n",(int)uiop->uio_offset, uiop->uio_res= id); While you are here, you may want to change the code to use %jd for uio_offset and cast it to (intmax_t). --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --gr/z0/N6AeWAPJVB Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlCMNVkACgkQForvXbEpPzT+wwCfXNUu60I8PYKJxCVIR4qxo30A bcMAoPjh6esTNvvVBT/ULEW9urgZ3/Fa =ixwQ -----END PGP SIGNATURE----- --gr/z0/N6AeWAPJVB-- From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 19:28: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 B348EAF5; Sat, 27 Oct 2012 19:28:28 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id 71F2E8FC0A; Sat, 27 Oct 2012 19:28:28 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id C32D3CF; Sat, 27 Oct 2012 21:27:02 +0200 (CEST) Date: Sat, 27 Oct 2012 21:29:17 +0200 From: Pawel Jakub Dawidek To: Maxim Sobolev Subject: Re: svn commit: r242101 - in head/usr.sbin/cron: cron crontab lib Message-ID: <20121027192916.GD1405@garage.freebsd.pl> References: <201210252254.q9PMsUFK065335@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fOHHtNG4YXGJ0yqR" Content-Disposition: inline In-Reply-To: <201210252254.q9PMsUFK065335@svn.freebsd.org> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 19:28:28 -0000 --fOHHtNG4YXGJ0yqR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 25, 2012 at 10:54:30PM +0000, Maxim Sobolev wrote: > Author: sobomax > Date: Thu Oct 25 22:54:29 2012 > New Revision: 242101 > URL: http://svn.freebsd.org/changeset/base/242101 >=20 > Log: > Second attempt to add @every_second keyword support. Due to multiple > requests, default to the previous 60-seconds scheduling method > unless there is any @every_second entries to conserve CPU cycles and > power. On behalf of Mother Earth thank you:) --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --fOHHtNG4YXGJ0yqR Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlCMNgwACgkQForvXbEpPzR+HwCguYPXM8gNTfgXjixE2HLuwrzu MdMAoIC/89ZIRhWr9AZOPeSc/yZsdJJE =DUqg -----END PGP SIGNATURE----- --fOHHtNG4YXGJ0yqR-- From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 19:31: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 C92EFD3E; Sat, 27 Oct 2012 19:31:58 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 7625D8FC0A; Sat, 27 Oct 2012 19:31:56 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id b5so2945570lbd.13 for ; Sat, 27 Oct 2012 12:31:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=knTgsUBsu056VSAZ6LpC7XQknxzZ4mM/ecYI++t2X+4=; b=k5iSmPR9ft4i4AG2n+ZDI6sVqx7d52+upRyMC5FK10kmJBBuhazjxSqb1CFTUjqLXe zmTbqlEKaQ+mRflLAelL1X9vU2ZhzXlBIKeIoZTStlTdVWqHlqbesAd+As15oxNcC8ak nE8rlNShmYIpv6LxMpYhISa80WTQHRX8mAvFgg4fUzavoru1OkOR+ft6LVNiaME2N3hw c4P1EJFYkfNFrkdKdOT8oK5xDOLfmWnDTQlxfF+hI1vk33utmbVQ9sjYo+CV38iKFHh2 qigEuJ1miO4abiwFEzjS80+JKBkaK9z6GV9+9y4JL2JZta9qeRvXJbIod8jqNPD0y9nf VJHQ== MIME-Version: 1.0 Received: by 10.112.82.103 with SMTP id h7mr10140942lby.50.1351366316089; Sat, 27 Oct 2012 12:31:56 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.30.37 with HTTP; Sat, 27 Oct 2012 12:31:56 -0700 (PDT) In-Reply-To: <20121022202805.GJ70741@FreeBSD.org> References: <201210221754.q9MHsWcl062675@svn.freebsd.org> <20121022202805.GJ70741@FreeBSD.org> Date: Sat, 27 Oct 2012 20:31:56 +0100 X-Google-Sender-Auth: 22qs8f3prJNKzjG18Hz2XWqjKYg Message-ID: Subject: Re: svn commit: r241897 - in head: . sys/sys From: Attilio Rao To: Gleb Smirnoff Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Konstantin Belousov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: "SVN commit messages 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, 27 Oct 2012 19:31:58 -0000 On Mon, Oct 22, 2012 at 9:28 PM, Gleb Smirnoff wrote: > On Mon, Oct 22, 2012 at 07:28:42PM +0100, Attilio Rao wrote: > A> On 10/22/12, Konstantin Belousov wrote: > A> > Author: kib > A> > Date: Mon Oct 22 17:54:32 2012 > A> > New Revision: 241897 > A> > URL: http://svn.freebsd.org/changeset/base/241897 > A> > > A> > Log: > A> > Bump __FreeBSD_version and make a note in UPDATING about removal of > A> > the support for non-MPSAFE filesystems. > A> > A> Also, the __FreeBSD_version bump can be used for FUSE import and > A> NON-mpsafe filesystems removal as well. > > Can you please mention this in the doc repo, where we document __FreeBSD_version > values? Done in r39819 of the book.xml. Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 19:37: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 901C1F8E; Sat, 27 Oct 2012 19:37:27 +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 76B5B8FC08; Sat, 27 Oct 2012 19:37: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 q9RJbRWS043814; Sat, 27 Oct 2012 19:37:27 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9RJbRVD043811; Sat, 27 Oct 2012 19:37:27 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201210271937.q9RJbRVD043811@svn.freebsd.org> From: Hiroki Sato Date: Sat, 27 Oct 2012 19:37:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242185 - stable/9/release X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 19:37:27 -0000 Author: hrs Date: Sat Oct 27 19:37:26 2012 New Revision: 242185 URL: http://svn.freebsd.org/changeset/base/242185 Log: MFC of 240586 and 240587 to unbreak release building: Update generate-release.sh script: - Use svn for ports and doc trees - When installing a binary textproc/docproj package, switch pkg_add(1) to pkg(8) [1] Modified: stable/9/release/generate-release.sh Directory Properties: stable/9/release/ (props changed) stable/9/release/doc/ (props changed) Modified: stable/9/release/generate-release.sh ============================================================================== --- stable/9/release/generate-release.sh Sat Oct 27 19:09:09 2012 (r242184) +++ stable/9/release/generate-release.sh Sat Oct 27 19:37:26 2012 (r242185) @@ -3,14 +3,10 @@ # generate-release.sh: check out source trees, and build release components with # totally clean, fresh trees. # -# Usage: generate-release.sh svn-branch scratch-dir +# Usage: generate-release.sh [-r revision] [-d docrevision] \ +# [-p portsrevision] svn-branch scratch-dir # # Environment variables: -# CVSUP_HOST: Host of a cvsup server to obtain the ports and documentation -# trees. This or CVSROOT must be set to include ports and documentation. -# CVSROOT: CVS root to obtain the ports and documentation trees. This or -# CVSUP_HOST must be set to include ports and documentation. -# CVS_TAG: CVS tag for ports and documentation (HEAD by default) # SVNROOT: SVN URL to FreeBSD source repository (by default, # svn://svn.freebsd.org/base) # MAKE_FLAGS: optional flags to pass to make (e.g. -j) @@ -20,26 +16,42 @@ # $FreeBSD$ # -mkdir -p $2/usr/src +usage() +{ + echo "Usage: $0 [-r revision] [-d docrevision] [-p portsrevision] svn-branch scratch-dir" + exit 1 +} + +REVISION= +DOCREVISION= +PORTSREVISION= +while getopts d:r:p: opt; do + case $opt in + d) + DOCREVISION="-r $OPTARG" + ;; + r) + REVISION="-r $OPTARG" + ;; + p) + PORTSREVISION="-r $OPTARG" + ;; + \?) + usage + ;; + esac +done +shift $(($OPTIND - 1)) + +if [ $# -lt 2 ]; then + usage +fi + set -e # Everything must succeed svn co ${SVNROOT:-svn://svn.freebsd.org/base}/$1 $2/usr/src -if [ ! -z $CVSUP_HOST ]; then - cat > $2/docports-supfile << EOF - *default host=$CVSUP_HOST - *default base=/var/db - *default prefix=/usr - *default release=cvs tag=${CVS_TAG:-.} - *default delete use-rel-suffix - *default compress - ports-all - doc-all -EOF -elif [ ! -z $CVSROOT ]; then - cd $2/usr - cvs -R ${CVSARGS} -d ${CVSROOT} co -P -r ${CVS_TAG:-HEAD} ports - cvs -R ${CVSARGS} -d ${CVSROOT} co -P -r ${CVS_TAG:-HEAD} doc -fi +svn co ${SVNROOT:-svn://svn.freebsd.org/doc}/head $2/usr/doc $DOCREVISION +svn co ${SVNROOT:-svn://svn.freebsd.org/ports}/head $2/usr/ports $PORTSREVISION cd $2/usr/src make $MAKE_FLAGS buildworld @@ -47,18 +59,11 @@ make installworld distribution DESTDIR=$ mount -t devfs devfs $2/dev trap "umount $2/dev" EXIT # Clean up devfs mount on exit -if [ ! -z $CVSUP_HOST ]; then - cp /etc/resolv.conf $2/etc/resolv.conf - - # Checkout ports and doc trees - chroot $2 /usr/bin/csup /docports-supfile -fi - if [ -d $2/usr/doc ]; then cp /etc/resolv.conf $2/etc/resolv.conf - # Build ports to build release documentation - chroot $2 /bin/sh -c 'pkg_add -r docproj || (cd /usr/ports/textproc/docproj && make install clean BATCH=yes WITHOUT_X11=yes JADETEX=no WITHOUT_PYTHON=yes)' + # Install docproj to build release documentation + chroot $2 /bin/sh -c '(export ASSUME_ALWAYS_YES=1 && /usr/sbin/pkg install -y docproj) || (cd /usr/ports/textproc/docproj && make install clean BATCH=yes WITHOUT_X11=yes JADETEX=no WITHOUT_PYTHON=yes)' fi chroot $2 make -C /usr/src $MAKE_FLAGS buildworld buildkernel From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 19:40: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 F347B2BC; Sat, 27 Oct 2012 19:40:25 +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 C90AD8FC0A; Sat, 27 Oct 2012 19:40: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 q9RJePoQ044420; Sat, 27 Oct 2012 19:40:25 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9RJePqc044417; Sat, 27 Oct 2012 19:40:25 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201210271940.q9RJePqc044417@svn.freebsd.org> From: Hiroki Sato Date: Sat, 27 Oct 2012 19:40:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r242186 - releng/9.1/release X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 19:40:26 -0000 Author: hrs Date: Sat Oct 27 19:40:25 2012 New Revision: 242186 URL: http://svn.freebsd.org/changeset/base/242186 Log: MFC of 240586 and 240587 to unbreak release building: Update generate-release.sh script: - Use svn for ports and doc trees - When installing a binary textproc/docproj package, switch pkg_add(1) to pkg(8) [1] Approved by: re (implicitly) Modified: releng/9.1/release/generate-release.sh Directory Properties: releng/9.1/release/ (props changed) Modified: releng/9.1/release/generate-release.sh ============================================================================== --- releng/9.1/release/generate-release.sh Sat Oct 27 19:37:26 2012 (r242185) +++ releng/9.1/release/generate-release.sh Sat Oct 27 19:40:25 2012 (r242186) @@ -3,14 +3,10 @@ # generate-release.sh: check out source trees, and build release components with # totally clean, fresh trees. # -# Usage: generate-release.sh svn-branch scratch-dir +# Usage: generate-release.sh [-r revision] [-d docrevision] \ +# [-p portsrevision] svn-branch scratch-dir # # Environment variables: -# CVSUP_HOST: Host of a cvsup server to obtain the ports and documentation -# trees. This or CVSROOT must be set to include ports and documentation. -# CVSROOT: CVS root to obtain the ports and documentation trees. This or -# CVSUP_HOST must be set to include ports and documentation. -# CVS_TAG: CVS tag for ports and documentation (HEAD by default) # SVNROOT: SVN URL to FreeBSD source repository (by default, # svn://svn.freebsd.org/base) # MAKE_FLAGS: optional flags to pass to make (e.g. -j) @@ -20,26 +16,42 @@ # $FreeBSD$ # -mkdir -p $2/usr/src +usage() +{ + echo "Usage: $0 [-r revision] [-d docrevision] [-p portsrevision] svn-branch scratch-dir" + exit 1 +} + +REVISION= +DOCREVISION= +PORTSREVISION= +while getopts d:r:p: opt; do + case $opt in + d) + DOCREVISION="-r $OPTARG" + ;; + r) + REVISION="-r $OPTARG" + ;; + p) + PORTSREVISION="-r $OPTARG" + ;; + \?) + usage + ;; + esac +done +shift $(($OPTIND - 1)) + +if [ $# -lt 2 ]; then + usage +fi + set -e # Everything must succeed svn co ${SVNROOT:-svn://svn.freebsd.org/base}/$1 $2/usr/src -if [ ! -z $CVSUP_HOST ]; then - cat > $2/docports-supfile << EOF - *default host=$CVSUP_HOST - *default base=/var/db - *default prefix=/usr - *default release=cvs tag=${CVS_TAG:-.} - *default delete use-rel-suffix - *default compress - ports-all - doc-all -EOF -elif [ ! -z $CVSROOT ]; then - cd $2/usr - cvs -R ${CVSARGS} -d ${CVSROOT} co -P -r ${CVS_TAG:-HEAD} ports - cvs -R ${CVSARGS} -d ${CVSROOT} co -P -r ${CVS_TAG:-HEAD} doc -fi +svn co ${SVNROOT:-svn://svn.freebsd.org/doc}/head $2/usr/doc $DOCREVISION +svn co ${SVNROOT:-svn://svn.freebsd.org/ports}/head $2/usr/ports $PORTSREVISION cd $2/usr/src make $MAKE_FLAGS buildworld @@ -47,18 +59,11 @@ make installworld distribution DESTDIR=$ mount -t devfs devfs $2/dev trap "umount $2/dev" EXIT # Clean up devfs mount on exit -if [ ! -z $CVSUP_HOST ]; then - cp /etc/resolv.conf $2/etc/resolv.conf - - # Checkout ports and doc trees - chroot $2 /usr/bin/csup /docports-supfile -fi - if [ -d $2/usr/doc ]; then cp /etc/resolv.conf $2/etc/resolv.conf - # Build ports to build release documentation - chroot $2 /bin/sh -c 'pkg_add -r docproj || (cd /usr/ports/textproc/docproj && make install clean BATCH=yes WITHOUT_X11=yes JADETEX=no WITHOUT_PYTHON=yes)' + # Install docproj to build release documentation + chroot $2 /bin/sh -c '(export ASSUME_ALWAYS_YES=1 && /usr/sbin/pkg install -y docproj) || (cd /usr/ports/textproc/docproj && make install clean BATCH=yes WITHOUT_X11=yes JADETEX=no WITHOUT_PYTHON=yes)' fi chroot $2 make -C /usr/src $MAKE_FLAGS buildworld buildkernel From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 19:49: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 1AAAC6E6; Sat, 27 Oct 2012 19:49:16 +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 00A988FC08; Sat, 27 Oct 2012 19:49: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 q9RJnFd7045935; Sat, 27 Oct 2012 19:49:15 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9RJnFKk045933; Sat, 27 Oct 2012 19:49:15 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201210271949.q9RJnFKk045933@svn.freebsd.org> From: Hiroki Sato Date: Sat, 27 Oct 2012 19:49:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242187 - stable/9/etc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 19:49:16 -0000 Author: hrs Date: Sat Oct 27 19:49:15 2012 New Revision: 242187 URL: http://svn.freebsd.org/changeset/base/242187 Log: MFC r242181: Fix an issue when ipv6_enable=YES && ipv6_gateway_enable=YES which could prevent rtadvd(8) from working as intended. Spotted by: brian Discussed with: brian Modified: stable/9/etc/network.subr Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/network.subr ============================================================================== --- stable/9/etc/network.subr Sat Oct 27 19:40:25 2012 (r242186) +++ stable/9/etc/network.subr Sat Oct 27 19:49:15 2012 (r242187) @@ -109,7 +109,9 @@ ifconfig_up() # backward compatibility: $ipv6_enable case $ipv6_enable in [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) - _ipv6_opts="${_ipv6_opts} accept_rtadv" + if ! checkyesno ipv6_gateway_enable; then + _ipv6_opts="${_ipv6_opts} accept_rtadv" + fi ;; esac @@ -488,7 +490,11 @@ ipv6_autoconfif() # backward compatibility: $ipv6_enable case $ipv6_enable in [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) - return 0 + if checkyesno ipv6_gateway_enable; then + return 1 + else + return 0 + fi ;; esac From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 19:56: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 9BEFD88A; Sat, 27 Oct 2012 19:56:58 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C7B28FC08; Sat, 27 Oct 2012 19:56: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 q9RJuw8d047182; Sat, 27 Oct 2012 19:56:58 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9RJuwap047180; Sat, 27 Oct 2012 19:56:58 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201210271956.q9RJuwap047180@svn.freebsd.org> From: Devin Teske Date: Sat, 27 Oct 2012 19:56:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242188 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 19:56:58 -0000 Author: dteske Date: Sat Oct 27 19:56:57 2012 New Revision: 242188 URL: http://svn.freebsd.org/changeset/base/242188 Log: Fix bug introduced by r241902 (MANIFEST uses TAB delimiter). PR: bin/173140 Approved by: adrian (co-mentor) Modified: head/usr.sbin/bsdinstall/scripts/auto Modified: head/usr.sbin/bsdinstall/scripts/auto ============================================================================== --- head/usr.sbin/bsdinstall/scripts/auto Sat Oct 27 19:49:15 2012 (r242187) +++ head/usr.sbin/bsdinstall/scripts/auto Sat Oct 27 19:56:57 2012 (r242188) @@ -53,7 +53,7 @@ bsdinstall hostname || error export DISTRIBUTIONS="base.txz kernel.txz" if [ -f $BSDINSTALL_DISTDIR/MANIFEST ]; then - DISTMENU=`awk '!/^(kernel|base)/{print $4,$5,$6}' $BSDINSTALL_DISTDIR/MANIFEST` + DISTMENU=`awk -F'\t' '!/^(kernel|base)/{print $4,$5,$6}' $BSDINSTALL_DISTDIR/MANIFEST` exec 3>&1 EXTRA_DISTS=$( eval dialog \ From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 20:18: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 3E495F8A; Sat, 27 Oct 2012 20:18:00 +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 23D7B8FC12; Sat, 27 Oct 2012 20:18: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 q9RKHxxR050960; Sat, 27 Oct 2012 20:17:59 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9RKHxcH050958; Sat, 27 Oct 2012 20:17:59 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201210272017.q9RKHxcH050958@svn.freebsd.org> From: Hiroki Sato Date: Sat, 27 Oct 2012 20:17:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r242189 - releng/9.1/etc X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 20:18:00 -0000 Author: hrs Date: Sat Oct 27 20:17:59 2012 New Revision: 242189 URL: http://svn.freebsd.org/changeset/base/242189 Log: MFC of r242187: Fix an issue when ipv6_enable=YES && ipv6_gateway_enable=YES which could prevent rtadvd(8) from working as intended. Approved by: re (kib) Modified: releng/9.1/etc/network.subr Directory Properties: releng/9.1/etc/ (props changed) Modified: releng/9.1/etc/network.subr ============================================================================== --- releng/9.1/etc/network.subr Sat Oct 27 19:56:57 2012 (r242188) +++ releng/9.1/etc/network.subr Sat Oct 27 20:17:59 2012 (r242189) @@ -109,7 +109,9 @@ ifconfig_up() # backward compatibility: $ipv6_enable case $ipv6_enable in [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) - _ipv6_opts="${_ipv6_opts} accept_rtadv" + if ! checkyesno ipv6_gateway_enable; then + _ipv6_opts="${_ipv6_opts} accept_rtadv" + fi ;; esac @@ -488,7 +490,11 @@ ipv6_autoconfif() # backward compatibility: $ipv6_enable case $ipv6_enable in [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) - return 0 + if checkyesno ipv6_gateway_enable; then + return 1 + else + return 0 + fi ;; esac From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 21:59: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 E9C96870; Sat, 27 Oct 2012 21:59:12 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 5EC238FC08; Sat, 27 Oct 2012 21:59:12 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q9RLx7OI019632; Sun, 28 Oct 2012 01:59:07 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q9RLx7I4019631; Sun, 28 Oct 2012 01:59:07 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sun, 28 Oct 2012 01:59:07 +0400 From: Gleb Smirnoff To: Rui Paulo Subject: Re: svn commit: r241610 - in head: . sys/dev/usb sys/net sys/net80211 sys/netpfil/ipfw sys/netpfil/pf sys/sys Message-ID: <20121027215907.GI70741@FreeBSD.org> References: <201210161337.q9GDbtr8049924@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, Adrian Chadd , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 21:59:13 -0000 On Fri, Oct 26, 2012 at 09:16:08PM -0700, Rui Paulo wrote: R> I second Adrian's comments and I would like to add that you must NOT commit something like this, breaking the ABI, when you discussed this *ONE YEAR* ago with only two people (one of them is not very active in the networking stack). This is against all reasonable software development practices. - This wasn't discussed privately but on svn-src-head@ mailing list. You could participate. - No objections were raised one year ago. The code of if_cloners hasn't any single change during this year. - If you mean that brooks@ is not very active in networking stack, then I will point your attention to the fact that he is the original author of interface cloners. Now my questions: - Do we have any policy that doesn't permit changing ABI in head? - Apart from the ABI is there anything wrong with the r241610? P.S. And yes, please don't use top-quoting on FreeBSD mailing lists: http://www.freebsd.org/doc/en/articles/mailing-list-faq/etiquette.html -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 22:01: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 339E3A1A; Sat, 27 Oct 2012 22:01:39 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 9BCFA8FC18; Sat, 27 Oct 2012 22:01:38 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q9RM1bLB019666; Sun, 28 Oct 2012 02:01:37 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q9RM1b2K019665; Sun, 28 Oct 2012 02:01:37 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sun, 28 Oct 2012 02:01:37 +0400 From: Gleb Smirnoff To: Andre Oppermann Subject: Re: svn commit: r242161 - in head/sys: net netinet netpfil/pf Message-ID: <20121027220137.GJ70741@FreeBSD.org> References: <201210262106.q9QL6YgY000943@svn.freebsd.org> <508BBE6C.7010409@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <508BBE6C.7010409@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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 22:01:39 -0000 On Sat, Oct 27, 2012 at 12:58:52PM +0200, Andre Oppermann wrote: A> On 26.10.2012 23:06, Gleb Smirnoff wrote: A> > Author: glebius A> > Date: Fri Oct 26 21:06:33 2012 A> > New Revision: 242161 A> > URL: http://svn.freebsd.org/changeset/base/242161 A> > A> > Log: A> > o Remove last argument to ip_fragment(), and obtain all needed information A> > on checksums directly from mbuf flags. This simplifies code. A> > o Clear CSUM_IP from the mbuf in ip_fragment() if we did checksums in A> > hardware. Some driver may not announce CSUM_IP in theur if_hwassist, A> > although try to do checksums if CSUM_IP set on mbuf. Example is em(4). A> A> I'm not getting your description here? Why work around a bug in a driver A> in ip_fragment() when we can fix the bug in the driver? Well, that was actually bug in the stack and a very special driver that demonstrates it. I may even agree that driver is incorrect, but the stack was incorrect, too. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 22:13: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 34768D2D; Sat, 27 Oct 2012 22:13:43 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 19DA68FC0C; Sat, 27 Oct 2012 22:13: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 q9RMDgeG069101; Sat, 27 Oct 2012 22:13:42 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9RMDg5p069099; Sat, 27 Oct 2012 22:13:42 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201210272213.q9RMDg5p069099@svn.freebsd.org> From: Tim Kientzle Date: Sat, 27 Oct 2012 22:13:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242191 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 22:13:43 -0000 Author: kientzle Date: Sat Oct 27 22:13:42 2012 New Revision: 242191 URL: http://svn.freebsd.org/changeset/base/242191 Log: Missing paren. Pointy hat:me Modified: head/sys/arm/ti/ti_machdep.c Modified: head/sys/arm/ti/ti_machdep.c ============================================================================== --- head/sys/arm/ti/ti_machdep.c Sat Oct 27 21:03:29 2012 (r242190) +++ head/sys/arm/ti/ti_machdep.c Sat Oct 27 22:13:42 2012 (r242191) @@ -494,7 +494,7 @@ initarm(struct arm_boot_params *abp) env = getenv("kernelname"); if (env != NULL) - strlcpy(kernelname, env, sizeof(kernelname); + strlcpy(kernelname, env, sizeof(kernelname)); if (err_devmap != 0) printf("WARNING: could not fully configure devmap, error=%d\n", From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 22:43: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 5169040C; Sat, 27 Oct 2012 22:43:31 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 379A78FC12; Sat, 27 Oct 2012 22:43: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 q9RMhVJX073563; Sat, 27 Oct 2012 22:43:31 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9RMhVhc073559; Sat, 27 Oct 2012 22:43:31 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201210272243.q9RMhVhc073559@svn.freebsd.org> From: Alan Cox Date: Sat, 27 Oct 2012 22:43:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242193 - head/sys/mips/mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 22:43:31 -0000 Author: alc Date: Sat Oct 27 22:43:30 2012 New Revision: 242193 URL: http://svn.freebsd.org/changeset/base/242193 Log: Eliminate a redundant TLB invalidation from pmap_pv_reclaim(). Modified: head/sys/mips/mips/pmap.c Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Sat Oct 27 22:33:23 2012 (r242192) +++ head/sys/mips/mips/pmap.c Sat Oct 27 22:43:30 2012 (r242193) @@ -1440,7 +1440,6 @@ pmap_pv_reclaim(pmap_t locked_pmap) *pte = PTE_G; else *pte = 0; - pmap_invalidate_page(pmap, va); m = PHYS_TO_VM_PAGE(TLBLO_PTE_TO_PA(oldpte)); if (pte_test(&oldpte, PTE_D)) vm_page_dirty(m); From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 23: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 93FF5BE7; Sat, 27 Oct 2012 23:12:06 +0000 (UTC) (envelope-from davide@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 79FC68FC08; Sat, 27 Oct 2012 23: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 q9RNC6xY078550; Sat, 27 Oct 2012 23:12:06 GMT (envelope-from davide@svn.freebsd.org) Received: (from davide@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9RNC64v078548; Sat, 27 Oct 2012 23:12:06 GMT (envelope-from davide@svn.freebsd.org) Message-Id: <201210272312.q9RNC64v078548@svn.freebsd.org> From: Davide Italiano Date: Sat, 27 Oct 2012 23:12:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242196 - stable/9/sys/dev/bce X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 23:12:06 -0000 Author: davide Date: Sat Oct 27 23:12:05 2012 New Revision: 242196 URL: http://svn.freebsd.org/changeset/base/242196 Log: MFC r239110: Remove a spurious brace which causes build fail in case BCE_DEBUG option is turned on. Modified: stable/9/sys/dev/bce/if_bce.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/bce/if_bce.c ============================================================================== --- stable/9/sys/dev/bce/if_bce.c Sat Oct 27 22:58:02 2012 (r242195) +++ stable/9/sys/dev/bce/if_bce.c Sat Oct 27 23:12:05 2012 (r242196) @@ -10513,7 +10513,7 @@ bce_dump_ftqs(struct bce_softc *sc) (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_CPQ_VALID_CNT << 8) | (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_MGMQ_VALID_CNT); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) val = val | (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_RV2PCSQ_VALID_CNT_XI << 24); From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 23:14: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 18673DF7; Sat, 27 Oct 2012 23:14:38 +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 F16048FC14; Sat, 27 Oct 2012 23:14: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 q9RNEbFP078955; Sat, 27 Oct 2012 23:14:37 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9RNEbwa078952; Sat, 27 Oct 2012 23:14:37 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201210272314.q9RNEbwa078952@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 27 Oct 2012 23:14:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242197 - head/sys/modules/drm/via X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 23:14:38 -0000 Author: nwhitehorn Date: Sat Oct 27 23:14:37 2012 New Revision: 242197 URL: http://svn.freebsd.org/changeset/base/242197 Log: Don't try to build Linux compatibility stuff on platforms without COMPAT_LINUX. Modified: head/sys/modules/drm/via/Makefile Modified: head/sys/modules/drm/via/Makefile ============================================================================== --- head/sys/modules/drm/via/Makefile Sat Oct 27 23:12:05 2012 (r242196) +++ head/sys/modules/drm/via/Makefile Sat Oct 27 23:14:37 2012 (r242197) @@ -10,7 +10,8 @@ SRCS += device_if.h bus_if.h pci_if.h op DRM_DEBUG_OPT= "\#define DRM_DEBUG 1" .endif -.if !defined(DRM_NOLINUX) +.if !defined(DRM_NOLINUX) && \ + (${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64") DRM_LINUX_OPT= "\#define DRM_LINUX 1" .endif From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 23:17: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 8D848F70; Sat, 27 Oct 2012 23:17:23 +0000 (UTC) (envelope-from davide@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 71F128FC08; Sat, 27 Oct 2012 23:17: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 q9RNHNtv079429; Sat, 27 Oct 2012 23:17:23 GMT (envelope-from davide@svn.freebsd.org) Received: (from davide@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9RNHNRs079427; Sat, 27 Oct 2012 23:17:23 GMT (envelope-from davide@svn.freebsd.org) Message-Id: <201210272317.q9RNHNRs079427@svn.freebsd.org> From: Davide Italiano Date: Sat, 27 Oct 2012 23:17:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242198 - stable/8/sys/dev/bce X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 23:17:23 -0000 Author: davide Date: Sat Oct 27 23:17:22 2012 New Revision: 242198 URL: http://svn.freebsd.org/changeset/base/242198 Log: MFC r239110: Remove a spurious brace which causes build fail in case BCE_DEBUG option is turned on. Modified: stable/8/sys/dev/bce/if_bce.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/bce/ (props changed) Modified: stable/8/sys/dev/bce/if_bce.c ============================================================================== --- stable/8/sys/dev/bce/if_bce.c Sat Oct 27 23:14:37 2012 (r242197) +++ stable/8/sys/dev/bce/if_bce.c Sat Oct 27 23:17:22 2012 (r242198) @@ -10513,7 +10513,7 @@ bce_dump_ftqs(struct bce_softc *sc) (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_CPQ_VALID_CNT << 8) | (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_MGMQ_VALID_CNT); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) val = val | (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_RV2PCSQ_VALID_CNT_XI << 24); From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 23:30: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 1A902329; Sat, 27 Oct 2012 23:30:47 +0000 (UTC) (envelope-from davide@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DC7FB8FC08; Sat, 27 Oct 2012 23:30: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 q9RNUkFJ081483; Sat, 27 Oct 2012 23:30:46 GMT (envelope-from davide@svn.freebsd.org) Received: (from davide@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9RNUkpM081480; Sat, 27 Oct 2012 23:30:46 GMT (envelope-from davide@svn.freebsd.org) Message-Id: <201210272330.q9RNUkpM081480@svn.freebsd.org> From: Davide Italiano Date: Sat, 27 Oct 2012 23:30:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r242199 - in stable/9/sys: conf kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 23:30:47 -0000 Author: davide Date: Sat Oct 27 23:30:46 2012 New Revision: 242199 URL: http://svn.freebsd.org/changeset/base/242199 Log: MFCr238925: Until now KTR_ENTRIES, which defines the size of circular buffer used in ktr(4), was constrained to be a power of two. Remove this constraint and update sys/conf/NOTES accordingly. Modified: stable/9/sys/conf/NOTES stable/9/sys/kern/kern_ktr.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) Modified: stable/9/sys/conf/NOTES ============================================================================== --- stable/9/sys/conf/NOTES Sat Oct 27 23:17:22 2012 (r242198) +++ stable/9/sys/conf/NOTES Sat Oct 27 23:30:46 2012 (r242199) @@ -435,7 +435,7 @@ options KTRACE_REQUEST_POOL=101 # # KTR is a kernel tracing facility imported from BSD/OS. It is # enabled with the KTR option. KTR_ENTRIES defines the number of -# entries in the circular trace buffer; it must be a power of two. +# entries in the circular trace buffer; it may be an arbitrary number. # KTR_COMPILE defines the mask of events to compile into the kernel as # defined by the KTR_* constants in . KTR_MASK defines the # initial value of the ktr_mask variable which determines at runtime Modified: stable/9/sys/kern/kern_ktr.c ============================================================================== --- stable/9/sys/kern/kern_ktr.c Sat Oct 27 23:17:22 2012 (r242198) +++ stable/9/sys/kern/kern_ktr.c Sat Oct 27 23:30:46 2012 (r242199) @@ -283,7 +283,7 @@ ktr_tracepoint(u_int mask, const char *f { do { saveindex = ktr_idx; - newindex = (saveindex + 1) & (KTR_ENTRIES - 1); + newindex = (saveindex + 1) % KTR_ENTRIES; } while (atomic_cmpset_rel_int(&ktr_idx, saveindex, newindex) == 0); entry = &ktr_buf[saveindex]; } @@ -338,7 +338,7 @@ static int db_mach_vtrace(void); DB_SHOW_COMMAND(ktr, db_ktr_all) { - tstate.cur = (ktr_idx - 1) & (KTR_ENTRIES - 1); + tstate.cur = (ktr_idx - 1) % KTR_ENTRIES; tstate.first = -1; db_ktr_verbose = 0; db_ktr_verbose |= (index(modif, 'v') != NULL) ? 2 : 0; From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 23:34: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 41F5C4F8; Sat, 27 Oct 2012 23:34:19 +0000 (UTC) (envelope-from davide@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 105808FC0C; Sat, 27 Oct 2012 23:34: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 q9RNYIeJ082065; Sat, 27 Oct 2012 23:34:18 GMT (envelope-from davide@svn.freebsd.org) Received: (from davide@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9RNYI3J082062; Sat, 27 Oct 2012 23:34:18 GMT (envelope-from davide@svn.freebsd.org) Message-Id: <201210272334.q9RNYI3J082062@svn.freebsd.org> From: Davide Italiano Date: Sat, 27 Oct 2012 23:34:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242200 - in stable/8/sys: conf kern X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 23:34:19 -0000 Author: davide Date: Sat Oct 27 23:34:18 2012 New Revision: 242200 URL: http://svn.freebsd.org/changeset/base/242200 Log: MFC r238925: Until now KTR_ENTRIES, which defines the size of circular buffer used in ktr(4), was constrained to be a power of two. Remove this constraint and update sys/conf/NOTES accordingly. Modified: stable/8/sys/conf/NOTES stable/8/sys/kern/kern_ktr.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/conf/ (props changed) stable/8/sys/kern/ (props changed) Modified: stable/8/sys/conf/NOTES ============================================================================== --- stable/8/sys/conf/NOTES Sat Oct 27 23:30:46 2012 (r242199) +++ stable/8/sys/conf/NOTES Sat Oct 27 23:34:18 2012 (r242200) @@ -409,7 +409,7 @@ options KTRACE_REQUEST_POOL=101 # KTR is a kernel tracing mechanism imported from BSD/OS. Currently # it has no userland interface aside from a few sysctl's. It is # enabled with the KTR option. KTR_ENTRIES defines the number of -# entries in the circular trace buffer; it must be a power of two. +# entries in the circular trace buffer; it may be an arbitrary number. # KTR_COMPILE defines the mask of events to compile into the kernel as # defined by the KTR_* constants in . KTR_MASK defines the # initial value of the ktr_mask variable which determines at runtime Modified: stable/8/sys/kern/kern_ktr.c ============================================================================== --- stable/8/sys/kern/kern_ktr.c Sat Oct 27 23:30:46 2012 (r242199) +++ stable/8/sys/kern/kern_ktr.c Sat Oct 27 23:34:18 2012 (r242200) @@ -235,7 +235,7 @@ ktr_tracepoint(u_int mask, const char *f { do { saveindex = ktr_idx; - newindex = (saveindex + 1) & (KTR_ENTRIES - 1); + newindex = (saveindex + 1) % KTR_ENTRIES; } while (atomic_cmpset_rel_int(&ktr_idx, saveindex, newindex) == 0); entry = &ktr_buf[saveindex]; } @@ -290,7 +290,7 @@ static int db_mach_vtrace(void); DB_SHOW_COMMAND(ktr, db_ktr_all) { - tstate.cur = (ktr_idx - 1) & (KTR_ENTRIES - 1); + tstate.cur = (ktr_idx - 1) % KTR_ENTRIES; tstate.first = -1; db_ktr_verbose = 0; db_ktr_verbose |= (index(modif, 'v') != NULL) ? 2 : 0; From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 23:36: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 D1A986B9; Sat, 27 Oct 2012 23:36:41 +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 B49A48FC08; Sat, 27 Oct 2012 23:36: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 q9RNafZS082449; Sat, 27 Oct 2012 23:36:41 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9RNafh1082447; Sat, 27 Oct 2012 23:36:41 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201210272336.q9RNafh1082447@svn.freebsd.org> From: Juli Mallett Date: Sat, 27 Oct 2012 23:36:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242201 - head/sys/mips/cavium X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 23:36:41 -0000 Author: jmallett Date: Sat Oct 27 23:36:41 2012 New Revision: 242201 URL: http://svn.freebsd.org/changeset/base/242201 Log: Add missing return that broke 8-bit CF support in refactoring in r222671. Tested on a Cavium CN5860-EVB-NIC4. This was broken for over a year. Modified: head/sys/mips/cavium/octeon_ebt3000_cf.c Modified: head/sys/mips/cavium/octeon_ebt3000_cf.c ============================================================================== --- head/sys/mips/cavium/octeon_ebt3000_cf.c Sat Oct 27 23:34:18 2012 (r242200) +++ head/sys/mips/cavium/octeon_ebt3000_cf.c Sat Oct 27 23:36:41 2012 (r242201) @@ -280,6 +280,7 @@ static void cf_outb_8(int port, uint8_t if (bus_type == CF_8) { volatile uint8_t *task_file = (volatile uint8_t *)base_addr; task_file[port] = val; + return; } /* From owner-svn-src-all@FreeBSD.ORG Sat Oct 27 23:42: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 A94AF85E; Sat, 27 Oct 2012 23:42:41 +0000 (UTC) (envelope-from davide@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 920858FC0A; Sat, 27 Oct 2012 23:42: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 q9RNgfXe083368; Sat, 27 Oct 2012 23:42:41 GMT (envelope-from davide@svn.freebsd.org) Received: (from davide@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9RNgffr083366; Sat, 27 Oct 2012 23:42:41 GMT (envelope-from davide@svn.freebsd.org) Message-Id: <201210272342.q9RNgffr083366@svn.freebsd.org> From: Davide Italiano Date: Sat, 27 Oct 2012 23:42:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242202 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages 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, 27 Oct 2012 23:42:41 -0000 Author: davide Date: Sat Oct 27 23:42:41 2012 New Revision: 242202 URL: http://svn.freebsd.org/changeset/base/242202 Log: The fields of struct timespec32 should be int32_t and not uint32_t. Make this change. Reviewed by: bde, davidxu Tested by: pho MFC after: 1 week Modified: head/sys/kern/kern_umtx.c Modified: head/sys/kern/kern_umtx.c ============================================================================== --- head/sys/kern/kern_umtx.c Sat Oct 27 23:36:41 2012 (r242201) +++ head/sys/kern/kern_umtx.c Sat Oct 27 23:42:41 2012 (r242202) @@ -3291,8 +3291,8 @@ freebsd32_umtx_unlock(struct thread *td, } struct timespec32 { - uint32_t tv_sec; - uint32_t tv_nsec; + int32_t tv_sec; + int32_t tv_nsec; }; struct umtx_time32 {